diff --git a/Gopkg.lock b/Gopkg.lock
index 995b961..ba3906a 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -4,8 +4,30 @@
[[projects]]
branch = "master"
name = "github.com/cosmos72/gomacro"
- packages = ["ast2","base","classic","fast","imports","parser","scanner","token","typeutil","xreflect"]
- revision = "b90dd5143957e920ac0ce87f9a3277bbc3ce1641"
+ packages = [
+ "ast2",
+ "atomic",
+ "base",
+ "base/dep",
+ "base/untyped",
+ "fast",
+ "gls",
+ "imports",
+ "imports/syscall",
+ "imports/thirdparty",
+ "parser",
+ "scanner",
+ "token",
+ "typeutil",
+ "xreflect"
+ ]
+ revision = "5800d8430f0f35fe69ef1f684b775a330d240982"
+
+[[projects]]
+ name = "github.com/mattn/go-runewidth"
+ packages = ["."]
+ revision = "9e777a8366cce605130a531d2cd6363d07ad7317"
+ version = "v0.0.2"
[[projects]]
branch = "master"
@@ -21,13 +43,13 @@
[[projects]]
branch = "master"
- name = "golang.org/x/sync"
- packages = ["syncmap"]
- revision = "f52d1811a62927559de87708c8913c1650ce4f26"
+ name = "github.com/peterh/liner"
+ packages = ["."]
+ revision = "80ce870644db1b043e8dc2cf836bde5c347e2701"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "fa5d7d9ec51b9210ed3ca68de1105ddbbc070a941c737b3955518eaee951d10c"
+ inputs-digest = "278a5cfd4bdde672d425015cdbfbac9755a236e1644cfd16042e8b836a880272"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/kernel.go b/kernel.go
index ac2cd06..403b893 100644
--- a/kernel.go
+++ b/kernel.go
@@ -1,21 +1,24 @@
package main
import (
+ "bufio"
"encoding/json"
"errors"
"fmt"
- "go/ast"
"io"
"io/ioutil"
"log"
"os"
+ "reflect"
"runtime"
+ "strings"
"sync"
"time"
"github.com/cosmos72/gomacro/ast2"
"github.com/cosmos72/gomacro/base"
interp "github.com/cosmos72/gomacro/fast"
+ jupyterRuntime "github.com/gopherdata/gophernotes/runtime"
zmq "github.com/pebbe/zmq4"
)
@@ -36,14 +39,20 @@ type ConnectionInfo struct {
IP string `json:"ip"`
}
+// Socket wraps a zmq socket with a lock which should be used to control write access.
+type Socket struct {
+ Socket *zmq.Socket
+ Lock *sync.Mutex
+}
+
// SocketGroup holds the sockets needed to communicate with the kernel,
// and the key for message signing.
type SocketGroup struct {
- ShellSocket *zmq.Socket
- ControlSocket *zmq.Socket
- StdinSocket *zmq.Socket
- IOPubSocket *zmq.Socket
- HBSocket *zmq.Socket
+ ShellSocket Socket
+ ControlSocket Socket
+ StdinSocket Socket
+ IOPubSocket Socket
+ HBSocket Socket
Key []byte
}
@@ -85,6 +94,13 @@ const (
kernelIdle = "idle"
)
+// RunWithSocket invokes the `run` function after acquiring the `Socket.Lock` and releases the lock when done.
+func (s *Socket) RunWithSocket(run func(socket *zmq.Socket) error) error {
+ s.Lock.Lock()
+ defer s.Lock.Unlock()
+ return run(s.Socket)
+}
+
// runKernel is the main entry point to start the kernel.
func runKernel(connectionFile string) {
@@ -121,9 +137,9 @@ func runKernel(connectionFile string) {
// TODO gracefully shutdown the heartbeat handler on kernel shutdown by closing the chan returned by startHeartbeat.
poller := zmq.NewPoller()
- poller.Add(sockets.ShellSocket, zmq.POLLIN)
- poller.Add(sockets.StdinSocket, zmq.POLLIN)
- poller.Add(sockets.ControlSocket, zmq.POLLIN)
+ poller.Add(sockets.ShellSocket.Socket, zmq.POLLIN)
+ poller.Add(sockets.StdinSocket.Socket, zmq.POLLIN)
+ poller.Add(sockets.ControlSocket.Socket, zmq.POLLIN)
// msgParts will store a received multipart message.
var msgParts [][]byte
@@ -141,8 +157,8 @@ func runKernel(connectionFile string) {
switch socket := item.Socket; socket {
// Handle shell messages.
- case sockets.ShellSocket:
- msgParts, err = sockets.ShellSocket.RecvMessageBytes(0)
+ case sockets.ShellSocket.Socket:
+ msgParts, err = sockets.ShellSocket.Socket.RecvMessageBytes(0)
if err != nil {
log.Println(err)
}
@@ -156,12 +172,12 @@ func runKernel(connectionFile string) {
handleShellMsg(ir, msgReceipt{msg, ids, sockets})
// TODO Handle stdin socket.
- case sockets.StdinSocket:
- sockets.StdinSocket.RecvMessageBytes(0)
+ case sockets.StdinSocket.Socket:
+ sockets.StdinSocket.Socket.RecvMessageBytes(0)
// Handle control messages.
- case sockets.ControlSocket:
- msgParts, err = sockets.ControlSocket.RecvMessageBytes(0)
+ case sockets.ControlSocket.Socket:
+ msgParts, err = sockets.ControlSocket.Socket.RecvMessageBytes(0)
if err != nil {
log.Println(err)
return
@@ -194,46 +210,51 @@ func prepareSockets(connInfo ConnectionInfo) (SocketGroup, error) {
// Create the shell socket, a request-reply socket that may receive messages from multiple frontend for
// code execution, introspection, auto-completion, etc.
- sg.ShellSocket, err = context.NewSocket(zmq.ROUTER)
+ sg.ShellSocket.Socket, err = context.NewSocket(zmq.ROUTER)
+ sg.ShellSocket.Lock = &sync.Mutex{}
if err != nil {
return sg, err
}
// Create the control socket. This socket is a duplicate of the shell socket where messages on this channel
// should jump ahead of queued messages on the shell socket.
- sg.ControlSocket, err = context.NewSocket(zmq.ROUTER)
+ sg.ControlSocket.Socket, err = context.NewSocket(zmq.ROUTER)
+ sg.ControlSocket.Lock = &sync.Mutex{}
if err != nil {
return sg, err
}
// Create the stdin socket, a request-reply socket used to request user input from a front-end. This is analogous
// to a standard input stream.
- sg.StdinSocket, err = context.NewSocket(zmq.ROUTER)
+ sg.StdinSocket.Socket, err = context.NewSocket(zmq.ROUTER)
+ sg.StdinSocket.Lock = &sync.Mutex{}
if err != nil {
return sg, err
}
// Create the iopub socket, a publisher for broadcasting data like stdout/stderr output, displaying execution
// results or errors, kernel status, etc. to connected subscribers.
- sg.IOPubSocket, err = context.NewSocket(zmq.PUB)
+ sg.IOPubSocket.Socket, err = context.NewSocket(zmq.PUB)
+ sg.IOPubSocket.Lock = &sync.Mutex{}
if err != nil {
return sg, err
}
// Create the heartbeat socket, a request-reply socket that only allows alternating recv-send (request-reply)
// calls. It should echo the byte strings it receives to let the requester know the kernel is still alive.
- sg.HBSocket, err = context.NewSocket(zmq.REP)
+ sg.HBSocket.Socket, err = context.NewSocket(zmq.REP)
+ sg.HBSocket.Lock = &sync.Mutex{}
if err != nil {
return sg, err
}
// Bind the sockets.
address := fmt.Sprintf("%v://%v:%%v", connInfo.Transport, connInfo.IP)
- sg.ShellSocket.Bind(fmt.Sprintf(address, connInfo.ShellPort))
- sg.ControlSocket.Bind(fmt.Sprintf(address, connInfo.ControlPort))
- sg.StdinSocket.Bind(fmt.Sprintf(address, connInfo.StdinPort))
- sg.IOPubSocket.Bind(fmt.Sprintf(address, connInfo.IOPubPort))
- sg.HBSocket.Bind(fmt.Sprintf(address, connInfo.HBPort))
+ sg.ShellSocket.Socket.Bind(fmt.Sprintf(address, connInfo.ShellPort))
+ sg.ControlSocket.Socket.Bind(fmt.Sprintf(address, connInfo.ControlPort))
+ sg.StdinSocket.Socket.Bind(fmt.Sprintf(address, connInfo.StdinPort))
+ sg.IOPubSocket.Socket.Bind(fmt.Sprintf(address, connInfo.IOPubPort))
+ sg.HBSocket.Socket.Bind(fmt.Sprintf(address, connInfo.HBPort))
// Set the message signing key.
sg.Key = []byte(connInfo.Key)
@@ -345,9 +366,13 @@ func handleExecuteRequest(ir *interp.Interp, receipt msgReceipt) error {
io.Copy(&jupyterStdErr, rErr)
}()
- vals, executionErr := doEval(ir, code)
+ // Inject the display function into the environment
+ ir.DeclFunc("Display", func(data interface{}) error {
+ dispData := jupyterRuntime.Render(data)
+ return receipt.PublishDisplayData(dispData.Data, dispData.Metadata, dispData.Transient)
+ })
- //TODO if value is a certain type like image then display it instead
+ vals, executionErr := doEval(ir, code)
// Close and restore the streams.
wOut.Close()
@@ -364,8 +389,17 @@ func handleExecuteRequest(ir *interp.Interp, receipt msgReceipt) error {
content["user_expressions"] = make(map[string]string)
if !silent && vals != nil {
+
+ // Render the result of the execution.
+ var data jupyterRuntime.DisplayData
+ if len(vals) == 1 {
+ data = jupyterRuntime.Render(vals[0])
+ } else {
+ data = jupyterRuntime.Render(fmt.Sprint(vals...))
+ }
+
// Publish the result of the execution.
- if err := receipt.PublishExecutionResult(ExecCounter, fmt.Sprint(vals...)); err != nil {
+ if err := receipt.PublishExecutionResult(ExecCounter, data.Data, data.Metadata); err != nil {
log.Printf("Error publishing execution result: %v\n", err)
}
}
@@ -410,59 +444,53 @@ func doEval(ir *interp.Interp, code string) (val []interface{}, err error) {
// Reset the error line so that error messages correspond to the lines from the cell.
compiler.Line = 0
- // Parse the input code (and don't preform gomacro's macroexpansion).
- // These may panic but this will be recovered by the deferred recover() above so that the error
- // may be returned instead.
- nodes := compiler.ParseBytes([]byte(code))
- srcAst := ast2.AnyToAst(nodes, "doEval")
+ // Manually preform the iteration that gomacro's Repl does as it actually produces different results then a
+ // single Eval with respect to (at least) method resolution.
- // If there is no srcAst then we must be evaluating nothing. The result must be nil then.
- if srcAst == nil {
- return nil, nil
- }
+ // Read from the cell source code string.
+ ir.Comp.CompGlobals.Readline = base.MakeBufReadline(bufio.NewReader(strings.NewReader(code)), ioutil.Discard)
- // Check if the last node is an expression. If the last node is not an expression then nothing
- // is returned as a value. For example evaluating a function declaration shouldn't return a value but
- // just have the side effect of declaring the function.
- var srcEndsWithExpr bool
- if len(nodes) > 0 {
- _, srcEndsWithExpr = nodes[len(nodes)-1].(ast.Expr)
- }
+ // Save the most recent eval results.
+ var results []reflect.Value
- // Compile the ast.
- compiledSrc := ir.CompileAst(srcAst)
+ // Read the entire string one statement at a time.
+ for src, firstToken := ir.Read(); len(src) != 0; src, firstToken = ir.Read() {
+ if firstToken < 0 {
+ continue
+ }
- // Evaluate the code.
- result, results := ir.RunExpr(compiledSrc)
+ // Parse the input code (and don't preform gomacro's macroexpansion).
+ // These may panic but this will be recovered by the deferred recover() above so that the error
+ // may be returned instead.
+ nodes := compiler.ParseBytes([]byte(src))
+ srcAst := ast2.AnyToAst(nodes, "doEval")
- // If the source ends with an expression, then the result of the execution is the value of the expression. In the
- // event that all return values are nil, the result is also nil.
- if srcEndsWithExpr {
- // `len(results) == 0` implies a single result stored in `result`.
- if len(results) == 0 {
- if val := base.ValueInterface(result); val != nil {
- return []interface{}{val}, nil
- }
- return nil, nil
+ // If there is no srcAst then we must be evaluating nothing. The result must be nil then.
+ if srcAst == nil {
+ continue
}
- // Count the number of non-nil values in the output. If they are all nil then the output is skipped.
- nonNilCount := 0
- var values []interface{}
- for _, result := range results {
- val := base.ValueInterface(result)
- if val != nil {
- nonNilCount++
- }
- values = append(values, val)
- }
+ // Compile the ast.
+ compiledSrc := ir.CompileAst(srcAst)
+
+ // Evaluate the code and save the results.
+ results, _ = ir.RunExpr(compiledSrc)
+ }
- if nonNilCount > 0 {
- return values, nil
+ // Count the number of non-nil values in the output. If they are all nil then the output is skipped.
+ nonNilCount := 0
+ var values []interface{}
+ for _, result := range results {
+ val := base.ValueInterface(result)
+ if val != nil {
+ nonNilCount++
}
- return nil, nil
+ values = append(values, val)
}
+ if nonNilCount > 0 {
+ return values, nil
+ }
return nil, nil
}
@@ -486,7 +514,7 @@ func handleShutdownRequest(receipt msgReceipt) {
// startHeartbeat starts a go-routine for handling heartbeat ping messages sent over the given `hbSocket`. The `wg`'s
// `Done` method is invoked after the thread is completely shutdown. To request a shutdown the returned `shutdown` channel
// can be closed.
-func startHeartbeat(hbSocket *zmq.Socket, wg *sync.WaitGroup) (shutdown chan struct{}) {
+func startHeartbeat(hbSocket Socket, wg *sync.WaitGroup) (shutdown chan struct{}) {
quit := make(chan struct{})
// Start the handler that will echo any received messages back to the sender.
@@ -496,7 +524,7 @@ func startHeartbeat(hbSocket *zmq.Socket, wg *sync.WaitGroup) (shutdown chan str
// Create a `Poller` to check for incoming messages.
poller := zmq.NewPoller()
- poller.Add(hbSocket, zmq.POLLIN)
+ poller.Add(hbSocket.Socket, zmq.POLLIN)
for {
select {
@@ -511,16 +539,22 @@ func startHeartbeat(hbSocket *zmq.Socket, wg *sync.WaitGroup) (shutdown chan str
// If there is at least 1 message waiting then echo it.
if len(pingEvents) > 0 {
- // Read a message from the heartbeat channel as a simple byte string.
- pingMsg, err := hbSocket.RecvBytes(0)
- if err != nil {
- log.Fatalf("Error reading heartbeat ping bytes: %v\n", err)
- }
-
- // Send the received byte string back to let the front-end know that the kernel is alive.
- if _, err = hbSocket.SendBytes(pingMsg, 0); err != nil {
- log.Printf("Error sending heartbeat pong bytes: %b\n", err)
- }
+ hbSocket.RunWithSocket(func(echo *zmq.Socket) error {
+ // Read a message from the heartbeat channel as a simple byte string.
+ pingMsg, err := echo.RecvBytes(0)
+ if err != nil {
+ log.Fatalf("Error reading heartbeat ping bytes: %v\n", err)
+ return err
+ }
+
+ // Send the received byte string back to let the front-end know that the kernel is alive.
+ if _, err = echo.SendBytes(pingMsg, 0); err != nil {
+ log.Printf("Error sending heartbeat pong bytes: %b\n", err)
+ return err
+ }
+
+ return nil
+ })
}
}
}
diff --git a/main.go b/main.go
index 2095901..4d589fe 100644
--- a/main.go
+++ b/main.go
@@ -6,12 +6,11 @@ import (
)
const (
-
// Version defines the gophernotes version.
- Version string = "1.0.0"
+ Version = "1.0.0"
// ProtocolVersion defines the Jupyter protocol version.
- ProtocolVersion string = "5.0"
+ ProtocolVersion = "5.1"
)
func main() {
diff --git a/messages.go b/messages.go
index 3b6b2f6..43587e3 100644
--- a/messages.go
+++ b/messages.go
@@ -189,7 +189,9 @@ func (receipt *msgReceipt) Publish(msgType string, content interface{}) error {
}
msg.Content = content
- return receipt.SendResponse(receipt.Sockets.IOPubSocket, msg)
+ return receipt.Sockets.IOPubSocket.RunWithSocket(func(iopub *zmq.Socket) error {
+ return receipt.SendResponse(iopub, msg)
+ })
}
// Reply creates a new ComposedMsg and sends it back to the return identities over the
@@ -202,15 +204,23 @@ func (receipt *msgReceipt) Reply(msgType string, content interface{}) error {
}
msg.Content = content
- return receipt.SendResponse(receipt.Sockets.ShellSocket, msg)
+ return receipt.Sockets.ShellSocket.RunWithSocket(func(shell *zmq.Socket) error {
+ return receipt.SendResponse(shell, msg)
+ })
}
-// newTextMIMEDataBundle creates a bundledMIMEData that only contains a text representation described
-// by the value parameter.
-func newTextBundledMIMEData(value string) bundledMIMEData {
- return bundledMIMEData{
- "text/plain": value,
- }
+func (receipt *msgReceipt) PublishDisplayData(data bundledMIMEData, meta, transient map[string]interface{}) error {
+ return receipt.Publish("display_data",
+ struct {
+ Data bundledMIMEData `json:"data"`
+ Metadata map[string]interface{} `json:"metadata"`
+ Transient map[string]interface{} `json:"transient,omitempty"`
+ }{
+ Data: data,
+ Metadata: meta,
+ Transient: transient,
+ },
+ )
}
// PublishKernelStatus publishes a status message notifying front-ends of the state the kernel is in. Supports
@@ -239,8 +249,11 @@ func (receipt *msgReceipt) PublishExecutionInput(execCount int, code string) err
)
}
-// PublishExecuteResult publishes the result of the `execCount` execution as a string.
-func (receipt *msgReceipt) PublishExecutionResult(execCount int, output string) error {
+// PublishExecuteResult publishes the result of the `execCount` execution.
+func (receipt *msgReceipt) PublishExecutionResult(execCount int, data bundledMIMEData, metadata bundledMIMEData) error {
+ if metadata == nil {
+ metadata = make(bundledMIMEData)
+ }
return receipt.Publish("execute_result",
struct {
ExecCount int `json:"execution_count"`
@@ -248,8 +261,8 @@ func (receipt *msgReceipt) PublishExecutionResult(execCount int, output string)
Metadata bundledMIMEData `json:"metadata"`
}{
ExecCount: execCount,
- Data: newTextBundledMIMEData(output),
- Metadata: make(bundledMIMEData),
+ Data: data,
+ Metadata: metadata,
},
)
}
diff --git a/runtime/display.go b/runtime/display.go
new file mode 100644
index 0000000..9fbcfb3
--- /dev/null
+++ b/runtime/display.go
@@ -0,0 +1,182 @@
+package runtime
+
+import (
+ "fmt"
+ "strings"
+)
+
+// Aim to support an interface as similar to the IPython (canonical Jupyter kernel) as possible.
+// See http://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html#IPython.display.display
+// for a good overview of the support types. Note: This is missing _repr_markdown_ and _repr_javascript_.
+
+// The following *Renderable interfaces are used by user classes to provide render functions for various
+// representations.
+
+type HTMLRenderable interface {
+ // RenderAsHTML renders the data as an HTML string. The representation should **not** include the
+ // `` or `
` tags.
+ RenderAsHTML() string
+}
+
+type MarkdownRenderable interface {
+ // RenderAsMarkdown renders the data as a markdown string.
+ RenderAsMarkdown() string
+}
+
+type SVGRenderable interface {
+ // RenderAsSVG renders the data as an svg string (xml) **with** the ` ` tag.
+ RenderAsSVG() string
+}
+
+type PNGRenderable interface {
+ // RenderAsPNG renders the data as an image in the PNG format.
+ RenderAsPNG() []byte
+}
+
+type JPEGRenderable interface {
+ // RenderAsJPEG renders the data as an image in the JPEG format.
+ RenderAsJPEG() []byte
+}
+
+type LatexRenderable interface {
+ // RenderAsLatex renders the data as a latex string **surrounded in an opening and closing `$`**.
+ RenderAsLatex() string
+}
+
+type JSONRenderable interface {
+ // RenderAsJSON renders the data as a JSON dictionary.
+ RenderAsJSON() map[string]interface{}
+}
+
+type JavaScriptRenderable interface {
+ // RenderAsJavaScript renders the data as a JavaScript string.
+ RenderAsJavaScript() string
+}
+
+type MIMEBundleRenderable interface {
+ // RenderAsMIMEBundle renders the data as a plain MIME bundle. The keys of the map are the MIME type of the
+ // data (value) associated with that key. The data will be some JSON serializable object but the structure is
+ // determined by what the frontend expects. Some common formats supported by the Jupyter frontend are provided
+ // by the various `*Renderable` interfaces.
+ RenderAsMIMEBundle() (data, metadata map[string]interface{})
+}
+
+type DisplayData struct {
+ Data map[string]interface{}
+ Metadata map[string]interface{}
+ Transient map[string]interface{}
+}
+
+func (data DisplayData) WithData(mimeType string, rendered interface{}) DisplayData {
+ data.Data[mimeType] = rendered
+ return data
+}
+
+func (data DisplayData) WithMetadata(key string, value interface{}) DisplayData {
+ data.Metadata[key] = value
+ return data
+}
+
+func (data DisplayData) WithTransientData(key string, value interface{}) DisplayData {
+ data.Transient[key] = value
+ return data
+}
+
+const (
+ MIMETypeHTML = "text/html"
+ MIMETypeMarkdown = "text/markdown"
+ MIMETypeLatex = "text/latex"
+ MIMETypeSVG = "image/svg+xml"
+ MIMETypePNG = "image/png"
+ MIMETypeJPEG = "image/jpeg"
+ MIMETypeJSON = "application/json"
+ MIMETypeJavaScript = "application/javascript"
+)
+
+func Text(data interface{}) DisplayData {
+ return DisplayData{
+ Data: map[string]interface{}{
+ "text/plain": fmt.Sprint(data),
+ },
+ Metadata: make(map[string]interface{}),
+ }
+}
+
+func HTML(html HTMLRenderable) DisplayData {
+ return Text(html).WithData(
+ MIMETypeHTML,
+ html.RenderAsHTML(),
+ )
+}
+
+func Markdown(markdown MarkdownRenderable) DisplayData {
+ return Text(markdown).WithData(
+ MIMETypeMarkdown,
+ markdown.RenderAsMarkdown(),
+ )
+}
+
+func SVG(svg SVGRenderable) DisplayData {
+ return Text(svg).WithData(
+ MIMETypeSVG,
+ svg.RenderAsSVG(),
+ )
+}
+
+func PNG(png PNGRenderable) DisplayData {
+ return Text(png).WithData(
+ MIMETypePNG,
+ png.RenderAsPNG(), // []byte are encoded as base64 by the marshaller
+ )
+}
+
+func JPEG(jpeg JPEGRenderable) DisplayData {
+ return Text(jpeg).WithData(
+ MIMETypeJPEG,
+ jpeg.RenderAsJPEG(), // []byte are encoded as base64 by the marshaller
+ )
+}
+
+func Math(latex LatexRenderable) DisplayData {
+ return Text(latex).WithData(
+ MIMETypeLatex,
+ "$$"+strings.Trim(latex.RenderAsLatex(), "$")+"$$",
+ )
+}
+
+func Latex(latex LatexRenderable) DisplayData {
+ return Text(latex).WithData(
+ MIMETypeLatex,
+ "$"+strings.Trim(latex.RenderAsLatex(), "$")+"$",
+ )
+}
+
+func JSON(json JSONRenderable) DisplayData {
+ return Text(json).WithData(
+ MIMETypeJSON,
+ json.RenderAsJSON(),
+ )
+}
+
+func JavaScript(javascript JavaScriptRenderable) DisplayData {
+ return Text(javascript).WithData(
+ MIMETypeJavaScript,
+ javascript.RenderAsJavaScript(),
+ )
+}
+
+//TODO the above functions need to handle the metadata
+
+func Render(data interface{}) DisplayData {
+ if dispData, ok := data.(DisplayData); ok {
+ return dispData
+ } else if bundleRenderer, ok := data.(MIMEBundleRenderable); ok {
+ data, metadata := bundleRenderer.RenderAsMIMEBundle()
+ return DisplayData{
+ Data: data,
+ Metadata: metadata,
+ }
+ } else {
+ return Text(data)
+ }
+}
diff --git a/runtime/x_package.go b/runtime/x_package.go
new file mode 100644
index 0000000..3b52d6f
--- /dev/null
+++ b/runtime/x_package.go
@@ -0,0 +1,157 @@
+// this file was generated by gomacro command: import _i "github.com/gopherdata/gophernotes/runtime"
+// DO NOT EDIT! Any change will be lost when the file is re-generated
+
+package runtime
+
+import (
+ r "reflect"
+
+ "github.com/cosmos72/gomacro/imports"
+)
+
+// reflection: allow interpreted code to import "github.com/gopherdata/gophernotes/runtime"
+func init() {
+ imports.Packages["github.com/gopherdata/gophernotes/runtime"] = imports.Package{
+ Binds: map[string]r.Value{
+ "HTML": r.ValueOf(HTML),
+ "JPEG": r.ValueOf(JPEG),
+ "JSON": r.ValueOf(JSON),
+ "JavaScript": r.ValueOf(JavaScript),
+ "Latex": r.ValueOf(Latex),
+ "MIMETypeHTML": r.ValueOf(MIMETypeHTML),
+ "MIMETypeJPEG": r.ValueOf(MIMETypeJPEG),
+ "MIMETypeJSON": r.ValueOf(MIMETypeJSON),
+ "MIMETypeJavaScript": r.ValueOf(MIMETypeJavaScript),
+ "MIMETypeLatex": r.ValueOf(MIMETypeLatex),
+ "MIMETypeMarkdown": r.ValueOf(MIMETypeMarkdown),
+ "MIMETypePNG": r.ValueOf(MIMETypePNG),
+ "MIMETypeSVG": r.ValueOf(MIMETypeSVG),
+ "Markdown": r.ValueOf(Markdown),
+ "Math": r.ValueOf(Math),
+ "PNG": r.ValueOf(PNG),
+ "Render": r.ValueOf(Render),
+ "SVG": r.ValueOf(SVG),
+ "Text": r.ValueOf(Text),
+ }, Types: map[string]r.Type{
+ "DisplayData": r.TypeOf((*DisplayData)(nil)).Elem(),
+ "HTMLRenderable": r.TypeOf((*HTMLRenderable)(nil)).Elem(),
+ "JPEGRenderable": r.TypeOf((*JPEGRenderable)(nil)).Elem(),
+ "JSONRenderable": r.TypeOf((*JSONRenderable)(nil)).Elem(),
+ "JavaScriptRenderable": r.TypeOf((*JavaScriptRenderable)(nil)).Elem(),
+ "LatexRenderable": r.TypeOf((*LatexRenderable)(nil)).Elem(),
+ "MIMEBundleRenderable": r.TypeOf((*MIMEBundleRenderable)(nil)).Elem(),
+ "MarkdownRenderable": r.TypeOf((*MarkdownRenderable)(nil)).Elem(),
+ "PNGRenderable": r.TypeOf((*PNGRenderable)(nil)).Elem(),
+ "SVGRenderable": r.TypeOf((*SVGRenderable)(nil)).Elem(),
+ }, Proxies: map[string]r.Type{
+ "HTMLRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_HTMLRenderable)(nil)).Elem(),
+ "JPEGRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_JPEGRenderable)(nil)).Elem(),
+ "JSONRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_JSONRenderable)(nil)).Elem(),
+ "JavaScriptRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_JavaScriptRenderable)(nil)).Elem(),
+ "LatexRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_LatexRenderable)(nil)).Elem(),
+ "MIMEBundleRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_MIMEBundleRenderable)(nil)).Elem(),
+ "MarkdownRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_MarkdownRenderable)(nil)).Elem(),
+ "PNGRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_PNGRenderable)(nil)).Elem(),
+ "SVGRenderable": r.TypeOf((*P_github_com_gopherdata_gophernotes_runtime_SVGRenderable)(nil)).Elem(),
+ }, Untypeds: map[string]string{
+ "MIMETypeHTML": "string:text/html",
+ "MIMETypeJPEG": "string:image/jpeg",
+ "MIMETypeJSON": "string:application/json",
+ "MIMETypeJavaScript": "string:application/javascript",
+ "MIMETypeLatex": "string:text/latex",
+ "MIMETypeMarkdown": "string:text/markdown",
+ "MIMETypePNG": "string:image/png",
+ "MIMETypeSVG": "string:image/svg+xml",
+ },
+ }
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.HTMLRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_HTMLRenderable struct {
+ Object interface{}
+ RenderAsHTML_ func(interface{}) string
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_HTMLRenderable) RenderAsHTML() string {
+ return P.RenderAsHTML_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.JPEGRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_JPEGRenderable struct {
+ Object interface{}
+ RenderAsJPEG_ func(interface{}) []byte
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_JPEGRenderable) RenderAsJPEG() []byte {
+ return P.RenderAsJPEG_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.JSONRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_JSONRenderable struct {
+ Object interface{}
+ RenderAsJSON_ func(interface{}) map[string]interface{}
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_JSONRenderable) RenderAsJSON() map[string]interface{} {
+ return P.RenderAsJSON_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.JavaScriptRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_JavaScriptRenderable struct {
+ Object interface{}
+ RenderAsJavaScript_ func(interface{}) string
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_JavaScriptRenderable) RenderAsJavaScript() string {
+ return P.RenderAsJavaScript_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.LatexRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_LatexRenderable struct {
+ Object interface{}
+ RenderAsLatex_ func(interface{}) string
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_LatexRenderable) RenderAsLatex() string {
+ return P.RenderAsLatex_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.MIMEBundleRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_MIMEBundleRenderable struct {
+ Object interface{}
+ RenderAsMIMEBundle_ func(interface{}) (data map[string]interface{}, metadata map[string]interface{})
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_MIMEBundleRenderable) RenderAsMIMEBundle() (data map[string]interface{}, metadata map[string]interface{}) {
+ return P.RenderAsMIMEBundle_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.MarkdownRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_MarkdownRenderable struct {
+ Object interface{}
+ RenderAsMarkdown_ func(interface{}) string
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_MarkdownRenderable) RenderAsMarkdown() string {
+ return P.RenderAsMarkdown_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.PNGRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_PNGRenderable struct {
+ Object interface{}
+ RenderAsPNG_ func(interface{}) []byte
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_PNGRenderable) RenderAsPNG() []byte {
+ return P.RenderAsPNG_(P.Object)
+}
+
+// --------------- proxy for github.com/gopherdata/gophernotes/runtime.SVGRenderable ---------------
+type P_github_com_gopherdata_gophernotes_runtime_SVGRenderable struct {
+ Object interface{}
+ RenderAsSVG_ func(interface{}) string
+}
+
+func (P *P_github_com_gopherdata_gophernotes_runtime_SVGRenderable) RenderAsSVG() string {
+ return P.RenderAsSVG_(P.Object)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/.gitignore b/vendor/github.com/cosmos72/gomacro/.gitignore
index 8c3cff0..2155770 100644
--- a/vendor/github.com/cosmos72/gomacro/.gitignore
+++ b/vendor/github.com/cosmos72/gomacro/.gitignore
@@ -1,4 +1,6 @@
gomacro
+a.out
+*.o
*.exe
*.test
-examples/examples
+example/example
diff --git a/vendor/github.com/cosmos72/gomacro/LICENSE b/vendor/github.com/cosmos72/gomacro/LICENSE
index 65c5ca8..14e2f77 100644
--- a/vendor/github.com/cosmos72/gomacro/LICENSE
+++ b/vendor/github.com/cosmos72/gomacro/LICENSE
@@ -1,165 +1,373 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+Mozilla Public License Version 2.0
+==================================
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+1. Definitions
+--------------
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
- 0. Additional Definitions.
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/vendor/github.com/cosmos72/gomacro/README.md b/vendor/github.com/cosmos72/gomacro/README.md
index b1fe2db..07f77e7 100644
--- a/vendor/github.com/cosmos72/gomacro/README.md
+++ b/vendor/github.com/cosmos72/gomacro/README.md
@@ -1,70 +1,89 @@
-## gomacro - interactive Go interpreter with macros
+## gomacro - interactive Go interpreter and debugger with macros
-gomacro is a fairly complete Go interpreter, implemented in pure Go. It offers both
+gomacro is an almost complete Go interpreter, implemented in pure Go. It offers both
an interactive REPL and a scripting mode, and does not require a Go toolchain at runtime
-(except in one very specific case: import of a non-standard package).
+(except in one very specific case: import of a 3rd party package at runtime).
-It has very few dependencies: go/ast, go/types, reflect and,
-for goroutines support, golang.org/x/sync/syncmap.
+It has two dependencies beyond the Go standard library: github.com/peterh/liner and golang.org/x/sys
Gomacro can be used as:
-* a standalone executable with interactive Go REPL:
- just run `gomacro` from your command line or, better, `rlwrap gomacro`
- (rlwrap is a wrapper that adds history and line editing to terminal-based
- programs - available on many platforms)
- Available options:
+* a standalone executable with interactive Go REPL, line editing and code completion:
+ just run `gomacro` from your command line, then type Go code. Example:
```
- -c, --collect collect declarations and statements, to print them later
- -e, --expr EXPR evaluate expression
- -f, --force-overwrite option -w will overwrite existing files
- -h, --help show this help and exit
- -i, --repl interactive. start a REPL after evaluating expression, files and dirs.
- default: start a REPL only if no expressions, files or dirs are specified
- -m, --macro-only do not execute code, only parse and macroexpand it.
- useful to run gomacro as a Go preprocessor
- -n, --no-trap do not trap panics in the interpreter
- -t, --trap trap panics in the interpreter (default)
- -s, --silent silent. do NOT show startup message, prompt, and expressions results.
- default when executing files and dirs.
- -v, --verbose verbose. show startup message, prompt, and expressions results.
- default when executing an expression.
- -vv, --very-verbose as -v, and in addition show the type of expressions results.
- default when executing a REPL
- -w, --write-decls write collected declarations and statements to *.go files.
- implies -c
- -x, --exec execute parsed code (default). disabled by -m
+ $ gomacro
+ [greeting message...]
+
+ gomacro> import "fmt"
+ gomacro> fmt.Println("hello, world!")
+ hello, world!
+ 14 // int
+ // error
+ gomacro>
```
+ press TAB to autocomplete a word, and press it again to cycle on possible completions.
- Options are processed in order, except for -i that is always processed as last.
-
- Collected declarations and statements can be also written to standard output
- or to a file with the REPL command :write
+ Line editing follows mostly Emacs: Ctrl+A or Home jumps to start of line,
+ Ctrl+E or End jumps to end of line, Ald+D deletes word starting at cursor...
+ For the full list of key bindings, see https://github.com/peterh/liner
+
+
+* a Go source code debugger: see [Debugger](#debugger)
-* an interactive tool to make science more productive and more fun.
+* an interactive tool to make science more productive and more fun.
If you use compiled Go with scientific libraries (physics, bioinformatics, statistics...)
- you can import the same libraries from gomacro REPL (requires Go 1.8+ and Linux),
+ you can import the same libraries from gomacro REPL (immediate on Go 1.8+ and Linux,
+ requires restarting on other platforms, see [Importing packages](#importing-packages) below),
call them interactively, inspect the results, feed them to other functions/libraries,
all in a single session.
The imported libraries will be **compiled**, not interpreted,
so they will be as fast as in compiled Go.
-* a library that adds Eval() and scripting capabilities
- to your Go programs - provided you comply with its LGPL license
-
-* a way to execute Go source code on-the-fly without a Go compiler:
+ For a graphical user interface on top of gomacro, see [Gophernotes](https://github.com/gopherdata/gophernotes).
+ It is a Go kernel for Jupyter notebooks and nteract, and uses gomacro for Go code evaluation.
+
+* a library that adds Eval() and scripting capabilities to your Go programs in few lines
+ of code:
+ ```
+ package main
+ import (
+ "fmt"
+ "reflect"
+ "github.com/cosmos72/gomacro/fast"
+ )
+ func RunGomacro(toeval string) reflect.Value {
+ interp := fast.New()
+ // for simplicity, only collect the first returned value
+ val, _ := interp.Eval(toeval)
+ return val
+ }
+ func main() {
+ fmt.Println(RunGomacro("1+1"))
+ }
+ ```
+ Also, [github issue #13](https://github.com/cosmos72/gomacro/issues/13) explains
+ how to have your application's functions, variable, constants and types
+ available in the interpreter.
+
+ Note: gomacro license is [MPL 2.0](LICENSE), which imposes some restrictions
+ on programs that use gomacro.
+ See [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) for common questions
+ regarding the license terms and conditions.
+
+
+* a way to execute Go source code on-the-fly without a Go compiler:
you can either run `gomacro FILENAME.go` (works on every supported platform)
or you can insert a line `#!/usr/bin/env gomacro` at the beginning of a Go source file,
then mark the file as executable with `chmod +x FILENAME.go` and finally execute it
with `./FILENAME.go` (works only on Unix-like systems: Linux, *BSD, Mac OS X ...)
-* a Go code generation tool:
+* a Go code generation tool:
gomacro was started as an experiment to add Lisp-like macros to Go, and they are
extremely useful (in the author's opinion) to simplify code generation.
Macros are normal Go functions, they are special only in one aspect:
they are executed **before** compiling code, and their input and output **is** code
(abstract syntax trees, in the form of go/ast.Node)
-
+
Don't confuse them with C preprocessor macros: in Lisp, Scheme and now in Go,
macros are regular functions written in the same programming language
as the rest of the source code. They can perform arbitrary computations
@@ -78,71 +97,211 @@ Gomacro can be used as:
To parse and macroexpand all *.gomacro files in a directory, run `gomacro -m -w DIRECTORY`
+## Installation
+
+### Prerequites
+
+- [Go 1.9+](https://golang.org/doc/install)
+
+### Supported platforms
+
+Gomacro is pure Go, and in theory it should work on any platform supported by the Go compiler.
+The following combinations are tested and known to work:
+
+- Linux: amd64, 386, arm64, arm, mips, ppc64le (on Linux it can also import 3rd party libraries at runtime)
+- Mac OS X: amd64, 386 (386 binaries running on amd64 system)
+- Windows: amd64, 386
+- FreeBSD: amd64, 386
+- Android: arm64, arm (tested with [Termux](https://termux.com/) and the Go compiler distributed with it)
+
+### How to install
+
+ The command
+ ```
+ go get -u github.com/cosmos72/gomacro
+ ```
+ downloads, compiles and installs gomacro and its dependencies
+
## Current Status
-Fairly complete.
-
-The intepreter supports:
-* multiline input
-* line comments starting with #! in addition to //
-* basic types: booleans, integers, floats, complex numbers, strings (and iota)
-* the empty interface, i.e. interface{} - other interfaces not implemented yet
-* constant, variable and type declarations (untyped constants are emulated with typed constants)
-* Go 1.9 type aliases (experimental)
-* unary and binary operators
-* assignment, i.e. operators = += -= *= /= %= &= |= ^= &^= <<= >>=
-* composite types: arrays, channels, maps, pointers, slices, strings, structs
-* composite literals
-* type assertions
-* function declarations (including variadic functions)
-* method declarations (including variadic methods and methods with pointer receiver)
-* seamless invocation of compiled functions from interpreter, and vice-versa
-* channel send and receive
-* goroutines, i.e. go function(args)
-* function and method calls, including multiple return values
-* if, for, for-range, break, continue, fallthrough, return (unimplemented: goto)
-* select, switch, type switch, fallthrough
-* all builtins: append, cap, close, comples, defer, delete, imag, len, make, new, panic, print, println, real, recover
-* imports: Go standard packages "just work", importing other packages requires the "plugin" package (available only for Go 1.8+ on Linux)
-* switching to a different package
-* macro declarations, for example `macro foo(a, b, c interface{}) interface{} { return b }`
-* macro calls, for example `foo; x; y; z`
-* macroexpansion: code walker, MacroExpand and MacroExpand1
-* ~quote and ~quasiquote. they take any number of arguments in curly braces, for example:
- `~quote { x; y; z }`
-* ~unquote and ~unquote_splice
-* ~func, ~lambda: specializations of "func".
- * ~lambda always starts a closure (lambda) or a function type
- * ~func always starts a function or method declaration
- useful to resolve a limitation in Go syntax that becomes significant for ~quote and ~quasiquote:
- * in declarations, "func" always declares a function or method - there is no way to declare a closure (lambda) or function type
- * in statements and expressions, including the body of ~quote and ~quasiquote,
- "func" always declares a closure (lambda) or a function type - there is no way to declare a function or method
-* nesting macros, quotes and unquotes
-
-Some features are still missing:
-* interfaces. They can be declared, but nothing more: there is no way to implement them or call their methods
-* extracting methods from types. For example `time.Duration.String` should return a `func(time.Duration) string`
- but currently gives an error.
- Instead extracting methods from objects is supported: `time.Duration(1s).String` correctly returns a func() string
-* goto
-* named return values
-* history/readline (rlwrap does the job in most cases)
-
-Limitations:
-* no distinction between named and unnamed types created by interpreted code.
- For the interpreter, `struct { A, B int }` and `type Pair struct { A, B int }`
- are exactly the same type. This has subtle consequences, including the risk
- that two different packages define the same type and overwrite each other's methods.
-
- The reason for such limitation is simple: the interpreter uses `reflect.StructOf()`
- to define new types, which can only create unnamed types.
- The interpreter then defines named types as aliases for the underlying unnamed types.
-
-* cannot create recursive types, as for example `type List struct { First interface{}; Rest *List}`
- The reason is the same as above: the interpreter uses `reflect.StructOf()` to define new types,
- which cannot create recursive types
+Almost complete.
+
+The main limitations and missing features are:
+
+* importing 3rd party libraries on non-Linux systems is cumbersome - see [Importing packages](#importing-packages).
+* some corner cases using interpreted interfaces, as interface -> interface type assertions and type switches, are not implemented yet.
+* goto can only jump backward, not forward
+* out-of-order code is under testing - some corner cases, as for example out-of-order declarations
+ used in keys of composite literals, are not supported.
+ Clearly, at REPL code is still executed as soon as possible, so it makes a difference mostly
+ if you separate multiple declarations with ; on a single line. Example: `var a = b; var b = 42`
+ Support for "batch mode" is in progress - it reads as much source code as possible before executing it,
+ and it's useful mostly to execute whole files or directories.
+
+The [documentation](doc/) also contains the [full list of features and limitations](doc/features-and-limitations.md)
+
+## Extensions
+
+Compared to compiled Go, gomacro supports several extensions:
+
+* an integrated debugger, see [Debugger](#debugger)
+
+* configurable special commands. Type `:help` at REPL to list them,
+ and see [cmd.go:37](https://github.com/cosmos72/gomacro/blob/master/fast/cmd.go#L37)
+ for the documentation and API to define new ones.
+
+* untyped constants can be manipulated directly at REPL. Examples:
+ ```
+ gomacro> 1<<100
+ {int 1267650600228229401496703205376} // untyped.Lit
+ gomacro> const c = 1<<100; c * c / 100000000000
+ {int 16069380442589902755419620923411626025222029937827} // untyped.Lit
+ ```
+ This provides a handy arbitrary-precision calculator.
+
+ Note: operations on large untyped integer constants are always exact,
+ while operations on large untyped float constants are implemented with `go/constant.Value`,
+ and are exact as long as both numerator and denominator are <= 5e1232.
+
+ Beyond that, `go/constant.Value` switches from `*big.Rat` to `*big.Float`
+ with precision = 512, which can accumulate rounding errors.
+
+ If you need **exact** results, convert the untyped float constant to `*big.Rat`
+ (see next item) before exceeding 5e1232.
+
+* untyped constants can be converted implicitly to `*big.Int`, `*big.Rat` and `*big.Float`. Examples:
+ ```
+ import "math/big"
+ var i *big.Int = 1<<1000 // exact - would overflow int
+ var r *big.Rat = 1.000000000000000000001 // exact - different from 1.0
+ var s *big.Rat = 5e1232 // exact - would overflow float64
+ var t *big.Rat = 1e1234 // approximate, exceeds 5e1232
+ var f *big.Float = 1e646456992 // largest untyped float constant that is different from +Inf
+ ```
+ Note: every time such a conversion is evaluated, it creates a new value - no risk to modify the constant.
+
+ Be aware that converting a huge value to string, as typing `f` at REPL would do, can be very slow.
+
+* macros, quoting and quasiquoting (to be documented)
+
+and slightly relaxed checks:
+* unused variables and unused return values never cause errors
+
+## Examples
+
+Some short, notable examples - to run them on non-Linux platforms, see [Importing packages](#importing-packages) first.
+
+### plot mathematical functions
+
+* install libraries: `go get gonum.org/v1/plot gonum.org/v1/plot/plotter gonum.org/v1/plot/vg`
+* start the interpreter: `gomacro`
+* at interpreter prompt, paste the whole Go code listed at https://github.com/gonum/plot/wiki/Example-plots#functions
+ (the source code starts after the picture under the section "Functions", and ends just before the section "Histograms")
+* still at interpreter prompt, enter `main()`
+ If all goes well, it will create a file named "functions.png" in current directory containing the plotted functions.
+
+### simple mandelbrot web server
+
+* install libraries: `go get github.com/sverrirab/mandelbrot-go`
+* chdir to mandelbrot-go source folder: `cd; cd go/src/github.com/sverrirab/mandelbrot-go`
+* start interpreter with arguments: `gomacro -i mbrot.go`
+* at interpreter prompt, enter `init(); main()`
+* visit http://localhost:8090/
+ Be patient, rendering and zooming mandelbrot set with an interpreter is a little slow.
+
+Further examples are listed by [Gophernotes](https://github.com/gopherdata/gophernotes/#example-notebooks-dowload-and-run-them-locally-follow-the-links-to-view-in-github-or-use-the-jupyter-notebook-viewer)
+
+## Importing packages
+
+Gomacro supports the standard Go syntax `import`, including package renaming. Examples:
+```
+import "fmt"
+import (
+ "io"
+ "net/http"
+ r "reflect"
+)
+```
+Third party packages - i.e. packages not in Go standard library - can also be imported
+with the same syntax, as long as the package is **already** installed.
+
+To install a package, follow its installation procedure: quite often it is the command `go get PACKAGE-PATH`
+
+The next steps depend on the system you are running gomacro on:
+
+### Linux
+
+If you are running gomacro on Linux, `import` will then just work. Example:
+```
+$ go get gonum.org/v1/plot
+$ gomacro
+[greeting message...]
+
+gomacro> import "gonum.org/v1/plot"
+// debug: created file "/home/max/src/gomacro_imports/gonum.org/v1/plot/plot.go"...
+// debug: compiling "/home/max/go/src/gomacro_imports/gonum.org/v1/plot/plot.go" ...
+gomacro> plot.New()
+&{...} // *plot.Plot
+ // error
+```
+
+Note: internally, gomacro will compile and load a Go plugin containing the package's exported declarations.
+Currently, Go plugins are fully functional only on Linux.
+
+
+### Other systems
+
+On Mac OS X, Windows, Android and *BSD you can still use `import`, but there are some more steps.
+Example:
+```
+$ go get gonum.org/v1/plot
+$ gomacro
+[greeting message...]
+
+gomacro> import "gonum.org/v1/plot"
+// warning: created file "/home/max/go/src/github.com/cosmos72/gomacro/imports/thirdparty/gonum_org_v1_plot.go", recompile gomacro to use it
+```
+
+Now quit gomacro, recompile and reinstall it:
+```
+gomacro> :quit
+$ go install github.com/cosmos72/gomacro
+```
+
+Finally restart it. Your import is now linked **inside** gomacro and will work:
+```
+$ gomacro
+[greeting message...]
+
+gomacro> import "gonum.org/v1/plot"
+gomacro> plot.New()
+&{...} // *plot.Plot
+ // error
+```
+
+Note: if you need several packages, you can first `import` all of them,
+then quit and recompile gomacro only once.
+
+## Debugger
+
+Since version 2.6, gomacro also has an integrated debugger.
+There are two ways to use it:
+* type `:debug STATEMENT-OR-FUNCTION-CALL` at the prompt.
+* add a statement (an expression is not enough) `"break"` or `_ = "break"` to your code, then execute it normally.
+
+In both cases, execution will be suspended and you will get a `debug>` prompt, which accepts the following commands:
+`step`, `next`, `finish`, `continue`, `env [NAME]`, `inspect EXPR`, `list`, `print EXPR-OR-STATEMENT`
+
+Also,
+* commands can be abbreviated.
+* `print` fully supports expressions or statements with side effects, including function calls and modifying local variables.
+* `env` without arguments prints all global and local variables.
+* an empty command (i.e. just pressing enter) repeats the last command.
+
+Only interpreted statements can be debugged: expressions and compiled code will be executed, but you cannot step into them.
+
+The debugger is quite new, and may have some minor glitches.
## Why it was created
@@ -184,3 +343,8 @@ into regular Go source code, without the need for external programs
(except for the intepreter itself).
As a free bonus, we get support for Eval()
+
+## LEGAL
+
+Gomacro is distributed under the terms of [Mozilla Public License 2.0](LICENSE)
+or any later version.
diff --git a/vendor/github.com/cosmos72/gomacro/all_test.go b/vendor/github.com/cosmos72/gomacro/all_test.go
index ce1f015..eea83ed 100644
--- a/vendor/github.com/cosmos72/gomacro/all_test.go
+++ b/vendor/github.com/cosmos72/gomacro/all_test.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* all_test.go
@@ -27,25 +18,31 @@ package main
import (
"go/ast"
+ "go/constant"
"go/token"
+ "math/big"
r "reflect"
"testing"
"time"
. "github.com/cosmos72/gomacro/ast2"
. "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/base/untyped"
"github.com/cosmos72/gomacro/classic"
"github.com/cosmos72/gomacro/fast"
+ mp "github.com/cosmos72/gomacro/parser"
+ mt "github.com/cosmos72/gomacro/token"
xr "github.com/cosmos72/gomacro/xreflect"
)
type TestFor int
const (
- I TestFor = 1 << iota
- F
- S // set option OptDebugSleepOnSwitch
- A = I | F
+ S TestFor = 1 << iota // set option OptDebugSleepOnSwitch
+ C // test for classic interpreter
+ F // test for fast interpreter
+ U // test for fast interpreter, returning untyped constant
+ A = C | F // test for both interpreters
)
type TestCase struct {
@@ -60,7 +57,7 @@ func TestClassic(t *testing.T) {
ir := classic.New()
// ir.Options |= OptDebugCallStack | OptDebugPanicRecover
for _, test := range testcases {
- if test.testfor&I != 0 {
+ if test.testfor&C != 0 {
test := test
t.Run(test.name, func(t *testing.T) { test.classic(t, ir) })
}
@@ -77,22 +74,55 @@ func TestFast(t *testing.T) {
}
}
-func (test *TestCase) classic(t *testing.T, ir *classic.Interp) {
+type shouldpanic struct{}
- rets := PackValues(ir.Eval(test.program))
+func (shouldpanic) String() string {
+ return "shouldpanic"
+}
+// a value that the interpreter cannot produce.
+// only matches if the interpreter panicked
+var panics shouldpanic
+
+func (test *TestCase) classic(t *testing.T, ir *classic.Interp) {
+ var rets []r.Value
+ panicking := true
+ if test.result0 == panics {
+ defer func() {
+ if panicking {
+ recover()
+ }
+ }()
+ }
+ rets = PackValues(ir.Eval(test.program))
+ panicking = false
test.compareResults(t, rets)
}
func (test *TestCase) fast(t *testing.T, ir *fast.Interp) {
-
if test.testfor&S != 0 {
ir.Comp.Options |= OptDebugSleepOnSwitch
} else {
ir.Comp.Options &^= OptDebugSleepOnSwitch
}
- rets := PackValues(ir.Eval(test.program))
+ if test.testfor&U != 0 {
+ ir.Comp.Options |= OptKeepUntyped
+ } else {
+ ir.Comp.Options &^= OptKeepUntyped
+ }
+
+ var rets []r.Value
+ panicking := true
+ if test.result0 == panics {
+ defer func() {
+ if panicking {
+ recover()
+ }
+ }()
+ }
+ rets, _ = ir.Eval(test.program)
+ panicking = false
test.compareResults(t, rets)
}
@@ -141,6 +171,80 @@ const switch_source_string = `func bigswitch(n int) int {
return n
}`
+const interface_interpreted_1_source_string = `
+import (
+ "errors"
+ "fmt"
+ "io"
+ "os"
+)
+
+type R interface {
+ Read([]uint8) (int, error)
+}
+
+type DevNull struct{}
+
+func (d DevNull) Read(b []byte) (int, error) {
+ return 0, io.EOF
+}
+
+type DevZero struct{}
+
+func (d DevZero) Read(b []byte) (int, error) {
+ for i := range b {
+ b[i] = 0
+ }
+ return len(b), nil
+}
+
+true`
+
+const interface_interpreted_2_source_string = `
+(func() bool {
+
+ fail := func(format string, args ...interface{}) {
+ panic(errors.New(fmt.Sprintf(format, args...)))
+ }
+
+ f, _ := os.Open("README.md")
+ bytes := make([]uint8, 80)
+
+ rs := [3]R{f, DevNull{}, DevZero{}}
+ lens := [3]int{80, 0, 80}
+ errs := [3]error{nil, io.EOF, nil}
+
+ for i, r := range rs {
+ len, err := r.Read(bytes)
+ if len != lens[i] || err != errs[i] {
+ fail("Read(): expecting (%v, %v), returned (%v, %v)", lens[i], errs[i], len, err)
+ }
+ j := -1
+ switch r := r.(type) {
+ case *os.File:
+ j = 0
+ if r != rs[i] {
+ fail("typeswitch: expecting %v, found %v", rs[i], r)
+ }
+ case DevNull:
+ j = 1
+ if r != rs[i] {
+ fail("typeswitch: expecting %v, found %v", rs[i], r)
+ }
+ case DevZero:
+ j = 2
+ if r != rs[i] {
+ fail("typeswitch: expecting %v, found %v", rs[i], r)
+ }
+ }
+ if i != j {
+ fail("typeswitch: expecting j=%d, found j=%d", i, j)
+ }
+ }
+ return true
+})()
+`
+
var (
cti = r.StructOf(
[]r.StructField{
@@ -150,7 +254,7 @@ var (
)
fti = r.StructOf(
[]r.StructField{
- r.StructField{Name: StrGensymInterface, Type: r.TypeOf((*xr.InterfaceHeader)(nil)).Elem()},
+ r.StructField{Name: StrGensymInterface, Type: r.TypeOf(xr.InterfaceHeader{})},
r.StructField{Name: "String", Type: r.TypeOf((*func() string)(nil)).Elem()},
},
)
@@ -171,6 +275,51 @@ func for_range_string(s string) int32 {
return v0
}
+func makeQuote(node ast.Node) *ast.UnaryExpr {
+ return makequote2(mt.QUOTE, node)
+}
+
+func makeQUASIQUOTE(node ast.Node) *ast.UnaryExpr {
+ return makequote2(mt.QUASIQUOTE, node)
+}
+
+func makeUNQUOTE(node ast.Node) *ast.UnaryExpr {
+ return makequote2(mt.UNQUOTE, node)
+}
+
+func makeUNQUOTE_SPLICE(node ast.Node) *ast.UnaryExpr {
+ return makequote2(mt.UNQUOTE_SPLICE, node)
+}
+
+func makequote2(op token.Token, node ast.Node) *ast.UnaryExpr {
+ unary, _ := mp.MakeQuote(nil, op, token.NoPos, node)
+ return unary
+}
+
+type Pair = struct { // unnamed!
+ A rune
+ B string
+}
+
+var bigInt = new(big.Int)
+var bigRat = new(big.Rat)
+var bigFloat = new(big.Float)
+
+func init() {
+ bigInt.SetInt64(1)
+ bigInt.Lsh(bigInt, 1000)
+
+ bigRat.SetFrac64(1000000001, 1000000000)
+ bigRat.Mul(bigRat, bigRat)
+ bigRat.Mul(bigRat, bigRat)
+
+ // use the same precision as constant.Value
+ bigFloat.SetPrec(512)
+ bigFloat.SetString("1e1234")
+ bigFloat.Mul(bigFloat, bigFloat)
+ bigFloat.Mul(bigFloat, bigFloat)
+}
+
var testcases = []TestCase{
TestCase{A, "1+1", "1+1", 1 + 1, nil},
TestCase{A, "1+'A'", "1+'A'", 'B', nil}, // rune i.e. int32 should win over untyped constant (or int)
@@ -191,16 +340,32 @@ var testcases = []TestCase{
TestCase{A, "const_2", "const c2 = 0xff&555+23/12.2; c2", 0xff&555 + 23/12.2, nil},
// the classic interpreter is not accurate in this cases... missing exact arithmetic on constants
- TestCase{I, "const_3", "const c3 = 0.1+0.2; c3", float64(0.1) + float64(0.2), nil},
- TestCase{I, "const_4", "const c4 = c3/3; c4", (float64(0.1) + float64(0.2)) / 3, nil},
+ TestCase{C, "const_3", "const c3 = 0.1+0.2; c3", float64(0.1) + float64(0.2), nil},
+ TestCase{C, "const_4", "const c4 = c3/3; c4", (float64(0.1) + float64(0.2)) / 3, nil},
// the fast interpreter instead *IS* accurate, thanks to exact arithmetic on untyped constants
TestCase{F, "const_3", "const c3 = 0.1+0.2; c3", 0.1 + 0.2, nil},
TestCase{F, "const_4", "const c4 = c3/3; c4", (0.1 + 0.2) / 3, nil},
+ TestCase{F, "const_complex_1", "const c5 = complex(c3, c4); c5", 0.3 + 0.1i, nil},
+ TestCase{F | U, "untyped_const_complex_1", "c5",
+ untyped.MakeLit(
+ r.Complex128,
+ constant.BinaryOp(
+ constant.MakeFromLiteral("0.3", token.FLOAT, 0),
+ token.ADD,
+ constant.MakeFromLiteral("0.1i", token.IMAG, 0)),
+ nil),
+ nil,
+ },
+
TestCase{F, "untyped_1", "2.0 >> 1", 1, nil},
TestCase{A, "untyped_2", "1/2", 0, nil},
TestCase{A, "untyped_unary", "-+^6", -+^6, nil},
+ TestCase{F | U, "untyped_const_large", "1<<100",
+ untyped.MakeLit(r.Int, constant.Shift(constant.MakeInt64(1), token.SHL, 100), nil),
+ nil,
+ },
TestCase{A, "iota_1", "const c5 = iota^7; c5", 7, nil},
TestCase{A, "iota_2", "const ( c6 = iota+6; c7=iota+6 ); c6", 6, nil},
@@ -216,8 +381,9 @@ var testcases = []TestCase{
TestCase{A, "var_5", "var v5 string; v5", "", nil},
TestCase{A, "var_6", "var v6 float32; v6", float32(0), nil},
TestCase{A, "var_7", "var v7 complex64; v7", complex64(0), nil},
- TestCase{A, "var_8", "var err error; err", nil, nil},
- TestCase{A, "var_9", `ve, vf := "", 1.23; ve`, "", nil},
+ TestCase{A, "var_9", "var v8 complex128; v8", complex128(0), nil},
+ TestCase{A, "var_9", "var err error; err", nil, nil},
+ TestCase{A, "var_10", `ve, vf := "", 1.23; ve`, "", nil},
TestCase{A, "var_pointer", "var vp *string; vp", (*string)(nil), nil},
TestCase{A, "var_map", "var vm *map[error]bool; vm", (*map[error]bool)(nil), nil},
TestCase{A, "var_slice", "var vs []byte; vs", ([]byte)(nil), nil},
@@ -236,8 +402,8 @@ var testcases = []TestCase{
TestCase{A, "var_shift_overflow", "v3 << 13", uint16(32768), nil},
// test division by constant power-of-two
- TestCase{I, "var_div_1", "v3 = 11; v3 / 2", uint64(11) / 2, nil}, // classic interpreter is not type-accurate here
- TestCase{I, "var_div_2", "v3 = 63; v3 / 8", uint64(63) / 8, nil},
+ TestCase{C, "var_div_1", "v3 = 11; v3 / 2", uint64(11) / 2, nil}, // classic interpreter is not type-accurate here
+ TestCase{C, "var_div_2", "v3 = 63; v3 / 8", uint64(63) / 8, nil},
TestCase{F, "var_div_1", "v3 = 11; v3 / 2", uint16(11) / 2, nil},
TestCase{F, "var_div_2", "v3 = 63; v3 / 8", uint16(63) / 8, nil},
@@ -255,8 +421,8 @@ var testcases = []TestCase{
TestCase{A, "var_div_13", "v0 =-63; v0 /-8", -63 / -8, nil},
// test remainder by constant power-of-two
- TestCase{I, "var_rem_1", "v3 = 17; v3 % 4", uint64(17) % 4, nil}, // classic interpreter is not type-accurate here
- TestCase{I, "var_rem_2", "v3 = 61; v3 % 8", uint64(61) % 8, nil},
+ TestCase{C, "var_rem_1", "v3 = 17; v3 % 4", uint64(17) % 4, nil}, // classic interpreter is not type-accurate here
+ TestCase{C, "var_rem_2", "v3 = 61; v3 % 8", uint64(61) % 8, nil},
TestCase{F, "var_rem_1", "v3 = 17; v3 % 4", uint16(17) % 4, nil},
TestCase{F, "var_rem_2", "v3 = 61; v3 % 8", uint16(61) % 8, nil},
@@ -281,24 +447,36 @@ var testcases = []TestCase{
TestCase{A, "typed_unary_2", "+-^v2", uint8(8), nil},
TestCase{A, "typed_unary_3", "v3 = 12; +^-v3", uint16(11), nil},
TestCase{A, "typed_unary_4", "v7 = 2.5i; -v7", complex64(-2.5i), nil},
+ TestCase{A, "typed_unary_5", "v8 = 3.75i; -v8", complex128(-3.75i), nil},
- TestCase{A, "type_int8", "type t8 int8; var v8 t8; v8", int8(0), nil},
+ TestCase{A, "type_int8", "type t8 int8; var u8 t8; u8", int8(0), nil},
TestCase{A, "type_complicated", "type tfff func(int,int) func(error, func(bool)) string; var vfff tfff; vfff", (func(int, int) func(error, func(bool)) string)(nil), nil},
- TestCase{I, "type_interface", "type Stringer interface { String() string }; var s Stringer; s", csi, nil},
+ TestCase{C, "type_interface", "type Stringer interface { String() string }; var s Stringer; s", csi, nil},
TestCase{F, "type_interface", "type Stringer interface { String() string }; var s Stringer; s", fsi, nil},
+ TestCase{F, "type_struct_0", "type PairPrivate struct { a, b rune }; var pp PairPrivate; pp.a+pp.b", rune(0), nil},
TestCase{A, "type_struct_1", "type Pair struct { A rune; B string }; var pair Pair; pair", struct {
A rune
B string
}{}, nil},
TestCase{A, "type_struct_2", "type Triple struct { Pair; C float32 }; var triple Triple; triple.C", float32(0), nil},
+ TestCase{A, "type_struct_3", "type TripleP struct { *Pair; D float64 }; var tp TripleP; tp.D", float64(0), nil},
TestCase{A, "field_get_1", "pair.A", rune(0), nil},
TestCase{A, "field_get_2", "pair.B", "", nil},
TestCase{F, "field_anonymous_1", "triple.Pair", struct {
A rune
B string
}{}, nil},
+ TestCase{F, "field_anonymous_2", "type Z struct { *Z }; Z{}", struct {
+ Z *xr.Forward
+ }{}, nil},
TestCase{F, "field_embedded_1", "triple.A", rune(0), nil},
- TestCase{F, "field_embedded_2", "triple.Pair.B", "", nil},
+ TestCase{F, "field_embedded_2", "triple.B", "", nil},
+ TestCase{F, "field_embedded_3", "triple.Pair.A", rune(0), nil},
+ TestCase{F, "field_embedded_4", "triple.Pair.B", "", nil},
+ TestCase{F, "field_embedded_4", "tp.A", panics, nil},
+ TestCase{F, "field_embedded_5", "tp.Pair = &triple.Pair; tp.B", "", nil},
+
+ TestCase{F, "self_embedded_1", "type X struct { *X }; X{}.X", (*xr.Forward)(nil), nil},
TestCase{A, "address_0", "var vf = 1.25; *&vf == vf", true, nil},
TestCase{A, "address_1", "var pvf = &vf; *pvf", 1.25, nil},
@@ -327,16 +505,18 @@ var testcases = []TestCase{
TestCase{A, "set_const_3", "v3 = 60000; v3", uint16(60000), nil},
TestCase{A, "set_const_4", "v = 987; v", uint32(987), nil},
TestCase{A, "set_const_5", `v5 = "8y57r"; v5`, "8y57r", nil},
- TestCase{A, "set_const_6", "v6 = 0.12345678901234; v6", float32(0.12345678901234), nil}, // v6 is declared float32
- TestCase{A, "set_const_7", "v7 = 0.98765432109i; v7", complex(0, float32(0.98765432109)), nil}, // v7 is declared complex64
+ TestCase{A, "set_const_6", "v6 = 0.12345678901234; v6", float32(0.12345678901234), nil}, // v6 is declared float32
+ TestCase{A, "set_const_7", "v7 = 0.98765432109i; v7", complex64(0.98765432109i), nil}, // v7 is declared complex64
+ TestCase{A, "set_const_8", "v8 = 0.98765432109i; v8", complex128(0.98765432109i), nil}, // v8 is declared complex128
TestCase{A, "set_expr_1", "v1 = v1 == v1; v1", true, nil},
TestCase{A, "set_expr_2", "v2 -= 7; v2", uint8(2), nil},
TestCase{A, "set_expr_3", "v3 %= 7; v3", uint16(60000) % 7, nil},
TestCase{A, "set_expr_4", "v = v * 10; v", uint32(9870), nil},
TestCase{A, "set_expr_5", `v5 = v5 + "iuh"; v5`, "8y57riuh", nil},
- TestCase{A, "set_expr_6", "v6 = 1/v6; v6", 1 / float32(0.12345678901234), nil}, // v6 is declared float32
- TestCase{A, "set_expr_7", "v7 = v7 * v7; v7", complex(-float32(0.98765432109)*float32(0.98765432109), 0), nil}, // v7 is declared complex64
+ TestCase{A, "set_expr_6", "v6 = 1/v6; v6", 1 / float32(0.12345678901234), nil}, // v6 is declared float32
+ TestCase{A, "set_expr_7", "v7 = v7 * v7; v7", -complex64(0.98765432109) * complex64(0.98765432109), nil}, // v7 is declared complex64
+ TestCase{A, "set_expr_8", "v8 = v8 * v8; v8", -complex128(0.98765432109) * complex128(0.98765432109), nil}, // v8 is declared complex64
TestCase{A, "add_2", "v2 += 255; v2", uint8(1), nil}, // overflow
TestCase{A, "add_3", "v3 += 536; v3", uint16(60000)%7 + 536, nil},
@@ -344,6 +524,7 @@ var testcases = []TestCase{
TestCase{A, "add_5", `v5 += "@#$"; v5`, "8y57riuh@#$", nil},
TestCase{A, "add_6", "v6 += 0.975319; v6", 1/float32(0.12345678901234) + float32(0.975319), nil}, // v6 is declared float32
TestCase{A, "add_7", "v7 = 1; v7 += 0.999999i; v7", complex(float32(1), float32(0.999999)), nil}, // v7 is declared complex64
+ TestCase{A, "add_7", "v8 = 1; v8 += 0.999999i; v8", complex(1, 0.999999), nil}, // v8 is declared complex128
TestCase{A, "mul_1", "v2 = 4; v2 *= 3; v2", uint8(12), nil},
TestCase{A, "rem_1", "v3 = 12; v3 %= 7; v3", uint16(5), nil},
@@ -357,6 +538,18 @@ var testcases = []TestCase{
TestCase{A, "for_1", "var i, j, k int; for i=1; i<=2; i=i+1 { if i<2 {j=i} else {k=i} }; i", 3, nil},
TestCase{A, "for_2", "j", 1, nil},
TestCase{A, "for_3", "k", 2, nil},
+ TestCase{A, "for_nested", `x := 0
+ {
+ n1, n2, n3 := 2, 3, 5
+ for i := 0; i < n1; i++ {
+ for k := 0; k < n2; k++ {
+ for j := 0; j < n3; j++ {
+ x++
+ }
+ }
+ }
+ }
+ x`, 2 * 3 * 5, nil},
TestCase{A, "continue_1", "j=0; k=0; for i:=1; i<=7; i=i+1 { if i==3 {j=i; continue}; k=k+i }; j", 3, nil},
TestCase{A, "continue_2", "k", 25, nil},
TestCase{A, "continue_3", "j=0; k=0; for i:=1; i<=7; i=i+1 { var ii = i; if ii==3 {j=ii; continue}; k=k+ii }; j", 3, nil},
@@ -385,6 +578,10 @@ var testcases = []TestCase{
TestCase{A, "fibonacci", fibonacci_source_string + "; fibonacci(13)", 233, nil},
TestCase{A, "function_literal", "adder := func(a,b int) int { return a+b }; adder(-7,-9)", -16, nil},
+ TestCase{F, "y_combinator_1", "type F func(F); var f F; f", *new(func(xr.Forward)), nil},
+ TestCase{F, "y_combinator_2", "func Y(f F) { /*f(f)*/ }; Y", func(func(xr.Forward)) {}, nil}, // avoid the infinite recursion, only check the types
+ TestCase{F, "y_combinator_3", "Y(Y)", nil, []interface{}{}}, // also check actual invokation
+
TestCase{A, "closure_1", `
func test_closure_1() int {
var x int
@@ -430,31 +627,34 @@ var testcases = []TestCase{
i, m, m[i] = 1, nil, "foo"
list_args(i,m,mcopy)`,
[]interface{}{1, nil_map_int_string, map[int]string{0: "foo"}}, nil},
+ TestCase{F, "multi_assignment_1", "v7, v8 = func () (complex64, complex128) { return 1.0, 2.0 }(); v7", complex64(1.0), nil},
+ TestCase{F, "multi_assignment_2", "v8 ", complex128(2.0), nil},
- TestCase{A, "field_set_1", `pair.A = 'k'; pair.B = "m"; pair`, struct {
- A rune
- B string
- }{'k', "m"}, nil},
- TestCase{A, "field_set_2", `pair.A, pair.B = 'x', "y"; pair`, struct {
- A rune
- B string
- }{'x', "y"}, nil},
- TestCase{F, "field_set_3", `triple.Pair.A, triple.C = 'a', 1.0; triple.Pair`, struct {
- A rune
- B string
- }{'a', ""}, nil},
- TestCase{F, "field_set_embedded_1", `triple.A, triple.B = 'b', "xy"; triple.Pair`, struct {
- A rune
- B string
- }{'b', "xy"}, nil},
+ TestCase{A, "field_set_1", `pair.A = 'k'; pair.B = "m"; pair`, Pair{'k', "m"}, nil},
+ TestCase{A, "field_set_2", `pair.A, pair.B = 'x', "y"; pair`, Pair{'x', "y"}, nil},
+ TestCase{F, "field_set_3", `triple.Pair.A, triple.C = 'a', 1.0; triple.Pair`, Pair{'a', ""}, nil},
+ TestCase{F, "field_set_embedded_1", `triple.A, triple.B = 'b', "xy"; triple.Pair`, Pair{'b', "xy"}, nil},
TestCase{F, "field_addr_1", "ppair := &triple.Pair; ppair.A", 'b', nil},
TestCase{F, "field_addr_2", "ppair.A++; triple.Pair.A", 'c', nil},
- TestCase{I, "import", `import ( "fmt"; "time" )`, "time", nil},
- TestCase{F, "import", `import ( "fmt"; "time" )`, nil, []interface{}{}},
+ TestCase{F, "infer_type_compositelit_1", `[]Pair{{'a', "b"}, {'c', "d"}}`, []Pair{{'a', "b"}, {'c', "d"}}, nil},
+ TestCase{F, "infer_type_compositelit_2", `[]*Pair{{'a', "b"}, {'c', "d"}}`, []*Pair{{'a', "b"}, {'c', "d"}}, nil},
+ TestCase{F, "infer_type_compositelit_3", `[...]Pair{{'e', "f"}, {'g', "h"}}`, [...]Pair{{'e', "f"}, {'g', "h"}}, nil},
+ TestCase{F, "infer_type_compositelit_4", `map[int]Pair{1:{'i', "j"}, 2:{}}`, map[int]Pair{1: {'i', "j"}, 2: {}}, nil},
+ TestCase{F, "infer_type_compositelit_5", `map[int]map[int]int{1:{2:3}}`, map[int]map[int]int{1: {2: 3}}, nil},
+ TestCase{F, "infer_type_compositelit_6", `map[int]*map[int]int{1:{2:3}}`, map[int]*map[int]int{1: {2: 3}}, nil},
+
+ TestCase{A, "import", `import ( "errors"; "fmt"; "io"; "math/big"; "math/rand"; "reflect"; "time" )`, nil, []interface{}{}},
+ TestCase{A, "import_constant", `const micro = time.Microsecond; micro`, time.Microsecond, nil},
+ TestCase{A, "dot_import_1", `import . "errors"`, nil, []interface{}{}},
+ TestCase{A, "dot_import_2", `reflect.ValueOf(New) == reflect.ValueOf(errors.New)`, true, nil}, // a small but very strict check... good
TestCase{A, "goroutine_1", `go seti(9); time.Sleep(time.Second/50); i`, 9, nil},
+ TestCase{F, "big.Int", `(func() *big.Int { return 1<<1000 })()`, bigInt, nil},
+ TestCase{F, "big.Rat", `(func() *big.Rat { var x *big.Rat = 1.000000001; x.Mul(x,x); x.Mul(x,x); return x })()`, bigRat, nil},
+ TestCase{F, "big.Float", `(func() *big.Float { var x *big.Float = 1e1234; x.Mul(x,x); x.Mul(x,x); return x })()`, bigFloat, nil},
+
TestCase{A, "builtin_append", "append(vs,0,1,2)", []byte{0, 1, 2}, nil},
TestCase{A, "builtin_cap", "cap(va)", 2, nil},
TestCase{A, "builtin_len", "len(v5)", len("8y57riuh@#$"), nil},
@@ -470,12 +670,29 @@ var testcases = []TestCase{
TestCase{A, "builtin_copy_2", "vs", []byte("8y57r"), nil},
TestCase{A, "builtin_delete_1", "delete(mi,64); mi", map[rune]byte{'a': 7}, nil},
TestCase{A, "builtin_real_1", "real(0.5+1.75i)", real(0.5 + 1.75i), nil},
- TestCase{A, "builtin_real_2", "var cplx complex64 = 1.5+0.25i; real(cplx)", real(complex64(1.5 + 0.25i)), nil},
+ TestCase{A, "builtin_real_2", "const cplx complex64 = 1.5+0.25i; real(cplx)", real(complex64(1.5 + 0.25i)), nil},
TestCase{A, "builtin_imag_1", "imag(0.5+1.75i)", imag(0.5 + 1.75i), nil},
TestCase{A, "builtin_imag_2", "imag(cplx)", imag(complex64(1.5 + 0.25i)), nil},
TestCase{A, "builtin_complex_1", "complex(0,1)", complex(0, 1), nil},
TestCase{A, "builtin_complex_2", "v6 = 0.1; complex(v6,-v6)", complex(float32(0.1), -float32(0.1)), nil},
+ TestCase{F | U, "untyped_builtin_real_1", "real(0.5+1.75i)",
+ untyped.MakeLit(r.Float64, constant.MakeFloat64(0.5), nil), // 0.5 is exactly representable by float64
+ nil},
+ TestCase{F | U, "untyped_builtin_imag_1", "imag(1.5+0.25i)",
+ untyped.MakeLit(r.Float64, constant.MakeFloat64(0.25), nil), // 0.25 is exactly representable by float64
+ nil},
+ TestCase{F | U, "untyped_builtin_complex_1", "complex(1, 2)",
+ untyped.MakeLit(
+ r.Complex128,
+ constant.BinaryOp(
+ constant.MakeInt64(1),
+ token.ADD,
+ constant.MakeFromLiteral("2i", token.IMAG, 0)),
+ nil),
+ nil,
+ },
+
TestCase{A, "time_duration_0", `var td time.Duration = 1; td`, time.Duration(1), nil},
TestCase{A, "time_duration_1", `- td`, time.Duration(-1), nil},
TestCase{A, "time_duration_2", `td + 1`, time.Duration(2), nil},
@@ -490,38 +707,55 @@ var testcases = []TestCase{
TestCase{A, "time_utc_set_1", ` time.UTC = nil; time.UTC == nil`, true, nil},
TestCase{A, "time_utc_set_2", ` time.UTC = utc; time.UTC.String()`, "UTC", nil},
+ TestCase{A, "index_is_named_type", `"abc"[time.Nanosecond]`, uint8('b'), nil},
+ TestCase{A, "panic_at_runtime", `"abc"[micro]`, panics, nil},
+ TestCase{F, "panic_oob_at_compile", `(func() uint8 { return "abc"[micro] })`, panics, nil}, // string index out of range
+ TestCase{F, "panic_non_const_initialization", `const _ = rand.Int()`, panics, nil}, // const initializer is not a constant
+
TestCase{A, "literal_array", "[3]int{1,2:3}", [3]int{1, 0, 3}, nil},
TestCase{A, "literal_array_address", "&[...]int{3:4,5:6}", &[...]int{3: 4, 5: 6}, nil},
TestCase{A, "literal_map", `map[int]string{1: "foo", 2: "bar"}`, map[int]string{1: "foo", 2: "bar"}, nil},
TestCase{A, "literal_map_address", `&map[int]byte{6:7, 8:9}`, &map[int]byte{6: 7, 8: 9}, nil},
TestCase{A, "literal_slice", "[]rune{'a','b','c'}", []rune{'a', 'b', 'c'}, nil},
TestCase{A, "literal_slice_address", "&[]rune{'x','y'}", &[]rune{'x', 'y'}, nil},
- TestCase{A, "literal_struct", `Pair{A: 0x73, B: "\x94"}`, struct {
- A rune
- B string
- }{A: 0x73, B: "\x94"}, nil},
- TestCase{A, "literal_struct_address", `&Pair{1,"2"}`, &struct {
- A rune
- B string
- }{A: 1, B: "2"}, nil},
+ TestCase{A, "literal_struct", `Pair{A: 0x73, B: "\x94"}`, Pair{A: 0x73, B: "\x94"}, nil},
+ TestCase{A, "literal_struct_address", `&Pair{1,"2"}`, &Pair{A: 1, B: "2"}, nil},
- TestCase{A, "method_decl_1", `func (p *Pair) SetA(a rune) { p.A = a }; func (p Pair) SetAV(a rune) { p.A = a }; nil`, nil, nil},
+ TestCase{A, "method_decl_1", `func (p *Pair) SetA(a rune) { p.A = a }; nil`, nil, nil},
TestCase{A, "method_decl_2", `func (p Pair) SetAV(a rune) { p.A = a }; nil`, nil, nil},
TestCase{A, "method_decl_3", `func (p Pair) String() string { return fmt.Sprintf("%c %s", p.A, p.B) }; nil`, nil, nil},
TestCase{A, "method_on_ptr", `pair.SetA(33); pair.A`, rune(33), nil},
TestCase{A, "method_on_val_1", `pair.SetAV(11); pair.A`, rune(33), nil}, // method on value gets a copy of the receiver - changes to not propagate
TestCase{A, "method_on_val_2", `pair.String()`, "! y", nil},
- TestCase{F, "method_embedded_on_ptr", `triple.SetA('+'); triple.A`, '+', nil},
- TestCase{F, "method_embedded_on_val", `triple.SetAV('*'); triple.A`, '+', nil},
+ TestCase{F, "method_embedded=val_recv=ptr", `triple.SetA('1'); triple.A`, '1', nil},
+ TestCase{F, "method_embedded=val_recv=val", `triple.SetAV('2'); triple.A`, '1', nil},
+ TestCase{F, "method_embedded=ptr_recv=val", `tp.SetAV('3'); tp.A`, '1', nil}, // set by triple.SetA('1') above
+ TestCase{F, "method_embedded=ptr_recv=ptr", `tp.SetA('4'); tp.A`, '4', nil},
+
+ TestCase{F, "concrete_method_to_func", "cf0 := time.Duration.Seconds; cf0(time.Hour)", 3600.0, nil},
+ TestCase{F, "concrete_method_to_closure", "cl1 := time.Hour.Seconds; cl1()", 3600.0, nil},
+
+ // tricky because Comp.compileObjGetMethod() asks for the package path of 'error', which has nil package
+ TestCase{A, "interface_0", `errors.New("abc").Error()`, "abc", nil},
TestCase{A, "interface_1", "var st fmt.Stringer = time.Second; st", time.Second, nil},
- TestCase{A, "interface_method_1", "bind := st.String; bind()", "1s", nil},
+ TestCase{A, "interface_method_to_closure_1", "bind := st.String; bind()", "1s", nil},
TestCase{F, "interface_2", "st = pair; nil", nil, nil},
- TestCase{F, "interface_method_2", "bind = st.String; bind()", "! y", nil},
+ TestCase{F, "interface_method_to_closure_2", "bind = st.String; bind()", "! y", nil},
+ TestCase{F, "interface_method_to_closure_3", "st = nil; bind = st.String", panics, nil},
+ // interpreted interface
+ TestCase{F, "interface_3", "type IStringer interface { String() string }; nil", nil, nil},
+ TestCase{F, "interface_method_to_closure_4", "var ist IStringer; nil", nil, nil},
+ TestCase{F, "interface_method_to_closure_5", "ist.String", panics, nil},
+
+ TestCase{F, "interface_method_to_func_1", "f1 := fmt.Stringer.String; f1(time.Hour)", "1h0m0s", nil},
+ TestCase{F, "interface_method_to_func_2", "f2 := io.ReadWriter.Read; f2 != nil", true, nil},
+ TestCase{F, "interface_method_to_func_3", "type Fooer interface { Foo() }; Fooer.Foo != nil", true, nil},
+ TestCase{F, "interface_method_to_func_4", "type RW interface { io.Reader; io.Writer }; RW.Read != nil && RW.Write != nil", true, nil},
- TestCase{F, "concrete_method_to_func", "f1 := time.Duration.Seconds; f1(time.Hour)", 3600.0, nil},
- TestCase{F, "interface_method_to_func", "f2 := fmt.Stringer.String; f2(time.Hour)", "1h0m0s", nil},
+ TestCase{F, "interface_interpreted_1", interface_interpreted_1_source_string, true, nil},
+ TestCase{F, "interface_interpreted_2", interface_interpreted_2_source_string, true, nil},
TestCase{A, "multiple_values_1", "func twins(x float32) (float32,float32) { return x, x+1 }; twins(17.0)", nil, []interface{}{float32(17.0), float32(18.0)}},
TestCase{A, "multiple_values_2", "func twins2(x float32) (float32,float32) { return twins(x) }; twins2(19.0)", nil, []interface{}{float32(19.0), float32(20.0)}},
@@ -647,6 +881,14 @@ var testcases = []TestCase{
TestCase{A, "typeassert_2", `xi.(string)`, nil, []interface{}{"abc", true}},
TestCase{A, "typeassert_3", `xi.(int)`, nil, []interface{}{0, false}},
TestCase{A, "typeassert_4", `xi = nil; xi.(error)`, nil, []interface{}{error(nil), false}},
+ TestCase{A, "typeassert_5", `xi = 7; xi.(int)+2`, 9, nil},
+ TestCase{F, "typeassert_6", `type T struct { Val int }; func (t T) String() string { return "T" }`, nil, []interface{}{}},
+ TestCase{F, "typeassert_7", `stringer = T{}; nil`, nil, nil},
+ TestCase{F, "typeassert_8", `st1 := stringer.(T); st1`, struct{ Val int }{0}, nil},
+ TestCase{F, "typeassert_9", `stringer.(T)`, nil, []interface{}{struct{ Val int }{0}, true}},
+ // can interpreted type assertions distinguish between emulated named types with identical underlying type?
+ TestCase{F, "typeassert_10", `type U struct { Val int }; func (u U) String() string { return "U" }; nil`, nil, nil},
+ TestCase{F, "typeassert_11", `stringer.(U)`, nil, []interface{}{struct{ Val int }{0}, false}},
TestCase{A, "quote_1", `~quote{7}`, &ast.BasicLit{Kind: token.INT, Value: "7"}, nil},
TestCase{A, "quote_2", `~quote{x}`, &ast.Ident{Name: "x"}, nil},
@@ -655,18 +897,18 @@ var testcases = []TestCase{
&ast.ExprStmt{X: &ast.Ident{Name: "b"}},
}}, nil},
TestCase{A, "quote_4", `~'{"foo"+"bar"}`, &ast.BinaryExpr{
- Op: token.ADD,
X: &ast.BasicLit{Kind: token.STRING, Value: `"foo"`},
+ Op: token.ADD,
Y: &ast.BasicLit{Kind: token.STRING, Value: `"bar"`},
}, nil},
TestCase{A, "quasiquote_1", `~quasiquote{1 + ~unquote{2+3}}`, &ast.BinaryExpr{
- Op: token.ADD,
X: &ast.BasicLit{Kind: token.INT, Value: "1"},
+ Op: token.ADD,
Y: &ast.BasicLit{Kind: token.INT, Value: "5"},
}, nil},
TestCase{A, "quasiquote_2", `~"{2 * ~,{3<<1}}`, &ast.BinaryExpr{
- Op: token.MUL,
X: &ast.BasicLit{Kind: token.INT, Value: "2"},
+ Op: token.MUL,
Y: &ast.BasicLit{Kind: token.INT, Value: "6"},
}, nil},
TestCase{A, "quasiquote_3", `~"{func(int) {}}`, &ast.FuncLit{
@@ -704,12 +946,26 @@ var testcases = []TestCase{
&ast.ExprStmt{X: &ast.Ident{Name: "b"}},
&ast.ExprStmt{X: &ast.Ident{Name: "one"}},
}}, nil},
+ TestCase{A, "unquote_splice_3", `~"~"{zero ; ~,~,@ab ; one}`,
+ makeQUASIQUOTE(&ast.BlockStmt{List: []ast.Stmt{
+ &ast.ExprStmt{X: &ast.Ident{Name: "zero"}},
+ &ast.ExprStmt{X: makeUNQUOTE(&ast.Ident{Name: "a"})},
+ &ast.ExprStmt{X: makeUNQUOTE(&ast.Ident{Name: "b"})},
+ &ast.ExprStmt{X: &ast.Ident{Name: "one"}},
+ }}), nil},
+ TestCase{A, "unquote_splice_4", `~"~"{zero ; ~,@~,@ab ; one}`,
+ makeQUASIQUOTE(&ast.BlockStmt{List: []ast.Stmt{
+ &ast.ExprStmt{X: &ast.Ident{Name: "zero"}},
+ &ast.ExprStmt{X: makeUNQUOTE_SPLICE(&ast.Ident{Name: "a"})},
+ &ast.ExprStmt{X: makeUNQUOTE_SPLICE(&ast.Ident{Name: "b"})},
+ &ast.ExprStmt{X: &ast.Ident{Name: "one"}},
+ }}), nil},
TestCase{A, "macro", "~macro second_arg(a,b,c interface{}) interface{} { return b }; v = 98; v", uint32(98), nil},
TestCase{A, "macro_call", "second_arg;1;v;3", uint32(98), nil},
TestCase{A, "macro_nested", "second_arg;1;{second_arg;2;3;4};5", 3, nil},
- TestCase{I, "values", "Values(3,4,5)", nil, []interface{}{3, 4, 5}},
+ TestCase{C, "values", "Values(3,4,5)", nil, []interface{}{3, 4, 5}},
TestCase{A, "eval", "Eval(~quote{1+2})", 3, nil},
- TestCase{I, "eval_quote", "Eval(~quote{Values(3,4,5)})", nil, []interface{}{3, 4, 5}},
+ TestCase{C, "eval_quote", "Eval(~quote{Values(3,4,5)})", nil, []interface{}{3, 4, 5}},
}
func (c *TestCase) compareResults(t *testing.T, actual []r.Value) {
@@ -734,6 +990,12 @@ func (c *TestCase) compareResult(t *testing.T, actualv r.Value, expected interfa
return
}
actual := actualv.Interface()
+ if actual == nil || expected == nil {
+ if actual != nil || expected != nil {
+ c.fail(t, actual, expected)
+ }
+ return
+ }
if !r.DeepEqual(actual, expected) {
if r.TypeOf(actual) == r.TypeOf(expected) {
if actualNode, ok := actual.(ast.Node); ok {
@@ -741,12 +1003,20 @@ func (c *TestCase) compareResult(t *testing.T, actualv r.Value, expected interfa
c.compareAst(t, ToAst(actualNode), ToAst(expectedNode))
return
}
+ } else if actualUntyped, ok := actual.(untyped.Lit); ok {
+ if expectedUntyped, ok := expected.(untyped.Lit); ok {
+ c.compareUntyped(t, actualUntyped, expectedUntyped)
+ return
+ }
} else if actualv.Kind() == r.Chan {
// for channels just check the type, length and capacity
expectedv := r.ValueOf(expected)
if actualv.Len() == expectedv.Len() && actualv.Cap() == expectedv.Cap() {
return
}
+ } else if actualv.Kind() == r.Func {
+ // for functions just check the type
+ return
}
}
c.fail(t, actual, expected)
@@ -788,6 +1058,13 @@ func (c *TestCase) compareAst(t *testing.T, actual Ast, expected Ast) {
c.fail(t, actual, expected)
}
+func (c *TestCase) compareUntyped(t *testing.T, actual untyped.Lit, expected untyped.Lit) {
+ if actual.Kind == expected.Kind && actual.Val.Kind() == expected.Val.Kind() && constant.Compare(actual.Val, token.EQL, expected.Val) {
+ return
+ }
+ c.fail(t, actual, expected)
+}
+
func (c *TestCase) fail(t *testing.T, actual interface{}, expected interface{}) {
t.Errorf("expecting %v <%T>, found %v <%T>\n", expected, expected, actual, actual)
}
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/ast.go b/vendor/github.com/cosmos72/gomacro/ast2/ast.go
index c5abc58..5937be0 100644
--- a/vendor/github.com/cosmos72/gomacro/ast2/ast.go
+++ b/vendor/github.com/cosmos72/gomacro/ast2/ast.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* ast.go
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/ast_convert.go b/vendor/github.com/cosmos72/gomacro/ast2/ast_convert.go
deleted file mode 100644
index def12e2..0000000
--- a/vendor/github.com/cosmos72/gomacro/ast2/ast_convert.go
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- * gomacro - A Go interpreter with Lisp-like macros
- *
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * ast_convert.go
- *
- * Created on: Feb 25, 2017
- * Author: Massimiliano Ghilardi
- */
-
-package ast2
-
-import (
- "fmt"
- "go/ast"
- "go/token"
- r "reflect"
-
- mt "github.com/cosmos72/gomacro/token"
-)
-
-// unused
-/*
-func CloneAst(in Ast) Ast {
- switch in := in.(type) {
- case AstWithNode:
- return CloneAstWithNode(in)
- case AstWithSlice:
- return CloneAstWithSlice(in)
- default:
- errorf("CloneAst: unsupported argument type, expecting AstWithNode or AstWithSlice: %v <%v>", in, r.TypeOf(in))
- return nil
- }
-}
-
-func CloneAstWithNode(in AstWithNode) AstWithNode {
- form := in.New().(AstWithNode)
- n := in.Size()
- for i := 0; i < n; i++ {
- form.Set(i, CloneAst(in.Get(i)))
- }
- return form
-}
-
-func CloneAstWithSlice(in AstWithSlice) AstWithSlice {
- form := in.New().(AstWithSlice)
- n := in.Size()
- for i := 0; i < n; i++ {
- form = form.Append(CloneAst(in.Get(i)))
- }
- return form
-}
-*/
-
-func AnyToAstWithNode(any interface{}, caller interface{}) AstWithNode {
- node := AnyToAst(any, caller)
- switch node := node.(type) {
- case AstWithNode:
- return node
- default:
- errorf("%s: cannot convert to ast.Node: %v <%v>", caller, any, r.TypeOf(any))
- return nil
- }
-}
-
-func AnyToAstWithSlice(any interface{}, caller interface{}) AstWithSlice {
- node := AnyToAst(any, caller)
- switch node := node.(type) {
- case nil:
- return NodeSlice{}
- case AstWithSlice:
- return node
- default:
- errorf("%s: cannot convert to slice of ast.Node: %v <%v>", caller, any, r.TypeOf(any))
- return nil
- }
-}
-
-func AnyToAst(any interface{}, caller interface{}) Ast {
- var str string
- var tok token.Token
- switch node := any.(type) {
- case nil:
- return nil
- case Ast:
- return node
- case ast.Node:
- return ToAst(node)
- case []Ast:
- return AstSlice{X: node}
- case []ast.Node:
- return NodeSlice{X: node}
- case []*ast.Field:
- return FieldSlice{X: node}
- case []ast.Decl:
- return DeclSlice{X: node}
- case []ast.Expr:
- return ExprSlice{X: node}
- case []*ast.Ident:
- return IdentSlice{X: node}
- case []ast.Stmt:
- return StmtSlice{X: node}
- case []ast.Spec:
- return SpecSlice{X: node}
- case bool:
- if node {
- str = "true"
- } else {
- str = "false"
- }
- return Ident{X: &ast.Ident{Name: str}}
- /*
- case rune: // Go cannot currently distinguish rune from int32
- tok = token.CHAR
- str = fmt.Sprintf("%q", node)
- */
- case int, int8, int16, int32, int64,
- uint, uint8, uint16, uint32, uint64, uintptr:
- tok = token.INT
- str = fmt.Sprintf("%d", node)
- case float32, float64:
- tok = token.FLOAT
- str = fmt.Sprintf("%g", node)
- case complex64, complex128:
- errorf("%s: unimplemented conversion of <%v> to ast.Node: %v", r.TypeOf(any), caller, any)
- return nil
- case string:
- tok = token.STRING
- str = fmt.Sprintf("%q", node)
- default:
- errorf("%s: cannot convert to ast.Node: %v <%v>", caller, any, r.TypeOf(any))
- return nil
- }
- return BasicLit{X: &ast.BasicLit{Kind: tok, Value: str}}
-
-}
-
-// ToAst2 returns either n0 (if i == 0) or n1, converted to Ast
-func ToAst1(i int, node ast.Node) AstWithNode {
- if i == 0 {
- return ToAst(node)
- } else {
- return badIndex(i, 1)
- }
-}
-
-// ToAst2 returns either n0 (if i == 0) or n1, converted to Ast
-func ToAst2(i int, n0 ast.Node, n1 ast.Node) AstWithNode {
- var n ast.Node
- switch i {
- case 0:
- n = n0
- case 1:
- n = n1
- default:
- return badIndex(i, 2)
- }
- return ToAst(n)
-}
-
-func ToAst3(i int, n0 ast.Node, n1 ast.Node, n2 *ast.BlockStmt) AstWithNode {
- var n ast.Node
- switch i {
- case 0:
- n = n0
- case 1:
- n = n1
- case 2:
- if n2 == nil {
- return nil
- }
- return BlockStmt{n2}
- default:
- return badIndex(i, 3)
- }
- return ToAst(n)
-}
-
-func ToAst4(i int, n0 ast.Node, n1 ast.Node, n2 ast.Node, n3 ast.Node) AstWithNode {
- var n ast.Node
- switch i {
- case 0:
- n = n0
- case 1:
- n = n1
- case 2:
- n = n2
- case 3:
- n = n3
- default:
- return badIndex(i, 4)
- }
- return ToAst(n)
-}
-
-// ToAst converts an ast.Node to Ast, providing uniform access to the node contents
-//
-func ToAst(node ast.Node) AstWithNode {
- var x AstWithNode
- switch node := node.(type) {
- case nil:
- return nil
- case *ast.ArrayType:
- x = ArrayType{node}
- case *ast.AssignStmt:
- x = AssignStmt{node}
- case *ast.BadDecl:
- x = BadDecl{node}
- case *ast.BadExpr:
- x = BadExpr{node}
- case *ast.BadStmt:
- x = BadStmt{node}
- case *ast.BasicLit:
- x = BasicLit{node}
- case *ast.BinaryExpr:
- x = BinaryExpr{node}
- case *ast.BlockStmt:
- if node != nil { // we can get typed nil from many places
- x = BlockStmt{node}
- }
- case *ast.BranchStmt:
- x = BranchStmt{node}
- case *ast.CallExpr:
- x = CallExpr{node}
- case *ast.CaseClause:
- x = CaseClause{node}
- case *ast.ChanType:
- x = ChanType{node}
- case *ast.CommClause:
- x = CommClause{node}
- case *ast.CompositeLit:
- x = CompositeLit{node}
- case *ast.DeclStmt:
- x = DeclStmt{node}
- case *ast.DeferStmt:
- x = DeferStmt{node}
- case *ast.Ellipsis:
- x = Ellipsis{node}
- case *ast.EmptyStmt:
- x = EmptyStmt{node}
- case *ast.ExprStmt:
- x = ExprStmt{node}
- case *ast.Field:
- x = Field{node}
- case *ast.FieldList:
- if node != nil { // we can get typed nil from many places
- x = FieldList{node}
- }
- case *ast.File:
- x = File{node}
- case *ast.ForStmt:
- x = ForStmt{node}
- case *ast.FuncDecl:
- x = FuncDecl{node}
- case *ast.FuncLit:
- x = FuncLit{node}
- case *ast.FuncType:
- x = FuncType{node}
- case *ast.GenDecl:
- if node != nil {
- x = GenDecl{node}
- }
- case *ast.GoStmt:
- x = GoStmt{node}
- case *ast.Ident:
- x = Ident{node}
- case *ast.IfStmt:
- x = IfStmt{node}
- case *ast.ImportSpec:
- x = ImportSpec{node}
- case *ast.IncDecStmt:
- x = IncDecStmt{node}
- case *ast.IndexExpr:
- x = IndexExpr{node}
- case *ast.InterfaceType:
- x = InterfaceType{node}
- case *ast.KeyValueExpr:
- x = KeyValueExpr{node}
- case *ast.LabeledStmt:
- x = LabeledStmt{node}
- case *ast.MapType:
- x = MapType{node}
- case *ast.Package:
- x = Package{node}
- case *ast.ParenExpr:
- x = ParenExpr{node}
- case *ast.RangeStmt:
- x = RangeStmt{node}
- case *ast.ReturnStmt:
- x = ReturnStmt{node}
- case *ast.SelectStmt:
- x = SelectStmt{node}
- case *ast.SelectorExpr:
- x = SelectorExpr{node}
- case *ast.SendStmt:
- x = SendStmt{node}
- case *ast.SliceExpr:
- x = SliceExpr{node}
- case *ast.StarExpr:
- x = StarExpr{node}
- case *ast.StructType:
- x = StructType{node}
- case *ast.SwitchStmt:
- x = SwitchStmt{node}
- case *ast.TypeAssertExpr:
- x = TypeAssertExpr{node}
- case *ast.TypeSpec:
- x = TypeSpec{node}
- case *ast.TypeSwitchStmt:
- x = TypeSwitchStmt{node}
- case *ast.UnaryExpr:
- x = UnaryExpr{node}
- case *ast.ValueSpec:
- x = ValueSpec{node}
- default:
- errorf("unsupported node type <%v>", r.TypeOf(node))
- }
- return x
-}
-
-func ToAstWithSlice(x Ast, caller interface{}) AstWithSlice {
- switch x := x.(type) {
- case AstWithSlice:
- return x
- default:
- y := x.Interface()
- errorf("%s: cannot convert to slice of ast.Node: %v <%v>", caller, y, r.TypeOf(y))
- return nil
- }
-}
-
-// ToNode converts Ast back ast.Node, or panics on failure
-// (it fails if the argument is not AstWithNode)
-func ToNode(x Ast) ast.Node {
- switch x := x.(type) {
- case nil:
- return nil
- case AstWithNode:
- return x.Node()
- default:
- y := x.Interface()
- errorf("cannot convert to ast.Node: %v <%v>", y, r.TypeOf(y))
- return nil
- }
-}
-
-func ToBasicLit(x Ast) *ast.BasicLit {
- switch x := x.(type) {
- case nil:
- break
- case BasicLit:
- return x.X
- default:
- y := x.Interface()
- errorf("cannot convert to *ast.BasicLit: %v <%v>", y, r.TypeOf(y))
- }
- return nil
-}
-
-func ToBlockStmt(x Ast) *ast.BlockStmt {
- switch x := x.(type) {
- case nil:
- break
- case BlockStmt:
- return x.X
- default:
- stmt := ToStmt(x)
- return &ast.BlockStmt{Lbrace: stmt.Pos(), List: []ast.Stmt{stmt}, Rbrace: stmt.End()}
- }
- return nil
-}
-
-func ToCallExpr(x Ast) *ast.CallExpr {
- switch x := x.(type) {
- case nil:
- break
- case CallExpr:
- return x.X
- default:
- y := x.Interface()
- errorf("cannot convert to *ast.CallExpr: %v <%v>", y, r.TypeOf(y))
- }
- return nil
-}
-
-func ToDecl(x Ast) ast.Decl {
- switch node := ToNode(x).(type) {
- case ast.Decl:
- return node
- case nil:
- default:
- y := x.Interface()
- errorf("cannot convert to ast.Decl: %v <%v>", y, r.TypeOf(y))
- }
- return nil
-}
-
-func ToExpr(x Ast) ast.Expr {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case ast.Expr:
- return node
- case *ast.BlockStmt:
- return BlockStmtToExpr(node)
- case *ast.EmptyStmt:
- return &ast.Ident{NamePos: node.Semicolon, Name: "nil"}
- case *ast.ExprStmt:
- return node.X
- case ast.Stmt:
- list := []ast.Stmt{node}
- block := &ast.BlockStmt{List: list}
- return BlockStmtToExpr(block)
- default:
- errorf("unimplemented conversion from %v to ast.Expr: %v <%v>",
- r.TypeOf(node), node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToExprSlice(x Ast) []ast.Expr {
- switch x := x.(type) {
- case nil:
- break
- case ExprSlice:
- return x.X
- case AstWithSlice:
- n := x.Size()
- ret := make([]ast.Expr, n)
- for i := 0; i < n; i++ {
- ret[i] = ToExpr(x.Get(i))
- }
- return ret
- default:
- errorf("unimplemented conversion from %v <%v> to []ast.Expr", x, r.TypeOf(x))
- }
- return nil
-}
-
-func ToField(x Ast) *ast.Field {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case *ast.Field:
- return node
- default:
- errorf("cannot convert %v <%v> to *ast.Field", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToFile(x Ast) *ast.File {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case *ast.File:
- return node
- default:
- errorf("cannot convert %v <%v> to *ast.File", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToFieldList(x Ast) *ast.FieldList {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case *ast.FieldList:
- return node
- case *ast.Field:
- return &ast.FieldList{Opening: node.Pos(), List: []*ast.Field{node}, Closing: node.End()}
- default:
- errorf("cannot convert %v <%v> to *ast.Field", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToFuncType(x Ast) *ast.FuncType {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case *ast.FuncType:
- return node
- default:
- errorf("cannot convert %v <%v> to *ast.FuncType", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToImportSpec(x Ast) *ast.ImportSpec {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case *ast.ImportSpec:
- return node
- default:
- errorf("cannot convert %v <%v> to *ast.ImportSpec", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToIdent(x Ast) *ast.Ident {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case *ast.Ident:
- return node
- default:
- errorf("cannot convert %v <%v> to *ast.Ident", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToIdentSlice(x Ast) []*ast.Ident {
- switch x := x.(type) {
- case nil:
- break
- case IdentSlice:
- return x.X
- case AstWithSlice:
- n := x.Size()
- ret := make([]*ast.Ident, n)
- for i := 0; i < n; i++ {
- ret[i] = ToIdent(x.Get(i))
- }
- return ret
- default:
- errorf("unimplemented conversion from %v <%v> to []*ast.Ident", x, r.TypeOf(x))
- }
- return nil
-}
-
-func ToSpec(x Ast) ast.Spec {
- switch node := ToNode(x).(type) {
- case nil:
- break
- case ast.Spec:
- return node
- default:
- errorf("cannot convert %v <%v> to ast.Spec", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToStmt(x Ast) ast.Stmt {
- switch node := ToNode(x).(type) {
- case ast.Stmt:
- return node
- case ast.Decl:
- return &ast.DeclStmt{Decl: node}
- case ast.Expr:
- return &ast.ExprStmt{X: node}
- case nil:
- break
- default:
- errorf("unimplemented conversion from %v <%v> to ast.Stmt", node, r.TypeOf(node))
- }
- return nil
-}
-
-func ToStmtSlice(x Ast) []ast.Stmt {
- switch x := x.(type) {
- case nil:
- break
- case StmtSlice:
- return x.X
- case AstWithSlice:
- n := x.Size()
- ret := make([]ast.Stmt, n)
- for i := 0; i < n; i++ {
- ret[i] = ToStmt(x.Get(i))
- }
- return ret
- default:
- errorf("unimplemented conversion from %v <%v> to []ast.Stmt", x, r.TypeOf(x))
- }
- return nil
-}
-
-func BlockStmtToExpr(node *ast.BlockStmt) ast.Expr {
- if node == nil {
- return nil
- }
- list := node.List
- switch len(list) {
- case 0:
- // convert {} to nil, because {} in expression context means "no useful value"
- return &ast.Ident{NamePos: node.Lbrace, Name: "nil"}
- case 1:
- // check if we are lucky...
- switch node := list[0].(type) {
- case *ast.ExprStmt:
- return node.X
- case *ast.EmptyStmt:
- // convert { ; } to nil, because { ; } in expression context means "no useful value"
- return &ast.Ident{NamePos: node.Semicolon, Name: "nil"}
- }
- }
-
- // due to go/ast strictly typed model, there is only one mechanism
- // to insert a statement inside an expression: use a closure.
- // so we return a unary expression: MACRO (func() { /*block*/ })
- typ := &ast.FuncType{Func: token.NoPos, Params: &ast.FieldList{}}
- fun := &ast.FuncLit{Type: typ, Body: node}
- return &ast.UnaryExpr{Op: mt.MACRO, X: fun}
-}
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/ast_node.go b/vendor/github.com/cosmos72/gomacro/ast2/ast_node.go
index 3668a02..826fc17 100644
--- a/vendor/github.com/cosmos72/gomacro/ast2/ast_node.go
+++ b/vendor/github.com/cosmos72/gomacro/ast2/ast_node.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* ast_node.go
@@ -279,7 +270,9 @@ func (x SwitchStmt) New() Ast { return SwitchStmt{&ast.SwitchStmt{Switch: x.X.
func (x TypeAssertExpr) New() Ast {
return TypeAssertExpr{&ast.TypeAssertExpr{Lparen: x.X.Lparen, Rparen: x.X.Rparen}}
}
-func (x TypeSpec) New() Ast { return TypeSpec{&ast.TypeSpec{Doc: x.X.Doc, Comment: x.X.Comment}} }
+func (x TypeSpec) New() Ast {
+ return TypeSpec{&ast.TypeSpec{Doc: x.X.Doc, Assign: x.X.Assign, Comment: x.X.Comment}}
+}
func (x TypeSwitchStmt) New() Ast { return TypeSwitchStmt{&ast.TypeSwitchStmt{Switch: x.X.Switch}} }
func (x UnaryExpr) New() Ast { return UnaryExpr{&ast.UnaryExpr{OpPos: x.X.OpPos, Op: x.X.Op}} }
func (x ValueSpec) New() Ast { return ValueSpec{&ast.ValueSpec{Doc: x.X.Doc, Comment: x.X.Comment}} }
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/ast_slice.go b/vendor/github.com/cosmos72/gomacro/ast2/ast_slice.go
index 35af48d..fcee860 100644
--- a/vendor/github.com/cosmos72/gomacro/ast2/ast_slice.go
+++ b/vendor/github.com/cosmos72/gomacro/ast2/ast_slice.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* ast_slice.go
@@ -125,7 +116,9 @@ func (x GenDecl) Op() token.Token { return x.X.Tok }
func (x ReturnStmt) Op() token.Token { return token.RETURN }
func (x BlockStmt) New() Ast { return BlockStmt{&ast.BlockStmt{Lbrace: x.X.Lbrace, Rbrace: x.X.Rbrace}} }
-func (x FieldList) New() Ast { return FieldList{&ast.FieldList{}} }
+func (x FieldList) New() Ast {
+ return FieldList{&ast.FieldList{Opening: x.X.Opening, Closing: x.X.Closing}}
+}
func (x File) New() Ast {
return File{&ast.File{Doc: x.X.Doc, Package: x.X.Package, Name: x.X.Name, Scope: x.X.Scope, Imports: x.X.Imports, Comments: x.X.Comments}}
}
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/error.go b/vendor/github.com/cosmos72/gomacro/ast2/error.go
index 9490f09..1961fa1 100644
--- a/vendor/github.com/cosmos72/gomacro/ast2/error.go
+++ b/vendor/github.com/cosmos72/gomacro/ast2/error.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* error.go
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/test/empty.go b/vendor/github.com/cosmos72/gomacro/ast2/test/empty.go
new file mode 100644
index 0000000..7d33970
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/ast2/test/empty.go
@@ -0,0 +1,17 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * empty.go
+ *
+ * Created on: May 05, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package test
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/test/z_test.go b/vendor/github.com/cosmos72/gomacro/ast2/test/z_test.go
new file mode 100644
index 0000000..aaab60f
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/ast2/test/z_test.go
@@ -0,0 +1,68 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * z_test.go
+ *
+ * Created on: May 05, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package test
+
+import (
+ "io/ioutil"
+ "os"
+ "testing"
+
+ . "github.com/cosmos72/gomacro/ast2"
+ "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/parser"
+ "github.com/cosmos72/gomacro/token"
+)
+
+func TestToNodes(t *testing.T) {
+ tests := []struct {
+ Name string
+ Path string
+ }{
+ {"z_test_data_2", "z_test_data_2.txt"},
+ {"fast_global", "../../fast/global.go"},
+ }
+ for _, test := range tests {
+ t.Run(test.Name, func(t *testing.T) {
+ _testToNodes(t, test.Path)
+ })
+ }
+}
+
+func _testToNodes(t *testing.T, filename string) {
+ bytes, err := ioutil.ReadFile(filename)
+ if err != nil {
+ t.Errorf("read file %q failed: %v", filename, err)
+ return
+ }
+
+ fset := token.NewFileSet()
+ st := base.Stringer{Fileset: fset}
+
+ var p parser.Parser
+ p.Init(fset, filename, 0, bytes)
+
+ nodes, err := p.Parse()
+ if err != nil {
+ t.Errorf("parse file %q failed: %v", filename, err)
+ return
+ }
+ nodes = ToNodes(NodeSlice{nodes})
+
+ for _, node := range nodes {
+ st.Fprintf(os.Stdout, "%v\n", node)
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/test/z_test_data_2.txt b/vendor/github.com/cosmos72/gomacro/ast2/test/z_test_data_2.txt
new file mode 100644
index 0000000..0c0462d
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/ast2/test/z_test_data_2.txt
@@ -0,0 +1,10 @@
+package test
+
+var c = []int{0:a, 1:b}
+
+var a, b = pair(2, 3)
+
+func pair(a, b int) (int, int) {
+ return a, b
+}
+
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/tonodes.go b/vendor/github.com/cosmos72/gomacro/ast2/tonodes.go
new file mode 100644
index 0000000..01cb750
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/ast2/tonodes.go
@@ -0,0 +1,74 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * tonodes.go
+ *
+ * Created on Mar 05, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package ast2
+
+import (
+ "go/ast"
+ "go/token"
+)
+
+// ToNode recursively traverses Ast and extracts all the contained ast.Node:s
+func ToNodes(x Ast) []ast.Node {
+ return ToNodesAppend(nil, x)
+}
+
+func ToNodesAppend(dst []ast.Node, x Ast) []ast.Node {
+ switch x := x.(type) {
+ case nil:
+ return dst
+ case File:
+ dst = collectImports(dst, x.X.Imports)
+ // treat as AstWithSlice to traverse File contents
+ break
+ case AstWithNode:
+ if x != nil {
+ dst = append(dst, x.Node())
+ }
+ return dst
+ case NodeSlice:
+ // faster than generic AstWithSlice
+ return append(dst, x.X...)
+ case AstWithSlice:
+ break
+ default:
+ y := x.Interface()
+ errorf("cannot convert to []ast.Node: %v // %T", y, y)
+ return nil
+ }
+ form, ok := x.(AstWithSlice)
+ if ok && form != nil {
+ n := form.Size()
+ for i := 0; i < n; i++ {
+ dst = ToNodesAppend(dst, form.Get(i))
+ }
+ }
+ return dst
+}
+
+func collectImports(dst []ast.Node, imports []*ast.ImportSpec) []ast.Node {
+ if n := len(imports); n != 0 {
+ specs := make([]ast.Spec, n)
+ for i, imp := range imports {
+ specs[i] = imp
+ }
+ dst = append(dst, &ast.GenDecl{
+ Tok: token.IMPORT,
+ Specs: specs,
+ })
+ }
+ return dst
+}
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/unwrap.go b/vendor/github.com/cosmos72/gomacro/ast2/unwrap.go
new file mode 100644
index 0000000..8fd6bec
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/ast2/unwrap.go
@@ -0,0 +1,301 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * unwrap.go
+ *
+ * Created on: May 06, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package ast2
+
+import (
+ "go/ast"
+ "go/token"
+ r "reflect"
+
+ mt "github.com/cosmos72/gomacro/token"
+)
+
+// ToNode converts Ast back ast.Node, or panics on failure
+// (it fails if the argument is not AstWithNode)
+func ToNode(x Ast) ast.Node {
+ switch x := x.(type) {
+ case nil:
+ return nil
+ case AstWithNode:
+ return x.Node()
+ default:
+ y := x.Interface()
+ errorf("cannot convert to ast.Node: %v // %T", y, y)
+ return nil
+ }
+}
+
+func ToBasicLit(x Ast) *ast.BasicLit {
+ switch x := x.(type) {
+ case nil:
+ break
+ case BasicLit:
+ return x.X
+ default:
+ y := x.Interface()
+ errorf("cannot convert to *ast.BasicLit: %v // %T", y, y)
+ }
+ return nil
+}
+
+func ToBlockStmt(x Ast) *ast.BlockStmt {
+ switch x := x.(type) {
+ case nil:
+ break
+ case BlockStmt:
+ return x.X
+ default:
+ stmt := ToStmt(x)
+ return &ast.BlockStmt{Lbrace: stmt.Pos(), List: []ast.Stmt{stmt}, Rbrace: stmt.End()}
+ }
+ return nil
+}
+
+func ToCallExpr(x Ast) *ast.CallExpr {
+ switch x := x.(type) {
+ case nil:
+ break
+ case CallExpr:
+ return x.X
+ default:
+ y := x.Interface()
+ errorf("cannot convert to *ast.CallExpr: %v // %T", y, y)
+ }
+ return nil
+}
+
+func ToDecl(x Ast) ast.Decl {
+ switch node := ToNode(x).(type) {
+ case ast.Decl:
+ return node
+ case nil:
+ default:
+ y := x.Interface()
+ errorf("cannot convert to ast.Decl: %v // %T", y, y)
+ }
+ return nil
+}
+
+func ToExpr(x Ast) ast.Expr {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case ast.Expr:
+ return node
+ case *ast.BlockStmt:
+ return BlockStmtToExpr(node)
+ case *ast.EmptyStmt:
+ return &ast.Ident{NamePos: node.Semicolon, Name: "nil"}
+ case *ast.ExprStmt:
+ return node.X
+ case ast.Stmt:
+ list := []ast.Stmt{node}
+ block := &ast.BlockStmt{List: list}
+ return BlockStmtToExpr(block)
+ default:
+ errorf("unimplemented conversion from %v to ast.Expr: %v <%v>",
+ r.TypeOf(node), node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToExprSlice(x Ast) []ast.Expr {
+ switch x := x.(type) {
+ case nil:
+ break
+ case ExprSlice:
+ return x.X
+ case AstWithSlice:
+ n := x.Size()
+ ret := make([]ast.Expr, n)
+ for i := 0; i < n; i++ {
+ ret[i] = ToExpr(x.Get(i))
+ }
+ return ret
+ default:
+ errorf("unimplemented conversion from %v <%v> to []ast.Expr", x, r.TypeOf(x))
+ }
+ return nil
+}
+
+func ToField(x Ast) *ast.Field {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case *ast.Field:
+ return node
+ default:
+ errorf("cannot convert %v <%v> to *ast.Field", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToFile(x Ast) *ast.File {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case *ast.File:
+ return node
+ default:
+ errorf("cannot convert %v <%v> to *ast.File", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToFieldList(x Ast) *ast.FieldList {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case *ast.FieldList:
+ return node
+ case *ast.Field:
+ return &ast.FieldList{Opening: node.Pos(), List: []*ast.Field{node}, Closing: node.End()}
+ default:
+ errorf("cannot convert %v <%v> to *ast.Field", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToFuncType(x Ast) *ast.FuncType {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case *ast.FuncType:
+ return node
+ default:
+ errorf("cannot convert %v <%v> to *ast.FuncType", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToImportSpec(x Ast) *ast.ImportSpec {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case *ast.ImportSpec:
+ return node
+ default:
+ errorf("cannot convert %v <%v> to *ast.ImportSpec", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToIdent(x Ast) *ast.Ident {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case *ast.Ident:
+ return node
+ default:
+ errorf("cannot convert %v <%v> to *ast.Ident", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToIdentSlice(x Ast) []*ast.Ident {
+ switch x := x.(type) {
+ case nil:
+ break
+ case IdentSlice:
+ return x.X
+ case AstWithSlice:
+ n := x.Size()
+ ret := make([]*ast.Ident, n)
+ for i := 0; i < n; i++ {
+ ret[i] = ToIdent(x.Get(i))
+ }
+ return ret
+ default:
+ errorf("unimplemented conversion from %v <%v> to []*ast.Ident", x, r.TypeOf(x))
+ }
+ return nil
+}
+
+func ToSpec(x Ast) ast.Spec {
+ switch node := ToNode(x).(type) {
+ case nil:
+ break
+ case ast.Spec:
+ return node
+ default:
+ errorf("cannot convert %v <%v> to ast.Spec", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToStmt(x Ast) ast.Stmt {
+ switch node := ToNode(x).(type) {
+ case ast.Stmt:
+ return node
+ case ast.Decl:
+ return &ast.DeclStmt{Decl: node}
+ case ast.Expr:
+ return &ast.ExprStmt{X: node}
+ case nil:
+ break
+ default:
+ errorf("unimplemented conversion from %v <%v> to ast.Stmt", node, r.TypeOf(node))
+ }
+ return nil
+}
+
+func ToStmtSlice(x Ast) []ast.Stmt {
+ switch x := x.(type) {
+ case nil:
+ break
+ case StmtSlice:
+ return x.X
+ case AstWithSlice:
+ n := x.Size()
+ ret := make([]ast.Stmt, n)
+ for i := 0; i < n; i++ {
+ ret[i] = ToStmt(x.Get(i))
+ }
+ return ret
+ default:
+ errorf("unimplemented conversion from %v <%v> to []ast.Stmt", x, r.TypeOf(x))
+ }
+ return nil
+}
+
+func BlockStmtToExpr(node *ast.BlockStmt) ast.Expr {
+ if node == nil {
+ return nil
+ }
+ list := node.List
+ switch len(list) {
+ case 0:
+ // convert {} to nil, because {} in expression context means "no useful value"
+ return &ast.Ident{NamePos: node.Lbrace, Name: "nil"}
+ case 1:
+ // check if we are lucky...
+ switch node := list[0].(type) {
+ case *ast.ExprStmt:
+ return node.X
+ case *ast.EmptyStmt:
+ // convert { ; } to nil, because { ; } in expression context means "no useful value"
+ return &ast.Ident{NamePos: node.Semicolon, Name: "nil"}
+ }
+ }
+
+ // due to go/ast strictly typed model, there is only one mechanism
+ // to insert a statement inside an expression: use a closure.
+ // so we return a unary expression: MACRO (func() { /*block*/ })
+ typ := &ast.FuncType{Func: token.NoPos, Params: &ast.FieldList{}}
+ fun := &ast.FuncLit{Type: typ, Body: node}
+ return &ast.UnaryExpr{Op: mt.MACRO, X: fun}
+}
diff --git a/vendor/github.com/cosmos72/gomacro/ast2/wrap.go b/vendor/github.com/cosmos72/gomacro/ast2/wrap.go
new file mode 100644
index 0000000..13568f0
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/ast2/wrap.go
@@ -0,0 +1,334 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * wrap.go
+ *
+ * Created on: Feb 25, 2017
+ * Author: Massimiliano Ghilardi
+ */
+
+package ast2
+
+import (
+ "fmt"
+ "go/ast"
+ "go/token"
+ r "reflect"
+)
+
+// unused
+/*
+func CloneAst(in Ast) Ast {
+ switch in := in.(type) {
+ case AstWithNode:
+ return CloneAstWithNode(in)
+ case AstWithSlice:
+ return CloneAstWithSlice(in)
+ default:
+ errorf("CloneAst: unsupported argument type, expecting AstWithNode or AstWithSlice: %v // %T", in, in)
+ return nil
+ }
+}
+
+func CloneAstWithNode(in AstWithNode) AstWithNode {
+ form := in.New().(AstWithNode)
+ n := in.Size()
+ for i := 0; i < n; i++ {
+ form.Set(i, CloneAst(in.Get(i)))
+ }
+ return form
+}
+
+func CloneAstWithSlice(in AstWithSlice) AstWithSlice {
+ form := in.New().(AstWithSlice)
+ n := in.Size()
+ for i := 0; i < n; i++ {
+ form = form.Append(CloneAst(in.Get(i)))
+ }
+ return form
+}
+*/
+
+func AnyToAstWithNode(any interface{}, caller interface{}) AstWithNode {
+ node := AnyToAst(any, caller)
+ switch node := node.(type) {
+ case AstWithNode:
+ return node
+ default:
+ errorf("%s: cannot convert to ast.Node: %v <%v>", caller, any, r.TypeOf(any))
+ return nil
+ }
+}
+
+func AnyToAstWithSlice(any interface{}, caller interface{}) AstWithSlice {
+ node := AnyToAst(any, caller)
+ switch node := node.(type) {
+ case nil:
+ return NodeSlice{}
+ case AstWithSlice:
+ return node
+ default:
+ errorf("%s: cannot convert to slice of ast.Node: %v <%v>", caller, any, r.TypeOf(any))
+ return nil
+ }
+}
+
+func AnyToAst(any interface{}, caller interface{}) Ast {
+ var str string
+ var tok token.Token
+ switch node := any.(type) {
+ case nil:
+ return nil
+ case Ast:
+ return node
+ case ast.Node:
+ return ToAst(node)
+ case []Ast:
+ return AstSlice{X: node}
+ case []ast.Node:
+ return NodeSlice{X: node}
+ case []*ast.Field:
+ return FieldSlice{X: node}
+ case []ast.Decl:
+ return DeclSlice{X: node}
+ case []ast.Expr:
+ return ExprSlice{X: node}
+ case []*ast.Ident:
+ return IdentSlice{X: node}
+ case []ast.Stmt:
+ return StmtSlice{X: node}
+ case []ast.Spec:
+ return SpecSlice{X: node}
+ case bool:
+ if node {
+ str = "true"
+ } else {
+ str = "false"
+ }
+ return Ident{X: &ast.Ident{Name: str}}
+ /*
+ case rune: // Go cannot currently distinguish rune from int32
+ tok = token.CHAR
+ str = fmt.Sprintf("%q", node)
+ */
+ case int, int8, int16, int32, int64,
+ uint, uint8, uint16, uint32, uint64, uintptr:
+ tok = token.INT
+ str = fmt.Sprintf("%d", node)
+ case float32, float64:
+ tok = token.FLOAT
+ str = fmt.Sprintf("%g", node)
+ case complex64, complex128:
+ errorf("%s: unimplemented conversion of %T to ast.Node: %v", caller, any, any)
+ return nil
+ case string:
+ tok = token.STRING
+ str = fmt.Sprintf("%q", node)
+ default:
+ errorf("%s: cannot convert to ast.Node: %v // %T", caller, any, any)
+ return nil
+ }
+ return BasicLit{X: &ast.BasicLit{Kind: tok, Value: str}}
+
+}
+
+// ToAst2 returns either n0 (if i == 0) or n1, converted to Ast
+func ToAst1(i int, node ast.Node) AstWithNode {
+ if i == 0 {
+ return ToAst(node)
+ } else {
+ return badIndex(i, 1)
+ }
+}
+
+// ToAst2 returns either n0 (if i == 0) or n1, converted to Ast
+func ToAst2(i int, n0 ast.Node, n1 ast.Node) AstWithNode {
+ var n ast.Node
+ switch i {
+ case 0:
+ n = n0
+ case 1:
+ n = n1
+ default:
+ return badIndex(i, 2)
+ }
+ return ToAst(n)
+}
+
+func ToAst3(i int, n0 ast.Node, n1 ast.Node, n2 *ast.BlockStmt) AstWithNode {
+ var n ast.Node
+ switch i {
+ case 0:
+ n = n0
+ case 1:
+ n = n1
+ case 2:
+ if n2 == nil {
+ return nil
+ }
+ return BlockStmt{n2}
+ default:
+ return badIndex(i, 3)
+ }
+ return ToAst(n)
+}
+
+func ToAst4(i int, n0 ast.Node, n1 ast.Node, n2 ast.Node, n3 ast.Node) AstWithNode {
+ var n ast.Node
+ switch i {
+ case 0:
+ n = n0
+ case 1:
+ n = n1
+ case 2:
+ n = n2
+ case 3:
+ n = n3
+ default:
+ return badIndex(i, 4)
+ }
+ return ToAst(n)
+}
+
+// ToAst converts an ast.Node to Ast, providing uniform access to the node contents
+//
+func ToAst(node ast.Node) AstWithNode {
+ var x AstWithNode
+ switch node := node.(type) {
+ case nil:
+ return nil
+ case *ast.ArrayType:
+ x = ArrayType{node}
+ case *ast.AssignStmt:
+ x = AssignStmt{node}
+ case *ast.BadDecl:
+ x = BadDecl{node}
+ case *ast.BadExpr:
+ x = BadExpr{node}
+ case *ast.BadStmt:
+ x = BadStmt{node}
+ case *ast.BasicLit:
+ x = BasicLit{node}
+ case *ast.BinaryExpr:
+ x = BinaryExpr{node}
+ case *ast.BlockStmt:
+ if node != nil { // we can get typed nil from many places
+ x = BlockStmt{node}
+ }
+ case *ast.BranchStmt:
+ x = BranchStmt{node}
+ case *ast.CallExpr:
+ x = CallExpr{node}
+ case *ast.CaseClause:
+ x = CaseClause{node}
+ case *ast.ChanType:
+ x = ChanType{node}
+ case *ast.CommClause:
+ x = CommClause{node}
+ case *ast.CompositeLit:
+ x = CompositeLit{node}
+ case *ast.DeclStmt:
+ x = DeclStmt{node}
+ case *ast.DeferStmt:
+ x = DeferStmt{node}
+ case *ast.Ellipsis:
+ x = Ellipsis{node}
+ case *ast.EmptyStmt:
+ x = EmptyStmt{node}
+ case *ast.ExprStmt:
+ x = ExprStmt{node}
+ case *ast.Field:
+ x = Field{node}
+ case *ast.FieldList:
+ if node != nil { // we can get typed nil from many places
+ x = FieldList{node}
+ }
+ case *ast.File:
+ x = File{node}
+ case *ast.ForStmt:
+ x = ForStmt{node}
+ case *ast.FuncDecl:
+ x = FuncDecl{node}
+ case *ast.FuncLit:
+ x = FuncLit{node}
+ case *ast.FuncType:
+ x = FuncType{node}
+ case *ast.GenDecl:
+ if node != nil {
+ x = GenDecl{node}
+ }
+ case *ast.GoStmt:
+ x = GoStmt{node}
+ case *ast.Ident:
+ x = Ident{node}
+ case *ast.IfStmt:
+ x = IfStmt{node}
+ case *ast.ImportSpec:
+ x = ImportSpec{node}
+ case *ast.IncDecStmt:
+ x = IncDecStmt{node}
+ case *ast.IndexExpr:
+ x = IndexExpr{node}
+ case *ast.InterfaceType:
+ x = InterfaceType{node}
+ case *ast.KeyValueExpr:
+ x = KeyValueExpr{node}
+ case *ast.LabeledStmt:
+ x = LabeledStmt{node}
+ case *ast.MapType:
+ x = MapType{node}
+ case *ast.Package:
+ x = Package{node}
+ case *ast.ParenExpr:
+ x = ParenExpr{node}
+ case *ast.RangeStmt:
+ x = RangeStmt{node}
+ case *ast.ReturnStmt:
+ x = ReturnStmt{node}
+ case *ast.SelectStmt:
+ x = SelectStmt{node}
+ case *ast.SelectorExpr:
+ x = SelectorExpr{node}
+ case *ast.SendStmt:
+ x = SendStmt{node}
+ case *ast.SliceExpr:
+ x = SliceExpr{node}
+ case *ast.StarExpr:
+ x = StarExpr{node}
+ case *ast.StructType:
+ x = StructType{node}
+ case *ast.SwitchStmt:
+ x = SwitchStmt{node}
+ case *ast.TypeAssertExpr:
+ x = TypeAssertExpr{node}
+ case *ast.TypeSpec:
+ x = TypeSpec{node}
+ case *ast.TypeSwitchStmt:
+ x = TypeSwitchStmt{node}
+ case *ast.UnaryExpr:
+ x = UnaryExpr{node}
+ case *ast.ValueSpec:
+ x = ValueSpec{node}
+ default:
+ errorf("unsupported node type %T", node)
+ }
+ return x
+}
+
+func ToAstWithSlice(x Ast, caller interface{}) AstWithSlice {
+ switch x := x.(type) {
+ case AstWithSlice:
+ return x
+ default:
+ y := x.Interface()
+ errorf("%s: cannot convert to slice of ast.Node: %v <%v>", caller, y, r.TypeOf(y))
+ return nil
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/atomic/spinlock.go b/vendor/github.com/cosmos72/gomacro/atomic/spinlock.go
new file mode 100644
index 0000000..edcf7cd
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/atomic/spinlock.go
@@ -0,0 +1,39 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * spinlock.go
+ *
+ * Created on: Apr 30 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package atomic
+
+import (
+ "runtime"
+ "sync/atomic"
+)
+
+type SpinLock int32
+
+func (s *SpinLock) Lock() {
+ for i := 0; i < 10; i++ {
+ if atomic.CompareAndSwapInt32((*int32)(s), 0, 1) {
+ return
+ }
+ }
+ for !atomic.CompareAndSwapInt32((*int32)(s), 0, 1) {
+ runtime.Gosched()
+ }
+}
+
+func (s *SpinLock) Unlock() {
+ atomic.StoreInt32((*int32)(s), 0)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/constants.go b/vendor/github.com/cosmos72/gomacro/base/constant.go
similarity index 59%
rename from vendor/github.com/cosmos72/gomacro/base/constants.go
rename to vendor/github.com/cosmos72/gomacro/base/constant.go
index 4155714..0a2426b 100644
--- a/vendor/github.com/cosmos72/gomacro/base/constants.go
+++ b/vendor/github.com/cosmos72/gomacro/base/constant.go
@@ -1,23 +1,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * constants.go
+ * constant.go
*
* Created on: Feb 19, 2017
* Author: Massimiliano Ghilardi
@@ -31,19 +22,20 @@ import (
type none struct{}
+// the following constants must match with github.com/cosmos72/gomacro/xreflect/gensym.go
const (
- StrGensymInterface = "\u0080" // name of extra struct field needed by the interpreter when creating interface proxies
- StrGensymPrivate = "\u00AD" // prefix to generate names for unexported struct fields
- StrGensymEmbedded = "\u00BB" // prefix to generate names for embedded struct fields
- StrGensym = "\U000124AD" // prefix to generate names in macros - arbitrarily chosen U+124AD CUNEIFORM SIGN ERIN2 X - reasons:
- // * accepted by Go compiler identifier name in source code
- // * belongs to an ancient language no longer spoken, so hopefully low collision risk
- // * outside Unicode basic place, so hopefully lower collision risk
+ StrGensymInterface string = "\U0001202A" // name of extra struct field needed by the interpreter when creating interface proxies
+ StrGensymPrivate string = "\U00012038" // prefix to generate names for unexported struct fields
+ StrGensymAnonymous string = "\U00012039" // prefix to generate names for anonymous struct fields
+ StrGensym string = "\U00012035" // prefix to generate names in macros
+ // the symbols above are chosen somewhat arbitrarily. Reasons:
+ // * accepted by Go compiler as identifier names in source code
+ // * belong to an ancient language no longer spoken, so hopefully low collision risk
+ // * outside Unicode basic plane, so hopefully lower collision risk
// * relatively simple glyph picture
MaxUint16 = ^uint16(0)
MaxUint = ^uint(0)
- MinUint = 0
MaxInt = int(MaxUint >> 1)
MinInt = ^MaxInt
)
@@ -85,9 +77,6 @@ var (
TypeOfDeferFunc = r.TypeOf(func() {})
TypeOfReflectType = r.TypeOf((*r.Type)(nil)).Elem() // inception
- TypeOfSliceOfByte = r.TypeOf([]byte{})
- TypeOfSliceOfInterface = r.TypeOf([]interface{}{})
-
TypeOfPtrInt = r.TypeOf((*int)(nil))
TypeOfPtrInt8 = r.TypeOf((*int8)(nil))
TypeOfPtrInt16 = r.TypeOf((*int16)(nil))
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/api.go b/vendor/github.com/cosmos72/gomacro/base/dep/api.go
new file mode 100644
index 0000000..6f854bd
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/api.go
@@ -0,0 +1,136 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * api.go
+ *
+ * Created on: May 03, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+import (
+ "fmt"
+ "go/ast"
+ "go/token"
+)
+
+// Support for out-of-order code
+
+type Kind int
+
+const (
+ Unknown Kind = iota
+ Const
+ Expr
+ Func
+ Import
+ Macro
+ Method
+ Package
+ Stmt
+ Type
+ TypeFwd
+ Var
+ VarMulti
+)
+
+var kinds = map[Kind]string{
+ Unknown: "Unknown",
+ Const: "Const",
+ Expr: "Expr",
+ Func: "Func",
+ Import: "Import",
+ Macro: "Macro",
+ Method: "Method",
+ Package: "Package",
+ Stmt: "Stmt",
+ Type: "Type",
+ TypeFwd: "TypeFwd", // forward type declaration
+ Var: "Var",
+ VarMulti: "VarMulti", // variables initialized with multi-value expression
+}
+
+func (k Kind) String() string {
+ name, ok := kinds[k]
+ if ok {
+ return name
+ }
+ return fmt.Sprintf("Kind%d", int(k))
+}
+
+// for multiple const or var declarations in a single *ast.ValueSpec
+type Extra struct {
+ Ident *ast.Ident
+ Type ast.Expr
+ Value ast.Expr
+ Iota int // for constants, value of iota to use
+}
+
+// convert *Extra to ast.Spec
+func (extra *Extra) Spec() *ast.ValueSpec {
+ spec := &ast.ValueSpec{
+ Names: []*ast.Ident{extra.Ident},
+ Type: extra.Type,
+ }
+ if extra.Value != nil {
+ spec.Values = []ast.Expr{extra.Value}
+ }
+ return spec
+}
+
+type Decl struct {
+ Kind Kind
+ Name string
+ Node ast.Node // nil for multiple const or var declarations in a single *ast.ValueSpec - in such case, see Extra
+ Deps []string // names of types, constants and variables used in Node's declaration
+ Pos token.Pos
+ Extra *Extra
+}
+
+func NewDecl(kind Kind, name string, node ast.Node, pos token.Pos, deps []string) *Decl {
+ return &Decl{Kind: kind, Name: name, Node: node, Deps: sort_unique_inplace(deps), Pos: pos}
+}
+
+type DeclMap map[string]*Decl
+
+type DeclList []*Decl
+
+type Scope struct {
+ Decls DeclMap
+ Outer *Scope
+ Gensym int
+}
+
+func NewScope(outer *Scope) *Scope {
+ return &Scope{
+ Decls: make(map[string]*Decl),
+ Outer: outer,
+ }
+}
+
+type Sorter struct {
+ scope Scope
+ queue []ast.Node
+}
+
+func NewSorter() *Sorter {
+ return &Sorter{
+ scope: Scope{
+ Decls: make(map[string]*Decl),
+ },
+ }
+}
+
+// Sorter resolves top-level constant, type, function and var
+// declaration order by analyzing their dependencies.
+//
+// also resolves top-level var initialization order
+// analyzing their dependencies.
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/api_internal.go b/vendor/github.com/cosmos72/gomacro/base/dep/api_internal.go
new file mode 100644
index 0000000..9f592b0
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/api_internal.go
@@ -0,0 +1,41 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * api_internal.go
+ *
+ * Created on: May 05, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+type void struct{}
+
+type set map[string]void
+
+type depMap map[string]set
+
+type fwdDeclList struct {
+ List DeclList
+ Set set
+}
+
+type graph struct {
+ Nodes DeclMap
+ Edges depMap
+}
+
+type visitCtx struct {
+ visiting map[string]int
+ visited map[string]int
+ beforeFunc func(node *Decl, ctx *visitCtx) // invoked once for each node, in visit pre-order
+ afterFunc func(node *Decl, ctx *visitCtx) // invoked once for each node, in visit post-order
+ cycleFunc func(node *Decl, ctx *visitCtx) // invoked when ctx.visiting[node.Name] exists already, i.e. for cycles
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/decl.go b/vendor/github.com/cosmos72/gomacro/base/dep/decl.go
new file mode 100644
index 0000000..1f71d3c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/decl.go
@@ -0,0 +1,210 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * util.go
+ *
+ * Created on: May 03, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+import (
+ "fmt"
+ "go/ast"
+ "go/token"
+ "io"
+ "os"
+ "sort"
+
+ "github.com/cosmos72/gomacro/base"
+)
+
+// ===================== DeclMap =====================
+
+func (m DeclMap) Dup() DeclMap {
+ ret := make(DeclMap, len(m))
+ for name, decl := range m {
+ ret[name] = decl
+ }
+ return ret
+}
+
+func (m DeclMap) List() DeclList {
+ list := make(DeclList, len(m))
+ i := 0
+ for _, e := range m {
+ list[i] = e
+ i++
+ }
+ return list
+}
+
+// remove all dependencies that cannot be resolved, i.e. not present among m
+func (m DeclMap) RemoveUnresolvableDeps() {
+ for _, decl := range m {
+ decl.RemoveUnresolvableDeps(m)
+ }
+}
+
+func (m DeclMap) Print() {
+ m.List().SortByPos().Print()
+}
+
+func (m DeclMap) depMap() depMap {
+ ret := make(depMap, len(m))
+ for _, decl := range m {
+ ret[decl.Name] = decl.depSet()
+ }
+ return ret
+}
+
+// ===================== DeclList ====================
+
+func (list DeclList) Map() DeclMap {
+ m := make(DeclMap, len(list))
+ for _, e := range list {
+ m[e.Name] = e
+ }
+ return m
+}
+
+func (list DeclList) SortByPos() DeclList {
+ sort.Slice(list, func(i, j int) bool {
+ a, b := list[i], list[j]
+ return a.Pos < b.Pos
+ })
+ return list
+}
+
+func (list DeclList) Reverse() DeclList {
+ n := len(list)
+ for i := 0; i < n/2; i++ {
+ temp := list[i]
+ j := n - i - 1
+ list[i] = list[j]
+ list[j] = temp
+ }
+ return list
+}
+
+func (list DeclList) Print() {
+ for _, decl := range list {
+ decl.Print()
+ }
+}
+
+// ======================= Decl ======================
+
+func NewDeclImport(spec ast.Spec, counter *int) *Decl {
+ node, ok := spec.(*ast.ImportSpec)
+ if !ok {
+ base.Errorf("NewDeclImport(): unsupported import: expecting *ast.ImportSpec, found: %v // %T", spec, spec)
+ }
+
+ var name string
+ if ident := node.Name; ident != nil {
+ if ident.Name != "." {
+ name = ident.Name
+ }
+ } else {
+ name = basename(unquote(node.Path.Value))
+ }
+ if len(name) == 0 {
+ name = fmt.Sprintf("", *counter)
+ *counter++
+ }
+ return NewDecl(Import, name, node, node.Pos(), nil)
+}
+
+func NewDeclPackage(spec ast.Spec, counter *int) *Decl {
+ node, ok := spec.(*ast.ValueSpec)
+ if !ok {
+ base.Errorf("NewDeclPackage(): unsupported package: expecting *ast.ValueSpec, found: %v // %T", spec, spec)
+ }
+
+ var pos token.Pos
+ if len(node.Names) != 0 {
+ pos = node.Names[0].Pos()
+ } else if len(node.Values) != 0 {
+ pos = node.Values[0].Pos()
+ }
+ name := fmt.Sprintf("", *counter)
+ *counter++
+ return NewDecl(Package, name, node, pos, nil)
+}
+
+func NewDeclExpr(node ast.Expr, counter *int) *Decl {
+ name := fmt.Sprintf("", *counter)
+ *counter++
+ return NewDecl(Expr, name, node, node.Pos(), nil)
+}
+
+func NewDeclFunc(kind Kind, name string, node *ast.FuncDecl, deps []string) *Decl {
+ return NewDecl(kind, name, node, node.Name.Pos(), deps)
+}
+
+func NewDeclStmt(node ast.Stmt, counter *int) *Decl {
+ name := fmt.Sprintf("", *counter)
+ *counter++
+ return NewDecl(Stmt, name, node, node.Pos(), nil)
+}
+
+func NewDeclType(node *ast.TypeSpec, deps []string) *Decl {
+ name := node.Name.Name
+ deps = sort_unique_inplace(deps)
+ // support self-referencing types, as for example: type List struct { First int; Rest *List }
+ deps = remove_item_inplace(name, deps)
+
+ return &Decl{Kind: Type, Name: name, Node: node, Deps: deps, Pos: node.Name.Pos()}
+}
+
+func NewDeclVar(ident *ast.Ident, node ast.Spec, typ ast.Expr, value ast.Expr, deps []string) *Decl {
+ decl := NewDecl(Var, ident.Name, node, ident.Pos(), deps)
+ decl.Extra = &Extra{
+ Ident: ident,
+ Type: typ,
+ Value: value,
+ }
+ return decl
+}
+
+func NewDeclVarMulti(ident *ast.Ident, node *ast.ValueSpec, deps []string) *Decl {
+ return NewDecl(VarMulti, ident.Name, node, ident.Pos(), deps)
+}
+
+func (decl *Decl) depSet() set {
+ ret := make(set, len(decl.Deps))
+ for _, dep := range decl.Deps {
+ ret[dep] = void{}
+ }
+ return ret
+}
+
+// remove all dependencies that cannot be resolved, i.e. not present among m
+func (decl *Decl) RemoveUnresolvableDeps(m DeclMap) {
+ decl.Deps = filter_if_inplace(decl.Deps, func(name string) bool {
+ return m[name] != nil
+ })
+}
+
+func (decl *Decl) Fprint(out io.Writer) {
+ fmt.Fprintf(out, "%s%s%s\t%v\n", decl.Name, spaces(decl.Name), decl.Kind, decl)
+}
+
+func (decl *Decl) Print() {
+ decl.Fprint(os.Stdout)
+}
+
+const _spaces = " "
+
+func spaces(name string) string {
+ return _spaces[len(name)%32:]
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/graph.go b/vendor/github.com/cosmos72/gomacro/base/dep/graph.go
new file mode 100644
index 0000000..70d4c99
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/graph.go
@@ -0,0 +1,247 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * graph.go
+ *
+ * Created on: May 03, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/cosmos72/gomacro/base"
+)
+
+func (f *fwdDeclList) add(decl *Decl) {
+ name := decl.Name
+ if _, ok := f.Set[name]; ok {
+ return
+ }
+ fwd := *decl
+ fwd.Kind = TypeFwd
+ f.List = append(f.List, &fwd)
+ f.Set[name] = void{}
+}
+
+const DEBUG_GRAPH = false
+
+func (g *graph) Sort() DeclList {
+ g.RemoveUnresolvableDeps()
+
+ if DEBUG_GRAPH {
+ fmt.Print("---- all decls ----\n")
+ g.Nodes.Print()
+ }
+
+ sorted := make(DeclList, 0, len(g.Nodes))
+ fwd := fwdDeclList{Set: make(set)}
+
+ for len(g.Nodes) != 0 {
+ buf := g.RemoveNodesNoDeps()
+ if len(buf) == 0 {
+ buf = g.RemoveTypeFwd()
+ if len(buf) == 0 {
+ g.circularDependencyError()
+ }
+ }
+ g.RemoveUnresolvableDeps()
+ sorted = append(sorted, buf.SortByPos()...)
+ }
+
+ if len(fwd.List) != 0 {
+ sorted = append(fwd.List, sorted...)
+ }
+ return sorted
+}
+
+// remove from g.Nodes the nodes that have no dependencies and return them.
+// Implementation choice: remove at most a single node -> better preserves source code ordering
+func (g *graph) RemoveNodesNoDeps() DeclList {
+ var ret *Decl
+ for name, decl := range g.Nodes {
+ if len(g.Edges[name]) == 0 {
+ // among nodes with no dependencies, choose the one with smallest Pos
+ if ret == nil || decl.Pos < ret.Pos {
+ ret = decl
+ }
+ }
+ }
+ if ret == nil {
+ return nil
+ }
+ name := ret.Name
+ delete(g.Edges, name)
+ delete(g.Nodes, name)
+ return DeclList{ret}
+}
+
+// remove from g.Edges dependencies that are not in g.Nodes
+func (g *graph) RemoveUnresolvableDeps() {
+ for name := range g.Nodes {
+ if edges, ok := g.Edges[name]; ok {
+ for edge := range edges {
+ if _, ok := g.Nodes[edge]; !ok {
+ // node not in g.Nodes, drop the edge
+ delete(edges, edge)
+ }
+ }
+ }
+ }
+}
+
+// remove from g.Edges dependencies that are in m
+func (g *graph) RemoveDeps(m DeclMap) {
+ for name := range g.Nodes {
+ if edges, ok := g.Edges[name]; ok {
+ for edge := range edges {
+ if _, ok := m[edge]; ok {
+ // node in m, drop the edge
+ delete(edges, edge)
+ }
+ }
+ }
+ }
+}
+
+// for nodes with Kind 'k', remove from g.Edges dependencies that are in m
+func (g *graph) RemoveDepsFor(k Kind, m DeclMap) {
+ for name, decl := range g.Nodes {
+ if decl.Kind != k {
+ continue
+ }
+ if edges, ok := g.Edges[name]; ok {
+ for edge := range edges {
+ if _, ok := m[edge]; ok {
+ // node in m, drop the edge
+ delete(edges, edge)
+ }
+ }
+ }
+ }
+}
+
+// return forward declarations for some types that hopefully break
+// as many circular dependencies as possible
+func (g *graph) RemoveTypeFwd() DeclList {
+ ctx := visitCtx{
+ visiting: make(map[string]int),
+ visited: make(map[string]int),
+ cycleFunc: func(node *Decl, ctx *visitCtx) {
+ ctx.visiting[node.Name]++
+ },
+ }
+ for _, node := range g.Nodes.List().SortByPos().Reverse() {
+ if len(ctx.visited) == len(g.Nodes) {
+ break
+ }
+ g.visit(node, &ctx)
+ }
+ var list DeclList
+ most := 1
+ for name, count := range ctx.visited {
+ decl := g.Nodes[name]
+ if decl == nil || decl.Kind != Type || count < most {
+ continue
+ }
+ if count > most {
+ list = nil // discard types collected so far
+ }
+ most = count
+ list = append(list, decl)
+ }
+ if len(list) == 0 {
+ return nil
+ }
+ // change Kind of returned Decls to TypeFwd
+ for i, e := range list {
+ fwd := *e
+ fwd.Kind = TypeFwd
+ list[i] = &fwd
+ }
+ g.RemoveDepsFor(Type, list.Map())
+ return list
+}
+
+func (g *graph) visit(node *Decl, ctx *visitCtx) {
+ name := node.Name
+ if _, ok := ctx.visited[name]; ok {
+ return
+ }
+ if _, ok := ctx.visiting[name]; ok {
+ if fun := ctx.cycleFunc; fun != nil {
+ fun(node, ctx)
+ }
+ return
+ }
+ if fun := ctx.beforeFunc; fun != nil {
+ fun(node, ctx)
+ }
+ ctx.visiting[name] = 0
+ for name := range g.Edges[name] {
+ if node := g.Nodes[name]; node != nil {
+ g.visit(node, ctx)
+ }
+ }
+ ctx.visited[name] = ctx.visiting[name]
+ delete(ctx.visiting, name)
+ if fun := ctx.afterFunc; fun != nil {
+ fun(node, ctx)
+ }
+}
+
+func (g *graph) circularDependencyError() {
+ var path, cycle []string
+
+ ctx := visitCtx{
+ visiting: make(map[string]int),
+ visited: make(map[string]int),
+ beforeFunc: func(node *Decl, ctx *visitCtx) {
+ path = append(path, node.Name)
+ },
+ afterFunc: func(node *Decl, ctx *visitCtx) {
+ path = path[:len(path)-1]
+ },
+ cycleFunc: func(node *Decl, ctx *visitCtx) {
+ // collect the shortest cycle
+ name := node.Name
+ temp := dup(append(path, name))
+ for len(temp) != 0 {
+ if temp[0] == name {
+ break
+ }
+ temp = temp[1:]
+ }
+ if len(cycle) != 0 && len(temp) >= len(cycle) {
+ return
+ }
+ cycle = temp
+ },
+ }
+ for _, node := range g.Nodes.List().SortByPos() {
+ if len(ctx.visited) == len(g.Nodes) {
+ break
+ }
+ g.visit(node, &ctx)
+ }
+
+ var buf strings.Builder
+ buf.WriteString("declaration loop\n")
+
+ if len(cycle) != 0 {
+ for i, name := range cycle[1:] {
+ fmt.Fprintf(&buf, "\t%s uses %s\n", cycle[i], name)
+ }
+ }
+ base.Errorf("%s", buf.String())
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/scope.go b/vendor/github.com/cosmos72/gomacro/base/dep/scope.go
new file mode 100644
index 0000000..136e968
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/scope.go
@@ -0,0 +1,406 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * loader.go
+ *
+ * Created on: May 03, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+import (
+ "fmt"
+ "go/ast"
+ "go/token"
+ "strconv"
+ "strings"
+
+ "github.com/cosmos72/gomacro/ast2"
+ "github.com/cosmos72/gomacro/base"
+)
+
+func (s *Scope) Ast(form ast2.Ast) []string {
+ var deps []string
+ switch form := form.(type) {
+ case nil:
+ case ast2.AstWithNode:
+ deps = s.Node(form.Node())
+ case ast2.AstWithSlice:
+ n := form.Size()
+ for i := 0; i < n; i++ {
+ deps = append(deps, s.Ast(form.Get(i))...)
+ }
+ default:
+ base.Errorf("Scope.Ast(): unsupported ast2.Ast node, expecting ast2.AstWithNode or ast2.AstWithSlice, found %v // %T", form, form)
+ }
+ return deps
+}
+
+func (s *Scope) Nodes(nodes []ast.Node) {
+ s.Ast(ast2.NodeSlice{nodes})
+}
+
+func (s *Scope) Node(node ast.Node) []string {
+ var deps []string
+ switch node := node.(type) {
+ case nil:
+ case ast.Decl:
+ deps = s.Decl(node)
+ case ast.Expr:
+ s.add(NewDeclExpr(node, &s.Gensym))
+ case ast.Stmt:
+ s.add(NewDeclStmt(node, &s.Gensym))
+ case *ast.File:
+ deps = s.File(node)
+ default:
+ base.Errorf("Scope.Ast(): unsupported node type, expecting ast.Decl, ast.Expr, ast.Stmt or *ast.File, found %v // %T", node, node)
+ }
+ return sort_unique_inplace(deps)
+}
+
+func (s *Scope) Decl(node ast.Node) []string {
+ var deps []string
+ switch node := node.(type) {
+ case nil:
+ case *ast.GenDecl:
+ deps = s.GenDecl(node)
+ case *ast.FuncDecl:
+ deps = s.Func(node)
+ default:
+ base.Errorf("Scope.Decl(): unsupported declaration, expecting *ast.GenDecl or *ast.FuncDecl, found: %v // %T", node, node)
+ }
+ return deps
+}
+
+func (s *Scope) File(node *ast.File) []string {
+ var deps []string
+ if node != nil {
+ for _, decl := range node.Decls {
+ deps = append(deps, s.Decl(decl)...)
+ }
+ }
+ return deps
+}
+
+// for consts that inherit type and initializers from a previous *ast.ValueSpec
+type ConstDeps struct {
+ Type ast.Expr
+ TypeDeps []string
+ Values []ast.Expr
+ ValueDeps [][]string
+}
+
+func (s *Scope) GenDecl(node *ast.GenDecl) []string {
+ var deps []string
+ switch node.Tok {
+ case token.CONST:
+ var defaults ConstDeps
+ iota := 0
+ for _, spec := range node.Specs {
+ deps = append(deps, s.Consts(spec, iota, &defaults)...)
+ iota++
+ }
+ case token.IMPORT:
+ for _, spec := range node.Specs {
+ s.Import(spec)
+ }
+ case token.PACKAGE:
+ for _, spec := range node.Specs {
+ s.Package(spec)
+ }
+ case token.TYPE:
+ for _, spec := range node.Specs {
+ deps = append(deps, s.Type(spec)...)
+ }
+ case token.VAR:
+ for _, spec := range node.Specs {
+ deps = append(deps, s.Vars(spec)...)
+ }
+ default:
+ base.Errorf("Scope.GenDecl(): unsupported declaration kind, expecting token.IMPORT, token.PACKAGE, token.CONST, token.TYPE or token.VAR, found %v: %v // %T",
+ node.Tok, node, node)
+ }
+ return deps
+}
+
+// constants
+func (s *Scope) Consts(node ast.Spec, iota int, defaults *ConstDeps) []string {
+ var deps []string
+
+ if node, ok := node.(*ast.ValueSpec); ok {
+ if node.Type != nil && node.Values == nil {
+ base.Errorf("const declaration cannot have type without expression: %v // %T", node, node)
+ }
+ // if expressions are omitted, they default to the last ones found (with their type, if any)
+ if node.Type != nil || node.Values != nil {
+ defaults.Type = node.Type
+ defaults.TypeDeps = s.Expr(node.Type)
+ deps = append(deps, defaults.TypeDeps...)
+
+ defaults.Values = node.Values
+ defaults.ValueDeps = s.Exprs(node.Values)
+ for _, list := range defaults.ValueDeps {
+ deps = append(deps, list...)
+ }
+ }
+ if len(defaults.Values) != len(node.Names) {
+ base.Errorf("%d consts initialized with %d expressions: %v %v = %v",
+ len(node.Names), len(defaults.Values), node.Names, defaults.Type, defaults.Values)
+ }
+ var declNode ast.Spec
+ if len(node.Names) == 1 {
+ declNode = node
+ }
+ for i, ident := range node.Names {
+ var value ast.Expr
+ deps := defaults.TypeDeps
+ if i < len(defaults.Values) {
+ value = defaults.Values[i]
+ deps = append(dup(deps), defaults.ValueDeps[i]...)
+ }
+ s.Const(ident, declNode, iota, defaults.Type, value, deps)
+ }
+ } else {
+ base.Errorf("unsupported constant declaration: expecting *ast.ValueSpec, found: %v // %T", node, node)
+ }
+ return deps
+}
+
+// constant
+func (s *Scope) Const(ident *ast.Ident, node ast.Spec, iota int, typ ast.Expr, value ast.Expr, deps []string) *Decl {
+ decl := NewDecl(Const, ident.Name, node, ident.Pos(), deps)
+ decl.Extra = &Extra{
+ Ident: ident,
+ Type: typ,
+ Value: value,
+ Iota: iota,
+ }
+ return s.add(decl)
+}
+
+func unquote(src string) string {
+ ret, err := strconv.Unquote(src)
+ if err != nil && len(src) >= 2 {
+ if ch := src[0]; ch == src[len(src)-1] && (ch == '\'' || ch == '"' || ch == '`') {
+ ret = src[1 : len(src)-1]
+ } else {
+ ret = src
+ }
+ }
+ return ret
+}
+
+func basename(path string) string {
+ return path[1+strings.LastIndexByte(path, '/'):]
+}
+
+// import
+func (s *Scope) Import(node ast.Spec) {
+ s.add(NewDeclImport(node, &s.Gensym))
+}
+
+// package
+func (s *Scope) Package(node ast.Spec) {
+ s.add(NewDeclPackage(node, &s.Gensym))
+}
+
+// variables
+func (s *Scope) Vars(node ast.Spec) []string {
+ var alldeps []string
+ if node, ok := node.(*ast.ValueSpec); ok {
+ if len(node.Names) > 1 && len(node.Values) == 1 {
+ return s.varsMultiValueExpr(node)
+ }
+ if len(node.Values) != 0 && len(node.Names) != len(node.Values) {
+ base.Errorf("%d vars initialized with %d expressions: %v", len(node.Names), len(node.Values), node)
+ }
+ typDeps := s.Expr(node.Type)
+ alldeps = append(alldeps, typDeps...)
+ var declNode ast.Spec
+ if len(node.Names) == 1 {
+ declNode = node
+ }
+ for i, ident := range node.Names {
+ deps := typDeps
+ var value ast.Expr
+ if i < len(node.Values) {
+ value = node.Values[i]
+ valueDeps := s.Expr(value)
+ alldeps = append(alldeps, valueDeps...)
+ if len(valueDeps) != 0 {
+ deps = append(dup(typDeps), valueDeps...)
+ }
+ }
+ s.Var(ident, declNode, node.Type, value, deps)
+ }
+ } else {
+ base.Errorf("Scope.Vars(): unsupported variable declaration: expecting *ast.ValueSpec, found: %v // %T", node, node)
+ }
+ return alldeps
+}
+
+func (s *Scope) varsMultiValueExpr(node *ast.ValueSpec) []string {
+ deps := append(s.Expr(node.Type), s.Expr(node.Values[0])...)
+ for _, ident := range node.Names {
+ s.add(NewDeclVarMulti(ident, node, deps))
+ node = nil // store node only in the first VarMulti
+ }
+ return deps
+}
+
+// variable
+func (s *Scope) Var(ident *ast.Ident, node ast.Spec, typ ast.Expr, value ast.Expr, deps []string) *Decl {
+ return s.add(NewDeclVar(ident, node, typ, value, deps))
+}
+
+// function or method
+func (s *Scope) Func(node *ast.FuncDecl) []string {
+ inner := NewScope(s)
+
+ name := node.Name.Name
+ deps := inner.Expr(node.Type)
+
+ kind := Func
+ if node.Recv != nil && len(node.Recv.List) != 0 {
+ types := inner.Expr(node.Recv)
+ // method names are not global!
+ // without this, a method Foo.String would overwrite a func String in s.Decls[]
+ //
+ // also makes it impossible to depend on a method, but nothing can depend on a method,
+ // Except the constant returned by unsafe.Sizeof(type.method),
+ // but we do not support unsafe.Sizeof() yet and all methods have the same size anyway
+ if len(types) == 1 {
+ name = fmt.Sprintf("%s.%s", types[0], name)
+ } else {
+ name = fmt.Sprintf("%d.%s", s.Gensym, name)
+ s.Gensym++
+ }
+
+ deps = append(deps, types...)
+ kind = Method
+ }
+ // support recursive functions
+ s.Decls[name] = &Decl{Kind: kind, Name: name}
+
+ // check function body for global constants, types, variables!
+ deps = append(deps, inner.Expr(node.Body)...)
+
+ s.add(NewDeclFunc(kind, name, node, deps))
+ return deps
+}
+
+// type
+func (s *Scope) Type(node ast.Spec) []string {
+ var deps []string
+ if node, ok := node.(*ast.TypeSpec); ok {
+ deps = s.Expr(node.Type)
+
+ s.add(NewDeclType(node, deps))
+ } else {
+ base.Errorf("Scope.Type(): unexpected declaration type, expecting *ast.TypeSpec, found: %v // %T", node, node)
+ }
+ return deps
+}
+
+func (s *Scope) Expr(node ast.Node) []string {
+ if node == nil {
+ return nil
+ }
+ return s.AstExpr(ast2.ToAst(node))
+}
+
+func (s *Scope) Exprs(list []ast.Expr) [][]string {
+ n := len(list)
+ if n == 0 {
+ return nil
+ }
+ deps := make([][]string, n)
+ for i, expr := range list {
+ deps[i] = s.Expr(expr)
+ }
+ return deps
+}
+
+func (s *Scope) AstExpr(in ast2.Ast) []string {
+ if in == nil {
+ return nil
+ }
+ var deps []string
+ switch node := in.Interface().(type) {
+ case *ast.FuncLit:
+ deps = append(deps, s.Expr(node.Type)...)
+ in = ast2.BlockStmt{node.Body}
+ // open a new scope
+ s = NewScope(s)
+ case *ast.BlockStmt, *ast.FuncType, *ast.InterfaceType, *ast.StructType:
+ // open a new scope
+ s = NewScope(s)
+ case *ast.KeyValueExpr:
+ // ignore the key if it's an ast.Ident
+ // FIXME this is correct for struct initializers only
+ if _, ok := node.Key.(*ast.Ident); !ok {
+ deps = append(deps, s.Expr(node.Key)...)
+ }
+ in = ast2.ToAst(node.Value)
+ case ast.Decl:
+ return s.Decl(node)
+ case *ast.SelectorExpr:
+ return s.selectorExpr(node)
+ case *ast.Field:
+ // declare field names and compute dependencies for their type
+ deps = append(deps, s.Expr(node.Type)...)
+ for _, ident := range node.Names {
+ s.Var(ident, nil, node.Type, nil, deps)
+ }
+ return deps
+ }
+ if form, ok := in.(ast2.Ident); ok && form.X != nil && !s.isLocal(form.X.Name) {
+ deps = append(deps, form.X.Name)
+ }
+
+ for i, n := 0, in.Size(); i < n; i++ {
+ form := in.Get(i)
+ if form != nil {
+ deps = append(deps, s.AstExpr(form)...)
+ }
+ }
+ return sort_unique_inplace(deps)
+}
+
+// return true if name refers to a local declaration
+func (s *Scope) isLocal(name string) bool {
+ outer := s.Outer
+ // outer == nil is top-level scope: not local
+ for ; outer != nil; s = outer {
+ if _, ok := s.Decls[name]; ok {
+ return true
+ }
+ outer = outer.Outer
+ }
+ return false
+}
+
+// compute dependencies for: package.symbol, type.method, type.field.
+// only the part *before* the dot may be a local declaration,
+// but dependency from type.method is stronger than dependency from type,
+// so keep both
+func (s *Scope) selectorExpr(node *ast.SelectorExpr) []string {
+ deps := s.Expr(node.X)
+ if typ, ok := node.X.(*ast.Ident); ok && typ != nil && !s.isLocal(typ.Name) {
+ deps = append(deps, typ.Name+"."+node.Sel.Name)
+ }
+ return deps
+}
+
+func (s *Scope) add(decl *Decl) *Decl {
+ s.Decls[decl.Name] = decl
+ return decl
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/sorter.go b/vendor/github.com/cosmos72/gomacro/base/dep/sorter.go
new file mode 100644
index 0000000..0304a1e
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/sorter.go
@@ -0,0 +1,202 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * sorter.go
+ *
+ * Created on: May 03, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+import (
+ "go/ast"
+ "go/token"
+
+ "github.com/cosmos72/gomacro/ast2"
+)
+
+func (s *Sorter) LoadNode(node ast.Node) {
+ s.LoadAst(ast2.ToAst(node))
+}
+
+func (s *Sorter) LoadNodes(nodes []ast.Node) {
+ s.LoadAst(ast2.NodeSlice{nodes})
+}
+
+func (s *Sorter) LoadAst(form ast2.Ast) {
+ s.queue = ast2.ToNodesAppend(s.queue, form)
+}
+
+// return one of:
+// * a list of imports
+// * a list of declarations
+// * a list of expressions and statements
+func (s *Sorter) Some() DeclList {
+
+ decls := s.popPackages()
+ if len(decls) == 0 {
+ decls = s.popImports()
+ }
+ if len(decls) == 0 {
+ decls = s.popDecls()
+ }
+ if len(decls) == 0 {
+ decls = s.popStmts()
+ }
+ return decls
+}
+
+func (s *Sorter) All() DeclList {
+ var all DeclList
+
+ for {
+ decls := s.Some()
+ if len(decls) == 0 {
+ break
+ }
+ all = append(all, decls...)
+ }
+ return all
+}
+
+func (s *Sorter) popPackages() []*Decl {
+ var list DeclList
+ i, n := 0, len(s.queue)
+loop:
+ for ; i < n; i++ {
+ node := s.queue[i]
+ switch node := node.(type) {
+ case nil:
+ continue
+ case *ast.GenDecl:
+ if node != nil && node.Tok == token.PACKAGE {
+ for _, spec := range node.Specs {
+ list = append(list, NewDeclPackage(spec, &s.scope.Gensym))
+ }
+ continue
+ }
+ }
+ // /*DELETEME*/ fmt.Printf("popPackages stopping at node: %v %T\n", node, node)
+ break loop
+ }
+ if i > 0 {
+ s.queue = s.queue[i:]
+ }
+ if len(list) == 0 {
+ return nil
+ }
+ return list.SortByPos()
+}
+
+func (s *Sorter) popImports() []*Decl {
+ var list DeclList
+ i, n := 0, len(s.queue)
+loop:
+ for ; i < n; i++ {
+ node := s.queue[i]
+ switch node := node.(type) {
+ case nil:
+ continue
+ case *ast.GenDecl:
+ if node != nil && node.Tok == token.IMPORT {
+ for _, spec := range node.Specs {
+ list = append(list, NewDeclImport(spec, &s.scope.Gensym))
+ }
+ continue
+ }
+ }
+ // /*DELETEME*/ fmt.Printf("popImports stopping at node: %v %T\n", node, node)
+ break loop
+ }
+ if i > 0 {
+ s.queue = s.queue[i:]
+ }
+ if len(list) == 0 {
+ return nil
+ }
+ return list.SortByPos()
+}
+
+func (s *Sorter) popDecls() []*Decl {
+ var nodes []ast.Node
+ i, n := 0, len(s.queue)
+loop:
+ for ; i < n; i++ {
+ node := s.queue[i]
+ switch node := node.(type) {
+ case nil:
+ continue
+ case *ast.GenDecl:
+ if node != nil && node.Tok != token.IMPORT && node.Tok != token.PACKAGE {
+ nodes = append(nodes, node)
+ continue
+ }
+ case ast.Decl:
+ if node != nil {
+ nodes = append(nodes, node)
+ continue
+ }
+ }
+ // /*DELETEME*/ fmt.Printf("popDecls stopping at node: %v %T\n", node, node)
+ break loop
+ }
+ if i > 0 {
+ s.queue = s.queue[i:]
+ }
+ if len(nodes) == 0 {
+ return nil
+ }
+ s.scope.Decls = make(map[string]*Decl)
+
+ s.scope.Nodes(nodes)
+ s.scope.Decls.RemoveUnresolvableDeps()
+ m := s.scope.Decls.Dup()
+
+ s.scope.Decls = nil
+
+ g := graph{
+ Nodes: m,
+ Edges: m.depMap(),
+ }
+ return g.Sort()
+}
+
+func (s *Sorter) popStmts() []*Decl {
+ var list DeclList
+ i, n := 0, len(s.queue)
+loop:
+ for ; i < n; i++ {
+ node := s.queue[i]
+ switch node := node.(type) {
+ case nil:
+ continue
+ case ast.Expr:
+ if node != nil {
+ list = append(list, NewDeclExpr(node, &s.scope.Gensym))
+ continue
+ }
+ case ast.Stmt:
+ if node != nil {
+ list = append(list, NewDeclStmt(node, &s.scope.Gensym))
+ continue
+ }
+ }
+ // /*DELETEME*/ fmt.Printf("popStmts stopping at node: %v %T\n", node, node)
+ break loop
+ }
+ if i > 0 {
+ s.queue = s.queue[i:]
+ }
+ if len(list) == 0 {
+ return nil
+ }
+ return list.SortByPos()
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/util.go b/vendor/github.com/cosmos72/gomacro/base/dep/util.go
new file mode 100644
index 0000000..5e87c9c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/util.go
@@ -0,0 +1,79 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * util.go
+ *
+ * Created on: May 03, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+import (
+ "sort"
+)
+
+// keep only items satisfying pred(item).
+// destructively modifies list.
+func filter_if_inplace(list []string, pred func(string) bool) []string {
+ out := 0
+ for _, e := range list {
+ if pred(e) {
+ list[out] = e
+ out++
+ }
+ }
+ return list[:out]
+}
+
+// remove all strings equal to 'str' from list
+// destructively modifies list.
+func remove_item_inplace(str string, list []string) []string {
+ out := 0
+ for _, e := range list {
+ if e != str {
+ list[out] = e
+ out++
+ }
+ }
+ return list[:out]
+}
+
+// make a copy of list
+func dup(list []string) []string {
+ if len(list) == 0 {
+ return nil
+ }
+ ret := make([]string, len(list))
+ copy(ret, list)
+ return ret
+}
+
+// sort and remove duplicates from lists
+func sort_unique_inplace(list []string) []string {
+ if len(list) <= 1 {
+ return list
+ }
+ sort.Strings(list)
+
+ prev := list[0]
+ out := 1
+
+ // remove duplicates
+ for _, e := range list[1:] {
+ if e == prev {
+ continue
+ }
+ prev = e
+ list[out] = e
+ out++
+ }
+ return list[:out]
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/z_test.go b/vendor/github.com/cosmos72/gomacro/base/dep/z_test.go
new file mode 100644
index 0000000..630fc2c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/z_test.go
@@ -0,0 +1,102 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * z_test.go
+ *
+ * Created on: May 03, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package dep
+
+import (
+ "fmt"
+ "io/ioutil"
+ "reflect"
+ "testing"
+
+ "github.com/cosmos72/gomacro/parser"
+ "github.com/cosmos72/gomacro/token"
+)
+
+func TestRemoveItem(t *testing.T) {
+ list := []string{"Env", "Stmt"}
+ out := remove_item_inplace("Stmt", list)
+ expect := []string{"Env"}
+ if !reflect.DeepEqual(out, expect) {
+ t.Errorf("expected %v, actual %v", expect, out)
+ }
+}
+
+func TestSortUnique1(t *testing.T) {
+ in := []string{"c", "a", "c", "b", "a", "b", "x"}
+ expect := []string{"a", "b", "c", "x"}
+ _testSortUnique(t, in, expect)
+}
+
+func TestSortUnique2(t *testing.T) {
+ in := []string{"Debugger", "Env", "IrGlobals", "Stmt", "Stmt", "poolCapacity"}
+ expect := []string{"Debugger", "Env", "IrGlobals", "Stmt", "poolCapacity"}
+ _testSortUnique(t, in, expect)
+}
+
+func _testSortUnique(t *testing.T, in []string, expect []string) {
+ out := sort_unique_inplace(in)
+ if !reflect.DeepEqual(out, expect) {
+ t.Errorf("expected %v, actual %v", expect, out)
+ }
+}
+
+func TestSorter(t *testing.T) {
+ tests := []struct {
+ Name string
+ Path string
+ }{
+ {"api", "api.go"},
+ {"z_test_data_1", "z_test_data_1.txt"},
+ {"z_test_data_2", "z_test_data_2.txt"},
+ {"z_test_data_3", "z_test_data_3.txt"},
+ {"fast_global", "../../fast/global.go"},
+ }
+ for _, test := range tests {
+ t.Run(test.Name, func(t *testing.T) {
+ _testSorter(t, test.Path)
+ })
+ }
+}
+
+func _testSorter(t *testing.T, filename string) {
+ bytes, err := ioutil.ReadFile(filename)
+ if err != nil {
+ t.Errorf("read file %q failed: %v", filename, err)
+ return
+ }
+
+ var p parser.Parser
+ fset := token.NewFileSet()
+ p.Init(fset, filename, 0, bytes)
+
+ nodes, err := p.Parse()
+ if err != nil {
+ t.Errorf("parse file %q failed: %v", filename, err)
+ return
+ }
+ s := NewSorter()
+ s.LoadNodes(nodes)
+
+ for {
+ sorted := s.Some()
+ if len(sorted) == 0 {
+ break
+ }
+ fmt.Print("---- sorted decls ----\n")
+ sorted.Print()
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_1.txt b/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_1.txt
new file mode 100644
index 0000000..84f76ec
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_1.txt
@@ -0,0 +1,72 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * global.go
+ *
+ * Created on Apr 01, 2017
+ * Author Massimiliano Ghilardi
+ */
+
+package fast
+
+import (
+ "go/token"
+ r "reflect"
+
+ xr "github.com/cosmos72/gomacro/xreflect"
+)
+
+// ================================== Comp, Env =================================
+
+// Stmt represents a statement in the fast interpreter
+type Stmt func(*Env) (Stmt, *Env)
+
+type Code struct {
+ List []Stmt
+}
+
+type DebugOp struct {
+}
+
+// Run contains per-goroutine interpreter runtime bookeeping information
+type Run struct {
+ CurrEnv *Env // caller of current function. used ONLY at function entry to build call stack
+ InstallDefer func() // defer function to be installed
+ DeferOfFun *Env // function whose defer are running
+ PanicFun *Env // the currently panicking function
+ Panic interface{} // current panic. needed for recover()
+ Debugger Debugger
+ PoolSize int
+ Pool [poolCapacity]*Env
+}
+
+// Comp is a tree-of-closures builder: it transforms ast.Nodes into closures
+// for faster execution. Consider it a poor man's compiler (hence the name)
+type Comp struct {
+ Code Code // "compiled" code
+ Outer *Comp
+}
+
+// ================================= Env =================================
+
+type EnvBinds struct {
+ Vals []r.Value
+ Ints []uint64
+}
+
+// Env is the interpreter's runtime environment
+type Env struct {
+ EnvBinds
+ Outer *Env
+ IP int
+ Code []Stmt
+ Run *Run
+ DebugComp *Comp // for debugging interpreted code: compiler with Binds, and to rebuild an Interp if needed
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_2.txt b/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_2.txt
new file mode 100644
index 0000000..c1b8ffe
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_2.txt
@@ -0,0 +1,19 @@
+package test
+
+import "fmt"
+
+fmt.Println("Hello, World!")
+
+var c = []int{0:a, 1:b}
+
+var a, b = pair(2, 3)
+
+func pair(a, b int) (int, int) {
+ return a, b
+}
+
+println(pair(a,b))
+
+if a < b {
+ fmt.Println("a < b")
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_3.txt b/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_3.txt
new file mode 100644
index 0000000..ccb39c8
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/dep/z_test_data_3.txt
@@ -0,0 +1,3 @@
+var i, j, k int; for i=1; i<=2; i=i+1 { if i<2 {j=i} else {k=i} }; i
+
+var a, b = b, 5
diff --git a/vendor/github.com/cosmos72/gomacro/base/genimport.go b/vendor/github.com/cosmos72/gomacro/base/genimport.go
index 46d743f..9d28113 100644
--- a/vendor/github.com/cosmos72/gomacro/base/genimport.go
+++ b/vendor/github.com/cosmos72/gomacro/base/genimport.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* import_wrappers.go
@@ -41,10 +32,11 @@ type genimport struct {
gpkg *types.Package
scope *types.Scope
names []string
+ pkgrenames map[string]string // map[path]name of packages to import, where name:s are guaranteed to be unique
out *bytes.Buffer
path string
name, name_ string
- suffix string
+ proxyprefix string
reflect string
}
@@ -78,7 +70,7 @@ func (g *Globals) newGenImport(out *bytes.Buffer, path string, gpkg *types.Packa
gen := &genimport{globals: g, mode: mode, gpkg: gpkg, scope: scope, names: names, out: out, path: path}
- name := path[1+strings.LastIndexByte(path, '/'):]
+ name := FileName(path)
name = sanitizeIdentifier(name)
gen.name = name
@@ -87,8 +79,10 @@ func (g *Globals) newGenImport(out *bytes.Buffer, path string, gpkg *types.Packa
} else {
gen.name_ = name + "."
}
- if mode != ImSharedLib {
- gen.suffix = fmt.Sprintf("_%s", sanitizeIdentifier(path))
+ if mode == ImPlugin {
+ gen.proxyprefix = "P_"
+ } else {
+ gen.proxyprefix = fmt.Sprintf("P_%s_", sanitizeIdentifier(path))
}
return gen
}
@@ -103,11 +97,7 @@ func (gen *genimport) write() {
gen.writeUntypeds()
gen.writeWrappers()
- if gen.mode == ImSharedLib {
- gen.out.WriteString("\n}\n")
- } else {
- gen.out.WriteString("\n\t}\n}\n")
- }
+ gen.out.WriteString("\n\t}\n}\n")
gen.writeInterfaceProxies()
}
@@ -117,16 +107,11 @@ type mapdecl struct {
foot string
}
-func (gen *genimport) mapdecl(head, althead string) mapdecl {
- var foot string
- if gen.mode == ImSharedLib {
- foot = "nil"
- } else if strings.IndexByte(althead, '%') < 0 {
- head = althead
- } else {
- head = fmt.Sprintf(althead, gen.reflect)
+func (gen *genimport) mapdecl(head string) mapdecl {
+ if strings.IndexByte(head, '%') >= 0 {
+ head = fmt.Sprintf(head, gen.reflect)
}
- return mapdecl{gen.out, head, foot}
+ return mapdecl{gen.out, head, ""}
}
func (d *mapdecl) header() {
@@ -138,15 +123,26 @@ func (d *mapdecl) header() {
}
}
-func (d *mapdecl) footer(more bool) {
+func (d *mapdecl) footer() {
if len(d.foot) != 0 {
d.out.WriteString(d.foot)
- if more {
+ d.out.WriteString(", ")
+ }
+}
+
+func (d *mapdecl) footer1(comma bool) {
+ if len(d.foot) != 0 {
+ d.out.WriteString(d.foot)
+ if comma {
d.out.WriteString(", ")
}
}
}
+func (gen *genimport) collectPackageImportsWithRename(requireAllInterfaceMethodsExported bool) {
+ gen.pkgrenames = gen.globals.CollectPackageImportsWithRename(gen.gpkg, requireAllInterfaceMethodsExported)
+}
+
func (gen *genimport) writePreamble() {
mode := gen.mode
out := gen.out
@@ -157,11 +153,13 @@ func (gen *genimport) writePreamble() {
case ImBuiltin:
alias = "_b "
filepkg = "imports"
+ case ImThirdParty:
+ filepkg = "thirdparty"
+ case ImPlugin:
+ filepkg = "main"
case ImInception:
alias = "_i "
filepkg = gen.name
- default:
- filepkg = "main"
}
fmt.Fprintf(gen.out, `// this file was generated by gomacro command: import %s%q
@@ -178,31 +176,45 @@ import (`, alias, path, filepkg)
} else {
fmt.Fprintf(out, "\n\t. \"reflect\"")
}
- for _, str := range gen.globals.CollectPackageImports(gen.gpkg, true) {
- if mode != ImInception || str != path {
- fmt.Fprintf(out, "\n\t%q", str)
+ gen.collectPackageImportsWithRename(true)
+ for path, name := range gen.pkgrenames {
+ if mode == ImInception && path == gen.path {
+ continue // writing inside the package: it should not import itself
+ } else if name == FileName(path) {
+ fmt.Fprintf(out, "\n\t%q", path)
+ } else {
+ fmt.Fprintf(out, "\n\t%s %q", name, path)
}
}
fmt.Fprintf(out, "\n)\n")
- if mode == ImSharedLib {
+ if mode == ImPlugin {
fmt.Fprint(out, `
+type Package = struct {
+ Binds map[string]Value
+ Types map[string]Type
+ Proxies map[string]Type
+ Untypeds map[string]string
+ Wrappers map[string][]string
+}
+
+var Packages = make(map[string]Package)
+
func main() {
}
-func Exports() (map[string]Value, map[string]Type, map[string]Type, map[string]string, map[string][]string) {
- return `)
- } else {
- fmt.Fprintf(out, `
+`)
+ }
+
+ fmt.Fprintf(out, `
// reflection: allow interpreted code to import %q
func init() {
%sPackages[%q] = %sPackage{
`, path, imports, path, imports)
- }
}
func (gen *genimport) writeBinds() {
- d := gen.mapdecl("map[string]Value", "Binds: map[string]%sValue")
+ d := gen.mapdecl("Binds: map[string]%sValue")
for _, name := range gen.names {
if obj := gen.scope.Lookup(name); obj.Exported() {
@@ -211,7 +223,7 @@ func (gen *genimport) writeBinds() {
val := obj.Val()
var conv1, conv2 string
if t, ok := obj.Type().(*types.Basic); ok && t.Info()&types.IsUntyped != 0 {
- // untyped constants have arbitrary precision... they may overflow integers
+ // untyped constants have arbitrary precision... they may overflow integers.
// this is just an approximation, use Package.Untypeds for exact value
if val.Kind() == constant.Int {
str := val.ExactString()
@@ -229,11 +241,11 @@ func (gen *genimport) writeBinds() {
}
}
}
- d.footer(true)
+ d.footer()
}
func (gen *genimport) writeTypes() {
- d := gen.mapdecl("map[string]Type", "Types: map[string]%sType")
+ d := gen.mapdecl("Types: map[string]%sType")
for _, name := range gen.names {
if obj := gen.scope.Lookup(name); obj.Exported() {
@@ -244,32 +256,33 @@ func (gen *genimport) writeTypes() {
}
}
}
- d.footer(true)
+ d.footer()
}
func (gen *genimport) writeProxies() {
- d := gen.mapdecl("map[string]Type", "Proxies: map[string]%sType")
+ d := gen.mapdecl("Proxies: map[string]%sType")
for _, name := range gen.names {
if obj := gen.scope.Lookup(name); obj.Exported() {
if t := extractInterface(obj, true); t != nil {
d.header()
- fmt.Fprintf(gen.out, "\n\t\t%q:\t%sTypeOf((*%s%s)(nil)).Elem(),", name, gen.reflect, name, gen.suffix)
+ fmt.Fprintf(gen.out, "\n\t\t%q:\t%sTypeOf((*%s%s)(nil)).Elem(),", name, gen.reflect, gen.proxyprefix, name)
}
}
}
- d.footer(true)
+ d.footer()
}
func (gen *genimport) writeUntypeds() {
- d := gen.mapdecl("map[string]string", "Untypeds: map[string]string")
+ d := gen.mapdecl("Untypeds: map[string]string")
for _, name := range gen.names {
if obj := gen.scope.Lookup(name); obj.Exported() {
switch obj := obj.(type) {
case *types.Const:
if t, ok := obj.Type().(*types.Basic); ok && t.Info()&types.IsUntyped != 0 {
- str := MarshalUntyped(t.Kind(), obj.Val())
+ rkind := UntypedKindToReflectKind(t.Kind())
+ str := MarshalUntyped(rkind, obj.Val())
if len(str) != 0 {
d.header()
fmt.Fprintf(gen.out, "\n\t\t%q:\t%q,", name, str)
@@ -278,11 +291,12 @@ func (gen *genimport) writeUntypeds() {
}
}
}
- d.footer(true)
+ d.footer()
}
+// find wrapper methods and write them. needed for accurate method selection.
func (gen *genimport) writeWrappers() {
- d := gen.mapdecl("map[string][]string", "Wrappers: map[string][]string")
+ d := gen.mapdecl("Wrappers: map[string][]string")
for _, name := range gen.names {
if obj := gen.scope.Lookup(name); obj.Exported() {
@@ -305,15 +319,16 @@ func (gen *genimport) writeWrappers() {
}
}
}
- d.footer(false)
+ d.footer()
}
+// write proxies that pre-implement package's interfaces
func (gen *genimport) writeInterfaceProxies() {
path := gen.gpkg.Path()
for _, name := range gen.names {
obj := gen.scope.Lookup(name)
if t := extractInterface(obj, true); t != nil {
- writeInterfaceProxy(gen.out, path, gen.suffix, name, t)
+ gen.writeInterfaceProxy(path, name, t)
}
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/base/genimport_proxy.go b/vendor/github.com/cosmos72/gomacro/base/genimport_proxy.go
index 38768a0..3e6994a 100644
--- a/vendor/github.com/cosmos72/gomacro/base/genimport_proxy.go
+++ b/vendor/github.com/cosmos72/gomacro/base/genimport_proxy.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* genimport_proxy.go
@@ -26,10 +17,8 @@
package base
import (
- "bytes"
"fmt"
"go/types"
- "strings"
)
type writeTypeOpts int
@@ -40,24 +29,24 @@ const (
writeIncludeParamTypes
)
-func writeInterfaceProxy(out *bytes.Buffer, pkgPath string, pkgSuffix string, name string, t *types.Interface) {
- fmt.Fprintf(out, "\n// --------------- proxy for %s.%s ---------------\ntype %s%s struct {", pkgPath, name, name, pkgSuffix)
- writeInterfaceMethods(out, pkgSuffix, name, t, writeMethodsAsFields)
- out.WriteString("\n}\n")
- writeInterfaceMethods(out, pkgSuffix, name, t, writeForceParamNames)
+func (gen *genimport) writeInterfaceProxy(pkgPath string, name string, t *types.Interface) {
+ fmt.Fprintf(gen.out, "\n// --------------- proxy for %s.%s ---------------\ntype %s%s struct {", pkgPath, name, gen.proxyprefix, name)
+ gen.writeInterfaceMethods(name, t, writeMethodsAsFields)
+ gen.out.WriteString("\n}\n")
+ gen.writeInterfaceMethods(name, t, writeForceParamNames)
}
-func writeInterfaceMethods(out *bytes.Buffer, pkgSuffix string, name string, t *types.Interface, opts writeTypeOpts) {
+func (gen *genimport) writeInterfaceMethods(name string, t *types.Interface, opts writeTypeOpts) {
if opts&writeMethodsAsFields != 0 {
- fmt.Fprint(out, "\n\tObject\tinterface{}") // will be used to retrieve object wrapped in the proxy
+ fmt.Fprint(gen.out, "\n\tObject\tinterface{}") // will be used to retrieve object wrapped in the proxy
}
n := t.NumMethods()
for i := 0; i < n; i++ {
- writeInterfaceMethod(out, pkgSuffix, name, t.Method(i), opts)
+ gen.writeInterfaceMethod(name, t.Method(i), opts)
}
}
-func writeInterfaceMethod(out *bytes.Buffer, pkgSuffix string, interfaceName string, method *types.Func, opts writeTypeOpts) {
+func (gen *genimport) writeInterfaceMethod(interfaceName string, method *types.Func, opts writeTypeOpts) {
if !method.Exported() {
return
}
@@ -65,6 +54,7 @@ func writeInterfaceMethod(out *bytes.Buffer, pkgSuffix string, interfaceName str
if !ok {
return
}
+ out := gen.out
params := sig.Params()
if opts&writeMethodsAsFields != 0 {
var param0 string
@@ -76,12 +66,12 @@ func writeInterfaceMethod(out *bytes.Buffer, pkgSuffix string, interfaceName str
out.WriteString(", ")
}
} else {
- fmt.Fprintf(out, "func (Proxy *%s%s) %s(", interfaceName, pkgSuffix, method.Name())
+ fmt.Fprintf(out, "func (P *%s%s) %s(", gen.proxyprefix, interfaceName, method.Name())
}
results := sig.Results()
- writeTypeTuple(out, params, opts|writeIncludeParamTypes)
+ gen.writeTypeTuple(params, opts|writeIncludeParamTypes)
out.WriteString(") ")
- writeTypeTupleOut(out, results)
+ gen.writeTypeTupleOut(results)
if opts&writeMethodsAsFields != 0 {
return
}
@@ -89,11 +79,11 @@ func writeInterfaceMethod(out *bytes.Buffer, pkgSuffix string, interfaceName str
if results != nil && results.Len() > 0 {
out.WriteString("return ")
}
- fmt.Fprintf(out, "Proxy.%s_(Proxy.Object", method.Name())
+ fmt.Fprintf(out, "P.%s_(P.Object", method.Name())
if params != nil && params.Len() != 0 {
out.WriteString(", ")
}
- writeTypeTuple(out, params, writeForceParamNames)
+ gen.writeTypeTuple(params, writeForceParamNames)
out.WriteString(")\n}\n")
}
@@ -109,45 +99,51 @@ func isNamedTypeTuple(tuple *types.Tuple) bool {
return false
}
-func writeTypeTupleOut(out *bytes.Buffer, tuple *types.Tuple) {
+func (gen *genimport) writeTypeTupleOut(tuple *types.Tuple) {
if tuple == nil || tuple.Len() == 0 {
return
}
+ out := gen.out
ret0 := tuple.At(0)
if tuple.Len() > 1 || len(ret0.Name()) > 0 {
out.WriteString("(")
- writeTypeTuple(out, tuple, writeIncludeParamTypes)
+ gen.writeTypeTuple(tuple, writeIncludeParamTypes)
out.WriteString(")")
} else {
- types.WriteType(out, ret0.Type(), packageNameQualifier)
+ types.WriteType(out, ret0.Type(), gen.packageNameQualifier)
}
}
-func writeTypeTuple(out *bytes.Buffer, tuple *types.Tuple, opts writeTypeOpts) {
+func (gen *genimport) writeTypeTuple(tuple *types.Tuple, opts writeTypeOpts) {
n := tuple.Len()
for i := 0; i < n; i++ {
if i != 0 {
- out.WriteString(", ")
+ gen.out.WriteString(", ")
}
- writeTypeVar(out, tuple.At(i), i, opts)
+ gen.writeTypeVar(tuple.At(i), i, opts)
}
}
-func writeTypeVar(out *bytes.Buffer, v *types.Var, index int, opts writeTypeOpts) {
+func (gen *genimport) writeTypeVar(v *types.Var, index int, opts writeTypeOpts) {
name := v.Name()
if len(name) == 0 && opts&writeForceParamNames != 0 {
name = fmt.Sprintf("unnamed%d", index)
}
+ out := gen.out
out.WriteString(name)
if opts&writeIncludeParamTypes != 0 {
if len(name) != 0 {
out.WriteString(" ")
}
- types.WriteType(out, v.Type(), packageNameQualifier)
+ types.WriteType(out, v.Type(), gen.packageNameQualifier)
}
}
-func packageNameQualifier(pkg *types.Package) string {
+func (gen *genimport) packageNameQualifier(pkg *types.Package) string {
path := pkg.Path()
- return path[1+strings.LastIndexByte(path, '/'):]
+ name, ok := gen.pkgrenames[path]
+ if !ok {
+ name = FileName(path)
+ }
+ return name
}
diff --git a/vendor/github.com/cosmos72/gomacro/base/genimport_untyped.go b/vendor/github.com/cosmos72/gomacro/base/genimport_untyped.go
deleted file mode 100644
index 9727ff6..0000000
--- a/vendor/github.com/cosmos72/gomacro/base/genimport_untyped.go
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * gomacro - A Go interpreter with Lisp-like macros
- *
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * genimport_untyped.go
- *
- * Created on May 27, 2017
- * Author Massimiliano Ghilardi
- */
-
-package base
-
-import (
- "fmt"
- "go/constant"
- "go/token"
- "go/types"
- "strings"
-)
-
-func MarshalUntyped(kind types.BasicKind, val constant.Value) string {
- // untyped constants have arbitrary precision... they may overflow integers
- switch kind {
- case types.UntypedBool:
- if constant.BoolVal(val) {
- return "bool:true"
- } else {
- return "bool:false"
- }
- case types.UntypedInt:
- return fmt.Sprintf("int:%s", val.ExactString())
- case types.UntypedRune:
- return fmt.Sprintf("rune:%s", val.ExactString())
- case types.UntypedFloat:
- return fmt.Sprintf("float:%s", val.ExactString())
- case types.UntypedComplex:
- return fmt.Sprintf("complex:%s:%s", constant.Real(val).ExactString(), constant.Imag(val).ExactString())
- case types.UntypedString:
- return fmt.Sprintf("string:%s", constant.StringVal(val))
- case types.UntypedNil:
- return "nil"
- default:
- return ""
- }
-}
-
-func UnmarshalUntyped(marshalled string) (types.BasicKind, constant.Value) {
- var skind, str string
- if sep := strings.IndexByte(marshalled, ':'); sep >= 0 {
- skind = marshalled[:sep]
- str = marshalled[sep+1:]
- } else {
- skind = marshalled
- }
-
- var kind types.BasicKind
- var val constant.Value
- switch skind {
- case "bool":
- kind = types.UntypedBool
- if str == "true" {
- val = constant.MakeBool(true)
- } else {
- val = constant.MakeBool(false)
- }
- case "int":
- kind = types.UntypedInt
- val = constant.MakeFromLiteral(str, token.INT, 0)
- case "rune":
- kind = types.UntypedRune
- val = constant.MakeFromLiteral(str, token.INT, 0)
- case "float":
- kind = types.UntypedFloat
- val = unmarshalUntypedFloat(str)
- case "complex":
- kind = types.UntypedComplex
- if sep := strings.IndexByte(str, ':'); sep >= 0 {
- re := unmarshalUntypedFloat(str[:sep])
- im := unmarshalUntypedFloat(str[sep+1:])
- val = constant.BinaryOp(constant.ToComplex(re), token.ADD, constant.MakeImag(im))
- } else {
- val = constant.ToComplex(unmarshalUntypedFloat(str))
- }
- case "string":
- kind = types.UntypedString
- val = constant.MakeString(str)
- case "nil":
- kind = types.UntypedNil
- default:
- kind = types.Invalid
- }
- return kind, val
-}
-
-// generalization of constant.MakeFromLiteral, accepts the fractions generated by
-// constant.Value.ExactString() for floating-point values
-func unmarshalUntypedFloat(str string) constant.Value {
- if sep := strings.IndexByte(str, '/'); sep >= 0 {
- x := constant.MakeFromLiteral(str[:sep], token.FLOAT, 0)
- y := constant.MakeFromLiteral(str[sep+1:], token.FLOAT, 0)
- return constant.BinaryOp(x, token.QUO, y)
- }
- return constant.MakeFromLiteral(str, token.FLOAT, 0)
-}
diff --git a/vendor/github.com/cosmos72/gomacro/base/genimport_wrapper.go b/vendor/github.com/cosmos72/gomacro/base/genimport_wrapper.go
index 671f145..55a7343 100644
--- a/vendor/github.com/cosmos72/gomacro/base/genimport_wrapper.go
+++ b/vendor/github.com/cosmos72/gomacro/base/genimport_wrapper.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* genimport_wrapper.go
diff --git a/vendor/github.com/cosmos72/gomacro/base/global.go b/vendor/github.com/cosmos72/gomacro/base/global.go
index 2c8085a..b01f819 100644
--- a/vendor/github.com/cosmos72/gomacro/base/global.go
+++ b/vendor/github.com/cosmos72/gomacro/base/global.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* global.go
@@ -34,53 +25,68 @@ import (
r "reflect"
"strings"
+ "github.com/cosmos72/gomacro/imports"
mp "github.com/cosmos72/gomacro/parser"
mt "github.com/cosmos72/gomacro/token"
+ xr "github.com/cosmos72/gomacro/xreflect"
. "github.com/cosmos72/gomacro/ast2"
)
+type CmdOpt uint32
+
+const (
+ CmdOptQuit = 1 << iota
+ CmdOptForceEval // temporarily re-enable evaluation even if in macroexpand-only mode
+)
+
+type Inspector interface {
+ Inspect(name string, val r.Value, typ r.Type, xtyp xr.Type, globals *Globals)
+}
+
type Globals struct {
Output
Options Options
PackagePath string
- Filename string
- GensymN uint
+ Filepath string
Importer *Importer
Imports []*ast.GenDecl
Declarations []ast.Decl
Statements []ast.Stmt
+ Prompt string
+ Readline Readline
+ GensymN uint
ParserMode mp.Mode
- SpecialChar rune
+ MacroChar rune // prefix for macro-related keywords macro, quote, quasiquote, splice... The default is '~'
+ ReplCmdChar byte // prefix for special REPL commands env, help, inspect, quit, unload... The default is ':'
+ Inspector Inspector
}
-func (g *Globals) Init() {
- g.Output = Output{
- Stringer: Stringer{
- Fileset: mt.NewFileSet(),
- NamedTypes: make(map[r.Type]string),
+func NewGlobals() *Globals {
+ return &Globals{
+ Output: Output{
+ Stringer: Stringer{
+ Fileset: mt.NewFileSet(),
+ NamedTypes: make(map[r.Type]string),
+ },
+ // using both os.Stdout and os.Stderr can interleave impredictably
+ // normal output and diagnostic messages - ugly in interactive use
+ Stdout: os.Stdout,
+ Stderr: os.Stdout,
},
- // using both os.Stdout and os.Stderr can interleave impredictably
- // normal output and diagnostic messages - ugly in interactive use
- Stdout: os.Stdout,
- Stderr: os.Stdout,
+ Options: OptTrapPanic, // set by default
+ PackagePath: "main",
+ Filepath: "repl.go",
+ Importer: DefaultImporter(),
+ Imports: nil,
+ Declarations: nil,
+ Statements: nil,
+ Prompt: "gomacro> ",
+ GensymN: 0,
+ ParserMode: 0,
+ MacroChar: '~',
+ ReplCmdChar: ':', // Jupyter and gophernotes would probably set this to '%'
}
- g.Options = OptTrapPanic // set by default
- g.PackagePath = "main"
- g.Filename = "repl.go"
- g.GensymN = 0
- g.Importer = DefaultImporter()
- g.Imports = nil
- g.Declarations = nil
- g.Statements = nil
- g.ParserMode = 0
- g.SpecialChar = '~'
-}
-
-func NewGlobals() *Globals {
- g := &Globals{}
- g.Init()
- return g
}
func (g *Globals) Gensym() string {
@@ -89,13 +95,13 @@ func (g *Globals) Gensym() string {
return fmt.Sprintf("%s%d", StrGensym, n)
}
-func (g *Globals) GensymEmbedded(name string) string {
+func (g *Globals) GensymAnonymous(name string) string {
if len(name) == 0 {
n := g.GensymN
g.GensymN++
name = fmt.Sprintf("%d", n)
}
- return StrGensymEmbedded + name
+ return StrGensymAnonymous + name
}
func (g *Globals) GensymPrivate(name string) string {
@@ -115,14 +121,25 @@ func IsGensymInterface(name string) bool {
return name == StrGensymInterface
}
-func IsGensymEmbedded(name string) bool {
- return strings.HasPrefix(name, StrGensymEmbedded)
+func IsGensymAnonymous(name string) bool {
+ return strings.HasPrefix(name, StrGensymAnonymous)
}
func IsGensymPrivate(name string) bool {
return strings.HasPrefix(name, StrGensymPrivate)
}
+// read phase
+// return read string and position of first non-comment token.
+// return "", -1 on EOF
+func (g *Globals) ReadMultiline(opts ReadOptions, prompt string) (str string, firstToken int) {
+ str, firstToken, err := ReadMultiline(g.Readline, opts, prompt)
+ if err != nil && err != io.EOF {
+ fmt.Fprintf(g.Stderr, "// read error: %s\n", err)
+ }
+ return str, firstToken
+}
+
// parse phase. no macroexpansion.
func (g *Globals) ParseBytes(src []byte) []ast.Node {
var parser mp.Parser
@@ -133,17 +150,67 @@ func (g *Globals) ParseBytes(src []byte) []ast.Node {
} else {
mode &^= mp.Trace
}
- parser.Configure(mode, g.SpecialChar)
- parser.Init(g.Fileset, g.Filename, g.Line, src)
+ if g.Options&OptDebugger != 0 {
+ // to show source code in debugger
+ mode |= mp.CopySources
+ } else {
+ mode &^= mp.CopySources
+ }
+ parser.Configure(mode, g.MacroChar)
+ parser.Init(g.Fileset, g.Filepath, g.Line, src)
nodes, err := parser.Parse()
if err != nil {
Error(err)
- return nil
}
return nodes
}
+// print phase
+func (g *Globals) Print(values []r.Value, types []xr.Type) {
+ opts := g.Options
+ if opts&OptShowEval != 0 {
+ if opts&OptShowEvalType != 0 {
+ for i, vi := range values {
+ var ti interface{}
+ if types != nil && i < len(types) {
+ ti = types[i]
+ } else {
+ ti = ValueType(vi)
+ }
+ g.Fprintf(g.Stdout, "%v\t// %v\n", vi, ti)
+ }
+ } else {
+ for _, vi := range values {
+ g.Fprintf(g.Stdout, "%v\n", vi)
+ }
+ }
+ }
+}
+
+// remove package 'path' from the list of known packages.
+// later attempts to import it again will trigger a recompile.
+func (g *Globals) UnloadPackage(path string) {
+ if n := len(path); n > 1 && path[0] == '"' && path[n-1] == '"' {
+ path = path[1 : n-1] // remove quotes
+ }
+ slash := strings.IndexByte(path, '/')
+ if _, found := imports.Packages[path]; !found {
+ if slash < 0 {
+ g.Debugf("nothing to unload: cannot find imported package %q. Remember to specify the full package path, not only its name", path)
+ } else {
+ g.Debugf("nothing to unload: cannot find imported package %q", path)
+ }
+ }
+ delete(imports.Packages, path)
+ dot := strings.IndexByte(path, '.')
+ if slash < 0 || dot > slash {
+ g.Warnf("unloaded standard library package %q. attempts to import it again will trigger a recompile", path)
+ return
+ }
+ g.Debugf("unloaded package %q. attempts to import it again will trigger a recompile", path)
+}
+
// CollectAst accumulates declarations in ir.Decls and statements in ir.Stmts
// allows generating a *.go file on user request
func (g *Globals) CollectAst(form Ast) {
@@ -172,14 +239,36 @@ func (g *Globals) CollectNode(node ast.Node) {
switch node.Tok {
case token.IMPORT:
g.Imports = append(g.Imports, node)
- case token.PACKAGE: // exception: modified parser parses "package foo" as a declaration
+ case token.PACKAGE:
+ /*
+ exception: modified parser converts 'package foo' to:
+
+ ast.GenDecl{
+ Tok: token.PACKAGE,
+ Specs: []ast.Spec{
+ &ast.ValueSpec{
+ Values: []ast.Expr{
+ &ast.BasicLit{
+ Kind: token.String,
+ Value: "path/to/package",
+ },
+ },
+ },
+ },
+ }
+ */
if len(node.Specs) == 1 {
- if spec, ok := node.Specs[0].(*ast.ValueSpec); ok && len(spec.Names) == 1 {
- g.PackagePath = spec.Names[0].Name
- break
+ if decl, ok := node.Specs[0].(*ast.ValueSpec); ok {
+ if len(decl.Values) == 1 {
+ if lit, ok := decl.Values[0].(*ast.BasicLit); ok {
+ if lit.Kind == token.STRING {
+ path := MaybeUnescapeString(lit.Value)
+ g.PackagePath = path
+ }
+ }
+ }
}
}
- fallthrough
default:
g.Declarations = append(g.Declarations, node)
}
diff --git a/vendor/github.com/cosmos72/gomacro/base/import_scanner.go b/vendor/github.com/cosmos72/gomacro/base/import_scanner.go
index bd95cf2..a32a2fb 100644
--- a/vendor/github.com/cosmos72/gomacro/base/import_scanner.go
+++ b/vendor/github.com/cosmos72/gomacro/base/import_scanner.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* import_scanner.go
@@ -30,6 +21,7 @@ import (
"go/types"
r "reflect"
"sort"
+ "strings"
)
type TypeVisitor func(name string, t types.Type) bool
@@ -172,7 +164,9 @@ func extractInterface(obj types.Object, requireAllMethodsExported bool) *types.I
case *types.TypeName:
u := obj.Type().Underlying()
if u, ok := u.(*types.Interface); ok {
- if !requireAllMethodsExported || allMethodsExported(u) {
+ // do not export proxies for empty interfaces:
+ // using reflect.Value.Convert() at runtime is enough
+ if u.NumMethods() != 0 && (!requireAllMethodsExported || allMethodsExported(u)) {
return u
}
}
@@ -190,9 +184,31 @@ func allMethodsExported(intf *types.Interface) bool {
return true
}
+// return the string after last '/' in path
+func FileName(path string) string {
+ return path[1+strings.LastIndexByte(path, '/'):]
+}
+
+// return the string up to (and including) last '/' in path
+func DirName(path string) string {
+ return path[0 : 1+strings.LastIndexByte(path, '/')]
+}
+
+// remove last byte from string
+func RemoveLastByte(s string) string {
+ if n := len(s); n != 0 {
+ s = s[:n-1]
+ }
+ return s
+}
+
// we need to collect only the imports that actually appear in package's interfaces methods
-// because Go rejects programs with unused imports
-func (o *Output) CollectPackageImports(pkg *types.Package, requireAllInterfaceMethodsExported bool) []string {
+// because Go rejects programs with unused imports.
+//
+// To avoid naming conflicts when importing two different packages
+// that end with the same name, as for example image/draw and golang.org/x/image/draw,
+// we rename conflicting packages and return a map[path]renamed
+func (o *Output) CollectPackageImportsWithRename(pkg *types.Package, requireAllInterfaceMethodsExported bool) map[string]string {
ie := importExtractor{
// we always need to import the package itself
imports: map[string]bool{pkg.Path(): true},
@@ -200,12 +216,80 @@ func (o *Output) CollectPackageImports(pkg *types.Package, requireAllInterfaceMe
}
ie.visitPackage(pkg, requireAllInterfaceMethodsExported)
- strings := make([]string, len(ie.imports))
+ // for deterministic renaming, use a sorted []string instead of a map[string]bool
+ paths := getKeys(ie.imports)
+ sort.Strings(paths)
+
+ nametopath := renamePackages(paths)
+ pathtoname := transposeKeyValue(nametopath)
+
+ // do NOT rename the package we are scanning!
+ path := pkg.Path()
+ name := FileName(path)
+ if name2 := pathtoname[path]; name2 != name {
+ // some *other* path may be associated to name.
+ // in case, swap the names of the two packages
+ if path2, ok := nametopath[name]; ok {
+ pathtoname[path2] = name2
+ }
+ pathtoname[path] = name
+ }
+ return pathtoname
+}
+
+// given a slice []path, return a map[name]path where all paths
+// that end in the same name have been assigned unique names
+func renamePackages(in []string) map[string]string {
+ out := make(map[string]string)
+ for _, path := range in {
+ name := renamePackage(path, out)
+ out[name] = path
+ }
+ return out
+}
+
+// given a path and a map[name]path, extract the path last name.
+// Change it (if needed) to a value that is NOT in map and return it.
+func renamePackage(path string, out map[string]string) string {
+ name := FileName(path)
+ if _, exists := out[name]; !exists {
+ return name
+ }
+ n := len(name)
+ for n != 0 && isDigit(name[n-1]) {
+ n--
+ }
+ name = name[:n]
+ for i := uint64(0); i < ^uint64(0); i++ {
+ namei := fmt.Sprintf("%s%d", name, i)
+ if _, exists := out[namei]; !exists {
+ return namei
+ }
+ }
+ Errorf("failed to find a non-conflicting rename for package %q", path)
+ return "???"
+}
+
+func isDigit(b byte) bool {
+ return b >= '0' && b <= '9'
+}
+
+// given a map k -> v, return an *unsorted* slice of its keys
+func getKeys(in map[string]bool) []string {
+ keys := make([]string, len(in))
i := 0
- for str := range ie.imports {
- strings[i] = str
+ for key := range in {
+ keys[i] = key
i++
}
- sort.Strings(strings)
- return strings
+ return keys
+}
+
+// given a map k -> v, return a map v -> k
+func transposeKeyValue(in map[string]string) map[string]string {
+ out := make(map[string]string, len(in))
+ for k, v := range in {
+ out[v] = k
+ }
+ return out
}
diff --git a/vendor/github.com/cosmos72/gomacro/base/importer.go b/vendor/github.com/cosmos72/gomacro/base/importer.go
index 6cbfca8..d851c85 100644
--- a/vendor/github.com/cosmos72/gomacro/base/importer.go
+++ b/vendor/github.com/cosmos72/gomacro/base/importer.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* importer.go
@@ -34,7 +25,6 @@ import (
"io/ioutil"
"os"
r "reflect"
- "strings"
"github.com/cosmos72/gomacro/imports"
)
@@ -42,16 +32,38 @@ import (
type ImportMode int
const (
- ImSharedLib ImportMode = iota
- ImBuiltin
+ // ImBuiltin import mechanism is:
+ // 1. write a file $GOPATH/src/github.com/cosmos72/gomacro/imports/$PKGPATH.go containing a single func init()
+ // i.e. *inside* gomacro sources
+ // 2. tell the user to recompile gomacro
+ ImBuiltin ImportMode = iota
+
+ // ImThirdParty import mechanism is the same as ImBuiltin, except that files are created in a thirdparty/ subdirectory:
+ // 1. write a file $GOPATH/src/github.com/cosmos72/gomacro/imports/thirdparty/$PKGPATH.go containing a single func init()
+ // i.e. *inside* gomacro sources
+ // 2. tell the user to recompile gomacro
+ ImThirdParty
+
+ // ImPlugin import mechanism is:
+ // 1. write a file $GOPATH/src/gomacro_imports/$PKGPATH/$PKGNAME.go containing a var Packages map[string]Package
+ // and a single func init() to populate it
+ // 2. invoke "go build -buildmode=plugin" on the file to create a shared library
+ // 3. load such shared library with plugin.Open().Lookup("Packages")
+ ImPlugin
+
+ // ImInception import mechanism is:
+ // 1. write a file $GOPATH/src/$PKGPATH/x_package.go containing a single func init()
+ // i.e. *inside* the package to be imported
+ // 2. tell the user to recompile $PKGPATH
ImInception
)
type Importer struct {
- from types.ImporterFrom
- compat types.Importer
- srcDir string
- mode types.ImportMode
+ from types.ImporterFrom
+ compat types.Importer
+ srcDir string
+ mode types.ImportMode
+ PluginOpen r.Value // = reflect.ValueOf(plugin.Open)
}
func DefaultImporter() *Importer {
@@ -65,6 +77,16 @@ func DefaultImporter() *Importer {
return &imp
}
+func (imp *Importer) setPluginOpen() bool {
+ if imp.PluginOpen == Nil {
+ imp.PluginOpen = imports.Packages["plugin"].Binds["Open"]
+ if imp.PluginOpen == Nil {
+ imp.PluginOpen = None // cache the failure
+ }
+ }
+ return imp.PluginOpen != None
+}
+
func (imp *Importer) Import(path string) (*types.Package, error) {
return imp.ImportFrom(path, imp.srcDir, imp.mode)
}
@@ -89,13 +111,23 @@ func (g *Globals) LookupPackage(name, path string) *PackageRef {
}
func (g *Globals) ImportPackage(name, path string) *PackageRef {
+ ref, err := g.ImportPackageOrError(name, path)
+ if err != nil {
+ panic(err)
+ }
+ return ref
+}
+
+func (g *Globals) ImportPackageOrError(name, path string) (*PackageRef, error) {
ref := g.LookupPackage(name, path)
if ref != nil {
- return ref
+ return ref, nil
}
gpkg, err := g.Importer.Import(path) // loads names and types, not the values!
if err != nil {
- g.Errorf("error loading package %q metadata, maybe you need to download (go get), compile (go build) and install (go install) it? %v", path, err)
+ return nil, g.MakeRuntimeError(
+ "error loading package %q metadata, maybe you need to download (go get), compile (go build) and install (go install) it? %v",
+ path, err)
}
var mode ImportMode
switch name {
@@ -103,35 +135,45 @@ func (g *Globals) ImportPackage(name, path string) *PackageRef {
mode = ImBuiltin
case "_i":
mode = ImInception
+ case "_3":
+ mode = ImThirdParty
+ default:
+ havePluginOpen := g.Importer.setPluginOpen()
+ if havePluginOpen {
+ mode = ImPlugin
+ } else {
+ mode = ImThirdParty
+ }
}
file := g.createImportFile(path, gpkg, mode)
- if mode != ImSharedLib {
- return nil
- }
ref = &PackageRef{Name: name, Path: path}
- if len(file) == 0 {
- // empty package. still cache it for future use.
+ if len(file) == 0 || mode != ImPlugin {
+ // either the package exports nothing, or user must rebuild gomacro.
+ // in both cases, still cache it to avoid recreating the file.
imports.Packages[path] = ref.Package
- return ref
+ return ref, nil
}
soname := g.compilePlugin(file, g.Stdout, g.Stderr)
- ifun := g.loadPlugin(soname, "Exports")
- fun := ifun.(func() (map[string]r.Value, map[string]r.Type, map[string]r.Type, map[string]string, map[string][]string))
- binds, types, proxies, untypeds, wrappers := fun()
-
- // done. cache package for future use.
- ref.Package = imports.Package{
- Binds: binds,
- Types: types,
- Proxies: proxies,
- Untypeds: untypeds,
- Wrappers: wrappers,
- }
- imports.Packages[path] = ref.Package
- return ref
+ ipkgs := g.loadPluginSymbol(soname, "Packages")
+ pkgs := *ipkgs.(*map[string]imports.PackageUnderlying)
+
+ // cache *all* found packages for future use
+ imports.Packages.Merge(pkgs)
+
+ // but return only requested one
+ pkg, found := imports.Packages[path]
+ if !found {
+ return nil, g.MakeRuntimeError(
+ "error loading package %q: the compiled plugin %q does not contain it! internal error? %v",
+ path, soname)
+ }
+ ref.Package = pkg
+ return ref, nil
}
func (g *Globals) createImportFile(path string, pkg *types.Package, mode ImportMode) string {
+ file := g.computeImportFilename(path, mode)
+
buf := bytes.Buffer{}
isEmpty := g.writeImportFile(&buf, path, pkg, mode)
if isEmpty {
@@ -139,15 +181,14 @@ func (g *Globals) createImportFile(path string, pkg *types.Package, mode ImportM
return ""
}
- file := computeImportFilename(path, mode)
err := ioutil.WriteFile(file, buf.Bytes(), os.FileMode(0666))
if err != nil {
g.Errorf("error writing file %q: %v", file, err)
}
- if mode != ImSharedLib {
- g.Warnf("created file %q, recompile gomacro to use it", file)
- } else {
+ if mode == ImPlugin {
g.Debugf("created file %q...", file)
+ } else {
+ g.Warnf("created file %q, recompile gomacro to use it", file)
}
return file
}
@@ -168,21 +209,23 @@ func sanitizeIdentifier2(str string, replacement rune) string {
return string(runes)
}
-const gomacro_dir = "github.com/cosmos72/gomacro"
-
-func computeImportFilename(path string, mode ImportMode) string {
- srcdir := getGoSrcPath()
-
+func (g *Globals) computeImportFilename(path string, mode ImportMode) string {
switch mode {
case ImBuiltin:
- return fmt.Sprintf("%s/%s/imports/%s.go", srcdir, gomacro_dir, sanitizeIdentifier(path))
+ // user will need to recompile gomacro
+ return Subdir(GomacroDir, "imports", sanitizeIdentifier(path)+".go")
case ImInception:
- return fmt.Sprintf("%s/%s/x_package.go", srcdir, path)
+ // user will need to recompile gosrcdir / path
+ return Subdir(GoSrcDir, path, "x_package.go")
+ case ImThirdParty:
+ // either plugin.Open is not available, or user explicitly requested import _3 "package".
+ // In both cases, user will need to recompile gomacro
+ return Subdir(GomacroDir, "imports", "thirdparty", sanitizeIdentifier(path)+".go")
}
- file := path[1+strings.LastIndexByte(path, '/'):]
- file = fmt.Sprintf("%s/gomacro_imports/%s/%s.go", srcdir, path, file)
- dir := file[0 : 1+strings.LastIndexByte(file, '/')]
+ file := FileName(path) + ".go"
+ file = Subdir(GoSrcDir, "gomacro_imports", path, file)
+ dir := DirName(file)
err := os.MkdirAll(dir, 0700)
if err != nil {
Errorf("error creating directory %q: %v", dir, err)
diff --git a/vendor/github.com/cosmos72/gomacro/base/inspect/inspect.go b/vendor/github.com/cosmos72/gomacro/base/inspect/inspect.go
new file mode 100644
index 0000000..f1fac94
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/inspect/inspect.go
@@ -0,0 +1,283 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * inspect.go
+ *
+ * Created on: Apr 20, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package inspect
+
+import (
+ "errors"
+ r "reflect"
+ "strconv"
+ "strings"
+
+ "github.com/cosmos72/gomacro/base"
+ xr "github.com/cosmos72/gomacro/xreflect"
+)
+
+type Inspector struct {
+ names []string
+ vals []r.Value
+ types []r.Type
+ xtypes []xr.Type
+ globals *base.Globals
+}
+
+func (ip *Inspector) Inspect(name string, val r.Value, typ r.Type, xtyp xr.Type, globals *base.Globals) {
+ ip.Init(name, val, typ, xtyp, globals)
+ ip.Show()
+ ip.Repl()
+}
+
+func (ip *Inspector) Init(name string, val r.Value, typ r.Type, xtyp xr.Type, globals *base.Globals) {
+ ip.names = []string{name}
+ ip.vals = []r.Value{val}
+ ip.types = []r.Type{typ}
+ ip.xtypes = []xr.Type{xtyp}
+ ip.globals = globals
+}
+
+func (ip *Inspector) ShowHelp() {
+ g := ip.globals
+ g.Fprintf(g.Stdout, "%s", `
+// inspector commands:
+NUMBER enter n-th struct field, or n-th element of array, slice or string
+. show current expression
+? show this help
+help show this help
+methods show methods
+quit exit inspector
+top return to top-level expression
+up return to outer expression
+// abbreviations are allowed if unambiguous.
+`)
+}
+
+func (ip *Inspector) Show() {
+ depth := len(ip.names)
+ name := strings.Join(ip.names, ".")
+ v := ip.vals[depth-1]
+ t := ip.types[depth-1]
+ ip.showVar(name, v, t)
+
+ v = dereferenceValue(v) // dereference pointers on-the-fly
+ switch v.Kind() {
+ case r.Array, r.Slice, r.String:
+ ip.showIndexes(v)
+ case r.Struct:
+ ip.showFields(v)
+ }
+}
+
+func (ip *Inspector) Repl() error {
+ g := ip.globals
+ g.Fprintf(g.Stdout, "%s", "// type ? for inspector help\n")
+ for len(ip.names) > 0 {
+ prompt := g.Sprintf("inspect %s> ", strings.Join(ip.names, "."))
+ bytes, err := g.Readline.Read(prompt)
+ if err != nil {
+ return err
+ }
+ cmd := strings.TrimSpace(string(bytes))
+ err = ip.Eval(cmd)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (ip *Inspector) Eval(cmd string) error {
+ switch {
+ case cmd == "?", strings.HasPrefix("help", cmd):
+ ip.ShowHelp()
+ case strings.HasPrefix("methods", cmd):
+ t := ip.types[len(ip.types)-1]
+ xt := ip.xtypes[len(ip.xtypes)-1]
+ ip.showMethods(t, xt)
+ case strings.HasPrefix("quit", cmd):
+ return errors.New("user quit")
+ case strings.HasPrefix("top", cmd):
+ ip.Top()
+ ip.Show()
+ case cmd == "", cmd == ".":
+ ip.Show()
+ case cmd == "-", strings.HasPrefix("up", cmd):
+ if len(ip.names) > 1 {
+ ip.Leave()
+ } else {
+ ip.Show()
+ }
+ default:
+ ip.Enter(cmd)
+ }
+ return nil
+}
+
+func (ip *Inspector) Top() {
+ ip.names = ip.names[0:1]
+ ip.vals = ip.vals[0:1]
+ ip.types = ip.types[0:1]
+}
+
+func (ip *Inspector) Leave() {
+ depth := len(ip.names)
+ if depth <= 0 {
+ return
+ }
+ depth--
+ ip.names = ip.names[:depth]
+ ip.vals = ip.vals[:depth]
+ ip.types = ip.types[:depth]
+ if depth > 0 {
+ ip.Show()
+ }
+}
+
+func (ip *Inspector) showVar(str string, v r.Value, t r.Type) {
+ ip.globals.Fprintf(ip.globals.Stdout, "%s\t= %v\t// %v\n", str, v, t)
+}
+
+func (ip *Inspector) showFields(v r.Value) {
+ g := ip.globals
+ n := v.NumField()
+ for i := 0; i < n; i++ {
+ f := v.Field(i)
+ t := base.ValueType(f)
+ f = dereferenceValue(f)
+ g.Fprintf(g.Stdout, " %d. ", i)
+ ip.showVar(v.Type().Field(i).Name, f, t)
+ }
+}
+
+func (ip *Inspector) showIndexes(v r.Value) {
+ g := ip.globals
+ n := v.Len()
+ for i := 0; i < n; i++ {
+ f := v.Index(i)
+ t := base.ValueType(f)
+ f = dereferenceValue(f)
+ g.Fprintf(g.Stdout, " %d. ", i)
+ ip.showVar("", f, t)
+ }
+}
+
+func (ip *Inspector) showMethods(t r.Type, xt xr.Type) {
+ g := ip.globals
+ switch {
+ case xt != nil:
+ if xt.Kind() == r.Ptr {
+ xt = xt.Elem()
+ }
+ n := xt.NumMethod()
+ if n == 0 {
+ g.Fprintf(g.Stdout, "no methods of %v\n", xt)
+ return
+ }
+ g.Fprintf(g.Stdout, "methods of %v:\n", xt)
+ for i := 0; i < n; i++ {
+ g.Fprintf(g.Stdout, " m%d. %v\n", i, xt.Method(i).GoFun)
+ }
+
+ case t != nil:
+ n := t.NumMethod()
+ if n == 0 {
+ g.Fprintf(g.Stdout, "no methods of %v\n", t)
+ return
+ }
+ g.Fprintf(g.Stdout, "methods of %v:\n", t)
+ for i := 0; i < n; i++ {
+ m := t.Method(i)
+ g.Fprintf(g.Stdout, " m%d. %s\t%v\n", i, m.Name, m.Type)
+ }
+ }
+}
+
+func (ip *Inspector) Enter(cmd string) {
+ g := ip.globals
+ i, err := strconv.Atoi(cmd)
+ if err != nil {
+ g.Fprintf(g.Stdout, "unknown inspector command \"%s\". Type ? for help\n", cmd)
+ return
+ }
+ depth := len(ip.names)
+ v := dereferenceValue(ip.vals[depth-1])
+ var n int
+ var fname string
+ var f r.Value
+ switch v.Kind() {
+ case r.Array, r.Slice, r.String:
+ n = v.Len()
+ if !ip.validRange(i, n) {
+ return
+ }
+ fname = "[" + cmd + "]"
+ f = v.Index(i)
+ case r.Struct:
+ n = v.NumField()
+ if !ip.validRange(i, n) {
+ return
+ }
+ fname = v.Type().Field(i).Name
+ f = v.Field(i)
+ default:
+ g.Fprintf(g.Stdout, "cannot enter <%v>: expecting array, slice, string or struct\n", base.ValueType(v))
+ return
+ }
+ var t r.Type
+ if f.IsValid() && f != base.None {
+ if f.CanInterface() {
+ t = r.TypeOf(f.Interface()) // concrete type
+ } else {
+ t = f.Type()
+ }
+ }
+
+ switch dereferenceValue(f).Kind() { // dereference pointers on-the-fly
+ case r.Array, r.Slice, r.String, r.Struct:
+ ip.names = append(ip.names, fname)
+ ip.vals = append(ip.vals, f)
+ ip.types = append(ip.types, t)
+ ip.Show()
+ default:
+ ip.showVar(fname, f, t)
+ }
+}
+
+func dereferenceValue(v r.Value) r.Value {
+ for {
+ switch v.Kind() {
+ case r.Ptr:
+ v = v.Elem()
+ continue
+ case r.Interface:
+ if v.CanInterface() {
+ v = r.ValueOf(v.Interface())
+ continue
+ }
+ }
+ break
+ }
+ return v
+}
+
+func (ip *Inspector) validRange(i, n int) bool {
+ if i < 0 || i >= n {
+ g := ip.globals
+ g.Fprintf(g.Stdout, "%s contains %d elements, cannot inspect element %d\n",
+ strings.Join(ip.names, "."), n, i)
+ return false
+ }
+ return true
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/literal.go b/vendor/github.com/cosmos72/gomacro/base/literal.go
index cf5e05f..4da8d16 100644
--- a/vendor/github.com/cosmos72/gomacro/base/literal.go
+++ b/vendor/github.com/cosmos72/gomacro/base/literal.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* literal.go
diff --git a/vendor/github.com/cosmos72/gomacro/base/output.go b/vendor/github.com/cosmos72/gomacro/base/output.go
index 5751bcc..00edf63 100644
--- a/vendor/github.com/cosmos72/gomacro/base/output.go
+++ b/vendor/github.com/cosmos72/gomacro/base/output.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* output.go
@@ -79,6 +70,14 @@ func (err RuntimeError) Error() string {
return msg
}
+func makeRuntimeError(format string, args ...interface{}) error {
+ return RuntimeError{nil, format, args}
+}
+
+func (st *Stringer) MakeRuntimeError(format string, args ...interface{}) RuntimeError {
+ return RuntimeError{st, format, args}
+}
+
func Error(err error) interface{} {
panic(err)
}
@@ -145,6 +144,20 @@ func (st *Stringer) Position() token.Position {
return st.Fileset.Position(st.Pos)
}
+func (ref *PackageRef) String() string {
+ return fmt.Sprintf("{%s %q, %d binds, %d types}", ref.Name, ref.Path, len(ref.Binds), len(ref.Types))
+}
+
+func ShowPackageHeader(out io.Writer, name string, path string, kind string) {
+ if name == path {
+ fmt.Fprintf(out, "// ----- %s %s -----\n", name, kind)
+ } else if name == FileName(path) {
+ fmt.Fprintf(out, "// ----- %q %s -----\n", path, kind)
+ } else {
+ fmt.Fprintf(out, "// ----- %s %q %s -----\n", name, path, kind)
+ }
+}
+
var typeOfReflectValue = r.TypeOf(r.Value{})
type unsafeType struct {
@@ -300,15 +313,17 @@ func (st *Stringer) nodeToPrintable(node ast.Node) interface{} {
}
func (st *Stringer) rvalueToPrintable(format string, value r.Value) interface{} {
+ var i interface{}
if value == None {
- return "/*no value*/"
+ i = "/*no value*/"
} else if value == Nil {
- return nil
+ i = nil
} else if value.CanInterface() {
- return st.toPrintable(format, value.Interface())
+ i = st.toPrintable(format, value.Interface())
} else {
- return value
+ i = value
}
+ return i
}
func (st *Stringer) typeToPrintable(t r.Type) interface{} {
@@ -324,8 +339,11 @@ func (st *Stringer) typeToPrintable(t r.Type) interface{} {
}
func (st *Stringer) structToPrintable(format string, v r.Value) string {
- buf := bytes.Buffer{}
n := v.NumField()
+ if n == 0 {
+ return "{}"
+ }
+ var buf bytes.Buffer
t := v.Type()
ch := '{'
for i := 0; i < n; i++ {
diff --git a/vendor/github.com/cosmos72/gomacro/base/plugin.go b/vendor/github.com/cosmos72/gomacro/base/plugin.go
index b9fd0c6..7f96a44 100644
--- a/vendor/github.com/cosmos72/gomacro/base/plugin.go
+++ b/vendor/github.com/cosmos72/gomacro/base/plugin.go
@@ -1,22 +1,11 @@
-// +build go1.8,linux,!android,!gccgo
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* plugin.go
@@ -28,66 +17,67 @@
package base
import (
- "fmt"
"io"
- "os"
"os/exec"
- "plugin"
- "strings"
+ r "reflect"
)
-func getGoPath() string {
- dir := os.Getenv("GOPATH")
- if len(dir) == 0 {
- dir = os.Getenv("HOME")
- if len(dir) == 0 {
- Errorf("cannot determine go source directory: both $GOPATH and $HOME are unset or empty")
- }
- dir += "/go"
- }
- return dir
-}
-
-func getGoSrcPath() string {
- return getGoPath() + "/src"
-}
-
-func (g *Globals) compilePlugin(filename string, stdout io.Writer, stderr io.Writer) string {
- gosrcdir := getGoSrcPath()
+func (g *Globals) compilePlugin(filepath string, stdout io.Writer, stderr io.Writer) string {
+ gosrcdir := GoSrcDir
gosrclen := len(gosrcdir)
- filelen := len(filename)
- if filelen < gosrclen || filename[0:gosrclen] != gosrcdir {
- g.Errorf("source %q is in unsupported directory, cannot compile it: should be inside %q", filename, gosrcdir)
+ filelen := len(filepath)
+ if filelen < gosrclen || filepath[0:gosrclen] != gosrcdir {
+ g.Errorf("source %q is in unsupported directory, cannot compile it: should be inside %q", filepath, gosrcdir)
}
cmd := exec.Command("go", "build", "-buildmode=plugin")
- cmd.Dir = filename[0 : 1+strings.LastIndexByte(filename, '/')]
+ cmd.Dir = DirName(filepath)
cmd.Stdin = nil
cmd.Stdout = stdout
cmd.Stderr = stderr
- g.Debugf("compiling %q ...", filename)
+ g.Debugf("compiling %q ...", filepath)
err := cmd.Run()
if err != nil {
g.Errorf("error executing \"go build -buildmode=plugin\" in directory %q: %v", cmd.Dir, err)
}
- dirname := filename[:strings.LastIndexByte(filename, '/')]
+ dirname := RemoveLastByte(DirName(filepath))
// go build uses innermost directory name as shared object name,
// i.e. foo/bar/main.go is compiled to foo/bar/bar.so
- filename = dirname[1+strings.LastIndexByte(dirname, '/'):]
+ filename := FileName(dirname)
- return fmt.Sprintf("%s/%s.so", dirname, filename)
+ return Subdir(dirname, filename+".so")
}
-func (g *Globals) loadPlugin(soname string, symbolName string) interface{} {
- pkg, err := plugin.Open(soname)
+func (g *Globals) loadPluginSymbol(soname string, symbolName string) interface{} {
+ // use imports.Packages["plugin"].Binds["Open"] and reflection instead of hard-coding call to plugin.Open()
+ // reasons:
+ // * import ( "plugin" ) does not work on all platforms (creates broken gomacro.exe on Windows/386)
+ // * allow caller to provide us with a different implementation,
+ // either in imports.Packages["plugin"].Binds["Open"]
+ // or in Globals.Importer.PluginOpen
+
+ imp := g.Importer
+ if !imp.setPluginOpen() {
+ g.Errorf("gomacro compiled without support to load plugins - requires Go 1.8+ and Linux - cannot import packages at runtime")
+ }
+ if len(soname) == 0 || len(symbolName) == 0 {
+ // caller is just checking whether PluginOpen() is available
+ return nil
+ }
+ so, err := reflectcall(imp.PluginOpen, soname)
if err != nil {
g.Errorf("error loading plugin %q: %v", soname, err)
}
- val, err := pkg.Lookup(symbolName)
+ vsym, err := reflectcall(so.MethodByName("Lookup"), symbolName)
if err != nil {
g.Errorf("error loading symbol %q from plugin %q: %v", symbolName, soname, err)
}
- return val
+ return vsym.Interface()
+}
+
+func reflectcall(fun r.Value, arg interface{}) (r.Value, interface{}) {
+ vs := fun.Call([]r.Value{r.ValueOf(arg)})
+ return vs[0], vs[1].Interface()
}
diff --git a/vendor/github.com/cosmos72/gomacro/base/plugin_dummy.go b/vendor/github.com/cosmos72/gomacro/base/plugin_dummy.go
deleted file mode 100644
index 03e944f..0000000
--- a/vendor/github.com/cosmos72/gomacro/base/plugin_dummy.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// +build !go1.8 !linux android gccgo
-
-/*
- * gomacro - A Go interpreter with Lisp-like macros
- *
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * plugin_dummy.go
- *
- * Created on Mar 21, 2017
- * Author Massimiliano Ghilardi
- */
-
-package base
-
-import (
- "io"
- "os"
-)
-
-func getGoPath() string {
- return os.Getenv("GOPATH")
-}
-
-func getGoSrcPath() string {
- return getGoPath() + "/src"
-}
-
-func (g *Globals) compilePlugin(filename string, stdout io.Writer, stderr io.Writer) string {
- g.Errorf("gomacro compiled without support to load plugins - requires Go 1.8+ and Linux - cannot import packages at runtime")
- return ""
-}
-
-func (g *Globals) loadPlugin(soname string, symbolName string) interface{} {
- g.Errorf("gomacro compiled without support to load plugins - requires Go 1.8+ and Linux - cannot import packages at runtime")
- return nil
-}
diff --git a/vendor/github.com/cosmos72/gomacro/base/quasiquote.go b/vendor/github.com/cosmos72/gomacro/base/quasiquote.go
index 9134be6..633f50a 100644
--- a/vendor/github.com/cosmos72/gomacro/base/quasiquote.go
+++ b/vendor/github.com/cosmos72/gomacro/base/quasiquote.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* quasiquote.go
@@ -165,6 +156,15 @@ func MakeQuote2(form UnaryExpr, toQuote AstWithNode) UnaryExpr {
return UnaryExpr{expr}
}
+// MakeNestedQuote invokes parser.MakeQuote() multiple times, passing op=toks[i] at each call
+func MakeNestedQuote(form AstWithNode, toks []token.Token, pos []token.Pos) AstWithNode {
+ for i := len(toks) - 1; i >= 0; i-- {
+ expr, _ := mp.MakeQuote(nil, toks[i], pos[i], form.Node())
+ form = UnaryExpr{expr}
+ }
+ return form
+}
+
// DuplicateNestedUnquotes is a support function to handle the following complication:
// in Common Lisp, the right-most unquote pairs with the left-most comma!
// we implement the same mechanics, so we must drill down to the last unquote/unquote_splice
@@ -174,9 +174,9 @@ func MakeQuote2(form UnaryExpr, toQuote AstWithNode) UnaryExpr {
// quasiquote{quasiquote{1; unquote{2}; unquote{unquote_splice{x}}}}
// must return
// quasiquote{1; unquote{2}; unquote{7}; unquote{8}}
-func DuplicateNestedUnquotes(src UnaryExpr, depth int, content Ast) Ast {
+func DuplicateNestedUnquotes(src UnaryExpr, depth int, toappend Ast) Ast {
if depth == 0 {
- return content
+ return toappend
}
head, tail := MakeQuote(src)
var form Ast = src
@@ -192,17 +192,20 @@ func DuplicateNestedUnquotes(src UnaryExpr, depth int, content Ast) Ast {
tail = newTail
}
// cheat: we know that BlockStmt.Append() always returns the receiver unmodified
- if content != nil {
- tail.Append(content)
+ if toappend != nil {
+ tail.Append(toappend)
}
return head
}
+// return the expression inside nested mt.UNQUOTE and/or mt.UNQUOTE_SPLICE contained in 'unquote'
func DescendNestedUnquotes(unquote UnaryExpr) (lastUnquote UnaryExpr, depth int) {
depth = 1
for {
form := unquote.Get(0).Get(1)
- form = UnwrapTrivialAst(form)
+ // do NOT UnwrapTrivialAst(form): we want the BlockStmt
+
+ // Debugf("DescendNestedUnquotes: %v // %T", UnwrapTrivialAst(form).Interface(), UnwrapTrivialAst(form).Interface())
if form != nil && form.Size() == 1 {
if block, ok := form.(BlockStmt); ok {
@@ -218,6 +221,39 @@ func DescendNestedUnquotes(unquote UnaryExpr) (lastUnquote UnaryExpr, depth int)
}
}
}
+ // Debugf("DescendNestedUnquotes: returning depth = %d, %v // %T", depth, unquote.Interface(), unquote.Interface())
return unquote, depth
}
}
+
+// return the sequence of nested mt.UNQUOTE and/or mt.UNQUOTE_SPLICE contained in 'unquote'
+func CollectNestedUnquotes(unquote UnaryExpr) ([]token.Token, []token.Pos) {
+ // Debugf("CollectNestedUnquotes: %v // %T", unquote.X, unquote.X)
+
+ var toks []token.Token
+ var pos []token.Pos
+ for {
+ unary := unquote.X
+ toks = append(toks, unary.Op)
+ pos = append(pos, unary.OpPos)
+
+ form := unquote.Get(0).Get(1)
+ // do NOT UnwrapTrivialAst(form): we want the BlockStmt
+
+ if form != nil && form.Size() == 1 {
+ if block, ok := form.(BlockStmt); ok {
+ form = UnwrapTrivialAst(block.Get(0))
+ if form != nil && form.Size() == 1 {
+ if expr, ok := form.(UnaryExpr); ok {
+ if op := expr.X.Op; op == mt.UNQUOTE || op == mt.UNQUOTE_SPLICE {
+ unquote = expr
+ continue
+ }
+ }
+ }
+ }
+ }
+ // Debugf("CollectNestedUnquotes: returning toks = %v, pos = %v // %T", toks, pos)
+ return toks, pos
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/read.go b/vendor/github.com/cosmos72/gomacro/base/read.go
index 871cf5d..909f0ab 100644
--- a/vendor/github.com/cosmos72/gomacro/base/read.go
+++ b/vendor/github.com/cosmos72/gomacro/base/read.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* read.go
@@ -26,7 +17,6 @@
package base
import (
- "bufio"
"bytes"
"errors"
"fmt"
@@ -40,24 +30,18 @@ import (
func ReadBytes(src interface{}) []byte {
switch s := src.(type) {
case []byte:
- if s != nil {
- return s
- }
+ return s
case string:
return []byte(s)
case *bytes.Buffer:
// is io.Reader, but src is already available in []byte form
- if s != nil {
- return s.Bytes()
- }
+ return s.Bytes()
case io.Reader:
- if s != nil {
- var buf bytes.Buffer
- if _, err := io.Copy(&buf, s); err != nil {
- Error(err)
- }
- return buf.Bytes()
+ var buf bytes.Buffer
+ if _, err := io.Copy(&buf, s); err != nil {
+ Error(err)
}
+ return buf.Bytes()
}
Errorf("unsupported source, cannot read from: %v <%v>", src, r.TypeOf(src))
return nil
@@ -66,24 +50,18 @@ func ReadBytes(src interface{}) []byte {
func ReadString(src interface{}) string {
switch s := src.(type) {
case []byte:
- if s != nil {
- return string(s)
- }
+ return string(s)
case string:
return s
case *bytes.Buffer:
// is io.Reader, but src is already available in string form
- if s != nil {
- return s.String()
- }
+ return s.String()
case io.Reader:
- if s != nil {
- var buf bytes.Buffer
- if _, err := io.Copy(&buf, s); err != nil {
- Error(err)
- }
- return buf.String()
+ var buf bytes.Buffer
+ if _, err := io.Copy(&buf, s); err != nil {
+ Error(err)
}
+ return buf.String()
}
Errorf("unsupported source, cannot read from: %v <%v>", src, r.TypeOf(src))
return ""
@@ -152,22 +130,21 @@ func (m mode) String() string {
}
}
-var paragraph_separator_bytes = []byte{0xe2, 0x80, 0xa9}
-var nl_bytes = []byte{'\n'}
-
-func ReadMultiline(in *bufio.Reader, opts ReadOptions, out io.Writer, prompt string) (src string, firstToken int, err error) {
+// return read string, position of first non-comment token and error (if any)
+// on EOF, return "", -1, io.EOF
+func ReadMultiline(in Readline, opts ReadOptions, prompt string) (src string, firstToken int, err error) {
+ var line, buf []byte
m := mNormal
paren := 0
+ firstToken = -1
+ lastToken := -1
optPrompt := opts&ReadOptShowPrompt != 0
optAllComments := opts&ReadOptCollectAllComments != 0
ignorenl := false
- firstToken = -1
- lastToken := -1
-
+ var currPrompt string
if optPrompt {
- fmt.Fprint(out, prompt)
+ currPrompt = prompt
}
- var line, buf []byte
// comments do not reset ignorenl
resetnl := func(paren int, m mode) bool {
@@ -190,8 +167,7 @@ func ReadMultiline(in *bufio.Reader, opts ReadOptions, out io.Writer, prompt str
}
for {
- line, err = in.ReadBytes('\n')
- line = bytes.Replace(line, paragraph_separator_bytes, nl_bytes, -1)
+ line, err = in.Read(currPrompt)
for i, ch := range line {
if debug {
Debugf("ReadMultiline: found %q\tmode=%v\tparen=%d ignorenl=%t", ch, m, paren, ignorenl)
@@ -374,7 +350,7 @@ func ReadMultiline(in *bufio.Reader, opts ReadOptions, out io.Writer, prompt str
m = mNormal
}
if optPrompt {
- printDots(out, 4+2*paren)
+ currPrompt = makeDots(9 + 2*paren)
}
}
if err != nil {
@@ -430,21 +406,25 @@ func lastIsKeywordIgnoresNl(line []byte, first, last int) bool {
ignorenl = true
}
if debug {
- Debugf("lastIsKeywordIgnoresNl: found %ignorenl=%t", str, ignorenl)
+ Debugf("lastIsKeywordIgnoresNl: found %q ignorenl=%t", str, ignorenl)
}
return ignorenl
}
-func printDots(out io.Writer, count int) {
+func makeDots(count int) string {
const (
- dots = ". . . . . . . . . . . . . . . . "
- ndots = len(dots)
+ dots = ". . . . "
+ spaces = " "
+ ndots = len(dots)
+ nspaces = len(spaces)
)
- for count >= ndots {
- fmt.Fprint(out, dots)
- count -= ndots
+ if count <= ndots {
+ return dots[0:count]
}
- if count > 0 {
- fmt.Fprint(out, dots[0:count])
+ buf := make([]byte, count)
+ copy(buf, dots)
+ for i := ndots; i < count; i += nspaces {
+ copy(buf[i:], spaces)
}
+ return string(buf)
}
diff --git a/vendor/github.com/cosmos72/gomacro/base/readline.go b/vendor/github.com/cosmos72/gomacro/base/readline.go
new file mode 100644
index 0000000..0ccf125
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/readline.go
@@ -0,0 +1,123 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * readline.go
+ *
+ * Created on: Apr 02, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package base
+
+import (
+ "bufio"
+ "bytes"
+ "fmt"
+ "io"
+ "os"
+ // "os/signal"
+
+ "github.com/peterh/liner"
+)
+
+type Readline interface {
+ Read(prompt string) ([]byte, error)
+}
+
+// -------------------- BufReadline --------------------
+
+type BufReadline struct {
+ in *bufio.Reader
+ out io.Writer
+}
+
+func MakeBufReadline(in *bufio.Reader, out io.Writer) BufReadline {
+ return BufReadline{in, out}
+}
+
+var (
+ paragraph_separator_bytes = []byte{0xe2, 0x80, 0xa9}
+ nl_bytes = []byte{'\n'}
+)
+
+func (buf BufReadline) Read(prompt string) ([]byte, error) {
+ line, err := buf.in.ReadBytes('\n')
+ line = bytes.Replace(line, paragraph_separator_bytes, nl_bytes, -1)
+ return line, err
+}
+
+// -------------------- TtyReadline --------------------
+
+type TtyReadline struct {
+ Term *liner.State
+}
+
+func MakeTtyReadline(historyfile string) (TtyReadline, error) {
+ tty := TtyReadline{liner.NewLiner()}
+
+ /*
+ go func() {
+ c := make(chan os.Signal, 1)
+ signal.Notify(c, os.Interrupt, os.Kill)
+ sig := <-c
+ signal.Stop(c)
+
+ fmt.Fprintf(os.Stderr, "\nreceived signal: %v\n", sig)
+ tty.Close(historyfile)
+ }()
+ */
+
+ if len(historyfile) == 0 {
+ return tty, nil
+ }
+ f, err := os.Open(historyfile)
+ if err != nil {
+ return tty, err
+ }
+ defer f.Close()
+ _, err = tty.Term.ReadHistory(f)
+ return tty, err
+}
+
+func (tty TtyReadline) Read(prompt string) ([]byte, error) {
+ line, err := tty.Term.Prompt(prompt)
+ if len(line) >= 3 {
+ tty.Term.AppendHistory(line)
+ }
+ if n := len(line); n != 0 || err != io.EOF {
+ b := make([]byte, n+1)
+ copy(b, line)
+ b[n] = '\n'
+ b = bytes.Replace(b, paragraph_separator_bytes, nl_bytes, -1)
+ return b, err
+ }
+ return nil, err
+}
+
+func (tty TtyReadline) Close(historyfile string) (err error) {
+ if len(historyfile) == 0 {
+ return tty.Term.Close()
+ }
+ f, err1 := os.OpenFile(historyfile, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0666)
+ if err1 != nil {
+ err = fmt.Errorf("could not open %q to append history: %v", historyfile, err1)
+ } else {
+ defer f.Close()
+ _, err2 := tty.Term.WriteHistory(f)
+ if err2 != nil {
+ err = fmt.Errorf("could not write history to %q: %v", historyfile, err2)
+ }
+ }
+ err3 := tty.Term.Close()
+ if err3 != nil {
+ err = err3
+ }
+ return
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/signal.go b/vendor/github.com/cosmos72/gomacro/base/signal.go
new file mode 100644
index 0000000..78fe9f9
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/signal.go
@@ -0,0 +1,94 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * signal.go
+ *
+ * Created on: Apr 14, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package base
+
+import (
+ "fmt"
+ "os"
+ "os/signal"
+ "sync/atomic"
+ "unsafe"
+)
+
+// =======================================================================
+
+func StartSignalHandler(handler func(os.Signal)) chan os.Signal {
+ c := make(chan os.Signal, 1)
+ signal.Notify(c, os.Interrupt)
+ go signalHandlerGoroutine(c, handler)
+ return c
+}
+
+func StopSignalHandler(c chan os.Signal) {
+ close(c)
+}
+
+func signalHandlerGoroutine(c chan os.Signal, handler func(os.Signal)) {
+ for {
+ sig, ok := <-c
+ if !ok {
+ break
+ }
+ if handler != nil {
+ handler(sig)
+ }
+ }
+}
+
+// =======================================================================
+
+type Signal uint8
+
+const (
+ SigDefer Signal = 1 << iota // request to install a defer function
+ SigReturn
+ SigInterrupt // user pressed Ctrl+C, process received SIGINT, or similar
+ SigDebug // debugger asked to execute in single-step mode
+
+ SigNone = Signal(0) // no signal
+ SigAll = ^SigNone // mask of all possible signals
+)
+
+func (sig Signal) String() string {
+ var s string
+ switch sig {
+ case SigNone:
+ s = "// signal: none"
+ case SigDefer:
+ s = "// signal: defer"
+ case SigReturn:
+ s = "// signal: return"
+ case SigInterrupt:
+ s = "// signal: interrupt"
+ case SigDebug:
+ s = "// signal: debug"
+ default:
+ s = fmt.Sprintf("// signal: unknown(%d)", uint16(sig))
+ }
+ return s
+}
+
+type Signals struct {
+ Sync Signal
+ Debug Signal
+ Async Signal
+ _ Signal
+}
+
+func (s *Signals) IsEmpty() bool {
+ return atomic.LoadUint32((*uint32)(unsafe.Pointer(s))) == 0
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/string.go b/vendor/github.com/cosmos72/gomacro/base/string.go
index fb0b7be..ed17de1 100644
--- a/vendor/github.com/cosmos72/gomacro/base/string.go
+++ b/vendor/github.com/cosmos72/gomacro/base/string.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* string.go
@@ -50,6 +41,18 @@ func UnescapeString(str string) string {
return ret
}
+func MaybeUnescapeString(str string) string {
+ n := len(str)
+ if n >= 2 && (str[0] == '"' || str[0] == '`' || str[0] == '\'') && str[n-1] == str[0] {
+ ret, err := strconv.Unquote(str)
+ if err != nil {
+ Error(err)
+ }
+ return ret
+ }
+ return str
+}
+
func FindFirstToken(src []byte) int {
n := len(src)
const (
diff --git a/vendor/github.com/cosmos72/gomacro/base/types.go b/vendor/github.com/cosmos72/gomacro/base/type.go
similarity index 70%
rename from vendor/github.com/cosmos72/gomacro/base/types.go
rename to vendor/github.com/cosmos72/gomacro/base/type.go
index 5a0b954..9f82033 100644
--- a/vendor/github.com/cosmos72/gomacro/base/types.go
+++ b/vendor/github.com/cosmos72/gomacro/base/type.go
@@ -1,23 +1,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * types.go
+ * type.go
*
* Created on: Feb 19, 2017
* Author: Massimiliano Ghilardi
@@ -41,27 +32,31 @@ type Options uint
type WhichMacroExpand uint
const (
- OptTrapPanic Options = 1 << iota
- OptPanicStackTrace
- OptMacroExpandOnly // do not compile or execute code, only parse and macroexpand it
- OptFastInterpreter // use the new (and incomplete) fast interpreter
- OptCollectDeclarations
+ OptCollectDeclarations Options = 1 << iota
OptCollectStatements
- OptShowCompile
- OptShowEval
- OptShowEvalType
- OptShowMacroExpand
- OptShowParse
- OptShowPrompt
- OptShowTime
+ OptCtrlCEnterDebugger // Ctrl+C enters the debugger instead of injecting a panic. requires OptDebugger
+ OptDebugger // enable debugger support. "break" and _ = "break" are breakpoints and enter the debugger
+ OptKeepUntyped
+ OptMacroExpandOnly // do not compile or execute code, only parse and macroexpand it
+ OptPanicStackTrace
+ OptTrapPanic
OptDebugCallStack
+ OptDebugDebugger // print debug information related to the debugger
OptDebugField
+ OptDebugFromReflect
OptDebugMacroExpand
OptDebugMethod
- OptDebugPanicRecover
OptDebugParse
+ OptDebugRecover
OptDebugQuasiquote
OptDebugSleepOnSwitch // to torture-test "switch" implementation for race conditions
+ OptShowCompile
+ OptShowEval
+ OptShowEvalType
+ OptShowMacroExpand
+ OptShowParse
+ OptShowPrompt
+ OptShowTime
)
const (
@@ -71,27 +66,31 @@ const (
)
var optNames = map[Options]string{
- OptTrapPanic: "TrapPanic",
- OptPanicStackTrace: "StackTrace.OnPanic",
- OptMacroExpandOnly: "MacroExpandOnly",
- OptFastInterpreter: "FastInterpreter",
OptCollectDeclarations: "Declarations.Collect",
OptCollectStatements: "Statements.Collect",
- OptShowCompile: "Compile.Show",
- OptShowEval: "Eval.Show",
- OptShowEvalType: "Type.Eval.Show",
- OptShowMacroExpand: "MacroExpand.Show",
- OptShowParse: "Parse.Show",
- OptShowPrompt: "Prompt.Show",
- OptShowTime: "Time.Show",
+ OptCtrlCEnterDebugger: "CtrlC.Debugger.Enter",
+ OptDebugger: "Debugger",
+ OptKeepUntyped: "Untyped.Keep",
+ OptMacroExpandOnly: "MacroExpandOnly",
+ OptPanicStackTrace: "StackTrace.OnPanic",
+ OptTrapPanic: "Trap.Panic",
OptDebugCallStack: "?CallStack.Debug",
+ OptDebugDebugger: "?Debugger.Debug",
OptDebugField: "?Field.Debug",
+ OptDebugFromReflect: "?FromReflect.Debug",
OptDebugMacroExpand: "?MacroExpand.Debug",
OptDebugMethod: "?Method.Debug",
- OptDebugPanicRecover: "?PanicRecover.Debug",
OptDebugParse: "?Parse.Debug",
+ OptDebugRecover: "?Recover.Debug",
OptDebugQuasiquote: "?Quasiquote.Debug",
OptDebugSleepOnSwitch: "?SwitchSleep.Debug",
+ OptShowCompile: "Compile.Show",
+ OptShowEval: "Eval.Show",
+ OptShowEvalType: "Type.Eval.Show",
+ OptShowMacroExpand: "MacroExpand.Show",
+ OptShowParse: "Parse.Show",
+ OptShowPrompt: "Prompt.Show",
+ OptShowTime: "Time.Show",
}
var optValues = map[string]Options{}
diff --git a/vendor/github.com/cosmos72/gomacro/base/untyped.go b/vendor/github.com/cosmos72/gomacro/base/untyped.go
new file mode 100644
index 0000000..8475ef2
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/untyped.go
@@ -0,0 +1,181 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * untyped.go
+ *
+ * Created on May 27, 2017
+ * Author Massimiliano Ghilardi
+ */
+
+package base
+
+import (
+ "fmt"
+ "go/constant"
+ "go/token"
+ "go/types"
+ "math/big"
+ "reflect"
+ "strings"
+)
+
+type UntypedVal struct {
+ Kind reflect.Kind // default type. matches Val.Kind() except for rune literals, where Kind == reflect.Int32
+ Val constant.Value
+}
+
+func UntypedKindToReflectKind(gkind types.BasicKind) reflect.Kind {
+ var kind reflect.Kind
+ switch gkind {
+ case types.UntypedBool:
+ kind = reflect.Bool
+ case types.UntypedInt:
+ kind = reflect.Int
+ case types.UntypedRune:
+ kind = reflect.Int32
+ case types.UntypedFloat:
+ kind = reflect.Float64
+ case types.UntypedComplex:
+ kind = reflect.Complex128
+ case types.UntypedString:
+ kind = reflect.String
+ case types.UntypedNil:
+ kind = reflect.Invalid
+ default:
+ Errorf("unsupported types.BasicKind: %v", gkind)
+ }
+ return kind
+}
+
+func MarshalUntyped(kind reflect.Kind, val constant.Value) string {
+ lit := UntypedVal{kind, val}
+ return lit.Marshal()
+}
+
+func UnmarshalUntyped(marshalled string) (reflect.Kind, constant.Value) {
+ lit := UnmarshalUntypedVal(marshalled)
+ return lit.Kind, lit.Val
+}
+
+func (lit *UntypedVal) Marshal() string {
+ // untyped constants have arbitrary precision... they may overflow integers
+ val := lit.Val
+ var s string
+ switch lit.Kind {
+ case reflect.Invalid:
+ s = "nil"
+ case reflect.Bool:
+ if constant.BoolVal(val) {
+ s = "bool:true"
+ } else {
+ s = "bool:false"
+ }
+ case reflect.Int:
+ s = fmt.Sprintf("int:%s", val.ExactString())
+ case reflect.Int32:
+ s = fmt.Sprintf("rune:%s", val.ExactString())
+ case reflect.Float64:
+ s = fmt.Sprintf("float:%s", val.ExactString())
+ case reflect.Complex128:
+ s = fmt.Sprintf("complex:%s:%s", constant.Real(val).ExactString(), constant.Imag(val).ExactString())
+ case reflect.String:
+ s = fmt.Sprintf("string:%s", constant.StringVal(val))
+ }
+ return s
+}
+
+func UnmarshalUntypedVal(marshalled string) *UntypedVal {
+ var skind, str string
+ if sep := strings.IndexByte(marshalled, ':'); sep >= 0 {
+ skind = marshalled[:sep]
+ str = marshalled[sep+1:]
+ } else {
+ skind = marshalled
+ }
+
+ var kind reflect.Kind
+ var val constant.Value
+ switch skind {
+ case "bool":
+ kind = reflect.Bool
+ if str == "true" {
+ val = constant.MakeBool(true)
+ } else {
+ val = constant.MakeBool(false)
+ }
+ case "int":
+ kind = reflect.Int
+ val = constant.MakeFromLiteral(str, token.INT, 0)
+ case "rune":
+ kind = reflect.Int32
+ val = constant.MakeFromLiteral(str, token.INT, 0)
+ case "float":
+ kind = reflect.Float64
+ val = unmarshalUntypedFloat(str)
+ case "complex":
+ kind = reflect.Complex128
+ if sep := strings.IndexByte(str, ':'); sep >= 0 {
+ re := unmarshalUntypedFloat(str[:sep])
+ im := unmarshalUntypedFloat(str[sep+1:])
+ val = constant.BinaryOp(constant.ToComplex(re), token.ADD, constant.MakeImag(im))
+ } else {
+ val = constant.ToComplex(unmarshalUntypedFloat(str))
+ }
+ case "string":
+ kind = reflect.String
+ val = constant.MakeString(str)
+ case "nil":
+ kind = reflect.Invalid
+ default:
+ kind = reflect.Invalid
+ }
+ return &UntypedVal{kind, val}
+}
+
+// generalization of constant.MakeFromLiteral, accepts the fractions generated by
+// constant.Value.ExactString() for floating-point values
+func unmarshalUntypedFloat(str string) constant.Value {
+ if sep := strings.IndexByte(str, '/'); sep >= 0 {
+ x := constant.MakeFromLiteral(str[:sep], token.FLOAT, 0)
+ y := constant.MakeFromLiteral(str[sep+1:], token.FLOAT, 0)
+ return constant.BinaryOp(x, token.QUO, y)
+ }
+ return constant.MakeFromLiteral(str, token.FLOAT, 0)
+}
+
+func (lit *UntypedVal) BigInt() (*big.Int, error) {
+ val := lit.Val
+ switch lit.Kind {
+ case reflect.Int, reflect.Int32:
+ if i, ok := constant.Int64Val(val); ok {
+ return big.NewInt(i), nil
+ }
+ if bi, ok := new(big.Int).SetString(val.ExactString(), 10); ok {
+ return bi, nil
+ }
+ }
+ return nil, makeRuntimeError("cannot convert untyped %s to math/big.Int: %v", lit.Kind, lit.Val)
+}
+
+func (lit *UntypedVal) BigRat() (*big.Rat, error) {
+ val := lit.Val
+ switch lit.Kind {
+ case reflect.Int, reflect.Int32:
+ if i, ok := constant.Int64Val(val); ok {
+ return big.NewRat(i, 1), nil
+ }
+ fallthrough
+ case reflect.Float64:
+ if br, ok := new(big.Rat).SetString(val.ExactString()); ok {
+ return br, nil
+ }
+ }
+ return nil, makeRuntimeError("cannot convert untyped %s to math/big.Rat: %v", lit.Kind, lit.Val)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/untyped/global.go b/vendor/github.com/cosmos72/gomacro/base/untyped/global.go
new file mode 100644
index 0000000..85873b2
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/untyped/global.go
@@ -0,0 +1,73 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * global.go
+ *
+ * Created on Apr 25, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package untyped
+
+import (
+ "fmt"
+ "go/constant"
+ r "reflect"
+
+ xr "github.com/cosmos72/gomacro/xreflect"
+)
+
+// Lit represents an untyped literal value, i.e. an untyped constant
+type Lit struct {
+ Kind r.Kind // default type. matches Val.Kind() except for rune literals, where Kind == reflect.Int32
+ Val constant.Value
+ basicTypes *[]xr.Type
+}
+
+func MakeLit(kind r.Kind, val constant.Value, basicTypes *[]xr.Type) Lit {
+ return Lit{kind, val, basicTypes}
+}
+
+// pretty-print untyped constants
+func (untyp Lit) String() string {
+ val := untyp.Val
+ var strkind, strobj interface{} = untyp.Kind, nil
+ if untyp.Kind == r.Int32 {
+ strkind = "rune"
+ if val.Kind() == constant.Int {
+ if i, exact := constant.Int64Val(val); exact {
+ if i >= 0 && i <= 0x10FFFF {
+ strobj = fmt.Sprintf("%q", i)
+ }
+ }
+ }
+ }
+ if strobj == nil {
+ strobj = val.ExactString()
+ }
+ return fmt.Sprintf("{%v %v}", strkind, strobj)
+}
+
+func ConstantKindToUntypedLitKind(ckind constant.Kind) r.Kind {
+ ret := r.Invalid
+ switch ckind {
+ case constant.Bool:
+ ret = r.Bool
+ case constant.Int:
+ ret = r.Int // actually ambiguous, could be a rune - thus r.Int32
+ case constant.Float:
+ ret = r.Float64
+ case constant.Complex:
+ ret = r.Complex128
+ case constant.String:
+ ret = r.String
+ }
+ return ret
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/untyped/lit.go b/vendor/github.com/cosmos72/gomacro/base/untyped/lit.go
new file mode 100644
index 0000000..dfdc70d
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/base/untyped/lit.go
@@ -0,0 +1,433 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * literal.go
+ *
+ * Created on Apr 25, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package untyped
+
+import (
+ "go/constant"
+ "go/token"
+ "math/big"
+ r "reflect"
+ "unsafe"
+
+ "github.com/cosmos72/gomacro/base"
+ xr "github.com/cosmos72/gomacro/xreflect"
+)
+
+var (
+ rtypeOfPtrBigFloat = r.TypeOf((*big.Float)(nil))
+ rtypeOfPtrBigInt = r.TypeOf((*big.Int)(nil))
+ rtypeOfPtrBigRat = r.TypeOf((*big.Rat)(nil))
+)
+
+func (untyp *Lit) EqualInt64(i int64) bool {
+ val := untyp.Val
+ switch val.Kind() {
+ case constant.Int:
+ m, exact := constant.Int64Val(val)
+ return exact && m == i
+ case constant.Float:
+ m, exact := constant.Float64Val(val)
+ return exact && float64(int64(m)) == m && int64(m) == i
+ case constant.Complex:
+ m, exact := constant.Float64Val(constant.Imag(val))
+ if !exact || m != 0.0 {
+ return false
+ }
+ m, exact = constant.Float64Val(constant.Real(val))
+ return exact && float64(int64(m)) == m && int64(m) == i
+ default:
+ return false
+ }
+}
+
+var constantValZero = constant.MakeInt64(0)
+
+// ================================= Convert =================================
+
+// Convert checks that an UntypedLit can be converted exactly to the given type.
+// performs actual untyped -> typed conversion and subsequent overflow checks.
+// returns the constant.Value converted to given type
+func (untyp *Lit) Convert(t xr.Type) interface{} {
+ val := untyp.Val
+ var ret interface{}
+again:
+ switch t.Kind() {
+ case r.Bool:
+ if val.Kind() == constant.Bool {
+ ret = constant.BoolVal(val)
+ }
+ case r.Int, r.Int8, r.Int16, r.Int32, r.Int64,
+ r.Uint, r.Uint8, r.Uint16, r.Uint32, r.Uint64, r.Uintptr,
+ r.Float32, r.Float64:
+
+ if untyp.Kind == r.Complex128 && constant.Compare(constant.Imag(val), token.EQL, constantValZero) {
+ // allow conversion from untyped complex to untyped integer or float,
+ // provided that untyped complex has zero imaginary part.
+ //
+ // Required by the example var s uint = complex(1, 0)
+ // mentioned at https://golang.org/ref/spec#Complex_numbers
+ val = constant.Real(val)
+ }
+ fallthrough
+ case r.Complex64, r.Complex128:
+
+ n := untyp.extractNumber(val, t)
+ return ConvertLiteralCheckOverflow(n, t)
+ case r.Interface:
+ // this can happen too... for example in "var foo interface{} = 7"
+ // and it requires to convert the untyped constant to its default type.
+ // obviously, untyped constants can only implement empty interfaces
+ if t.NumMethod() == 0 {
+ t = untyp.DefaultType()
+ goto again
+ }
+ case r.Slice:
+ // https://golang.org/ref/spec#String_literals states:
+ //
+ // 4. Converting a value of a string type to a slice of bytes type
+ // yields a slice whose successive elements are the bytes of the string.
+ //
+ // 5. Converting a value of a string type to a slice of runes type
+ // yields a slice containing the individual Unicode code points of the string.
+ if val.Kind() == constant.String {
+ s := base.UnescapeString(val.ExactString())
+ switch t.Elem().Kind() {
+ case r.Uint8:
+ ret = []byte(s)
+ case r.Int32:
+ ret = []rune(s)
+ }
+ }
+ case r.String:
+ switch val.Kind() {
+ case constant.String:
+ // untyped string -> string
+ ret = base.UnescapeString(val.ExactString())
+ case constant.Int:
+ // https://golang.org/ref/spec#String_literals states:
+ //
+ // 1. Converting a signed or unsigned integer value to a string type yields
+ // a string containing the UTF-8 representation of the integer.
+ // Values outside the range of valid Unicode code points are converted to "\uFFFD".
+
+ i, exact := constant.Int64Val(val)
+ if exact {
+ ret = string(i)
+ } else {
+ ret = "\uFFFD"
+ }
+ }
+ case r.Ptr:
+ ret = untyp.toMathBig(t)
+ }
+ if ret == nil {
+ base.Errorf("cannot convert untyped constant %v to <%v>", untyp, t)
+ return nil
+ }
+ v := r.ValueOf(ret)
+ if v.Type() != t.ReflectType() {
+ ret = v.Convert(t.ReflectType())
+ }
+ return ret
+}
+
+// EXTENSION: conversion from untyped constant to big.Int, bit.Rat, big.Float
+func (untyp *Lit) toMathBig(t xr.Type) interface{} {
+ var ret interface{}
+ if k := untyp.Val.Kind(); k == constant.Int || k == constant.Float {
+ switch t.ReflectType() {
+ case rtypeOfPtrBigInt:
+ if a := untyp.BigInt(); a != nil {
+ ret = a
+ }
+ case rtypeOfPtrBigRat:
+ if a := untyp.BigRat(); a != nil {
+ ret = a
+ }
+ case rtypeOfPtrBigFloat:
+ if a := untyp.BigFloat(); a != nil {
+ ret = a
+ }
+ }
+ }
+ return ret
+}
+
+func (untyp *Lit) BigInt() *big.Int {
+ var b big.Int
+ var ret *big.Int
+
+ if i, exact := untyp.Int64(); exact {
+ ret = b.SetInt64(i)
+ } else if n, exact := untyp.Uint64(); exact {
+ ret = b.SetUint64(n)
+ } else if i := untyp.rawBigInt(); i != nil {
+ ret = b.Set(i)
+ } else if r := untyp.rawBigRat(); r != nil {
+ if !r.IsInt() {
+ return nil
+ }
+ ret = b.Set(r.Num())
+ } else if f := untyp.rawBigFloat(); f != nil {
+ if !f.IsInt() {
+ return nil
+ }
+ if i, acc := f.Int(&b); acc == big.Exact {
+ if i != &b {
+ b.Set(i)
+ }
+ ret = &b
+ }
+ }
+ if ret == nil {
+ // no luck... try to go through string representation
+ s := untyp.Val.ExactString()
+ if _, ok := b.SetString(s, 0); ok {
+ ret = &b
+ }
+ }
+ return ret
+}
+
+func (untyp *Lit) BigRat() *big.Rat {
+ var b big.Rat
+ var ret *big.Rat
+
+ if i, exact := untyp.Int64(); exact {
+ ret = b.SetInt64(i)
+ } else if i := untyp.rawBigInt(); i != nil {
+ ret = b.SetInt(i)
+ } else if r := untyp.rawBigRat(); r != nil {
+ ret = b.Set(r)
+ } else if f := untyp.rawBigFloat(); f != nil {
+ if f.IsInt() {
+ if i, acc := f.Int(nil); acc == big.Exact {
+ ret = b.SetInt(i)
+ }
+ }
+ }
+
+ if ret == nil {
+ // no luck... try to go through string representation
+ s := untyp.Val.ExactString()
+ _, ok := b.SetString(s)
+ if ok {
+ ret = &b
+ }
+ }
+ return ret
+}
+
+func (untyp *Lit) BigFloat() *big.Float {
+ var b big.Float
+ var ret *big.Float
+
+ if i, exact := untyp.Int64(); exact {
+ ret = b.SetInt64(i)
+ // Debugf("UntypedLit.BigFloat(): converted int64 %v to *big.Float %v", i, b)
+ } else if f, exact := untyp.Float64(); exact {
+ ret = b.SetFloat64(f)
+ // Debugf("UntypedLit.BigFloat(): converted float64 %v to *big.Float %v", f, b)
+ } else if i := untyp.rawBigInt(); i != nil {
+ ret = b.SetInt(i)
+ // Debugf("UntypedLit.BigFloat(): converted *big.Int %v to *big.Float %v", *i, b)
+ } else if r := untyp.rawBigRat(); r != nil {
+ ret = b.SetRat(r)
+ // Debugf("UntypedLit.BigFloat(): converted *big.Rat %v to *big.Float %v", *r, b)
+ } else if f := untyp.rawBigFloat(); f != nil {
+ ret = b.Set(f)
+ // Debugf("UntypedLit.BigFloat(): converted *big.Float %v to *big.Float %v", *f, b)
+ }
+
+ if ret == nil {
+ // no luck... try to go through string representation
+ s := untyp.Val.ExactString()
+ snum, sden := base.Split2(s, '/')
+ _, ok := b.SetString(snum)
+ if ok && len(sden) != 0 {
+ var b2 big.Float
+ if _, ok = b2.SetString(sden); ok {
+ b.Quo(&b, &b2)
+ }
+ }
+ if ok {
+ ret = &b
+ // Debugf("UntypedLit.BigFloat(): converted constant.Value %v %v to *big.Float %v", untyp.Val.Kind(), s, b)
+ }
+ }
+ return ret
+}
+
+func (untyp *Lit) Int64() (int64, bool) {
+ if c := untyp.Val; c.Kind() == constant.Int {
+ return constant.Int64Val(c)
+ }
+ return 0, false
+}
+
+func (untyp *Lit) Uint64() (uint64, bool) {
+ if c := untyp.Val; c.Kind() == constant.Int {
+ return constant.Uint64Val(c)
+ }
+ return 0, false
+}
+
+func (untyp *Lit) Float64() (float64, bool) {
+ if c := untyp.Val; c.Kind() == constant.Float {
+ return constant.Float64Val(c)
+ }
+ return 0, false
+}
+
+func (untyp *Lit) rawBigInt() *big.Int {
+ if untyp.Val.Kind() != constant.Int {
+ return nil
+ }
+ v := r.ValueOf(untyp.Val)
+ if v.Kind() == r.Struct {
+ v = v.Field(0)
+ }
+ if v.Type() != r.TypeOf((*big.Int)(nil)) {
+ return nil
+ }
+ return (*big.Int)(unsafe.Pointer(v.Pointer()))
+}
+
+func (untyp *Lit) rawBigRat() *big.Rat {
+ if untyp.Val.Kind() != constant.Float {
+ return nil
+ }
+ v := r.ValueOf(untyp.Val)
+ if v.Kind() == r.Struct {
+ v = v.Field(0)
+ }
+ if v.Type() != r.TypeOf((*big.Rat)(nil)) {
+ return nil
+ }
+ return (*big.Rat)(unsafe.Pointer(v.Pointer()))
+}
+
+func (untyp *Lit) rawBigFloat() *big.Float {
+ if untyp.Val.Kind() != constant.Float {
+ return nil
+ }
+ v := r.ValueOf(untyp.Val)
+ if v.Kind() == r.Struct {
+ v = v.Field(0)
+ }
+ if v.Type() != r.TypeOf((*big.Float)(nil)) {
+ return nil
+ }
+ return (*big.Float)(unsafe.Pointer(v.Pointer()))
+}
+
+// ================================= DefaultType =================================
+
+// DefaultType returns the default type of an untyped constant.
+func (untyp *Lit) DefaultType() xr.Type {
+ switch untyp.Kind {
+ case r.Bool, r.Int32, r.Int, r.Uint, r.Float64, r.Complex128, r.String:
+ if basicTypes := untyp.basicTypes; basicTypes == nil {
+ base.Errorf("UntypedLit.DefaultType(): malformed untyped constant %v, has nil BasicTypes!", untyp)
+ return nil
+ } else {
+ return (*basicTypes)[untyp.Kind]
+ }
+
+ default:
+ base.Errorf("unexpected untyped constant %v, its default type is not known", untyp)
+ return nil
+ }
+}
+
+// ======================= utilities for Convert =======================
+
+// extractNumber converts the untyped constant src to an integer, float or complex.
+// panics if src has different kind from constant.Int, constant.Float and constant.Complex
+// the receiver (untyp UntypedLit) and the second argument (t reflect.Type) are only used to pretty-print the panic error message
+func (untyp *Lit) extractNumber(src constant.Value, t xr.Type) interface{} {
+ var n interface{}
+ cat := base.KindToCategory(t.Kind())
+ var exact bool
+ switch src.Kind() {
+ case constant.Int:
+ switch cat {
+ case r.Int:
+ n, exact = constant.Int64Val(src)
+ case r.Uint:
+ n, exact = constant.Uint64Val(src)
+ default:
+ n, exact = constant.Int64Val(src)
+ if !exact {
+ n, exact = constant.Uint64Val(src)
+ }
+ }
+ case constant.Float:
+ n, exact = constant.Float64Val(src)
+ case constant.Complex:
+ re := untyp.extractNumber(constant.Real(src), t)
+ im := untyp.extractNumber(constant.Imag(src), t)
+ rfloat := r.ValueOf(re).Convert(base.TypeOfFloat64).Float()
+ ifloat := r.ValueOf(im).Convert(base.TypeOfFloat64).Float()
+ n = complex(rfloat, ifloat)
+ exact = true
+ default:
+ base.Errorf("cannot convert untyped constant %v to <%v>", untyp, t)
+ return nil
+ }
+ // allow inexact conversions to float64 and complex128:
+ // floating point is intrinsically inexact, and Go compiler allows them too
+ if !exact && (cat == r.Int || cat == r.Uint) {
+ base.Errorf("untyped constant %v overflows <%v>", untyp, t)
+ return nil
+ }
+ return n
+}
+
+// ConvertLiteralCheckOverflow converts a literal to type t and returns the converted value.
+// panics if the conversion overflows the given type
+func ConvertLiteralCheckOverflow(src interface{}, to xr.Type) interface{} {
+ v := r.ValueOf(src)
+ rto := to.ReflectType()
+ vto := base.ConvertValue(v, rto)
+
+ k, kto := v.Kind(), vto.Kind()
+ if k == kto {
+ return vto.Interface() // no numeric conversion happened
+ }
+ c, cto := base.KindToCategory(k), base.KindToCategory(kto)
+ if cto == r.Int || cto == r.Uint {
+ if c == r.Float64 || c == r.Complex128 {
+ // float-to-integer conversion. check for truncation
+ t1 := base.ValueType(v)
+ vback := base.ConvertValue(vto, t1)
+ if src != vback.Interface() {
+ base.Errorf("constant %v truncated to %v", src, to)
+ return nil
+ }
+ } else {
+ // integer-to-integer conversion. convert back and compare the interfaces for overflows
+ t1 := base.ValueType(v)
+ vback := vto.Convert(t1)
+ if src != vback.Interface() {
+ base.Errorf("constant %v overflows <%v>", src, to)
+ return nil
+ }
+ }
+ }
+ return vto.Interface()
+}
diff --git a/vendor/github.com/cosmos72/gomacro/base/util.go b/vendor/github.com/cosmos72/gomacro/base/util.go
index 1e0266f..d26dd25 100644
--- a/vendor/github.com/cosmos72/gomacro/base/util.go
+++ b/vendor/github.com/cosmos72/gomacro/base/util.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* util.go
@@ -26,14 +17,30 @@
package base
import (
+ "go/build"
+ "os"
r "reflect"
+ "strings"
+
+ xr "github.com/cosmos72/gomacro/xreflect"
)
-func PackValues(val0 r.Value, vals []r.Value) []r.Value {
- if len(vals) == 0 && val0 != None {
- vals = []r.Value{val0}
+func PackValues(val0 r.Value, values []r.Value) []r.Value {
+ if len(values) == 0 && val0 != None {
+ values = []r.Value{val0}
+ }
+ return values
+}
+
+func PackTypes(typ0 xr.Type, types []xr.Type) []xr.Type {
+ if len(types) == 0 && typ0 != nil {
+ types = []xr.Type{typ0}
}
- return vals
+ return types
+}
+
+func PackValuesAndTypes(val0 r.Value, values []r.Value, typ0 xr.Type, types []xr.Type) ([]r.Value, []xr.Type) {
+ return PackValues(val0, values), PackTypes(typ0, types)
}
func UnpackValues(vals []r.Value) (r.Value, []r.Value) {
@@ -46,18 +53,18 @@ func UnpackValues(vals []r.Value) (r.Value, []r.Value) {
// ValueInterface() is a zero-value-safe version of reflect.Value.Interface()
func ValueInterface(v r.Value) interface{} {
- if v == Nil || v == None || !v.IsValid() || !v.CanInterface() {
+ if !v.IsValid() || !v.CanInterface() || v == None {
return nil
}
return v.Interface()
}
// ValueType() is a zero-value-safe version of reflect.Value.Type()
-func ValueType(v r.Value) r.Type {
- if v == Nil || v == None || !v.IsValid() {
+func ValueType(value r.Value) r.Type {
+ if !value.IsValid() || value == None {
return nil
}
- return v.Type()
+ return value.Type()
}
func IsNillableKind(k r.Kind) bool {
@@ -69,3 +76,50 @@ func IsNillableKind(k r.Kind) bool {
return false
}
}
+
+// split 's' into a prefix and suffix separated by 'separator'.
+// suffix is trimmed with strings.TrimSpace() before returning it
+func Split2(s string, separator rune) (string, string) {
+ var prefix, suffix string
+ if space := strings.IndexByte(s, ' '); space > 0 {
+ prefix = s[:space]
+ suffix = strings.TrimSpace(s[space+1:])
+ } else {
+ prefix = s
+ }
+ return prefix, suffix
+}
+
+// always use forward slashes. they work also on Windows...
+func unixpath(path string) string {
+ if os.PathSeparator != '/' && len(path) != 0 {
+ path = strings.Replace(path, string(os.PathSeparator), "/", -1)
+ }
+ return path
+}
+
+// find user's home directory, see https://stackoverflow.com/questions/2552416/how-can-i-find-the-users-home-dir-in-a-cross-platform-manner-using-c
+// without importing "os/user" - which requires cgo to work thus makes cross-compile difficult, see https://github.com/golang/go/issues/11797
+func UserHomeDir() string {
+ home := os.Getenv("HOME")
+ if len(home) == 0 {
+ home = os.Getenv("USERPROFILE")
+ if len(home) == 0 {
+ home = os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
+ }
+ }
+ return unixpath(home)
+}
+
+func Subdir(dirs ...string) string {
+ // should use string(os.PathSeparator) instead of "/', but:
+ // 1) package names use '/', not os.PathSeparator
+ // 2) it would complicate DirName()
+ return strings.Join(dirs, "/")
+}
+
+var (
+ GoSrcDir = Subdir(build.Default.GOPATH, "src")
+
+ GomacroDir = Subdir(GoSrcDir, "github.com", "cosmos72", "gomacro") // vendored copies of gomacro may need to change this
+)
diff --git a/vendor/github.com/cosmos72/gomacro/base/x_package.go b/vendor/github.com/cosmos72/gomacro/base/x_package.go
index ebf9670..101f4b4 100644
--- a/vendor/github.com/cosmos72/gomacro/base/x_package.go
+++ b/vendor/github.com/cosmos72/gomacro/base/x_package.go
@@ -20,31 +20,37 @@ func init() {
"Debugf": r.ValueOf(Debugf),
"DefaultImporter": r.ValueOf(DefaultImporter),
"DescendNestedUnquotes": r.ValueOf(DescendNestedUnquotes),
+ "DirName": r.ValueOf(DirName),
"DuplicateNestedUnquotes": r.ValueOf(DuplicateNestedUnquotes),
"Error": r.ValueOf(Error),
"Errorf": r.ValueOf(Errorf),
"False": r.ValueOf(&False).Elem(),
+ "FileName": r.ValueOf(FileName),
"FindFirstToken": r.ValueOf(FindFirstToken),
+ "GoSrcDir": r.ValueOf(&GoSrcDir).Elem(),
+ "GomacroDir": r.ValueOf(&GomacroDir).Elem(),
"ImBuiltin": r.ValueOf(ImBuiltin),
"ImInception": r.ValueOf(ImInception),
- "ImSharedLib": r.ValueOf(ImSharedLib),
+ "ImPlugin": r.ValueOf(ImPlugin),
+ "ImThirdParty": r.ValueOf(ImThirdParty),
"IsCategory": r.ValueOf(IsCategory),
"IsGensym": r.ValueOf(IsGensym),
- "IsGensymEmbedded": r.ValueOf(IsGensymEmbedded),
+ "IsGensymAnonymous": r.ValueOf(IsGensymAnonymous),
"IsGensymInterface": r.ValueOf(IsGensymInterface),
"IsGensymPrivate": r.ValueOf(IsGensymPrivate),
"IsNillableKind": r.ValueOf(IsNillableKind),
"IsOptimizedKind": r.ValueOf(IsOptimizedKind),
"KindToCategory": r.ValueOf(KindToCategory),
"KindToType": r.ValueOf(KindToType),
+ "MakeBufReadline": r.ValueOf(MakeBufReadline),
"MakeQuote": r.ValueOf(MakeQuote),
"MakeQuote2": r.ValueOf(MakeQuote2),
+ "MakeTtyReadline": r.ValueOf(MakeTtyReadline),
"MarshalUntyped": r.ValueOf(MarshalUntyped),
"MaxInt": r.ValueOf(MaxInt),
"MaxUint": r.ValueOf(MaxUint),
"MaxUint16": r.ValueOf(MaxUint16),
"MinInt": r.ValueOf(MinInt),
- "MinUint": r.ValueOf(MinUint),
"NewGlobals": r.ValueOf(NewGlobals),
"Nil": r.ValueOf(&Nil).Elem(),
"None": r.ValueOf(&None).Elem(),
@@ -53,13 +59,13 @@ func init() {
"OptCollectStatements": r.ValueOf(OptCollectStatements),
"OptDebugCallStack": r.ValueOf(OptDebugCallStack),
"OptDebugField": r.ValueOf(OptDebugField),
+ "OptDebugFromReflect": r.ValueOf(OptDebugFromReflect),
"OptDebugMacroExpand": r.ValueOf(OptDebugMacroExpand),
"OptDebugMethod": r.ValueOf(OptDebugMethod),
- "OptDebugPanicRecover": r.ValueOf(OptDebugPanicRecover),
+ "OptDebugPanicRecover": r.ValueOf(OptDebugRecover),
"OptDebugParse": r.ValueOf(OptDebugParse),
"OptDebugQuasiquote": r.ValueOf(OptDebugQuasiquote),
"OptDebugSleepOnSwitch": r.ValueOf(OptDebugSleepOnSwitch),
- "OptFastInterpreter": r.ValueOf(OptFastInterpreter),
"OptMacroExpandOnly": r.ValueOf(OptMacroExpandOnly),
"OptPanicStackTrace": r.ValueOf(OptPanicStackTrace),
"OptShowCompile": r.ValueOf(OptShowCompile),
@@ -71,18 +77,29 @@ func init() {
"OptShowTime": r.ValueOf(OptShowTime),
"OptTrapPanic": r.ValueOf(OptTrapPanic),
"PackValues": r.ValueOf(PackValues),
+ "PackTypes": r.ValueOf(PackTypes),
"ParseOptions": r.ValueOf(ParseOptions),
"ReadBytes": r.ValueOf(ReadBytes),
"ReadMultiline": r.ValueOf(ReadMultiline),
"ReadOptCollectAllComments": r.ValueOf(ReadOptCollectAllComments),
"ReadOptShowPrompt": r.ValueOf(ReadOptShowPrompt),
"ReadString": r.ValueOf(ReadString),
+ "RemoveLastByte": r.ValueOf(RemoveLastByte),
+ "ShowPackageHeader": r.ValueOf(ShowPackageHeader),
+ "SigAll": r.ValueOf(SigAll),
+ "SigDefer": r.ValueOf(SigDefer),
+ "SigInterrupt": r.ValueOf(SigInterrupt),
+ "SigNone": r.ValueOf(SigNone),
+ "SigReturn": r.ValueOf(SigReturn),
"SimplifyAstForQuote": r.ValueOf(SimplifyAstForQuote),
"SimplifyNodeForQuote": r.ValueOf(SimplifyNodeForQuote),
+ "StartSignalHandler": r.ValueOf(StartSignalHandler),
+ "StopSignalHandler": r.ValueOf(StopSignalHandler),
"StrGensym": r.ValueOf(StrGensym),
- "StrGensymEmbedded": r.ValueOf(StrGensymEmbedded),
+ "StrGensymAnonymous": r.ValueOf(StrGensymAnonymous),
"StrGensymInterface": r.ValueOf(StrGensymInterface),
"StrGensymPrivate": r.ValueOf(StrGensymPrivate),
+ "Subdir": r.ValueOf(Subdir),
"True": r.ValueOf(&True).Elem(),
"TypeOfBool": r.ValueOf(&TypeOfBool).Elem(),
"TypeOfByte": r.ValueOf(&TypeOfByte).Elem(),
@@ -117,8 +134,6 @@ func init() {
"TypeOfPtrUintptr": r.ValueOf(&TypeOfPtrUintptr).Elem(),
"TypeOfReflectType": r.ValueOf(&TypeOfReflectType).Elem(),
"TypeOfRune": r.ValueOf(&TypeOfRune).Elem(),
- "TypeOfSliceOfByte": r.ValueOf(&TypeOfSliceOfByte).Elem(),
- "TypeOfSliceOfInterface": r.ValueOf(&TypeOfSliceOfInterface).Elem(),
"TypeOfString": r.ValueOf(&TypeOfString).Elem(),
"TypeOfUint": r.ValueOf(&TypeOfUint).Elem(),
"TypeOfUint16": r.ValueOf(&TypeOfUint16).Elem(),
@@ -129,17 +144,22 @@ func init() {
"UnescapeChar": r.ValueOf(UnescapeChar),
"UnescapeString": r.ValueOf(UnescapeString),
"UnmarshalUntyped": r.ValueOf(UnmarshalUntyped),
+ "UnmarshalUntypedVal": r.ValueOf(UnmarshalUntypedVal),
"UnpackValues": r.ValueOf(UnpackValues),
+ "UntypedKindToReflectKind": r.ValueOf(UntypedKindToReflectKind),
"UnwrapTrivialAst": r.ValueOf(UnwrapTrivialAst),
"UnwrapTrivialAstKeepBlocks": r.ValueOf(UnwrapTrivialAstKeepBlocks),
"UnwrapTrivialNode": r.ValueOf(UnwrapTrivialNode),
+ "UserHomeDir": r.ValueOf(UserHomeDir),
"ValueInterface": r.ValueOf(ValueInterface),
"ValueType": r.ValueOf(ValueType),
"Warnf": r.ValueOf(Warnf),
"ZeroStrings": r.ValueOf(&ZeroStrings).Elem(),
"ZeroTypes": r.ValueOf(&ZeroTypes).Elem(),
"ZeroValues": r.ValueOf(&ZeroValues).Elem(),
- }, Types: map[string]r.Type{
+ },
+ Types: map[string]r.Type{
+ "BufReadline": r.TypeOf((*BufReadline)(nil)).Elem(),
"Globals": r.TypeOf((*Globals)(nil)).Elem(),
"ImportMode": r.TypeOf((*ImportMode)(nil)).Elem(),
"Importer": r.TypeOf((*Importer)(nil)).Elem(),
@@ -147,20 +167,33 @@ func init() {
"Output": r.TypeOf((*Output)(nil)).Elem(),
"PackageRef": r.TypeOf((*PackageRef)(nil)).Elem(),
"ReadOptions": r.TypeOf((*ReadOptions)(nil)).Elem(),
+ "Readline": r.TypeOf((*Readline)(nil)).Elem(),
"RuntimeError": r.TypeOf((*RuntimeError)(nil)).Elem(),
+ "Signal": r.TypeOf((*Signal)(nil)).Elem(),
+ "Signals": r.TypeOf((*Signals)(nil)).Elem(),
"Stringer": r.TypeOf((*Stringer)(nil)).Elem(),
+ "TtyReadline": r.TypeOf((*TtyReadline)(nil)).Elem(),
"TypeVisitor": r.TypeOf((*TypeVisitor)(nil)).Elem(),
+ "UntypedVal": r.TypeOf((*UntypedVal)(nil)).Elem(),
"WhichMacroExpand": r.TypeOf((*WhichMacroExpand)(nil)).Elem(),
- }, Untypeds: map[string]string{
- "MinUint": "int:0",
- "StrGensym": "string:𒒭",
- "StrGensymEmbedded": "string:»",
- "StrGensymInterface": "string:\u0080",
- "StrGensymPrivate": "string:\u00ad",
- }, Wrappers: map[string][]string{
- "Globals": []string{"CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "IncLine", "IncLineBytes", "Position", "Sprintf", "ToString", "WarnExtraValues", "Warnf"},
- "Output": []string{"Copy", "Errorf", "Fprintf", "IncLine", "IncLineBytes", "Position", "Sprintf", "ToString"},
- "PackageRef": []string{"Init", "Merge", "SaveToPackages"},
+ },
+ Proxies: map[string]r.Type{
+ "Readline": r.TypeOf((*P_github_com_cosmos72_gomacro_base_Readline)(nil)).Elem(),
+ },
+ Wrappers: map[string][]string{
+ "Globals": []string{"CollectPackageImportsWithRename", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "IncLine", "IncLineBytes", "MakeRuntimeError", "Position", "Sprintf", "ToString", "WarnExtraValues", "Warnf"},
+ "Output": []string{"Copy", "Errorf", "Fprintf", "IncLine", "IncLineBytes", "MakeRuntimeError", "Position", "Sprintf", "ToString"},
+ "PackageRef": []string{"LazyInit", "Merge"},
},
}
}
+
+// --------------- proxy for github.com/cosmos72/gomacro/base.Readline ---------------
+type P_github_com_cosmos72_gomacro_base_Readline struct {
+ Object interface{}
+ Read_ func(_proxy_obj_ interface{}, prompt string) ([]byte, error)
+}
+
+func (P *P_github_com_cosmos72_gomacro_base_Readline) Read(prompt string) ([]byte, error) {
+ return P.Read_(P.Object, prompt)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/benchmark_test.go b/vendor/github.com/cosmos72/gomacro/benchmark_test.go
index 76eb6d3..501933c 100644
--- a/vendor/github.com/cosmos72/gomacro/benchmark_test.go
+++ b/vendor/github.com/cosmos72/gomacro/benchmark_test.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* expr_test.go
@@ -26,27 +17,31 @@ package main
import (
"fmt"
+ "os"
r "reflect"
"testing"
+ "unsafe"
- // . "github.com/cosmos72/gomacro/base"
"github.com/cosmos72/gomacro/classic"
"github.com/cosmos72/gomacro/experiments/bytecode_interfaces"
"github.com/cosmos72/gomacro/experiments/bytecode_values"
"github.com/cosmos72/gomacro/experiments/closure_interfaces"
+ "github.com/cosmos72/gomacro/experiments/closure_ints"
"github.com/cosmos72/gomacro/experiments/closure_maps"
"github.com/cosmos72/gomacro/experiments/closure_values"
+ "github.com/cosmos72/gomacro/experiments/jit"
"github.com/cosmos72/gomacro/fast"
)
-const (
- collatz_n = 837799 // sequence climbs to 1487492288, which also fits 32-bit ints
- sum_n = 1000
- fib_n = 12
- bigswitch_n = 100
-)
+var (
+ collatz_arg = uint(837799) // sequence climbs to 1487492288, which also fits 32-bit ints
+ collatz_arg_int = int(837799)
+ sum_arg = 1000
+ fib_arg = 12
+ bigswitch_arg = 100
-var verbose = false
+ verbose = len(os.Args) == 0
+)
/*
--------- 2017-05-21: results on Intel Core i7 4770 ---------------
@@ -100,7 +95,7 @@ func fibonacci(n int) int {
func BenchmarkFibonacciCompiler(b *testing.B) {
var total int
- n := fib_n
+ n := fib_arg
for i := 0; i < b.N; i++ {
total += fibonacci(n)
}
@@ -114,7 +109,7 @@ func BenchmarkFibonacciFast(b *testing.B) {
ir.Eval(fibonacci_source_string)
// compile the call to fibonacci(fib_n)
- expr := ir.Compile(fmt.Sprintf("fibonacci(%d)", fib_n))
+ expr := ir.Compile(fmt.Sprintf("fibonacci(%d)", fib_arg))
fun := expr.Fun.(func(*fast.Env) int)
env := ir.PrepareEnv()
@@ -138,12 +133,12 @@ func BenchmarkFibonacciFast2(b *testing.B) {
// dereferencing the address returned by AddressOfVar is faster)
fun := ir.ValueOf("fibonacci").Interface().(func(int) int)
- fun(fib_n) // warm up
+ fun(fib_arg) // warm up
b.ResetTimer()
var total int
for i := 0; i < b.N; i++ {
- total += fun(fib_n)
+ total += fun(fib_arg)
}
}
@@ -152,7 +147,7 @@ func BenchmarkFibonacciClassic(b *testing.B) {
ir.Eval(fibonacci_source_string)
// compile the call to fibonacci(fib_n)
- form := ir.Parse(fmt.Sprintf("fibonacci(%d)", fib_n))
+ form := ir.Parse(fmt.Sprintf("fibonacci(%d)", fib_arg))
b.ResetTimer()
var total int
@@ -168,19 +163,41 @@ func BenchmarkFibonacciClassic2(b *testing.B) {
// alternative: extract the function fibonacci, and call it ourselves
fun := ir.ValueOf("fibonacci").Interface().(func(int) int)
- fun(fib_n) // warm up
+ fun(fib_arg) // warm up
+
+ b.ResetTimer()
+ var total int
+ for i := 0; i < b.N; i++ {
+ total += fun(fib_arg)
+ }
+}
+
+func off_TestFibonacciClosureInts(t *testing.T) {
+ env := closure_ints.NewEnv(nil)
+ f := closure_ints.DeclFibonacci(env)
+
+ expected := fibonacci(fib_arg)
+ actual := f(fib_arg)
+ if actual != expected {
+ t.Errorf("expecting %v, found %v\n", expected, actual)
+ }
+}
+
+func BenchmarkFibonacciClosureInts(b *testing.B) {
+ env := closure_ints.NewEnv(nil)
+ fib := closure_ints.DeclFibonacci(env)
b.ResetTimer()
var total int
for i := 0; i < b.N; i++ {
- total += fun(fib_n)
+ total += fib(fib_arg)
}
}
func BenchmarkFibonacciClosureValues(b *testing.B) {
env := closure_values.NewEnv(nil)
fib := closure_values.DeclFibonacci(env, 0)
- n := r.ValueOf(fib_n)
+ n := r.ValueOf(fib_arg)
b.ResetTimer()
var total int
@@ -192,7 +209,7 @@ func BenchmarkFibonacciClosureValues(b *testing.B) {
func BenchmarkFibonacciClosureInterfaces(b *testing.B) {
env := closure_interfaces.NewEnv(nil)
fib := closure_interfaces.DeclFibonacci(env, 0)
- var n interface{} = fib_n
+ var n interface{} = fib_arg
b.ResetTimer()
var total int
@@ -204,7 +221,7 @@ func BenchmarkFibonacciClosureInterfaces(b *testing.B) {
func BenchmarkFibonacciClosureMaps(b *testing.B) {
env := closure_maps.NewEnv(nil)
fib := closure_maps.DeclFibonacci(env, "fib")
- n := r.ValueOf(fib_n)
+ n := r.ValueOf(fib_arg)
b.ResetTimer()
var total int
@@ -331,7 +348,7 @@ func bigswitch(n int) int {
func BenchmarkSwitchCompiler(b *testing.B) {
var total int
for i := 0; i < b.N; i++ {
- total += bigswitch(bigswitch_n)
+ total += bigswitch(bigswitch_arg)
}
if verbose {
println(total)
@@ -343,12 +360,12 @@ func BenchmarkSwitchFast(b *testing.B) {
ir.Eval(switch_source_string)
fun := ir.ValueOf("bigswitch").Interface().(func(int) int)
- fun(bigswitch_n)
+ fun(bigswitch_arg)
b.ResetTimer()
var total int
for i := 0; i < b.N; i++ {
- total += fun(bigswitch_n)
+ total += fun(bigswitch_arg)
}
}
@@ -357,26 +374,29 @@ func BenchmarkSwitchClassic(b *testing.B) {
ir.Eval(switch_source_string)
fun := ir.ValueOf("bigswitch").Interface().(func(int) int)
- fun(bigswitch_n)
+ fun(bigswitch_arg)
b.ResetTimer()
var total int
for i := 0; i < b.N; i++ {
- total += fun(bigswitch_n)
+ total += fun(bigswitch_arg)
}
}
// ---------------- simple arithmetic ------------------
+//go:noinline
func arith(n int) int {
- return ((n*2+3)&4 | 5 ^ 6) / (n | 1)
+ return ((((n*2 + 3) | 4) &^ 5) ^ 6) / ((n & 2) | 1)
}
+const arith_source = "((((n*2+3)|4) &^ 5) ^ 6) / ((n & 2) | 1)"
+
func BenchmarkArithCompiler1(b *testing.B) {
total := 0
for i := 0; i < b.N; i++ {
n := b.N
- total += ((n*2+3)&4 | 5 ^ 6) / (n | 1)
+ total += ((((n*2 + 3) | 4) &^ 5) ^ 6) / ((n & 2) | 1)
}
if verbose {
println(total)
@@ -393,13 +413,54 @@ func BenchmarkArithCompiler2(b *testing.B) {
}
}
+func arithJitEmulate(uenv *uint64) {
+ env := (*[3]int64)(unsafe.Pointer(uenv))
+ a := env[0]
+ a *= 2
+ a += 3
+ a |= 4
+ a &^= 5
+ a ^= 6
+ b := env[0]
+ b &= 2
+ b |= 1
+ a /= b
+ env[1] = a
+}
+
+func BenchmarkArithJitEmul(b *testing.B) {
+ benchArithJit(b, arithJitEmulate)
+}
+
+func BenchmarkArithJit(b *testing.B) {
+ if !jit.SUPPORTED {
+ b.SkipNow()
+ return
+ }
+ benchArithJit(b, jit.DeclArith(5))
+}
+
+func benchArithJit(b *testing.B, f func(*uint64)) {
+ total := 0
+ var env [5]uint64
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ env[0] = uint64(b.N)
+ f(&env[0])
+ total += int(env[1])
+ }
+ if verbose {
+ println(total)
+ }
+}
+
func BenchmarkArithFast(b *testing.B) {
ir := fast.New()
ir.DeclVar("n", nil, int(0))
addr := ir.AddressOfVar("n").Interface().(*int)
- expr := ir.Compile("((n*2+3)&4 | 5 ^ 6) / (n|1)")
+ expr := ir.Compile(arith_source)
fun := expr.Fun.(func(*fast.Env) int)
env := ir.PrepareEnv()
fun(env)
@@ -424,7 +485,7 @@ func BenchmarkArithFast2(b *testing.B) {
total := ir.AddressOfVar("total").Interface().(*int)
// interpreted code performs iteration and arithmetic
- fun := ir.Compile("for i = 0; i < n; i++ { total += ((n*2+3)&4 | 5 ^ 6) / (n|1) }").AsX()
+ fun := ir.Compile("for i = 0; i < n; i++ { total += " + arith_source + " }").AsX()
env := ir.PrepareEnv()
fun(env)
@@ -445,7 +506,7 @@ func BenchmarkArithFastConst(b *testing.B) {
ir.DeclConst("n", nil, b.N)
// interpreted code performs only arithmetic - iteration performed here
- expr := ir.Compile("((n*2+3)&4 | 5 ^ 6) / (n|1)")
+ expr := ir.Compile(arith_source)
fun := expr.WithFun().(func(*fast.Env) int)
env := ir.PrepareEnv()
fun(env)
@@ -460,7 +521,6 @@ func BenchmarkArithFastConst(b *testing.B) {
}
}
-
func BenchmarkArithFastConst2(b *testing.B) {
ir := fast.New()
ir.Eval("var i, total int")
@@ -469,7 +529,7 @@ func BenchmarkArithFastConst2(b *testing.B) {
total := ir.AddressOfVar("total").Interface().(*int)
// interpreted code performs iteration and arithmetic
- fun := ir.Compile("for i = 0; i < n; i++ { total += ((n*2+3)&4 | 5 ^ 6) / (n|1) }").AsX()
+ fun := ir.Compile("for i = 0; i < n; i++ { total += " + arith_source + " }").AsX()
env := ir.PrepareEnv()
fun(env)
@@ -489,7 +549,7 @@ func BenchmarkArithFastCompileLoop(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
- ir.Compile("total = 0; for i = 0; i < n; i++ { total += ((n*2+3)&4 | 5 ^ 6) / (n|1) }; total")
+ ir.Compile("total = 0; for i = 0; i < n; i++ { total += " + arith_source + " }; total")
}
}
@@ -497,7 +557,7 @@ func BenchmarkArithClassic(b *testing.B) {
ir := classic.New()
ir.Eval("n:=0")
- form := ir.Parse("((n*2+3)&4 | 5 ^ 6) / (n|1)")
+ form := ir.Parse(arith_source)
value := ir.ValueOf("n")
var ret r.Value
@@ -521,7 +581,7 @@ func BenchmarkArithClassic2(b *testing.B) {
ir.Eval("var n, total int")
// interpreted code performs iteration and arithmetic
- form := ir.Parse("total = 0; for i:= 0; i < n; i++ { total += ((n*2+3)&4 | 5 ^ 6) / (n|1) }; total")
+ form := ir.Parse("total = 0; for i:= 0; i < n; i++ { total += " + arith_source + " }; total")
value := ir.ValueOf("n")
ir.EvalAst(form)
@@ -537,7 +597,7 @@ func BenchmarkArithClassic2(b *testing.B) {
// ---------------- collatz conjecture --------------------
-func collatz(n uint) {
+func collatz(n uint) uint {
for n > 1 {
if n&1 != 0 {
n = ((n * 3) + 1) >> 1
@@ -545,10 +605,11 @@ func collatz(n uint) {
n >>= 1
}
}
+ return n
}
func BenchmarkCollatzCompiler(b *testing.B) {
- var n uint = collatz_n
+ var n uint = collatz_arg
for i := 0; i < b.N; i++ {
collatz(n)
}
@@ -565,7 +626,7 @@ func BenchmarkCollatzFast(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
- *addr = collatz_n
+ *addr = collatz_arg
fun(env)
}
}
@@ -580,7 +641,7 @@ func BenchmarkCollatzClassic(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
- *addr = collatz_n
+ *addr = collatz_arg
ir.EvalAst(form)
}
}
@@ -590,15 +651,37 @@ func BenchmarkCollatzBytecodeInterfaces(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
- coll.Vars[0] = collatz_n
+ coll.Vars[0] = collatz_arg_int
coll.Exec(0)
}
}
+func off_TestCollatzClosureInts(t *testing.T) {
+ env := closure_ints.NewEnv(nil)
+ f := closure_ints.DeclCollatz(env)
+
+ expected := int(collatz(collatz_arg))
+ actual := f(collatz_arg_int)
+ if actual != expected {
+ t.Errorf("expecting %v, found %v\n", expected, actual)
+ }
+}
+
+func BenchmarkCollatzClosureInts(b *testing.B) {
+ env := closure_ints.NewEnv(nil)
+ coll := closure_ints.DeclCollatz(env)
+
+ b.ResetTimer()
+ var total int
+ for i := 0; i < b.N; i++ {
+ total += coll(collatz_arg_int)
+ }
+}
+
func BenchmarkCollatzClosureValues(b *testing.B) {
env := closure_values.NewEnv(nil)
coll := closure_values.DeclCollatz(env, 0)
- n := r.ValueOf(collatz_n)
+ n := r.ValueOf(collatz_arg_int)
b.ResetTimer()
var total int
@@ -620,17 +703,30 @@ func sum(n int) int {
func BenchmarkSumCompiler(b *testing.B) {
var total int
for i := 0; i < b.N; i++ {
- total += sum(sum_n)
+ total += sum(sum_arg)
}
if verbose {
println(total)
}
}
+func BenchmarkSumJit(b *testing.B) {
+ if !jit.SUPPORTED {
+ b.SkipNow()
+ return
+ }
+ sum := jit.DeclSum()
+ b.ResetTimer()
+ var total int
+ for i := 0; i < b.N; i++ {
+ total += sum(sum_arg)
+ }
+}
+
func BenchmarkSumFast(b *testing.B) {
ir := fast.New()
ir.Eval("var i, total uint")
- ir.DeclConst("n", nil, uint(sum_n))
+ ir.DeclConst("n", nil, uint(sum_arg))
expr := ir.Compile("total = 0; for i = 1; i <= n; i++ { total += i }; total")
fun := expr.Fun.(func(*fast.Env) uint)
@@ -650,7 +746,7 @@ func BenchmarkSumFast(b *testing.B) {
func BenchmarkSumFast2(b *testing.B) {
ir := fast.New()
ir.Eval("var i, total uint")
- ir.DeclConst("n", nil, uint(sum_n))
+ ir.DeclConst("n", nil, uint(sum_arg))
fun := ir.Compile("for i = 1; i <= n; i++ { total += i }").AsX()
env := ir.PrepareEnv()
@@ -670,7 +766,7 @@ func BenchmarkSumFast2(b *testing.B) {
func BenchmarkSumClassic(b *testing.B) {
ir := classic.New()
ir.Eval("var i, n, total int")
- ir.ValueOf("n").SetInt(sum_n)
+ ir.ValueOf("n").SetInt(int64(sum_arg))
form := ir.Parse("total = 0; for i = 1; i <= n; i++ { total += i }; total")
b.ResetTimer()
@@ -681,7 +777,7 @@ func BenchmarkSumClassic(b *testing.B) {
}
func BenchmarkSumBytecodeValues(b *testing.B) {
- sum := bytecode_values.BytecodeSum(sum_n)
+ sum := bytecode_values.BytecodeSum(sum_arg)
b.ResetTimer()
var total int
for i := 0; i < b.N; i++ {
@@ -690,7 +786,7 @@ func BenchmarkSumBytecodeValues(b *testing.B) {
}
func BenchmarkSumBytecodeInterfaces(b *testing.B) {
- p := bytecode_interfaces.BytecodeSum(sum_n)
+ p := bytecode_interfaces.BytecodeSum(sum_arg)
b.ResetTimer()
var total int
for i := 0; i < b.N; i++ {
@@ -698,10 +794,32 @@ func BenchmarkSumBytecodeInterfaces(b *testing.B) {
}
}
+func off_TestSumClosureInts(t *testing.T) {
+ env := closure_ints.NewEnv(nil)
+ f := closure_ints.DeclSum(env)
+
+ expected := sum(sum_arg)
+ actual := f(sum_arg)
+ if actual != expected {
+ t.Errorf("expecting %v, found %v\n", expected, actual)
+ }
+}
+
+func BenchmarkSumClosureInts(b *testing.B) {
+ env := closure_ints.NewEnv(nil)
+ sum := closure_ints.DeclSum(env)
+
+ b.ResetTimer()
+ var total int
+ for i := 0; i < b.N; i++ {
+ total += sum(sum_arg)
+ }
+}
+
func BenchmarkSumClosureValues(b *testing.B) {
env := closure_values.NewEnv(nil)
sum := closure_values.DeclSum(env, 0)
- n := r.ValueOf(sum_n)
+ n := r.ValueOf(sum_arg)
b.ResetTimer()
var total int
@@ -713,7 +831,7 @@ func BenchmarkSumClosureValues(b *testing.B) {
func BenchmarkSumClosureInterfaces(b *testing.B) {
env := closure_interfaces.NewEnv(nil)
sum := closure_interfaces.DeclSum(env, 0)
- var n interface{} = sum_n
+ var n interface{} = sum_arg
b.ResetTimer()
var total int
@@ -725,7 +843,7 @@ func BenchmarkSumClosureInterfaces(b *testing.B) {
func BenchmarkSumClosureMaps(b *testing.B) {
env := closure_maps.NewEnv(nil)
sum := closure_maps.DeclSum(env, "sum")
- n := r.ValueOf(sum_n)
+ n := r.ValueOf(sum_arg)
b.ResetTimer()
var total int
diff --git a/vendor/github.com/cosmos72/gomacro/classic/assignment.go b/vendor/github.com/cosmos72/gomacro/classic/assignment.go
index 2756d6c..79a3db6 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/assignment.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/assignment.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* assignment.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/binaryexpr.go b/vendor/github.com/cosmos72/gomacro/classic/binaryexpr.go
index ad2edd1..60ea180 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/binaryexpr.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/binaryexpr.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binaryexpr.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/builtin.go b/vendor/github.com/cosmos72/gomacro/classic/builtin.go
index 17e774e..8df2706 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/builtin.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/builtin.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* builtin.go
@@ -304,7 +295,7 @@ func funcRecover(env *Env, args []r.Value) (r.Value, []r.Value) {
// thus recover() is invoked inside deferred functions: find their caller's env
ret := Nil
- trace := env.Options&OptDebugPanicRecover != 0
+ trace := env.Options&OptDebugRecover != 0
caller := env.CallerFrame()
if trace {
env.Debugf("recover(): env = %v, stack is:", env.Name)
diff --git a/vendor/github.com/cosmos72/gomacro/classic/call.go b/vendor/github.com/cosmos72/gomacro/classic/call.go
index 493a9e2..893d650 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/call.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/call.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call.go
@@ -62,7 +53,7 @@ func (env *Env) evalFuncCall(envName string, body *ast.BlockStmt, t r.Type, argN
// return is implemented with a panic(eReturn{})
results = env.convertFuncCallResults(t, p.results, true)
default: // some interpreted or compiled code invoked panic()
- if env.Options&OptDebugPanicRecover != 0 {
+ if env.Options&OptDebugRecover != 0 {
env.Debugf("captured panic for defers: env = %v, panic = %#v", env.Name, p)
}
frame.panick = p
diff --git a/vendor/github.com/cosmos72/gomacro/classic/cmd.go b/vendor/github.com/cosmos72/gomacro/classic/cmd.go
new file mode 100644
index 0000000..26205b5
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/classic/cmd.go
@@ -0,0 +1,188 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * cmd.go
+ *
+ * Created on: Apr 11, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package classic
+
+import (
+ "fmt"
+ "strings"
+
+ . "github.com/cosmos72/gomacro/base"
+)
+
+type Cmd struct {
+ Name string
+ Func func(ir *Interp, arg string, opt CmdOpt) (string, CmdOpt)
+}
+
+type Cmds map[byte]Cmd
+
+func (cmd *Cmd) Match(prefix string) bool {
+ return strings.HasPrefix(cmd.Name, prefix)
+}
+
+func (cmds Cmds) Lookup(prefix string) (Cmd, bool) {
+ if len(prefix) != 0 {
+ cmd, found := cmds[prefix[0]]
+ if found && cmd.Match(prefix) {
+ return cmd, true
+ }
+ }
+ return Cmd{}, false
+}
+
+func (cmds Cmds) ShowHelp(g *Globals) {
+ c := g.ReplCmdChar
+ fmt.Fprintf(g.Stdout, `// type Go code to execute it. example: func add(x, y int) int { return x + y }
+
+// interpreter commands:
+%cdebug EXPR debug expression or statement interactively
+%cenv [NAME] show available functions, variables and constants
+ in current package, or from imported package NAME
+%chelp show this help
+%cinspect EXPR inspect expression interactively
+%coptions [OPTS] show or toggle interpreter options
+%cpackage "PKGPATH" switch to package PKGPATH, importing it if possible.
+%cquit quit the interpreter
+%cunload "PKGPATH" remove package PKGPATH from the list of known packages.
+ later attempts to import it will trigger a recompile
+%cwrite [FILE] write collected declarations and/or statements to standard output or to FILE
+ use %co Declarations and/or %co Statements to start collecting them
+// abbreviations are allowed if unambiguous.
+`, c, c, c, c, c, c, c, c, c, c, c)
+}
+
+var cmds Cmds
+
+func init() {
+ cmds = Cmds{
+ 'e': Cmd{"env", (*Interp).cmdEnv},
+ 'h': Cmd{"help", (*Interp).cmdHelp},
+ 'i': Cmd{"inspect", (*Interp).cmdInspect},
+ 'o': Cmd{"options", (*Interp).cmdOptions},
+ 'p': Cmd{"package", (*Interp).cmdPackage},
+ 'q': Cmd{"quit", (*Interp).cmdQuit},
+ 'u': Cmd{"unload", (*Interp).cmdUnload},
+ 'w': Cmd{"write", (*Interp).cmdWrite},
+ }
+}
+
+// execute one of the REPL commands starting with ':'
+// return any remainder string to be evaluated, and the options to evaluate it
+func (ir *Interp) Cmd(src string) (string, CmdOpt) {
+ g := ir.Env.Globals
+ var opt CmdOpt
+
+ src = strings.TrimSpace(src)
+ n := len(src)
+ if n > 0 && src[0] == g.ReplCmdChar {
+ prefix, arg := Split2(src[1:], ' ') // skip g.ReplCmdChar
+ cmd, found := cmds.Lookup(prefix)
+ if found {
+ src, opt = cmd.Func(ir, arg, opt)
+ } else {
+ // ":"
+ // temporarily disable collection of declarations and statements,
+ // and temporarily disable macroexpandonly (i.e. re-enable eval)
+ opt |= CmdOptForceEval
+ src = " " + src[1:] // slower than src = src[1:], but gives accurate column positions in error messages
+ }
+ }
+ // :package and package are the same command
+ if g.Options&OptMacroExpandOnly == 0 && (src == "package" || strings.HasPrefix(src, "package ")) {
+ _, arg := Split2(src, ' ')
+ src, opt = ir.cmdPackage(arg, opt)
+ }
+ return src, opt
+}
+
+func (ir *Interp) cmdEnv(arg string, opt CmdOpt) (string, CmdOpt) {
+ ir.Env.ShowPackage(arg)
+ return "", opt
+}
+
+func (ir *Interp) cmdHelp(arg string, opt CmdOpt) (string, CmdOpt) {
+ g := ir.Env.ThreadGlobals.Globals
+ cmds.ShowHelp(g)
+ return "", opt
+}
+
+func (ir *Interp) cmdInspect(arg string, opt CmdOpt) (string, CmdOpt) {
+ env := ir.Env
+ if len(arg) == 0 {
+ fmt.Fprint(env.Stdout, "// inspect: missing argument\n")
+ } else {
+ env.Inspect(arg)
+ }
+ return "", opt
+}
+
+func (ir *Interp) cmdOptions(arg string, opt CmdOpt) (string, CmdOpt) {
+ env := ir.Env
+ g := env.Globals
+
+ if len(arg) != 0 {
+ g.Options ^= ParseOptions(arg)
+ } else {
+ fmt.Fprintf(env.Stdout, "// current options: %v\n", g.Options)
+ fmt.Fprintf(env.Stdout, "// unset options: %v\n", ^g.Options)
+ }
+ return "", opt
+}
+
+// change package. path can be empty or a package path WITH quotes
+// 'package NAME' where NAME is without quotes has no effect.
+func (ir *Interp) cmdPackage(path string, cmdopt CmdOpt) (string, CmdOpt) {
+ env := ir.Env
+ g := env.Globals
+ path = strings.TrimSpace(path)
+ n := len(path)
+ if n == 0 {
+ g.Fprintf(g.Stdout, "// current package: %s %q\n", env.Name, env.Path)
+ } else if n > 2 && path[0] == '"' && path[n-1] == '"' {
+ path = path[1 : n-1]
+ n -= 2
+ ir.ChangePackage(path)
+ } else if g.Options&OptShowPrompt != 0 {
+ g.Debugf(`package %s has no effect. To switch to a different package, use package "PACKAGE/FULL/PATH" - note the quotes`, path)
+ }
+ return "", cmdopt
+}
+
+func (ir *Interp) cmdQuit(_ string, opt CmdOpt) (string, CmdOpt) {
+ return "", opt | CmdOptQuit
+}
+
+// remove package 'path' from the list of known packages
+func (ir *Interp) cmdUnload(path string, opt CmdOpt) (string, CmdOpt) {
+ if n := len(path); n >= 2 && path[0] == '"' && path[n-1] == '"' {
+ path = path[1 : n-1]
+ }
+ if len(path) != 0 {
+ ir.Env.Globals.UnloadPackage(path)
+ }
+ return "", opt
+}
+
+func (ir *Interp) cmdWrite(filepath string, opt CmdOpt) (string, CmdOpt) {
+ env := ir.Env
+ if len(filepath) == 0 {
+ env.WriteDeclsToStream(env.Stdout)
+ } else {
+ env.WriteDeclsToFile(filepath)
+ }
+ return "", opt
+}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/declaration.go b/vendor/github.com/cosmos72/gomacro/classic/declaration.go
index 04f1b0e..a8ee65c 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/declaration.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/declaration.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* declaration.go
@@ -52,7 +43,7 @@ func (env *Env) evalDeclGen(node *ast.GenDecl) (r.Value, []r.Value) {
switch tok {
case token.IMPORT:
for _, decl := range node.Specs {
- ret, rets = env.evalImport(decl)
+ ret, rets = env.evalImportDecl(decl)
}
case token.CONST:
var defaultType ast.Expr
@@ -99,9 +90,9 @@ func (env *Env) evalDeclType(node ast.Spec) (r.Value, []r.Value) {
switch node := node.(type) {
case *ast.TypeSpec:
name := node.Name.Name
- // PATCH: support type aliases
- if unary, ok := node.Type.(*ast.UnaryExpr); ok && unary.Op == token.ASSIGN {
- t := env.evalTypeAlias(name, unary.X)
+ // support type aliases
+ if node.Assign != token.NoPos {
+ t := env.evalTypeAlias(name, node.Type)
return r.ValueOf(&t).Elem(), nil // return a reflect.Type, not the concrete type
}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/env.go b/vendor/github.com/cosmos72/gomacro/classic/env.go
index ada8e01..87239f4 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/env.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/env.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* env.go
@@ -26,28 +17,25 @@
package classic
import (
- "bufio"
- "fmt"
- "io"
+ "go/ast"
r "reflect"
- . "github.com/cosmos72/gomacro/ast2"
+ "github.com/cosmos72/gomacro/ast2"
. "github.com/cosmos72/gomacro/base"
"github.com/cosmos72/gomacro/imports"
)
type ThreadGlobals struct {
- Globals
+ *Globals
AllMethods map[r.Type]Methods // methods implemented by interpreted code
- FastInterp interface{} // *fast.Interp // temporary...
+ currOpt CmdOpt
}
func NewThreadGlobals() *ThreadGlobals {
- tg := &ThreadGlobals{
+ return &ThreadGlobals{
+ Globals: NewGlobals(),
AllMethods: make(map[r.Type]Methods),
}
- tg.Globals.Init()
- return tg
}
type Env struct {
@@ -65,7 +53,7 @@ func NewEnv(outer *Env, path string) *Env {
env := &Env{
iotaOffset: 1,
Outer: outer,
- Name: path,
+ Name: FileName(path),
Path: path,
}
if outer == nil {
@@ -114,17 +102,29 @@ func (env *Env) MergePackage(pkg imports.Package) {
}
func (env *Env) ChangePackage(path string) *Env {
- fenv := env.FileEnv()
- currpath := fenv.ThreadGlobals.PackagePath
+ g := env.ThreadGlobals
+ currpath := g.PackagePath
if path == currpath {
return env
}
- fenv.AsPackage().SaveToPackages(currpath)
+ fenv := env.FileEnv()
+ if fenv.ThreadGlobals != g {
+ env.Warnf("ChangePackage: env.ThreadGlobals = %#v\n\tenv.FileEnv().ThreadGlobals = %#v", g, fenv.ThreadGlobals)
+ }
+
+ // FIXME really store into imports.Packages fenv's interpreted functions, types, variable and constants ?
+ // We need a way to find fenv by name later, but storing it in imports.Packages seems excessive.
+ imports.Packages.MergePackage(currpath, fenv.AsPackage())
nenv := NewEnv(fenv.TopEnv(), path)
nenv.MergePackage(imports.Packages[path])
+ nenv.ThreadGlobals = env.ThreadGlobals
nenv.ThreadGlobals.PackagePath = path
+ if env.Globals.Options&OptShowPrompt != 0 {
+ env.Debugf("switched to package %q\n%s", path)
+ }
+
return nenv
}
@@ -164,32 +164,45 @@ func (env *Env) ValueOf(name string) (value r.Value) {
return
}
-func (env *Env) ReadMultiline(in *bufio.Reader, opts ReadOptions) (str string, firstToken int) {
- str, firstToken, err := ReadMultiline(in, opts, env.Stdout, "gomacro> ")
- if err != nil && err != io.EOF {
- fmt.Fprintf(env.Stderr, "// read error: %s\n", err)
+// parse, without macroexpansion
+func (env *Env) ParseOnly(src interface{}) ast2.Ast {
+ var form ast2.Ast
+ switch src := src.(type) {
+ case ast2.Ast:
+ form = src
+ case ast.Node:
+ form = ast2.ToAst(src)
+ default:
+ bytes := ReadBytes(src)
+ nodes := env.ParseBytes(bytes)
+
+ if env.Options&OptShowParse != 0 {
+ env.Debugf("after parse: %v", nodes)
+ }
+ switch len(nodes) {
+ case 0:
+ form = nil
+ case 1:
+ form = ast2.ToAst(nodes[0])
+ default:
+ form = ast2.NodeSlice{X: nodes}
+ }
}
- return str, firstToken
+ return form
}
-// macroexpand + collect + eval
-func (env *Env) classicEval(form Ast) (r.Value, []r.Value) {
+// Parse, with macroexpansion
+func (env *Env) Parse(src interface{}) ast2.Ast {
+ form := env.ParseOnly(src)
+
// macroexpansion phase.
form, _ = env.MacroExpandAstCodewalk(form)
if env.Options&OptShowMacroExpand != 0 {
env.Debugf("after macroexpansion: %v", form.Interface())
}
-
- // collect phase
if env.Options&(OptCollectDeclarations|OptCollectStatements) != 0 {
env.CollectAst(form)
}
-
- // eval phase
- if env.Options&OptMacroExpandOnly != 0 {
- return r.ValueOf(form.Interface()), nil
- } else {
- return env.EvalAst(form)
- }
+ return form
}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/env_multithread.go b/vendor/github.com/cosmos72/gomacro/classic/env_multithread.go
index a47d2db..e762be9 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/env_multithread.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/env_multithread.go
@@ -3,20 +3,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* env.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/env_singlethread.go b/vendor/github.com/cosmos72/gomacro/classic/env_singlethread.go
index ec82b5a..5baf977 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/env_singlethread.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/env_singlethread.go
@@ -3,20 +3,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* env.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/eval.go b/vendor/github.com/cosmos72/gomacro/classic/eval.go
index c1bdbf1..bba4695 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/eval.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/eval.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* eval.go
@@ -29,7 +20,7 @@ import (
"go/ast"
r "reflect"
- . "github.com/cosmos72/gomacro/ast2"
+ "github.com/cosmos72/gomacro/ast2"
. "github.com/cosmos72/gomacro/base"
)
@@ -41,7 +32,7 @@ func (env *Env) Eval1(src interface{}) r.Value {
return env.EvalAst1(env.Parse(src))
}
-func (env *Env) EvalAst1(in Ast) r.Value {
+func (env *Env) EvalAst1(in ast2.Ast) r.Value {
value, extraValues := env.EvalAst(in)
if len(extraValues) > 1 {
env.WarnExtraValues(extraValues)
@@ -49,19 +40,19 @@ func (env *Env) EvalAst1(in Ast) r.Value {
return value
}
-func (env *Env) EvalAst(in Ast) (r.Value, []r.Value) {
+func (env *Env) EvalAst(in ast2.Ast) (r.Value, []r.Value) {
switch in := in.(type) {
- case AstWithNode:
+ case ast2.AstWithNode:
if in != nil {
- return env.EvalNode(ToNode(in))
+ return env.EvalNode(ast2.ToNode(in))
}
- case AstWithSlice:
+ case ast2.AstWithSlice:
if in != nil {
var ret r.Value
var rets []r.Value
n := in.Size()
for i := 0; i < n; i++ {
- ret, rets = env.EvalNode(ToNode(in.Get(i)))
+ ret, rets = env.EvalNode(ast2.ToNode(in.Get(i)))
}
return ret, rets
}
@@ -77,16 +68,19 @@ func (env *Env) EvalAst(in Ast) (r.Value, []r.Value) {
func (env *Env) EvalNode(node ast.Node) (r.Value, []r.Value) {
switch node := node.(type) {
case ast.Decl:
- return env.evalDecl(node)
+ env.evalDecl(node)
case ast.Expr:
+ // Go expressions *DO* return values
return env.evalExpr(node)
case ast.Stmt:
- return env.evalStatement(node)
+ env.evalStatement(node)
case *ast.File:
- return env.evalFile(node)
+ env.evalFile(node)
default:
return env.Errorf("unimplemented Eval for %v <%v>", node, r.TypeOf(node))
}
+ // Go declarations, statements and files do not return values
+ return None, nil
}
func (env *Env) EvalNode1(node ast.Node) r.Value {
@@ -97,45 +91,24 @@ func (env *Env) EvalNode1(node ast.Node) r.Value {
return value
}
-// parse, without macroexpansion
-func (env *Env) ParseOnly(src interface{}) Ast {
- var form Ast
- switch src := src.(type) {
- case Ast:
- form = src
- case ast.Node:
- form = ToAst(src)
- default:
- bytes := ReadBytes(src)
- nodes := env.ParseBytes(bytes)
-
- if env.Options&OptShowParse != 0 {
- env.Debugf("after parse: %v", nodes)
- }
- switch len(nodes) {
- case 0:
- form = nil
- case 1:
- form = ToAst(nodes[0])
- default:
- form = NodeSlice{X: nodes}
- }
- }
- return form
-}
-
-// Parse, with macroexpansion
-func (env *Env) Parse(src interface{}) Ast {
- form := env.ParseOnly(src)
-
+// macroexpand + collect + eval
+func (env *Env) classicEval(form ast2.Ast) []r.Value {
// macroexpansion phase.
form, _ = env.MacroExpandAstCodewalk(form)
if env.Options&OptShowMacroExpand != 0 {
env.Debugf("after macroexpansion: %v", form.Interface())
}
+
+ // collect phase
if env.Options&(OptCollectDeclarations|OptCollectStatements) != 0 {
env.CollectAst(form)
}
- return form
+
+ // eval phase
+ if env.Options&OptMacroExpandOnly != 0 {
+ return PackValues(r.ValueOf(form.Interface()), nil)
+ } else {
+ return PackValues(env.EvalAst(form))
+ }
}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/expr.go b/vendor/github.com/cosmos72/gomacro/classic/expr.go
index abb6088..6314c60 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/expr.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/expr.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* expr.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/fast.go b/vendor/github.com/cosmos72/gomacro/classic/fast.go
deleted file mode 100644
index ae0717e..0000000
--- a/vendor/github.com/cosmos72/gomacro/classic/fast.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * gomacro - A Go interpreter with Lisp-like macros
- *
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * fast.go
- *
- * Created on: Apr 02, 2017
- * Author: Massimiliano Ghilardi
- */
-
-package classic
-
-import (
- r "reflect"
-
- "github.com/cosmos72/gomacro/ast2"
- "github.com/cosmos72/gomacro/base"
- "github.com/cosmos72/gomacro/fast"
- xr "github.com/cosmos72/gomacro/xreflect"
-)
-
-// temporary helper to invoke the new fast interpreter.
-// executes macroexpand + collect + compile + eval
-func (env *Env) fastEval(form ast2.Ast) (r.Value, []r.Value, xr.Type, []xr.Type) {
- var f *fast.Interp
- if env.FastInterp == nil {
- f = fast.New()
- f.Comp.CompileOptions |= fast.OptKeepUntyped
- env.FastInterp = f
- } else {
- f = env.FastInterp.(*fast.Interp)
- }
- f.Comp.Stringer.Copy(&env.Stringer) // sync Fileset, Pos, Line
- f.Comp.Options = env.Options // sync Options
-
- // macroexpand phase.
- // must be performed manually, because we used classic.Env.ParseOnly()
- // instead of fast.Comp.Parse()
- form, _ = f.Comp.MacroExpandCodewalk(form)
- if env.Options&base.OptShowMacroExpand != 0 {
- env.Debugf("after macroexpansion: %v", form.Interface())
- }
-
- // collect phase
- if env.Options&(base.OptCollectDeclarations|base.OptCollectStatements) != 0 {
- env.CollectAst(form)
- }
-
- if env.Options&base.OptMacroExpandOnly != 0 {
- x := form.Interface()
- return r.ValueOf(x), nil, f.Comp.TypeOf(x), nil
- }
-
- // compile phase
- expr := f.Comp.Compile(form)
- if env.Options&base.OptShowCompile != 0 {
- env.Fprintf(env.Stdout, "%v\n", expr)
- }
-
- // eval phase
- if expr == nil {
- return base.None, nil, nil, nil
- }
- value, values := f.RunExpr(expr)
- return value, values, expr.Type, expr.Types
-}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/file.go b/vendor/github.com/cosmos72/gomacro/classic/file.go
index 6378ecf..2094eb5 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/file.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/file.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* file.go
@@ -26,19 +17,42 @@
package classic
import (
+ "bufio"
"go/ast"
- r "reflect"
+ "os"
+
+ . "github.com/cosmos72/gomacro/base"
)
-func (env *Env) evalFile(node *ast.File) (r.Value, []r.Value) {
- env.PackagePath = node.Name.Name
+func (ir *Interp) EvalFile(filePath string) {
+ file, err := os.Open(filePath)
+ if err != nil {
+ ir.Errorf("error opening file '%s': %v", filePath, err)
+ return
+ }
+ defer file.Close()
+
+ saveOpts := ir.Env.Options
+ ir.Env.Options &^= OptShowEval
- // TODO eval node.Imports
- var ret r.Value
- var rets []r.Value
+ defer func() {
+ ir.Env.Options = saveOpts
+ }()
+
+ in := bufio.NewReader(file)
+ ir.Repl(in)
+}
+
+func (env *Env) evalFile(node *ast.File) {
+ env.Name = node.Name.Name
+ env.Path = env.Name
+ env.PackagePath = env.Name
+
+ for _, imp := range node.Imports {
+ env.evalImport(imp)
+ }
for _, decl := range node.Decls {
- ret, rets = env.evalDecl(decl)
+ env.evalDecl(decl)
}
- return ret, rets
}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/for.go b/vendor/github.com/cosmos72/gomacro/classic/for.go
index 1b31641..5369248 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/for.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/for.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* for.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/function.go b/vendor/github.com/cosmos72/gomacro/classic/function.go
index 16d254c..5d95a07 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/function.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/function.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* function.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/global.go b/vendor/github.com/cosmos72/gomacro/classic/global.go
index 4bfa5ea..e083c2a 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/global.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/global.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* global.go
@@ -72,12 +63,3 @@ type TypedValue struct {
* }
*/
type Methods map[string]TypedValue
-
-/**
- * Interface is the interpreted version of Golang interface values.
- * Each Interface contains {
- * Type: the interface type. returned by Env.evalInterface(), i.e. the type of a struct { interface{}; functions... }
- * Value: the datum implementing the interface. Value.Type() must be its concrete type, i.e. == r.TypeOf(Value.Interface())
- * }
- */
-type Interface TypedValue
diff --git a/vendor/github.com/cosmos72/gomacro/classic/identifier.go b/vendor/github.com/cosmos72/gomacro/classic/identifier.go
index b881876..a5ad85a 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/identifier.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/identifier.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* identifier.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/import.go b/vendor/github.com/cosmos72/gomacro/classic/import.go
index c556b33..7c42810 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/import.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/import.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* declaration.go
@@ -34,26 +25,36 @@ import (
)
// eval a single import
-func (env *Env) evalImport(node ast.Spec) (r.Value, []r.Value) {
- switch node := node.(type) {
+func (env *Env) evalImportDecl(decl ast.Spec) (r.Value, []r.Value) {
+ switch node := decl.(type) {
case *ast.ImportSpec:
- path := UnescapeString(node.Path.Value)
- path = env.sanitizeImportPath(path)
- var name string
- if node.Name != nil {
- name = node.Name.Name
+ return env.evalImport(node)
+ default:
+ return env.Errorf("unimplemented import: %v", decl)
+ }
+}
+
+// eval a single import
+func (env *Env) evalImport(imp *ast.ImportSpec) (r.Value, []r.Value) {
+ path := UnescapeString(imp.Path.Value)
+ path = env.sanitizeImportPath(path)
+ var name string
+ if imp.Name != nil {
+ name = imp.Name.Name
+ } else {
+ name = FileName(path)
+ }
+ pkg := env.ImportPackage(name, path)
+ if pkg != nil {
+ // if import appears *inside* a block, it is local for that block
+ if name == "." {
+ // dot import, i.e. import . "the/package/path"
+ env.MergePackage(pkg.Package)
} else {
- name = path[1+strings.LastIndexByte(path, '/'):]
+ env.DefineConst(name, r.TypeOf(pkg), r.ValueOf(pkg))
}
- pkg := env.ImportPackage(name, path)
- if pkg != nil {
- fileEnv := env.FileEnv()
- fileEnv.DefineConst(name, r.TypeOf(pkg), r.ValueOf(pkg))
- }
- return r.ValueOf(path), nil
- default:
- return env.Errorf("unimplemented import: %v", node)
}
+ return r.ValueOf(name), nil
}
func (ir *ThreadGlobals) sanitizeImportPath(path string) string {
diff --git a/vendor/github.com/cosmos72/gomacro/classic/inspect.go b/vendor/github.com/cosmos72/gomacro/classic/inspect.go
index 7e6bc5c..b692782 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/inspect.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/inspect.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* inspect.go
@@ -26,253 +17,27 @@
package classic
import (
- "bufio"
- "errors"
- "fmt"
r "reflect"
- "strconv"
- "strings"
. "github.com/cosmos72/gomacro/base"
- xr "github.com/cosmos72/gomacro/xreflect"
)
-type Inspector struct {
- names []string
- vs []r.Value
- ts []r.Type
- xts []xr.Type
- in *bufio.Reader
- env *Env
-}
-
-func (env *Env) Inspect(in *bufio.Reader, str string, fastInterpreter bool) {
- form := env.Parse(str)
- var v r.Value
- var xt xr.Type
- if fastInterpreter {
- v, _, xt, _ = env.fastEval(form)
- } else {
- v = env.EvalAst1(form)
- }
- var t r.Type
- if v != Nil && v != None {
- t = r.TypeOf(v.Interface()) // show concrete type
- }
- switch dereferenceValue(v).Kind() {
- case r.Array, r.Slice, r.String, r.Struct:
- break
- default:
- env.showVar(str, v, t)
- env.showMethods(t, xt)
- return
- }
- stack := Inspector{names: []string{str}, vs: []r.Value{v}, ts: []r.Type{t}, xts: []xr.Type{xt}, in: in, env: env}
- stack.Show()
- stack.Repl()
-}
-
-func (env *Env) showMethods(t r.Type, xt xr.Type) {
- switch {
- case xt != nil:
- if xt.Kind() == r.Ptr {
- xt = xt.Elem()
- }
- n := xt.NumMethod()
- if n == 0 {
- env.Fprintf(env.Stdout, "no methods of %v\n", xt)
- return
- }
- env.Fprintf(env.Stdout, "methods of %v:\n", xt)
- for i := 0; i < n; i++ {
- env.Fprintf(env.Stdout, " m%d. %v\n", i, xt.Method(i).GoFun)
- }
-
- case t != nil:
- n := t.NumMethod()
- if n == 0 {
- env.Fprintf(env.Stdout, "no methods of %v\n", t)
- return
- }
- env.Fprintf(env.Stdout, "methods of %v:\n", t)
- for i := 0; i < n; i++ {
- m := t.Method(i)
- env.Fprintf(env.Stdout, " m%d. %s\t%v\n", i, m.Name, m.Type)
- }
- }
-}
-
-func (env *Env) showVar(str string, v r.Value, t r.Type) {
- env.Fprintf(env.Stdout, "%s\t= %v\t// %v\n", str, v, t)
-}
-
-func (ip *Inspector) Help() {
- fmt.Fprint(ip.env.Stdout, "// inspect commands: help methods quit top up\n")
-}
-
-func (ip *Inspector) Show() {
- depth := len(ip.names)
- name := strings.Join(ip.names, ".")
- v := ip.vs[depth-1]
- t := ip.ts[depth-1]
- ip.env.showVar(name, v, t)
-
- v = dereferenceValue(v) // dereference pointers on-the-fly
- switch v.Kind() {
- case r.Array, r.Slice, r.String:
- ip.showIndexes(v)
- case r.Struct:
- ip.showFields(v)
- }
-}
-
-func (ip *Inspector) Repl() error {
- for len(ip.names) > 0 {
- fmt.Fprintf(ip.env.Stdout, "goinspect %s> ", strings.Join(ip.names, "."))
- cmd, err := ip.in.ReadString('\n')
- if err != nil {
- return err
- }
- cmd = strings.TrimSpace(cmd)
- err = ip.Eval(cmd)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func (ip *Inspector) Eval(cmd string) error {
- switch {
- case cmd == "?", strings.HasPrefix("help", cmd):
- ip.Help()
- case strings.HasPrefix("methods", cmd):
- t := ip.ts[len(ip.ts)-1]
- xt := ip.xts[len(ip.xts)-1]
- ip.env.showMethods(t, xt)
- case strings.HasPrefix("quit", cmd):
- return errors.New("user quit")
- case strings.HasPrefix("top", cmd):
- ip.Top()
- ip.Show()
- case cmd == "", cmd == ".":
- ip.Show()
- case cmd == "-", strings.HasPrefix("up", cmd):
- ip.Leave()
- default:
- ip.Enter(cmd)
- }
- return nil
-}
-
-func (ip *Inspector) Top() {
- ip.names = ip.names[0:1]
- ip.vs = ip.vs[0:1]
- ip.ts = ip.ts[0:1]
-}
-
-func (ip *Inspector) Leave() {
- depth := len(ip.names)
- if depth <= 0 {
+func (env *Env) Inspect(str string) {
+ inspector := env.Globals.Inspector
+ if inspector == nil {
+ env.Errorf("no inspector set: call Interp.SetInspector() first")
return
}
- depth--
- ip.names = ip.names[:depth]
- ip.vs = ip.vs[:depth]
- ip.ts = ip.ts[:depth]
- if depth > 0 {
- ip.Show()
- }
-}
-
-func (ip *Inspector) showFields(v r.Value) {
- n := v.NumField()
- for i := 0; i < n; i++ {
- f := v.Field(i)
- t := typeOf(f)
- f = dereferenceValue(f)
- fmt.Fprintf(ip.env.Stdout, " %d. ", i)
- ip.env.showVar(v.Type().Field(i).Name, f, t)
- }
-}
-
-func (ip *Inspector) showIndexes(v r.Value) {
- n := v.Len()
- for i := 0; i < n; i++ {
- f := v.Index(i)
- t := typeOf(f)
- f = dereferenceValue(f)
- fmt.Fprintf(ip.env.Stdout, " %d. ", i)
- ip.env.showVar("", f, t)
- }
-}
-func (ip *Inspector) Enter(cmd string) {
- i, err := strconv.Atoi(cmd)
- if err != nil {
- fmt.Fprintf(ip.env.Stdout, "unknown inspect command \"%s\". Type ? for help\n", cmd)
- return
- }
- depth := len(ip.names)
- v := dereferenceValue(ip.vs[depth-1])
- var n int
- var fname string
- var f r.Value
- switch v.Kind() {
- case r.Array, r.Slice, r.String:
- n = v.Len()
- if !ip.validRange(i, n) {
- return
- }
- fname = fmt.Sprintf("[%s]", cmd)
- f = v.Index(i)
- case r.Struct:
- n = v.NumField()
- if !ip.validRange(i, n) {
- return
- }
- fname = v.Type().Field(i).Name
- f = v.Field(i)
- default:
- fmt.Fprintf(ip.env.Stdout, "cannot enter <%v>: expecting array, slice, string or struct\n", typeOf(v))
- return
- }
+ form := env.Parse(str)
+ v := env.EvalAst1(form)
var t r.Type
- if f != Nil && f != None {
- t = r.TypeOf(f.Interface()) // concrete type
- }
-
- switch dereferenceValue(f).Kind() { // dereference pointers on-the-fly
- case r.Array, r.Slice, r.String, r.Struct:
- ip.names = append(ip.names, fname)
- ip.vs = append(ip.vs, f)
- ip.ts = append(ip.ts, t)
- ip.Show()
- default:
- ip.env.showVar(fname, f, t)
- }
-}
-
-func dereferenceValue(v r.Value) r.Value {
- for {
- switch v.Kind() {
- case r.Ptr:
- v = v.Elem()
- continue
- case r.Interface:
- v = r.ValueOf(v.Interface())
- continue
+ if v.IsValid() && v != None {
+ if v.CanInterface() {
+ t = r.TypeOf(v.Interface()) // show concrete type
+ } else {
+ t = v.Type()
}
- break
- }
- return v
-}
-
-func (ip *Inspector) validRange(i, n int) bool {
- if i < 0 || i >= n {
- fmt.Fprintf(ip.env.Stdout, "%s contains %d elements, cannot inspect element %d\n",
- strings.Join(ip.names, "."), n, i)
- return false
}
- return true
+ inspector.Inspect(str, v, t, nil, env.Globals)
}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/interface.go b/vendor/github.com/cosmos72/gomacro/classic/interface.go
index 876c24f..7ffda3a 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/interface.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/interface.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* interface.go
@@ -32,10 +23,6 @@ import (
. "github.com/cosmos72/gomacro/base"
)
-// "\u0080" is Unicode codepoint: Padding Character.
-// reflect.StructOf() allows it as field name, while go/scanner forbids it in Go source code
-const nameOfInterfaceObject = "\u0080"
-
func (env *Env) evalTypeInterface(node *ast.InterfaceType) r.Type {
if node.Methods == nil || len(node.Methods.List) == 0 {
return TypeOfInterface
@@ -43,7 +30,7 @@ func (env *Env) evalTypeInterface(node *ast.InterfaceType) r.Type {
types, names := env.evalTypeFields(node.Methods)
types = append([]r.Type{TypeOfInterface}, types...)
- names = append([]string{nameOfInterfaceObject}, names...)
+ names = append([]string{StrGensymInterface}, names...)
fields := makeStructFields(env.FileEnv().Path, names, types)
return r.StructOf(fields)
@@ -52,7 +39,7 @@ func (env *Env) evalTypeInterface(node *ast.InterfaceType) r.Type {
func isInterfaceType(t r.Type) bool {
if t.Kind() == r.Struct && t.NumField() > 0 {
field := t.Field(0)
- return field.Name == nameOfInterfaceObject && field.Type == TypeOfInterface
+ return field.Name == StrGensymInterface && field.Type == TypeOfInterface
}
return false
}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/interpreter.go b/vendor/github.com/cosmos72/gomacro/classic/interpreter.go
index fe6da7f..6ab7283 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/interpreter.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/interpreter.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* interp.go
@@ -35,6 +26,7 @@ import (
"time"
. "github.com/cosmos72/gomacro/base"
+ xr "github.com/cosmos72/gomacro/xreflect"
)
type Interp struct {
@@ -44,74 +36,88 @@ type Interp struct {
func New() *Interp {
top := NewEnv(nil, "builtin")
env := NewEnv(top, "main")
- return &Interp{env}
+ return &Interp{Env: env}
}
func (ir *Interp) ChangePackage(path string) {
ir.Env = ir.Env.ChangePackage(path)
}
-// cmd is expected to start with 'package'
-func (ir *Interp) cmdPackage(cmd string) {
- cmd = strings.TrimSpace(cmd)
- space := strings.IndexByte(cmd, ' ')
- var arg string
- if space >= 0 {
- arg = strings.TrimSpace(cmd[1+space:])
- }
- n := len(arg)
- env := ir.Env
- switch {
- case n == 0:
- fmt.Fprintf(env.Stdout, "// current package: %s %q\n", env.Filename, env.PackagePath)
- case arg[0] == '"' && arg[n-1] == '"':
- arg := arg[1 : n-1]
- ir.Env = env.ChangePackage(arg)
- default:
- env.Filename = arg
- }
-}
+var historyfile = Subdir(UserHomeDir(), ".gomacro_history")
func (ir *Interp) ReplStdin() {
- if ir.Options&OptShowPrompt != 0 {
- fmt.Fprint(ir.Stdout, `// GOMACRO, an interactive Go interpreter with macros
-// Copyright (C) 2017 Massimiliano Ghilardi
-// License LGPL v3+: GNU Lesser GPL version 3 or later
+ g := ir.Globals
+ if g.Options&OptShowPrompt != 0 {
+ fmt.Fprintf(ir.Stdout, `// GOMACRO, an interactive Go interpreter with macros
+// Copyright (C) 2017-2018 Massimiliano Ghilardi
+// License MPL v2.0+: Mozilla Public License version 2.0 or later
// This is free software with ABSOLUTELY NO WARRANTY.
//
-// Type :help for help
-`)
+// Type %chelp for help
+`, g.ReplCmdChar)
}
- in := bufio.NewReader(os.Stdin)
+ tty, _ := MakeTtyReadline(historyfile)
+ defer tty.Close(historyfile) // restore normal tty mode
+
+ c := StartSignalHandler(ir.Interrupt)
+ defer StopSignalHandler(c)
+
+ savetty := g.Readline
+ g.Readline = tty
+ defer func() {
+ g.Readline = savetty
+ }()
ir.Line = 0
- for ir.ReadParseEvalPrint(in) {
+ for ir.ReadParseEvalPrint() {
ir.Line = 0
}
+ os.Stdout.WriteString("\n")
}
func (ir *Interp) Repl(in *bufio.Reader) {
- for ir.ReadParseEvalPrint(in) {
+ r := MakeBufReadline(in, ir.Stdout)
+
+ c := StartSignalHandler(ir.Interrupt)
+ defer StopSignalHandler(c)
+
+ g := ir.Globals
+ savetty := g.Readline
+ g.Readline = r
+ defer func() {
+ g.Readline = savetty
+ }()
+
+ for ir.ReadParseEvalPrint() {
+ }
+}
+
+func (ir *Interp) ReadParseEvalPrint() (callAgain bool) {
+ str, firstToken := ir.Read()
+ if firstToken < 0 {
+ // skip comment-only lines and continue, but fail on EOF or other errors
+ return len(str) != 0
}
+ return ir.ParseEvalPrint(str[firstToken:])
}
-func (ir *Interp) ReadParseEvalPrint(in *bufio.Reader) (callAgain bool) {
+// return read string and position of first non-comment token.
+// return "", -1 on EOF
+func (ir *Interp) Read() (string, int) {
var opts ReadOptions
if ir.Options&OptShowPrompt != 0 {
opts |= ReadOptShowPrompt
}
- str, firstToken := ir.ReadMultiline(in, opts)
+ str, firstToken := ir.Env.Globals.ReadMultiline(opts, "gomacro> ")
if firstToken < 0 {
- // skip comments and continue, but fail on EOF or other errors
ir.IncLine(str)
- return len(str) > 0
} else if firstToken > 0 {
ir.IncLine(str[0:firstToken])
}
- return ir.ParseEvalPrint(str[firstToken:], in)
+ return str, firstToken
}
-func (ir *Interp) ParseEvalPrint(str string, in *bufio.Reader) (callAgain bool) {
+func (ir *Interp) ParseEvalPrint(str string) (callAgain bool) {
var t1 time.Time
trap := ir.Options&OptTrapPanic != 0
duration := ir.Options&OptShowTime != 0
@@ -130,182 +136,58 @@ func (ir *Interp) ParseEvalPrint(str string, in *bufio.Reader) (callAgain bool)
callAgain = true
}
if duration {
- delta := time.Now().Sub(t1)
- ir.Debugf("eval time %.6f s", float32(delta)/float32(time.Second))
+ delta := time.Since(t1)
+ ir.Debugf("eval time %v", delta)
}
}()
- callAgain = ir.parseEvalPrint(str, in)
+ callAgain = ir.parseEvalPrint(str)
trap = false // no panic happened
return callAgain
}
-func (ir *Interp) parseEvalPrint(src string, in *bufio.Reader) (callAgain bool) {
-
- src = strings.TrimSpace(src)
- n := len(src)
- if n == 0 {
+func (ir *Interp) parseEvalPrint(src string) (callAgain bool) {
+ if len(strings.TrimSpace(src)) == 0 {
return true // no input. don't print anything
}
env := ir.Env
- fast := env.Options&OptFastInterpreter != 0 // use the fast interpreter?
+ g := env.Globals
- if n > 0 && src[0] == ':' {
- args := strings.SplitN(src, " ", 2)
- cmd := args[0]
- switch {
- case strings.HasPrefix(":classic", cmd):
- if len(args) <= 1 {
- if env.Options&OptFastInterpreter != 0 {
- env.Debugf("switched to classic interpreter")
- }
- env.Options &^= OptFastInterpreter
- return true
- }
- // temporary override
- src = strings.TrimSpace(args[1])
- fast = false
- case strings.HasPrefix(":env", cmd):
- if len(args) <= 1 {
- env.ShowPackage("")
- } else {
- env.ShowPackage(args[1])
- }
- return true
- case strings.HasPrefix(":fast", cmd):
- if len(args) <= 1 {
- if env.Options&OptFastInterpreter == 0 {
- env.Debugf("switched to fast interpreter")
- }
- env.Options |= OptFastInterpreter
- return true
- }
- // temporary override
- src = strings.TrimSpace(args[1])
- fast = true
- case strings.HasPrefix(":help", cmd):
- env.ShowHelp(env.Stdout)
- return true
- case strings.HasPrefix(":inspect", cmd):
- if in == nil {
- fmt.Fprint(env.Stdout, "// not connected to user input, cannot :inspect\n")
- } else if len(args) == 1 {
- fmt.Fprint(env.Stdout, "// inspect: missing argument\n")
- } else {
- env.Inspect(in, args[1], fast)
- }
- return true
- case strings.HasPrefix(":options", cmd):
- if len(args) > 1 {
- env.Options ^= ParseOptions(args[1])
- }
- fmt.Fprintf(env.Stdout, "// current options: %v\n", env.Options)
- fmt.Fprintf(env.Stdout, "// unset options: %v\n", ^env.Options)
- return true
- case strings.HasPrefix(":quit", cmd):
- return false
- case strings.HasPrefix(":write", cmd):
- if len(args) <= 1 {
- env.WriteDeclsToStream(env.Stdout)
- } else {
- env.WriteDeclsToFile(args[1])
- }
- return true
- default:
- // temporarily disable collection of declarations and statements,
- // and temporarily disable macroexpandonly (i.e. re-enable eval)
- saved := env.Options
- todisable := OptMacroExpandOnly | OptCollectDeclarations | OptCollectStatements
- if saved&todisable != 0 {
- env.Options &^= todisable
- defer func() {
- env.Options = saved
- }()
- }
- src = " " + src[1:] // slower than src = src[1:], but gives accurate column positions in error messages
- }
+ src, opt := ir.Cmd(src)
+
+ callAgain = opt&CmdOptQuit == 0
+ if len(src) == 0 || !callAgain {
+ return callAgain
}
- if !fast {
- if src == "package" || src == " package" || strings.HasPrefix(src, "package ") || strings.HasPrefix(src, " package ") {
- ir.cmdPackage(src)
- return true
+
+ if opt&CmdOptForceEval != 0 {
+ // temporarily disable collection of declarations and statements,
+ // and temporarily re-enable eval (i.e. disable macroexpandonly)
+ const todisable = OptMacroExpandOnly | OptCollectDeclarations | OptCollectStatements
+ if g.Options&todisable != 0 {
+ g.Options &^= todisable
+ defer func() {
+ g.Options |= todisable
+ }()
}
}
+ ir.currOpt = opt // store options where Interp.Interrupt() can find them
+
// parse phase. no macroexpansion/collect yet
form := env.ParseOnly(src)
- var value r.Value
+ // macroexpand + collect + eval phase
var values []r.Value
- var typ interface{}
- var types []interface{}
-
- // eval phase
+ var types []xr.Type
if form != nil {
- if fast {
- // macroexpand + collect + eval
- xvalue, xvalues, xtype, xtypes := env.fastEval(form)
- value, values, typ = xvalue, xvalues, xtype
- types := make([]interface{}, len(xtypes))
- for i, xt := range xtypes {
- types[i] = xt
- }
- } else {
- // macroexpand + collect + eval
- value, values = env.classicEval(form)
- }
+ values = env.classicEval(form)
}
+
// print phase
- opts := env.Options
- if opts&OptShowEval != 0 {
- if len(values) != 0 {
- if opts&OptShowEvalType != 0 {
- for i, vi := range values {
- var ti interface{}
- if types != nil && len(types) > i {
- ti = types[i]
- } else {
- ti = ValueType(vi)
- }
- env.Fprintf(env.Stdout, "%v\t// %v\n", vi, ti)
- }
- } else {
- for _, vi := range values {
- env.Fprintf(env.Stdout, "%v\n", vi)
- }
- }
- } else if value != None {
- if opts&OptShowEvalType != 0 {
- if typ == nil {
- typ = ValueType(value)
- }
- env.Fprintf(env.Stdout, "%v\t// %v\n", value, typ)
- } else {
- env.Fprintf(env.Stdout, "%v\n", value)
- }
- }
- }
+ g.Print(values, types)
return true
}
-func (ir *Interp) EvalFile(filePath string, pkgPath string) {
- file, err := os.Open(filePath)
- if err != nil {
- ir.Errorf("error opening file '%s': %v", filePath, err)
- return
- }
- defer file.Close()
-
- savePath := ir.Env.ThreadGlobals.PackagePath
- saveOpts := ir.Env.Options
-
- ir.ChangePackage(pkgPath)
- ir.Env.Options &^= OptShowEval
-
- defer func() {
- ir.ChangePackage(savePath)
- ir.Env.Options = saveOpts
- }()
-
- in := bufio.NewReader(file)
- ir.Repl(in)
+func (ir *Interp) Interrupt(sig os.Signal) {
+ // TODO not implemented
}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/literal.go b/vendor/github.com/cosmos72/gomacro/classic/literal.go
index 4384231..498880b 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/literal.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/literal.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* literal.go
@@ -115,6 +106,9 @@ func (env *Env) evalLiteral0(node *ast.BasicLit) interface{} {
func (env *Env) evalCompositeLiteral(node *ast.CompositeLit) (r.Value, []r.Value) {
t, ellipsis := env.evalType2(node.Type, false)
+ if t == nil {
+ env.Errorf("unimplemented type inference in composite literal: %v", node)
+ }
obj := Nil
switch t.Kind() {
case r.Map:
diff --git a/vendor/github.com/cosmos72/gomacro/classic/macroexpand.go b/vendor/github.com/cosmos72/gomacro/classic/macroexpand.go
index 6d67856..848c99a 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/macroexpand.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/macroexpand.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* macroexpand.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/method.go b/vendor/github.com/cosmos72/gomacro/classic/method.go
index 9feecf4..0c9b713 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/method.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/method.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* method.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/number.go b/vendor/github.com/cosmos72/gomacro/classic/number.go
index 725602f..516deae 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/number.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/number.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* number.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/output.go b/vendor/github.com/cosmos72/gomacro/classic/output.go
index 91d53ed..c617c24 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/output.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/output.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* output.go
@@ -33,6 +24,7 @@ import (
"sort"
. "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/imports"
)
var (
@@ -40,23 +32,6 @@ var (
NilEnv = []r.Value{r.ValueOf(nilEnv)}
)
-func (ir *ThreadGlobals) ShowHelp(out io.Writer) {
- fmt.Fprint(out, `// type Go code to execute it. example: func add(x, y int) int { return x + y }
-
-// interpreter commands:
-:classic CODE execute CODE using the classic interpreter
-:env [name] show available functions, variables and constants
- in current package, or from imported package "name"
-:fast CODE execute CODE using the fast interpreter (default)
-:help show this help
-:inspect EXPR inspect expression interactively
-:options [OPTS] show or toggle interpreter options
-:quit quit the interpreter
-:write [FILE] write collected declarations and/or statements to standard output or to FILE
- use :o Declarations and/or :o Statements to start collecting them
-`)
-}
-
func (env *Env) showStack() {
frames := env.CallStack.Frames
n := len(frames)
@@ -69,37 +44,43 @@ func (env *Env) showStack() {
if frame.panicking {
env.Debugf("%d:\t %v, runningDefers = %v, panic = %v", i, name, frame.runningDefers, frame.panick)
} else {
- env.Debugf("%d:\t %v, runningDefers = %v, panic is nil", i, name, frame.runningDefers)
+ env.Debugf("%d:\t %v, runningDefers = %v", i, name, frame.runningDefers)
}
}
}
func (env *Env) ShowPackage(packageName string) {
- out := env.Stdout
- e := env
- path := env.Path
- pkg := env.AsPackage()
- if len(packageName) != 0 {
- bind := env.evalIdentifier(&ast.Ident{Name: packageName})
- if bind == None || bind == Nil {
- env.Warnf("not an imported package: %q", packageName)
- return
+ if len(packageName) == 0 {
+ stack := make([]*Env, 0)
+ for e := env; e != nil; e = e.Outer {
+ stack = append(stack, e)
}
- switch val := bind.Interface().(type) {
- case *PackageRef:
- e = nil
- pkg = val.Package
- path = packageName
- default:
- env.Warnf("not an imported package: %q = %v <%v>", packageName, val, typeOf(bind))
- return
+ for i := len(stack) - 1; i >= 0; i-- {
+ e := stack[i]
+ pkg := e.AsPackage()
+ env.showPackage(e.Name, e.Path, &pkg)
}
+ return
+ }
+ bind, ok := env.resolveIdentifier(&ast.Ident{Name: packageName})
+ if !ok {
+ env.Warnf("not an imported package: %q", packageName)
+ return
}
- spaces15 := " "
-Loop:
+ val, ok := bind.Interface().(*PackageRef)
+ if !ok {
+ env.Warnf("not an imported package: %q = %v <%v>", packageName, val, typeOf(bind))
+ return
+ }
+ env.showPackage(val.Name, val.Path, &val.Package)
+}
+
+func (env *Env) showPackage(name string, path string, pkg *imports.Package) {
+ const spaces15 = " "
+ out := env.Stdout
binds := pkg.Binds
if len(binds) > 0 {
- fmt.Fprintf(out, "// ----- %s binds -----\n", path)
+ ShowPackageHeader(out, name, path, "binds")
keys := make([]string, len(binds))
i := 0
@@ -109,23 +90,13 @@ Loop:
}
sort.Strings(keys)
for _, k := range keys {
- n := len(k) & 15
- fmt.Fprintf(out, "%s%s = ", k, spaces15[n:])
- bind := binds[k]
- if bind != Nil {
- switch bind := bind.Interface().(type) {
- case *Env:
- fmt.Fprintf(out, "%p // %v\n", bind, r.TypeOf(bind))
- continue
- }
- }
- env.Fprintf(out, "%v // %v\n", bind, r.TypeOf(bind))
+ showValue(out, k, binds[k])
}
fmt.Fprintln(out)
}
types := pkg.Types
if len(types) > 0 {
- fmt.Fprintf(out, "// ----- %s types -----\n", path)
+ ShowPackageHeader(out, name, path, "types")
keys := make([]string, len(types))
i := 0
@@ -135,17 +106,24 @@ Loop:
}
sort.Strings(keys)
for _, k := range keys {
- n := len(k) & 15
- t := types[k]
- fmt.Fprintf(out, "%s%s %v <%v>\n", k, spaces15[n:], t.Kind(), t)
+ showType(out, k, types[k])
}
fmt.Fprintln(out)
}
- if e != nil {
- if e = e.Outer; e != nil {
- path = e.Path
- pkg = e.AsPackage()
- goto Loop
- }
+}
+
+const spaces15 = " "
+
+func showValue(out io.Writer, name string, v r.Value) {
+ n := len(name) & 15
+ if !v.IsValid() || v == None {
+ fmt.Fprintf(out, "%s%s = nil\t// nil\n", name, spaces15[n:])
+ } else {
+ fmt.Fprintf(out, "%s%s = %v\t// %s\n", name, spaces15[n:], v, ValueType(v))
}
}
+
+func showType(out io.Writer, name string, t r.Type) {
+ n := len(name) & 15
+ fmt.Fprintf(out, "%s%s = %v\t// %v\n", name, spaces15[n:], t, t.Kind())
+}
diff --git a/vendor/github.com/cosmos72/gomacro/classic/quasiquote.go b/vendor/github.com/cosmos72/gomacro/classic/quasiquote.go
index d7a20ed..c3cdeb4 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/quasiquote.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/quasiquote.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* quasiquote.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/select.go b/vendor/github.com/cosmos72/gomacro/classic/select.go
index 3b3b292..ea328ef 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/select.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/select.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* select.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/statement.go b/vendor/github.com/cosmos72/gomacro/classic/statement.go
index 16b3231..d128403 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/statement.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/statement.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* statement.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/switch.go b/vendor/github.com/cosmos72/gomacro/classic/switch.go
index a90070e..2e4b46f 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/switch.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/switch.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* for.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/switch_type.go b/vendor/github.com/cosmos72/gomacro/classic/switch_type.go
index 786505c..43b9322 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/switch_type.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/switch_type.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* switch_type.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/type.go b/vendor/github.com/cosmos72/gomacro/classic/type.go
index 7c678f7..4bf8c8f 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/type.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/type.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* type.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/unaryexpr.go b/vendor/github.com/cosmos72/gomacro/classic/unaryexpr.go
index 6d44819..8cb50cd 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/unaryexpr.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/unaryexpr.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* unaryexpr.go
diff --git a/vendor/github.com/cosmos72/gomacro/classic/x_package.go b/vendor/github.com/cosmos72/gomacro/classic/x_package.go
index c8961b5..64710b4 100644
--- a/vendor/github.com/cosmos72/gomacro/classic/x_package.go
+++ b/vendor/github.com/cosmos72/gomacro/classic/x_package.go
@@ -26,8 +26,6 @@ func init() {
"Env": r.TypeOf((*Env)(nil)).Elem(),
"Error_builtin": r.TypeOf((*Error_builtin)(nil)).Elem(),
"Function": r.TypeOf((*Function)(nil)).Elem(),
- "Inspector": r.TypeOf((*Inspector)(nil)).Elem(),
- "Interface": r.TypeOf((*Interface)(nil)).Elem(),
"Interp": r.TypeOf((*Interp)(nil)).Elem(),
"Macro": r.TypeOf((*Macro)(nil)).Elem(),
"Methods": r.TypeOf((*Methods)(nil)).Elem(),
@@ -37,9 +35,9 @@ func init() {
}, Untypeds: map[string]string{
"MultiThread": "bool:true",
}, Wrappers: map[string][]string{
- "Env": []string{"CollectAst", "CollectNode", "CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymEmbedded", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "LookupPackage", "ObjMethodByName", "ParseBytes", "Position", "ShowHelp", "Sprintf", "ToString", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
- "Interp": []string{"AsPackage", "CallerFrame", "ChangePackage", "ClassicEval", "CollectAst", "CollectNode", "CollectPackageImports", "Copy", "CurrentFrame", "Debugf", "DefineConst", "DefineFunc", "DefineVar", "Error", "Errorf", "Eval", "Eval1", "EvalAst", "EvalAst1", "EvalNode", "EvalNode1", "FastEval", "FileEnv", "Fprintf", "Gensym", "GensymEmbedded", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "Inspect", "LookupPackage", "MacroExpand", "MacroExpand1", "MacroExpandAstCodewalk", "MacroExpandCodewalk", "MergePackage", "ObjMethodByName", "Parse", "ParseBytes", "ParseOnly", "Position", "ReadMultiline", "ShowHelp", "ShowPackage", "Sprintf", "ToString", "TopEnv", "ValueOf", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
- "ThreadGlobals": []string{"CollectAst", "CollectNode", "CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymEmbedded", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "LookupPackage", "ParseBytes", "Position", "Sprintf", "ToString", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
+ "Env": []string{"CollectAst", "CollectNode", "CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymAnonymous", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "LookupPackage", "ObjMethodByName", "ParseBytes", "Position", "ShowHelp", "Sprintf", "ToString", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
+ "Interp": []string{"AsPackage", "CallerFrame", "ChangePackage", "ClassicEval", "CollectAst", "CollectNode", "CollectPackageImports", "Copy", "CurrentFrame", "Debugf", "DefineConst", "DefineFunc", "DefineVar", "Error", "Errorf", "Eval", "Eval1", "EvalAst", "EvalAst1", "EvalNode", "EvalNode1", "FastEval", "FileEnv", "Fprintf", "Gensym", "GensymAnonymous", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "Inspect", "LookupPackage", "MacroExpand", "MacroExpand1", "MacroExpandAstCodewalk", "MacroExpandCodewalk", "MergePackage", "ObjMethodByName", "Parse", "ParseBytes", "ParseOnly", "Position", "ReadMultiline", "ShowHelp", "ShowPackage", "Sprintf", "ToString", "TopEnv", "ValueOf", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
+ "ThreadGlobals": []string{"CollectAst", "CollectNode", "CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymAnonymous", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "LookupPackage", "ParseBytes", "Position", "Sprintf", "ToString", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
},
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/cmd.go b/vendor/github.com/cosmos72/gomacro/cmd/cmd.go
similarity index 56%
rename from vendor/github.com/cosmos72/gomacro/cmd.go
rename to vendor/github.com/cosmos72/gomacro/cmd/cmd.go
index b1ac41f..0234b75 100644
--- a/vendor/github.com/cosmos72/gomacro/cmd.go
+++ b/vendor/github.com/cosmos72/gomacro/cmd/cmd.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* cmd.go
@@ -23,12 +14,10 @@
* Author: Massimiliano Ghilardi
*/
-package main
+package cmd
import (
- "bufio"
"bytes"
- "errors"
"fmt"
"io"
"io/ioutil"
@@ -36,19 +25,33 @@ import (
"strings"
. "github.com/cosmos72/gomacro/base"
- "github.com/cosmos72/gomacro/classic"
+ "github.com/cosmos72/gomacro/base/inspect"
+ "github.com/cosmos72/gomacro/fast"
+ "github.com/cosmos72/gomacro/fast/debug"
)
type Cmd struct {
- *classic.Interp
- WriteDeclsAndStmtsToFile, OverwriteFiles bool
+ Interp *fast.Interp
+ WriteDeclsAndStmts bool
+ OverwriteFiles bool
+}
+
+func New() *Cmd {
+ cmd := Cmd{}
+ cmd.Init()
+ return &cmd
}
func (cmd *Cmd) Init() {
- cmd.Interp = classic.New()
- cmd.ParserMode = 0
- cmd.Options = OptTrapPanic | OptShowPrompt | OptShowEval | OptShowEvalType // | OptShowAfterMacroExpansion // | OptDebugMacroExpand // | OptDebugQuasiquote // | OptShowEvalDuration // | OptShowAfterParse
- cmd.WriteDeclsAndStmtsToFile = false
+ ir := fast.New()
+ ir.SetDebugger(&debug.Debugger{})
+ ir.SetInspector(&inspect.Inspector{})
+
+ g := &ir.Comp.Globals
+ g.ParserMode = 0
+ g.Options = OptDebugger | OptCtrlCEnterDebugger | OptKeepUntyped | OptTrapPanic | OptShowPrompt | OptShowEval | OptShowEvalType
+ cmd.Interp = ir
+ cmd.WriteDeclsAndStmts = false
cmd.OverwriteFiles = false
}
@@ -57,25 +60,25 @@ func (cmd *Cmd) Main(args []string) (err error) {
cmd.Init()
}
ir := cmd.Interp
- env := cmd.Env
+ g := &ir.Comp.Globals
var set, clear Options
- var repl = true
- cmd.WriteDeclsAndStmtsToFile = false
+ var repl, forcerepl = true, false
+ cmd.WriteDeclsAndStmts = false
cmd.OverwriteFiles = false
for len(args) > 0 {
switch args[0] {
case "-c", "--collect":
- env.Options |= OptCollectDeclarations | OptCollectStatements
+ g.Options |= OptCollectDeclarations | OptCollectStatements
case "-e", "--expr":
if len(args) > 1 {
repl = false
buf := bytes.NewBufferString(args[1])
- buf.WriteByte('\n') // because ReadMultiLine() needs a final '\n'
- env.Options |= OptShowEval // set by default, overridden by -s, -v and -vv
- env.Options = (env.Options | set) &^ clear
- _, err := cmd.EvalReader(buf)
+ buf.WriteByte('\n') // because ReadMultiLine() needs a final '\n'
+ g.Options |= OptShowEval // set by default, overridden by -s, -v and -vv
+ g.Options = (g.Options | set) &^ clear
+ err := cmd.EvalReader(buf)
if err != nil {
return err
}
@@ -86,11 +89,7 @@ func (cmd *Cmd) Main(args []string) (err error) {
case "-h", "--help":
return cmd.Usage()
case "-i", "--repl":
- repl = false
- env.Options |= OptShowPrompt | OptShowEval | OptShowEvalType // set by default, overridden by -s, -v and -vv
- env.Options = (env.Options | set) &^ clear
- ir.ReplStdin()
-
+ forcerepl = true
case "-m", "--macro-only":
set |= OptMacroExpandOnly
clear &^= OptMacroExpandOnly
@@ -101,8 +100,8 @@ func (cmd *Cmd) Main(args []string) (err error) {
set |= OptTrapPanic | OptPanicStackTrace
clear &= OptTrapPanic | OptPanicStackTrace
case "-s", "--silent":
- set &^= OptShowEval | OptShowEvalType
- clear |= OptShowEval | OptShowEvalType
+ set &^= OptShowPrompt | OptShowEval | OptShowEvalType
+ clear |= OptShowPrompt | OptShowEval | OptShowEvalType
case "-v", "--verbose":
set = (set | OptShowEval) &^ OptShowEvalType
clear = (clear &^ OptShowEval) | OptShowEvalType
@@ -110,38 +109,39 @@ func (cmd *Cmd) Main(args []string) (err error) {
set |= OptShowEval | OptShowEvalType
clear &^= OptShowEval | OptShowEvalType
case "-w", "--write-decls":
- cmd.WriteDeclsAndStmtsToFile = true
+ cmd.WriteDeclsAndStmts = true
case "-x", "--exec":
clear |= OptMacroExpandOnly
set &^= OptMacroExpandOnly
default:
arg := args[0]
if len(arg) > 0 && arg[0] == '-' {
- fmt.Fprintf(env.Stderr, "gomacro: unrecognized option '%s'.\nTry 'gomacro --help' for more information\n", arg)
+ fmt.Fprintf(g.Stderr, "gomacro: unrecognized option '%s'.\nTry 'gomacro --help' for more information\n", arg)
return nil
}
repl = false
- if cmd.WriteDeclsAndStmtsToFile {
- env.Options |= OptCollectDeclarations | OptCollectStatements
+ if cmd.WriteDeclsAndStmts {
+ g.Options |= OptCollectDeclarations | OptCollectStatements
}
- env.Options &^= OptShowPrompt | OptShowEval | OptShowEvalType // cleared by default, overridden by -s, -v and -vv
- env.Options = (env.Options | set) &^ clear
+ g.Options &^= OptShowPrompt | OptShowEval | OptShowEvalType // cleared by default, overridden by -s, -v and -vv
+ g.Options = (g.Options | set) &^ clear
cmd.EvalFileOrDir(arg)
- env.Imports, env.Declarations, env.Statements = nil, nil, nil
+ g.Imports, g.Declarations, g.Statements = nil, nil, nil
}
args = args[1:]
}
- if repl {
- env.Options |= OptShowPrompt | OptShowEval | OptShowEvalType // set by default, overridden by -s, -v and -vv
- env.Options = (env.Options | set) &^ clear
+ if repl || forcerepl {
+ g.Options |= OptShowPrompt | OptShowEval | OptShowEvalType // set by default, overridden by -s, -v and -vv
+ g.Options = (g.Options | set) &^ clear
ir.ReplStdin()
}
return nil
}
func (cmd *Cmd) Usage() error {
- fmt.Fprint(cmd.Env.Stdout, `usage: gomacro [OPTIONS] [files-and-dirs]
+ g := &cmd.Interp.Comp.Globals
+ fmt.Fprint(g.Stdout, `usage: gomacro [OPTIONS] [files-and-dirs]
Recognized options:
-c, --collect collect declarations and statements, to print them later
@@ -202,7 +202,7 @@ func (cmd *Cmd) EvalDir(dirname string) error {
for _, file := range files {
filename := file.Name()
if !file.IsDir() && strings.HasSuffix(filename, ".gomacro") {
- filename = fmt.Sprintf("%s%c%s", dirname, os.PathSeparator, filename)
+ filename = Subdir(dirname, filename)
err := cmd.EvalFile(filename)
if err != nil {
return err
@@ -220,28 +220,17 @@ const disclaimer = `// ---------------------------------------------------------
`
-func (cmd *Cmd) EvalFile(filename string) (err error) {
- env := cmd.Env
- env.Declarations = nil
- env.Statements = nil
- saveFilename := env.Filename
+func (cmd *Cmd) EvalFile(filename string) error {
+ g := &cmd.Interp.Comp.Globals
+ g.Declarations = nil
+ g.Statements = nil
- f, err := os.Open(filename)
- if err != nil {
- return err
- }
- defer func() {
- f.Close()
- env.Filename = saveFilename
- }()
- env.Filename = filename
- var comments string
- comments, err = cmd.EvalReader(f)
+ comments, err := cmd.Interp.EvalFile(filename)
if err != nil {
return err
}
- if cmd.WriteDeclsAndStmtsToFile {
+ if cmd.WriteDeclsAndStmts {
outname := filename
if dot := strings.LastIndexByte(outname, '.'); dot >= 0 {
// sanity check: dot must be in the file name, NOT in its path
@@ -253,48 +242,23 @@ func (cmd *Cmd) EvalFile(filename string) (err error) {
if !cmd.OverwriteFiles {
_, err := os.Stat(outname)
if err == nil {
- env.Warnf("file exists already, use -f to force overwriting: %v", outname)
+ g.Warnf("file exists already, use -f to force overwriting: %v", outname)
return nil
}
}
- env.WriteDeclsToFile(outname, disclaimer, comments)
+ g.WriteDeclsToFile(outname, disclaimer, comments)
- if env.Options&OptShowEval != 0 {
- fmt.Fprintf(env.Stdout, "// processed file: %v\t-> %v\n", filename, outname)
+ if g.Options&OptShowEval != 0 {
+ fmt.Fprintf(g.Stdout, "// processed file: %v\t-> %v\n", filename, outname)
}
}
return nil
}
-func (cmd *Cmd) EvalReader(src io.Reader) (comments string, err error) {
- defer func() {
- if rec := recover(); rec != nil {
- switch rec := rec.(type) {
- case error:
- err = rec
- default:
- err = errors.New(fmt.Sprint(rec))
- }
- }
- }()
- in := bufio.NewReader(src)
- ir := cmd.Interp
- env := ir.Env
- env.Options &^= OptShowPrompt // parsing a file: suppress prompt
- env.Line = 0
-
- // perform the first iteration manually, to collect comments
- str, firstToken := env.ReadMultiline(in, ReadOptCollectAllComments)
- if firstToken >= 0 {
- comments = str[0:firstToken]
- if firstToken > 0 {
- str = str[firstToken:]
- env.IncLine(comments)
- }
- }
- if ir.ParseEvalPrint(str, in) {
- for ir.ReadParseEvalPrint(in) {
- }
+func (cmd *Cmd) EvalReader(src io.Reader) error {
+ _, err := cmd.Interp.EvalReader(src)
+ if err != nil {
+ return err
}
- return comments, nil
+ return nil
}
diff --git a/vendor/github.com/cosmos72/gomacro/cmd/x_package.go b/vendor/github.com/cosmos72/gomacro/cmd/x_package.go
new file mode 100644
index 0000000..257a265
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/cmd/x_package.go
@@ -0,0 +1,20 @@
+// this file was generated by gomacro command: import _i "github.com/cosmos72/gomacro/cmd"
+// DO NOT EDIT! Any change will be lost when the file is re-generated
+
+package cmd
+
+import (
+ r "reflect"
+ "github.com/cosmos72/gomacro/imports"
+)
+
+// reflection: allow interpreted code to import "github.com/cosmos72/gomacro/cmd"
+func init() {
+ imports.Packages["github.com/cosmos72/gomacro/cmd"] = imports.Package{
+ Binds: map[string]r.Value{
+ "New": r.ValueOf(New),
+ }, Types: map[string]r.Type{
+ "Cmd": r.TypeOf((*Cmd)(nil)).Elem(),
+ },
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/doc/features-and-limitations.md b/vendor/github.com/cosmos72/gomacro/doc/features-and-limitations.md
new file mode 100644
index 0000000..602d293
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/doc/features-and-limitations.md
@@ -0,0 +1,116 @@
+Gomacro default interpreter supports:
+* history/readline (uses https://github.com/peterh/liner)
+* multiline input
+* comments starting with #! in addition to // and /* ... */
+* all basic types: booleans, integers, floats, complex numbers, strings (and iota)
+* use existing compiled interfaces, as `io.Reader`
+* creating new interface types
+* constant, variable and type declaration, including untyped constants
+* Go 1.9 type aliases
+* unary and binary operators
+* assignment, i.e. operators = += -= *= /= %= &= |= ^= &^= <<= >>=
+* composite types: arrays, channels, maps, pointers, slices, strings, structs
+* composite literals
+* embedded fields and method wrappers for embedded fields
+* type assertions
+* seamless invocation of compiled functions from interpreter, and vice-versa
+* channel send and receive
+* goroutines, i.e. go function(args)
+* function and method calls, including multiple return values and variadic calls
+* function and method declarations (including variadic functions/methods,
+ and methods with pointer receiver)
+* named return values
+* extracting methods from types and from instances.
+ For example `time.Duration.String` returns a `func(time.Duration) string`
+ and `time.Duration(1s).String` returns a `func() string`
+* if, for, for-range, break, continue, fallthrough, return (goto is only partially implemented)
+* select, switch, type switch, fallthrough
+* all builtins: append, cap, close, comples, defer, delete, imag, len, make, new, panic, print, println, real, recover
+* imports: Go standard packages "just work". Importing other packages requires either the "plugin" package
+ (available only for Go 1.8+ on Linux) or, in alternative, recompiling gomacro after the import (all other platforms)
+* macro declarations, for example `macro foo(a, b, c interface{}) interface{} { return b }`
+* macro calls, for example `foo; x; y; z`
+* macroexpansion: code walker, MacroExpand and MacroExpand1
+* ~quote and ~quasiquote. they take any number of arguments in curly braces, for example:
+ `~quote { x; y; z }`
+* ~unquote and ~unquote_splice
+* ~func, ~lambda: specializations of "func".
+ * ~lambda always starts a closure (lambda) or a function type
+ * ~func always starts a function or method declaration
+ useful to resolve a limitation in Go syntax that becomes significant for ~quote and ~quasiquote:
+ * in declarations, "func" always declares a function or method - there is no way to declare a closure (lambda) or function type
+ * in statements and expressions, including the body of ~quote and ~quasiquote,
+ "func" always declares a closure (lambda) or a function type - there is no way to declare a function or method
+* nesting macros, quotes and unquotes
+
+Some features are still missing or incomplete:
+* goto can only jump back, not forward
+* out-of-order code is under testing - some corner cases, as for example out-of-order declarations
+ used in keys of composite literals, are not supported.
+ Clearly, at REPL code is still executed as soon as possible, so it makes a difference mostly
+ if you separate multiple declarations with ; on a single line. Example: `var a = b; var b = 42`
+ Support for "batch mode" is in progress - it reads as much source code as possible before executing it,
+ and it's useful mostly to execute whole files or directories.
+* incomplete interface -> interface type assertions and type switches:
+ they do not support yet interpreted types stored in interfaces, and interpreted interfaces.
+* unimplemented conversion typed constant -> interpreted interface (see fast/literal.go:207)
+ Workaround: assign the constant to a variable, then convert the variable to the interpreted interface
+* bug: if gomacro is linked as a shared library (see https://stackoverflow.com/questions/1757090/shared-library-in-go)
+ some method calls on constants do not work. example:
+ import "os"
+ os.ModeAppend.IsDir()
+ interface conversion: interface {} is func() bool, not func() bool
+ This is probably a Go 1.10 compiler bug.
+
+
+Other limitations:
+* named types created by interpreted code are emulated.
+ When the interpreter is asked to create for example `type Pair struct { A, B int }`,
+ it actually creates the unnamed type `struct { A, B int }`.
+ Everything works as it should within the interpreter, but extracting the struct
+ and using it in compiled code reveals the difference.
+
+ Reason: gomacro relies on the Go reflect package to create new types,
+ but there is no function `reflect.NamedOf()` or any other way to create new **named** types,
+ so gomacro uses `reflect.StructOf` which can only create unnamed types.
+
+* recursive types are emulated too.
+ For example `type List struct { First interface{}; Rest *List}`
+ is actually a `struct { First interface{}; Rest *interface{} }`.
+ Again, everything works as it should within the interpreter, but extracting
+ the struct and using it in compiled code reveals the difference.
+
+ The reason is: the interpreter uses `reflect.StructOf()` to define new types,
+ which cannot create recursive types
+
+ Interestingly, this means the interpreter also accepts the following declaration,
+ which is rejected by Go compiler: `type List2 struct { First int; Rest List2 }`
+ Note that `Rest` is a `List2` **not** a pointer to `List2`
+
+* interpreted interfaces are emulated too.
+ New interface types created by interpreted code are actually anonymous structs.
+ Also here, everything works as it should within the interpreter, but extracting
+ the interface and using it in compiled code reveals the difference.
+
+ Reason: gomacro relies on the Go reflect package to create new types,
+ and there is no function `reflect.InterfaceOf()`, so the interpreter uses
+ `reflect.StructOf()` and a lot of bookkeeping to emulate new interface types.
+
+* operators << and >> on untyped constants do not follow the exact type deduction rules.
+ The implemented behavior is:
+ * an untyped constant shifted by a non-constant expression always returns an int
+ * an untyped floating point constant shifted by a constant expression returns an untyped integer constant.
+ the interpreter signals an error during the precompile phase
+ if the left operand has a non-zero fractional or imaginary part,
+ or it overflows both int64 and uint64.
+ See [Go Language Specification](https://golang.org/ref/spec#Operators) for the correct behavior
+
+* recover() does not support mixing interpreted and compiled code:
+
+ recover() works normally if the function and its defer are either
+ **both interpreted** or **both compiled**.
+
+ but if an interpreted function invokes as defer a compiled function,
+ or a compiled function invokes as defer an interpreted function,
+ then, inside that defer, recover() will not work:
+ it will return nil and will **not** stop panics.
diff --git a/vendor/github.com/cosmos72/gomacro/example/earljwagner1/earljwagner1.go b/vendor/github.com/cosmos72/gomacro/example/earljwagner1/earljwagner1.go
index bbcfd14..0c15def 100644
--- a/vendor/github.com/cosmos72/gomacro/example/earljwagner1/earljwagner1.go
+++ b/vendor/github.com/cosmos72/gomacro/example/earljwagner1/earljwagner1.go
@@ -4,15 +4,15 @@ import (
"fmt"
"reflect"
- "github.com/cosmos72/gomacro/classic"
+ "github.com/cosmos72/gomacro/fast"
"github.com/cosmos72/gomacro/imports"
)
// example from Earl J Wagner use case:
// interactively replace a (bugged) compiled function with a (corrected) interpreted one
func main() {
- // 1. allocate the classic interpreter. Reason: the fast interpreter cannot yet switch package
- ir := classic.New()
+ // 1. create the fast interpreter.
+ ir := fast.New()
// 2. tell the interpreter about our compiled function Cube() in package "github.com/cosmos72/gomacro/example/earljwagner1"
// An alternative solution is to run the interpreter interactively, and at its REPL enter the command:
@@ -28,26 +28,28 @@ func main() {
}
// 3. tell the interpreter to import the package containing our Cube()
+ // alternatively, one could use
+ // ir.ImportPackage("earljwagner1", "github.com/cosmos72/gomacro/example/earljwagner1")
ir.Eval(`import "github.com/cosmos72/gomacro/example/earljwagner1"`)
// 4. execute compiled Cube() - and realise it's bugged
- xcube, _ := ir.Eval("earljwagner1.Cube(3.0)")
+ xcube, _ := ir.Eval1("earljwagner1.Cube(3.0)")
fmt.Printf("compiled earljwagner1.Cube(3.0) = %f\n", xcube.Interface().(float64))
// 5. tell the interpreter to switch to package "github.com/cosmos72/gomacro/example/earljwagner1"
- // at REPL, one would instead type the following (note the quotes):
+ // alternatively, at REPL one would type (note the quotes):
// package "github.com/cosmos72/gomacro/example/earljwagner1"
- ir.ChangePackage("github.com/cosmos72/gomacro/example/earljwagner1")
+ ir.ChangePackage("earljwagner1", "github.com/cosmos72/gomacro/example/earljwagner1")
// 6. the compiled function Cube() can now be invoked without package prefix
- xcube, _ = ir.Eval("Cube(4.0)")
+ xcube, _ = ir.Eval1("Cube(4.0)")
fmt.Printf("compiled Cube(4.0) = %f\n", xcube.Interface().(float64))
// 7. define an interpreted function Cube(), replacing the compiled one
ir.Eval("func Cube(x float64) float64 { return x*x*x }")
// 8. invoke the interpreted function Cube() - the bug is solved :)
- xcube, _ = ir.Eval("Cube(4.0)")
+ xcube, _ = ir.Eval1("Cube(4.0)")
fmt.Printf("interpreted Cube(4.0) = %f\n", xcube.Interface().(float64))
// 9. note: compiled code will *NOT* automatically know about the bug-fixed Cube() living inside the interpreter.
diff --git a/vendor/github.com/cosmos72/gomacro/example/earljwagner2/earljwagner2.go b/vendor/github.com/cosmos72/gomacro/example/earljwagner2/earljwagner2.go
index 80b431c..5ff5a37 100644
--- a/vendor/github.com/cosmos72/gomacro/example/earljwagner2/earljwagner2.go
+++ b/vendor/github.com/cosmos72/gomacro/example/earljwagner2/earljwagner2.go
@@ -3,8 +3,9 @@ package main
import (
"errors"
"fmt"
+ "reflect"
- "github.com/cosmos72/gomacro/classic"
+ "github.com/cosmos72/gomacro/fast"
"github.com/cosmos72/gomacro/imports"
)
@@ -17,38 +18,48 @@ func fail(format string, args ...interface{}) {
// with another (corrected) interpreted function,
// without losing the packages already loaded in the intepreter
func main() {
- // 1. allocate the classic interpreter. Reason: the fast interpreter cannot yet switch package
- ir := classic.New()
+ // 1. create the fast interpreter.
+ ir := fast.New()
- // 2. tell the interpreter to load the file "cube.go" into the package "github.com/cosmos72/gomacro/example/earljwagner2"
- ir.EvalFile("cube.go", "github.com/cosmos72/gomacro/example/earljwagner2")
+ // 2. switch to package "github.com/cosmos72/gomacro/example/earljwagner2"
+ ir.ChangePackage("earljwagner2", "github.com/cosmos72/gomacro/example/earljwagner2")
- // 3. tell the interpreter to import the package containing the interpreted function Cube() loaded from file
+ // 3. tell the interpreter to load the file "cube.go" into the current package
+ ir.EvalFile("cube.go")
+
+ // 4. switch back to package "main"
+ ir.ChangePackage("main", "main")
+
+ // 5. tell the interpreter to import the package containing the interpreted function Cube() loaded from file
ir.Eval(`import "github.com/cosmos72/gomacro/example/earljwagner2"`)
- // 4. execute interpreted Cube() loaded from file - and realise it's bugged
- xcube, _ := ir.Eval("earljwagner2.Cube(3.0)")
+ // 6. execute interpreted Cube() loaded from file - and realise it's bugged
+ xcube, _ := ir.Eval1("earljwagner2.Cube(3.0)")
fmt.Printf("interpreted earljwagner2.Cube(3.0) = %f\n", xcube.Interface().(float64))
- // 5. tell the interpreter to switch to package "github.com/cosmos72/gomacro/example/earljwagner2"
+ // 7. tell the interpreter to switch to package "github.com/cosmos72/gomacro/example/earljwagner2"
// at REPL, one would instead type the following (note the quotes):
// package "github.com/cosmos72/gomacro/example/earljwagner2"
- ir.ChangePackage("github.com/cosmos72/gomacro/example/earljwagner2")
+ ir.ChangePackage("earljwagner2", "github.com/cosmos72/gomacro/example/earljwagner2")
- // 6. the interpreted function Cube() can now be invoked without package prefix
- xcube, _ = ir.Eval("Cube(4.0)")
+ // 8. the interpreted function Cube() can now be invoked without package prefix
+ xcube, _ = ir.Eval1("Cube(4.0)")
fmt.Printf("interpreted Cube(4.0) = %f\n", xcube.Interface().(float64))
- // 7. redefine the interpreted function Cube(), replacing the loaded one
+ // 9. redefine the interpreted function Cube(), replacing the loaded one
ir.Eval("func Cube(x float64) float64 { return x*x*x }")
- // 8. invoke the redefined function Cube() - the bug is solved :)
- xcube, _ = ir.Eval("Cube(4.0)")
+ // 10. invoke the redefined function Cube() - the bug is solved :)
+ xcube, _ = ir.Eval1("Cube(4.0)")
fmt.Printf("interpreted Cube(4.0) = %f\n", xcube.Interface().(float64))
- // 9. note: compiled code will *NOT* automatically know about the bug-fixed Cube() living inside the interpreter.
+ // 11. note: compiled code will *NOT* automatically know about the bug-fixed Cube() living inside the interpreter.
// One solution is to stay inside the interpreter REPL and use interpreted functions.
// Another solution is to extract the bug-fixed function from the interpreter and use it,
// for example by storing it inside imports.Packages
- imports.Packages["github.com/cosmos72/gomacro/example/earljwagner2"].Binds["Cube"] = ir.ValueOf("Cube")
+ imports.Packages["github.com/cosmos72/gomacro/example/earljwagner2"] = imports.Package{
+ Binds: map[string]reflect.Value{
+ "Cube": reflect.ValueOf(Cube),
+ },
+ }
}
diff --git a/vendor/github.com/cosmos72/gomacro/example/for_nested.go b/vendor/github.com/cosmos72/gomacro/example/for_nested.go
new file mode 100644
index 0000000..1dc2ea0
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/example/for_nested.go
@@ -0,0 +1,31 @@
+package main
+
+func for_nested(n1, n2, n3 int) int {
+ x := 0
+ for i := 0; i < n1; i++ {
+ for k := 0; k < n2; k++ {
+ for j := 0; j < n3; j++ {
+ x++
+ }
+ }
+ }
+ return x
+}
+
+func run_for_nested() {
+ for_nested(2, 3, 4)
+}
+
+/*
+(func (n1, n2, n3 int) int {
+ x := 0
+ for i := 0; i < n1; i++ {
+ for k := 0; k < n2; k++ {
+ for j := 0; j < n3; j++ {
+ x++
+ }
+ }
+ }
+ return x
+})(2,3,5)
+*/
diff --git a/vendor/github.com/cosmos72/gomacro/example/main.go b/vendor/github.com/cosmos72/gomacro/example/main.go
index bc5674e..ebe658c 100644
--- a/vendor/github.com/cosmos72/gomacro/example/main.go
+++ b/vendor/github.com/cosmos72/gomacro/example/main.go
@@ -11,7 +11,34 @@ import (
)
func main() {
- conv()
+ // run_for_nested()
+ run_interface_method_to_closure()
+ run_struct_method_to_closure()
+}
+
+type stringer interface{ String() string }
+type Box struct{ value int }
+
+func (b *Box) Value() int {
+ return b.value
+}
+
+func run_struct_method_to_closure() {
+ var b *Box
+ fmt.Printf("%v %T\n", b, b)
+ function := (*Box).Value
+ fmt.Printf("%v %T\n", function, function)
+ closure := b.Value
+ fmt.Printf("%v %T\n", closure, closure)
+}
+
+func run_interface_method_to_closure() {
+ var s stringer
+ fmt.Printf("%v %T\n", s, s)
+ function := stringer.String
+ fmt.Printf("%v %T\n", function, function)
+ closure := s.String
+ fmt.Printf("%v %T\n", closure, closure)
}
func main2() {
diff --git a/vendor/github.com/cosmos72/gomacro/example/make_fibonacci.gomacro b/vendor/github.com/cosmos72/gomacro/example/make_fibonacci.gomacro
index 9453baf..e9ba13d 100644
--- a/vendor/github.com/cosmos72/gomacro/example/make_fibonacci.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/example/make_fibonacci.gomacro
@@ -4,18 +4,35 @@
package main
-:import "go/ast"
+:import (
+ "go/ast"
+ "reflect"
+)
:macro makefib(typ ast.Node) ast.Node {
- return ~"{
- ~func fibonacci(n ~,typ) ~,typ {
+ rtyp := EvalType(typ).(reflect.Type)
+ funcname := &ast.Ident{Name: "fibonacci_" + rtyp.Name()}
+
+ // go/ast.FuncDecl can only represent function declarations
+ // where the function name is an *ast.Ident, not a generic ast.Node
+ //
+ // Work around this limitation by using the name FOO and replacing it below
+ ret := ~"{
+ ~func FOO(n ~,typ) ~,typ {
if n <= 2 {
return 1
}
- return fibonacci(n-1) + fibonacci(n-2)
- }
- }
+ return ~,funcname(n-1) + ~,funcname(n-2)
+ }
+ }
+ ret.Name = funcname
+ return ret
}
+makefib; int
+makefib; int32
makefib; int64
+makefib; uint
+makefib; uint32
+makefib; uint64
diff --git a/vendor/github.com/cosmos72/gomacro/example/make_fibonacci.gomacro_output b/vendor/github.com/cosmos72/gomacro/example/make_fibonacci.gomacro_output
new file mode 100644
index 0000000..9e1c981
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/example/make_fibonacci.gomacro_output
@@ -0,0 +1,47 @@
+// -------------------------------------------------------------
+// DO NOT EDIT! this file was generated automatically by gomacro
+// Any change will be lost when the file is re-generated
+// -------------------------------------------------------------
+
+
+// run "gomacro -m -w make_fibonacci.gomacro"
+// to preprocess this file and generate make_fibonacci.go
+
+package main
+
+func fibonacci_int(n int) int {
+ if n <= 2 {
+ return 1
+ }
+ return fibonacci_int(n-1) + fibonacci_int(n-2)
+}
+func fibonacci_int32(n int32) int32 {
+ if n <= 2 {
+ return 1
+ }
+ return fibonacci_int32(n-1) + fibonacci_int32(n-2)
+}
+func fibonacci_int64(n int64) int64 {
+ if n <= 2 {
+ return 1
+ }
+ return fibonacci_int64(n-1) + fibonacci_int64(n-2)
+}
+func fibonacci_uint(n uint) uint {
+ if n <= 2 {
+ return 1
+ }
+ return fibonacci_uint(n-1) + fibonacci_uint(n-2)
+}
+func fibonacci_uint32(n uint32) uint32 {
+ if n <= 2 {
+ return 1
+ }
+ return fibonacci_uint32(n-1) + fibonacci_uint32(n-2)
+}
+func fibonacci_uint64(n uint64) uint64 {
+ if n <= 2 {
+ return 1
+ }
+ return fibonacci_uint64(n-1) + fibonacci_uint64(n-2)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/bytecode_interfaces/bytecode_interfaces.go b/vendor/github.com/cosmos72/gomacro/experiments/bytecode_interfaces/bytecode_interfaces.go
index 91ab4ab..e60a811 100644
--- a/vendor/github.com/cosmos72/gomacro/experiments/bytecode_interfaces/bytecode_interfaces.go
+++ b/vendor/github.com/cosmos72/gomacro/experiments/bytecode_interfaces/bytecode_interfaces.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* bytecode_interfaces.go
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/bytecode_values/bytecode_values.go b/vendor/github.com/cosmos72/gomacro/experiments/bytecode_values/bytecode_values.go
index 4f9c538..3e58e27 100644
--- a/vendor/github.com/cosmos72/gomacro/experiments/bytecode_values/bytecode_values.go
+++ b/vendor/github.com/cosmos72/gomacro/experiments/bytecode_values/bytecode_values.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* bytecode_values.go
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/closure_interfaces/closure_interfaces.go b/vendor/github.com/cosmos72/gomacro/experiments/closure_interfaces/closure_interfaces.go
index 33e5313..5bf73f1 100644
--- a/vendor/github.com/cosmos72/gomacro/experiments/closure_interfaces/closure_interfaces.go
+++ b/vendor/github.com/cosmos72/gomacro/experiments/closure_interfaces/closure_interfaces.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* closure_interfaces.go
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/closure_ints/closure_ints.go b/vendor/github.com/cosmos72/gomacro/experiments/closure_ints/closure_ints.go
new file mode 100644
index 0000000..fdd027c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/closure_ints/closure_ints.go
@@ -0,0 +1,337 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * closure_ints.go
+ *
+ * Created on Mar 28, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package closure_ints
+
+type Env struct {
+ Binds []int
+ Outer *Env
+}
+
+func NewEnv(outer *Env) *Env {
+ return &Env{
+ Binds: make([]int, 10),
+ Outer: outer,
+ }
+}
+
+type SReturnInt struct {
+ result int
+}
+
+type X0 func(*Env)
+type XInt func(*Env) int
+type XBool func(*Env) bool
+
+type Func func(arg int) int
+
+type XFunc func(env *Env) Func
+
+func Const(n int) XInt {
+ return func(env *Env) int {
+ return n
+ }
+}
+
+func Arg(env *Env) int {
+ return env.Binds[0]
+}
+
+func Var(idx int) XInt {
+ return func(env *Env) int {
+ return env.Binds[idx]
+ }
+}
+
+func VarSet(idx int, expr XInt) X0 {
+ return func(env *Env) {
+ env.Binds[idx] = expr(env)
+ }
+}
+
+func VarInc(idx int) X0 {
+ return func(env *Env) {
+ env.Binds[idx]++
+ }
+}
+
+func Bitand(lhs, rhs XInt) XInt {
+ return func(env *Env) int {
+ return lhs(env) & rhs(env)
+ }
+}
+
+func Add(lhs, rhs XInt) XInt {
+ return func(env *Env) int {
+ return lhs(env) + rhs(env)
+ }
+}
+
+func Sub(lhs, rhs XInt) XInt {
+ return func(env *Env) int {
+ return lhs(env) - rhs(env)
+ }
+}
+
+func Mul(lhs, rhs XInt) XInt {
+ return func(env *Env) int {
+ return lhs(env) * rhs(env)
+ }
+}
+
+func Rshift(lhs, rhs XInt) XInt {
+ if false {
+ return func(env *Env) int {
+ l, r := lhs(env), rhs(env)
+ // Debugf("rshift: lhs=%v, rhs=%v\n", l, r)
+ // time.Sleep(time.Second)
+ return l >> uint(r)
+ }
+ } else {
+ return func(env *Env) int {
+ return lhs(env) >> uint(rhs(env))
+ }
+ }
+}
+
+func Less(lhs, rhs XInt) XBool {
+ return func(env *Env) bool {
+ return lhs(env) < rhs(env)
+ }
+}
+
+func Lesseq(lhs, rhs XInt) XBool {
+ return func(env *Env) bool {
+ return lhs(env) <= rhs(env)
+ }
+}
+
+func Noteq(lhs, rhs XInt) XBool {
+ return func(env *Env) bool {
+ return lhs(env) != rhs(env)
+ }
+}
+
+func If(pred XBool, then, els X0) X0 {
+ if els != nil {
+ return func(env *Env) {
+ if pred(env) {
+ then(env)
+ } else {
+ els(env)
+ }
+ }
+ } else {
+ return func(env *Env) {
+ if pred(env) {
+ then(env)
+ }
+ }
+ }
+}
+
+func For(init X0, pred XBool, post X0, body X0) X0 {
+ if init == nil && post == nil {
+ return func(env *Env) {
+ for pred(env) {
+ body(env)
+ }
+ }
+
+ } else {
+ if init == nil || post == nil {
+ panic("invalid for(): init and post must be both present, or both omitted")
+ }
+ return func(env *Env) {
+ for init(env); pred(env); post(env) {
+ body(env)
+ }
+ }
+ }
+}
+
+func Nop(env *Env) {
+}
+
+func Block(list ...X0) X0 {
+ switch len(list) {
+ case 0:
+ return Nop
+ case 1:
+ return list[0]
+ case 2:
+ return func(env *Env) {
+ list[0](env)
+ list[1](env)
+ }
+ default:
+ return func(env *Env) {
+ for _, stmt := range list {
+ stmt(env)
+ }
+ }
+ }
+}
+
+func Return(expr XInt) X0 {
+ return func(env *Env) {
+ ret := expr(env)
+ panic(SReturnInt{ret})
+ }
+}
+
+func DeclVar(idx int, expr XInt) X0 {
+ return func(env *Env) {
+ env.Binds[idx] = expr(env)
+ }
+}
+
+func MakeFunc(body X0) XFunc {
+ return func(env *Env) Func {
+ return func(arg int) (ret int) {
+ fenv := NewEnv(env)
+ panicking := true // use a flag to distinguish non-panic from panic(nil)
+ defer func() {
+ if panicking {
+ pan := recover()
+ switch p := pan.(type) {
+ case SReturnInt:
+ // return is implemented with a panic(cReturn{})
+ ret = int(p.result)
+ default:
+ panic(pan)
+ }
+ }
+ }()
+ fenv.Binds[0] = arg
+ body(fenv)
+ panicking = false
+ return 0
+ }
+ }
+}
+
+func Call(fun *Func, arg XInt) XInt {
+ return func(env *Env) int {
+ return (*fun)(arg(env))
+ }
+}
+
+/*
+ interpreted version of:
+
+ func collatz(n int) {
+ for n > 1 {
+ if n&1 != 0 {
+ n = ((n * 3) + 1) / 2
+ } else {
+ n = n / 2
+ }
+ }
+ }
+*/
+func DeclCollatz(env *Env) Func {
+ const (
+ n = 0
+ )
+ return MakeFunc(
+ Block(
+ For(nil, Less(Const(1), Var(n)), nil,
+ If(Noteq(Bitand(Var(n), Const(1)), Const(0)),
+ VarSet(n,
+ Rshift(
+ Add(
+ Mul(Var(n), Const(3)),
+ Const(1),
+ ),
+ Const(1),
+ ),
+ ),
+ VarSet(n,
+ Rshift(
+ Var(n),
+ Const(1),
+ ),
+ ),
+ ),
+ ),
+ Return(Var(n)),
+ ),
+ )(env)
+}
+
+/*
+ interpreted version of:
+
+ func sum(n int) int {
+ total := 0
+ for i := 1; i <= n; i++ {
+ total += i
+ }
+ return total
+ }
+*/
+func DeclSum(env *Env) Func {
+ const (
+ n = 0
+ total = 1
+ i = 2
+ )
+ return MakeFunc(
+ Block(
+ DeclVar(total, Const(0)),
+ For(DeclVar(i, Const(1)), Lesseq(Var(i), Var(n)), VarInc(i),
+ VarSet(total,
+ Add(
+ Var(total), Var(i),
+ ),
+ ),
+ ),
+ Return(Var(total)),
+ ),
+ )(env)
+}
+
+/*
+ interpreted version of:
+
+ func fibonacci(n int) int {
+ if (n <= 2) {
+ return 1
+ }
+ return fibonacci(n-1) + fibonacci(n-2)
+ }
+*/
+func DeclFibonacci(env *Env) Func {
+ const (
+ n = 0
+ )
+ var fib Func
+ fib = MakeFunc(
+ Block(
+ If(Lesseq(Arg, Const(2)),
+ Return(Const(1)),
+ Return(
+ Add(
+ Call(&fib, Sub(Arg, Const(1))),
+ Call(&fib, Sub(Arg, Const(2))),
+ ),
+ ),
+ ),
+ ),
+ )(env)
+ return fib
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/closure_maps/closure_maps.go b/vendor/github.com/cosmos72/gomacro/experiments/closure_maps/closure_maps.go
index 7d8a9ed..4124ea9 100644
--- a/vendor/github.com/cosmos72/gomacro/experiments/closure_maps/closure_maps.go
+++ b/vendor/github.com/cosmos72/gomacro/experiments/closure_maps/closure_maps.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* closure_maps.go
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/closure_values/closure_values.go b/vendor/github.com/cosmos72/gomacro/experiments/closure_values/closure_values.go
index 38e4025..4c71fe9 100644
--- a/vendor/github.com/cosmos72/gomacro/experiments/closure_values/closure_values.go
+++ b/vendor/github.com/cosmos72/gomacro/experiments/closure_values/closure_values.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* closure_values.go
@@ -378,7 +369,7 @@ func DeclCollatz(env *Env, idx int) FuncInt {
),
),
),
- ReturnInt(Int(0)),
+ ReturnInt(VarInt(n)),
),
)(env)
}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/dummy.go b/vendor/github.com/cosmos72/gomacro/experiments/dummy.go
index db983c5..88be022 100644
--- a/vendor/github.com/cosmos72/gomacro/experiments/dummy.go
+++ b/vendor/github.com/cosmos72/gomacro/experiments/dummy.go
@@ -1,3 +1,19 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * dummy.go
+ *
+ * Created on Apr 01, 2017
+ * Author Massimiliano Ghilardi
+ */
+
// empty file. stops "go build" from complaining that
// no buildable files are in the directory "experiments"
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/api.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/api.go
new file mode 100644
index 0000000..4ada0ff
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/api.go
@@ -0,0 +1,69 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * api.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import (
+ "reflect"
+)
+
+// hardware register. implementation is architecture-dependent
+type hwReg uint8
+
+type hwRegs [rHi + 1]uint32 // hwReg -> use count
+
+type hwRegCounter struct {
+ hwReg
+ count uint32
+}
+
+// software-defined register. mapped to hardware register by Asm
+type Reg uint32
+
+type Const struct {
+ kind reflect.Kind
+ val int64
+}
+
+type desc struct {
+ kind reflect.Kind
+ idx uint16
+ upn uint16
+}
+
+type Var struct {
+ desc
+}
+
+type Arg interface {
+ reg(asm *Asm) hwReg // noReg if not a register
+ Const() bool
+ Kind() reflect.Kind
+}
+
+type Code []uint8
+
+type Save struct {
+ start, idx, end uint16 // memory area where spill registers can be saved
+}
+
+type Asm struct {
+ code Code
+ hwRegs hwRegs
+ regs map[Reg]hwRegCounter
+ regNext Reg // first available register among jit-reserved ones
+ save Save
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_amd64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_amd64.go
new file mode 100644
index 0000000..0e17f71
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_amd64.go
@@ -0,0 +1,152 @@
+// +build amd64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * arith_amd64.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+// %reg_z += a
+func (asm *Asm) Add(z Reg, a Arg) *Asm {
+ lo, hi := asm.lohi(z)
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ return asm
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48+hi, 0x81, 0xc0+lo).Int32(int32(val)) // add $val,%reg_z // sign extend
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Bytes(0x48+hi+tmp.hi()*4, 0x01, 0xc0+lo+tmp.lo()*8) // add %reg_tmp,%reg_z
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// %reg_z -= a
+func (asm *Asm) Sub(z Reg, a Arg) *Asm {
+ lo, hi := asm.lohi(z)
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ return asm
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48+hi, 0x81, 0xe8+lo).Int32(int32(val)) // sub $val,%reg_z // sign extend
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Bytes(0x48+hi+tmp.hi()*4, 0x29, 0xc0+lo+tmp.lo()*8) // sub %reg_tmp,%reg_z
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// %reg_z *= a
+func (asm *Asm) Mul(z Reg, a Arg) *Asm {
+ lo, hi := asm.lohi(z)
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ return asm.LoadConst(z, 0)
+ } else if val == 1 {
+ return asm
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48+hi*5, 0x69, 0xc0+lo*9).Int32(int32(val)) // imul $val,%reg_z,%reg_z // sign extend
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Bytes(0x48+hi*4+tmp.hi(), 0x0f, 0xaf+lo*8+tmp.lo()) // imul %reg_tmp,%reg_z
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// ---------------- DIV --------------------
+
+// %reg_z /= a // signed division
+func (asm *Asm) SDiv(z Reg, a Arg) *Asm {
+ return asm.divrem(z, a, div|signed)
+}
+
+// %reg_z /= a // unsigned division
+func (asm *Asm) UDiv(z Reg, a Arg) *Asm {
+ return asm.divrem(z, a, div|unsigned)
+}
+
+// ---------------- REM --------------------
+
+// %reg_z %= a // signed remainder
+func (asm *Asm) SRem(z Reg, a Arg) *Asm {
+ return asm.divrem(z, a, rem|signed)
+}
+
+// %reg_z %= a // unsigned remainder
+func (asm *Asm) URem(z Reg, a Arg) *Asm {
+ return asm.divrem(z, a, rem|unsigned)
+}
+
+// FIXME: golang remainder rules are NOT the same as C !
+func (asm *Asm) divrem(z Reg, a Arg, k divkind) *Asm {
+ tosave := newHwRegs(rDX)
+ rz := asm.reg(z)
+ if rz != rAX {
+ tosave.Set(rAX)
+ }
+ tosave = asm.pushRegs(tosave)
+ var b Reg
+ ra := a.reg(asm)
+ if tosave.Contains(ra) {
+ b = asm.alloc()
+ asm.Load(b, a)
+ a = b
+ }
+ asm.mov(rAX, rz) // nop if z == AX
+
+ switch a := a.(type) {
+ case *Var:
+ if k&unsigned != 0 {
+ asm.Bytes(0x31, 0xd2) // xor %edx,%edx
+ asm.Bytes(0x48, 0xf7, 0xb7).Idx(a) // divq a(%rdi)
+ } else {
+ asm.Bytes(0x48, 0x99) // cqto
+ asm.Bytes(0x48, 0xf7, 0xbf).Idx(a) // idivq a(%rdi)
+ }
+ default:
+ tmp, alloc := asm.hwAlloc(a)
+ if k&unsigned != 0 {
+ asm.Bytes(0x31, 0xd2) // xor %edx,%edx
+ asm.Bytes(0x48+tmp.hi(), 0xf7, 0xf0+tmp.lo()) // div %reg_tmp
+ } else {
+ asm.Bytes(0x48, 0x99) // cqto
+ asm.Bytes(0x48+tmp.hi(), 0xf7, 0xf8+tmp.lo()) // idiv %reg_tmp
+ }
+ asm.hwFree(tmp, alloc)
+ }
+ if b != NoReg {
+ asm.Free(b)
+ }
+ if k&rem != 0 {
+ asm.mov(rz, rDX) // nop if z == DX
+ } else {
+ asm.mov(rz, rAX) // nop if z == AX
+ }
+ asm.popRegs(tosave)
+ return asm
+}
+
+// %reg_z = - %reg_z
+func (asm *Asm) Neg(z Reg) *Asm {
+ lo, hi := asm.lohi(z)
+ asm.Bytes(0x48+hi, 0xf7, 0xd8+lo) // neg %reg_z
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_arm64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_arm64.go
new file mode 100644
index 0000000..e70aa6f
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_arm64.go
@@ -0,0 +1,156 @@
+// +build arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * arith_arm64.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+// xz += a
+func (asm *Asm) Add(z Reg, a Arg) *Asm {
+ if a.Const() {
+ val := a.(*Const).val
+ if asm.add_const(z, val) || asm.sub_const(z, -val) {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Uint32(0x8b<<24 | tmp.lo()<<16 | asm.lo(z)*0x21) // add xz, xz, xtmp
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// xz -= a
+func (asm *Asm) Sub(z Reg, a Arg) *Asm {
+ if a.Const() {
+ val := a.(*Const).val
+ if asm.sub_const(z, val) || asm.add_const(z, -val) {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Uint32(0xcb<<24 | tmp.lo()<<16 | asm.lo(z)*0x21) // sub xz, xz, xtmp
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+func (asm *Asm) add_const(z Reg, val int64) bool {
+ if val == 0 {
+ return true
+ } else if uint64(val) < 4096 {
+ asm.Uint32(0x91<<24 | uint32(val)<<10 | asm.lo(z)*0x21) // add xz, xz, $val
+ return true
+ }
+ return false
+}
+
+func (asm *Asm) sub_const(z Reg, val int64) bool {
+ if val == 0 {
+ return true
+ } else if uint64(val) < 4096 {
+ asm.Uint32(0xd1<<24 | uint32(val)<<10 | asm.lo(z)*0x21) // sub xz, xz, $val
+ return true
+ }
+ return false
+}
+
+// xz *= a
+func (asm *Asm) Mul(z Reg, a Arg) *Asm {
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ return asm.LoadConst(z, 0)
+ } else if val == 1 {
+ return asm
+ } else if val == 2 {
+ return asm.Add(z, z)
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Uint32(0x9b007c00 | tmp.lo()<<16 | asm.lo(z)*0x21) // mul xz, xz, xtmp
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// xz /= a signed division
+func (asm *Asm) SDiv(z Reg, a Arg) *Asm {
+ return asm.div(z, a, signed)
+}
+
+// xz /= a unsigned division
+func (asm *Asm) UDiv(z Reg, a Arg) *Asm {
+ return asm.div(z, a, unsigned)
+}
+
+// xz %= a signed remainder
+func (asm *Asm) SRem(z Reg, a Arg) *Asm {
+ return asm.rem(z, a, signed)
+}
+
+// xz %= a unsigned remainder
+func (asm *Asm) URem(z Reg, a Arg) *Asm {
+ return asm.rem(z, a, unsigned)
+}
+
+func (asm *Asm) div(z Reg, a Arg, k divkind) *Asm {
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ // cause a runtime fault by clearing x29 then dereferencing it
+ return asm.loadConst(x29, 0).storeReg(&Var{}, x29)
+ } else if val == 1 {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ var flag uint32
+ if k&unsigned == 0 {
+ flag = 0x400
+ }
+ asm.Uint32(0x9ac00800 | flag | tmp.lo()<<16 | asm.lo(z)*0x21) // {s,u}div xz, xz, xtmp
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+func (asm *Asm) rem(z Reg, a Arg, k divkind) *Asm {
+ if a.Const() {
+ c := a.(*Const)
+ val := c.val
+ if val == 0 {
+ // cause a runtime fault by clearing x29 then dereferencing it
+ return asm.loadConst(x29, 0).storeReg(&Var{}, x29)
+ } else if val&(val-1) == 0 {
+ // transform xz %= power-of-two
+ // into zx &= power-of-two - 1
+ return asm.And(z, &Const{c.kind, val - 1})
+ }
+ }
+ den, alloc := asm.hwAlloc(a) // // den = a
+ quo := asm.hwRegs.Alloc()
+ var flag uint32
+ if k&unsigned == 0 {
+ flag = 0x400
+ }
+ asm.Uint32(0x9ac08000 | flag | den.lo()<<16 | asm.lo(z)<<5 | quo.lo()) // {s,u}div quo, xz, den // quo = xz / den
+ asm.Uint32(0x9b008000 | den.lo()<<16 | quo.lo()<<5 | asm.lo(z)*0x401) // msub xz, quo, den, xz // xz = xz - quo * den
+ asm.hwFree(quo, true)
+ asm.hwFree(den, alloc)
+ return asm
+}
+
+// xz = - xz
+func (asm *Asm) Neg(z Reg) *Asm {
+ return asm.Uint32(0xcb0003e0 | asm.lo(z)*0x10001) // neg xz, xz
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_dummy.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_dummy.go
new file mode 100644
index 0000000..593f8ee
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/arith_dummy.go
@@ -0,0 +1,59 @@
+// +build !amd64,!arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * arith_dummy.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+// %reg_z += a
+func (asm *Asm) Add(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z -= a
+func (asm *Asm) Sub(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z *= a
+func (asm *Asm) Mul(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z /= a signed division
+func (asm *Asm) SDiv(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z /= a unsigned division
+func (asm *Asm) UDiv(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z %= a signed remainder
+func (asm *Asm) SRem(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z %= a unsigned remainder
+func (asm *Asm) URem(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z = - %reg_z
+func (asm *Asm) Neg(z Reg) *Asm {
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/asm.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/asm.go
new file mode 100644
index 0000000..3383232
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/asm.go
@@ -0,0 +1,182 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * asm.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import (
+ "unsafe"
+)
+
+const (
+ S = uint32(unsafe.Sizeof(uint64(0)))
+ VERBOSE = false
+)
+
+func (s *Save) Init(start, end uint16) {
+ s.start, s.idx, s.end = start, start, end
+}
+
+func (asm *Asm) Init() *Asm {
+ return asm.Init2(0, 0)
+}
+
+func (asm *Asm) Init2(saveStart, saveEnd uint16) *Asm {
+ asm.code = asm.code[:0]
+ asm.hwRegs.InitLive()
+ asm.regs = make(map[Reg]hwRegCounter)
+ asm.regNext = RegHi + 1
+ asm.save.Init(saveStart, saveEnd)
+ return asm.prologue()
+}
+
+func (asm *Asm) Bytes(bytes ...uint8) *Asm {
+ asm.code = append(asm.code, bytes...)
+ return asm
+}
+
+func (asm *Asm) Uint16(val uint16) *Asm {
+ asm.code = append(asm.code, uint8(val), uint8(val>>8))
+ return asm
+}
+
+func (asm *Asm) Uint32(val uint32) *Asm {
+ asm.code = append(asm.code, uint8(val), uint8(val>>8), uint8(val>>16), uint8(val>>24))
+ return asm
+}
+
+func (asm *Asm) Uint64(val uint64) *Asm {
+ asm.code = append(asm.code, uint8(val), uint8(val>>8), uint8(val>>16), uint8(val>>24), uint8(val>>32), uint8(val>>40), uint8(val>>48), uint8(val>>56))
+ return asm
+}
+
+func (asm *Asm) Int16(val int16) *Asm {
+ return asm.Uint16(uint16(val))
+}
+
+func (asm *Asm) Int32(val int32) *Asm {
+ return asm.Uint32(uint32(val))
+}
+
+func (asm *Asm) Int64(val int64) *Asm {
+ return asm.Uint64(uint64(val))
+}
+
+func (asm *Asm) Idx(a *Var) *Asm {
+ return asm.Uint32(uint32(a.idx) * S)
+}
+
+func (asm *Asm) reg(g Reg) hwReg {
+ return asm.regs[g].hwReg
+}
+
+func (asm *Asm) pushRegs(rs *hwRegs) *hwRegs {
+ var ret hwRegs
+ v := &Var{}
+ for r := rLo; r <= rHi; r++ {
+ if !rs.Contains(r) || !asm.hwRegs.Contains(r) {
+ continue
+ }
+ if asm.save.idx >= asm.save.end {
+ errorf("save area is full, cannot push registers")
+ }
+ v.idx = asm.save.idx
+ asm.storeReg(v, r)
+ asm.save.idx++
+ ret.Set(r)
+ }
+ return &ret
+}
+
+func (asm *Asm) popRegs(rs *hwRegs) {
+ v := &Var{}
+ for r := rHi; r >= rLo; r-- {
+ if !rs.Contains(r) {
+ continue
+ }
+ if asm.save.idx <= asm.save.start {
+ errorf("save area is empty, cannot pop registers")
+ }
+ asm.save.idx--
+ v.idx = asm.save.idx
+ asm.load(r, v)
+ }
+}
+
+// allocate a jit-reserved register
+func (asm *Asm) alloc() Reg {
+ z := asm.regNext
+ asm.regNext++
+ asm.Alloc(z)
+ return z
+}
+
+func (asm *Asm) Alloc(z Reg) *Asm {
+ pair := asm.regs[z]
+ if !pair.Valid() {
+ pair.hwReg = asm.hwRegs.Alloc()
+ }
+ pair.count++
+ asm.regs[z] = pair
+ return asm
+}
+
+// combined Alloc + Load
+func (asm *Asm) AllocLoad(z Reg, a Arg) *Asm {
+ return asm.Alloc(z).Load(z, a)
+}
+
+func (asm *Asm) Free(z Reg) *Asm {
+ pair, ok := asm.regs[z]
+ if !ok {
+ return asm
+ }
+ pair.count--
+ if pair.count == 0 {
+ asm.hwRegs.Free(pair.hwReg)
+ delete(asm.regs, z)
+ } else {
+ asm.regs[z] = pair
+ }
+ return asm
+}
+
+// combined Store + Free
+func (asm *Asm) StoreFree(z *Var, g Reg) *Asm {
+ return asm.Store(z, g).Free(g)
+}
+
+func (asm *Asm) hwAlloc(a Arg) (r hwReg, allocated bool) {
+ r = a.reg(asm)
+ if r != noReg {
+ return r, false
+ }
+ r = asm.hwRegs.Alloc()
+ asm.load(r, a)
+ return r, true
+}
+
+func (asm *Asm) hwAllocConst(val int64) hwReg {
+ r := asm.hwRegs.Alloc()
+ asm.loadConst(r, val)
+ return r
+}
+
+func (asm *Asm) hwFree(r hwReg, allocated bool) *Asm {
+ if r.Valid() && allocated {
+ asm.hwRegs.Free(r)
+ }
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_amd64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_amd64.go
new file mode 100644
index 0000000..74adca5
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_amd64.go
@@ -0,0 +1,109 @@
+// +build amd64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * bitwise_amd64.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+// %reg_z &= a
+func (asm *Asm) And(z Reg, a Arg) *Asm {
+ lo, hi := asm.lohi(z)
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ return asm.LoadConst(z, 0)
+ } else if val == -1 {
+ return asm
+ } else if val == int64(uint32(val)) {
+ if hi != 0 {
+ asm.Bytes(0x41)
+ }
+ return asm.Bytes(0x81, 0xe0+lo).Uint32(uint32(val)) // andl $val,%reg_z // zero extend
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48+hi, 0x81, 0xe0+lo).Int32(int32(val)) // andq $val,%reg_z // sign extend
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Bytes(0x48+hi+tmp.hi()*4, 0x21, 0xc0+lo+tmp.lo()*8) // and %reg_tmp,%reg_z
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// %reg_z |= a
+func (asm *Asm) Or(z Reg, a Arg) *Asm {
+ lo, hi := asm.lohi(z)
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ return asm
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48+hi, 0x81, 0xc8+lo).Int32(int32(val)) // orq $val,%reg_z // sign extend
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Bytes(0x48+hi+tmp.hi()*4, 0x09, 0xc0+lo+tmp.lo()*8) // or %reg_tmp,%reg_z
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// %reg_z ^= a
+func (asm *Asm) Xor(z Reg, a Arg) *Asm {
+ lo, hi := asm.lohi(z)
+ if a.Const() {
+ val := a.(*Const).val
+ if val == 0 {
+ return asm
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48+hi, 0x81, 0xf0+lo).Int32(int32(val)) // xorq $val,%reg_z // sign extend
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Bytes(0x48+hi+tmp.hi()*4, 0x31, 0xc0+lo+tmp.lo()*8) // xor %reg_tmp,%reg_z
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// %reg_z &^= a
+func (asm *Asm) Andnot(z Reg, a Arg) *Asm {
+ lo, hi := asm.lohi(z)
+ var tmp hwReg
+ if a.Const() {
+ val := ^a.(*Const).val // negate val!
+ if val == 0 {
+ return asm.LoadConst(z, 0)
+ } else if val == -1 {
+ return asm
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48+hi, 0x81, 0xe0+lo).Int32(int32(val)) // andq $val,%reg_z // sign extend
+ }
+ tmp = asm.hwAllocConst(val)
+ } else {
+ // always allocate a register, because we need to complement it
+ tmp = asm.hwRegs.Alloc()
+ asm.load(tmp, a)
+ asm.Bytes(0x48|tmp.hi(), 0xf7, 0xd0|tmp.lo()) // not %reg_tmp
+ }
+ asm.Bytes(0x48+hi+tmp.hi()*4, 0x21, 0xc0+lo+tmp.lo()*8) // and %reg_tmp,%reg_z
+ asm.hwFree(tmp, true)
+ return asm
+}
+
+// %reg_z = ^ %reg_z
+func (asm *Asm) Not(z Reg) *Asm {
+ lo, hi := asm.lohi(z)
+ asm.Bytes(0x48+hi, 0xf7, 0xd0+lo) // not %reg_z
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_arm64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_arm64.go
new file mode 100644
index 0000000..1c5f227
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_arm64.go
@@ -0,0 +1,148 @@
+// +build arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * bitwise_arm64.go
+ *
+ * Created on May 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+// xz &= a
+func (asm *Asm) And(z Reg, a Arg) *Asm {
+ if a.Const() {
+ if asm.and_const(z, a.(*Const).val) {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Uint32(0x8a<<24 | tmp.lo()<<16 | asm.lo(z)*0x21) // and xz, xz, xtmp
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// xz |= a
+func (asm *Asm) Or(z Reg, a Arg) *Asm {
+ if a.Const() {
+ if asm.or_const(z, a.(*Const).val) {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Uint32(0xaa<<24 | tmp.lo()<<16 | asm.lo(z)*0x21) // orr xz, xz, xtmp
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// xz ^= a
+func (asm *Asm) Xor(z Reg, a Arg) *Asm {
+ if a.Const() {
+ if asm.xor_const(z, a.(*Const).val) {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(a)
+ asm.Uint32(0xca<<24 | tmp.lo()<<16 | asm.lo(z)*0x21) // eor xz, xz, xtmp
+ asm.hwFree(tmp, alloc)
+ return asm
+}
+
+// xz &^= a
+func (asm *Asm) Andnot(z Reg, a Arg) *Asm {
+ var tmp hwReg
+ if a.Const() {
+ val := ^a.(*Const).val // complement val
+ if asm.and_const(z, val) {
+ return asm
+ }
+ tmp = asm.hwAllocConst(val)
+ } else {
+ // always allocate a register, because we need to complement it
+ tmp = asm.hwRegs.Alloc()
+ asm.load(tmp, a)
+ asm.Uint32(0xaa2003e0 | tmp.lo()*0x10001) // mvn xtmp, xtmp
+ }
+ asm.Uint32(0x8a<<24 | tmp.lo()<<16 | asm.lo(z)*0x21) // and xz, xz, xtmp
+ asm.hwFree(tmp, true)
+ return asm
+}
+
+// xz = ^ xz
+func (asm *Asm) Not(z Reg) *Asm {
+ return asm.Uint32(0xaa2003e0 | asm.lo(z)*0x10001) // mvn xz, xz
+}
+
+func (asm *Asm) and_const(z Reg, val int64) bool {
+ if val == 0 {
+ asm.LoadConst(z, 0)
+ return true
+ } else if val == -1 {
+ return true
+ } else if bitmask, ok := bitmask_imm[uint64(val)]; ok {
+ asm.Uint32(0x92<<24 | uint32(bitmask)<<10 | asm.lo(z)*0x21)
+ return true
+ }
+ return false
+}
+
+func (asm *Asm) or_const(z Reg, val int64) bool {
+ if val == 0 {
+ return true
+ } else if val == -1 {
+ asm.LoadConst(z, -1)
+ return true
+ } else if bitmask, ok := bitmask_imm[uint64(val)]; ok {
+ asm.Uint32(0xb2<<24 | uint32(bitmask)<<10 | asm.lo(z)*0x21)
+ return true
+ }
+ return false
+}
+
+func (asm *Asm) xor_const(z Reg, val int64) bool {
+ if val == 0 {
+ return true
+ } else if val == -1 {
+ asm.Not(z)
+ return true
+ } else if bitmask, ok := bitmask_imm[uint64(val)]; ok {
+ asm.Uint32(0xd2<<24 | uint32(bitmask)<<10 | asm.lo(z)*0x21)
+ return true
+ }
+ return false
+}
+
+// the possible immediate constants for bitwise operations are quite complicated:
+// see https://dinfuehr.github.io/blog/encoding-of-immediate-values-on-aarch64/
+// and https://stackoverflow.com/questions/30904718/range-of-immediate-values-in-armv8-a64-assembly/33265035#33265035
+//
+// solution: generate them and store in a map for fast lookup
+var bitmask_imm = make(map[uint64]uint16)
+
+func init() {
+ for size := uint16(2); size <= 64; size *= 2 {
+ var n, imms uint16 = 0, 0x1e * size
+ if size == 64 {
+ n, imms = 1, 0
+ }
+ for length := uint16(1); length < size; length++ {
+ val := ^uint64(0) >> (64 - length)
+ for e := size; e < 64; e *= 2 {
+ val |= val << e
+ }
+ for rotation := uint16(0); rotation < size; rotation++ {
+ bitmask_imm[val] = n<<12 | rotation<<6 | imms | (length - 1)
+ val = val>>1 | val<<63
+ }
+ }
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_dummy.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_dummy.go
new file mode 100644
index 0000000..65f7af7
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/bitwise_dummy.go
@@ -0,0 +1,44 @@
+// +build !amd64,!arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * bitwise_dummy.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+// %rax &= a
+func (asm *Asm) And(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %rax |= a
+func (asm *Asm) Or(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %rax ^= a
+func (asm *Asm) Xor(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %rax &^= a
+func (asm *Asm) Andnot(z Reg, a Arg) *Asm {
+ return asm
+}
+
+// %reg_z = ^ %reg_z
+func (asm *Asm) Not(z Reg) *Asm {
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/const.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/const.go
new file mode 100644
index 0000000..3c314d3
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/const.go
@@ -0,0 +1,36 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * const.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import "reflect"
+
+func Int64(val int64) *Const {
+ return &Const{val: val}
+}
+
+// implement Arg interface
+func (c *Const) reg(asm *Asm) hwReg {
+ return noReg
+}
+
+func (c *Const) Const() bool {
+ return true
+}
+
+func (c *Const) Kind() reflect.Kind {
+ return c.kind
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/dsl.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/dsl.go
new file mode 100644
index 0000000..4218654
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/dsl.go
@@ -0,0 +1,136 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * dsl.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+type Op uint8
+
+const (
+ LOAD Op = iota
+ STORE
+
+ ALLOC
+ FREE
+
+ ADD
+ SUB
+ MUL
+ SDIV // signed quotient
+ UDIV // unsigned quotient
+ SREM // signed remainder
+ UREM // unsigned remainder
+
+ AND
+ OR
+ XOR
+ ANDNOT
+
+ NEG
+ NOT
+)
+
+type divkind int
+
+const (
+ signed, unsigned divkind = 0, 1
+ div, rem divkind = 0, 2
+)
+
+func (asm *Asm) Asm(args ...interface{}) *Asm {
+ n := len(args)
+ for i := 0; i < n; i++ {
+ op, ok := args[i].(Op)
+ if !ok {
+ errorf("syntax error: expecting OP [args], found %v", args[i])
+ }
+ i += asm.Op(op, args[i+1:]...)
+ }
+ return asm
+}
+
+func (asm *Asm) Op(op Op, args ...interface{}) int {
+ var n int
+ switch op {
+ case LOAD, ADD, SUB, MUL, SDIV, UDIV, SREM, UREM, AND, OR, XOR, ANDNOT:
+ if len(args) < 2 {
+ errorf("syntax error: expecting OP arg1 arg2, found %v", append([]interface{}{op}, args...)...)
+ }
+ asm.Op2(op, args[0].(Reg), args[1].(Arg))
+ n = 2
+ case STORE:
+ asm.Store(args[0].(*Var), args[1].(Reg))
+ n = 2
+ case ALLOC:
+ asm.Alloc(args[0].(Reg))
+ n = 1
+ case FREE:
+ asm.Free(args[0].(Reg))
+ n = 1
+ case NEG, NOT:
+ if len(args) < 1 {
+ errorf("syntax error: expecting OP arg1, found %v", op)
+ }
+ asm.Op1(op, args[0].(Reg))
+ n = 1
+ default:
+ errorf("unknown operator: %v", op)
+ }
+ return n
+}
+
+func (asm *Asm) Op1(op Op, z Reg) *Asm {
+ switch op {
+ case NEG:
+ asm.Neg(z)
+ case NOT:
+ asm.Not(z)
+ default:
+ errorf("unknown unary operator: %v", op)
+ }
+ return asm
+}
+
+func (asm *Asm) Op2(op Op, z Reg, a Arg) *Asm {
+ switch op {
+ case LOAD:
+ asm.Load(z, a)
+ case ADD:
+ asm.Add(z, a)
+ case SUB:
+ asm.Sub(z, a)
+ case MUL:
+ asm.Mul(z, a)
+ case SDIV:
+ asm.SDiv(z, a)
+ case UDIV:
+ asm.UDiv(z, a)
+ case SREM:
+ asm.SRem(z, a)
+ case UREM:
+ asm.URem(z, a)
+ case AND:
+ asm.And(z, a)
+ case OR:
+ asm.Or(z, a)
+ case XOR:
+ asm.Xor(z, a)
+ case ANDNOT:
+ asm.Andnot(z, a)
+ default:
+ errorf("unknown binary operator: %v", op)
+ }
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/example.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/example.go
new file mode 100644
index 0000000..cd5a180
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/example.go
@@ -0,0 +1,87 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * example.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+/*
+ jit-compiled version of:
+
+ func sum(n int) int {
+ total := 0
+ for i := 1; i <= n; i++ {
+ total += i
+ }
+ return total
+ }
+*/
+func DeclSum() func(arg int) int {
+ const n, total, i = 0, 1, 2
+ _, Total, I := NewVar(n), NewVar(total), NewVar(i)
+
+ var asm Asm
+ init := asm.Init().Store(I, Int64(1)).Func()
+ pred := func(env *[3]uint64) bool {
+ return int(env[i]) <= int(env[n])
+ }
+ r := RegLo
+ next := asm.Init().AllocLoad(r, I).Add(r, Int64(1)).Store(I, r).Func()
+ loop := asm.Init().AllocLoad(r, Total).Add(r, I).Store(Total, r).Func()
+
+ return func(arg int) int {
+ env := [3]uint64{n: uint64(arg)}
+
+ for init(&env[0]); pred(&env); next(&env[0]) {
+ loop(&env[0])
+ }
+ return int(env[total])
+ }
+}
+
+/*
+ jit-compiled version of:
+
+ func arith(n int) int {
+ return ((((n*2+3)|4) &^ 5) ^ 6) / ((n & 2) | 1)
+ }
+*/
+func DeclArith(envlen int) func(env *uint64) {
+ const n, a = 0, 1
+ N, A := NewVar(n), NewVar(a)
+
+ var asm Asm
+ r, s := RegLo, RegLo+1
+ asm.Init2(2, uint16(envlen))
+ asm.Asm(
+ // asm.Alloc(r).Load(r, N).Mul(r, Int64(2)).Add(r, Int64(3)).Or(r, Int64(4)).Andnot(r, Int64(5)).Xor(r, Int64(6))
+ ALLOC, r,
+ LOAD, r, N,
+ MUL, r, Int64(2),
+ ADD, r, Int64(3),
+ OR, r, Int64(4),
+ ANDNOT, r, Int64(5),
+ XOR, r, Int64(6),
+ // asm.Alloc(s).Load(s, N).And(s, Int64(2)).Or(s, Int64(1)).asm.Quo(r, s).Store(A, r).Free(s).Free(r)
+ ALLOC, s,
+ LOAD, s, N,
+ AND, s, Int64(2),
+ OR, s, Int64(1),
+ SDIV, r, s,
+ STORE, A, r,
+ FREE, s,
+ FREE, r,
+ )
+ return asm.Func()
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/func_amd64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/func_amd64.go
new file mode 100644
index 0000000..a237148
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/func_amd64.go
@@ -0,0 +1,29 @@
+// +build amd64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * func_amd64.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+const SUPPORTED = true
+
+func (asm *Asm) prologue() *Asm {
+ return asm.Bytes(0x48, 0x8b, 0x7c, 0x24, 0x08) // movq 0x8(%rsp), %rdi
+}
+
+func (asm *Asm) epilogue() *Asm {
+ return asm.Bytes(0xc3) // ret
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/func_arm64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/func_arm64.go
new file mode 100644
index 0000000..2ec3298
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/func_arm64.go
@@ -0,0 +1,29 @@
+// +build arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * func_arm64.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+const SUPPORTED = true
+
+func (asm *Asm) prologue() *Asm {
+ return asm.Uint32(0xf94007fd) // ldr x29, [sp, #8]
+}
+
+func (asm *Asm) epilogue() *Asm {
+ return asm.Uint32(0xd65f03c0) // ret
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/func_dummy.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/func_dummy.go
new file mode 100644
index 0000000..0cae84a
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/func_dummy.go
@@ -0,0 +1,29 @@
+// +build !amd64,!arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * func_dummy.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+const SUPPORTED = false
+
+func (asm *Asm) prologue() *Asm {
+ return asm
+}
+
+func (asm *Asm) epilogue() *Asm {
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_amd64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_amd64.go
new file mode 100644
index 0000000..15f3c34
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_amd64.go
@@ -0,0 +1,75 @@
+// +build amd64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * hwreg_amd64.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+const (
+ noReg hwReg = iota
+ rAX
+ rCX
+ rDX
+ rBX
+ rSP
+ rBP
+ rSI
+ rDI
+ rR8
+ rR9
+ rR10
+ rR11
+ rR12
+ rR13
+ rR14
+ rR15
+ rLo hwReg = rAX
+ rHi hwReg = rR15
+)
+
+var alwaysLiveHwRegs = hwRegs{rSP: 1, rBP: 1, rDI: 1}
+
+func (r hwReg) Valid() bool {
+ return r >= rLo && r <= rHi
+}
+
+func (r hwReg) Validate() {
+ if !r.Valid() {
+ errorf("invalid register: %d", r)
+ }
+}
+
+func (r hwReg) bits() uint8 {
+ r.Validate()
+ return uint8(r) - 1
+}
+
+func (r hwReg) lo() uint8 {
+ return r.bits() & 0x7
+}
+
+func (r hwReg) hi() uint8 {
+ return (r.bits() & 0x8) >> 3
+}
+
+func (r hwReg) lohi() (uint8, uint8) {
+ bits := r.bits()
+ return bits & 0x7, (bits & 0x8) >> 3
+}
+
+func (asm *Asm) lohi(g Reg) (uint8, uint8) {
+ return asm.reg(g).lohi()
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_arm64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_arm64.go
new file mode 100644
index 0000000..1d73100
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_arm64.go
@@ -0,0 +1,81 @@
+// +build arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * hwreg_arm64.go
+ *
+ * Created on May 26, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+const (
+ noReg hwReg = iota
+ x0
+ x1
+ x2
+ x3
+ x4
+ x5
+ x6
+ x7
+ x8
+ x9
+ x10
+ x11
+ x12
+ x13
+ x14
+ x15
+ x16
+ x17
+ x18
+ x19
+ x20
+ x21
+ x22
+ x23
+ x24
+ x25
+ x26
+ x27
+ x28
+ x29
+ x30
+ rLo hwReg = x0
+ rHi hwReg = x30
+)
+
+var alwaysLiveHwRegs = hwRegs{
+ x28: 1, // pointer to goroutine-local data
+ x29: 1, // jit *uint64 pointer-to-variables
+ x30: 1, // link register?
+}
+
+func (r hwReg) Valid() bool {
+ return r >= rLo && r <= rHi
+}
+
+func (r hwReg) Validate() {
+ if !r.Valid() {
+ errorf("invalid register: %d", r)
+ }
+}
+
+func (r hwReg) lo() uint32 {
+ r.Validate()
+ return uint32(r) - 1
+}
+
+func (asm *Asm) lo(g Reg) uint32 {
+ return asm.reg(g).lo()
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_dummy.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_dummy.go
new file mode 100644
index 0000000..c14d903
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwreg_dummy.go
@@ -0,0 +1,31 @@
+// +build !amd64,!arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * hwreg_dummy.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+const (
+ noReg hwReg = iota
+ rLo = noReg
+ rHi = noReg
+)
+
+func (r hwReg) Valid() bool {
+ return false
+}
+
+var alwaysLiveHwRegs = hwRegs{}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/hwregs.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwregs.go
new file mode 100644
index 0000000..210786c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/hwregs.go
@@ -0,0 +1,60 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * hwregs.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+func newHwRegs(rs ...hwReg) *hwRegs {
+ var ret hwRegs
+ for _, r := range rs {
+ ret.Set(r)
+ }
+ return &ret
+}
+
+func (rs *hwRegs) InitLive() {
+ *rs = alwaysLiveHwRegs
+}
+
+func (rs *hwRegs) Contains(r hwReg) bool {
+ return r >= rLo && r <= rHi && rs[r] != 0
+}
+
+func (rs *hwRegs) Set(r hwReg) {
+ if r >= rLo && r <= rHi {
+ rs[r]++
+ }
+}
+
+func (rs *hwRegs) Unset(r hwReg) {
+ if rs.Contains(r) {
+ rs[r]--
+ }
+}
+
+func (rs *hwRegs) Alloc() hwReg {
+ for r := rLo; r <= rHi; r++ {
+ if rs[r] == 0 {
+ rs[r]++
+ return r
+ }
+ }
+ errorf("no free registers")
+ return noReg
+}
+
+func (rs *hwRegs) Free(r hwReg) {
+ rs.Unset(r)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/output.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/output.go
new file mode 100644
index 0000000..47d3249
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/output.go
@@ -0,0 +1,26 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * output.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import (
+ "errors"
+ "fmt"
+)
+
+func errorf(format string, args ...interface{}) {
+ panic(errors.New(fmt.Sprintf(format, args...)))
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/reg.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/reg.go
new file mode 100644
index 0000000..22433ca
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/reg.go
@@ -0,0 +1,41 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * reg.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import (
+ "reflect"
+)
+
+const (
+ NoReg Reg = 0 // means "no register"
+ RegLo Reg = 1 // first user-available register = 1
+ RegHi Reg = 0x80000000 // last user-available register = 0x80000000
+)
+
+// implement Arg interface
+func (g Reg) reg(asm *Asm) hwReg {
+ return asm.reg(g)
+}
+
+func (g Reg) Const() bool {
+ return false
+}
+
+func (g Reg) Kind() reflect.Kind {
+ // update after implementing MMX and XMM
+ return reflect.Int64
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/set.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/set.go
new file mode 100644
index 0000000..f71e877
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/set.go
@@ -0,0 +1,33 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * set.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+func (asm *Asm) Load(dst Reg, src Arg) *Asm {
+ return asm.load(asm.reg(dst), src)
+}
+
+func (asm *Asm) LoadConst(dst Reg, val int64) *Asm {
+ return asm.loadConst(asm.reg(dst), val)
+}
+
+func (asm *Asm) Store(dst *Var, src Arg) *Asm {
+ return asm.store(dst, src)
+}
+
+func (asm *Asm) Zero(dst *Var) *Asm {
+ return asm.store(dst, Int64(0))
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/set_amd64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/set_amd64.go
new file mode 100644
index 0000000..d3ad40d
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/set_amd64.go
@@ -0,0 +1,78 @@
+// +build amd64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * set_amd64.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+func (asm *Asm) load(dst hwReg, src Arg) *Asm {
+ switch a := src.(type) {
+ case Reg:
+ return asm.mov(dst, asm.reg(a))
+ case *Const:
+ return asm.loadConst(dst, a.val)
+ case *Var:
+ lo, hi := dst.lohi()
+ return asm.Bytes(0x48|hi*4, 0x8b, 0x87|lo*8).Idx(a) // movq src(%rdi),%reg
+ default:
+ errorf("invalid src type: %#v // %T", a, a)
+ return nil
+ }
+}
+
+func (asm *Asm) loadConst(dst hwReg, val int64) *Asm {
+ lo, hi := dst.lohi()
+ if val == int64(uint32(val)) {
+ if hi != 0 {
+ asm.Bytes(0x41)
+ }
+ return asm.Bytes(0xb8 + lo).Uint32(uint32(val)) // movl $val,%regl // zero extend
+ } else if val == int64(int32(val)) {
+ return asm.Bytes(0x48|hi, 0xc7, 0xc0|lo).Int32(int32(val)) // movq $val,%reg // sign extend
+ } else {
+ return asm.Bytes(0x48|hi, 0xb8+lo).Int64(val) // movabs $val,%reg
+ }
+}
+
+func (asm *Asm) mov(dst hwReg, src hwReg) *Asm {
+ if dst == src {
+ return asm
+ }
+ slo, shi := src.lohi()
+ dlo, dhi := dst.lohi()
+ return asm.Bytes(0x48|dhi|shi*4, 0x89, 0xc0+dlo+slo*8) // movq %reg_src,%reg_dst
+}
+
+func (asm *Asm) store(dst *Var, src Arg) *Asm {
+ switch a := src.(type) {
+ case *Const:
+ if val := a.val; val == int64(int32(val)) {
+ return asm.Bytes(0x48, 0xc7, 0x87).Idx(dst).Int32(int32(val)) // movq $val,z(%rdi)
+ }
+ case *Var:
+ if dst.desc == a.desc {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(src)
+ asm.storeReg(dst, tmp)
+ return asm.hwFree(tmp, alloc)
+}
+
+func (asm *Asm) storeReg(dst *Var, src hwReg) *Asm {
+ lo, hi := src.lohi()
+ return asm.Bytes(0x48|hi*4, 0x89, 0x87|lo*8).Idx(dst) // movq %reg,dst(%rdi)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/set_arm64.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/set_arm64.go
new file mode 100644
index 0000000..174b9fb
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/set_arm64.go
@@ -0,0 +1,86 @@
+// +build arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * set_arm64.go
+ *
+ * Created on May 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+func idx(a *Var) uint32 {
+ return uint32(a.idx) * S
+}
+
+func (asm *Asm) load(dst hwReg, src Arg) *Asm {
+ switch a := src.(type) {
+ case Reg:
+ return asm.mov(dst, asm.reg(a))
+ case *Const:
+ return asm.loadConst(dst, a.val)
+ case *Var:
+ off := idx(a)
+ if off <= 32760 && off&7 == 0 {
+ return asm.Uint32(0xf94003a0 | off<<7 | dst.lo()) // ldr xdst, [x29, #src]
+ }
+ tmp := asm.hwAllocConst(int64(off))
+ asm.Uint32(0xf8606ba0 | tmp.lo()<<16 | dst.lo()) // ldr xdst, [x29, xtmp]
+ return asm.hwFree(tmp, true)
+ default:
+ errorf("invalid src type: %#v // %T", a, a)
+ return nil
+ }
+}
+
+func (asm *Asm) loadConst(dst hwReg, val int64) *Asm {
+ lo := dst.lo()
+ u := uint64(val)
+ asm.Uint32(0xd2800000 | uint32(u&0xffff)<<5 | lo) // mov xdst, #val16
+ u >>= 16
+ for shift := uint32(1); u != 0 && shift <= 3; shift++ {
+ if mask := uint32(u & 0xffff); mask != 0 {
+ asm.Uint32(0xf2800000 | shift<<21 | mask<<5 | lo) // movk xdst, #mask, lsl #shift
+ }
+ u >>= 16
+ }
+ return asm
+}
+
+func (asm *Asm) mov(dst hwReg, src hwReg) *Asm {
+ if dst == src {
+ return asm
+ }
+ return asm.Uint32(0xaa0003e0 | src.lo()<<16 | dst.lo()) // mov xdst, xsrc
+}
+
+func (asm *Asm) store(dst *Var, src Arg) *Asm {
+ switch a := src.(type) {
+ case *Var:
+ if dst.desc == a.desc {
+ return asm
+ }
+ }
+ tmp, alloc := asm.hwAlloc(src)
+ asm.storeReg(dst, tmp)
+ return asm.hwFree(tmp, alloc)
+}
+
+func (asm *Asm) storeReg(dst *Var, src hwReg) *Asm {
+ off := idx(dst)
+ if off <= 32760 && off&7 == 0 {
+ return asm.Uint32(0xf90003a0 | off<<7 | src.lo()) // str xsrc, [x29, #dst]
+ }
+ tmp := asm.hwAllocConst(int64(off))
+ asm.Uint32(0xf8206ba0 | tmp.lo()<<16 | src.lo()) // str xsrc, [x29, xtmp]
+ return asm.hwFree(tmp, true)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/set_dummy.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/set_dummy.go
new file mode 100644
index 0000000..fad087a
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/set_dummy.go
@@ -0,0 +1,39 @@
+// +build !amd64,!arm64
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * set_dummy.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+func (asm *Asm) load(dst hwReg, src Arg) *Asm {
+ return asm
+}
+
+func (asm *Asm) loadConst(dst hwReg, val int64) *Asm {
+ return asm
+}
+
+func (asm *Asm) mov(dst hwReg, src hwReg) *Asm {
+ return asm
+}
+
+func (asm *Asm) store(dst *Var, src Arg) *Asm {
+ return asm
+}
+
+func (asm *Asm) storeReg(dst *Var, src hwReg) *Asm {
+ return asm
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib.a.dump b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib.a.dump
new file mode 100644
index 0000000..1e3e53a
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib.a.dump
@@ -0,0 +1,49 @@
+TEXT %22%22.fib(SB) gofile../home/max/go/src/github.com/cosmos72/gomacro/jit/stack_maps/fib.go
+ fib.go:19 0xc63 64488b0c2500000000 MOVQ FS:0, CX [5:9]R_TLS_LE
+ fib.go:19 0xc6c 483b6110 CMPQ 0x10(CX), SP
+ fib.go:19 0xc70 766e JBE 0xce0
+ fib.go:19 0xc72 4883ec20 SUBQ $0x20, SP
+ fib.go:19 0xc76 48896c2418 MOVQ BP, 0x18(SP)
+ fib.go:19 0xc7b 488d6c2418 LEAQ 0x18(SP), BP
+ fib.go:19 0xc80 488b442428 MOVQ 0x28(SP), AX
+ fib.go:20 0xc85 4883f802 CMPQ $0x2, AX
+ fib.go:20 0xc89 7f13 JG 0xc9e
+ fib.go:21 0xc8b 48c744243001000000 MOVQ $0x1, 0x30(SP)
+ fib.go:21 0xc94 488b6c2418 MOVQ 0x18(SP), BP
+ fib.go:21 0xc99 4883c420 ADDQ $0x20, SP
+ fib.go:21 0xc9d c3 RET
+ fib.go:23 0xc9e 488d48ff LEAQ -0x1(AX), CX
+ fib.go:23 0xca2 48890c24 MOVQ CX, 0(SP)
+ fib.go:23 0xca6 e800000000 CALL 0xcab [1:5]R_CALL:%22%22.fib
+ fib.go:23 0xcab 488b442408 MOVQ 0x8(SP), AX
+ fib.go:23 0xcb0 4889442410 MOVQ AX, 0x10(SP)
+ fib.go:23 0xcb5 488b4c2428 MOVQ 0x28(SP), CX
+ fib.go:23 0xcba 4883c1fe ADDQ $-0x2, CX
+ fib.go:23 0xcbe 48890c24 MOVQ CX, 0(SP)
+ fib.go:23 0xcc2 e800000000 CALL 0xcc7 [1:5]R_CALL:%22%22.fib
+ fib.go:23 0xcc7 488b442410 MOVQ 0x10(SP), AX
+ fib.go:23 0xccc 4803442408 ADDQ 0x8(SP), AX
+ fib.go:23 0xcd1 4889442430 MOVQ AX, 0x30(SP)
+ fib.go:23 0xcd6 488b6c2418 MOVQ 0x18(SP), BP
+ fib.go:23 0xcdb 4883c420 ADDQ $0x20, SP
+ fib.go:23 0xcdf c3 RET
+ fib.go:19 0xce0 e800000000 CALL 0xce5 [1:5]R_CALL:runtime.morestack_noctxt
+ fib.go:19 0xce5 e979ffffff JMP %22%22.fib(SB)
+
+TEXT %22%22.fib_asm(SB) gofile../home/max/go/src/github.com/cosmos72/gomacro/jit/stack_maps/fib.go
+ fib.go:26 0xd0f 64488b0c2500000000 MOVQ FS:0, CX [5:9]R_TLS_LE
+ fib.go:26 0xd18 483b6110 CMPQ 0x10(CX), SP
+ fib.go:26 0xd1c 7630 JBE 0xd4e
+ fib.go:26 0xd1e 4883ec18 SUBQ $0x18, SP
+ fib.go:26 0xd22 48896c2410 MOVQ BP, 0x10(SP)
+ fib.go:26 0xd27 488d6c2410 LEAQ 0x10(SP), BP
+ fib.go:26 0xd2c 488b442420 MOVQ 0x20(SP), AX
+ fib.go:27 0xd31 48890424 MOVQ AX, 0(SP)
+ fib.go:27 0xd35 e800000000 CALL 0xd3a [1:5]R_CALL:%22%22.fib
+ fib.go:27 0xd3a 488b442408 MOVQ 0x8(SP), AX
+ fib.go:27 0xd3f 4889442428 MOVQ AX, 0x28(SP)
+ fib.go:27 0xd44 488b6c2410 MOVQ 0x10(SP), BP
+ fib.go:27 0xd49 4883c418 ADDQ $0x18, SP
+ fib.go:27 0xd4d c3 RET
+ fib.go:26 0xd4e e800000000 CALL 0xd53 [1:5]R_CALL:runtime.morestack_noctxt
+ fib.go:26 0xd53 ebba JMP %22%22.fib_asm(SB)
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib.go
new file mode 100644
index 0000000..d71bac2
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib.go
@@ -0,0 +1,28 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * fib.go
+ *
+ * Created on May 23, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package stack_maps
+
+func fib(n int) int {
+ if n <= 2 {
+ return 1
+ }
+ return fib(n-1) + fib(n-2)
+}
+
+func fib_asm(n int) int /* {
+ return fib(n)
+} */
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.a.dump b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.a.dump
new file mode 100644
index 0000000..73c968e
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.a.dump
@@ -0,0 +1,49 @@
+TEXT %22%22.fib(SB) gofile../home/max/go/src/github.com/cosmos72/gomacro/jit/stack_maps/fib.go
+ fib.go:19 0x300 64488b0c2500000000 MOVQ FS:0, CX [5:9]R_TLS_LE
+ fib.go:19 0x309 483b6110 CMPQ 0x10(CX), SP
+ fib.go:19 0x30d 766e JBE 0x37d
+ fib.go:19 0x30f 4883ec20 SUBQ $0x20, SP
+ fib.go:19 0x313 48896c2418 MOVQ BP, 0x18(SP)
+ fib.go:19 0x318 488d6c2418 LEAQ 0x18(SP), BP
+ fib.go:19 0x31d 488b442428 MOVQ 0x28(SP), AX
+ fib.go:20 0x322 4883f802 CMPQ $0x2, AX
+ fib.go:20 0x326 7f13 JG 0x33b
+ fib.go:21 0x328 48c744243001000000 MOVQ $0x1, 0x30(SP)
+ fib.go:21 0x331 488b6c2418 MOVQ 0x18(SP), BP
+ fib.go:21 0x336 4883c420 ADDQ $0x20, SP
+ fib.go:21 0x33a c3 RET
+ fib.go:23 0x33b 488d48ff LEAQ -0x1(AX), CX
+ fib.go:23 0x33f 48890c24 MOVQ CX, 0(SP)
+ fib.go:23 0x343 e800000000 CALL 0x348 [1:5]R_CALL:%22%22.fib
+ fib.go:23 0x348 488b442408 MOVQ 0x8(SP), AX
+ fib.go:23 0x34d 4889442410 MOVQ AX, 0x10(SP)
+ fib.go:23 0x352 488b4c2428 MOVQ 0x28(SP), CX
+ fib.go:23 0x357 4883c1fe ADDQ $-0x2, CX
+ fib.go:23 0x35b 48890c24 MOVQ CX, 0(SP)
+ fib.go:23 0x35f e800000000 CALL 0x364 [1:5]R_CALL:%22%22.fib
+ fib.go:23 0x364 488b442410 MOVQ 0x10(SP), AX
+ fib.go:23 0x369 4803442408 ADDQ 0x8(SP), AX
+ fib.go:23 0x36e 4889442430 MOVQ AX, 0x30(SP)
+ fib.go:23 0x373 488b6c2418 MOVQ 0x18(SP), BP
+ fib.go:23 0x378 4883c420 ADDQ $0x20, SP
+ fib.go:23 0x37c c3 RET
+ fib.go:19 0x37d e800000000 CALL 0x382 [1:5]R_CALL:runtime.morestack_noctxt
+ fib.go:19 0x382 e979ffffff JMP %22%22.fib(SB)
+
+TEXT %22%22.fib_asm(SB) gofile../home/max/go/src/github.com/cosmos72/gomacro/jit/stack_maps/fib_asm.s
+ fib_asm.s:24 0x5e0 64488b0c2500000000 MOVQ FS:0, CX [5:9]R_TLS_LE
+ fib_asm.s:24 0x5e9 483b6110 CMPQ 0x10(CX), SP
+ fib_asm.s:24 0x5ed 7630 JBE 0x61f
+ fib_asm.s:24 0x5ef 4883ec18 SUBQ $0x18, SP
+ fib_asm.s:24 0x5f3 48896c2410 MOVQ BP, 0x10(SP)
+ fib_asm.s:24 0x5f8 488d6c2410 LEAQ 0x10(SP), BP
+ fib_asm.s:27 0x5fd 488b442420 MOVQ 0x20(SP), AX
+ fib_asm.s:29 0x602 48890424 MOVQ AX, 0(SP)
+ fib_asm.s:30 0x606 e800000000 CALL 0x60b [1:5]R_CALL:%22%22.fib
+ fib_asm.s:31 0x60b 488b442408 MOVQ 0x8(SP), AX
+ fib_asm.s:33 0x610 4889442428 MOVQ AX, 0x28(SP)
+ fib_asm.s:34 0x615 488b6c2410 MOVQ 0x10(SP), BP
+ fib_asm.s:34 0x61a 4883c418 ADDQ $0x18, SP
+ fib_asm.s:34 0x61e c3 RET
+ fib_asm.s:24 0x61f e800000000 CALL 0x624 [1:5]R_CALL:runtime.morestack_noctxt
+ fib_asm.s:24 0x624 ebba JMP %22%22.fib_asm(SB)
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.s
new file mode 100644
index 0000000..4fe33f2
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.s
@@ -0,0 +1,36 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * fib_asm.go
+ *
+ * Created on May 23, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+// +build gc
+
+#include "go_asm.h"
+#include "funcdata.h"
+#include "textflag.h"
+#include "../../src/runtime/go_tls.h"
+
+// assembler will automatically save/restore BP and adjust SP on function entry/exit
+// it will also call runtime.morestack() as needed
+TEXT ·fib_asm(SB),0,$16-16
+ NO_LOCAL_POINTERS
+
+ MOVQ n+0(FP), AX
+
+ MOVQ AX, 0(SP) // omit symbol name, otherwise assembler will add some stack offset
+ CALL ·fib(SB)
+ MOVQ 8(SP), AX // idem
+
+ MOVQ AX, ret+8(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.s.dump b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.s.dump
new file mode 100644
index 0000000..1ea0ff9
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/fib_asm.s.dump
@@ -0,0 +1 @@
+fib_asm.go:0:0: open fib_asm.go: no such file or directory
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/stack_maps.go.off b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/stack_maps.go.off
new file mode 100644
index 0000000..814ad2d
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/stack_maps.go.off
@@ -0,0 +1,209 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * stack_maps.go
+ *
+ * Created on May 23, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package stack_maps
+
+import (
+ "unsafe"
+)
+
+var _0 *int
+
+func pointer0_0(a int) int {
+ return a
+}
+
+func func1_argptr1_0(a *int) int {
+ if a == _0 {
+ return 1
+ } else {
+ return 0
+ }
+}
+
+func func2_argptr2_0(a, b *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ }
+ return ret
+}
+
+func func2_argptr2_2(a, b *int) (A, B **int) {
+ return &a, &b
+}
+
+func func3_argptr3_0(a, b, c *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ }
+ if b == c {
+ ret++
+ }
+ return ret
+}
+
+func func3_argptr3_3(a, b, c *int) (A, B, C *int) {
+ return (*int)(unsafe.Pointer(uintptr(16))),
+ (*int)(unsafe.Pointer(uintptr(32))),
+ (*int)(unsafe.Pointer(uintptr(64)))
+}
+
+func func4_argptr4_0(a, b, c, d *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ }
+ if c == d {
+ ret++
+ }
+ return ret
+}
+
+func func5_argptr5_0(a, b, c, d, e *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ } else if c == d {
+ ret++
+ }
+ return ret
+}
+
+func func5_argptr0_0(a, b, c, d, e int) int {
+ ret := 0
+ if a == b {
+ ret++
+ } else if c == d {
+ ret++
+ } else if c == e {
+ ret++
+ }
+ return ret
+}
+
+func func7_argptr7_0(a, b, c, d, e, f, g *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ } else if c == d {
+ ret++
+ } else if e == f {
+ ret++
+ } else if g == a {
+ ret++
+ }
+ return ret
+}
+
+func func7_argptr7_7(a, b, c, d, e, f, g *int) (A, B, C, D, E, F, G **int) {
+ return &a, &b, &c, &d, &e, &f, &g
+}
+
+func func8_argptr8_0(a, b, c, d, e, f, g, h *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ } else if c == d {
+ ret++
+ } else if e == f {
+ ret++
+ } else if g == h {
+ ret++
+ }
+ return ret
+}
+
+func func31_argptr31_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, aa, ab, ac, ad, ae *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ } else if c == d {
+ ret++
+ } else if e == f {
+ ret++
+ } else if g == h {
+ ret++
+ } else if i == j {
+ ret++
+ } else if k == l {
+ ret++
+ } else if m == n {
+ ret++
+ } else if o == p {
+ ret++
+ } else if q == r {
+ ret++
+ } else if s == t {
+ ret++
+ } else if u == v {
+ ret++
+ } else if w == x {
+ ret++
+ } else if y == z {
+ ret++
+ } else if aa == ab {
+ ret++
+ } else if ac == ad {
+ ret++
+ } else if ae == a {
+ ret++
+ }
+ return ret
+}
+
+func func32_argptr32_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, aa, ab, ac, ad, ae, af *int) int {
+ ret := 0
+ if a == b {
+ ret++
+ } else if c == d {
+ ret++
+ } else if e == f {
+ ret++
+ } else if g == h {
+ ret++
+ } else if i == j {
+ ret++
+ } else if k == l {
+ ret++
+ } else if m == n {
+ ret++
+ } else if o == p {
+ ret++
+ } else if q == r {
+ ret++
+ } else if s == t {
+ ret++
+ } else if u == v {
+ ret++
+ } else if w == x {
+ ret++
+ } else if y == z {
+ ret++
+ } else if aa == ab {
+ ret++
+ } else if ac == ad {
+ ret++
+ } else if ae == af {
+ ret++
+ }
+ return ret
+}
+
+func func1_argptr0_1(a int) *int {
+ return _0
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/stack_maps.s.dump b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/stack_maps.s.dump
new file mode 100644
index 0000000..055da68
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/stack_maps.s.dump
@@ -0,0 +1,1159 @@
+"".pointer0_0 STEXT nosplit size=11 args=0x10 locals=0x0
+ 0x0000 00000 (stack_maps.go:25) TEXT "".pointer0_0(SB), NOSPLIT, $0-16
+ 0x0000 00000 (stack_maps.go:25) FUNCDATA $0, gclocals·f207267fbf96a0178e8758c6e3e0ce28(SB)
+ 0x0000 00000 (stack_maps.go:25) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:25) MOVQ "".a+8(SP), AX
+ 0x0005 00005 (stack_maps.go:26) MOVQ AX, "".~r1+16(SP)
+ 0x000a 00010 (stack_maps.go:26) RET
+ 0x0000 48 8b 44 24 08 48 89 44 24 10 c3 H.D$.H.D$..
+"".func1_argptr1_0 STEXT nosplit size=37 args=0x10 locals=0x0
+ 0x0000 00000 (stack_maps.go:29) TEXT "".func1_argptr1_0(SB), NOSPLIT, $0-16
+ 0x0000 00000 (stack_maps.go:29) FUNCDATA $0, gclocals·aef1f7ba6e2630c93a51843d99f5a28a(SB)
+ 0x0000 00000 (stack_maps.go:29) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:30) MOVQ ""._0(SB), AX
+ 0x0007 00007 (stack_maps.go:30) MOVQ "".a+8(SP), CX
+ 0x000c 00012 (stack_maps.go:30) CMPQ CX, AX
+ 0x000f 00015 (stack_maps.go:30) JNE 27
+ 0x0011 00017 (stack_maps.go:31) MOVQ $1, "".~r1+16(SP)
+ 0x001a 00026 (stack_maps.go:31) RET
+ 0x001b 00027 (stack_maps.go:33) MOVQ $0, "".~r1+16(SP)
+ 0x0024 00036 (stack_maps.go:33) RET
+ 0x0000 48 8b 05 00 00 00 00 48 8b 4c 24 08 48 39 c1 75 H......H.L$.H9.u
+ 0x0010 0a 48 c7 44 24 10 01 00 00 00 c3 48 c7 44 24 10 .H.D$......H.D$.
+ 0x0020 00 00 00 00 c3 .....
+ rel 3+4 t=15 ""._0+0
+"".func2_argptr2_0 STEXT nosplit size=25 args=0x18 locals=0x0
+ 0x0000 00000 (stack_maps.go:37) TEXT "".func2_argptr2_0(SB), NOSPLIT, $0-24
+ 0x0000 00000 (stack_maps.go:37) FUNCDATA $0, gclocals·8f9cec06d1ae35cc9900c511c5e4bdab(SB)
+ 0x0000 00000 (stack_maps.go:37) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:37) MOVQ "".a+8(SP), AX
+ 0x0005 00005 (stack_maps.go:37) MOVQ "".b+16(SP), CX
+ 0x000a 00010 (stack_maps.go:39) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:39) SETEQ AL
+ 0x0010 00016 (stack_maps.go:42) MOVBLZX AL, AX
+ 0x0013 00019 (stack_maps.go:42) MOVQ AX, "".~r2+24(SP)
+ 0x0018 00024 (stack_maps.go:42) RET
+ 0x0000 48 8b 44 24 08 48 8b 4c 24 10 48 39 c8 0f 94 c0 H.D$.H.L$.H9....
+ 0x0010 0f b6 c0 48 89 44 24 18 c3 ...H.D$..
+"".func2_argptr2_2 STEXT size=175 args=0x20 locals=0x20
+ 0x0000 00000 (stack_maps.go:45) TEXT "".func2_argptr2_2(SB), $32-32
+ 0x0000 00000 (stack_maps.go:45) MOVQ (TLS), CX
+ 0x0009 00009 (stack_maps.go:45) CMPQ SP, 16(CX)
+ 0x000d 00013 (stack_maps.go:45) JLS 165
+ 0x0013 00019 (stack_maps.go:45) SUBQ $32, SP
+ 0x0017 00023 (stack_maps.go:45) MOVQ BP, 24(SP)
+ 0x001c 00028 (stack_maps.go:45) LEAQ 24(SP), BP
+ 0x0021 00033 (stack_maps.go:45) FUNCDATA $0, gclocals·d7e90e31b8caf40b4a816bc6493d0278(SB)
+ 0x0021 00033 (stack_maps.go:45) FUNCDATA $1, gclocals·9fb7f0986f647f17cb53dda1484e0f7a(SB)
+ 0x0021 00033 (stack_maps.go:45) LEAQ type.*int(SB), AX
+ 0x0028 00040 (stack_maps.go:45) MOVQ AX, (SP)
+ 0x002c 00044 (stack_maps.go:45) PCDATA $0, $0
+ 0x002c 00044 (stack_maps.go:45) CALL runtime.newobject(SB)
+ 0x0031 00049 (stack_maps.go:45) MOVQ 8(SP), DI
+ 0x0036 00054 (stack_maps.go:45) MOVQ DI, "".&a+16(SP)
+ 0x003b 00059 (stack_maps.go:45) MOVL runtime.writeBarrier(SB), AX
+ 0x0041 00065 (stack_maps.go:45) TESTL AX, AX
+ 0x0043 00067 (stack_maps.go:45) JNE 153
+ 0x0045 00069 (stack_maps.go:45) MOVQ "".a+40(SP), AX
+ 0x004a 00074 (stack_maps.go:45) MOVQ AX, (DI)
+ 0x004d 00077 (stack_maps.go:45) LEAQ type.*int(SB), AX
+ 0x0054 00084 (stack_maps.go:45) MOVQ AX, (SP)
+ 0x0058 00088 (stack_maps.go:45) PCDATA $0, $1
+ 0x0058 00088 (stack_maps.go:45) CALL runtime.newobject(SB)
+ 0x005d 00093 (stack_maps.go:45) MOVL runtime.writeBarrier(SB), AX
+ 0x0063 00099 (stack_maps.go:45) MOVQ 8(SP), DI
+ 0x0068 00104 (stack_maps.go:45) TESTL AX, AX
+ 0x006a 00106 (stack_maps.go:45) JNE 141
+ 0x006c 00108 (stack_maps.go:45) MOVQ "".b+48(SP), AX
+ 0x0071 00113 (stack_maps.go:45) MOVQ AX, (DI)
+ 0x0074 00116 (stack_maps.go:46) MOVQ "".&a+16(SP), AX
+ 0x0079 00121 (stack_maps.go:46) MOVQ AX, "".A+56(SP)
+ 0x007e 00126 (stack_maps.go:46) MOVQ DI, "".B+64(SP)
+ 0x0083 00131 (stack_maps.go:46) MOVQ 24(SP), BP
+ 0x0088 00136 (stack_maps.go:46) ADDQ $32, SP
+ 0x008c 00140 (stack_maps.go:46) RET
+ 0x008d 00141 (stack_maps.go:46) MOVQ "".b+48(SP), AX
+ 0x0092 00146 (stack_maps.go:45) CALL runtime.gcWriteBarrier(SB)
+ 0x0097 00151 (stack_maps.go:45) JMP 116
+ 0x0099 00153 (stack_maps.go:45) MOVQ "".a+40(SP), AX
+ 0x009e 00158 (stack_maps.go:45) CALL runtime.gcWriteBarrier(SB)
+ 0x00a3 00163 (stack_maps.go:45) JMP 77
+ 0x00a5 00165 (stack_maps.go:45) NOP
+ 0x00a5 00165 (stack_maps.go:45) PCDATA $0, $-1
+ 0x00a5 00165 (stack_maps.go:45) CALL runtime.morestack_noctxt(SB)
+ 0x00aa 00170 (stack_maps.go:45) JMP 0
+ 0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 92 dH..%....H;a....
+ 0x0010 00 00 00 48 83 ec 20 48 89 6c 24 18 48 8d 6c 24 ...H.. H.l$.H.l$
+ 0x0020 18 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 .H......H..$....
+ 0x0030 00 48 8b 7c 24 08 48 89 7c 24 10 8b 05 00 00 00 .H.|$.H.|$......
+ 0x0040 00 85 c0 75 54 48 8b 44 24 28 48 89 07 48 8d 05 ...uTH.D$(H..H..
+ 0x0050 00 00 00 00 48 89 04 24 e8 00 00 00 00 8b 05 00 ....H..$........
+ 0x0060 00 00 00 48 8b 7c 24 08 85 c0 75 21 48 8b 44 24 ...H.|$...u!H.D$
+ 0x0070 30 48 89 07 48 8b 44 24 10 48 89 44 24 38 48 89 0H..H.D$.H.D$8H.
+ 0x0080 7c 24 40 48 8b 6c 24 18 48 83 c4 20 c3 48 8b 44 |$@H.l$.H.. .H.D
+ 0x0090 24 30 e8 00 00 00 00 eb db 48 8b 44 24 28 e8 00 $0.......H.D$(..
+ 0x00a0 00 00 00 eb a8 e8 00 00 00 00 e9 51 ff ff ff ...........Q...
+ rel 5+4 t=16 TLS+0
+ rel 36+4 t=15 type.*int+0
+ rel 45+4 t=8 runtime.newobject+0
+ rel 61+4 t=15 runtime.writeBarrier+0
+ rel 80+4 t=15 type.*int+0
+ rel 89+4 t=8 runtime.newobject+0
+ rel 95+4 t=15 runtime.writeBarrier+0
+ rel 147+4 t=8 runtime.gcWriteBarrier+0
+ rel 159+4 t=8 runtime.gcWriteBarrier+0
+ rel 166+4 t=8 runtime.morestack_noctxt+0
+"".func3_argptr3_0 STEXT nosplit size=44 args=0x20 locals=0x0
+ 0x0000 00000 (stack_maps.go:49) TEXT "".func3_argptr3_0(SB), NOSPLIT, $0-32
+ 0x0000 00000 (stack_maps.go:49) FUNCDATA $0, gclocals·41e09b51c5c69a07e9cde7306b03f8c0(SB)
+ 0x0000 00000 (stack_maps.go:49) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:49) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:49) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:51) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:51) SETEQ CL
+ 0x0010 00016 (stack_maps.go:57) MOVBLZX CL, CX
+ 0x0013 00019 (stack_maps.go:57) MOVQ "".c+24(SP), DX
+ 0x0018 00024 (stack_maps.go:54) CMPQ DX, AX
+ 0x001b 00027 (stack_maps.go:54) JNE 39
+ 0x001d 00029 (stack_maps.go:55) LEAQ 1(CX), AX
+ 0x0021 00033 (stack_maps.go:57) MOVQ AX, "".~r3+32(SP)
+ 0x0026 00038 (stack_maps.go:57) RET
+ 0x0027 00039 (stack_maps.go:57) MOVQ CX, AX
+ 0x002a 00042 (stack_maps.go:54) JMP 33
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 0f 94 c1 H.D$.H.L$.H9....
+ 0x0010 0f b6 c9 48 8b 54 24 18 48 39 c2 75 0a 48 8d 41 ...H.T$.H9.u.H.A
+ 0x0020 01 48 89 44 24 20 c3 48 89 c8 eb f5 .H.D$ .H....
+"".func3_argptr3_3 STEXT nosplit size=28 args=0x30 locals=0x0
+ 0x0000 00000 (stack_maps.go:60) TEXT "".func3_argptr3_3(SB), NOSPLIT, $0-48
+ 0x0000 00000 (stack_maps.go:60) FUNCDATA $0, gclocals·26c19b003b4032a46d3e8db29831f3fe(SB)
+ 0x0000 00000 (stack_maps.go:60) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:61) MOVQ $16, "".A+32(SP)
+ 0x0009 00009 (stack_maps.go:61) MOVQ $32, "".B+40(SP)
+ 0x0012 00018 (stack_maps.go:61) MOVQ $64, "".C+48(SP)
+ 0x001b 00027 (stack_maps.go:63) RET
+ 0x0000 48 c7 44 24 20 10 00 00 00 48 c7 44 24 28 20 00 H.D$ ....H.D$( .
+ 0x0010 00 00 48 c7 44 24 30 40 00 00 00 c3 ..H.D$0@....
+"".func4_argptr4_0 STEXT nosplit size=43 args=0x28 locals=0x0
+ 0x0000 00000 (stack_maps.go:66) TEXT "".func4_argptr4_0(SB), NOSPLIT, $0-40
+ 0x0000 00000 (stack_maps.go:66) FUNCDATA $0, gclocals·1796f354e2ee64b72a4c7c668a1a7161(SB)
+ 0x0000 00000 (stack_maps.go:66) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:66) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:66) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:68) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:68) SETEQ AL
+ 0x0010 00016 (stack_maps.go:74) MOVBLZX AL, AX
+ 0x0013 00019 (stack_maps.go:74) MOVQ "".d+32(SP), CX
+ 0x0018 00024 (stack_maps.go:74) MOVQ "".c+24(SP), DX
+ 0x001d 00029 (stack_maps.go:71) CMPQ CX, DX
+ 0x0020 00032 (stack_maps.go:71) JNE 37
+ 0x0022 00034 (stack_maps.go:72) INCQ AX
+ 0x0025 00037 (stack_maps.go:74) MOVQ AX, "".~r4+40(SP)
+ 0x002a 00042 (stack_maps.go:74) RET
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 0f 94 c0 H.D$.H.L$.H9....
+ 0x0010 0f b6 c0 48 8b 4c 24 20 48 8b 54 24 18 48 39 d1 ...H.L$ H.T$.H9.
+ 0x0020 75 03 48 ff c0 48 89 44 24 28 c3 u.H..H.D$(.
+"".func5_argptr5_0 STEXT nosplit size=47 args=0x30 locals=0x0
+ 0x0000 00000 (stack_maps.go:77) TEXT "".func5_argptr5_0(SB), NOSPLIT, $0-48
+ 0x0000 00000 (stack_maps.go:77) FUNCDATA $0, gclocals·e47c75ed031dcaac5b24e58ca743f6ee(SB)
+ 0x0000 00000 (stack_maps.go:77) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:77) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:77) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:79) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:79) JNE 26
+ 0x000f 00015 (stack_maps.go:79) MOVL $1, AX
+ 0x0014 00020 (stack_maps.go:84) MOVQ AX, "".~r5+48(SP)
+ 0x0019 00025 (stack_maps.go:84) RET
+ 0x001a 00026 (stack_maps.go:84) MOVQ "".d+32(SP), CX
+ 0x001f 00031 (stack_maps.go:84) MOVQ "".c+24(SP), DX
+ 0x0024 00036 (stack_maps.go:81) CMPQ CX, DX
+ 0x0027 00039 (stack_maps.go:81) SETEQ CL
+ 0x002a 00042 (stack_maps.go:84) MOVBLZX CL, AX
+ 0x002d 00045 (stack_maps.go:84) JMP 20
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 75 0b b8 H.D$.H.L$.H9.u..
+ 0x0010 01 00 00 00 48 89 44 24 30 c3 48 8b 4c 24 20 48 ....H.D$0.H.L$ H
+ 0x0020 8b 54 24 18 48 39 d1 0f 94 c1 0f b6 c1 eb e5 .T$.H9.........
+"".func5_argptr0_0 STEXT nosplit size=64 args=0x30 locals=0x0
+ 0x0000 00000 (stack_maps.go:87) TEXT "".func5_argptr0_0(SB), NOSPLIT, $0-48
+ 0x0000 00000 (stack_maps.go:87) FUNCDATA $0, gclocals·26c19b003b4032a46d3e8db29831f3fe(SB)
+ 0x0000 00000 (stack_maps.go:87) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:87) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:87) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:89) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:89) JNE 26
+ 0x000f 00015 (stack_maps.go:89) MOVL $1, AX
+ 0x0014 00020 (stack_maps.go:96) MOVQ AX, "".~r5+48(SP)
+ 0x0019 00025 (stack_maps.go:96) RET
+ 0x001a 00026 (stack_maps.go:96) MOVQ "".d+32(SP), AX
+ 0x001f 00031 (stack_maps.go:96) MOVQ "".c+24(SP), CX
+ 0x0024 00036 (stack_maps.go:91) CMPQ AX, CX
+ 0x0027 00039 (stack_maps.go:91) JNE 48
+ 0x0029 00041 (stack_maps.go:91) MOVL $1, AX
+ 0x002e 00046 (stack_maps.go:92) JMP 20
+ 0x0030 00048 (stack_maps.go:92) MOVQ "".e+40(SP), DX
+ 0x0035 00053 (stack_maps.go:93) CMPQ DX, CX
+ 0x0038 00056 (stack_maps.go:93) SETEQ CL
+ 0x003b 00059 (stack_maps.go:96) MOVBLZX CL, AX
+ 0x003e 00062 (stack_maps.go:96) JMP 20
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 75 0b b8 H.D$.H.L$.H9.u..
+ 0x0010 01 00 00 00 48 89 44 24 30 c3 48 8b 44 24 20 48 ....H.D$0.H.D$ H
+ 0x0020 8b 4c 24 18 48 39 c8 75 07 b8 01 00 00 00 eb e4 .L$.H9.u........
+ 0x0030 48 8b 54 24 28 48 39 ca 0f 94 c1 0f b6 c1 eb d4 H.T$(H9.........
+"".func7_argptr7_0 STEXT nosplit size=86 args=0x40 locals=0x0
+ 0x0000 00000 (stack_maps.go:99) TEXT "".func7_argptr7_0(SB), NOSPLIT, $0-64
+ 0x0000 00000 (stack_maps.go:99) FUNCDATA $0, gclocals·e5f9455b7f339e9e2483020ccff91f2a(SB)
+ 0x0000 00000 (stack_maps.go:99) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:99) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:99) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:101) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:101) JNE 26
+ 0x000f 00015 (stack_maps.go:101) MOVL $1, AX
+ 0x0014 00020 (stack_maps.go:110) MOVQ AX, "".~r7+64(SP)
+ 0x0019 00025 (stack_maps.go:110) RET
+ 0x001a 00026 (stack_maps.go:110) MOVQ "".d+32(SP), AX
+ 0x001f 00031 (stack_maps.go:110) MOVQ "".c+24(SP), DX
+ 0x0024 00036 (stack_maps.go:103) CMPQ AX, DX
+ 0x0027 00039 (stack_maps.go:103) JNE 48
+ 0x0029 00041 (stack_maps.go:103) MOVL $1, AX
+ 0x002e 00046 (stack_maps.go:104) JMP 20
+ 0x0030 00048 (stack_maps.go:104) MOVQ "".f+48(SP), AX
+ 0x0035 00053 (stack_maps.go:104) MOVQ "".e+40(SP), DX
+ 0x003a 00058 (stack_maps.go:105) CMPQ AX, DX
+ 0x003d 00061 (stack_maps.go:105) JNE 70
+ 0x003f 00063 (stack_maps.go:105) MOVL $1, AX
+ 0x0044 00068 (stack_maps.go:106) JMP 20
+ 0x0046 00070 (stack_maps.go:106) MOVQ "".g+56(SP), DX
+ 0x004b 00075 (stack_maps.go:107) CMPQ DX, CX
+ 0x004e 00078 (stack_maps.go:107) SETEQ CL
+ 0x0051 00081 (stack_maps.go:110) MOVBLZX CL, AX
+ 0x0054 00084 (stack_maps.go:110) JMP 20
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 75 0b b8 H.D$.H.L$.H9.u..
+ 0x0010 01 00 00 00 48 89 44 24 40 c3 48 8b 44 24 20 48 ....H.D$@.H.D$ H
+ 0x0020 8b 54 24 18 48 39 d0 75 07 b8 01 00 00 00 eb e4 .T$.H9.u........
+ 0x0030 48 8b 44 24 30 48 8b 54 24 28 48 39 d0 75 07 b8 H.D$0H.T$(H9.u..
+ 0x0040 01 00 00 00 eb ce 48 8b 54 24 38 48 39 ca 0f 94 ......H.T$8H9...
+ 0x0050 c1 0f b6 c1 eb be ......
+"".func7_argptr7_7 STEXT size=574 args=0x70 locals=0x48
+ 0x0000 00000 (stack_maps.go:113) TEXT "".func7_argptr7_7(SB), $72-112
+ 0x0000 00000 (stack_maps.go:113) MOVQ (TLS), CX
+ 0x0009 00009 (stack_maps.go:113) CMPQ SP, 16(CX)
+ 0x000d 00013 (stack_maps.go:113) JLS 564
+ 0x0013 00019 (stack_maps.go:113) SUBQ $72, SP
+ 0x0017 00023 (stack_maps.go:113) MOVQ BP, 64(SP)
+ 0x001c 00028 (stack_maps.go:113) LEAQ 64(SP), BP
+ 0x0021 00033 (stack_maps.go:113) FUNCDATA $0, gclocals·1ffc4335e650bddd934df7eed5367235(SB)
+ 0x0021 00033 (stack_maps.go:113) FUNCDATA $1, gclocals·b88d212e1dddf05b11066db7e199ff36(SB)
+ 0x0021 00033 (stack_maps.go:113) LEAQ type.*int(SB), AX
+ 0x0028 00040 (stack_maps.go:113) MOVQ AX, (SP)
+ 0x002c 00044 (stack_maps.go:113) PCDATA $0, $0
+ 0x002c 00044 (stack_maps.go:113) CALL runtime.newobject(SB)
+ 0x0031 00049 (stack_maps.go:113) MOVQ 8(SP), DI
+ 0x0036 00054 (stack_maps.go:113) MOVQ DI, "".&a+56(SP)
+ 0x003b 00059 (stack_maps.go:113) MOVL runtime.writeBarrier(SB), AX
+ 0x0041 00065 (stack_maps.go:113) TESTL AX, AX
+ 0x0043 00067 (stack_maps.go:113) JNE 549
+ 0x0049 00073 (stack_maps.go:113) MOVQ "".a+80(SP), AX
+ 0x004e 00078 (stack_maps.go:113) MOVQ AX, (DI)
+ 0x0051 00081 (stack_maps.go:113) LEAQ type.*int(SB), AX
+ 0x0058 00088 (stack_maps.go:113) MOVQ AX, (SP)
+ 0x005c 00092 (stack_maps.go:113) PCDATA $0, $1
+ 0x005c 00092 (stack_maps.go:113) CALL runtime.newobject(SB)
+ 0x0061 00097 (stack_maps.go:113) MOVQ 8(SP), DI
+ 0x0066 00102 (stack_maps.go:113) MOVQ DI, "".&b+48(SP)
+ 0x006b 00107 (stack_maps.go:113) MOVL runtime.writeBarrier(SB), AX
+ 0x0071 00113 (stack_maps.go:113) TESTL AX, AX
+ 0x0073 00115 (stack_maps.go:113) JNE 534
+ 0x0079 00121 (stack_maps.go:113) MOVQ "".b+88(SP), AX
+ 0x007e 00126 (stack_maps.go:113) MOVQ AX, (DI)
+ 0x0081 00129 (stack_maps.go:113) LEAQ type.*int(SB), AX
+ 0x0088 00136 (stack_maps.go:113) MOVQ AX, (SP)
+ 0x008c 00140 (stack_maps.go:113) PCDATA $0, $2
+ 0x008c 00140 (stack_maps.go:113) CALL runtime.newobject(SB)
+ 0x0091 00145 (stack_maps.go:113) MOVQ 8(SP), DI
+ 0x0096 00150 (stack_maps.go:113) MOVQ DI, "".&c+40(SP)
+ 0x009b 00155 (stack_maps.go:113) MOVL runtime.writeBarrier(SB), AX
+ 0x00a1 00161 (stack_maps.go:113) TESTL AX, AX
+ 0x00a3 00163 (stack_maps.go:113) JNE 519
+ 0x00a9 00169 (stack_maps.go:113) MOVQ "".c+96(SP), AX
+ 0x00ae 00174 (stack_maps.go:113) MOVQ AX, (DI)
+ 0x00b1 00177 (stack_maps.go:113) LEAQ type.*int(SB), AX
+ 0x00b8 00184 (stack_maps.go:113) MOVQ AX, (SP)
+ 0x00bc 00188 (stack_maps.go:113) PCDATA $0, $3
+ 0x00bc 00188 (stack_maps.go:113) CALL runtime.newobject(SB)
+ 0x00c1 00193 (stack_maps.go:113) MOVQ 8(SP), DI
+ 0x00c6 00198 (stack_maps.go:113) MOVQ DI, "".&d+32(SP)
+ 0x00cb 00203 (stack_maps.go:113) MOVL runtime.writeBarrier(SB), AX
+ 0x00d1 00209 (stack_maps.go:113) TESTL AX, AX
+ 0x00d3 00211 (stack_maps.go:113) JNE 504
+ 0x00d9 00217 (stack_maps.go:113) MOVQ "".d+104(SP), AX
+ 0x00de 00222 (stack_maps.go:113) MOVQ AX, (DI)
+ 0x00e1 00225 (stack_maps.go:113) LEAQ type.*int(SB), AX
+ 0x00e8 00232 (stack_maps.go:113) MOVQ AX, (SP)
+ 0x00ec 00236 (stack_maps.go:113) PCDATA $0, $4
+ 0x00ec 00236 (stack_maps.go:113) CALL runtime.newobject(SB)
+ 0x00f1 00241 (stack_maps.go:113) MOVL runtime.writeBarrier(SB), AX
+ 0x00f7 00247 (stack_maps.go:113) MOVQ 8(SP), DI
+ 0x00fc 00252 (stack_maps.go:113) MOVQ DI, "".&e+24(SP)
+ 0x0101 00257 (stack_maps.go:113) TESTL AX, AX
+ 0x0103 00259 (stack_maps.go:113) JNE 489
+ 0x0109 00265 (stack_maps.go:113) MOVQ "".e+112(SP), AX
+ 0x010e 00270 (stack_maps.go:113) MOVQ AX, (DI)
+ 0x0111 00273 (stack_maps.go:113) LEAQ type.*int(SB), AX
+ 0x0118 00280 (stack_maps.go:113) MOVQ AX, (SP)
+ 0x011c 00284 (stack_maps.go:113) PCDATA $0, $5
+ 0x011c 00284 (stack_maps.go:113) CALL runtime.newobject(SB)
+ 0x0121 00289 (stack_maps.go:113) MOVL runtime.writeBarrier(SB), AX
+ 0x0127 00295 (stack_maps.go:113) MOVQ 8(SP), DI
+ 0x012c 00300 (stack_maps.go:113) MOVQ DI, "".&f+16(SP)
+ 0x0131 00305 (stack_maps.go:113) TESTL AX, AX
+ 0x0133 00307 (stack_maps.go:113) JNE 474
+ 0x0139 00313 (stack_maps.go:113) MOVQ "".f+120(SP), AX
+ 0x013e 00318 (stack_maps.go:113) MOVQ AX, (DI)
+ 0x0141 00321 (stack_maps.go:113) LEAQ type.*int(SB), AX
+ 0x0148 00328 (stack_maps.go:113) MOVQ AX, (SP)
+ 0x014c 00332 (stack_maps.go:113) PCDATA $0, $6
+ 0x014c 00332 (stack_maps.go:113) CALL runtime.newobject(SB)
+ 0x0151 00337 (stack_maps.go:113) MOVL runtime.writeBarrier(SB), AX
+ 0x0157 00343 (stack_maps.go:113) MOVQ 8(SP), DI
+ 0x015c 00348 (stack_maps.go:113) TESTL AX, AX
+ 0x015e 00350 (stack_maps.go:113) JNE 459
+ 0x0160 00352 (stack_maps.go:113) MOVQ "".g+128(SP), AX
+ 0x0168 00360 (stack_maps.go:113) MOVQ AX, (DI)
+ 0x016b 00363 (stack_maps.go:114) MOVQ "".&a+56(SP), AX
+ 0x0170 00368 (stack_maps.go:114) MOVQ AX, "".A+136(SP)
+ 0x0178 00376 (stack_maps.go:114) MOVQ "".&b+48(SP), AX
+ 0x017d 00381 (stack_maps.go:114) MOVQ AX, "".B+144(SP)
+ 0x0185 00389 (stack_maps.go:114) MOVQ "".&c+40(SP), AX
+ 0x018a 00394 (stack_maps.go:114) MOVQ AX, "".C+152(SP)
+ 0x0192 00402 (stack_maps.go:114) MOVQ "".&d+32(SP), AX
+ 0x0197 00407 (stack_maps.go:114) MOVQ AX, "".D+160(SP)
+ 0x019f 00415 (stack_maps.go:114) MOVQ "".&e+24(SP), AX
+ 0x01a4 00420 (stack_maps.go:114) MOVQ AX, "".E+168(SP)
+ 0x01ac 00428 (stack_maps.go:114) MOVQ "".&f+16(SP), AX
+ 0x01b1 00433 (stack_maps.go:114) MOVQ AX, "".F+176(SP)
+ 0x01b9 00441 (stack_maps.go:114) MOVQ DI, "".G+184(SP)
+ 0x01c1 00449 (stack_maps.go:114) MOVQ 64(SP), BP
+ 0x01c6 00454 (stack_maps.go:114) ADDQ $72, SP
+ 0x01ca 00458 (stack_maps.go:114) RET
+ 0x01cb 00459 (stack_maps.go:114) MOVQ "".g+128(SP), AX
+ 0x01d3 00467 (stack_maps.go:113) CALL runtime.gcWriteBarrier(SB)
+ 0x01d8 00472 (stack_maps.go:113) JMP 363
+ 0x01da 00474 (stack_maps.go:113) MOVQ "".f+120(SP), AX
+ 0x01df 00479 (stack_maps.go:113) CALL runtime.gcWriteBarrier(SB)
+ 0x01e4 00484 (stack_maps.go:113) JMP 321
+ 0x01e9 00489 (stack_maps.go:113) MOVQ "".e+112(SP), AX
+ 0x01ee 00494 (stack_maps.go:113) CALL runtime.gcWriteBarrier(SB)
+ 0x01f3 00499 (stack_maps.go:113) JMP 273
+ 0x01f8 00504 (stack_maps.go:113) MOVQ "".d+104(SP), AX
+ 0x01fd 00509 (stack_maps.go:113) CALL runtime.gcWriteBarrier(SB)
+ 0x0202 00514 (stack_maps.go:113) JMP 225
+ 0x0207 00519 (stack_maps.go:113) MOVQ "".c+96(SP), AX
+ 0x020c 00524 (stack_maps.go:113) CALL runtime.gcWriteBarrier(SB)
+ 0x0211 00529 (stack_maps.go:113) JMP 177
+ 0x0216 00534 (stack_maps.go:113) MOVQ "".b+88(SP), AX
+ 0x021b 00539 (stack_maps.go:113) CALL runtime.gcWriteBarrier(SB)
+ 0x0220 00544 (stack_maps.go:113) JMP 129
+ 0x0225 00549 (stack_maps.go:113) MOVQ "".a+80(SP), AX
+ 0x022a 00554 (stack_maps.go:113) CALL runtime.gcWriteBarrier(SB)
+ 0x022f 00559 (stack_maps.go:113) JMP 81
+ 0x0234 00564 (stack_maps.go:113) NOP
+ 0x0234 00564 (stack_maps.go:113) PCDATA $0, $-1
+ 0x0234 00564 (stack_maps.go:113) CALL runtime.morestack_noctxt(SB)
+ 0x0239 00569 (stack_maps.go:113) JMP 0
+ 0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 0f 86 21 dH..%....H;a...!
+ 0x0010 02 00 00 48 83 ec 48 48 89 6c 24 40 48 8d 6c 24 ...H..HH.l$@H.l$
+ 0x0020 40 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 @H......H..$....
+ 0x0030 00 48 8b 7c 24 08 48 89 7c 24 38 8b 05 00 00 00 .H.|$.H.|$8.....
+ 0x0040 00 85 c0 0f 85 dc 01 00 00 48 8b 44 24 50 48 89 .........H.D$PH.
+ 0x0050 07 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 .H......H..$....
+ 0x0060 00 48 8b 7c 24 08 48 89 7c 24 30 8b 05 00 00 00 .H.|$.H.|$0.....
+ 0x0070 00 85 c0 0f 85 9d 01 00 00 48 8b 44 24 58 48 89 .........H.D$XH.
+ 0x0080 07 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 .H......H..$....
+ 0x0090 00 48 8b 7c 24 08 48 89 7c 24 28 8b 05 00 00 00 .H.|$.H.|$(.....
+ 0x00a0 00 85 c0 0f 85 5e 01 00 00 48 8b 44 24 60 48 89 .....^...H.D$`H.
+ 0x00b0 07 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 .H......H..$....
+ 0x00c0 00 48 8b 7c 24 08 48 89 7c 24 20 8b 05 00 00 00 .H.|$.H.|$ .....
+ 0x00d0 00 85 c0 0f 85 1f 01 00 00 48 8b 44 24 68 48 89 .........H.D$hH.
+ 0x00e0 07 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 .H......H..$....
+ 0x00f0 00 8b 05 00 00 00 00 48 8b 7c 24 08 48 89 7c 24 .......H.|$.H.|$
+ 0x0100 18 85 c0 0f 85 e0 00 00 00 48 8b 44 24 70 48 89 .........H.D$pH.
+ 0x0110 07 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 .H......H..$....
+ 0x0120 00 8b 05 00 00 00 00 48 8b 7c 24 08 48 89 7c 24 .......H.|$.H.|$
+ 0x0130 10 85 c0 0f 85 a1 00 00 00 48 8b 44 24 78 48 89 .........H.D$xH.
+ 0x0140 07 48 8d 05 00 00 00 00 48 89 04 24 e8 00 00 00 .H......H..$....
+ 0x0150 00 8b 05 00 00 00 00 48 8b 7c 24 08 85 c0 75 6b .......H.|$...uk
+ 0x0160 48 8b 84 24 80 00 00 00 48 89 07 48 8b 44 24 38 H..$....H..H.D$8
+ 0x0170 48 89 84 24 88 00 00 00 48 8b 44 24 30 48 89 84 H..$....H.D$0H..
+ 0x0180 24 90 00 00 00 48 8b 44 24 28 48 89 84 24 98 00 $....H.D$(H..$..
+ 0x0190 00 00 48 8b 44 24 20 48 89 84 24 a0 00 00 00 48 ..H.D$ H..$....H
+ 0x01a0 8b 44 24 18 48 89 84 24 a8 00 00 00 48 8b 44 24 .D$.H..$....H.D$
+ 0x01b0 10 48 89 84 24 b0 00 00 00 48 89 bc 24 b8 00 00 .H..$....H..$...
+ 0x01c0 00 48 8b 6c 24 40 48 83 c4 48 c3 48 8b 84 24 80 .H.l$@H..H.H..$.
+ 0x01d0 00 00 00 e8 00 00 00 00 eb 91 48 8b 44 24 78 e8 ..........H.D$x.
+ 0x01e0 00 00 00 00 e9 58 ff ff ff 48 8b 44 24 70 e8 00 .....X...H.D$p..
+ 0x01f0 00 00 00 e9 19 ff ff ff 48 8b 44 24 68 e8 00 00 ........H.D$h...
+ 0x0200 00 00 e9 da fe ff ff 48 8b 44 24 60 e8 00 00 00 .......H.D$`....
+ 0x0210 00 e9 9b fe ff ff 48 8b 44 24 58 e8 00 00 00 00 ......H.D$X.....
+ 0x0220 e9 5c fe ff ff 48 8b 44 24 50 e8 00 00 00 00 e9 .\...H.D$P......
+ 0x0230 1d fe ff ff e8 00 00 00 00 e9 c2 fd ff ff ..............
+ rel 5+4 t=16 TLS+0
+ rel 36+4 t=15 type.*int+0
+ rel 45+4 t=8 runtime.newobject+0
+ rel 61+4 t=15 runtime.writeBarrier+0
+ rel 84+4 t=15 type.*int+0
+ rel 93+4 t=8 runtime.newobject+0
+ rel 109+4 t=15 runtime.writeBarrier+0
+ rel 132+4 t=15 type.*int+0
+ rel 141+4 t=8 runtime.newobject+0
+ rel 157+4 t=15 runtime.writeBarrier+0
+ rel 180+4 t=15 type.*int+0
+ rel 189+4 t=8 runtime.newobject+0
+ rel 205+4 t=15 runtime.writeBarrier+0
+ rel 228+4 t=15 type.*int+0
+ rel 237+4 t=8 runtime.newobject+0
+ rel 243+4 t=15 runtime.writeBarrier+0
+ rel 276+4 t=15 type.*int+0
+ rel 285+4 t=8 runtime.newobject+0
+ rel 291+4 t=15 runtime.writeBarrier+0
+ rel 324+4 t=15 type.*int+0
+ rel 333+4 t=8 runtime.newobject+0
+ rel 339+4 t=15 runtime.writeBarrier+0
+ rel 468+4 t=8 runtime.gcWriteBarrier+0
+ rel 480+4 t=8 runtime.gcWriteBarrier+0
+ rel 495+4 t=8 runtime.gcWriteBarrier+0
+ rel 510+4 t=8 runtime.gcWriteBarrier+0
+ rel 525+4 t=8 runtime.gcWriteBarrier+0
+ rel 540+4 t=8 runtime.gcWriteBarrier+0
+ rel 555+4 t=8 runtime.gcWriteBarrier+0
+ rel 565+4 t=8 runtime.morestack_noctxt+0
+"".func8_argptr8_0 STEXT nosplit size=91 args=0x48 locals=0x0
+ 0x0000 00000 (stack_maps.go:117) TEXT "".func8_argptr8_0(SB), NOSPLIT, $0-72
+ 0x0000 00000 (stack_maps.go:117) FUNCDATA $0, gclocals·24ab8eb88756bfa8a723f13ec05c8565(SB)
+ 0x0000 00000 (stack_maps.go:117) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:117) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:117) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:119) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:119) JNE 26
+ 0x000f 00015 (stack_maps.go:119) MOVL $1, AX
+ 0x0014 00020 (stack_maps.go:128) MOVQ AX, "".~r8+72(SP)
+ 0x0019 00025 (stack_maps.go:128) RET
+ 0x001a 00026 (stack_maps.go:128) MOVQ "".d+32(SP), AX
+ 0x001f 00031 (stack_maps.go:128) MOVQ "".c+24(SP), CX
+ 0x0024 00036 (stack_maps.go:121) CMPQ AX, CX
+ 0x0027 00039 (stack_maps.go:121) JNE 48
+ 0x0029 00041 (stack_maps.go:121) MOVL $1, AX
+ 0x002e 00046 (stack_maps.go:122) JMP 20
+ 0x0030 00048 (stack_maps.go:122) MOVQ "".f+48(SP), AX
+ 0x0035 00053 (stack_maps.go:122) MOVQ "".e+40(SP), CX
+ 0x003a 00058 (stack_maps.go:123) CMPQ AX, CX
+ 0x003d 00061 (stack_maps.go:123) JNE 70
+ 0x003f 00063 (stack_maps.go:123) MOVL $1, AX
+ 0x0044 00068 (stack_maps.go:124) JMP 20
+ 0x0046 00070 (stack_maps.go:124) MOVQ "".h+64(SP), CX
+ 0x004b 00075 (stack_maps.go:124) MOVQ "".g+56(SP), DX
+ 0x0050 00080 (stack_maps.go:125) CMPQ CX, DX
+ 0x0053 00083 (stack_maps.go:125) SETEQ CL
+ 0x0056 00086 (stack_maps.go:128) MOVBLZX CL, AX
+ 0x0059 00089 (stack_maps.go:128) JMP 20
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 75 0b b8 H.D$.H.L$.H9.u..
+ 0x0010 01 00 00 00 48 89 44 24 48 c3 48 8b 44 24 20 48 ....H.D$H.H.D$ H
+ 0x0020 8b 4c 24 18 48 39 c8 75 07 b8 01 00 00 00 eb e4 .L$.H9.u........
+ 0x0030 48 8b 44 24 30 48 8b 4c 24 28 48 39 c8 75 07 b8 H.D$0H.L$(H9.u..
+ 0x0040 01 00 00 00 eb ce 48 8b 4c 24 40 48 8b 54 24 38 ......H.L$@H.T$8
+ 0x0050 48 39 d1 0f 94 c1 0f b6 c1 eb b9 H9.........
+"".func31_argptr31_0 STEXT nosplit size=431 args=0x100 locals=0x0
+ 0x0000 00000 (stack_maps.go:131) TEXT "".func31_argptr31_0(SB), NOSPLIT, $0-256
+ 0x0000 00000 (stack_maps.go:131) FUNCDATA $0, gclocals·18eb108dd69ac8aded0458079b4a39ed(SB)
+ 0x0000 00000 (stack_maps.go:131) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:131) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:131) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:133) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:133) JNE 29
+ 0x000f 00015 (stack_maps.go:133) MOVL $1, AX
+ 0x0014 00020 (stack_maps.go:166) MOVQ AX, "".~r31+256(SP)
+ 0x001c 00028 (stack_maps.go:166) RET
+ 0x001d 00029 (stack_maps.go:166) MOVQ "".d+32(SP), AX
+ 0x0022 00034 (stack_maps.go:166) MOVQ "".c+24(SP), DX
+ 0x0027 00039 (stack_maps.go:135) CMPQ AX, DX
+ 0x002a 00042 (stack_maps.go:135) JNE 51
+ 0x002c 00044 (stack_maps.go:135) MOVL $1, AX
+ 0x0031 00049 (stack_maps.go:136) JMP 20
+ 0x0033 00051 (stack_maps.go:136) MOVQ "".f+48(SP), AX
+ 0x0038 00056 (stack_maps.go:136) MOVQ "".e+40(SP), DX
+ 0x003d 00061 (stack_maps.go:137) CMPQ AX, DX
+ 0x0040 00064 (stack_maps.go:137) JNE 73
+ 0x0042 00066 (stack_maps.go:137) MOVL $1, AX
+ 0x0047 00071 (stack_maps.go:138) JMP 20
+ 0x0049 00073 (stack_maps.go:138) MOVQ "".h+64(SP), AX
+ 0x004e 00078 (stack_maps.go:138) MOVQ "".g+56(SP), DX
+ 0x0053 00083 (stack_maps.go:139) CMPQ AX, DX
+ 0x0056 00086 (stack_maps.go:139) JNE 95
+ 0x0058 00088 (stack_maps.go:139) MOVL $1, AX
+ 0x005d 00093 (stack_maps.go:140) JMP 20
+ 0x005f 00095 (stack_maps.go:140) MOVQ "".j+80(SP), AX
+ 0x0064 00100 (stack_maps.go:140) MOVQ "".i+72(SP), DX
+ 0x0069 00105 (stack_maps.go:141) CMPQ AX, DX
+ 0x006c 00108 (stack_maps.go:141) JNE 117
+ 0x006e 00110 (stack_maps.go:141) MOVL $1, AX
+ 0x0073 00115 (stack_maps.go:142) JMP 20
+ 0x0075 00117 (stack_maps.go:142) MOVQ "".l+96(SP), AX
+ 0x007a 00122 (stack_maps.go:142) MOVQ "".k+88(SP), DX
+ 0x007f 00127 (stack_maps.go:143) CMPQ AX, DX
+ 0x0082 00130 (stack_maps.go:143) JNE 139
+ 0x0084 00132 (stack_maps.go:143) MOVL $1, AX
+ 0x0089 00137 (stack_maps.go:144) JMP 20
+ 0x008b 00139 (stack_maps.go:144) MOVQ "".n+112(SP), AX
+ 0x0090 00144 (stack_maps.go:144) MOVQ "".m+104(SP), DX
+ 0x0095 00149 (stack_maps.go:145) CMPQ AX, DX
+ 0x0098 00152 (stack_maps.go:145) JNE 164
+ 0x009a 00154 (stack_maps.go:145) MOVL $1, AX
+ 0x009f 00159 (stack_maps.go:146) JMP 20
+ 0x00a4 00164 (stack_maps.go:146) MOVQ "".p+128(SP), AX
+ 0x00ac 00172 (stack_maps.go:146) MOVQ "".o+120(SP), DX
+ 0x00b1 00177 (stack_maps.go:147) CMPQ AX, DX
+ 0x00b4 00180 (stack_maps.go:147) JNE 192
+ 0x00b6 00182 (stack_maps.go:147) MOVL $1, AX
+ 0x00bb 00187 (stack_maps.go:148) JMP 20
+ 0x00c0 00192 (stack_maps.go:148) MOVQ "".r+144(SP), AX
+ 0x00c8 00200 (stack_maps.go:148) MOVQ "".q+136(SP), DX
+ 0x00d0 00208 (stack_maps.go:149) CMPQ AX, DX
+ 0x00d3 00211 (stack_maps.go:149) JNE 223
+ 0x00d5 00213 (stack_maps.go:149) MOVL $1, AX
+ 0x00da 00218 (stack_maps.go:150) JMP 20
+ 0x00df 00223 (stack_maps.go:150) MOVQ "".t+160(SP), AX
+ 0x00e7 00231 (stack_maps.go:150) MOVQ "".s+152(SP), DX
+ 0x00ef 00239 (stack_maps.go:151) CMPQ AX, DX
+ 0x00f2 00242 (stack_maps.go:151) JNE 254
+ 0x00f4 00244 (stack_maps.go:151) MOVL $1, AX
+ 0x00f9 00249 (stack_maps.go:152) JMP 20
+ 0x00fe 00254 (stack_maps.go:152) MOVQ "".v+176(SP), AX
+ 0x0106 00262 (stack_maps.go:152) MOVQ "".u+168(SP), DX
+ 0x010e 00270 (stack_maps.go:153) CMPQ AX, DX
+ 0x0111 00273 (stack_maps.go:153) JNE 285
+ 0x0113 00275 (stack_maps.go:153) MOVL $1, AX
+ 0x0118 00280 (stack_maps.go:154) JMP 20
+ 0x011d 00285 (stack_maps.go:154) MOVQ "".x+192(SP), AX
+ 0x0125 00293 (stack_maps.go:154) MOVQ "".w+184(SP), DX
+ 0x012d 00301 (stack_maps.go:155) CMPQ AX, DX
+ 0x0130 00304 (stack_maps.go:155) JNE 316
+ 0x0132 00306 (stack_maps.go:155) MOVL $1, AX
+ 0x0137 00311 (stack_maps.go:156) JMP 20
+ 0x013c 00316 (stack_maps.go:156) MOVQ "".z+208(SP), AX
+ 0x0144 00324 (stack_maps.go:156) MOVQ "".y+200(SP), DX
+ 0x014c 00332 (stack_maps.go:157) CMPQ AX, DX
+ 0x014f 00335 (stack_maps.go:157) JNE 347
+ 0x0151 00337 (stack_maps.go:157) MOVL $1, AX
+ 0x0156 00342 (stack_maps.go:158) JMP 20
+ 0x015b 00347 (stack_maps.go:158) MOVQ "".ab+224(SP), AX
+ 0x0163 00355 (stack_maps.go:158) MOVQ "".aa+216(SP), DX
+ 0x016b 00363 (stack_maps.go:159) CMPQ AX, DX
+ 0x016e 00366 (stack_maps.go:159) JNE 378
+ 0x0170 00368 (stack_maps.go:159) MOVL $1, AX
+ 0x0175 00373 (stack_maps.go:160) JMP 20
+ 0x017a 00378 (stack_maps.go:160) MOVQ "".ad+240(SP), AX
+ 0x0182 00386 (stack_maps.go:160) MOVQ "".ac+232(SP), DX
+ 0x018a 00394 (stack_maps.go:161) CMPQ AX, DX
+ 0x018d 00397 (stack_maps.go:161) JNE 409
+ 0x018f 00399 (stack_maps.go:161) MOVL $1, AX
+ 0x0194 00404 (stack_maps.go:162) JMP 20
+ 0x0199 00409 (stack_maps.go:162) MOVQ "".ae+248(SP), DX
+ 0x01a1 00417 (stack_maps.go:163) CMPQ DX, CX
+ 0x01a4 00420 (stack_maps.go:163) SETEQ CL
+ 0x01a7 00423 (stack_maps.go:166) MOVBLZX CL, AX
+ 0x01aa 00426 (stack_maps.go:166) JMP 20
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 75 0e b8 H.D$.H.L$.H9.u..
+ 0x0010 01 00 00 00 48 89 84 24 00 01 00 00 c3 48 8b 44 ....H..$.....H.D
+ 0x0020 24 20 48 8b 54 24 18 48 39 d0 75 07 b8 01 00 00 $ H.T$.H9.u.....
+ 0x0030 00 eb e1 48 8b 44 24 30 48 8b 54 24 28 48 39 d0 ...H.D$0H.T$(H9.
+ 0x0040 75 07 b8 01 00 00 00 eb cb 48 8b 44 24 40 48 8b u........H.D$@H.
+ 0x0050 54 24 38 48 39 d0 75 07 b8 01 00 00 00 eb b5 48 T$8H9.u........H
+ 0x0060 8b 44 24 50 48 8b 54 24 48 48 39 d0 75 07 b8 01 .D$PH.T$HH9.u...
+ 0x0070 00 00 00 eb 9f 48 8b 44 24 60 48 8b 54 24 58 48 .....H.D$`H.T$XH
+ 0x0080 39 d0 75 07 b8 01 00 00 00 eb 89 48 8b 44 24 70 9.u........H.D$p
+ 0x0090 48 8b 54 24 68 48 39 d0 75 0a b8 01 00 00 00 e9 H.T$hH9.u.......
+ 0x00a0 70 ff ff ff 48 8b 84 24 80 00 00 00 48 8b 54 24 p...H..$....H.T$
+ 0x00b0 78 48 39 d0 75 0a b8 01 00 00 00 e9 54 ff ff ff xH9.u.......T...
+ 0x00c0 48 8b 84 24 90 00 00 00 48 8b 94 24 88 00 00 00 H..$....H..$....
+ 0x00d0 48 39 d0 75 0a b8 01 00 00 00 e9 35 ff ff ff 48 H9.u.......5...H
+ 0x00e0 8b 84 24 a0 00 00 00 48 8b 94 24 98 00 00 00 48 ..$....H..$....H
+ 0x00f0 39 d0 75 0a b8 01 00 00 00 e9 16 ff ff ff 48 8b 9.u...........H.
+ 0x0100 84 24 b0 00 00 00 48 8b 94 24 a8 00 00 00 48 39 .$....H..$....H9
+ 0x0110 d0 75 0a b8 01 00 00 00 e9 f7 fe ff ff 48 8b 84 .u...........H..
+ 0x0120 24 c0 00 00 00 48 8b 94 24 b8 00 00 00 48 39 d0 $....H..$....H9.
+ 0x0130 75 0a b8 01 00 00 00 e9 d8 fe ff ff 48 8b 84 24 u...........H..$
+ 0x0140 d0 00 00 00 48 8b 94 24 c8 00 00 00 48 39 d0 75 ....H..$....H9.u
+ 0x0150 0a b8 01 00 00 00 e9 b9 fe ff ff 48 8b 84 24 e0 ...........H..$.
+ 0x0160 00 00 00 48 8b 94 24 d8 00 00 00 48 39 d0 75 0a ...H..$....H9.u.
+ 0x0170 b8 01 00 00 00 e9 9a fe ff ff 48 8b 84 24 f0 00 ..........H..$..
+ 0x0180 00 00 48 8b 94 24 e8 00 00 00 48 39 d0 75 0a b8 ..H..$....H9.u..
+ 0x0190 01 00 00 00 e9 7b fe ff ff 48 8b 94 24 f8 00 00 .....{...H..$...
+ 0x01a0 00 48 39 ca 0f 94 c1 0f b6 c1 e9 65 fe ff ff .H9........e...
+"".func32_argptr32_0 STEXT nosplit size=439 args=0x108 locals=0x0
+ 0x0000 00000 (stack_maps.go:169) TEXT "".func32_argptr32_0(SB), NOSPLIT, $0-264
+ 0x0000 00000 (stack_maps.go:169) FUNCDATA $0, gclocals·431cd661679bfc6da2d30d11c832c73c(SB)
+ 0x0000 00000 (stack_maps.go:169) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:169) MOVQ "".b+16(SP), AX
+ 0x0005 00005 (stack_maps.go:169) MOVQ "".a+8(SP), CX
+ 0x000a 00010 (stack_maps.go:171) CMPQ AX, CX
+ 0x000d 00013 (stack_maps.go:171) JNE 29
+ 0x000f 00015 (stack_maps.go:171) MOVL $1, AX
+ 0x0014 00020 (stack_maps.go:204) MOVQ AX, "".~r32+264(SP)
+ 0x001c 00028 (stack_maps.go:204) RET
+ 0x001d 00029 (stack_maps.go:204) MOVQ "".d+32(SP), AX
+ 0x0022 00034 (stack_maps.go:204) MOVQ "".c+24(SP), CX
+ 0x0027 00039 (stack_maps.go:173) CMPQ AX, CX
+ 0x002a 00042 (stack_maps.go:173) JNE 51
+ 0x002c 00044 (stack_maps.go:173) MOVL $1, AX
+ 0x0031 00049 (stack_maps.go:174) JMP 20
+ 0x0033 00051 (stack_maps.go:174) MOVQ "".f+48(SP), AX
+ 0x0038 00056 (stack_maps.go:174) MOVQ "".e+40(SP), CX
+ 0x003d 00061 (stack_maps.go:175) CMPQ AX, CX
+ 0x0040 00064 (stack_maps.go:175) JNE 73
+ 0x0042 00066 (stack_maps.go:175) MOVL $1, AX
+ 0x0047 00071 (stack_maps.go:176) JMP 20
+ 0x0049 00073 (stack_maps.go:176) MOVQ "".h+64(SP), AX
+ 0x004e 00078 (stack_maps.go:176) MOVQ "".g+56(SP), CX
+ 0x0053 00083 (stack_maps.go:177) CMPQ AX, CX
+ 0x0056 00086 (stack_maps.go:177) JNE 95
+ 0x0058 00088 (stack_maps.go:177) MOVL $1, AX
+ 0x005d 00093 (stack_maps.go:178) JMP 20
+ 0x005f 00095 (stack_maps.go:178) MOVQ "".j+80(SP), AX
+ 0x0064 00100 (stack_maps.go:178) MOVQ "".i+72(SP), CX
+ 0x0069 00105 (stack_maps.go:179) CMPQ AX, CX
+ 0x006c 00108 (stack_maps.go:179) JNE 117
+ 0x006e 00110 (stack_maps.go:179) MOVL $1, AX
+ 0x0073 00115 (stack_maps.go:180) JMP 20
+ 0x0075 00117 (stack_maps.go:180) MOVQ "".l+96(SP), AX
+ 0x007a 00122 (stack_maps.go:180) MOVQ "".k+88(SP), CX
+ 0x007f 00127 (stack_maps.go:181) CMPQ AX, CX
+ 0x0082 00130 (stack_maps.go:181) JNE 139
+ 0x0084 00132 (stack_maps.go:181) MOVL $1, AX
+ 0x0089 00137 (stack_maps.go:182) JMP 20
+ 0x008b 00139 (stack_maps.go:182) MOVQ "".n+112(SP), AX
+ 0x0090 00144 (stack_maps.go:182) MOVQ "".m+104(SP), CX
+ 0x0095 00149 (stack_maps.go:183) CMPQ AX, CX
+ 0x0098 00152 (stack_maps.go:183) JNE 164
+ 0x009a 00154 (stack_maps.go:183) MOVL $1, AX
+ 0x009f 00159 (stack_maps.go:184) JMP 20
+ 0x00a4 00164 (stack_maps.go:184) MOVQ "".p+128(SP), AX
+ 0x00ac 00172 (stack_maps.go:184) MOVQ "".o+120(SP), CX
+ 0x00b1 00177 (stack_maps.go:185) CMPQ AX, CX
+ 0x00b4 00180 (stack_maps.go:185) JNE 192
+ 0x00b6 00182 (stack_maps.go:185) MOVL $1, AX
+ 0x00bb 00187 (stack_maps.go:186) JMP 20
+ 0x00c0 00192 (stack_maps.go:186) MOVQ "".r+144(SP), AX
+ 0x00c8 00200 (stack_maps.go:186) MOVQ "".q+136(SP), CX
+ 0x00d0 00208 (stack_maps.go:187) CMPQ AX, CX
+ 0x00d3 00211 (stack_maps.go:187) JNE 223
+ 0x00d5 00213 (stack_maps.go:187) MOVL $1, AX
+ 0x00da 00218 (stack_maps.go:188) JMP 20
+ 0x00df 00223 (stack_maps.go:188) MOVQ "".t+160(SP), AX
+ 0x00e7 00231 (stack_maps.go:188) MOVQ "".s+152(SP), CX
+ 0x00ef 00239 (stack_maps.go:189) CMPQ AX, CX
+ 0x00f2 00242 (stack_maps.go:189) JNE 254
+ 0x00f4 00244 (stack_maps.go:189) MOVL $1, AX
+ 0x00f9 00249 (stack_maps.go:190) JMP 20
+ 0x00fe 00254 (stack_maps.go:190) MOVQ "".v+176(SP), AX
+ 0x0106 00262 (stack_maps.go:190) MOVQ "".u+168(SP), CX
+ 0x010e 00270 (stack_maps.go:191) CMPQ AX, CX
+ 0x0111 00273 (stack_maps.go:191) JNE 285
+ 0x0113 00275 (stack_maps.go:191) MOVL $1, AX
+ 0x0118 00280 (stack_maps.go:192) JMP 20
+ 0x011d 00285 (stack_maps.go:192) MOVQ "".x+192(SP), AX
+ 0x0125 00293 (stack_maps.go:192) MOVQ "".w+184(SP), CX
+ 0x012d 00301 (stack_maps.go:193) CMPQ AX, CX
+ 0x0130 00304 (stack_maps.go:193) JNE 316
+ 0x0132 00306 (stack_maps.go:193) MOVL $1, AX
+ 0x0137 00311 (stack_maps.go:194) JMP 20
+ 0x013c 00316 (stack_maps.go:194) MOVQ "".z+208(SP), AX
+ 0x0144 00324 (stack_maps.go:194) MOVQ "".y+200(SP), CX
+ 0x014c 00332 (stack_maps.go:195) CMPQ AX, CX
+ 0x014f 00335 (stack_maps.go:195) JNE 347
+ 0x0151 00337 (stack_maps.go:195) MOVL $1, AX
+ 0x0156 00342 (stack_maps.go:196) JMP 20
+ 0x015b 00347 (stack_maps.go:196) MOVQ "".ab+224(SP), AX
+ 0x0163 00355 (stack_maps.go:196) MOVQ "".aa+216(SP), CX
+ 0x016b 00363 (stack_maps.go:197) CMPQ AX, CX
+ 0x016e 00366 (stack_maps.go:197) JNE 378
+ 0x0170 00368 (stack_maps.go:197) MOVL $1, AX
+ 0x0175 00373 (stack_maps.go:198) JMP 20
+ 0x017a 00378 (stack_maps.go:198) MOVQ "".ad+240(SP), AX
+ 0x0182 00386 (stack_maps.go:198) MOVQ "".ac+232(SP), CX
+ 0x018a 00394 (stack_maps.go:199) CMPQ AX, CX
+ 0x018d 00397 (stack_maps.go:199) JNE 409
+ 0x018f 00399 (stack_maps.go:199) MOVL $1, AX
+ 0x0194 00404 (stack_maps.go:200) JMP 20
+ 0x0199 00409 (stack_maps.go:200) MOVQ "".af+256(SP), CX
+ 0x01a1 00417 (stack_maps.go:200) MOVQ "".ae+248(SP), DX
+ 0x01a9 00425 (stack_maps.go:201) CMPQ CX, DX
+ 0x01ac 00428 (stack_maps.go:201) SETEQ CL
+ 0x01af 00431 (stack_maps.go:204) MOVBLZX CL, AX
+ 0x01b2 00434 (stack_maps.go:204) JMP 20
+ 0x0000 48 8b 44 24 10 48 8b 4c 24 08 48 39 c8 75 0e b8 H.D$.H.L$.H9.u..
+ 0x0010 01 00 00 00 48 89 84 24 08 01 00 00 c3 48 8b 44 ....H..$.....H.D
+ 0x0020 24 20 48 8b 4c 24 18 48 39 c8 75 07 b8 01 00 00 $ H.L$.H9.u.....
+ 0x0030 00 eb e1 48 8b 44 24 30 48 8b 4c 24 28 48 39 c8 ...H.D$0H.L$(H9.
+ 0x0040 75 07 b8 01 00 00 00 eb cb 48 8b 44 24 40 48 8b u........H.D$@H.
+ 0x0050 4c 24 38 48 39 c8 75 07 b8 01 00 00 00 eb b5 48 L$8H9.u........H
+ 0x0060 8b 44 24 50 48 8b 4c 24 48 48 39 c8 75 07 b8 01 .D$PH.L$HH9.u...
+ 0x0070 00 00 00 eb 9f 48 8b 44 24 60 48 8b 4c 24 58 48 .....H.D$`H.L$XH
+ 0x0080 39 c8 75 07 b8 01 00 00 00 eb 89 48 8b 44 24 70 9.u........H.D$p
+ 0x0090 48 8b 4c 24 68 48 39 c8 75 0a b8 01 00 00 00 e9 H.L$hH9.u.......
+ 0x00a0 70 ff ff ff 48 8b 84 24 80 00 00 00 48 8b 4c 24 p...H..$....H.L$
+ 0x00b0 78 48 39 c8 75 0a b8 01 00 00 00 e9 54 ff ff ff xH9.u.......T...
+ 0x00c0 48 8b 84 24 90 00 00 00 48 8b 8c 24 88 00 00 00 H..$....H..$....
+ 0x00d0 48 39 c8 75 0a b8 01 00 00 00 e9 35 ff ff ff 48 H9.u.......5...H
+ 0x00e0 8b 84 24 a0 00 00 00 48 8b 8c 24 98 00 00 00 48 ..$....H..$....H
+ 0x00f0 39 c8 75 0a b8 01 00 00 00 e9 16 ff ff ff 48 8b 9.u...........H.
+ 0x0100 84 24 b0 00 00 00 48 8b 8c 24 a8 00 00 00 48 39 .$....H..$....H9
+ 0x0110 c8 75 0a b8 01 00 00 00 e9 f7 fe ff ff 48 8b 84 .u...........H..
+ 0x0120 24 c0 00 00 00 48 8b 8c 24 b8 00 00 00 48 39 c8 $....H..$....H9.
+ 0x0130 75 0a b8 01 00 00 00 e9 d8 fe ff ff 48 8b 84 24 u...........H..$
+ 0x0140 d0 00 00 00 48 8b 8c 24 c8 00 00 00 48 39 c8 75 ....H..$....H9.u
+ 0x0150 0a b8 01 00 00 00 e9 b9 fe ff ff 48 8b 84 24 e0 ...........H..$.
+ 0x0160 00 00 00 48 8b 8c 24 d8 00 00 00 48 39 c8 75 0a ...H..$....H9.u.
+ 0x0170 b8 01 00 00 00 e9 9a fe ff ff 48 8b 84 24 f0 00 ..........H..$..
+ 0x0180 00 00 48 8b 8c 24 e8 00 00 00 48 39 c8 75 0a b8 ..H..$....H9.u..
+ 0x0190 01 00 00 00 e9 7b fe ff ff 48 8b 8c 24 00 01 00 .....{...H..$...
+ 0x01a0 00 48 8b 94 24 f8 00 00 00 48 39 d1 0f 94 c1 0f .H..$....H9.....
+ 0x01b0 b6 c1 e9 5d fe ff ff ...]...
+"".func1_argptr0_1 STEXT nosplit size=13 args=0x10 locals=0x0
+ 0x0000 00000 (stack_maps.go:207) TEXT "".func1_argptr0_1(SB), NOSPLIT, $0-16
+ 0x0000 00000 (stack_maps.go:207) FUNCDATA $0, gclocals·f207267fbf96a0178e8758c6e3e0ce28(SB)
+ 0x0000 00000 (stack_maps.go:207) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x0000 00000 (stack_maps.go:208) MOVQ ""._0(SB), AX
+ 0x0007 00007 (stack_maps.go:208) MOVQ AX, "".~r1+16(SP)
+ 0x000c 00012 (stack_maps.go:208) RET
+ 0x0000 48 8b 05 00 00 00 00 48 89 44 24 10 c3 H......H.D$..
+ rel 3+4 t=15 ""._0+0
+go.info."".pointer0_0 SDWARFINFO size=64
+ 0x0000 02 22 22 2e 70 6f 69 6e 74 65 72 30 5f 30 00 00 ."".pointer0_0..
+ 0x0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ................
+ 0x0020 9c 00 00 00 00 01 0e 61 00 00 19 00 00 00 00 01 .......a........
+ 0x0030 9c 0e 7e 72 31 00 01 19 00 00 00 00 02 91 08 00 ..~r1...........
+ rel 15+8 t=1 "".pointer0_0+0
+ rel 23+8 t=1 "".pointer0_0+11
+ rel 33+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 43+4 t=28 go.info.int+0
+ rel 56+4 t=28 go.info.int+0
+go.range."".pointer0_0 SDWARFRANGE size=0
+go.info."".func1_argptr1_0 SDWARFINFO size=69
+ 0x0000 02 22 22 2e 66 75 6e 63 31 5f 61 72 67 70 74 72 ."".func1_argptr
+ 0x0010 31 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 1_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 1d ............a...
+ 0x0030 00 00 00 00 01 9c 0e 7e 72 31 00 01 1d 00 00 00 .......~r1......
+ 0x0040 00 02 91 08 00 .....
+ rel 20+8 t=1 "".func1_argptr1_0+0
+ rel 28+8 t=1 "".func1_argptr1_0+37
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 61+4 t=28 go.info.int+0
+go.range."".func1_argptr1_0 SDWARFRANGE size=0
+go.info."".func2_argptr2_0 SDWARFINFO size=81
+ 0x0000 02 22 22 2e 66 75 6e 63 32 5f 61 72 67 70 74 72 ."".func2_argptr
+ 0x0010 32 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 2_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 25 ............a..%
+ 0x0030 00 00 00 00 01 9c 0e 62 00 00 25 00 00 00 00 02 .......b..%.....
+ 0x0040 91 08 0e 7e 72 32 00 01 25 00 00 00 00 02 91 10 ...~r2..%.......
+ 0x0050 00 .
+ rel 20+8 t=1 "".func2_argptr2_0+0
+ rel 28+8 t=1 "".func2_argptr2_0+25
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 59+4 t=28 go.info.*int+0
+ rel 73+4 t=28 go.info.int+0
+go.range."".func2_argptr2_0 SDWARFRANGE size=0
+go.info."".func2_argptr2_2 SDWARFINFO size=103
+ 0x0000 02 22 22 2e 66 75 6e 63 32 5f 61 72 67 70 74 72 ."".func2_argptr
+ 0x0010 32 5f 32 00 00 00 00 00 00 00 00 00 00 00 00 00 2_2.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 09 26 61 00 2d ............&a.-
+ 0x0030 00 00 00 00 02 91 68 0e 41 00 01 2d 00 00 00 00 ......h.A..-....
+ 0x0040 02 91 10 0e 42 00 01 2d 00 00 00 00 02 91 18 0e ....B..-........
+ 0x0050 61 00 00 2d 00 00 00 00 01 9c 0e 62 00 00 2d 00 a..-.......b..-.
+ 0x0060 00 00 00 02 91 08 00 .......
+ rel 20+8 t=1 "".func2_argptr2_2+0
+ rel 28+8 t=1 "".func2_argptr2_2+175
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.**int+0
+ rel 60+4 t=28 go.info.**int+0
+ rel 72+4 t=28 go.info.**int+0
+ rel 84+4 t=28 go.info.*int+0
+ rel 95+4 t=28 go.info.*int+0
+go.range."".func2_argptr2_2 SDWARFRANGE size=0
+go.info."".func3_argptr3_0 SDWARFINFO size=93
+ 0x0000 02 22 22 2e 66 75 6e 63 33 5f 61 72 67 70 74 72 ."".func3_argptr
+ 0x0010 33 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 3_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 31 ............a..1
+ 0x0030 00 00 00 00 01 9c 0e 62 00 00 31 00 00 00 00 02 .......b..1.....
+ 0x0040 91 08 0e 63 00 00 31 00 00 00 00 02 91 10 0e 7e ...c..1........~
+ 0x0050 72 33 00 01 31 00 00 00 00 02 91 18 00 r3..1........
+ rel 20+8 t=1 "".func3_argptr3_0+0
+ rel 28+8 t=1 "".func3_argptr3_0+44
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 59+4 t=28 go.info.*int+0
+ rel 71+4 t=28 go.info.*int+0
+ rel 85+4 t=28 go.info.int+0
+go.range."".func3_argptr3_0 SDWARFRANGE size=0
+go.info."".func3_argptr3_3 SDWARFINFO size=115
+ 0x0000 02 22 22 2e 66 75 6e 63 33 5f 61 72 67 70 74 72 ."".func3_argptr
+ 0x0010 33 5f 33 00 00 00 00 00 00 00 00 00 00 00 00 00 3_3.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 41 00 01 3c ............A..<
+ 0x0030 00 00 00 00 02 91 18 0e 42 00 01 3c 00 00 00 00 ........B..<....
+ 0x0040 02 91 20 0e 43 00 01 3c 00 00 00 00 02 91 28 0e .. .C..<......(.
+ 0x0050 61 00 00 3c 00 00 00 00 01 9c 0e 62 00 00 3c 00 a..<.......b..<.
+ 0x0060 00 00 00 02 91 08 0e 63 00 00 3c 00 00 00 00 02 .......c..<.....
+ 0x0070 91 10 00 ...
+ rel 20+8 t=1 "".func3_argptr3_3+0
+ rel 28+8 t=1 "".func3_argptr3_3+28
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 60+4 t=28 go.info.*int+0
+ rel 72+4 t=28 go.info.*int+0
+ rel 84+4 t=28 go.info.*int+0
+ rel 95+4 t=28 go.info.*int+0
+ rel 107+4 t=28 go.info.*int+0
+go.range."".func3_argptr3_3 SDWARFRANGE size=0
+go.info."".func4_argptr4_0 SDWARFINFO size=105
+ 0x0000 02 22 22 2e 66 75 6e 63 34 5f 61 72 67 70 74 72 ."".func4_argptr
+ 0x0010 34 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 4_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 42 ............a..B
+ 0x0030 00 00 00 00 01 9c 0e 62 00 00 42 00 00 00 00 02 .......b..B.....
+ 0x0040 91 08 0e 63 00 00 42 00 00 00 00 02 91 10 0e 64 ...c..B........d
+ 0x0050 00 00 42 00 00 00 00 02 91 18 0e 7e 72 34 00 01 ..B........~r4..
+ 0x0060 42 00 00 00 00 02 91 20 00 B...... .
+ rel 20+8 t=1 "".func4_argptr4_0+0
+ rel 28+8 t=1 "".func4_argptr4_0+43
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 59+4 t=28 go.info.*int+0
+ rel 71+4 t=28 go.info.*int+0
+ rel 83+4 t=28 go.info.*int+0
+ rel 97+4 t=28 go.info.int+0
+go.range."".func4_argptr4_0 SDWARFRANGE size=0
+go.info."".func5_argptr5_0 SDWARFINFO size=117
+ 0x0000 02 22 22 2e 66 75 6e 63 35 5f 61 72 67 70 74 72 ."".func5_argptr
+ 0x0010 35 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 5_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 4d ............a..M
+ 0x0030 00 00 00 00 01 9c 0e 62 00 00 4d 00 00 00 00 02 .......b..M.....
+ 0x0040 91 08 0e 63 00 00 4d 00 00 00 00 02 91 10 0e 64 ...c..M........d
+ 0x0050 00 00 4d 00 00 00 00 02 91 18 0e 65 00 00 4d 00 ..M........e..M.
+ 0x0060 00 00 00 02 91 20 0e 7e 72 35 00 01 4d 00 00 00 ..... .~r5..M...
+ 0x0070 00 02 91 28 00 ...(.
+ rel 20+8 t=1 "".func5_argptr5_0+0
+ rel 28+8 t=1 "".func5_argptr5_0+47
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 59+4 t=28 go.info.*int+0
+ rel 71+4 t=28 go.info.*int+0
+ rel 83+4 t=28 go.info.*int+0
+ rel 95+4 t=28 go.info.*int+0
+ rel 109+4 t=28 go.info.int+0
+go.range."".func5_argptr5_0 SDWARFRANGE size=0
+go.info."".func5_argptr0_0 SDWARFINFO size=117
+ 0x0000 02 22 22 2e 66 75 6e 63 35 5f 61 72 67 70 74 72 ."".func5_argptr
+ 0x0010 30 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 0_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 57 ............a..W
+ 0x0030 00 00 00 00 01 9c 0e 62 00 00 57 00 00 00 00 02 .......b..W.....
+ 0x0040 91 08 0e 63 00 00 57 00 00 00 00 02 91 10 0e 64 ...c..W........d
+ 0x0050 00 00 57 00 00 00 00 02 91 18 0e 65 00 00 57 00 ..W........e..W.
+ 0x0060 00 00 00 02 91 20 0e 7e 72 35 00 01 57 00 00 00 ..... .~r5..W...
+ 0x0070 00 02 91 28 00 ...(.
+ rel 20+8 t=1 "".func5_argptr0_0+0
+ rel 28+8 t=1 "".func5_argptr0_0+64
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.int+0
+ rel 59+4 t=28 go.info.int+0
+ rel 71+4 t=28 go.info.int+0
+ rel 83+4 t=28 go.info.int+0
+ rel 95+4 t=28 go.info.int+0
+ rel 109+4 t=28 go.info.int+0
+go.range."".func5_argptr0_0 SDWARFRANGE size=0
+go.info."".func7_argptr7_0 SDWARFINFO size=141
+ 0x0000 02 22 22 2e 66 75 6e 63 37 5f 61 72 67 70 74 72 ."".func7_argptr
+ 0x0010 37 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 7_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 63 ............a..c
+ 0x0030 00 00 00 00 01 9c 0e 62 00 00 63 00 00 00 00 02 .......b..c.....
+ 0x0040 91 08 0e 63 00 00 63 00 00 00 00 02 91 10 0e 64 ...c..c........d
+ 0x0050 00 00 63 00 00 00 00 02 91 18 0e 65 00 00 63 00 ..c........e..c.
+ 0x0060 00 00 00 02 91 20 0e 66 00 00 63 00 00 00 00 02 ..... .f..c.....
+ 0x0070 91 28 0e 67 00 00 63 00 00 00 00 02 91 30 0e 7e .(.g..c......0.~
+ 0x0080 72 37 00 01 63 00 00 00 00 02 91 38 00 r7..c......8.
+ rel 20+8 t=1 "".func7_argptr7_0+0
+ rel 28+8 t=1 "".func7_argptr7_0+86
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 59+4 t=28 go.info.*int+0
+ rel 71+4 t=28 go.info.*int+0
+ rel 83+4 t=28 go.info.*int+0
+ rel 95+4 t=28 go.info.*int+0
+ rel 107+4 t=28 go.info.*int+0
+ rel 119+4 t=28 go.info.*int+0
+ rel 133+4 t=28 go.info.int+0
+go.range."".func7_argptr7_0 SDWARFRANGE size=0
+go.info."".func7_argptr7_7 SDWARFINFO size=289
+ 0x0000 02 22 22 2e 66 75 6e 63 37 5f 61 72 67 70 74 72 ."".func7_argptr
+ 0x0010 37 5f 37 00 00 00 00 00 00 00 00 00 00 00 00 00 7_7.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 09 26 61 00 71 ............&a.q
+ 0x0030 00 00 00 00 02 91 68 09 26 62 00 71 00 00 00 00 ......h.&b.q....
+ 0x0040 02 91 60 09 26 63 00 71 00 00 00 00 02 91 58 09 ..`.&c.q......X.
+ 0x0050 26 64 00 71 00 00 00 00 02 91 50 09 26 65 00 71 &d.q......P.&e.q
+ 0x0060 00 00 00 00 02 91 48 09 26 66 00 71 00 00 00 00 ......H.&f.q....
+ 0x0070 02 91 40 0e 41 00 01 71 00 00 00 00 02 91 38 0e ..@.A..q......8.
+ 0x0080 42 00 01 71 00 00 00 00 03 91 c0 00 0e 43 00 01 B..q.........C..
+ 0x0090 71 00 00 00 00 03 91 c8 00 0e 44 00 01 71 00 00 q.........D..q..
+ 0x00a0 00 00 03 91 d0 00 0e 45 00 01 71 00 00 00 00 03 .......E..q.....
+ 0x00b0 91 d8 00 0e 46 00 01 71 00 00 00 00 03 91 e0 00 ....F..q........
+ 0x00c0 0e 47 00 01 71 00 00 00 00 03 91 e8 00 0e 61 00 .G..q.........a.
+ 0x00d0 00 71 00 00 00 00 01 9c 0e 62 00 00 71 00 00 00 .q.......b..q...
+ 0x00e0 00 02 91 08 0e 63 00 00 71 00 00 00 00 02 91 10 .....c..q.......
+ 0x00f0 0e 64 00 00 71 00 00 00 00 02 91 18 0e 65 00 00 .d..q........e..
+ 0x0100 71 00 00 00 00 02 91 20 0e 66 00 00 71 00 00 00 q...... .f..q...
+ 0x0110 00 02 91 28 0e 67 00 00 71 00 00 00 00 02 91 30 ...(.g..q......0
+ 0x0120 00 .
+ rel 20+8 t=1 "".func7_argptr7_7+0
+ rel 28+8 t=1 "".func7_argptr7_7+574
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.**int+0
+ rel 60+4 t=28 go.info.**int+0
+ rel 72+4 t=28 go.info.**int+0
+ rel 84+4 t=28 go.info.**int+0
+ rel 96+4 t=28 go.info.**int+0
+ rel 108+4 t=28 go.info.**int+0
+ rel 120+4 t=28 go.info.**int+0
+ rel 132+4 t=28 go.info.**int+0
+ rel 145+4 t=28 go.info.**int+0
+ rel 158+4 t=28 go.info.**int+0
+ rel 171+4 t=28 go.info.**int+0
+ rel 184+4 t=28 go.info.**int+0
+ rel 197+4 t=28 go.info.**int+0
+ rel 210+4 t=28 go.info.*int+0
+ rel 221+4 t=28 go.info.*int+0
+ rel 233+4 t=28 go.info.*int+0
+ rel 245+4 t=28 go.info.*int+0
+ rel 257+4 t=28 go.info.*int+0
+ rel 269+4 t=28 go.info.*int+0
+ rel 281+4 t=28 go.info.*int+0
+go.range."".func7_argptr7_7 SDWARFRANGE size=0
+go.info."".func8_argptr8_0 SDWARFINFO size=154
+ 0x0000 02 22 22 2e 66 75 6e 63 38 5f 61 72 67 70 74 72 ."".func8_argptr
+ 0x0010 38 5f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 8_0.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 75 ............a..u
+ 0x0030 00 00 00 00 01 9c 0e 62 00 00 75 00 00 00 00 02 .......b..u.....
+ 0x0040 91 08 0e 63 00 00 75 00 00 00 00 02 91 10 0e 64 ...c..u........d
+ 0x0050 00 00 75 00 00 00 00 02 91 18 0e 65 00 00 75 00 ..u........e..u.
+ 0x0060 00 00 00 02 91 20 0e 66 00 00 75 00 00 00 00 02 ..... .f..u.....
+ 0x0070 91 28 0e 67 00 00 75 00 00 00 00 02 91 30 0e 68 .(.g..u......0.h
+ 0x0080 00 00 75 00 00 00 00 02 91 38 0e 7e 72 38 00 01 ..u......8.~r8..
+ 0x0090 75 00 00 00 00 03 91 c0 00 00 u.........
+ rel 20+8 t=1 "".func8_argptr8_0+0
+ rel 28+8 t=1 "".func8_argptr8_0+91
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 48+4 t=28 go.info.*int+0
+ rel 59+4 t=28 go.info.*int+0
+ rel 71+4 t=28 go.info.*int+0
+ rel 83+4 t=28 go.info.*int+0
+ rel 95+4 t=28 go.info.*int+0
+ rel 107+4 t=28 go.info.*int+0
+ rel 119+4 t=28 go.info.*int+0
+ rel 131+4 t=28 go.info.*int+0
+ rel 145+4 t=28 go.info.int+0
+go.range."".func8_argptr8_0 SDWARFRANGE size=0
+go.info."".func31_argptr31_0 SDWARFINFO size=493
+ 0x0000 02 22 22 2e 66 75 6e 63 33 31 5f 61 72 67 70 74 ."".func31_argpt
+ 0x0010 72 33 31 5f 30 00 00 00 00 00 00 00 00 00 00 00 r31_0...........
+ 0x0020 00 00 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 ..............a.
+ 0x0030 00 83 01 00 00 00 00 01 9c 0e 61 61 00 00 83 01 ..........aa....
+ 0x0040 00 00 00 00 03 91 d0 01 0e 61 62 00 00 83 01 00 .........ab.....
+ 0x0050 00 00 00 03 91 d8 01 0e 61 63 00 00 83 01 00 00 ........ac......
+ 0x0060 00 00 03 91 e0 01 0e 61 64 00 00 83 01 00 00 00 .......ad.......
+ 0x0070 00 03 91 e8 01 0e 61 65 00 00 83 01 00 00 00 00 ......ae........
+ 0x0080 03 91 f0 01 0e 62 00 00 83 01 00 00 00 00 02 91 .....b..........
+ 0x0090 08 0e 63 00 00 83 01 00 00 00 00 02 91 10 0e 64 ..c............d
+ 0x00a0 00 00 83 01 00 00 00 00 02 91 18 0e 65 00 00 83 ............e...
+ 0x00b0 01 00 00 00 00 02 91 20 0e 66 00 00 83 01 00 00 ....... .f......
+ 0x00c0 00 00 02 91 28 0e 67 00 00 83 01 00 00 00 00 02 ....(.g.........
+ 0x00d0 91 30 0e 68 00 00 83 01 00 00 00 00 02 91 38 0e .0.h..........8.
+ 0x00e0 69 00 00 83 01 00 00 00 00 03 91 c0 00 0e 6a 00 i.............j.
+ 0x00f0 00 83 01 00 00 00 00 03 91 c8 00 0e 6b 00 00 83 ............k...
+ 0x0100 01 00 00 00 00 03 91 d0 00 0e 6c 00 00 83 01 00 ..........l.....
+ 0x0110 00 00 00 03 91 d8 00 0e 6d 00 00 83 01 00 00 00 ........m.......
+ 0x0120 00 03 91 e0 00 0e 6e 00 00 83 01 00 00 00 00 03 ......n.........
+ 0x0130 91 e8 00 0e 6f 00 00 83 01 00 00 00 00 03 91 f0 ....o...........
+ 0x0140 00 0e 70 00 00 83 01 00 00 00 00 03 91 f8 00 0e ..p.............
+ 0x0150 71 00 00 83 01 00 00 00 00 03 91 80 01 0e 72 00 q.............r.
+ 0x0160 00 83 01 00 00 00 00 03 91 88 01 0e 73 00 00 83 ............s...
+ 0x0170 01 00 00 00 00 03 91 90 01 0e 74 00 00 83 01 00 ..........t.....
+ 0x0180 00 00 00 03 91 98 01 0e 75 00 00 83 01 00 00 00 ........u.......
+ 0x0190 00 03 91 a0 01 0e 76 00 00 83 01 00 00 00 00 03 ......v.........
+ 0x01a0 91 a8 01 0e 77 00 00 83 01 00 00 00 00 03 91 b0 ....w...........
+ 0x01b0 01 0e 78 00 00 83 01 00 00 00 00 03 91 b8 01 0e ..x.............
+ 0x01c0 79 00 00 83 01 00 00 00 00 03 91 c0 01 0e 7a 00 y.............z.
+ 0x01d0 00 83 01 00 00 00 00 03 91 c8 01 0e 7e 72 33 31 ............~r31
+ 0x01e0 00 01 83 01 00 00 00 00 03 91 f8 01 00 .............
+ rel 22+8 t=1 "".func31_argptr31_0+0
+ rel 30+8 t=1 "".func31_argptr31_0+431
+ rel 40+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 51+4 t=28 go.info.*int+0
+ rel 64+4 t=28 go.info.*int+0
+ rel 79+4 t=28 go.info.*int+0
+ rel 94+4 t=28 go.info.*int+0
+ rel 109+4 t=28 go.info.*int+0
+ rel 124+4 t=28 go.info.*int+0
+ rel 138+4 t=28 go.info.*int+0
+ rel 151+4 t=28 go.info.*int+0
+ rel 164+4 t=28 go.info.*int+0
+ rel 177+4 t=28 go.info.*int+0
+ rel 190+4 t=28 go.info.*int+0
+ rel 203+4 t=28 go.info.*int+0
+ rel 216+4 t=28 go.info.*int+0
+ rel 229+4 t=28 go.info.*int+0
+ rel 243+4 t=28 go.info.*int+0
+ rel 257+4 t=28 go.info.*int+0
+ rel 271+4 t=28 go.info.*int+0
+ rel 285+4 t=28 go.info.*int+0
+ rel 299+4 t=28 go.info.*int+0
+ rel 313+4 t=28 go.info.*int+0
+ rel 327+4 t=28 go.info.*int+0
+ rel 341+4 t=28 go.info.*int+0
+ rel 355+4 t=28 go.info.*int+0
+ rel 369+4 t=28 go.info.*int+0
+ rel 383+4 t=28 go.info.*int+0
+ rel 397+4 t=28 go.info.*int+0
+ rel 411+4 t=28 go.info.*int+0
+ rel 425+4 t=28 go.info.*int+0
+ rel 439+4 t=28 go.info.*int+0
+ rel 453+4 t=28 go.info.*int+0
+ rel 467+4 t=28 go.info.*int+0
+ rel 484+4 t=28 go.info.int+0
+go.range."".func31_argptr31_0 SDWARFRANGE size=0
+go.info."".func32_argptr32_0 SDWARFINFO size=508
+ 0x0000 02 22 22 2e 66 75 6e 63 33 32 5f 61 72 67 70 74 ."".func32_argpt
+ 0x0010 72 33 32 5f 30 00 00 00 00 00 00 00 00 00 00 00 r32_0...........
+ 0x0020 00 00 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 ..............a.
+ 0x0030 00 a9 01 00 00 00 00 01 9c 0e 61 61 00 00 a9 01 ..........aa....
+ 0x0040 00 00 00 00 03 91 d0 01 0e 61 62 00 00 a9 01 00 .........ab.....
+ 0x0050 00 00 00 03 91 d8 01 0e 61 63 00 00 a9 01 00 00 ........ac......
+ 0x0060 00 00 03 91 e0 01 0e 61 64 00 00 a9 01 00 00 00 .......ad.......
+ 0x0070 00 03 91 e8 01 0e 61 65 00 00 a9 01 00 00 00 00 ......ae........
+ 0x0080 03 91 f0 01 0e 61 66 00 00 a9 01 00 00 00 00 03 .....af.........
+ 0x0090 91 f8 01 0e 62 00 00 a9 01 00 00 00 00 02 91 08 ....b...........
+ 0x00a0 0e 63 00 00 a9 01 00 00 00 00 02 91 10 0e 64 00 .c............d.
+ 0x00b0 00 a9 01 00 00 00 00 02 91 18 0e 65 00 00 a9 01 ...........e....
+ 0x00c0 00 00 00 00 02 91 20 0e 66 00 00 a9 01 00 00 00 ...... .f.......
+ 0x00d0 00 02 91 28 0e 67 00 00 a9 01 00 00 00 00 02 91 ...(.g..........
+ 0x00e0 30 0e 68 00 00 a9 01 00 00 00 00 02 91 38 0e 69 0.h..........8.i
+ 0x00f0 00 00 a9 01 00 00 00 00 03 91 c0 00 0e 6a 00 00 .............j..
+ 0x0100 a9 01 00 00 00 00 03 91 c8 00 0e 6b 00 00 a9 01 ...........k....
+ 0x0110 00 00 00 00 03 91 d0 00 0e 6c 00 00 a9 01 00 00 .........l......
+ 0x0120 00 00 03 91 d8 00 0e 6d 00 00 a9 01 00 00 00 00 .......m........
+ 0x0130 03 91 e0 00 0e 6e 00 00 a9 01 00 00 00 00 03 91 .....n..........
+ 0x0140 e8 00 0e 6f 00 00 a9 01 00 00 00 00 03 91 f0 00 ...o............
+ 0x0150 0e 70 00 00 a9 01 00 00 00 00 03 91 f8 00 0e 71 .p.............q
+ 0x0160 00 00 a9 01 00 00 00 00 03 91 80 01 0e 72 00 00 .............r..
+ 0x0170 a9 01 00 00 00 00 03 91 88 01 0e 73 00 00 a9 01 ...........s....
+ 0x0180 00 00 00 00 03 91 90 01 0e 74 00 00 a9 01 00 00 .........t......
+ 0x0190 00 00 03 91 98 01 0e 75 00 00 a9 01 00 00 00 00 .......u........
+ 0x01a0 03 91 a0 01 0e 76 00 00 a9 01 00 00 00 00 03 91 .....v..........
+ 0x01b0 a8 01 0e 77 00 00 a9 01 00 00 00 00 03 91 b0 01 ...w............
+ 0x01c0 0e 78 00 00 a9 01 00 00 00 00 03 91 b8 01 0e 79 .x.............y
+ 0x01d0 00 00 a9 01 00 00 00 00 03 91 c0 01 0e 7a 00 00 .............z..
+ 0x01e0 a9 01 00 00 00 00 03 91 c8 01 0e 7e 72 33 32 00 ...........~r32.
+ 0x01f0 01 a9 01 00 00 00 00 03 91 80 02 00 ............
+ rel 22+8 t=1 "".func32_argptr32_0+0
+ rel 30+8 t=1 "".func32_argptr32_0+439
+ rel 40+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 51+4 t=28 go.info.*int+0
+ rel 64+4 t=28 go.info.*int+0
+ rel 79+4 t=28 go.info.*int+0
+ rel 94+4 t=28 go.info.*int+0
+ rel 109+4 t=28 go.info.*int+0
+ rel 124+4 t=28 go.info.*int+0
+ rel 139+4 t=28 go.info.*int+0
+ rel 153+4 t=28 go.info.*int+0
+ rel 166+4 t=28 go.info.*int+0
+ rel 179+4 t=28 go.info.*int+0
+ rel 192+4 t=28 go.info.*int+0
+ rel 205+4 t=28 go.info.*int+0
+ rel 218+4 t=28 go.info.*int+0
+ rel 231+4 t=28 go.info.*int+0
+ rel 244+4 t=28 go.info.*int+0
+ rel 258+4 t=28 go.info.*int+0
+ rel 272+4 t=28 go.info.*int+0
+ rel 286+4 t=28 go.info.*int+0
+ rel 300+4 t=28 go.info.*int+0
+ rel 314+4 t=28 go.info.*int+0
+ rel 328+4 t=28 go.info.*int+0
+ rel 342+4 t=28 go.info.*int+0
+ rel 356+4 t=28 go.info.*int+0
+ rel 370+4 t=28 go.info.*int+0
+ rel 384+4 t=28 go.info.*int+0
+ rel 398+4 t=28 go.info.*int+0
+ rel 412+4 t=28 go.info.*int+0
+ rel 426+4 t=28 go.info.*int+0
+ rel 440+4 t=28 go.info.*int+0
+ rel 454+4 t=28 go.info.*int+0
+ rel 468+4 t=28 go.info.*int+0
+ rel 482+4 t=28 go.info.*int+0
+ rel 499+4 t=28 go.info.int+0
+go.range."".func32_argptr32_0 SDWARFRANGE size=0
+go.info."".func1_argptr0_1 SDWARFINFO size=71
+ 0x0000 02 22 22 2e 66 75 6e 63 31 5f 61 72 67 70 74 72 ."".func1_argptr
+ 0x0010 30 5f 31 00 00 00 00 00 00 00 00 00 00 00 00 00 0_1.............
+ 0x0020 00 00 00 00 01 9c 00 00 00 00 01 0e 61 00 00 cf ............a...
+ 0x0030 01 00 00 00 00 01 9c 0e 7e 72 31 00 01 cf 01 00 ........~r1.....
+ 0x0040 00 00 00 02 91 08 00 .......
+ rel 20+8 t=1 "".func1_argptr0_1+0
+ rel 28+8 t=1 "".func1_argptr0_1+13
+ rel 38+4 t=29 gofile../home/max/my/gomacro/jit/stack_maps/stack_maps.go+0
+ rel 49+4 t=28 go.info.int+0
+ rel 63+4 t=28 go.info.*int+0
+go.range."".func1_argptr0_1 SDWARFRANGE size=0
+""._0 SBSS size=8
+runtime.gcbits.01 SRODATA dupok size=1
+ 0x0000 01 .
+type..namedata.**int- SRODATA dupok size=8
+ 0x0000 00 00 05 2a 2a 69 6e 74 ...**int
+type.**int SRODATA dupok size=56
+ 0x0000 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ................
+ 0x0010 75 9c 95 05 00 08 08 36 00 00 00 00 00 00 00 00 u......6........
+ 0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0x0030 00 00 00 00 00 00 00 00 ........
+ rel 24+8 t=1 runtime.algarray+80
+ rel 32+8 t=1 runtime.gcbits.01+0
+ rel 40+4 t=5 type..namedata.**int-+0
+ rel 48+8 t=1 type.*int+0
+type..importpath.unsafe. SRODATA dupok size=9
+ 0x0000 00 00 06 75 6e 73 61 66 65 ...unsafe
+gclocals·f207267fbf96a0178e8758c6e3e0ce28 SRODATA dupok size=9
+ 0x0000 01 00 00 00 02 00 00 00 00 .........
+gclocals·33cdeccccebe80329f1fdbee7f5874cb SRODATA dupok size=8
+ 0x0000 01 00 00 00 00 00 00 00 ........
+gclocals·aef1f7ba6e2630c93a51843d99f5a28a SRODATA dupok size=9
+ 0x0000 01 00 00 00 02 00 00 00 01 .........
+gclocals·8f9cec06d1ae35cc9900c511c5e4bdab SRODATA dupok size=9
+ 0x0000 01 00 00 00 03 00 00 00 03 .........
+gclocals·d7e90e31b8caf40b4a816bc6493d0278 SRODATA dupok size=10
+ 0x0000 02 00 00 00 04 00 00 00 03 02 ..........
+gclocals·9fb7f0986f647f17cb53dda1484e0f7a SRODATA dupok size=10
+ 0x0000 02 00 00 00 01 00 00 00 00 01 ..........
+gclocals·41e09b51c5c69a07e9cde7306b03f8c0 SRODATA dupok size=9
+ 0x0000 01 00 00 00 04 00 00 00 07 .........
+gclocals·26c19b003b4032a46d3e8db29831f3fe SRODATA dupok size=9
+ 0x0000 01 00 00 00 06 00 00 00 00 .........
+gclocals·1796f354e2ee64b72a4c7c668a1a7161 SRODATA dupok size=9
+ 0x0000 01 00 00 00 05 00 00 00 0f .........
+gclocals·e47c75ed031dcaac5b24e58ca743f6ee SRODATA dupok size=9
+ 0x0000 01 00 00 00 06 00 00 00 0f .........
+gclocals·e5f9455b7f339e9e2483020ccff91f2a SRODATA dupok size=9
+ 0x0000 01 00 00 00 08 00 00 00 7f .........
+gclocals·1ffc4335e650bddd934df7eed5367235 SRODATA dupok size=22
+ 0x0000 07 00 00 00 0e 00 00 00 7f 00 7e 00 7c 00 78 00 ..........~.|.x.
+ 0x0010 70 00 60 00 40 00 p.`.@.
+gclocals·b88d212e1dddf05b11066db7e199ff36 SRODATA dupok size=15
+ 0x0000 07 00 00 00 06 00 00 00 00 20 30 38 3c 3e 3f ......... 08<>?
+gclocals·24ab8eb88756bfa8a723f13ec05c8565 SRODATA dupok size=10
+ 0x0000 01 00 00 00 09 00 00 00 ff 00 ..........
+gclocals·18eb108dd69ac8aded0458079b4a39ed SRODATA dupok size=12
+ 0x0000 01 00 00 00 20 00 00 00 ff ff ff 7f .... .......
+gclocals·431cd661679bfc6da2d30d11c832c73c SRODATA dupok size=13
+ 0x0000 01 00 00 00 21 00 00 00 ff ff ff ff 00 ....!........
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/z_test.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/z_test.go
new file mode 100644
index 0000000..e421d91
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/stack_maps/z_test.go
@@ -0,0 +1,27 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * fib_asm.go
+ *
+ * Created on May 23, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package stack_maps
+
+import "testing"
+
+func TestFib(t *testing.T) {
+ const in = 10
+ out1, out2 := fib(in), fib_asm(in)
+ if out1 != out2 {
+ t.Errorf("fib_asm(%d) = %d, expecting %d", in, out2, out1)
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_dummy.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_dummy.go
new file mode 100644
index 0000000..2907083
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_dummy.go
@@ -0,0 +1,26 @@
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!windows
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * sys_dummy.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+func nop(*uint64) {
+}
+
+func (asm *Asm) Func() func(*uint64) {
+ return nop
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_unix.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_unix.go
new file mode 100644
index 0000000..2bf26b4
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_unix.go
@@ -0,0 +1,64 @@
+// +build darwin dragonfly freebsd linux netbsd openbsd
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * sys_unix.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import (
+ "fmt"
+ "unsafe"
+
+ "golang.org/x/sys/unix"
+)
+
+var PAGESIZE = unix.Getpagesize()
+
+func nop(*uint64) {
+}
+
+func (asm *Asm) Func() func(*uint64) {
+ if len(asm.code) == 0 {
+ return nop
+ }
+ asm.epilogue()
+ if VERBOSE {
+ fmt.Printf("asm: %#v\n", asm.code)
+ }
+ mem, err := unix.Mmap(-1, 0, (len(asm.code)+PAGESIZE-1)&^(PAGESIZE-1),
+ unix.PROT_READ|unix.PROT_WRITE, unix.MAP_ANON|unix.MAP_PRIVATE)
+ if err != nil {
+ errorf("sys/unix.Mmap failed: %v", err)
+ }
+ copy(mem, asm.code)
+ err = unix.Mprotect(mem, unix.PROT_EXEC|unix.PROT_READ)
+ if err != nil {
+ unix.Munmap(mem)
+ errorf("sys/unix.Mprotect failed: %v", err)
+ }
+ var f func(*uint64)
+ *(**[]uint8)(unsafe.Pointer(&f)) = &mem
+ // runtime.SetFinalizer(&f, munmap)
+ return f
+}
+
+func munmap(obj interface{}) {
+ f, ok := obj.(func(*uint64))
+ if ok && f != nil {
+ mem := **(**[]uint8)(unsafe.Pointer(&f))
+ unix.Munmap(mem)
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_windows.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_windows.go
new file mode 100644
index 0000000..30d8c15
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/sys_windows.go
@@ -0,0 +1,76 @@
+// +build windows
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * sys_windows.go
+ *
+ * Created on May 25, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import (
+ "fmt"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var PAGESIZE = windows.Getpagesize()
+
+type memarea struct {
+ addr, size uintptr
+}
+
+func nop(*uint64) {
+}
+
+func (asm *Asm) Func() func(*uint64) {
+ if len(asm.code) == 0 {
+ return nop
+ }
+ asm.epilogue()
+ if VERBOSE {
+ fmt.Printf("asm: %#v\n", asm.code)
+ }
+ size := uintptr((len(asm.code) + PAGESIZE - 1) &^ (PAGESIZE - 1))
+ mem, err := windows.VirtualAlloc(0, size, windows.MEM_COMMIT|windows.MEM_RESERVE, windows.PAGE_READWRITE)
+ if err != nil {
+ errorf("sys/windows.VirtualAlloc failed: %v", err)
+ }
+ memcpy(mem, uintptr(unsafe.Pointer(&asm.code[0])), size)
+ var old uint32
+ err = windows.VirtualProtect(mem, size, windows.PAGE_EXECUTE_READ, &old)
+ if err != nil {
+ windows.VirtualFree(mem, 0, windows.MEM_RELEASE)
+ errorf("sys/windows.VirtualProtect failed: %v", err)
+ }
+ var f func(*uint64)
+ *(**memarea)(unsafe.Pointer(&f)) = &memarea{mem, size}
+ // runtime.SetFinalizer(&f, munmap)
+ return f
+}
+
+// memory copy. a bit slow, but avoids depending on CGO
+func memcpy(dst uintptr, src uintptr, size uintptr) {
+ for i := uintptr(0); i < size; i++ {
+ *(*uint8)(unsafe.Pointer(dst + i)) = *(*uint8)(unsafe.Pointer(src + i))
+ }
+}
+
+func munmap(obj interface{}) {
+ f, ok := obj.(func(*uint64))
+ if ok && f != nil {
+ area := *(**memarea)(unsafe.Pointer(&f))
+ windows.VirtualFree(area.addr, 0, windows.MEM_RELEASE)
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/add.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/add.s
new file mode 100644
index 0000000..e4fb3f5
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/add.s
@@ -0,0 +1,221 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl Add
+ .type Add, @function
+Add:
+ .cfi_startproc
+ add %rax,%rax
+ add %rax,%rcx
+ add %rax,%rdx
+ add %rax,%rbx
+ add %rax,%rsp
+ add %rax,%rbp
+ add %rax,%rsi
+ add %rax,%rdi
+ add %rax,%r8
+ add %rax,%r9
+ add %rax,%r10
+ add %rax,%r11
+ add %rax,%r12
+ add %rax,%r13
+ add %rax,%r14
+ add %rax,%r15
+ nop
+ add %rcx,%rax
+ add %rcx,%rcx
+ add %rcx,%rdx
+ add %rcx,%rbx
+ add %rcx,%rsp
+ add %rcx,%rbp
+ add %rcx,%rsi
+ add %rcx,%rdi
+ add %rcx,%r8
+ add %rcx,%r9
+ add %rcx,%r10
+ add %rcx,%r11
+ add %rcx,%r12
+ add %rcx,%r13
+ add %rcx,%r14
+ add %rcx,%r15
+ nop
+ add %rdx,%rax
+ add %rdx,%rcx
+ add %rdx,%rdx
+ add %rdx,%rbx
+ add %rdx,%rsp
+ add %rdx,%rbp
+ add %rdx,%rsi
+ add %rdx,%rdi
+ add %rdx,%r8
+ add %rdx,%r9
+ add %rdx,%r10
+ add %rdx,%r11
+ add %rdx,%r12
+ add %rdx,%r13
+ add %rdx,%r14
+ add %rdx,%r15
+ nop
+ add %rbx,%rax
+ add %rbx,%rcx
+ add %rbx,%rdx
+ add %rbx,%rbx
+ add %rbx,%rsp
+ add %rbx,%rbp
+ add %rbx,%rsi
+ add %rbx,%rdi
+ add %rbx,%r8
+ add %rbx,%r9
+ add %rbx,%r10
+ add %rbx,%r11
+ add %rbx,%r12
+ add %rbx,%r13
+ add %rbx,%r14
+ add %rbx,%r15
+ nop
+ add %rsp,%rax
+ add %rsp,%rcx
+ add %rsp,%rdx
+ add %rsp,%rbx
+ add %rsp,%rsp
+ add %rsp,%rbp
+ add %rsp,%rsi
+ add %rsp,%rdi
+ add %rsp,%r8
+ add %rsp,%r9
+ add %rsp,%r10
+ add %rsp,%r11
+ add %rsp,%r12
+ add %rsp,%r13
+ add %rsp,%r14
+ add %rsp,%r15
+ nop
+ add %rbp,%rax
+ add %rbp,%rcx
+ add %rbp,%rdx
+ add %rbp,%rbx
+ add %rbp,%rsp
+ add %rbp,%rbp
+ add %rbp,%rsi
+ add %rbp,%rdi
+ add %rbp,%r8
+ add %rbp,%r9
+ add %rbp,%r10
+ add %rbp,%r11
+ add %rbp,%r12
+ add %rbp,%r13
+ add %rbp,%r14
+ add %rbp,%r15
+ nop
+ add %rsi,%rax
+ add %rsi,%rcx
+ add %rsi,%rdx
+ add %rsi,%rbx
+ add %rsi,%rsp
+ add %rsi,%rbp
+ add %rsi,%rsi
+ add %rsi,%rdi
+ add %rsi,%r8
+ add %rsi,%r9
+ add %rsi,%r10
+ add %rsi,%r11
+ add %rsi,%r12
+ add %rsi,%r13
+ add %rsi,%r14
+ add %rsi,%r15
+ nop
+ add %rdi,%rax
+ add %rdi,%rcx
+ add %rdi,%rdx
+ add %rdi,%rbx
+ add %rdi,%rsp
+ add %rdi,%rbp
+ add %rdi,%rsi
+ add %rdi,%rdi
+ add %rdi,%r8
+ add %rdi,%r9
+ add %rdi,%r10
+ add %rdi,%r11
+ add %rdi,%r12
+ add %rdi,%r13
+ add %rdi,%r14
+ add %rdi,%r15
+ nop
+ add %r8, %rax
+ add %r8, %rcx
+ add %r8, %rdx
+ add %r8, %rbx
+ add %r8, %rsp
+ add %r8, %rbp
+ add %r8, %rsi
+ add %r8, %rdi
+ add %r8, %r8
+ add %r8, %r9
+ add %r8, %r10
+ add %r8, %r11
+ add %r8, %r12
+ add %r8, %r13
+ add %r8, %r14
+ add %r8, %r15
+ nop
+ add %r12,%rax
+ add %r12,%rcx
+ add %r12,%rdx
+ add %r12,%rbx
+ add %r12,%rsp
+ add %r12,%rbp
+ add %r12,%rsi
+ add %r12,%rdi
+ add %r12,%r8
+ add %r12,%r9
+ add %r12,%r10
+ add %r12,%r11
+ add %r12,%r12
+ add %r12,%r13
+ add %r12,%r14
+ add %r12,%r15
+ nop
+ add %r15,%rax
+ add %r15,%rcx
+ add %r15,%rdx
+ add %r15,%rbx
+ add %r15,%rsp
+ add %r15,%rbp
+ add %r15,%rsi
+ add %r15,%rdi
+ add %r15,%r8
+ add %r15,%r9
+ add %r15,%r10
+ add %r15,%r11
+ add %r15,%r12
+ add %r15,%r13
+ add %r15,%r14
+ add %r15,%r15
+
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl Add_s32
+ .type Add_s32, @function
+Add_s32:
+ .cfi_startproc
+ .byte 0x48, 0x81, 0xc0, 0x78, 0x88, 0x99, 0xaa
+ // add $-0x55667788,%rax
+ add $-0x55667788,%rcx
+ add $-0x55667788,%rdx
+ add $-0x55667788,%rbx
+ add $-0x55667788,%rsp
+ add $-0x55667788,%rbp
+ add $-0x55667788,%rsi
+ add $-0x55667788,%rdi
+ add $-0x55667788,%r8
+ add $-0x55667788,%r9
+ add $-0x55667788,%r10
+ add $-0x55667788,%r11
+ add $-0x55667788,%r12
+ add $-0x55667788,%r13
+ add $-0x55667788,%r14
+ add $-0x55667788,%r15
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/and.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/and.s
new file mode 100644
index 0000000..62555a5
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/and.s
@@ -0,0 +1,244 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl and
+ .type and, @function
+and:
+ .cfi_startproc
+ and %rax,%rax
+ and %rax,%rcx
+ and %rax,%rdx
+ and %rax,%rbx
+ and %rax,%rsp
+ and %rax,%rbp
+ and %rax,%rsi
+ and %rax,%rdi
+ and %rax,%r8
+ and %rax,%r9
+ and %rax,%r10
+ and %rax,%r11
+ and %rax,%r12
+ and %rax,%r13
+ and %rax,%r14
+ and %rax,%r15
+ nop
+ and %rcx,%rax
+ and %rcx,%rcx
+ and %rcx,%rdx
+ and %rcx,%rbx
+ and %rcx,%rsp
+ and %rcx,%rbp
+ and %rcx,%rsi
+ and %rcx,%rdi
+ and %rcx,%r8
+ and %rcx,%r9
+ and %rcx,%r10
+ and %rcx,%r11
+ and %rcx,%r12
+ and %rcx,%r13
+ and %rcx,%r14
+ and %rcx,%r15
+ nop
+ and %rdx,%rax
+ and %rdx,%rcx
+ and %rdx,%rdx
+ and %rdx,%rbx
+ and %rdx,%rsp
+ and %rdx,%rbp
+ and %rdx,%rsi
+ and %rdx,%rdi
+ and %rdx,%r8
+ and %rdx,%r9
+ and %rdx,%r10
+ and %rdx,%r11
+ and %rdx,%r12
+ and %rdx,%r13
+ and %rdx,%r14
+ and %rdx,%r15
+ nop
+ and %rbx,%rax
+ and %rbx,%rcx
+ and %rbx,%rdx
+ and %rbx,%rbx
+ and %rbx,%rsp
+ and %rbx,%rbp
+ and %rbx,%rsi
+ and %rbx,%rdi
+ and %rbx,%r8
+ and %rbx,%r9
+ and %rbx,%r10
+ and %rbx,%r11
+ and %rbx,%r12
+ and %rbx,%r13
+ and %rbx,%r14
+ and %rbx,%r15
+ nop
+ and %rsp,%rax
+ and %rsp,%rcx
+ and %rsp,%rdx
+ and %rsp,%rbx
+ and %rsp,%rsp
+ and %rsp,%rbp
+ and %rsp,%rsi
+ and %rsp,%rdi
+ and %rsp,%r8
+ and %rsp,%r9
+ and %rsp,%r10
+ and %rsp,%r11
+ and %rsp,%r12
+ and %rsp,%r13
+ and %rsp,%r14
+ and %rsp,%r15
+ nop
+ and %rbp,%rax
+ and %rbp,%rcx
+ and %rbp,%rdx
+ and %rbp,%rbx
+ and %rbp,%rsp
+ and %rbp,%rbp
+ and %rbp,%rsi
+ and %rbp,%rdi
+ and %rbp,%r8
+ and %rbp,%r9
+ and %rbp,%r10
+ and %rbp,%r11
+ and %rbp,%r12
+ and %rbp,%r13
+ and %rbp,%r14
+ and %rbp,%r15
+ nop
+ and %rsi,%rax
+ and %rsi,%rcx
+ and %rsi,%rdx
+ and %rsi,%rbx
+ and %rsi,%rsp
+ and %rsi,%rbp
+ and %rsi,%rsi
+ and %rsi,%rdi
+ and %rsi,%r8
+ and %rsi,%r9
+ and %rsi,%r10
+ and %rsi,%r11
+ and %rsi,%r12
+ and %rsi,%r13
+ and %rsi,%r14
+ and %rsi,%r15
+ nop
+ and %rdi,%rax
+ and %rdi,%rcx
+ and %rdi,%rdx
+ and %rdi,%rbx
+ and %rdi,%rsp
+ and %rdi,%rbp
+ and %rdi,%rsi
+ and %rdi,%rdi
+ and %rdi,%r8
+ and %rdi,%r9
+ and %rdi,%r10
+ and %rdi,%r11
+ and %rdi,%r12
+ and %rdi,%r13
+ and %rdi,%r14
+ and %rdi,%r15
+ nop
+ and %r8, %rax
+ and %r8, %rcx
+ and %r8, %rdx
+ and %r8, %rbx
+ and %r8, %rsp
+ and %r8, %rbp
+ and %r8, %rsi
+ and %r8, %rdi
+ and %r8, %r8
+ and %r8, %r9
+ and %r8, %r10
+ and %r8, %r11
+ and %r8, %r12
+ and %r8, %r13
+ and %r8, %r14
+ and %r8, %r15
+ nop
+ and %r12,%rax
+ and %r12,%rcx
+ and %r12,%rdx
+ and %r12,%rbx
+ and %r12,%rsp
+ and %r12,%rbp
+ and %r12,%rsi
+ and %r12,%rdi
+ and %r12,%r8
+ and %r12,%r9
+ and %r12,%r10
+ and %r12,%r11
+ and %r12,%r12
+ and %r12,%r13
+ and %r12,%r14
+ and %r12,%r15
+ nop
+ and %r15,%rax
+ and %r15,%rcx
+ and %r15,%rdx
+ and %r15,%rbx
+ and %r15,%rsp
+ and %r15,%rbp
+ and %r15,%rsi
+ and %r15,%rdi
+ and %r15,%r8
+ and %r15,%r9
+ and %r15,%r10
+ and %r15,%r11
+ and %r15,%r12
+ and %r15,%r13
+ and %r15,%r14
+ and %r15,%r15
+
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl and_u32
+ .type and_u32, @function
+and_u32:
+ .cfi_startproc
+ and $0x55667788,%eax
+ and $0x55667788,%ecx
+ and $0x55667788,%edx
+ and $0x55667788,%ebx
+ and $0x55667788,%esp
+ and $0x55667788,%ebp
+ and $0x55667788,%esi
+ and $0x55667788,%edi
+ and $0x55667788,%r8d
+ and $0x55667788,%r9d
+ and $0x55667788,%r10d
+ and $0x55667788,%r11d
+ and $0x55667788,%r12d
+ and $0x55667788,%r13d
+ and $0x55667788,%r14d
+ and $0x55667788,%r15d
+ .cfi_endproc
+
+ .p2align 4,,15
+ .globl and_s32
+ .type and_s32, @function
+and_s32:
+ .cfi_startproc
+ and $-0x55667788,%rax
+ and $-0x55667788,%rcx
+ and $-0x55667788,%rdx
+ and $-0x55667788,%rbx
+ and $-0x55667788,%rsp
+ and $-0x55667788,%rbp
+ and $-0x55667788,%rsi
+ and $-0x55667788,%rdi
+ and $-0x55667788,%r8
+ and $-0x55667788,%r9
+ and $-0x55667788,%r10
+ and $-0x55667788,%r11
+ and $-0x55667788,%r12
+ and $-0x55667788,%r13
+ and $-0x55667788,%r14
+ and $-0x55667788,%r15
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/div.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/div.s
new file mode 100644
index 0000000..dd0ee6b
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/div.s
@@ -0,0 +1,51 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl idiv
+ .type idiv, @function
+idiv:
+ .cfi_startproc
+ idiv %rax
+ idiv %rcx
+ idiv %rdx
+ idiv %rbx
+ idiv %rsp
+ idiv %rbp
+ idiv %rsi
+ idiv %rdi
+ idiv %r8
+ idiv %r9
+ idiv %r10
+ idiv %r11
+ idiv %r12
+ idiv %r13
+ idiv %r14
+ idiv %r15
+ idivq 0x288(%rdi)
+ ret
+ .cfi_endproc
+
+ .globl div
+ .type div, @function
+div:
+ .cfi_startproc
+ div %rax
+ div %rcx
+ div %rdx
+ div %rbx
+ div %rsp
+ div %rbp
+ div %rsi
+ div %rdi
+ div %r8
+ div %r9
+ div %r10
+ div %r11
+ div %r12
+ div %r13
+ div %r14
+ div %r15
+ divq 0x288(%rdi)
+ ret
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/dump.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/dump.s
new file mode 100644
index 0000000..e22dae3
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/dump.s
@@ -0,0 +1,11 @@
+ .file "dump.s"
+ .text
+ .p2align 4,,15
+ .globl Dump
+ .type Dump, @function
+Dump:
+ .cfi_startproc
+ .byte 0x48, 0x8b, 0x7c, 0x24, 0x8, 0x48, 0x8b, 0x87, 0x0, 0x0, 0x0, 0x0, 0x48, 0x69, 0xc0, 0x2, 0x0, 0x0, 0x0, 0x48, 0x81, 0xc0, 0x3, 0x0, 0x0, 0x0, 0x48, 0x81, 0xc8, 0x4, 0x0, 0x0, 0x0, 0x48, 0x81, 0xe0, 0xfa, 0xff, 0xff, 0xff, 0x48, 0x81, 0xf0, 0x6, 0x0, 0x0, 0x0, 0x48, 0x8b, 0x8f, 0x0, 0x0, 0x0, 0x0, 0x81, 0xe1, 0x2, 0x0, 0x0, 0x0, 0x48, 0x81, 0xc9, 0x1, 0x0, 0x0, 0x0, 0x48, 0xf7, 0xf9, 0x48, 0x89, 0x87, 0x8, 0x0, 0x0, 0x0, 0xc3
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/mov.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/mov.s
new file mode 100644
index 0000000..f4d9984
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/mov.s
@@ -0,0 +1,197 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl mov
+ .type mov, @function
+mov:
+ .cfi_startproc
+ mov %rax,%rax
+ mov %rax,%rcx
+ mov %rax,%rdx
+ mov %rax,%rbx
+ mov %rax,%rsp
+ mov %rax,%rbp
+ mov %rax,%rsi
+ mov %rax,%rdi
+ mov %rax,%r8
+ mov %rax,%r9
+ mov %rax,%r10
+ mov %rax,%r11
+ mov %rax,%r12
+ mov %rax,%r13
+ mov %rax,%r14
+ mov %rax,%r15
+ nop
+ mov %rcx,%rax
+ mov %rcx,%rcx
+ mov %rcx,%rdx
+ mov %rcx,%rbx
+ mov %rcx,%rsp
+ mov %rcx,%rbp
+ mov %rcx,%rsi
+ mov %rcx,%rdi
+ mov %rcx,%r8
+ mov %rcx,%r9
+ mov %rcx,%r10
+ mov %rcx,%r11
+ mov %rcx,%r12
+ mov %rcx,%r13
+ mov %rcx,%r14
+ mov %rcx,%r15
+ nop
+ mov %rdx,%rax
+ mov %rdx,%rcx
+ mov %rdx,%rdx
+ mov %rdx,%rbx
+ mov %rdx,%rsp
+ mov %rdx,%rbp
+ mov %rdx,%rsi
+ mov %rdx,%rdi
+ mov %rdx,%r8
+ mov %rdx,%r9
+ mov %rdx,%r10
+ mov %rdx,%r11
+ mov %rdx,%r12
+ mov %rdx,%r13
+ mov %rdx,%r14
+ mov %rdx,%r15
+ nop
+ mov %rbx,%rax
+ mov %rbx,%rcx
+ mov %rbx,%rdx
+ mov %rbx,%rbx
+ mov %rbx,%rsp
+ mov %rbx,%rbp
+ mov %rbx,%rsi
+ mov %rbx,%rdi
+ mov %rbx,%r8
+ mov %rbx,%r9
+ mov %rbx,%r10
+ mov %rbx,%r11
+ mov %rbx,%r12
+ mov %rbx,%r13
+ mov %rbx,%r14
+ mov %rbx,%r15
+ nop
+ mov %rsp,%rax
+ mov %rsp,%rcx
+ mov %rsp,%rdx
+ mov %rsp,%rbx
+ mov %rsp,%rsp
+ mov %rsp,%rbp
+ mov %rsp,%rsi
+ mov %rsp,%rdi
+ mov %rsp,%r8
+ mov %rsp,%r9
+ mov %rsp,%r10
+ mov %rsp,%r11
+ mov %rsp,%r12
+ mov %rsp,%r13
+ mov %rsp,%r14
+ mov %rsp,%r15
+ nop
+ mov %rbp,%rax
+ mov %rbp,%rcx
+ mov %rbp,%rdx
+ mov %rbp,%rbx
+ mov %rbp,%rsp
+ mov %rbp,%rbp
+ mov %rbp,%rsi
+ mov %rbp,%rdi
+ mov %rbp,%r8
+ mov %rbp,%r9
+ mov %rbp,%r10
+ mov %rbp,%r11
+ mov %rbp,%r12
+ mov %rbp,%r13
+ mov %rbp,%r14
+ mov %rbp,%r15
+ nop
+ mov %rsi,%rax
+ mov %rsi,%rcx
+ mov %rsi,%rdx
+ mov %rsi,%rbx
+ mov %rsi,%rsp
+ mov %rsi,%rbp
+ mov %rsi,%rsi
+ mov %rsi,%rdi
+ mov %rsi,%r8
+ mov %rsi,%r9
+ mov %rsi,%r10
+ mov %rsi,%r11
+ mov %rsi,%r12
+ mov %rsi,%r13
+ mov %rsi,%r14
+ mov %rsi,%r15
+ nop
+ mov %rdi,%rax
+ mov %rdi,%rcx
+ mov %rdi,%rdx
+ mov %rdi,%rbx
+ mov %rdi,%rsp
+ mov %rdi,%rbp
+ mov %rdi,%rsi
+ mov %rdi,%rdi
+ mov %rdi,%r8
+ mov %rdi,%r9
+ mov %rdi,%r10
+ mov %rdi,%r11
+ mov %rdi,%r12
+ mov %rdi,%r13
+ mov %rdi,%r14
+ mov %rdi,%r15
+ nop
+ mov %r8, %rax
+ mov %r8, %rcx
+ mov %r8, %rdx
+ mov %r8, %rbx
+ mov %r8, %rsp
+ mov %r8, %rbp
+ mov %r8, %rsi
+ mov %r8, %rdi
+ mov %r8, %r8
+ mov %r8, %r9
+ mov %r8, %r10
+ mov %r8, %r11
+ mov %r8, %r12
+ mov %r8, %r13
+ mov %r8, %r14
+ mov %r8, %r15
+ nop
+ mov %r12,%rax
+ mov %r12,%rcx
+ mov %r12,%rdx
+ mov %r12,%rbx
+ mov %r12,%rsp
+ mov %r12,%rbp
+ mov %r12,%rsi
+ mov %r12,%rdi
+ mov %r12,%r8
+ mov %r12,%r9
+ mov %r12,%r10
+ mov %r12,%r11
+ mov %r12,%r12
+ mov %r12,%r13
+ mov %r12,%r14
+ mov %r12,%r15
+ nop
+ mov %r15,%rax
+ mov %r15,%rcx
+ mov %r15,%rdx
+ mov %r15,%rbx
+ mov %r15,%rsp
+ mov %r15,%rbp
+ mov %r15,%rsi
+ mov %r15,%rdi
+ mov %r15,%r8
+ mov %r15,%r9
+ mov %r15,%r10
+ mov %r15,%r11
+ mov %r15,%r12
+ mov %r15,%r13
+ mov %r15,%r14
+ mov %r15,%r15
+
+ ret
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/mul.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/mul.s
new file mode 100644
index 0000000..5b8f236
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/mul.s
@@ -0,0 +1,220 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl mul
+ .type mul, @function
+mul:
+ .cfi_startproc
+ imul %rax,%rax
+ imul %rax,%rcx
+ imul %rax,%rdx
+ imul %rax,%rbx
+ imul %rax,%rsp
+ imul %rax,%rbp
+ imul %rax,%rsi
+ imul %rax,%rdi
+ imul %rax,%r8
+ imul %rax,%r9
+ imul %rax,%r10
+ imul %rax,%r11
+ imul %rax,%r12
+ imul %rax,%r13
+ imul %rax,%r14
+ imul %rax,%r15
+ nop
+ imul %rcx,%rax
+ imul %rcx,%rcx
+ imul %rcx,%rdx
+ imul %rcx,%rbx
+ imul %rcx,%rsp
+ imul %rcx,%rbp
+ imul %rcx,%rsi
+ imul %rcx,%rdi
+ imul %rcx,%r8
+ imul %rcx,%r9
+ imul %rcx,%r10
+ imul %rcx,%r11
+ imul %rcx,%r12
+ imul %rcx,%r13
+ imul %rcx,%r14
+ imul %rcx,%r15
+ nop
+ imul %rdx,%rax
+ imul %rdx,%rcx
+ imul %rdx,%rdx
+ imul %rdx,%rbx
+ imul %rdx,%rsp
+ imul %rdx,%rbp
+ imul %rdx,%rsi
+ imul %rdx,%rdi
+ imul %rdx,%r8
+ imul %rdx,%r9
+ imul %rdx,%r10
+ imul %rdx,%r11
+ imul %rdx,%r12
+ imul %rdx,%r13
+ imul %rdx,%r14
+ imul %rdx,%r15
+ nop
+ imul %rbx,%rax
+ imul %rbx,%rcx
+ imul %rbx,%rdx
+ imul %rbx,%rbx
+ imul %rbx,%rsp
+ imul %rbx,%rbp
+ imul %rbx,%rsi
+ imul %rbx,%rdi
+ imul %rbx,%r8
+ imul %rbx,%r9
+ imul %rbx,%r10
+ imul %rbx,%r11
+ imul %rbx,%r12
+ imul %rbx,%r13
+ imul %rbx,%r14
+ imul %rbx,%r15
+ nop
+ imul %rsp,%rax
+ imul %rsp,%rcx
+ imul %rsp,%rdx
+ imul %rsp,%rbx
+ imul %rsp,%rsp
+ imul %rsp,%rbp
+ imul %rsp,%rsi
+ imul %rsp,%rdi
+ imul %rsp,%r8
+ imul %rsp,%r9
+ imul %rsp,%r10
+ imul %rsp,%r11
+ imul %rsp,%r12
+ imul %rsp,%r13
+ imul %rsp,%r14
+ imul %rsp,%r15
+ nop
+ imul %rbp,%rax
+ imul %rbp,%rcx
+ imul %rbp,%rdx
+ imul %rbp,%rbx
+ imul %rbp,%rsp
+ imul %rbp,%rbp
+ imul %rbp,%rsi
+ imul %rbp,%rdi
+ imul %rbp,%r8
+ imul %rbp,%r9
+ imul %rbp,%r10
+ imul %rbp,%r11
+ imul %rbp,%r12
+ imul %rbp,%r13
+ imul %rbp,%r14
+ imul %rbp,%r15
+ nop
+ imul %rsi,%rax
+ imul %rsi,%rcx
+ imul %rsi,%rdx
+ imul %rsi,%rbx
+ imul %rsi,%rsp
+ imul %rsi,%rbp
+ imul %rsi,%rsi
+ imul %rsi,%rdi
+ imul %rsi,%r8
+ imul %rsi,%r9
+ imul %rsi,%r10
+ imul %rsi,%r11
+ imul %rsi,%r12
+ imul %rsi,%r13
+ imul %rsi,%r14
+ imul %rsi,%r15
+ nop
+ imul %rdi,%rax
+ imul %rdi,%rcx
+ imul %rdi,%rdx
+ imul %rdi,%rbx
+ imul %rdi,%rsp
+ imul %rdi,%rbp
+ imul %rdi,%rsi
+ imul %rdi,%rdi
+ imul %rdi,%r8
+ imul %rdi,%r9
+ imul %rdi,%r10
+ imul %rdi,%r11
+ imul %rdi,%r12
+ imul %rdi,%r13
+ imul %rdi,%r14
+ imul %rdi,%r15
+ nop
+ imul %r8, %rax
+ imul %r8, %rcx
+ imul %r8, %rdx
+ imul %r8, %rbx
+ imul %r8, %rsp
+ imul %r8, %rbp
+ imul %r8, %rsi
+ imul %r8, %rdi
+ imul %r8, %r8
+ imul %r8, %r9
+ imul %r8, %r10
+ imul %r8, %r11
+ imul %r8, %r12
+ imul %r8, %r13
+ imul %r8, %r14
+ imul %r8, %r15
+ nop
+ imul %r12,%rax
+ imul %r12,%rcx
+ imul %r12,%rdx
+ imul %r12,%rbx
+ imul %r12,%rsp
+ imul %r12,%rbp
+ imul %r12,%rsi
+ imul %r12,%rdi
+ imul %r12,%r8
+ imul %r12,%r9
+ imul %r12,%r10
+ imul %r12,%r11
+ imul %r12,%r12
+ imul %r12,%r13
+ imul %r12,%r14
+ imul %r12,%r15
+ nop
+ imul %r15,%rax
+ imul %r15,%rcx
+ imul %r15,%rdx
+ imul %r15,%rbx
+ imul %r15,%rsp
+ imul %r15,%rbp
+ imul %r15,%rsi
+ imul %r15,%rdi
+ imul %r15,%r8
+ imul %r15,%r9
+ imul %r15,%r10
+ imul %r15,%r11
+ imul %r15,%r12
+ imul %r15,%r13
+ imul %r15,%r14
+ imul %r15,%r15
+
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl mul_s32
+ .type mul_s32, @function
+mul_s32:
+ .cfi_startproc
+ imul $-0x55667788,%rax
+ imul $-0x55667788,%rcx
+ imul $-0x55667788,%rdx
+ imul $-0x55667788,%rbx
+ imul $-0x55667788,%rsp
+ imul $-0x55667788,%rbp
+ imul $-0x55667788,%rsi
+ imul $-0x55667788,%rdi
+ imul $-0x55667788,%r8
+ imul $-0x55667788,%r9
+ imul $-0x55667788,%r10
+ imul $-0x55667788,%r11
+ imul $-0x55667788,%r12
+ imul $-0x55667788,%r13
+ imul $-0x55667788,%r14
+ imul $-0x55667788,%r15
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/neg.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/neg.s
new file mode 100644
index 0000000..ec2a062
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/neg.s
@@ -0,0 +1,27 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl neg
+ .type neg, @function
+neg:
+ .cfi_startproc
+ neg %rax
+ neg %rcx
+ neg %rdx
+ neg %rbx
+ neg %rsp
+ neg %rbp
+ neg %rsi
+ neg %rdi
+ neg %r8
+ neg %r9
+ neg %r10
+ neg %r11
+ neg %r12
+ neg %r13
+ neg %r14
+ neg %r15
+
+ ret
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/not.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/not.s
new file mode 100644
index 0000000..81467e2
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/not.s
@@ -0,0 +1,27 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl not
+ .type not, @function
+not:
+ .cfi_startproc
+ not %rax
+ not %rcx
+ not %rdx
+ not %rbx
+ not %rsp
+ not %rbp
+ not %rsi
+ not %rdi
+ not %r8
+ not %r9
+ not %r10
+ not %r11
+ not %r12
+ not %r13
+ not %r14
+ not %r15
+
+ ret
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/or.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/or.s
new file mode 100644
index 0000000..77b38b4
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/or.s
@@ -0,0 +1,221 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl or
+ .type or, @function
+or:
+ .cfi_startproc
+ or %rax,%rax
+ or %rax,%rcx
+ or %rax,%rdx
+ or %rax,%rbx
+ or %rax,%rsp
+ or %rax,%rbp
+ or %rax,%rsi
+ or %rax,%rdi
+ or %rax,%r8
+ or %rax,%r9
+ or %rax,%r10
+ or %rax,%r11
+ or %rax,%r12
+ or %rax,%r13
+ or %rax,%r14
+ or %rax,%r15
+ nop
+ or %rcx,%rax
+ or %rcx,%rcx
+ or %rcx,%rdx
+ or %rcx,%rbx
+ or %rcx,%rsp
+ or %rcx,%rbp
+ or %rcx,%rsi
+ or %rcx,%rdi
+ or %rcx,%r8
+ or %rcx,%r9
+ or %rcx,%r10
+ or %rcx,%r11
+ or %rcx,%r12
+ or %rcx,%r13
+ or %rcx,%r14
+ or %rcx,%r15
+ nop
+ or %rdx,%rax
+ or %rdx,%rcx
+ or %rdx,%rdx
+ or %rdx,%rbx
+ or %rdx,%rsp
+ or %rdx,%rbp
+ or %rdx,%rsi
+ or %rdx,%rdi
+ or %rdx,%r8
+ or %rdx,%r9
+ or %rdx,%r10
+ or %rdx,%r11
+ or %rdx,%r12
+ or %rdx,%r13
+ or %rdx,%r14
+ or %rdx,%r15
+ nop
+ or %rbx,%rax
+ or %rbx,%rcx
+ or %rbx,%rdx
+ or %rbx,%rbx
+ or %rbx,%rsp
+ or %rbx,%rbp
+ or %rbx,%rsi
+ or %rbx,%rdi
+ or %rbx,%r8
+ or %rbx,%r9
+ or %rbx,%r10
+ or %rbx,%r11
+ or %rbx,%r12
+ or %rbx,%r13
+ or %rbx,%r14
+ or %rbx,%r15
+ nop
+ or %rsp,%rax
+ or %rsp,%rcx
+ or %rsp,%rdx
+ or %rsp,%rbx
+ or %rsp,%rsp
+ or %rsp,%rbp
+ or %rsp,%rsi
+ or %rsp,%rdi
+ or %rsp,%r8
+ or %rsp,%r9
+ or %rsp,%r10
+ or %rsp,%r11
+ or %rsp,%r12
+ or %rsp,%r13
+ or %rsp,%r14
+ or %rsp,%r15
+ nop
+ or %rbp,%rax
+ or %rbp,%rcx
+ or %rbp,%rdx
+ or %rbp,%rbx
+ or %rbp,%rsp
+ or %rbp,%rbp
+ or %rbp,%rsi
+ or %rbp,%rdi
+ or %rbp,%r8
+ or %rbp,%r9
+ or %rbp,%r10
+ or %rbp,%r11
+ or %rbp,%r12
+ or %rbp,%r13
+ or %rbp,%r14
+ or %rbp,%r15
+ nop
+ or %rsi,%rax
+ or %rsi,%rcx
+ or %rsi,%rdx
+ or %rsi,%rbx
+ or %rsi,%rsp
+ or %rsi,%rbp
+ or %rsi,%rsi
+ or %rsi,%rdi
+ or %rsi,%r8
+ or %rsi,%r9
+ or %rsi,%r10
+ or %rsi,%r11
+ or %rsi,%r12
+ or %rsi,%r13
+ or %rsi,%r14
+ or %rsi,%r15
+ nop
+ or %rdi,%rax
+ or %rdi,%rcx
+ or %rdi,%rdx
+ or %rdi,%rbx
+ or %rdi,%rsp
+ or %rdi,%rbp
+ or %rdi,%rsi
+ or %rdi,%rdi
+ or %rdi,%r8
+ or %rdi,%r9
+ or %rdi,%r10
+ or %rdi,%r11
+ or %rdi,%r12
+ or %rdi,%r13
+ or %rdi,%r14
+ or %rdi,%r15
+ nop
+ or %r8, %rax
+ or %r8, %rcx
+ or %r8, %rdx
+ or %r8, %rbx
+ or %r8, %rsp
+ or %r8, %rbp
+ or %r8, %rsi
+ or %r8, %rdi
+ or %r8, %r8
+ or %r8, %r9
+ or %r8, %r10
+ or %r8, %r11
+ or %r8, %r12
+ or %r8, %r13
+ or %r8, %r14
+ or %r8, %r15
+ nop
+ or %r12,%rax
+ or %r12,%rcx
+ or %r12,%rdx
+ or %r12,%rbx
+ or %r12,%rsp
+ or %r12,%rbp
+ or %r12,%rsi
+ or %r12,%rdi
+ or %r12,%r8
+ or %r12,%r9
+ or %r12,%r10
+ or %r12,%r11
+ or %r12,%r12
+ or %r12,%r13
+ or %r12,%r14
+ or %r12,%r15
+ nop
+ or %r15,%rax
+ or %r15,%rcx
+ or %r15,%rdx
+ or %r15,%rbx
+ or %r15,%rsp
+ or %r15,%rbp
+ or %r15,%rsi
+ or %r15,%rdi
+ or %r15,%r8
+ or %r15,%r9
+ or %r15,%r10
+ or %r15,%r11
+ or %r15,%r12
+ or %r15,%r13
+ or %r15,%r14
+ or %r15,%r15
+
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl or_s32
+ .type or_s32, @function
+or_s32:
+ .cfi_startproc
+ or $-0x55667788,%rax
+ or $-0x55667788,%rcx
+ or $-0x55667788,%rdx
+ or $-0x55667788,%rbx
+ or $-0x55667788,%rsp
+ or $-0x55667788,%rbp
+ or $-0x55667788,%rsi
+ or $-0x55667788,%rdi
+ or $-0x55667788,%r8
+ or $-0x55667788,%r9
+ or $-0x55667788,%r10
+ or $-0x55667788,%r11
+ or $-0x55667788,%r12
+ or $-0x55667788,%r13
+ or $-0x55667788,%r14
+ or $-0x55667788,%r15
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/reg.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/reg.s
new file mode 100644
index 0000000..9088da8
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/reg.s
@@ -0,0 +1,124 @@
+ .file "reg.s"
+ .text
+ .p2align 4,,15
+ .globl Store
+ .type Store, @function
+Store:
+ .cfi_startproc
+ mov %rax, 648(%rdi)
+ mov %rcx, 648(%rdi)
+ mov %rdx, 648(%rdi)
+ mov %rbx, 648(%rdi)
+ mov %rsp, 648(%rdi)
+ mov %rbp, 648(%rdi)
+ mov %rsi, 648(%rdi)
+ mov %rdi, 648(%rdi)
+ mov %r8, 648(%rdi)
+ mov %r9, 648(%rdi)
+ mov %r10, 648(%rdi)
+ mov %r11, 648(%rdi)
+ mov %r12, 648(%rdi)
+ mov %r13, 648(%rdi)
+ mov %r14, 648(%rdi)
+ mov %r15, 648(%rdi)
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl Load
+ .type Load, @function
+Load:
+ .cfi_startproc
+ mov 648(%rdi), %rax
+ mov 648(%rdi), %rcx
+ mov 648(%rdi), %rdx
+ mov 648(%rdi), %rbx
+ mov 648(%rdi), %rsp
+ mov 648(%rdi), %rbp
+ mov 648(%rdi), %rsi
+ mov 648(%rdi), %rdi
+ mov 648(%rdi), %r8
+ mov 648(%rdi), %r9
+ mov 648(%rdi), %r10
+ mov 648(%rdi), %r11
+ mov 648(%rdi), %r12
+ mov 648(%rdi), %r13
+ mov 648(%rdi), %r14
+ mov 648(%rdi), %r15
+ ret
+ .cfi_endproc
+
+ .p2align 4,,15
+ .globl Load_s32
+ .type Load_s32, @function
+Load_s32:
+ .cfi_startproc
+ mov $-0x11223344, %rax
+ mov $-0x11223344, %rcx
+ mov $-0x11223344, %rdx
+ mov $-0x11223344, %rbx
+ mov $-0x11223344, %rsp
+ mov $-0x11223344, %rbp
+ mov $-0x11223344, %rsi
+ mov $-0x11223344, %rdi
+ mov $-0x11223344, %r8
+ mov $-0x11223344, %r9
+ mov $-0x11223344, %r10
+ mov $-0x11223344, %r11
+ mov $-0x11223344, %r12
+ mov $-0x11223344, %r13
+ mov $-0x11223344, %r14
+ mov $-0x11223344, %r15
+ ret
+ .cfi_endproc
+
+ .p2align 4,,15
+ .globl Load_u32
+ .type Load_u32, @function
+Load_u32:
+ .cfi_startproc
+ movl $0xffaa9988, %eax
+ movl $0xffaa9988, %ecx
+ movl $0xffaa9988, %edx
+ movl $0xffaa9988, %ebx
+ movl $0xffaa9988, %esp
+ movl $0xffaa9988, %ebp
+ movl $0xffaa9988, %esi
+ movl $0xffaa9988, %edi
+ movl $0xffaa9988, %r8d
+ movl $0xffaa9988, %r9d
+ movl $0xffaa9988, %r10d
+ movl $0xffaa9988, %r11d
+ movl $0xffaa9988, %r12d
+ movl $0xffaa9988, %r13d
+ movl $0xffaa9988, %r14d
+ movl $0xffaa9988, %r15d
+ ret
+ .cfi_endproc
+
+
+
+ .p2align 4,,15
+ .globl Load_64
+ .type Load_64, @function
+Load_64:
+ .cfi_startproc
+ movabs $0x5566778899aabbcc, %rax
+ movabs $0x5566778899aabbcc, %rcx
+ movabs $0x5566778899aabbcc, %rdx
+ movabs $0x5566778899aabbcc, %rbx
+ movabs $0x5566778899aabbcc, %rsp
+ movabs $0x5566778899aabbcc, %rbp
+ movabs $0x5566778899aabbcc, %rsi
+ movabs $0x5566778899aabbcc, %rdi
+ movabs $0x5566778899aabbcc, %r8
+ movabs $0x5566778899aabbcc, %r9
+ movabs $0x5566778899aabbcc, %r10
+ movabs $0x5566778899aabbcc, %r11
+ movabs $0x5566778899aabbcc, %r12
+ movabs $0x5566778899aabbcc, %r13
+ movabs $0x5566778899aabbcc, %r14
+ movabs $0x5566778899aabbcc, %r15
+ ret
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/sub.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/sub.s
new file mode 100644
index 0000000..d18c3a2
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/sub.s
@@ -0,0 +1,221 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl sub
+ .type sub, @function
+sub:
+ .cfi_startproc
+ sub %rax,%rax
+ sub %rax,%rcx
+ sub %rax,%rdx
+ sub %rax,%rbx
+ sub %rax,%rsp
+ sub %rax,%rbp
+ sub %rax,%rsi
+ sub %rax,%rdi
+ sub %rax,%r8
+ sub %rax,%r9
+ sub %rax,%r10
+ sub %rax,%r11
+ sub %rax,%r12
+ sub %rax,%r13
+ sub %rax,%r14
+ sub %rax,%r15
+ nop
+ sub %rcx,%rax
+ sub %rcx,%rcx
+ sub %rcx,%rdx
+ sub %rcx,%rbx
+ sub %rcx,%rsp
+ sub %rcx,%rbp
+ sub %rcx,%rsi
+ sub %rcx,%rdi
+ sub %rcx,%r8
+ sub %rcx,%r9
+ sub %rcx,%r10
+ sub %rcx,%r11
+ sub %rcx,%r12
+ sub %rcx,%r13
+ sub %rcx,%r14
+ sub %rcx,%r15
+ nop
+ sub %rdx,%rax
+ sub %rdx,%rcx
+ sub %rdx,%rdx
+ sub %rdx,%rbx
+ sub %rdx,%rsp
+ sub %rdx,%rbp
+ sub %rdx,%rsi
+ sub %rdx,%rdi
+ sub %rdx,%r8
+ sub %rdx,%r9
+ sub %rdx,%r10
+ sub %rdx,%r11
+ sub %rdx,%r12
+ sub %rdx,%r13
+ sub %rdx,%r14
+ sub %rdx,%r15
+ nop
+ sub %rbx,%rax
+ sub %rbx,%rcx
+ sub %rbx,%rdx
+ sub %rbx,%rbx
+ sub %rbx,%rsp
+ sub %rbx,%rbp
+ sub %rbx,%rsi
+ sub %rbx,%rdi
+ sub %rbx,%r8
+ sub %rbx,%r9
+ sub %rbx,%r10
+ sub %rbx,%r11
+ sub %rbx,%r12
+ sub %rbx,%r13
+ sub %rbx,%r14
+ sub %rbx,%r15
+ nop
+ sub %rsp,%rax
+ sub %rsp,%rcx
+ sub %rsp,%rdx
+ sub %rsp,%rbx
+ sub %rsp,%rsp
+ sub %rsp,%rbp
+ sub %rsp,%rsi
+ sub %rsp,%rdi
+ sub %rsp,%r8
+ sub %rsp,%r9
+ sub %rsp,%r10
+ sub %rsp,%r11
+ sub %rsp,%r12
+ sub %rsp,%r13
+ sub %rsp,%r14
+ sub %rsp,%r15
+ nop
+ sub %rbp,%rax
+ sub %rbp,%rcx
+ sub %rbp,%rdx
+ sub %rbp,%rbx
+ sub %rbp,%rsp
+ sub %rbp,%rbp
+ sub %rbp,%rsi
+ sub %rbp,%rdi
+ sub %rbp,%r8
+ sub %rbp,%r9
+ sub %rbp,%r10
+ sub %rbp,%r11
+ sub %rbp,%r12
+ sub %rbp,%r13
+ sub %rbp,%r14
+ sub %rbp,%r15
+ nop
+ sub %rsi,%rax
+ sub %rsi,%rcx
+ sub %rsi,%rdx
+ sub %rsi,%rbx
+ sub %rsi,%rsp
+ sub %rsi,%rbp
+ sub %rsi,%rsi
+ sub %rsi,%rdi
+ sub %rsi,%r8
+ sub %rsi,%r9
+ sub %rsi,%r10
+ sub %rsi,%r11
+ sub %rsi,%r12
+ sub %rsi,%r13
+ sub %rsi,%r14
+ sub %rsi,%r15
+ nop
+ sub %rdi,%rax
+ sub %rdi,%rcx
+ sub %rdi,%rdx
+ sub %rdi,%rbx
+ sub %rdi,%rsp
+ sub %rdi,%rbp
+ sub %rdi,%rsi
+ sub %rdi,%rdi
+ sub %rdi,%r8
+ sub %rdi,%r9
+ sub %rdi,%r10
+ sub %rdi,%r11
+ sub %rdi,%r12
+ sub %rdi,%r13
+ sub %rdi,%r14
+ sub %rdi,%r15
+ nop
+ sub %r8, %rax
+ sub %r8, %rcx
+ sub %r8, %rdx
+ sub %r8, %rbx
+ sub %r8, %rsp
+ sub %r8, %rbp
+ sub %r8, %rsi
+ sub %r8, %rdi
+ sub %r8, %r8
+ sub %r8, %r9
+ sub %r8, %r10
+ sub %r8, %r11
+ sub %r8, %r12
+ sub %r8, %r13
+ sub %r8, %r14
+ sub %r8, %r15
+ nop
+ sub %r12,%rax
+ sub %r12,%rcx
+ sub %r12,%rdx
+ sub %r12,%rbx
+ sub %r12,%rsp
+ sub %r12,%rbp
+ sub %r12,%rsi
+ sub %r12,%rdi
+ sub %r12,%r8
+ sub %r12,%r9
+ sub %r12,%r10
+ sub %r12,%r11
+ sub %r12,%r12
+ sub %r12,%r13
+ sub %r12,%r14
+ sub %r12,%r15
+ nop
+ sub %r15,%rax
+ sub %r15,%rcx
+ sub %r15,%rdx
+ sub %r15,%rbx
+ sub %r15,%rsp
+ sub %r15,%rbp
+ sub %r15,%rsi
+ sub %r15,%rdi
+ sub %r15,%r8
+ sub %r15,%r9
+ sub %r15,%r10
+ sub %r15,%r11
+ sub %r15,%r12
+ sub %r15,%r13
+ sub %r15,%r14
+ sub %r15,%r15
+
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl sub_s32
+ .type sub_s32, @function
+sub_s32:
+ .cfi_startproc
+ .byte 0x48, 0x81, 0xe8, 0x78, 0x88, 0x99, 0xaa
+ // sub $-0x55667788,%rax
+ sub $-0x55667788,%rcx
+ sub $-0x55667788,%rdx
+ sub $-0x55667788,%rbx
+ sub $-0x55667788,%rsp
+ sub $-0x55667788,%rbp
+ sub $-0x55667788,%rsi
+ sub $-0x55667788,%rdi
+ sub $-0x55667788,%r8
+ sub $-0x55667788,%r9
+ sub $-0x55667788,%r10
+ sub $-0x55667788,%r11
+ sub $-0x55667788,%r12
+ sub $-0x55667788,%r13
+ sub $-0x55667788,%r14
+ sub $-0x55667788,%r15
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/xor.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/xor.s
new file mode 100644
index 0000000..2eed240
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/amd64/xor.s
@@ -0,0 +1,221 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl xor
+ .type xor, @function
+xor:
+ .cfi_startproc
+ xor %rax,%rax
+ xor %rax,%rcx
+ xor %rax,%rdx
+ xor %rax,%rbx
+ xor %rax,%rsp
+ xor %rax,%rbp
+ xor %rax,%rsi
+ xor %rax,%rdi
+ xor %rax,%r8
+ xor %rax,%r9
+ xor %rax,%r10
+ xor %rax,%r11
+ xor %rax,%r12
+ xor %rax,%r13
+ xor %rax,%r14
+ xor %rax,%r15
+ nop
+ xor %rcx,%rax
+ xor %rcx,%rcx
+ xor %rcx,%rdx
+ xor %rcx,%rbx
+ xor %rcx,%rsp
+ xor %rcx,%rbp
+ xor %rcx,%rsi
+ xor %rcx,%rdi
+ xor %rcx,%r8
+ xor %rcx,%r9
+ xor %rcx,%r10
+ xor %rcx,%r11
+ xor %rcx,%r12
+ xor %rcx,%r13
+ xor %rcx,%r14
+ xor %rcx,%r15
+ nop
+ xor %rdx,%rax
+ xor %rdx,%rcx
+ xor %rdx,%rdx
+ xor %rdx,%rbx
+ xor %rdx,%rsp
+ xor %rdx,%rbp
+ xor %rdx,%rsi
+ xor %rdx,%rdi
+ xor %rdx,%r8
+ xor %rdx,%r9
+ xor %rdx,%r10
+ xor %rdx,%r11
+ xor %rdx,%r12
+ xor %rdx,%r13
+ xor %rdx,%r14
+ xor %rdx,%r15
+ nop
+ xor %rbx,%rax
+ xor %rbx,%rcx
+ xor %rbx,%rdx
+ xor %rbx,%rbx
+ xor %rbx,%rsp
+ xor %rbx,%rbp
+ xor %rbx,%rsi
+ xor %rbx,%rdi
+ xor %rbx,%r8
+ xor %rbx,%r9
+ xor %rbx,%r10
+ xor %rbx,%r11
+ xor %rbx,%r12
+ xor %rbx,%r13
+ xor %rbx,%r14
+ xor %rbx,%r15
+ nop
+ xor %rsp,%rax
+ xor %rsp,%rcx
+ xor %rsp,%rdx
+ xor %rsp,%rbx
+ xor %rsp,%rsp
+ xor %rsp,%rbp
+ xor %rsp,%rsi
+ xor %rsp,%rdi
+ xor %rsp,%r8
+ xor %rsp,%r9
+ xor %rsp,%r10
+ xor %rsp,%r11
+ xor %rsp,%r12
+ xor %rsp,%r13
+ xor %rsp,%r14
+ xor %rsp,%r15
+ nop
+ xor %rbp,%rax
+ xor %rbp,%rcx
+ xor %rbp,%rdx
+ xor %rbp,%rbx
+ xor %rbp,%rsp
+ xor %rbp,%rbp
+ xor %rbp,%rsi
+ xor %rbp,%rdi
+ xor %rbp,%r8
+ xor %rbp,%r9
+ xor %rbp,%r10
+ xor %rbp,%r11
+ xor %rbp,%r12
+ xor %rbp,%r13
+ xor %rbp,%r14
+ xor %rbp,%r15
+ nop
+ xor %rsi,%rax
+ xor %rsi,%rcx
+ xor %rsi,%rdx
+ xor %rsi,%rbx
+ xor %rsi,%rsp
+ xor %rsi,%rbp
+ xor %rsi,%rsi
+ xor %rsi,%rdi
+ xor %rsi,%r8
+ xor %rsi,%r9
+ xor %rsi,%r10
+ xor %rsi,%r11
+ xor %rsi,%r12
+ xor %rsi,%r13
+ xor %rsi,%r14
+ xor %rsi,%r15
+ nop
+ xor %rdi,%rax
+ xor %rdi,%rcx
+ xor %rdi,%rdx
+ xor %rdi,%rbx
+ xor %rdi,%rsp
+ xor %rdi,%rbp
+ xor %rdi,%rsi
+ xor %rdi,%rdi
+ xor %rdi,%r8
+ xor %rdi,%r9
+ xor %rdi,%r10
+ xor %rdi,%r11
+ xor %rdi,%r12
+ xor %rdi,%r13
+ xor %rdi,%r14
+ xor %rdi,%r15
+ nop
+ xor %r8, %rax
+ xor %r8, %rcx
+ xor %r8, %rdx
+ xor %r8, %rbx
+ xor %r8, %rsp
+ xor %r8, %rbp
+ xor %r8, %rsi
+ xor %r8, %rdi
+ xor %r8, %r8
+ xor %r8, %r9
+ xor %r8, %r10
+ xor %r8, %r11
+ xor %r8, %r12
+ xor %r8, %r13
+ xor %r8, %r14
+ xor %r8, %r15
+ nop
+ xor %r12,%rax
+ xor %r12,%rcx
+ xor %r12,%rdx
+ xor %r12,%rbx
+ xor %r12,%rsp
+ xor %r12,%rbp
+ xor %r12,%rsi
+ xor %r12,%rdi
+ xor %r12,%r8
+ xor %r12,%r9
+ xor %r12,%r10
+ xor %r12,%r11
+ xor %r12,%r12
+ xor %r12,%r13
+ xor %r12,%r14
+ xor %r12,%r15
+ nop
+ xor %r15,%rax
+ xor %r15,%rcx
+ xor %r15,%rdx
+ xor %r15,%rbx
+ xor %r15,%rsp
+ xor %r15,%rbp
+ xor %r15,%rsi
+ xor %r15,%rdi
+ xor %r15,%r8
+ xor %r15,%r9
+ xor %r15,%r10
+ xor %r15,%r11
+ xor %r15,%r12
+ xor %r15,%r13
+ xor %r15,%r14
+ xor %r15,%r15
+
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl xor_s32
+ .type xor_s32, @function
+xor_s32:
+ .cfi_startproc
+ xor $-0x55667788,%rax
+ xor $-0x55667788,%rcx
+ xor $-0x55667788,%rdx
+ xor $-0x55667788,%rbx
+ xor $-0x55667788,%rsp
+ xor $-0x55667788,%rbp
+ xor $-0x55667788,%rsi
+ xor $-0x55667788,%rdi
+ xor $-0x55667788,%r8
+ xor $-0x55667788,%r9
+ xor $-0x55667788,%r10
+ xor $-0x55667788,%r11
+ xor $-0x55667788,%r12
+ xor $-0x55667788,%r13
+ xor $-0x55667788,%r14
+ xor $-0x55667788,%r15
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arith.c b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arith.c
new file mode 100644
index 0000000..1caf342
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arith.c
@@ -0,0 +1,74 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * arith.c
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+
+#include "asm_template.h"
+
+i64 Add_l(i64 ax) {
+ return _(ax) + 0x55667788;
+}
+i64 Add_q(i64 ax) {
+ return _(ax) + 0x5566778899aabbcc;
+}
+i64 Add(i64 ax) {
+ return _(ax) + a(64);
+}
+
+
+i64 Sub_l(i64 ax) {
+ return _(ax) - 0x55667788;
+}
+i64 Sub_q(i64 ax) {
+ return _(ax) - 0x5566778899aabbcc;
+}
+i64 Sub(i64 ax) {
+ return _(ax) - a(64);
+}
+
+
+i64 Mul_l(i64 ax) {
+ return _(ax) * 0x55667788;
+}
+i64 Mul_q(i64 ax) {
+ return _(ax) * 0x5566778899aabbcc;
+}
+i64 Mul(i64 ax) {
+ return _(ax) * a(64);
+}
+
+
+i64 Quo_l(i64 ax) {
+ return _(ax) / 0x55667788;
+}
+i64 Quo_q(i64 ax) {
+ return _(ax) / 0x5566778899aabbcc;
+}
+i64 Quo(i64 ax) {
+ return _(ax) / a(64);
+}
+
+
+u64 QuoU(u64 ax) {
+ return _(ax) / ua(64);
+}
+
+
+i64 Rem(i64 ax) {
+ return _(ax) % a(64);
+}
+u64 RemU(u64 ax) {
+ return _(ax) % ua(64);
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arith_const.c b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arith_const.c
new file mode 100644
index 0000000..f13932e
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arith_const.c
@@ -0,0 +1,115 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * binary_arith_const.c
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+
+#include "asm_template.h"
+
+void IncInt8c(u64 *ints) {
+ z(8) += 0x55;
+}
+void IncInt16c(u64 *ints) {
+ z(16) += 0x5566;
+}
+void IncInt32c(u64 *ints) {
+ z(32) += 0x55667788;
+}
+void IncInt64bc(u64 *ints) {
+ z(64) += 0x55;
+}
+void IncInt64lc(u64 *ints) {
+ z(64) += 0x55667788;
+}
+void IncInt64qc(u64 *ints) {
+ z(64) += 0x5566778899aabbcc;
+}
+
+void AddInt8c(u64 *ints) {
+ z(8) = a(8) + 0x55;
+}
+void AddInt16c(u64 *ints) {
+ z(16) = a(16) + 0x5566;
+}
+void AddInt32c(u64 *ints) {
+ z(32) = a(32) + 0x55667788;
+}
+void AddInt64bc(u64 *ints) {
+ z(64) = a(64) + 0x55;
+}
+void AddInt64lc(u64 *ints) {
+ z(64) = a(64) + 0x55667788;
+}
+void AddInt64qc(u64 *ints) {
+ z(64) = a(64) + 0x5566778899aabbcc;
+}
+
+void DecInt8c(u64 *ints) {
+ z(8) -= 0x55;
+}
+void DecInt16c(u64 *ints) {
+ z(16) -= 0x5566;
+}
+void DecInt32c(u64 *ints) {
+ z(32) -= 0x55667788;
+}
+void DecInt64bc(u64 *ints) {
+ z(64) -= 0x55;
+}
+void DecInt64lc(u64 *ints) {
+ z(64) -= 0x55667788;
+}
+void DecInt64qc(u64 *ints) {
+ z(64) -= 0x5566778899aabbcc;
+}
+
+void SubInt8c(u64 *ints) {
+ z(8) = a(8) - 0x55;
+}
+void SubInt16c(u64 *ints) {
+ z(16) = a(16) - 0x5566;
+}
+void SubInt32c(u64 *ints) {
+ z(32) = a(32) - 0x55667788;
+}
+void SubInt64bc(u64 *ints) {
+ z(64) = a(64) - 0x55;
+}
+void SubInt64lc(u64 *ints) {
+ z(64) = a(64) - 0x55667788;
+}
+void SubInt64qc(u64 *ints) {
+ z(64) = a(64) - 0x5566778899aabbcc;
+}
+
+
+void MulInt8c(u64 *ints) {
+ z(8) = a(8) * 0x55;
+}
+void MulInt16c(u64 *ints) {
+ z(16) = a(16) * 0x5566;
+}
+void MulInt32c(u64 *ints) {
+ z(32) = a(32) * 0x55667788;
+}
+void MulInt64bc(u64 *ints) {
+ z(64) = a(64) * 0x55;
+}
+void MulInt64lc(u64 *ints) {
+ z(64) = a(64) * 0x55667788;
+}
+void MulInt64qc(u64 *ints) {
+ z(64) = a(64) * 0x5566778899aabbcc;
+}
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/add.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/add.s
new file mode 100644
index 0000000..5e9502c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/add.s
@@ -0,0 +1,268 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl Add
+ .type Add, @function
+Add:
+ .cfi_startproc
+ add x0,x0,x0
+ add x0,x0,x1
+ add x0,x0,x2
+ add x0,x0,x3
+ add x0,x0,x4
+ add x0,x0,x5
+ add x0,x0,x6
+ add x0,x0,x7
+ add x0,x0,x8
+ add x0,x0,x9
+ add x0,x0,x10
+ add x0,x0,x11
+ add x0,x0,x12
+ add x0,x0,x13
+ add x0,x0,x14
+ add x0,x0,x15
+ add x0,x0,x16
+ add x0,x0,x17
+ add x0,x0,x18
+ add x0,x0,x19
+ add x0,x0,x20
+ add x0,x0,x21
+ add x0,x0,x22
+ add x0,x0,x23
+ add x0,x0,x24
+ add x0,x0,x25
+ add x0,x0,x26
+ add x0,x0,x27
+ add x0,x0,x28
+ add x0,x0,x29
+ add x0,x0,x30
+ nop
+ add x0,x1,x0
+ add x0,x1,x1
+ add x0,x1,x2
+ add x0,x1,x3
+ add x0,x1,x4
+ add x0,x1,x5
+ add x0,x1,x6
+ add x0,x1,x7
+ add x0,x1,x8
+ add x0,x1,x9
+ add x0,x1,x10
+ add x0,x1,x11
+ add x0,x1,x12
+ add x0,x1,x13
+ add x0,x1,x14
+ add x0,x1,x15
+ add x0,x1,x16
+ add x0,x1,x17
+ add x0,x1,x18
+ add x0,x1,x19
+ add x0,x1,x20
+ add x0,x1,x21
+ add x0,x1,x22
+ add x0,x1,x23
+ add x0,x1,x24
+ add x0,x1,x25
+ add x0,x1,x26
+ add x0,x1,x27
+ add x0,x1,x28
+ add x0,x1,x29
+ add x0,x1,x30
+ nop
+ add x0,x2,x0
+ add x0,x2,x1
+ add x0,x2,x2
+ add x0,x2,x3
+ add x0,x2,x4
+ add x0,x2,x5
+ add x0,x2,x6
+ add x0,x2,x7
+ add x0,x2,x8
+ add x0,x2,x9
+ add x0,x2,x10
+ add x0,x2,x11
+ add x0,x2,x12
+ add x0,x2,x13
+ add x0,x2,x14
+ add x0,x2,x15
+ add x0,x2,x16
+ add x0,x2,x17
+ add x0,x2,x18
+ add x0,x2,x19
+ add x0,x2,x20
+ add x0,x2,x21
+ add x0,x2,x22
+ add x0,x2,x23
+ add x0,x2,x24
+ add x0,x2,x25
+ add x0,x2,x26
+ add x0,x2,x27
+ add x0,x2,x28
+ add x0,x2,x29
+ add x0,x2,x30
+ nop
+ add x0,x30,x0
+ add x0,x30,x1
+ add x0,x30,x2
+ add x0,x30,x3
+ add x0,x30,x4
+ add x0,x30,x5
+ add x0,x30,x6
+ add x0,x30,x7
+ add x0,x30,x8
+ add x0,x30,x9
+ add x0,x30,x10
+ add x0,x30,x11
+ add x0,x30,x12
+ add x0,x30,x13
+ add x0,x30,x14
+ add x0,x30,x15
+ add x0,x30,x16
+ add x0,x30,x17
+ add x0,x30,x18
+ add x0,x30,x19
+ add x0,x30,x20
+ add x0,x30,x21
+ add x0,x30,x22
+ add x0,x30,x23
+ add x0,x30,x24
+ add x0,x30,x25
+ add x0,x30,x26
+ add x0,x30,x27
+ add x0,x30,x28
+ add x0,x30,x29
+ add x0,x30,x30
+ nop
+ add x1,x0,x0
+ add x1,x0,x1
+ add x1,x0,x2
+ add x1,x0,x3
+ add x1,x0,x4
+ add x1,x0,x5
+ add x1,x0,x6
+ add x1,x0,x7
+ add x1,x0,x8
+ add x1,x0,x9
+ add x1,x0,x10
+ add x1,x0,x11
+ add x1,x0,x12
+ add x1,x0,x13
+ add x1,x0,x14
+ add x1,x0,x15
+ add x1,x0,x16
+ add x1,x0,x17
+ add x1,x0,x18
+ add x1,x0,x19
+ add x1,x0,x20
+ add x1,x0,x21
+ add x1,x0,x22
+ add x1,x0,x23
+ add x1,x0,x24
+ add x1,x0,x25
+ add x1,x0,x26
+ add x1,x0,x27
+ add x1,x0,x28
+ add x1,x0,x29
+ add x1,x0,x30
+ nop
+ add x1,x1,x0
+ add x1,x1,x1
+ add x1,x1,x2
+ add x1,x1,x3
+ add x1,x1,x4
+ add x1,x1,x5
+ add x1,x1,x6
+ add x1,x1,x7
+ add x1,x1,x8
+ add x1,x1,x9
+ add x1,x1,x10
+ add x1,x1,x11
+ add x1,x1,x12
+ add x1,x1,x13
+ add x1,x1,x14
+ add x1,x1,x15
+ add x1,x1,x16
+ add x1,x1,x17
+ add x1,x1,x18
+ add x1,x1,x19
+ add x1,x1,x20
+ add x1,x1,x21
+ add x1,x1,x22
+ add x1,x1,x23
+ add x1,x1,x24
+ add x1,x1,x25
+ add x1,x1,x26
+ add x1,x1,x27
+ add x1,x1,x28
+ add x1,x1,x29
+ add x1,x1,x30
+ nop
+ add x1,x2,x0
+ add x1,x2,x1
+ add x1,x2,x2
+ add x1,x2,x3
+ add x1,x2,x4
+ add x1,x2,x5
+ add x1,x2,x6
+ add x1,x2,x7
+ add x1,x2,x8
+ add x1,x2,x9
+ add x1,x2,x10
+ add x1,x2,x11
+ add x1,x2,x12
+ add x1,x2,x13
+ add x1,x2,x14
+ add x1,x2,x15
+ add x1,x2,x16
+ add x1,x2,x17
+ add x1,x2,x18
+ add x1,x2,x19
+ add x1,x2,x20
+ add x1,x2,x21
+ add x1,x2,x22
+ add x1,x2,x23
+ add x1,x2,x24
+ add x1,x2,x25
+ add x1,x2,x26
+ add x1,x2,x27
+ add x1,x2,x28
+ add x1,x2,x29
+ add x1,x2,x30
+ nop
+ add x1,x30,x0
+ add x1,x30,x1
+ add x1,x30,x2
+ add x1,x30,x3
+ add x1,x30,x4
+ add x1,x30,x5
+ add x1,x30,x6
+ add x1,x30,x7
+ add x1,x30,x8
+ add x1,x30,x9
+ add x1,x30,x10
+ add x1,x30,x11
+ add x1,x30,x12
+ add x1,x30,x13
+ add x1,x30,x14
+ add x1,x30,x15
+ add x1,x30,x16
+ add x1,x30,x17
+ add x1,x30,x18
+ add x1,x30,x19
+ add x1,x30,x20
+ add x1,x30,x21
+ add x1,x30,x22
+ add x1,x30,x23
+ add x1,x30,x24
+ add x1,x30,x25
+ add x1,x30,x26
+ add x1,x30,x27
+ add x1,x30,x28
+ add x1,x30,x29
+ add x1,x30,x30
+ nop
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/and.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/and.s
new file mode 100644
index 0000000..71dc7dd
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/and.s
@@ -0,0 +1,208 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl and
+ .type and, @function
+and:
+ .cfi_startproc
+ and x0,x0,x0
+ and x0,x0,x1
+ and x0,x0,x2
+ and x0,x0,x3
+ and x0,x0,x4
+ and x0,x0,x5
+ and x0,x0,x6
+ and x0,x0,x7
+ and x0,x0,x8
+ and x0,x0,x9
+ and x0,x0,x10
+ and x0,x0,x11
+ and x0,x0,x12
+ and x0,x0,x13
+ and x0,x0,x14
+ and x0,x0,x15
+ and x0,x0,x16
+ and x0,x0,x17
+ and x0,x0,x18
+ and x0,x0,x19
+ and x0,x0,x20
+ and x0,x0,x21
+ and x0,x0,x22
+ and x0,x0,x23
+ and x0,x0,x24
+ and x0,x0,x25
+ and x0,x0,x26
+ and x0,x0,x27
+ and x0,x0,x28
+ and x0,x0,x29
+ and x0,x0,x30
+ nop
+ and x1,x1,x0
+ and x1,x1,x1
+ and x1,x1,x2
+ and x1,x1,x3
+ and x1,x1,x4
+ and x1,x1,x5
+ and x1,x1,x6
+ and x1,x1,x7
+ and x1,x1,x8
+ and x1,x1,x9
+ and x1,x1,x10
+ and x1,x1,x11
+ and x1,x1,x12
+ and x1,x1,x13
+ and x1,x1,x14
+ and x1,x1,x15
+ and x1,x1,x16
+ and x1,x1,x17
+ and x1,x1,x18
+ and x1,x1,x19
+ and x1,x1,x20
+ and x1,x1,x21
+ and x1,x1,x22
+ and x1,x1,x23
+ and x1,x1,x24
+ and x1,x1,x25
+ and x1,x1,x26
+ and x1,x1,x27
+ and x1,x1,x28
+ and x1,x1,x29
+ and x1,x1,x30
+ nop
+ and x2,x2,x0
+ and x2,x2,x1
+ and x2,x2,x2
+ and x2,x2,x3
+ and x2,x2,x4
+ and x2,x2,x5
+ and x2,x2,x6
+ and x2,x2,x7
+ and x2,x2,x8
+ and x2,x2,x9
+ and x2,x2,x10
+ and x2,x2,x11
+ and x2,x2,x12
+ and x2,x2,x13
+ and x2,x2,x14
+ and x2,x2,x15
+ and x2,x2,x16
+ and x2,x2,x17
+ and x2,x2,x18
+ and x2,x2,x19
+ and x2,x2,x20
+ and x2,x2,x21
+ and x2,x2,x22
+ and x2,x2,x23
+ and x2,x2,x24
+ and x2,x2,x25
+ and x2,x2,x26
+ and x2,x2,x27
+ and x2,x2,x28
+ and x2,x2,x29
+ and x2,x2,x30
+ nop
+ and x30,x30,x0
+ and x30,x30,x1
+ and x30,x30,x2
+ and x30,x30,x3
+ and x30,x30,x4
+ and x30,x30,x5
+ and x30,x30,x6
+ and x30,x30,x7
+ and x30,x30,x8
+ and x30,x30,x9
+ and x30,x30,x10
+ and x30,x30,x11
+ and x30,x30,x12
+ and x30,x30,x13
+ and x30,x30,x14
+ and x30,x30,x15
+ and x30,x30,x16
+ and x30,x30,x17
+ and x30,x30,x18
+ and x30,x30,x19
+ and x30,x30,x20
+ and x30,x30,x21
+ and x30,x30,x22
+ and x30,x30,x23
+ and x30,x30,x24
+ and x30,x30,x25
+ and x30,x30,x26
+ and x30,x30,x27
+ and x30,x30,x28
+ and x30,x30,x29
+ and x30,x30,x30
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl and_const
+ .type and_const, @function
+and_const:
+ .cfi_startproc
+ and x0,x0,#0x5555555555555555
+ and x0,x0,#0xaaaaaaaaaaaaaaaa
+ and x0,x0,#0x1111111111111111
+ and x0,x0,#0x8888888888888888
+ and x0,x0,#0x4444444444444444
+ and x0,x0,#0x2222222222222222
+ and x0,x0,#0x3333333333333333
+ and x0,x0,#0x9999999999999999
+ and x0,x0,#0xcccccccccccccccc
+ and x0,x0,#0x6666666666666666
+ and x0,x0,#0x7777777777777777
+ and x0,x0,#0xbbbbbbbbbbbbbbbb
+ and x0,x0,#0xdddddddddddddddd
+ and x0,x0,#0xeeeeeeeeeeeeeeee
+ and x0,x0,#0xfffffffffffffffe
+ nop
+ and x1,x1,#0x5555555555555555
+ and x1,x1,#0xaaaaaaaaaaaaaaaa
+ and x1,x1,#0x1111111111111111
+ and x1,x1,#0x8888888888888888
+ and x1,x1,#0x4444444444444444
+ and x1,x1,#0x2222222222222222
+ and x1,x1,#0x3333333333333333
+ and x1,x1,#0x9999999999999999
+ and x1,x1,#0xcccccccccccccccc
+ and x1,x1,#0x6666666666666666
+ and x1,x1,#0x7777777777777777
+ and x1,x1,#0xbbbbbbbbbbbbbbbb
+ and x1,x1,#0xdddddddddddddddd
+ and x1,x1,#0xeeeeeeeeeeeeeeee
+ and x1,x1,#0xfffffffffffffffe
+ nop
+ and x2,x2,#0x5555555555555555
+ and x2,x2,#0xaaaaaaaaaaaaaaaa
+ and x2,x2,#0x1111111111111111
+ and x2,x2,#0x8888888888888888
+ and x2,x2,#0x4444444444444444
+ and x2,x2,#0x2222222222222222
+ and x2,x2,#0x3333333333333333
+ and x2,x2,#0x9999999999999999
+ and x2,x2,#0xcccccccccccccccc
+ and x2,x2,#0x6666666666666666
+ and x2,x2,#0x7777777777777777
+ and x2,x2,#0xbbbbbbbbbbbbbbbb
+ and x2,x2,#0xdddddddddddddddd
+ and x2,x2,#0xeeeeeeeeeeeeeeee
+ and x2,x2,#0xfffffffffffffffe
+ nop
+ and x30,x30,#0x5555555555555555
+ and x30,x30,#0xaaaaaaaaaaaaaaaa
+ and x30,x30,#0x1111111111111111
+ and x30,x30,#0x8888888888888888
+ and x30,x30,#0x4444444444444444
+ and x30,x30,#0x2222222222222222
+ and x30,x30,#0x3333333333333333
+ and x30,x30,#0x9999999999999999
+ and x30,x30,#0xcccccccccccccccc
+ and x30,x30,#0x6666666666666666
+ and x30,x30,#0x7777777777777777
+ and x30,x30,#0xbbbbbbbbbbbbbbbb
+ and x30,x30,#0xdddddddddddddddd
+ and x30,x30,#0xeeeeeeeeeeeeeeee
+ and x30,x30,#0xfffffffffffffffe
+ ret
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/arith.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/arith.go
new file mode 100644
index 0000000..2b3b234
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/arith.go
@@ -0,0 +1,109 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * arith.go
+ *
+ * Created on May 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package arm64
+
+//go:nosplit
+func add_1(z int64) int64 {
+ return z + 1
+}
+//go:nosplit
+func add_2(z int64) int64 {
+ return z + 2
+}
+//go:nosplit
+func add_3(z int64) int64 {
+ return z + 3
+}
+//go:nosplit
+func add_255(z int64) int64 {
+ return z + 255
+}
+//go:nosplit
+func add_256(z int64) int64 {
+ return z + 256
+}
+//go:nosplit
+func add_2048(z int64) int64 {
+ return z + 2048
+}
+//go:nosplit
+func add_4095(z int64) int64 {
+ return z + 4095
+}
+
+
+
+//go:nosplit
+func sub_1(z int64) int64 {
+ return z - 1
+}
+//go:nosplit
+func sub_2(z int64) int64 {
+ return z - 2
+}
+//go:nosplit
+func sub_3(z int64) int64 {
+ return z - 3
+}
+//go:nosplit
+func sub_255(z int64) int64 {
+ return z - 255
+}
+//go:nosplit
+func sub_256(z int64) int64 {
+ return z - 256
+}
+//go:nosplit
+func sub_2048(z int64) int64 {
+ return z - 2048
+}
+//go:nosplit
+func sub_4095(z int64) int64 {
+ return z - 4095
+}
+
+
+
+
+//go:nosplit
+func mul_2(z int64) int64 {
+ return z * 2
+}
+//go:nosplit
+func mul_3(z int64) int64 {
+ return z * 3
+}
+//go:nosplit
+func mul_333(z int64) int64 {
+ return z * 333
+}
+//go:nosplit
+func mul_56789(z int64) int64 {
+ return z * 56789
+}
+
+
+
+
+//go:nosplit
+func quo(z int64, a int64) int64 {
+ return z / a
+}
+//go:nosplit
+func rem(z int64, a int64) int64 {
+ return z % a
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/bitmask_immediate.c b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/bitmask_immediate.c
new file mode 100644
index 0000000..55ecd54
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/bitmask_immediate.c
@@ -0,0 +1,35 @@
+// taken from https://stackoverflow.com/questions/30904718/range-of-immediate-values-in-armv8-a64-assembly/33265035#33265035
+
+#include
+#include
+
+// Dumps all legal bitmask immediates for ARM64
+// Total number of unique 64-bit patterns:
+// 1*2 + 3*4 + 7*8 + 15*16 + 31*32 + 63*64 = 5334
+
+const char *uint64_to_binary(uint64_t x) {
+ static char b[65];
+ unsigned i;
+ for (i = 0; i < 64; i++, x <<= 1)
+ b[i] = (0x8000000000000000ULL & x)? '1' : '0';
+ b[64] = '\0';
+ return b;
+}
+
+int main() {
+ uint64_t result;
+ unsigned size, length, rotation, e;
+ for (size = 2; size <= 64; size *= 2)
+ for (length = 1; length < size; ++length) {
+ result = 0xffffffffffffffffULL >> (64 - length);
+ for (e = size; e < 64; e *= 2)
+ result |= result << e;
+ for (rotation = 0; rotation < size; ++rotation) {
+ printf("0x%016llx %s (size=%u, length=%u, rotation=%u)\n",
+ (unsigned long long)result, uint64_to_binary(result),
+ size, length, rotation);
+ result = (result >> 63) | (result << 1);
+ }
+ }
+ return 0;
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/bitwise.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/bitwise.go
new file mode 100644
index 0000000..21c5a1d
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/bitwise.go
@@ -0,0 +1,110 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * arith.go
+ *
+ * Created on May 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package arm64
+
+//go:nosplit
+func and_1(z int64) int64 {
+ return z & 1
+}
+//go:nosplit
+func and_2(z int64) int64 {
+ return z & 2
+}
+//go:nosplit
+func and_3(z int64) int64 {
+ return z & 3
+}
+//go:nosplit
+func and_255(z int64) int64 {
+ return z & 255
+}
+//go:nosplit
+func and_256(z int64) int64 {
+ return z & 256
+}
+//go:nosplit
+func and_2048(z int64) int64 {
+ return z & 2048
+}
+//go:nosplit
+func and_4095(z int64) int64 {
+ return z & 4095
+}
+
+
+
+//go:nosplit
+func or_1(z int64) int64 {
+ return z | 1
+}
+//go:nosplit
+func or_2(z int64) int64 {
+ return z | 2
+}
+//go:nosplit
+func or_3(z int64) int64 {
+ return z | 3
+}
+//go:nosplit
+func or_255(z int64) int64 {
+ return z | 255
+}
+//go:nosplit
+func or_256(z int64) int64 {
+ return z | 256
+}
+//go:nosplit
+func or_2048(z int64) int64 {
+ return z | 2048
+}
+//go:nosplit
+func or_4095(z int64) int64 {
+ return z | 4095
+}
+
+
+
+//go:nosplit
+func xor_1(z int64) int64 {
+ return z ^ 1
+}
+//go:nosplit
+func xor_2(z int64) int64 {
+ return z ^ 2
+}
+//go:nosplit
+func xor_3(z int64) int64 {
+ return z ^ 3
+}
+//go:nosplit
+func xor_255(z int64) int64 {
+ return z ^ 255
+}
+//go:nosplit
+func xor_256(z int64) int64 {
+ return z ^ 256
+}
+//go:nosplit
+func xor_2048(z int64) int64 {
+ return z ^ 2048
+}
+//go:nosplit
+func xor_4095(z int64) int64 {
+ return z ^ 4095
+}
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/dump.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/dump.s
new file mode 100644
index 0000000..0722f64
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/dump.s
@@ -0,0 +1,14 @@
+ .file "dump.s"
+ .text
+ .p2align 4,,15
+ .globl main
+ .type main, @function
+main:
+ .cfi_startproc
+ .byte 0xfd, 0x7, 0x40, 0xf9, 0x20, 0x0, 0x80, 0xd2, 0xa0, 0x43, 0x0, 0xf9, 0xc0, 0x3, 0x5f, 0xd6
+ nop
+ .byte 0xfd, 0x7, 0x40, 0xf9, 0xa0, 0x43, 0x40, 0xf9, 0x0, 0x4, 0x0, 0x91, 0xa0, 0x43, 0x0, 0xf9, 0xc0, 0x3, 0x5f, 0xd6
+ nop
+ .byte 0xfd, 0x7, 0x40, 0xf9, 0xa0, 0x23, 0x40, 0xf9, 0xa1, 0x43, 0x40, 0xf9, 0x0, 0x0, 0x1, 0x8b, 0xa0, 0x23, 0x0, 0xf9, 0xc0, 0x3, 0x5f, 0xd6
+ ret
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/load.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/load.s
new file mode 100644
index 0000000..cc8620c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/load.s
@@ -0,0 +1,246 @@
+ .file "set.s"
+ .text
+ .p2align 4,,15
+ .globl load
+ .type load, @function
+load:
+ .cfi_startproc
+ ldr x0, [x29, #0]
+ ldr x0, [x29, #8]
+ ldr x0, [x29, #16]
+ ldr x0, [x29, #32]
+ ldr x0, [x29, #64]
+ ldr x0, [x29, #120]
+ ldr x0, [x29, #128]
+ ldr x0, [x29, #248]
+ ldr x0, [x29, #256]
+ ldr x0, [x29, #504]
+ ldr x0, [x29, #512]
+ ldr x0, [x29, #1016]
+ ldr x0, [x29, #1024]
+ ldr x0, [x29, #2040]
+ ldr x0, [x29, #2048]
+ ldr x0, [x29, #4088]
+ ldr x0, [x29, #4096]
+ ldr x0, [x29, #32752]
+ ldr x0, [x29, #32760]
+ nop
+ ldr x1, [x29, #0]
+ ldr x1, [x29, #8]
+ ldr x1, [x29, #16]
+ ldr x1, [x29, #32]
+ ldr x1, [x29, #64]
+ ldr x1, [x29, #120]
+ ldr x1, [x29, #128]
+ ldr x1, [x29, #248]
+ ldr x1, [x29, #256]
+ ldr x1, [x29, #504]
+ ldr x1, [x29, #512]
+ ldr x1, [x29, #1016]
+ ldr x1, [x29, #1024]
+ ldr x1, [x29, #2040]
+ ldr x1, [x29, #2048]
+ ldr x1, [x29, #4088]
+ ldr x1, [x29, #4096]
+ ldr x1, [x29, #32752]
+ ldr x1, [x29, #32760]
+ nop
+ ldr x2, [x29, #0]
+ ldr x2, [x29, #8]
+ ldr x2, [x29, #16]
+ ldr x2, [x29, #32]
+ ldr x2, [x29, #64]
+ ldr x2, [x29, #120]
+ ldr x2, [x29, #128]
+ ldr x2, [x29, #248]
+ ldr x2, [x29, #256]
+ ldr x2, [x29, #504]
+ ldr x2, [x29, #512]
+ ldr x2, [x29, #1016]
+ ldr x2, [x29, #1024]
+ ldr x2, [x29, #2040]
+ ldr x2, [x29, #2048]
+ ldr x2, [x29, #4088]
+ ldr x2, [x29, #4096]
+ ldr x2, [x29, #32752]
+ ldr x2, [x29, #32760]
+ nop
+ ldr x3, [x29, #0]
+ ldr x3, [x29, #8]
+ ldr x3, [x29, #16]
+ ldr x3, [x29, #32]
+ ldr x3, [x29, #64]
+ ldr x3, [x29, #120]
+ ldr x3, [x29, #128]
+ ldr x3, [x29, #248]
+ ldr x3, [x29, #256]
+ ldr x3, [x29, #504]
+ ldr x3, [x29, #512]
+ ldr x3, [x29, #1016]
+ ldr x3, [x29, #1024]
+ ldr x3, [x29, #2040]
+ ldr x3, [x29, #2048]
+ ldr x3, [x29, #4088]
+ ldr x3, [x29, #4096]
+ ldr x3, [x29, #32752]
+ ldr x3, [x29, #32760]
+ nop
+ ldr x4, [x29, #0]
+ ldr x4, [x29, #8]
+ ldr x4, [x29, #16]
+ ldr x4, [x29, #32]
+ ldr x4, [x29, #64]
+ ldr x4, [x29, #120]
+ ldr x4, [x29, #128]
+ ldr x4, [x29, #248]
+ ldr x4, [x29, #256]
+ ldr x4, [x29, #504]
+ ldr x4, [x29, #512]
+ ldr x4, [x29, #1016]
+ ldr x4, [x29, #1024]
+ ldr x4, [x29, #2040]
+ ldr x4, [x29, #2048]
+ ldr x4, [x29, #4088]
+ ldr x4, [x29, #4096]
+ ldr x4, [x29, #32752]
+ ldr x4, [x29, #32760]
+ nop
+ ldr x30, [x29, #0]
+ ldr x30, [x29, #8]
+ ldr x30, [x29, #16]
+ ldr x30, [x29, #32]
+ ldr x30, [x29, #64]
+ ldr x30, [x29, #120]
+ ldr x30, [x29, #128]
+ ldr x30, [x29, #248]
+ ldr x30, [x29, #256]
+ ldr x30, [x29, #504]
+ ldr x30, [x29, #512]
+ ldr x30, [x29, #1016]
+ ldr x30, [x29, #1024]
+ ldr x30, [x29, #2040]
+ ldr x30, [x29, #2048]
+ ldr x30, [x29, #4088]
+ ldr x30, [x29, #4096]
+ ldr x30, [x29, #32752]
+ ldr x30, [x29, #32760]
+ nop
+ ldr x0, [x29, x0]
+ ldr x0, [x29, x1]
+ ldr x0, [x29, x2]
+ ldr x0, [x29, x3]
+ ldr x0, [x29, x30]
+ nop
+ ldr x1, [x29, x0]
+ ldr x1, [x29, x1]
+ ldr x1, [x29, x2]
+ ldr x1, [x29, x3]
+ ldr x1, [x29, x30]
+ nop
+ ldr x2, [x29, x0]
+ ldr x2, [x29, x1]
+ ldr x2, [x29, x2]
+ ldr x2, [x29, x3]
+ ldr x2, [x29, x30]
+ nop
+ ldr x3, [x29, x0]
+ ldr x3, [x29, x1]
+ ldr x3, [x29, x2]
+ ldr x3, [x29, x3]
+ ldr x3, [x29, x30]
+ nop
+ ldr x30, [x29, x0]
+ ldr x30, [x29, x1]
+ ldr x30, [x29, x2]
+ ldr x30, [x29, x3]
+ ldr x30, [x29, x30]
+ ret
+ .cfi_endproc
+
+ .p2align 4,,15
+ .globl load_c
+ .type load_c, @function
+load_c:
+ .cfi_startproc
+ mov x0, #0
+ mov x0, #1
+ mov x0, #2
+ mov x0, #3
+ mov x0, #4
+ mov x0, #8
+ mov x0, #15
+ mov x0, #16
+ mov x0, #31
+ mov x0, #32
+ mov x0, #255
+ mov x0, #256
+ mov x0, #4095
+ mov x0, #4096
+ mov x0, #65535
+ nop
+ mov x1, #0
+ mov x1, #1
+ mov x1, #2
+ mov x1, #3
+ mov x1, #4
+ mov x1, #8
+ mov x1, #15
+ mov x1, #16
+ mov x1, #31
+ mov x1, #32
+ mov x1, #255
+ mov x1, #256
+ mov x1, #4095
+ mov x1, #4096
+ mov x1, #65535
+ nop
+ mov x2, #0
+ mov x2, #1
+ mov x2, #2
+ mov x2, #3
+ mov x2, #4
+ mov x2, #8
+ mov x2, #15
+ mov x2, #16
+ mov x2, #31
+ mov x2, #32
+ mov x2, #255
+ mov x2, #256
+ mov x2, #4095
+ mov x2, #4096
+ mov x2, #65535
+ nop
+ mov x30, #0
+ mov x30, #1
+ mov x30, #2
+ mov x30, #3
+ mov x30, #4
+ mov x30, #8
+ mov x30, #15
+ mov x30, #16
+ mov x30, #31
+ mov x30, #32
+ mov x30, #255
+ mov x30, #256
+ mov x30, #4095
+ mov x30, #4096
+ mov x30, #65535
+ ret
+ .cfi_endproc
+
+ .p2align 4,,15
+ .globl load_from_stack
+ .type load_from_stack, @function
+load_from_stack:
+ .cfi_startproc
+ ldr x0, [sp, #8]
+ ldr x1, [sp, #8]
+ ldr x2, [sp, #8]
+ ldr x3, [sp, #8]
+ ldr x4, [sp, #8]
+ ldr x28, [sp, #8]
+ ldr x29, [sp, #8]
+ ldr x30, [sp, #8]
+ ret
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/mov.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/mov.s
new file mode 100644
index 0000000..648d003
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/mov.s
@@ -0,0 +1,49 @@
+ .p2align 4,,15
+ .globl mov
+ .type mov, @function
+mov:
+ .cfi_startproc
+ mov x0, x0
+ mov x0, x1
+ mov x0, x2
+ mov x0, x3
+ mov x0, x15
+ mov x0, x30
+ nop
+ mov x1, x0
+ mov x1, x1
+ mov x1, x2
+ mov x1, x3
+ mov x1, x15
+ mov x1, x30
+ nop
+ mov x2, x0
+ mov x2, x1
+ mov x2, x2
+ mov x2, x3
+ mov x2, x15
+ mov x2, x30
+ nop
+ mov x3, x0
+ mov x3, x1
+ mov x3, x2
+ mov x3, x3
+ mov x3, x15
+ mov x3, x30
+ nop
+ mov x15, x0
+ mov x15, x1
+ mov x15, x2
+ mov x15, x3
+ mov x15, x15
+ mov x15, x30
+ nop
+ mov x30, x0
+ mov x30, x1
+ mov x30, x2
+ mov x30, x3
+ mov x30, x15
+ mov x30, x30
+ ret
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/mul.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/mul.s
new file mode 100644
index 0000000..95c9d59
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/mul.s
@@ -0,0 +1,172 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl mul
+ .type mul, @function
+mul:
+ .cfi_startproc
+ mul x0,x0,x0
+ mul x0,x0,x1
+ mul x0,x0,x2
+ mul x0,x0,x3
+ mul x0,x0,x4
+ mul x0,x0,x5
+ mul x0,x0,x6
+ mul x0,x0,x7
+ mul x0,x0,x8
+ mul x0,x0,x9
+ mul x0,x0,x10
+ mul x0,x0,x11
+ mul x0,x0,x12
+ mul x0,x0,x13
+ mul x0,x0,x14
+ mul x0,x0,x15
+ mul x0,x0,x16
+ mul x0,x0,x17
+ mul x0,x0,x18
+ mul x0,x0,x19
+ mul x0,x0,x20
+ mul x0,x0,x21
+ mul x0,x0,x22
+ mul x0,x0,x23
+ mul x0,x0,x24
+ mul x0,x0,x25
+ mul x0,x0,x26
+ mul x0,x0,x27
+ mul x0,x0,x28
+ mul x0,x0,x29
+ mul x0,x0,x30
+ nop
+ mul x1,x1,x0
+ mul x1,x1,x1
+ mul x1,x1,x2
+ mul x1,x1,x3
+ mul x1,x1,x4
+ mul x1,x1,x5
+ mul x1,x1,x6
+ mul x1,x1,x7
+ mul x1,x1,x8
+ mul x1,x1,x9
+ mul x1,x1,x10
+ mul x1,x1,x11
+ mul x1,x1,x12
+ mul x1,x1,x13
+ mul x1,x1,x14
+ mul x1,x1,x15
+ mul x1,x1,x16
+ mul x1,x1,x17
+ mul x1,x1,x18
+ mul x1,x1,x19
+ mul x1,x1,x20
+ mul x1,x1,x21
+ mul x1,x1,x22
+ mul x1,x1,x23
+ mul x1,x1,x24
+ mul x1,x1,x25
+ mul x1,x1,x26
+ mul x1,x1,x27
+ mul x1,x1,x28
+ mul x1,x1,x29
+ mul x1,x1,x30
+ nop
+ mul x2,x2,x0
+ mul x2,x2,x1
+ mul x2,x2,x2
+ mul x2,x2,x3
+ mul x2,x2,x4
+ mul x2,x2,x5
+ mul x2,x2,x6
+ mul x2,x2,x7
+ mul x2,x2,x8
+ mul x2,x2,x9
+ mul x2,x2,x10
+ mul x2,x2,x11
+ mul x2,x2,x12
+ mul x2,x2,x13
+ mul x2,x2,x14
+ mul x2,x2,x15
+ mul x2,x2,x16
+ mul x2,x2,x17
+ mul x2,x2,x18
+ mul x2,x2,x19
+ mul x2,x2,x20
+ mul x2,x2,x21
+ mul x2,x2,x22
+ mul x2,x2,x23
+ mul x2,x2,x24
+ mul x2,x2,x25
+ mul x2,x2,x26
+ mul x2,x2,x27
+ mul x2,x2,x28
+ mul x2,x2,x29
+ mul x2,x2,x30
+ nop
+ mul x3,x3,x0
+ mul x3,x3,x1
+ mul x3,x3,x2
+ mul x3,x3,x3
+ mul x3,x3,x4
+ mul x3,x3,x5
+ mul x3,x3,x6
+ mul x3,x3,x7
+ mul x3,x3,x8
+ mul x3,x3,x9
+ mul x3,x3,x10
+ mul x3,x3,x11
+ mul x3,x3,x12
+ mul x3,x3,x13
+ mul x3,x3,x14
+ mul x3,x3,x15
+ mul x3,x3,x16
+ mul x3,x3,x17
+ mul x3,x3,x18
+ mul x3,x3,x19
+ mul x3,x3,x20
+ mul x3,x3,x21
+ mul x3,x3,x22
+ mul x3,x3,x23
+ mul x3,x3,x24
+ mul x3,x3,x25
+ mul x3,x3,x26
+ mul x3,x3,x27
+ mul x3,x3,x28
+ mul x3,x3,x29
+ mul x3,x3,x30
+ nop
+ mul x30,x30,x0
+ mul x30,x30,x1
+ mul x30,x30,x2
+ mul x30,x30,x3
+ mul x30,x30,x4
+ mul x30,x30,x5
+ mul x30,x30,x6
+ mul x30,x30,x7
+ mul x30,x30,x8
+ mul x30,x30,x9
+ mul x30,x30,x10
+ mul x30,x30,x11
+ mul x30,x30,x12
+ mul x30,x30,x13
+ mul x30,x30,x14
+ mul x30,x30,x15
+ mul x30,x30,x16
+ mul x30,x30,x17
+ mul x30,x30,x18
+ mul x30,x30,x19
+ mul x30,x30,x20
+ mul x30,x30,x21
+ mul x30,x30,x22
+ mul x30,x30,x23
+ mul x30,x30,x24
+ mul x30,x30,x25
+ mul x30,x30,x26
+ mul x30,x30,x27
+ mul x30,x30,x28
+ mul x30,x30,x29
+ mul x30,x30,x30
+ nop
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/neg.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/neg.s
new file mode 100644
index 0000000..b2e7bd2
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/neg.s
@@ -0,0 +1,172 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl neg
+ .type neg, @function
+neg:
+ .cfi_startproc
+ neg x0,x0
+ neg x0,x1
+ neg x0,x2
+ neg x0,x3
+ neg x0,x4
+ neg x0,x5
+ neg x0,x6
+ neg x0,x7
+ neg x0,x8
+ neg x0,x9
+ neg x0,x10
+ neg x0,x11
+ neg x0,x12
+ neg x0,x13
+ neg x0,x14
+ neg x0,x15
+ neg x0,x16
+ neg x0,x17
+ neg x0,x18
+ neg x0,x19
+ neg x0,x20
+ neg x0,x21
+ neg x0,x22
+ neg x0,x23
+ neg x0,x24
+ neg x0,x25
+ neg x0,x26
+ neg x0,x27
+ neg x0,x28
+ neg x0,x29
+ neg x0,x30
+ nop
+ neg x1,x0
+ neg x1,x1
+ neg x1,x2
+ neg x1,x3
+ neg x1,x4
+ neg x1,x5
+ neg x1,x6
+ neg x1,x7
+ neg x1,x8
+ neg x1,x9
+ neg x1,x10
+ neg x1,x11
+ neg x1,x12
+ neg x1,x13
+ neg x1,x14
+ neg x1,x15
+ neg x1,x16
+ neg x1,x17
+ neg x1,x18
+ neg x1,x19
+ neg x1,x20
+ neg x1,x21
+ neg x1,x22
+ neg x1,x23
+ neg x1,x24
+ neg x1,x25
+ neg x1,x26
+ neg x1,x27
+ neg x1,x28
+ neg x1,x29
+ neg x1,x30
+ nop
+ neg x2,x0
+ neg x2,x1
+ neg x2,x2
+ neg x2,x3
+ neg x2,x4
+ neg x2,x5
+ neg x2,x6
+ neg x2,x7
+ neg x2,x8
+ neg x2,x9
+ neg x2,x10
+ neg x2,x11
+ neg x2,x12
+ neg x2,x13
+ neg x2,x14
+ neg x2,x15
+ neg x2,x16
+ neg x2,x17
+ neg x2,x18
+ neg x2,x19
+ neg x2,x20
+ neg x2,x21
+ neg x2,x22
+ neg x2,x23
+ neg x2,x24
+ neg x2,x25
+ neg x2,x26
+ neg x2,x27
+ neg x2,x28
+ neg x2,x29
+ neg x2,x30
+ nop
+ neg x3,x0
+ neg x3,x1
+ neg x3,x2
+ neg x3,x3
+ neg x3,x4
+ neg x3,x5
+ neg x3,x6
+ neg x3,x7
+ neg x3,x8
+ neg x3,x9
+ neg x3,x10
+ neg x3,x11
+ neg x3,x12
+ neg x3,x13
+ neg x3,x14
+ neg x3,x15
+ neg x3,x16
+ neg x3,x17
+ neg x3,x18
+ neg x3,x19
+ neg x3,x20
+ neg x3,x21
+ neg x3,x22
+ neg x3,x23
+ neg x3,x24
+ neg x3,x25
+ neg x3,x26
+ neg x3,x27
+ neg x3,x28
+ neg x3,x29
+ neg x3,x30
+ nop
+ neg x30,x0
+ neg x30,x1
+ neg x30,x2
+ neg x30,x3
+ neg x30,x4
+ neg x30,x5
+ neg x30,x6
+ neg x30,x7
+ neg x30,x8
+ neg x30,x9
+ neg x30,x10
+ neg x30,x11
+ neg x30,x12
+ neg x30,x13
+ neg x30,x14
+ neg x30,x15
+ neg x30,x16
+ neg x30,x17
+ neg x30,x18
+ neg x30,x19
+ neg x30,x20
+ neg x30,x21
+ neg x30,x22
+ neg x30,x23
+ neg x30,x24
+ neg x30,x25
+ neg x30,x26
+ neg x30,x27
+ neg x30,x28
+ neg x30,x29
+ neg x30,x30
+ nop
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/not.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/not.s
new file mode 100644
index 0000000..1e3cfe6
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/not.s
@@ -0,0 +1,172 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl not
+ .type not, @function
+not:
+ .cfi_startproc
+ mvn x0,x0
+ mvn x0,x1
+ mvn x0,x2
+ mvn x0,x3
+ mvn x0,x4
+ mvn x0,x5
+ mvn x0,x6
+ mvn x0,x7
+ mvn x0,x8
+ mvn x0,x9
+ mvn x0,x10
+ mvn x0,x11
+ mvn x0,x12
+ mvn x0,x13
+ mvn x0,x14
+ mvn x0,x15
+ mvn x0,x16
+ mvn x0,x17
+ mvn x0,x18
+ mvn x0,x19
+ mvn x0,x20
+ mvn x0,x21
+ mvn x0,x22
+ mvn x0,x23
+ mvn x0,x24
+ mvn x0,x25
+ mvn x0,x26
+ mvn x0,x27
+ mvn x0,x28
+ mvn x0,x29
+ mvn x0,x30
+ nop
+ mvn x1,x0
+ mvn x1,x1
+ mvn x1,x2
+ mvn x1,x3
+ mvn x1,x4
+ mvn x1,x5
+ mvn x1,x6
+ mvn x1,x7
+ mvn x1,x8
+ mvn x1,x9
+ mvn x1,x10
+ mvn x1,x11
+ mvn x1,x12
+ mvn x1,x13
+ mvn x1,x14
+ mvn x1,x15
+ mvn x1,x16
+ mvn x1,x17
+ mvn x1,x18
+ mvn x1,x19
+ mvn x1,x20
+ mvn x1,x21
+ mvn x1,x22
+ mvn x1,x23
+ mvn x1,x24
+ mvn x1,x25
+ mvn x1,x26
+ mvn x1,x27
+ mvn x1,x28
+ mvn x1,x29
+ mvn x1,x30
+ nop
+ mvn x2,x0
+ mvn x2,x1
+ mvn x2,x2
+ mvn x2,x3
+ mvn x2,x4
+ mvn x2,x5
+ mvn x2,x6
+ mvn x2,x7
+ mvn x2,x8
+ mvn x2,x9
+ mvn x2,x10
+ mvn x2,x11
+ mvn x2,x12
+ mvn x2,x13
+ mvn x2,x14
+ mvn x2,x15
+ mvn x2,x16
+ mvn x2,x17
+ mvn x2,x18
+ mvn x2,x19
+ mvn x2,x20
+ mvn x2,x21
+ mvn x2,x22
+ mvn x2,x23
+ mvn x2,x24
+ mvn x2,x25
+ mvn x2,x26
+ mvn x2,x27
+ mvn x2,x28
+ mvn x2,x29
+ mvn x2,x30
+ nop
+ mvn x3,x0
+ mvn x3,x1
+ mvn x3,x2
+ mvn x3,x3
+ mvn x3,x4
+ mvn x3,x5
+ mvn x3,x6
+ mvn x3,x7
+ mvn x3,x8
+ mvn x3,x9
+ mvn x3,x10
+ mvn x3,x11
+ mvn x3,x12
+ mvn x3,x13
+ mvn x3,x14
+ mvn x3,x15
+ mvn x3,x16
+ mvn x3,x17
+ mvn x3,x18
+ mvn x3,x19
+ mvn x3,x20
+ mvn x3,x21
+ mvn x3,x22
+ mvn x3,x23
+ mvn x3,x24
+ mvn x3,x25
+ mvn x3,x26
+ mvn x3,x27
+ mvn x3,x28
+ mvn x3,x29
+ mvn x3,x30
+ nop
+ mvn x30,x0
+ mvn x30,x1
+ mvn x30,x2
+ mvn x30,x3
+ mvn x30,x4
+ mvn x30,x5
+ mvn x30,x6
+ mvn x30,x7
+ mvn x30,x8
+ mvn x30,x9
+ mvn x30,x10
+ mvn x30,x11
+ mvn x30,x12
+ mvn x30,x13
+ mvn x30,x14
+ mvn x30,x15
+ mvn x30,x16
+ mvn x30,x17
+ mvn x30,x18
+ mvn x30,x19
+ mvn x30,x20
+ mvn x30,x21
+ mvn x30,x22
+ mvn x30,x23
+ mvn x30,x24
+ mvn x30,x25
+ mvn x30,x26
+ mvn x30,x27
+ mvn x30,x28
+ mvn x30,x29
+ mvn x30,x30
+ nop
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/or.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/or.s
new file mode 100644
index 0000000..9a21ad6
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/or.s
@@ -0,0 +1,208 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl or
+ .type or, @function
+or:
+ .cfi_startproc
+ orr x0,x0,x0
+ orr x0,x0,x1
+ orr x0,x0,x2
+ orr x0,x0,x3
+ orr x0,x0,x4
+ orr x0,x0,x5
+ orr x0,x0,x6
+ orr x0,x0,x7
+ orr x0,x0,x8
+ orr x0,x0,x9
+ orr x0,x0,x10
+ orr x0,x0,x11
+ orr x0,x0,x12
+ orr x0,x0,x13
+ orr x0,x0,x14
+ orr x0,x0,x15
+ orr x0,x0,x16
+ orr x0,x0,x17
+ orr x0,x0,x18
+ orr x0,x0,x19
+ orr x0,x0,x20
+ orr x0,x0,x21
+ orr x0,x0,x22
+ orr x0,x0,x23
+ orr x0,x0,x24
+ orr x0,x0,x25
+ orr x0,x0,x26
+ orr x0,x0,x27
+ orr x0,x0,x28
+ orr x0,x0,x29
+ orr x0,x0,x30
+ nop
+ orr x1,x1,x0
+ orr x1,x1,x1
+ orr x1,x1,x2
+ orr x1,x1,x3
+ orr x1,x1,x4
+ orr x1,x1,x5
+ orr x1,x1,x6
+ orr x1,x1,x7
+ orr x1,x1,x8
+ orr x1,x1,x9
+ orr x1,x1,x10
+ orr x1,x1,x11
+ orr x1,x1,x12
+ orr x1,x1,x13
+ orr x1,x1,x14
+ orr x1,x1,x15
+ orr x1,x1,x16
+ orr x1,x1,x17
+ orr x1,x1,x18
+ orr x1,x1,x19
+ orr x1,x1,x20
+ orr x1,x1,x21
+ orr x1,x1,x22
+ orr x1,x1,x23
+ orr x1,x1,x24
+ orr x1,x1,x25
+ orr x1,x1,x26
+ orr x1,x1,x27
+ orr x1,x1,x28
+ orr x1,x1,x29
+ orr x1,x1,x30
+ nop
+ orr x2,x2,x0
+ orr x2,x2,x1
+ orr x2,x2,x2
+ orr x2,x2,x3
+ orr x2,x2,x4
+ orr x2,x2,x5
+ orr x2,x2,x6
+ orr x2,x2,x7
+ orr x2,x2,x8
+ orr x2,x2,x9
+ orr x2,x2,x10
+ orr x2,x2,x11
+ orr x2,x2,x12
+ orr x2,x2,x13
+ orr x2,x2,x14
+ orr x2,x2,x15
+ orr x2,x2,x16
+ orr x2,x2,x17
+ orr x2,x2,x18
+ orr x2,x2,x19
+ orr x2,x2,x20
+ orr x2,x2,x21
+ orr x2,x2,x22
+ orr x2,x2,x23
+ orr x2,x2,x24
+ orr x2,x2,x25
+ orr x2,x2,x26
+ orr x2,x2,x27
+ orr x2,x2,x28
+ orr x2,x2,x29
+ orr x2,x2,x30
+ nop
+ orr x30,x30,x0
+ orr x30,x30,x1
+ orr x30,x30,x2
+ orr x30,x30,x3
+ orr x30,x30,x4
+ orr x30,x30,x5
+ orr x30,x30,x6
+ orr x30,x30,x7
+ orr x30,x30,x8
+ orr x30,x30,x9
+ orr x30,x30,x10
+ orr x30,x30,x11
+ orr x30,x30,x12
+ orr x30,x30,x13
+ orr x30,x30,x14
+ orr x30,x30,x15
+ orr x30,x30,x16
+ orr x30,x30,x17
+ orr x30,x30,x18
+ orr x30,x30,x19
+ orr x30,x30,x20
+ orr x30,x30,x21
+ orr x30,x30,x22
+ orr x30,x30,x23
+ orr x30,x30,x24
+ orr x30,x30,x25
+ orr x30,x30,x26
+ orr x30,x30,x27
+ orr x30,x30,x28
+ orr x30,x30,x29
+ orr x30,x30,x30
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl orr_const
+ .type orr_const, @function
+orr_const:
+ .cfi_startproc
+ orr x0,x0,#0x5555555555555555
+ orr x0,x0,#0xaaaaaaaaaaaaaaaa
+ orr x0,x0,#0x1111111111111111
+ orr x0,x0,#0x8888888888888888
+ orr x0,x0,#0x4444444444444444
+ orr x0,x0,#0x2222222222222222
+ orr x0,x0,#0x3333333333333333
+ orr x0,x0,#0x9999999999999999
+ orr x0,x0,#0xcccccccccccccccc
+ orr x0,x0,#0x6666666666666666
+ orr x0,x0,#0x7777777777777777
+ orr x0,x0,#0xbbbbbbbbbbbbbbbb
+ orr x0,x0,#0xdddddddddddddddd
+ orr x0,x0,#0xeeeeeeeeeeeeeeee
+ orr x0,x0,#0xfffffffffffffffe
+ nop
+ orr x1,x1,#0x5555555555555555
+ orr x1,x1,#0xaaaaaaaaaaaaaaaa
+ orr x1,x1,#0x1111111111111111
+ orr x1,x1,#0x8888888888888888
+ orr x1,x1,#0x4444444444444444
+ orr x1,x1,#0x2222222222222222
+ orr x1,x1,#0x3333333333333333
+ orr x1,x1,#0x9999999999999999
+ orr x1,x1,#0xcccccccccccccccc
+ orr x1,x1,#0x6666666666666666
+ orr x1,x1,#0x7777777777777777
+ orr x1,x1,#0xbbbbbbbbbbbbbbbb
+ orr x1,x1,#0xdddddddddddddddd
+ orr x1,x1,#0xeeeeeeeeeeeeeeee
+ orr x1,x1,#0xfffffffffffffffe
+ nop
+ orr x2,x2,#0x5555555555555555
+ orr x2,x2,#0xaaaaaaaaaaaaaaaa
+ orr x2,x2,#0x1111111111111111
+ orr x2,x2,#0x8888888888888888
+ orr x2,x2,#0x4444444444444444
+ orr x2,x2,#0x2222222222222222
+ orr x2,x2,#0x3333333333333333
+ orr x2,x2,#0x9999999999999999
+ orr x2,x2,#0xcccccccccccccccc
+ orr x2,x2,#0x6666666666666666
+ orr x2,x2,#0x7777777777777777
+ orr x2,x2,#0xbbbbbbbbbbbbbbbb
+ orr x2,x2,#0xdddddddddddddddd
+ orr x2,x2,#0xeeeeeeeeeeeeeeee
+ orr x2,x2,#0xfffffffffffffffe
+ nop
+ orr x30,x30,#0x5555555555555555
+ orr x30,x30,#0xaaaaaaaaaaaaaaaa
+ orr x30,x30,#0x1111111111111111
+ orr x30,x30,#0x8888888888888888
+ orr x30,x30,#0x4444444444444444
+ orr x30,x30,#0x2222222222222222
+ orr x30,x30,#0x3333333333333333
+ orr x30,x30,#0x9999999999999999
+ orr x30,x30,#0xcccccccccccccccc
+ orr x30,x30,#0x6666666666666666
+ orr x30,x30,#0x7777777777777777
+ orr x30,x30,#0xbbbbbbbbbbbbbbbb
+ orr x30,x30,#0xdddddddddddddddd
+ orr x30,x30,#0xeeeeeeeeeeeeeeee
+ orr x30,x30,#0xfffffffffffffffe
+ ret
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/rem.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/rem.s
new file mode 100644
index 0000000..a2378c9
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/rem.s
@@ -0,0 +1,268 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl msub
+ .type msub, @function
+msub:
+ .cfi_startproc
+ msub x0,x0,x0,x0
+ msub x0,x0,x1,x0
+ msub x0,x0,x2,x0
+ msub x0,x0,x3,x0
+ msub x0,x0,x4,x0
+ msub x0,x0,x5,x0
+ msub x0,x0,x6,x0
+ msub x0,x0,x7,x0
+ msub x0,x0,x8,x0
+ msub x0,x0,x9,x0
+ msub x0,x0,x10,x0
+ msub x0,x0,x11,x0
+ msub x0,x0,x12,x0
+ msub x0,x0,x13,x0
+ msub x0,x0,x14,x0
+ msub x0,x0,x15,x0
+ msub x0,x0,x16,x0
+ msub x0,x0,x17,x0
+ msub x0,x0,x18,x0
+ msub x0,x0,x19,x0
+ msub x0,x0,x20,x0
+ msub x0,x0,x21,x0
+ msub x0,x0,x22,x0
+ msub x0,x0,x23,x0
+ msub x0,x0,x24,x0
+ msub x0,x0,x25,x0
+ msub x0,x0,x26,x0
+ msub x0,x0,x27,x0
+ msub x0,x0,x28,x0
+ msub x0,x0,x29,x0
+ msub x0,x0,x30,x0
+ nop
+ msub x0,x1,x0,x0
+ msub x0,x1,x1,x0
+ msub x0,x1,x2,x0
+ msub x0,x1,x3,x0
+ msub x0,x1,x4,x0
+ msub x0,x1,x5,x0
+ msub x0,x1,x6,x0
+ msub x0,x1,x7,x0
+ msub x0,x1,x8,x0
+ msub x0,x1,x9,x0
+ msub x0,x1,x10,x0
+ msub x0,x1,x11,x0
+ msub x0,x1,x12,x0
+ msub x0,x1,x13,x0
+ msub x0,x1,x14,x0
+ msub x0,x1,x15,x0
+ msub x0,x1,x16,x0
+ msub x0,x1,x17,x0
+ msub x0,x1,x18,x0
+ msub x0,x1,x19,x0
+ msub x0,x1,x20,x0
+ msub x0,x1,x21,x0
+ msub x0,x1,x22,x0
+ msub x0,x1,x23,x0
+ msub x0,x1,x24,x0
+ msub x0,x1,x25,x0
+ msub x0,x1,x26,x0
+ msub x0,x1,x27,x0
+ msub x0,x1,x28,x0
+ msub x0,x1,x29,x0
+ msub x0,x1,x30,x0
+ nop
+ msub x0,x2,x0,x0
+ msub x0,x2,x1,x0
+ msub x0,x2,x2,x0
+ msub x0,x2,x3,x0
+ msub x0,x2,x4,x0
+ msub x0,x2,x5,x0
+ msub x0,x2,x6,x0
+ msub x0,x2,x7,x0
+ msub x0,x2,x8,x0
+ msub x0,x2,x9,x0
+ msub x0,x2,x10,x0
+ msub x0,x2,x11,x0
+ msub x0,x2,x12,x0
+ msub x0,x2,x13,x0
+ msub x0,x2,x14,x0
+ msub x0,x2,x15,x0
+ msub x0,x2,x16,x0
+ msub x0,x2,x17,x0
+ msub x0,x2,x18,x0
+ msub x0,x2,x19,x0
+ msub x0,x2,x20,x0
+ msub x0,x2,x21,x0
+ msub x0,x2,x22,x0
+ msub x0,x2,x23,x0
+ msub x0,x2,x24,x0
+ msub x0,x2,x25,x0
+ msub x0,x2,x26,x0
+ msub x0,x2,x27,x0
+ msub x0,x2,x28,x0
+ msub x0,x2,x29,x0
+ msub x0,x2,x30,x0
+ nop
+ msub x0,x3,x0,x0
+ msub x0,x3,x1,x0
+ msub x0,x3,x2,x0
+ msub x0,x3,x3,x0
+ msub x0,x3,x4,x0
+ msub x0,x3,x5,x0
+ msub x0,x3,x6,x0
+ msub x0,x3,x7,x0
+ msub x0,x3,x8,x0
+ msub x0,x3,x9,x0
+ msub x0,x3,x10,x0
+ msub x0,x3,x11,x0
+ msub x0,x3,x12,x0
+ msub x0,x3,x13,x0
+ msub x0,x3,x14,x0
+ msub x0,x3,x15,x0
+ msub x0,x3,x16,x0
+ msub x0,x3,x17,x0
+ msub x0,x3,x18,x0
+ msub x0,x3,x19,x0
+ msub x0,x3,x20,x0
+ msub x0,x3,x21,x0
+ msub x0,x3,x22,x0
+ msub x0,x3,x23,x0
+ msub x0,x3,x24,x0
+ msub x0,x3,x25,x0
+ msub x0,x3,x26,x0
+ msub x0,x3,x27,x0
+ msub x0,x3,x28,x0
+ msub x0,x3,x29,x0
+ msub x0,x3,x30,x0
+ nop
+ msub x0,x30,x0,x0
+ msub x0,x30,x1,x0
+ msub x0,x30,x2,x0
+ msub x0,x30,x3,x0
+ msub x0,x30,x4,x0
+ msub x0,x30,x5,x0
+ msub x0,x30,x6,x0
+ msub x0,x30,x7,x0
+ msub x0,x30,x8,x0
+ msub x0,x30,x9,x0
+ msub x0,x30,x10,x0
+ msub x0,x30,x11,x0
+ msub x0,x30,x12,x0
+ msub x0,x30,x13,x0
+ msub x0,x30,x14,x0
+ msub x0,x30,x15,x0
+ msub x0,x30,x16,x0
+ msub x0,x30,x17,x0
+ msub x0,x30,x18,x0
+ msub x0,x30,x19,x0
+ msub x0,x30,x20,x0
+ msub x0,x30,x21,x0
+ msub x0,x30,x22,x0
+ msub x0,x30,x23,x0
+ msub x0,x30,x24,x0
+ msub x0,x30,x25,x0
+ msub x0,x30,x26,x0
+ msub x0,x30,x27,x0
+ msub x0,x30,x28,x0
+ msub x0,x30,x29,x0
+ msub x0,x30,x30,x0
+ nop
+ msub x1,x0,x0,x1
+ msub x1,x0,x1,x1
+ msub x1,x0,x2,x1
+ msub x1,x0,x3,x1
+ msub x1,x0,x4,x1
+ msub x1,x0,x5,x1
+ msub x1,x0,x6,x1
+ msub x1,x0,x7,x1
+ msub x1,x0,x8,x1
+ msub x1,x0,x9,x1
+ msub x1,x0,x10,x1
+ msub x1,x0,x11,x1
+ msub x1,x0,x12,x1
+ msub x1,x0,x13,x1
+ msub x1,x0,x14,x1
+ msub x1,x0,x15,x1
+ msub x1,x0,x16,x1
+ msub x1,x0,x17,x1
+ msub x1,x0,x18,x1
+ msub x1,x0,x19,x1
+ msub x1,x0,x20,x1
+ msub x1,x0,x21,x1
+ msub x1,x0,x22,x1
+ msub x1,x0,x23,x1
+ msub x1,x0,x24,x1
+ msub x1,x0,x25,x1
+ msub x1,x0,x26,x1
+ msub x1,x0,x27,x1
+ msub x1,x0,x28,x1
+ msub x1,x0,x29,x1
+ msub x1,x0,x30,x1
+ nop
+ msub x2,x0,x0,x2
+ msub x2,x0,x1,x2
+ msub x2,x0,x2,x2
+ msub x2,x0,x3,x2
+ msub x2,x0,x4,x2
+ msub x2,x0,x5,x2
+ msub x2,x0,x6,x2
+ msub x2,x0,x7,x2
+ msub x2,x0,x8,x2
+ msub x2,x0,x9,x2
+ msub x2,x0,x10,x2
+ msub x2,x0,x11,x2
+ msub x2,x0,x12,x2
+ msub x2,x0,x13,x2
+ msub x2,x0,x14,x2
+ msub x2,x0,x15,x2
+ msub x2,x0,x16,x2
+ msub x2,x0,x17,x2
+ msub x2,x0,x18,x2
+ msub x2,x0,x19,x2
+ msub x2,x0,x20,x2
+ msub x2,x0,x21,x2
+ msub x2,x0,x22,x2
+ msub x2,x0,x23,x2
+ msub x2,x0,x24,x2
+ msub x2,x0,x25,x2
+ msub x2,x0,x26,x2
+ msub x2,x0,x27,x2
+ msub x2,x0,x28,x2
+ msub x2,x0,x29,x2
+ msub x2,x0,x30,x2
+ nop
+ msub x30,x0,x0,x30
+ msub x30,x0,x1,x30
+ msub x30,x0,x2,x30
+ msub x30,x0,x3,x30
+ msub x30,x0,x4,x30
+ msub x30,x0,x5,x30
+ msub x30,x0,x6,x30
+ msub x30,x0,x7,x30
+ msub x30,x0,x8,x30
+ msub x30,x0,x9,x30
+ msub x30,x0,x10,x30
+ msub x30,x0,x11,x30
+ msub x30,x0,x12,x30
+ msub x30,x0,x13,x30
+ msub x30,x0,x14,x30
+ msub x30,x0,x15,x30
+ msub x30,x0,x16,x30
+ msub x30,x0,x17,x30
+ msub x30,x0,x18,x30
+ msub x30,x0,x19,x30
+ msub x30,x0,x20,x30
+ msub x30,x0,x21,x30
+ msub x30,x0,x22,x30
+ msub x30,x0,x23,x30
+ msub x30,x0,x24,x30
+ msub x30,x0,x25,x30
+ msub x30,x0,x26,x30
+ msub x30,x0,x27,x30
+ msub x30,x0,x28,x30
+ msub x30,x0,x29,x30
+ msub x30,x0,x30,x30
+ nop
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/sdiv.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/sdiv.s
new file mode 100644
index 0000000..561d9c8
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/sdiv.s
@@ -0,0 +1,172 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl sdiv
+ .type sdiv, @function
+sdiv:
+ .cfi_startproc
+ sdiv x0,x0,x0
+ sdiv x0,x0,x1
+ sdiv x0,x0,x2
+ sdiv x0,x0,x3
+ sdiv x0,x0,x4
+ sdiv x0,x0,x5
+ sdiv x0,x0,x6
+ sdiv x0,x0,x7
+ sdiv x0,x0,x8
+ sdiv x0,x0,x9
+ sdiv x0,x0,x10
+ sdiv x0,x0,x11
+ sdiv x0,x0,x12
+ sdiv x0,x0,x13
+ sdiv x0,x0,x14
+ sdiv x0,x0,x15
+ sdiv x0,x0,x16
+ sdiv x0,x0,x17
+ sdiv x0,x0,x18
+ sdiv x0,x0,x19
+ sdiv x0,x0,x20
+ sdiv x0,x0,x21
+ sdiv x0,x0,x22
+ sdiv x0,x0,x23
+ sdiv x0,x0,x24
+ sdiv x0,x0,x25
+ sdiv x0,x0,x26
+ sdiv x0,x0,x27
+ sdiv x0,x0,x28
+ sdiv x0,x0,x29
+ sdiv x0,x0,x30
+ nop
+ sdiv x1,x1,x0
+ sdiv x1,x1,x1
+ sdiv x1,x1,x2
+ sdiv x1,x1,x3
+ sdiv x1,x1,x4
+ sdiv x1,x1,x5
+ sdiv x1,x1,x6
+ sdiv x1,x1,x7
+ sdiv x1,x1,x8
+ sdiv x1,x1,x9
+ sdiv x1,x1,x10
+ sdiv x1,x1,x11
+ sdiv x1,x1,x12
+ sdiv x1,x1,x13
+ sdiv x1,x1,x14
+ sdiv x1,x1,x15
+ sdiv x1,x1,x16
+ sdiv x1,x1,x17
+ sdiv x1,x1,x18
+ sdiv x1,x1,x19
+ sdiv x1,x1,x20
+ sdiv x1,x1,x21
+ sdiv x1,x1,x22
+ sdiv x1,x1,x23
+ sdiv x1,x1,x24
+ sdiv x1,x1,x25
+ sdiv x1,x1,x26
+ sdiv x1,x1,x27
+ sdiv x1,x1,x28
+ sdiv x1,x1,x29
+ sdiv x1,x1,x30
+ nop
+ sdiv x2,x2,x0
+ sdiv x2,x2,x1
+ sdiv x2,x2,x2
+ sdiv x2,x2,x3
+ sdiv x2,x2,x4
+ sdiv x2,x2,x5
+ sdiv x2,x2,x6
+ sdiv x2,x2,x7
+ sdiv x2,x2,x8
+ sdiv x2,x2,x9
+ sdiv x2,x2,x10
+ sdiv x2,x2,x11
+ sdiv x2,x2,x12
+ sdiv x2,x2,x13
+ sdiv x2,x2,x14
+ sdiv x2,x2,x15
+ sdiv x2,x2,x16
+ sdiv x2,x2,x17
+ sdiv x2,x2,x18
+ sdiv x2,x2,x19
+ sdiv x2,x2,x20
+ sdiv x2,x2,x21
+ sdiv x2,x2,x22
+ sdiv x2,x2,x23
+ sdiv x2,x2,x24
+ sdiv x2,x2,x25
+ sdiv x2,x2,x26
+ sdiv x2,x2,x27
+ sdiv x2,x2,x28
+ sdiv x2,x2,x29
+ sdiv x2,x2,x30
+ nop
+ sdiv x3,x3,x0
+ sdiv x3,x3,x1
+ sdiv x3,x3,x2
+ sdiv x3,x3,x3
+ sdiv x3,x3,x4
+ sdiv x3,x3,x5
+ sdiv x3,x3,x6
+ sdiv x3,x3,x7
+ sdiv x3,x3,x8
+ sdiv x3,x3,x9
+ sdiv x3,x3,x10
+ sdiv x3,x3,x11
+ sdiv x3,x3,x12
+ sdiv x3,x3,x13
+ sdiv x3,x3,x14
+ sdiv x3,x3,x15
+ sdiv x3,x3,x16
+ sdiv x3,x3,x17
+ sdiv x3,x3,x18
+ sdiv x3,x3,x19
+ sdiv x3,x3,x20
+ sdiv x3,x3,x21
+ sdiv x3,x3,x22
+ sdiv x3,x3,x23
+ sdiv x3,x3,x24
+ sdiv x3,x3,x25
+ sdiv x3,x3,x26
+ sdiv x3,x3,x27
+ sdiv x3,x3,x28
+ sdiv x3,x3,x29
+ sdiv x3,x3,x30
+ nop
+ sdiv x30,x30,x0
+ sdiv x30,x30,x1
+ sdiv x30,x30,x2
+ sdiv x30,x30,x3
+ sdiv x30,x30,x4
+ sdiv x30,x30,x5
+ sdiv x30,x30,x6
+ sdiv x30,x30,x7
+ sdiv x30,x30,x8
+ sdiv x30,x30,x9
+ sdiv x30,x30,x10
+ sdiv x30,x30,x11
+ sdiv x30,x30,x12
+ sdiv x30,x30,x13
+ sdiv x30,x30,x14
+ sdiv x30,x30,x15
+ sdiv x30,x30,x16
+ sdiv x30,x30,x17
+ sdiv x30,x30,x18
+ sdiv x30,x30,x19
+ sdiv x30,x30,x20
+ sdiv x30,x30,x21
+ sdiv x30,x30,x22
+ sdiv x30,x30,x23
+ sdiv x30,x30,x24
+ sdiv x30,x30,x25
+ sdiv x30,x30,x26
+ sdiv x30,x30,x27
+ sdiv x30,x30,x28
+ sdiv x30,x30,x29
+ sdiv x30,x30,x30
+ nop
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/set.c b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/set.c
new file mode 100644
index 0000000..278dc74
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/set.c
@@ -0,0 +1,68 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * set.c
+ *
+ * Created on May 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+#include "../asm_template.h"
+
+u64 load_16_a(void) {
+ return 0;
+}
+u64 load_16_b(void) {
+ return 0xff;
+}
+u64 load_16_c(void) {
+ return 0xfff;
+}
+u64 load_16_d(void) {
+ return 0xffff;
+}
+u64 load_32_a(void) {
+ return 0x55555;
+}
+u64 load_32_b(void) {
+ return 0x555555;
+}
+u64 load_32_c(void) {
+ return 0x5555555;
+}
+u64 load_32_d(void) {
+ return 0x55555555;
+}
+
+u64 load_48_a(void) {
+ return 0x955552222;
+}
+u64 load_48_b(void) {
+ return 0x9955552222;
+}
+u64 load_48_c(void) {
+ return 0x99955552222;
+}
+u64 load_48_d(void) {
+ return 0x999955552222;
+}
+
+u64 load_64_a(void) {
+ return 0xa999955552222;
+}
+u64 load_64_b(void) {
+ return 0xaa999955552222;
+}
+u64 load_64_c(void) {
+ return 0xaaa999955552222;
+}
+u64 load_64_d(void) {
+ return 0xaaaa999955552222;
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/set.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/set.go
new file mode 100644
index 0000000..f494b0e
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/set.go
@@ -0,0 +1,34 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * arith.go
+ *
+ * Created on May 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package arm64
+
+//go:nosplit
+func load_16() uint64 {
+ return 0xffff
+}
+//go:nosplit
+func load_32() (uint64, uint64) {
+ return 0x10000, 0xffffffff
+}
+//go:nosplit
+func load_48() (uint64, uint64) {
+ return 0x100000000, 0xffffffffffff
+}
+//go:nosplit
+func load_64() (uint64,uint64) {
+ return 0x1000000000000, 0xffffffffffffffff
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/store.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/store.s
new file mode 100644
index 0000000..bd2f35f
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/store.s
@@ -0,0 +1,159 @@
+ .file "set.s"
+ .text
+ .p2align 4,,15
+ .globl store
+ .type store, @function
+store:
+ .cfi_startproc
+ str x0, [x29, #0]
+ str x0, [x29, #8]
+ str x0, [x29, #16]
+ str x0, [x29, #32]
+ str x0, [x29, #64]
+ str x0, [x29, #120]
+ str x0, [x29, #128]
+ str x0, [x29, #248]
+ str x0, [x29, #256]
+ str x0, [x29, #504]
+ str x0, [x29, #512]
+ str x0, [x29, #1016]
+ str x0, [x29, #1024]
+ str x0, [x29, #2040]
+ str x0, [x29, #2048]
+ str x0, [x29, #4088]
+ str x0, [x29, #4096]
+ str x0, [x29, #32752]
+ str x0, [x29, #32760]
+ nop
+ str x1, [x29, #0]
+ str x1, [x29, #8]
+ str x1, [x29, #16]
+ str x1, [x29, #32]
+ str x1, [x29, #64]
+ str x1, [x29, #120]
+ str x1, [x29, #128]
+ str x1, [x29, #248]
+ str x1, [x29, #256]
+ str x1, [x29, #504]
+ str x1, [x29, #512]
+ str x1, [x29, #1016]
+ str x1, [x29, #1024]
+ str x1, [x29, #2040]
+ str x1, [x29, #2048]
+ str x1, [x29, #4088]
+ str x1, [x29, #4096]
+ str x1, [x29, #32752]
+ str x1, [x29, #32760]
+ nop
+ str x2, [x29, #0]
+ str x2, [x29, #8]
+ str x2, [x29, #16]
+ str x2, [x29, #32]
+ str x2, [x29, #64]
+ str x2, [x29, #120]
+ str x2, [x29, #128]
+ str x2, [x29, #248]
+ str x2, [x29, #256]
+ str x2, [x29, #504]
+ str x2, [x29, #512]
+ str x2, [x29, #1016]
+ str x2, [x29, #1024]
+ str x2, [x29, #2040]
+ str x2, [x29, #2048]
+ str x2, [x29, #4088]
+ str x2, [x29, #4096]
+ str x2, [x29, #32752]
+ str x2, [x29, #32760]
+ nop
+ str x3, [x29, #0]
+ str x3, [x29, #8]
+ str x3, [x29, #16]
+ str x3, [x29, #32]
+ str x3, [x29, #64]
+ str x3, [x29, #120]
+ str x3, [x29, #128]
+ str x3, [x29, #248]
+ str x3, [x29, #256]
+ str x3, [x29, #504]
+ str x3, [x29, #512]
+ str x3, [x29, #1016]
+ str x3, [x29, #1024]
+ str x3, [x29, #2040]
+ str x3, [x29, #2048]
+ str x3, [x29, #4088]
+ str x3, [x29, #4096]
+ str x3, [x29, #32752]
+ str x3, [x29, #32760]
+ nop
+ str x4, [x29, #0]
+ str x4, [x29, #8]
+ str x4, [x29, #16]
+ str x4, [x29, #32]
+ str x4, [x29, #64]
+ str x4, [x29, #120]
+ str x4, [x29, #128]
+ str x4, [x29, #248]
+ str x4, [x29, #256]
+ str x4, [x29, #504]
+ str x4, [x29, #512]
+ str x4, [x29, #1016]
+ str x4, [x29, #1024]
+ str x4, [x29, #2040]
+ str x4, [x29, #2048]
+ str x4, [x29, #4088]
+ str x4, [x29, #4096]
+ str x4, [x29, #32752]
+ str x4, [x29, #32760]
+ nop
+ str x30, [x29, #0]
+ str x30, [x29, #8]
+ str x30, [x29, #16]
+ str x30, [x29, #32]
+ str x30, [x29, #64]
+ str x30, [x29, #120]
+ str x30, [x29, #128]
+ str x30, [x29, #248]
+ str x30, [x29, #256]
+ str x30, [x29, #504]
+ str x30, [x29, #512]
+ str x30, [x29, #1016]
+ str x30, [x29, #1024]
+ str x30, [x29, #2040]
+ str x30, [x29, #2048]
+ str x30, [x29, #4088]
+ str x30, [x29, #4096]
+ str x30, [x29, #32752]
+ str x30, [x29, #32760]
+ nop
+ str x0, [x29, x0]
+ str x0, [x29, x1]
+ str x0, [x29, x2]
+ str x0, [x29, x3]
+ str x0, [x29, x30]
+ nop
+ str x1, [x29, x0]
+ str x1, [x29, x1]
+ str x1, [x29, x2]
+ str x1, [x29, x3]
+ str x1, [x29, x30]
+ nop
+ str x2, [x29, x0]
+ str x2, [x29, x1]
+ str x2, [x29, x2]
+ str x2, [x29, x3]
+ str x2, [x29, x30]
+ nop
+ str x3, [x29, x0]
+ str x3, [x29, x1]
+ str x3, [x29, x2]
+ str x3, [x29, x3]
+ str x3, [x29, x30]
+ nop
+ str x30, [x29, x0]
+ str x30, [x29, x1]
+ str x30, [x29, x2]
+ str x30, [x29, x3]
+ str x30, [x29, x30]
+ ret
+ .cfi_endproc
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/sub.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/sub.s
new file mode 100644
index 0000000..843f9bb
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/sub.s
@@ -0,0 +1,268 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl sub
+ .type sub, @function
+sub:
+ .cfi_startproc
+ sub x0,x0,x0
+ sub x0,x0,x1
+ sub x0,x0,x2
+ sub x0,x0,x3
+ sub x0,x0,x4
+ sub x0,x0,x5
+ sub x0,x0,x6
+ sub x0,x0,x7
+ sub x0,x0,x8
+ sub x0,x0,x9
+ sub x0,x0,x10
+ sub x0,x0,x11
+ sub x0,x0,x12
+ sub x0,x0,x13
+ sub x0,x0,x14
+ sub x0,x0,x15
+ sub x0,x0,x16
+ sub x0,x0,x17
+ sub x0,x0,x18
+ sub x0,x0,x19
+ sub x0,x0,x20
+ sub x0,x0,x21
+ sub x0,x0,x22
+ sub x0,x0,x23
+ sub x0,x0,x24
+ sub x0,x0,x25
+ sub x0,x0,x26
+ sub x0,x0,x27
+ sub x0,x0,x28
+ sub x0,x0,x29
+ sub x0,x0,x30
+ nop
+ sub x0,x1,x0
+ sub x0,x1,x1
+ sub x0,x1,x2
+ sub x0,x1,x3
+ sub x0,x1,x4
+ sub x0,x1,x5
+ sub x0,x1,x6
+ sub x0,x1,x7
+ sub x0,x1,x8
+ sub x0,x1,x9
+ sub x0,x1,x10
+ sub x0,x1,x11
+ sub x0,x1,x12
+ sub x0,x1,x13
+ sub x0,x1,x14
+ sub x0,x1,x15
+ sub x0,x1,x16
+ sub x0,x1,x17
+ sub x0,x1,x18
+ sub x0,x1,x19
+ sub x0,x1,x20
+ sub x0,x1,x21
+ sub x0,x1,x22
+ sub x0,x1,x23
+ sub x0,x1,x24
+ sub x0,x1,x25
+ sub x0,x1,x26
+ sub x0,x1,x27
+ sub x0,x1,x28
+ sub x0,x1,x29
+ sub x0,x1,x30
+ nop
+ sub x0,x2,x0
+ sub x0,x2,x1
+ sub x0,x2,x2
+ sub x0,x2,x3
+ sub x0,x2,x4
+ sub x0,x2,x5
+ sub x0,x2,x6
+ sub x0,x2,x7
+ sub x0,x2,x8
+ sub x0,x2,x9
+ sub x0,x2,x10
+ sub x0,x2,x11
+ sub x0,x2,x12
+ sub x0,x2,x13
+ sub x0,x2,x14
+ sub x0,x2,x15
+ sub x0,x2,x16
+ sub x0,x2,x17
+ sub x0,x2,x18
+ sub x0,x2,x19
+ sub x0,x2,x20
+ sub x0,x2,x21
+ sub x0,x2,x22
+ sub x0,x2,x23
+ sub x0,x2,x24
+ sub x0,x2,x25
+ sub x0,x2,x26
+ sub x0,x2,x27
+ sub x0,x2,x28
+ sub x0,x2,x29
+ sub x0,x2,x30
+ nop
+ sub x0,x30,x0
+ sub x0,x30,x1
+ sub x0,x30,x2
+ sub x0,x30,x3
+ sub x0,x30,x4
+ sub x0,x30,x5
+ sub x0,x30,x6
+ sub x0,x30,x7
+ sub x0,x30,x8
+ sub x0,x30,x9
+ sub x0,x30,x10
+ sub x0,x30,x11
+ sub x0,x30,x12
+ sub x0,x30,x13
+ sub x0,x30,x14
+ sub x0,x30,x15
+ sub x0,x30,x16
+ sub x0,x30,x17
+ sub x0,x30,x18
+ sub x0,x30,x19
+ sub x0,x30,x20
+ sub x0,x30,x21
+ sub x0,x30,x22
+ sub x0,x30,x23
+ sub x0,x30,x24
+ sub x0,x30,x25
+ sub x0,x30,x26
+ sub x0,x30,x27
+ sub x0,x30,x28
+ sub x0,x30,x29
+ sub x0,x30,x30
+ nop
+ sub x1,x0,x0
+ sub x1,x0,x1
+ sub x1,x0,x2
+ sub x1,x0,x3
+ sub x1,x0,x4
+ sub x1,x0,x5
+ sub x1,x0,x6
+ sub x1,x0,x7
+ sub x1,x0,x8
+ sub x1,x0,x9
+ sub x1,x0,x10
+ sub x1,x0,x11
+ sub x1,x0,x12
+ sub x1,x0,x13
+ sub x1,x0,x14
+ sub x1,x0,x15
+ sub x1,x0,x16
+ sub x1,x0,x17
+ sub x1,x0,x18
+ sub x1,x0,x19
+ sub x1,x0,x20
+ sub x1,x0,x21
+ sub x1,x0,x22
+ sub x1,x0,x23
+ sub x1,x0,x24
+ sub x1,x0,x25
+ sub x1,x0,x26
+ sub x1,x0,x27
+ sub x1,x0,x28
+ sub x1,x0,x29
+ sub x1,x0,x30
+ nop
+ sub x1,x1,x0
+ sub x1,x1,x1
+ sub x1,x1,x2
+ sub x1,x1,x3
+ sub x1,x1,x4
+ sub x1,x1,x5
+ sub x1,x1,x6
+ sub x1,x1,x7
+ sub x1,x1,x8
+ sub x1,x1,x9
+ sub x1,x1,x10
+ sub x1,x1,x11
+ sub x1,x1,x12
+ sub x1,x1,x13
+ sub x1,x1,x14
+ sub x1,x1,x15
+ sub x1,x1,x16
+ sub x1,x1,x17
+ sub x1,x1,x18
+ sub x1,x1,x19
+ sub x1,x1,x20
+ sub x1,x1,x21
+ sub x1,x1,x22
+ sub x1,x1,x23
+ sub x1,x1,x24
+ sub x1,x1,x25
+ sub x1,x1,x26
+ sub x1,x1,x27
+ sub x1,x1,x28
+ sub x1,x1,x29
+ sub x1,x1,x30
+ nop
+ sub x1,x2,x0
+ sub x1,x2,x1
+ sub x1,x2,x2
+ sub x1,x2,x3
+ sub x1,x2,x4
+ sub x1,x2,x5
+ sub x1,x2,x6
+ sub x1,x2,x7
+ sub x1,x2,x8
+ sub x1,x2,x9
+ sub x1,x2,x10
+ sub x1,x2,x11
+ sub x1,x2,x12
+ sub x1,x2,x13
+ sub x1,x2,x14
+ sub x1,x2,x15
+ sub x1,x2,x16
+ sub x1,x2,x17
+ sub x1,x2,x18
+ sub x1,x2,x19
+ sub x1,x2,x20
+ sub x1,x2,x21
+ sub x1,x2,x22
+ sub x1,x2,x23
+ sub x1,x2,x24
+ sub x1,x2,x25
+ sub x1,x2,x26
+ sub x1,x2,x27
+ sub x1,x2,x28
+ sub x1,x2,x29
+ sub x1,x2,x30
+ nop
+ sub x1,x30,x0
+ sub x1,x30,x1
+ sub x1,x30,x2
+ sub x1,x30,x3
+ sub x1,x30,x4
+ sub x1,x30,x5
+ sub x1,x30,x6
+ sub x1,x30,x7
+ sub x1,x30,x8
+ sub x1,x30,x9
+ sub x1,x30,x10
+ sub x1,x30,x11
+ sub x1,x30,x12
+ sub x1,x30,x13
+ sub x1,x30,x14
+ sub x1,x30,x15
+ sub x1,x30,x16
+ sub x1,x30,x17
+ sub x1,x30,x18
+ sub x1,x30,x19
+ sub x1,x30,x20
+ sub x1,x30,x21
+ sub x1,x30,x22
+ sub x1,x30,x23
+ sub x1,x30,x24
+ sub x1,x30,x25
+ sub x1,x30,x26
+ sub x1,x30,x27
+ sub x1,x30,x28
+ sub x1,x30,x29
+ sub x1,x30,x30
+ nop
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/udiv.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/udiv.s
new file mode 100644
index 0000000..5743e12
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/udiv.s
@@ -0,0 +1,299 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl udiv
+ .type udiv, @function
+udiv:
+ .cfi_startproc
+ udiv x0,x0,x0
+ udiv x0,x0,x1
+ udiv x0,x0,x2
+ udiv x0,x0,x3
+ udiv x0,x0,x4
+ udiv x0,x0,x5
+ udiv x0,x0,x6
+ udiv x0,x0,x7
+ udiv x0,x0,x8
+ udiv x0,x0,x9
+ udiv x0,x0,x10
+ udiv x0,x0,x11
+ udiv x0,x0,x12
+ udiv x0,x0,x13
+ udiv x0,x0,x14
+ udiv x0,x0,x15
+ udiv x0,x0,x16
+ udiv x0,x0,x17
+ udiv x0,x0,x18
+ udiv x0,x0,x19
+ udiv x0,x0,x20
+ udiv x0,x0,x21
+ udiv x0,x0,x22
+ udiv x0,x0,x23
+ udiv x0,x0,x24
+ udiv x0,x0,x25
+ udiv x0,x0,x26
+ udiv x0,x0,x27
+ udiv x0,x0,x28
+ udiv x0,x0,x29
+ udiv x0,x0,x30
+ nop
+ udiv x0,x1,x0
+ udiv x0,x1,x1
+ udiv x0,x1,x2
+ udiv x0,x1,x3
+ udiv x0,x1,x4
+ udiv x0,x1,x5
+ udiv x0,x1,x6
+ udiv x0,x1,x7
+ udiv x0,x1,x8
+ udiv x0,x1,x9
+ udiv x0,x1,x10
+ udiv x0,x1,x11
+ udiv x0,x1,x12
+ udiv x0,x1,x13
+ udiv x0,x1,x14
+ udiv x0,x1,x15
+ udiv x0,x1,x16
+ udiv x0,x1,x17
+ udiv x0,x1,x18
+ udiv x0,x1,x19
+ udiv x0,x1,x20
+ udiv x0,x1,x21
+ udiv x0,x1,x22
+ udiv x0,x1,x23
+ udiv x0,x1,x24
+ udiv x0,x1,x25
+ udiv x0,x1,x26
+ udiv x0,x1,x27
+ udiv x0,x1,x28
+ udiv x0,x1,x29
+ udiv x0,x1,x30
+ nop
+ udiv x0,x2,x0
+ udiv x0,x2,x1
+ udiv x0,x2,x2
+ udiv x0,x2,x3
+ udiv x0,x2,x4
+ udiv x0,x2,x5
+ udiv x0,x2,x6
+ udiv x0,x2,x7
+ udiv x0,x2,x8
+ udiv x0,x2,x9
+ udiv x0,x2,x10
+ udiv x0,x2,x11
+ udiv x0,x2,x12
+ udiv x0,x2,x13
+ udiv x0,x2,x14
+ udiv x0,x2,x15
+ udiv x0,x2,x16
+ udiv x0,x2,x17
+ udiv x0,x2,x18
+ udiv x0,x2,x19
+ udiv x0,x2,x20
+ udiv x0,x2,x21
+ udiv x0,x2,x22
+ udiv x0,x2,x23
+ udiv x0,x2,x24
+ udiv x0,x2,x25
+ udiv x0,x2,x26
+ udiv x0,x2,x27
+ udiv x0,x2,x28
+ udiv x0,x2,x29
+ udiv x0,x2,x30
+ nop
+ udiv x0,x30,x0
+ udiv x0,x30,x1
+ udiv x0,x30,x2
+ udiv x0,x30,x3
+ udiv x0,x30,x4
+ udiv x0,x30,x5
+ udiv x0,x30,x6
+ udiv x0,x30,x7
+ udiv x0,x30,x8
+ udiv x0,x30,x9
+ udiv x0,x30,x10
+ udiv x0,x30,x11
+ udiv x0,x30,x12
+ udiv x0,x30,x13
+ udiv x0,x30,x14
+ udiv x0,x30,x15
+ udiv x0,x30,x16
+ udiv x0,x30,x17
+ udiv x0,x30,x18
+ udiv x0,x30,x19
+ udiv x0,x30,x20
+ udiv x0,x30,x21
+ udiv x0,x30,x22
+ udiv x0,x30,x23
+ udiv x0,x30,x24
+ udiv x0,x30,x25
+ udiv x0,x30,x26
+ udiv x0,x30,x27
+ udiv x0,x30,x28
+ udiv x0,x30,x29
+ udiv x0,x30,x30
+ nop
+ udiv x1,x0,x0
+ udiv x1,x0,x1
+ udiv x1,x0,x2
+ udiv x1,x0,x3
+ udiv x1,x0,x4
+ udiv x1,x0,x5
+ udiv x1,x0,x6
+ udiv x1,x0,x7
+ udiv x1,x0,x8
+ udiv x1,x0,x9
+ udiv x1,x0,x10
+ udiv x1,x0,x11
+ udiv x1,x0,x12
+ udiv x1,x0,x13
+ udiv x1,x0,x14
+ udiv x1,x0,x15
+ udiv x1,x0,x16
+ udiv x1,x0,x17
+ udiv x1,x0,x18
+ udiv x1,x0,x19
+ udiv x1,x0,x20
+ udiv x1,x0,x21
+ udiv x1,x0,x22
+ udiv x1,x0,x23
+ udiv x1,x0,x24
+ udiv x1,x0,x25
+ udiv x1,x0,x26
+ udiv x1,x0,x27
+ udiv x1,x0,x28
+ udiv x1,x0,x29
+ udiv x1,x0,x30
+ nop
+ udiv x1,x1,x0
+ udiv x1,x1,x1
+ udiv x1,x1,x2
+ udiv x1,x1,x3
+ udiv x1,x1,x4
+ udiv x1,x1,x5
+ udiv x1,x1,x6
+ udiv x1,x1,x7
+ udiv x1,x1,x8
+ udiv x1,x1,x9
+ udiv x1,x1,x10
+ udiv x1,x1,x11
+ udiv x1,x1,x12
+ udiv x1,x1,x13
+ udiv x1,x1,x14
+ udiv x1,x1,x15
+ udiv x1,x1,x16
+ udiv x1,x1,x17
+ udiv x1,x1,x18
+ udiv x1,x1,x19
+ udiv x1,x1,x20
+ udiv x1,x1,x21
+ udiv x1,x1,x22
+ udiv x1,x1,x23
+ udiv x1,x1,x24
+ udiv x1,x1,x25
+ udiv x1,x1,x26
+ udiv x1,x1,x27
+ udiv x1,x1,x28
+ udiv x1,x1,x29
+ udiv x1,x1,x30
+ nop
+ udiv x1,x2,x0
+ udiv x1,x2,x1
+ udiv x1,x2,x2
+ udiv x1,x2,x3
+ udiv x1,x2,x4
+ udiv x1,x2,x5
+ udiv x1,x2,x6
+ udiv x1,x2,x7
+ udiv x1,x2,x8
+ udiv x1,x2,x9
+ udiv x1,x2,x10
+ udiv x1,x2,x11
+ udiv x1,x2,x12
+ udiv x1,x2,x13
+ udiv x1,x2,x14
+ udiv x1,x2,x15
+ udiv x1,x2,x16
+ udiv x1,x2,x17
+ udiv x1,x2,x18
+ udiv x1,x2,x19
+ udiv x1,x2,x20
+ udiv x1,x2,x21
+ udiv x1,x2,x22
+ udiv x1,x2,x23
+ udiv x1,x2,x24
+ udiv x1,x2,x25
+ udiv x1,x2,x26
+ udiv x1,x2,x27
+ udiv x1,x2,x28
+ udiv x1,x2,x29
+ udiv x1,x2,x30
+ nop
+ udiv x1,x30,x0
+ udiv x1,x30,x1
+ udiv x1,x30,x2
+ udiv x1,x30,x3
+ udiv x1,x30,x4
+ udiv x1,x30,x5
+ udiv x1,x30,x6
+ udiv x1,x30,x7
+ udiv x1,x30,x8
+ udiv x1,x30,x9
+ udiv x1,x30,x10
+ udiv x1,x30,x11
+ udiv x1,x30,x12
+ udiv x1,x30,x13
+ udiv x1,x30,x14
+ udiv x1,x30,x15
+ udiv x1,x30,x16
+ udiv x1,x30,x17
+ udiv x1,x30,x18
+ udiv x1,x30,x19
+ udiv x1,x30,x20
+ udiv x1,x30,x21
+ udiv x1,x30,x22
+ udiv x1,x30,x23
+ udiv x1,x30,x24
+ udiv x1,x30,x25
+ udiv x1,x30,x26
+ udiv x1,x30,x27
+ udiv x1,x30,x28
+ udiv x1,x30,x29
+ udiv x1,x30,x30
+ nop
+ udiv x30,x0,x0
+ udiv x30,x0,x1
+ udiv x30,x0,x2
+ udiv x30,x0,x3
+ udiv x30,x0,x4
+ udiv x30,x0,x5
+ udiv x30,x0,x6
+ udiv x30,x0,x7
+ udiv x30,x0,x8
+ udiv x30,x0,x9
+ udiv x30,x0,x10
+ udiv x30,x0,x11
+ udiv x30,x0,x12
+ udiv x30,x0,x13
+ udiv x30,x0,x14
+ udiv x30,x0,x15
+ udiv x30,x0,x16
+ udiv x30,x0,x17
+ udiv x30,x0,x18
+ udiv x30,x0,x19
+ udiv x30,x0,x20
+ udiv x30,x0,x21
+ udiv x30,x0,x22
+ udiv x30,x0,x23
+ udiv x30,x0,x24
+ udiv x30,x0,x25
+ udiv x30,x0,x26
+ udiv x30,x0,x27
+ udiv x30,x0,x28
+ udiv x30,x0,x29
+ udiv x30,x0,x30
+
+ ret
+ .cfi_endproc
+
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/xor.s b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/xor.s
new file mode 100644
index 0000000..b71b267
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/arm64/xor.s
@@ -0,0 +1,208 @@
+ .file "arith.s"
+ .text
+ .p2align 4,,15
+ .globl xor
+ .type xor, @function
+xor:
+ .cfi_startproc
+ eor x0,x0,x0
+ eor x0,x0,x1
+ eor x0,x0,x2
+ eor x0,x0,x3
+ eor x0,x0,x4
+ eor x0,x0,x5
+ eor x0,x0,x6
+ eor x0,x0,x7
+ eor x0,x0,x8
+ eor x0,x0,x9
+ eor x0,x0,x10
+ eor x0,x0,x11
+ eor x0,x0,x12
+ eor x0,x0,x13
+ eor x0,x0,x14
+ eor x0,x0,x15
+ eor x0,x0,x16
+ eor x0,x0,x17
+ eor x0,x0,x18
+ eor x0,x0,x19
+ eor x0,x0,x20
+ eor x0,x0,x21
+ eor x0,x0,x22
+ eor x0,x0,x23
+ eor x0,x0,x24
+ eor x0,x0,x25
+ eor x0,x0,x26
+ eor x0,x0,x27
+ eor x0,x0,x28
+ eor x0,x0,x29
+ eor x0,x0,x30
+ nop
+ eor x1,x1,x0
+ eor x1,x1,x1
+ eor x1,x1,x2
+ eor x1,x1,x3
+ eor x1,x1,x4
+ eor x1,x1,x5
+ eor x1,x1,x6
+ eor x1,x1,x7
+ eor x1,x1,x8
+ eor x1,x1,x9
+ eor x1,x1,x10
+ eor x1,x1,x11
+ eor x1,x1,x12
+ eor x1,x1,x13
+ eor x1,x1,x14
+ eor x1,x1,x15
+ eor x1,x1,x16
+ eor x1,x1,x17
+ eor x1,x1,x18
+ eor x1,x1,x19
+ eor x1,x1,x20
+ eor x1,x1,x21
+ eor x1,x1,x22
+ eor x1,x1,x23
+ eor x1,x1,x24
+ eor x1,x1,x25
+ eor x1,x1,x26
+ eor x1,x1,x27
+ eor x1,x1,x28
+ eor x1,x1,x29
+ eor x1,x1,x30
+ nop
+ eor x2,x2,x0
+ eor x2,x2,x1
+ eor x2,x2,x2
+ eor x2,x2,x3
+ eor x2,x2,x4
+ eor x2,x2,x5
+ eor x2,x2,x6
+ eor x2,x2,x7
+ eor x2,x2,x8
+ eor x2,x2,x9
+ eor x2,x2,x10
+ eor x2,x2,x11
+ eor x2,x2,x12
+ eor x2,x2,x13
+ eor x2,x2,x14
+ eor x2,x2,x15
+ eor x2,x2,x16
+ eor x2,x2,x17
+ eor x2,x2,x18
+ eor x2,x2,x19
+ eor x2,x2,x20
+ eor x2,x2,x21
+ eor x2,x2,x22
+ eor x2,x2,x23
+ eor x2,x2,x24
+ eor x2,x2,x25
+ eor x2,x2,x26
+ eor x2,x2,x27
+ eor x2,x2,x28
+ eor x2,x2,x29
+ eor x2,x2,x30
+ nop
+ eor x30,x30,x0
+ eor x30,x30,x1
+ eor x30,x30,x2
+ eor x30,x30,x3
+ eor x30,x30,x4
+ eor x30,x30,x5
+ eor x30,x30,x6
+ eor x30,x30,x7
+ eor x30,x30,x8
+ eor x30,x30,x9
+ eor x30,x30,x10
+ eor x30,x30,x11
+ eor x30,x30,x12
+ eor x30,x30,x13
+ eor x30,x30,x14
+ eor x30,x30,x15
+ eor x30,x30,x16
+ eor x30,x30,x17
+ eor x30,x30,x18
+ eor x30,x30,x19
+ eor x30,x30,x20
+ eor x30,x30,x21
+ eor x30,x30,x22
+ eor x30,x30,x23
+ eor x30,x30,x24
+ eor x30,x30,x25
+ eor x30,x30,x26
+ eor x30,x30,x27
+ eor x30,x30,x28
+ eor x30,x30,x29
+ eor x30,x30,x30
+ ret
+ .cfi_endproc
+
+
+ .p2align 4,,15
+ .globl eor_const
+ .type eor_const, @function
+eor_const:
+ .cfi_startproc
+ eor x0,x0,#0x5555555555555555
+ eor x0,x0,#0xaaaaaaaaaaaaaaaa
+ eor x0,x0,#0x1111111111111111
+ eor x0,x0,#0x8888888888888888
+ eor x0,x0,#0x4444444444444444
+ eor x0,x0,#0x2222222222222222
+ eor x0,x0,#0x3333333333333333
+ eor x0,x0,#0x9999999999999999
+ eor x0,x0,#0xcccccccccccccccc
+ eor x0,x0,#0x6666666666666666
+ eor x0,x0,#0x7777777777777777
+ eor x0,x0,#0xbbbbbbbbbbbbbbbb
+ eor x0,x0,#0xdddddddddddddddd
+ eor x0,x0,#0xeeeeeeeeeeeeeeee
+ eor x0,x0,#0xfffffffffffffffe
+ nop
+ eor x1,x1,#0x5555555555555555
+ eor x1,x1,#0xaaaaaaaaaaaaaaaa
+ eor x1,x1,#0x1111111111111111
+ eor x1,x1,#0x8888888888888888
+ eor x1,x1,#0x4444444444444444
+ eor x1,x1,#0x2222222222222222
+ eor x1,x1,#0x3333333333333333
+ eor x1,x1,#0x9999999999999999
+ eor x1,x1,#0xcccccccccccccccc
+ eor x1,x1,#0x6666666666666666
+ eor x1,x1,#0x7777777777777777
+ eor x1,x1,#0xbbbbbbbbbbbbbbbb
+ eor x1,x1,#0xdddddddddddddddd
+ eor x1,x1,#0xeeeeeeeeeeeeeeee
+ eor x1,x1,#0xfffffffffffffffe
+ nop
+ eor x2,x2,#0x5555555555555555
+ eor x2,x2,#0xaaaaaaaaaaaaaaaa
+ eor x2,x2,#0x1111111111111111
+ eor x2,x2,#0x8888888888888888
+ eor x2,x2,#0x4444444444444444
+ eor x2,x2,#0x2222222222222222
+ eor x2,x2,#0x3333333333333333
+ eor x2,x2,#0x9999999999999999
+ eor x2,x2,#0xcccccccccccccccc
+ eor x2,x2,#0x6666666666666666
+ eor x2,x2,#0x7777777777777777
+ eor x2,x2,#0xbbbbbbbbbbbbbbbb
+ eor x2,x2,#0xdddddddddddddddd
+ eor x2,x2,#0xeeeeeeeeeeeeeeee
+ eor x2,x2,#0xfffffffffffffffe
+ nop
+ eor x30,x30,#0x5555555555555555
+ eor x30,x30,#0xaaaaaaaaaaaaaaaa
+ eor x30,x30,#0x1111111111111111
+ eor x30,x30,#0x8888888888888888
+ eor x30,x30,#0x4444444444444444
+ eor x30,x30,#0x2222222222222222
+ eor x30,x30,#0x3333333333333333
+ eor x30,x30,#0x9999999999999999
+ eor x30,x30,#0xcccccccccccccccc
+ eor x30,x30,#0x6666666666666666
+ eor x30,x30,#0x7777777777777777
+ eor x30,x30,#0xbbbbbbbbbbbbbbbb
+ eor x30,x30,#0xdddddddddddddddd
+ eor x30,x30,#0xeeeeeeeeeeeeeeee
+ eor x30,x30,#0xfffffffffffffffe
+ ret
+ .cfi_endproc
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/asm_template.h b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/asm_template.h
new file mode 100644
index 0000000..de93937
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/asm_template.h
@@ -0,0 +1,50 @@
+#ifndef gomacro_asm_template_h
+#define gomacro_asm_template_h
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * asm_template.h
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+#include
+
+typedef int8_t i8;
+typedef int16_t i16;
+typedef int32_t i32;
+typedef int64_t i64;
+
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
+
+#define Z (ints + 81)
+#define A (ints + 82)
+#define B (ints + 83)
+
+#define z(l) (*(i##l *)Z)
+#define a(l) (*(i##l *)A)
+#define b(l) (*(i##l *)B)
+
+#define uz(l) (*(u##l *)Z)
+#define ua(l) (*(u##l *)A)
+#define ub(l) (*(u##l *)B)
+
+#if defined(__amd64) || defined(__amd64__) || defined(__i386) || defined(__i386__)
+i64 _(i64 ax);
+#else
+# define _(arg) arg
+#endif
+
+#endif /* gomacro_asm_template_h */
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/bitwise.c b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/bitwise.c
new file mode 100644
index 0000000..d1cf6b5
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/bitwise.c
@@ -0,0 +1,62 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * binary_bitwise.c
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+
+#include "asm_template.h"
+
+i64 And_l_ax(u64 *ints, i64 ax) {
+ return _(ax) & 0x55667788;
+}
+i64 And_q_ax(u64 *ints, i64 ax) {
+ return _(ax) & 0x5566778899aabbccll;
+}
+i64 And_ax(u64 *ints, i64 ax) {
+ return _(ax) & a(64);
+}
+
+
+i64 Or_l_ax(u64 *ints, i64 ax) {
+ return _(ax) | 0x55667788;
+}
+i64 Or_q_ax(u64 *ints, i64 ax) {
+ return _(ax) | 0x5566778899aabbccll;
+}
+i64 Or_ax(u64 *ints, i64 ax) {
+ return _(ax) | a(64);
+}
+
+
+i64 Xor_l_ax(u64 *ints, i64 ax) {
+ return _(ax) ^ 0x55667788;
+}
+i64 Xor_q_ax(u64 *ints, i64 ax) {
+ return _(ax) ^ 0x5566778899aabbccll;
+}
+i64 Xor_ax(u64 *ints, i64 ax) {
+ return _(ax) ^ a(64);
+}
+
+
+
+i64 Andnot_l_ax(u64 *ints, i64 ax) {
+ return _(ax) & ~0x55667788;
+}
+i64 Andnot_q_ax(u64 *ints, i64 ax) {
+ return _(ax) & ~0x5566778899aabbccll;
+}
+i64 Andnot_ax(u64 *ints, i64 ax) {
+ return _(ax) & ~a(64);
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/template/set_value.c b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/set_value.c
new file mode 100644
index 0000000..d8493a9
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/template/set_value.c
@@ -0,0 +1,71 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * set_value.c
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+
+#include "asm_template.h"
+
+void ZeroInt8(u64 *ints) {
+ z(8) = 0;
+}
+void ZeroInt16(u64 *ints) {
+ z(16) = 0;
+}
+void ZeroInt32(u64 *ints) {
+ z(32) = 0;
+}
+void ZeroInt64(u64 *ints) {
+ z(64) = 0;
+}
+
+
+void SetInt8(u64 *ints) {
+ z(8) = 0x55;
+}
+void SetInt16(u64 *ints) {
+ z(16) = 0x5566;
+}
+void SetInt32(u64 *ints) {
+ z(32) = 0x55667788;
+}
+void SetInt64b(u64 *ints) {
+ z(64) = 0x55;
+}
+void SetInt64l(u64 *ints) {
+ z(64) = 0x55667788;
+}
+void SetInt64q(u64 *ints) {
+ z(64) = 0x5566778899aabbcc;
+}
+
+void SetUint8(u64 *ints) {
+ uz(8) = 0x55;
+}
+void SetUint16(u64 *ints) {
+ uz(16) = 0x5566;
+}
+void SetUint32(u64 *ints) {
+ uz(32) = 0x55667788;
+}
+void SetUint64b(u64 *ints) {
+ uz(64) = 0x55;
+}
+void SetUint64l(u64 *ints) {
+ uz(64) = 0x55667788;
+}
+void SetUint64q(u64 *ints) {
+ uz(64) = 0x5566778899aabbcc;
+}
+
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/var.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/var.go
new file mode 100644
index 0000000..0ae9d62
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/var.go
@@ -0,0 +1,36 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * var.go
+ *
+ * Created on May 24, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import "reflect"
+
+func NewVar(idx uint16) *Var {
+ return &Var{desc: desc{idx: idx}}
+}
+
+// implement Arg interface
+func (v *Var) reg(asm *Asm) hwReg {
+ return noReg
+}
+
+func (v *Var) Const() bool {
+ return false
+}
+
+func (v *Var) Kind() reflect.Kind {
+ return v.kind
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/jit/z_test.go b/vendor/github.com/cosmos72/gomacro/experiments/jit/z_test.go
new file mode 100644
index 0000000..7bb42eb
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/jit/z_test.go
@@ -0,0 +1,130 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * z_test.go
+ *
+ * Created on May 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package jit
+
+import (
+ "fmt"
+ "math/rand"
+ "testing"
+ "unsafe"
+)
+
+// the content of this file is portable, but obviously
+// it requires a working JIT implementation underneath.
+// so run the tests only on architectures supported by JIT.
+
+const verbose = false
+
+func TestNop(t *testing.T) {
+ var asm Asm
+ f := asm.Init().Func()
+ ints := [1]uint64{0}
+ f(&ints[0])
+}
+
+func TestLoadStore(t *testing.T) {
+ if !SUPPORTED {
+ t.SkipNow()
+ }
+ var asm Asm
+ v := NewVar(0)
+ ints := [1]uint64{0}
+ for r := rLo; r <= rHi; r++ {
+ asm.Init()
+ if asm.hwRegs.Contains(r) {
+ continue
+ }
+ val := int64(rand.Uint64())
+ f := asm.loadConst(r, val).storeReg(v, r).Func()
+ f(&ints[0])
+ actual := int64(ints[0])
+ if actual != val {
+ t.Errorf("LoadConst+Store returned %d, expecting %d", actual, val)
+ }
+ }
+}
+
+func TestSum(t *testing.T) {
+ if !SUPPORTED {
+ t.SkipNow()
+ }
+ const (
+ n = 10
+ expected = n * (n + 1) / 2
+ )
+ f := DeclSum()
+
+ actual := f(n)
+ if actual != expected {
+ t.Errorf("sum(%v) returned %v, expecting %d", n, actual, expected)
+ } else if verbose {
+ t.Logf("sum(%v) = %v\n", n, actual)
+ }
+}
+
+func TestAdd(t *testing.T) {
+ if !SUPPORTED {
+ t.SkipNow()
+ }
+ var asm Asm
+ v1, v2, v3 := NewVar(0), NewVar(1), NewVar(2)
+ r := RegLo
+ f := asm.Init().Alloc(r).Load(r, v1).Neg(r).Not(r).Add(r, v2).Not(r).Neg(r).Store(v3, r).Free(r).Func()
+
+ if verbose {
+ code := asm.code
+ mem := **(**[]uint8)(unsafe.Pointer(&f))
+ fmt.Printf("f = %p\n", f)
+ fmt.Printf("addr = %p\n", mem)
+ fmt.Printf("mem = %v\n", mem)
+ fmt.Printf("code = %#v\n", code)
+ }
+ const (
+ a = 7
+ b = 11
+ c = a + b
+ )
+
+ ints := [3]uint64{0: a, 1: b}
+ f(&ints[0])
+ if ints[2] != c {
+ t.Errorf("Add returned %v, expecting %d", ints[1], c)
+ } else if verbose {
+ t.Logf("ints = %v\n", ints)
+ }
+
+}
+
+func TestArith(t *testing.T) {
+ if !SUPPORTED {
+ t.SkipNow()
+ }
+ const (
+ n int = 9
+ expected int = ((((n*2 + 3) | 4) &^ 5) ^ 6) / ((n & 2) | 1)
+ )
+ env := [5]uint64{uint64(n), 0, 0}
+ f := DeclArith(len(env))
+
+ f(&env[0])
+ actual := int(env[1])
+ if actual != expected {
+ t.Errorf("arith(%d) returned %d, expecting %d", n, actual, expected)
+ } else if verbose {
+ t.Logf("arith(%d) = %d\n", n, actual)
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/stmt_0-3_test.go b/vendor/github.com/cosmos72/gomacro/experiments/stmt_0-3_test.go
new file mode 100644
index 0000000..e0dedc4
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/stmt_0-3_test.go
@@ -0,0 +1,159 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * stmt_0-3_test.go
+ *
+ * Created on Apr 04, 2017
+ * Author Massimiliano Ghilardi
+ */
+
+package experiments
+
+import (
+ r "reflect"
+ "testing"
+)
+
+type (
+ Env0 struct {
+ Binds []r.Value
+ Outer *Env0
+ }
+ Stmt0 func(env *Env0, code []Stmt0) (Stmt0, *Env0)
+)
+
+func _BenchmarkStmt0(b *testing.B) {
+
+ env := &Env0{
+ Binds: make([]r.Value, 10),
+ }
+ code := make([]Stmt0, n+1)
+ for i := 0; i < n; i++ {
+ i := i
+ code[i] = func(env *Env0, code []Stmt0) (Stmt0, *Env0) {
+ return code[i+1], env
+ }
+ }
+ code[n] = nil
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ stmt := code[0]
+ for stmt != nil {
+ stmt, env = stmt(env, code)
+ }
+ }
+}
+
+type (
+ Env1 struct {
+ Binds []r.Value
+ Outer *Env1
+ IP int
+ }
+ Stmt1 func(env *Env1, all []Stmt1) (Stmt1, *Env1)
+)
+
+func nop1(env *Env1, code []Stmt1) (Stmt1, *Env1) {
+ env.IP++
+ return code[env.IP], env
+}
+
+func _BenchmarkStmt1(b *testing.B) {
+
+ env := &Env1{
+ Binds: make([]r.Value, 10),
+ }
+ all := make([]Stmt1, n+1)
+ for i := 0; i < n; i++ {
+ all[i] = nop1
+ }
+ all[n] = nil
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ env.IP = 0
+ stmt := all[0]
+ for stmt != nil {
+ stmt, env = stmt(env, all)
+ }
+ }
+}
+
+type (
+ Env2 struct {
+ Binds []r.Value
+ Outer *Env2
+ Code []Stmt2
+ }
+ Stmt2 func(env *Env2, ip int) (Stmt2, *Env2, int)
+)
+
+func nop2(env *Env2, ip int) (Stmt2, *Env2, int) {
+ ip++
+ return env.Code[ip], env, ip
+}
+
+func _BenchmarkStmt2(b *testing.B) {
+ env := &Env2{
+ Binds: make([]r.Value, 10),
+ }
+ all := make([]Stmt2, n+1)
+ for i := 0; i < n; i++ {
+ all[i] = nop2
+ }
+ all[n] = nil
+ env.Code = all
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ ip := 0
+ stmt := all[ip]
+ for stmt != nil {
+ stmt, env, ip = stmt(env, ip)
+ }
+ }
+}
+
+type (
+ Env3 struct {
+ Binds []r.Value
+ Outer *Env0
+ Code []Stmt3
+ }
+ Stmt3 func(env *Env3, ip int) (Stmt3, int)
+)
+
+func nop3(env *Env3, ip int) (Stmt3, int) {
+ ip++
+ return env.Code[ip], ip
+}
+
+func _BenchmarkStmt3(b *testing.B) {
+
+ env := &Env3{
+ Binds: make([]r.Value, 10),
+ }
+ all := make([]Stmt3, n+1)
+ for i := 0; i < n; i++ {
+ all[i] = nop3
+ }
+ all[n] = nil
+ env.Code = all
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ ip := 0
+ stmt := all[ip]
+ for stmt != nil {
+ stmt, ip = stmt(env, ip)
+ }
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/stmt_4-5_test.go b/vendor/github.com/cosmos72/gomacro/experiments/stmt_4-5_test.go
new file mode 100644
index 0000000..2ca0d4c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/stmt_4-5_test.go
@@ -0,0 +1,247 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * stmt_4-5_test.go
+ *
+ * Created on Apr 04, 2017
+ * Author Massimiliano Ghilardi
+ */
+
+package experiments
+
+import (
+ r "reflect"
+ "testing"
+)
+
+type (
+ Env4 struct {
+ Binds []r.Value
+ Outer *Env4
+ IP int
+ Code []Stmt4
+ Interrupt Stmt4
+ Signal int
+ }
+ Stmt4 func(env *Env4) Stmt4
+)
+
+func nop4(env *Env4) Stmt4 {
+ env.IP++
+ return env.Code[env.IP]
+}
+
+func interrupt4(env *Env4) Stmt4 {
+ env.Signal = 1
+ return env.Interrupt
+}
+
+func newEnv4() *Env4 {
+ code := make([]Stmt4, n+1)
+ for i := 0; i < n; i++ {
+ code[i] = nop4
+ }
+ code[n] = nil
+ return &Env4{
+ Binds: make([]r.Value, 10),
+ Code: code,
+ }
+}
+
+func BenchmarkStmt4(b *testing.B) {
+ env := newEnv4()
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ env.IP = 0
+ stmt := env.Code[0]
+ for {
+ if stmt = stmt(env); stmt == nil {
+ break
+ }
+ }
+ }
+}
+
+func BenchmarkStmt4Unroll(b *testing.B) {
+ env := newEnv4()
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ env.IP = 0
+ stmt := env.Code[0]
+ for {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ continue
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ break
+ }
+ }
+}
+
+func BenchmarkStmt4Spin(b *testing.B) {
+ env := newEnv4()
+ env.Code[n] = interrupt4
+ env.Interrupt = interrupt4
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ env.IP = 0
+ env.Signal = 0
+ stmt := env.Code[0]
+ for {
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ if env.Signal != 0 {
+ break
+ }
+ }
+ }
+}
+
+func BenchmarkStmt4Adaptive13(b *testing.B) {
+ env := newEnv4()
+ env.Code[n] = interrupt4
+
+ b.ResetTimer()
+outer:
+ for i := 0; i < b.N; i++ {
+ env.IP = 0
+ env.Interrupt = nil
+ env.Signal = 0
+ stmt := env.Code[0]
+ for j := 0; j < 5; j++ {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ if stmt = stmt(env); stmt != nil {
+ continue
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ continue outer
+ }
+ env.Interrupt = interrupt4
+ for {
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+ stmt = stmt(env)
+
+ if env.Signal != 0 {
+ continue outer
+ }
+ }
+ }
+}
+
+type (
+ Env5 struct {
+ Binds []r.Value
+ IP int
+ Code []Stmt5
+ Outer *Env5
+ }
+ Stmt5 func(**Env5) Stmt5
+)
+
+func BenchmarkStmt5(b *testing.B) {
+
+ var nop Stmt5 = func(penv **Env5) Stmt5 {
+ env := *penv
+ env.IP++
+ return env.Code[env.IP]
+ }
+
+ env := &Env5{
+ Binds: make([]r.Value, 10),
+ }
+ all := make([]Stmt5, n+1)
+ for i := 0; i < n; i++ {
+ i := i
+ all[i] = nop
+ }
+ all[n] = nil
+ env.Code = all
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ env.IP = 0
+ stmt := all[0]
+ for {
+ if stmt = stmt(&env); stmt == nil {
+ break
+ }
+ }
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/stmt_new_test.go b/vendor/github.com/cosmos72/gomacro/experiments/stmt_6_test.go
similarity index 50%
rename from vendor/github.com/cosmos72/gomacro/experiments/stmt_new_test.go
rename to vendor/github.com/cosmos72/gomacro/experiments/stmt_6_test.go
index 5a63fbf..dc5ee00 100644
--- a/vendor/github.com/cosmos72/gomacro/experiments/stmt_new_test.go
+++ b/vendor/github.com/cosmos72/gomacro/experiments/stmt_6_test.go
@@ -1,23 +1,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * stmt_test.go
+ * stmt_6_test.go
*
* Created on Apr 04, 2017
* Author Massimiliano Ghilardi
@@ -31,181 +22,63 @@ import (
"unsafe"
)
-const (
- n int = 1000
-)
-
-/*
- benchmark results on Intel Core2 Duo P8400 @2.26GHz, Ubuntu 16.04.1 amd64, Linux 4.4.0-31-generic amd64, Go 1.8.1 linux/amd64
-
- -------- n = 10 --------
- BenchmarkThreadedStmtFunc6-2 20000000 64.6 ns/op
- BenchmarkThreadedStmtFunc6Unroll-2 20000000 59.8 ns/op
- BenchmarkThreadedStmtFunc6Terminate-2 20000000 98.5 ns/op
- BenchmarkThreadedStmtFunc6Adaptive-2 20000000 60.7 ns/op
- BenchmarkThreadedStmtStruct6-2 20000000 63.5 ns/op
- BenchmarkThreadedStmtStruct6Unroll-2 30000000 57.5 ns/op
- BenchmarkThreadedStmtStruct6Terminate-2 20000000 78.1 ns/op
- BenchmarkThreadedStmtStruct6Adaptive-2 30000000 52.4 ns/op
- BenchmarkThreadedStmtFunc0-2 20000000 76.3 ns/op
- BenchmarkThreadedStmtFunc1-2 20000000 80.0 ns/op
- BenchmarkThreadedStmtFunc2-2 20000000 70.4 ns/op
- BenchmarkThreadedStmtFunc3-2 20000000 70.4 ns/op
- BenchmarkThreadedStmtFunc4-2 20000000 66.3 ns/op
- BenchmarkThreadedStmtFunc4Unroll-2 20000000 59.9 ns/op
- BenchmarkThreadedStmtFunc4Terminate-2 20000000 83.1 ns/op
- BenchmarkThreadedStmtFunc4Adaptive-2 20000000 63.9 ns/op
- BenchmarkThreadedStmtFunc4Panic-2 5000000 332 ns/op
- BenchmarkThreadedStmtFunc5-2 20000000 72.7 ns/op
-
- -------- n = 100 --------
- BenchmarkThreadedStmtFunc6-2 2000000 665 ns/op
- BenchmarkThreadedStmtFunc6Unroll-2 2000000 600 ns/op
- BenchmarkThreadedStmtFunc6Terminate-2 2000000 634 ns/op
- BenchmarkThreadedStmtFunc6Adaptive-2 2000000 631 ns/op
- BenchmarkThreadedStmtStruct6-2 2000000 636 ns/op
- BenchmarkThreadedStmtStruct6Unroll-2 3000000 581 ns/op
- BenchmarkThreadedStmtStruct6Terminate-2 2000000 597 ns/op
- BenchmarkThreadedStmtStruct6Adaptive-2 3000000 543 ns/op
- BenchmarkThreadedStmtFunc0-2 2000000 777 ns/op
- BenchmarkThreadedStmtFunc1-2 2000000 818 ns/op
- BenchmarkThreadedStmtFunc2-2 2000000 701 ns/op
- BenchmarkThreadedStmtFunc3-2 2000000 701 ns/op
- BenchmarkThreadedStmtFunc4-2 2000000 654 ns/op
- BenchmarkThreadedStmtFunc4Unroll-2 3000000 642 ns/op
- BenchmarkThreadedStmtFunc4Terminate-2 2000000 643 ns/op
- BenchmarkThreadedStmtFunc4Adaptive-2 2000000 606 ns/op
- BenchmarkThreadedStmtFunc4Panic-2 2000000 902 ns/op
- BenchmarkThreadedStmtFunc5-2 2000000 749 ns/op
-
- -------- n = 1000 --------
- BenchmarkThreadedStmtFunc6-2 200000 6228 ns/op
- BenchmarkThreadedStmtFunc6Unroll-2 300000 5896 ns/op
- BenchmarkThreadedStmtFunc6Terminate-2 200000 5719 ns/op
- BenchmarkThreadedStmtFunc6Adaptive-2 300000 5538 ns/op
- BenchmarkThreadedStmtStruct6-2 200000 6227 ns/op
- BenchmarkThreadedStmtStruct6Unroll-2 200000 5668 ns/op
- BenchmarkThreadedStmtStruct6Terminate-2 300000 6068 ns/op
- BenchmarkThreadedStmtStruct6Adaptive-2 300000 5584 ns/op
- BenchmarkThreadedStmtFunc0-2 200000 7535 ns/op
- BenchmarkThreadedStmtFunc1-2 200000 8109 ns/op
- BenchmarkThreadedStmtFunc2-2 200000 7023 ns/op
- BenchmarkThreadedStmtFunc3-2 200000 7078 ns/op
- BenchmarkThreadedStmtFunc4-2 200000 6480 ns/op
- BenchmarkThreadedStmtFunc4Unroll-2 200000 5987 ns/op
- BenchmarkThreadedStmtFunc4Terminate-2 200000 5892 ns/op
- BenchmarkThreadedStmtFunc4Adaptive-2 200000 5906 ns/op
- BenchmarkThreadedStmtFunc4Panic-2 200000 6004 ns/op
- BenchmarkThreadedStmtFunc5-2 200000 7016 ns/op
-*/
type (
Env6 struct {
Binds []r.Value
Outer *Env6
- IP int
Code []Stmt6
+ IP int
+ Signal int
Interrupt Stmt6
}
Stmt6 func(*Env6) (Stmt6, *Env6)
X6 func(*Env6)
)
-func BenchmarkThreadedFuncX6(b *testing.B) {
-
- var nop X6 = func(env *Env6) {
- }
- env := &Env6{
- Binds: make([]r.Value, 10),
- }
- all := make([]X6, n)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- for _, x := range all {
- x(env)
- }
- }
+func nop6(env *Env6) (Stmt6, *Env6) {
+ env.IP++
+ return env.Code[env.IP], env
}
-func BenchmarkThreadedStmtFuncX6(b *testing.B) {
-
- var xnop X6 = func(env *Env6) {
- }
- var nop Stmt6 = func(env *Env6) (Stmt6, *Env6) {
- xnop(env)
- env.IP++
- return env.Code[env.IP], env
- }
- env := &Env6{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt6, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- env.IP = 0
- stmt := all[0]
- for stmt != nil {
- stmt, env = stmt(env)
- }
- }
+func interrupt6(env *Env6) (Stmt6, *Env6) {
+ env.Signal = 1
+ return env.Interrupt, env
}
-func BenchmarkThreadedStmtFunc6(b *testing.B) {
-
- var nop Stmt6 = func(env *Env6) (Stmt6, *Env6) {
- env.IP++
- return env.Code[env.IP], env
+func newEnv6() *Env6 {
+ code := make([]Stmt6, n+1)
+ for i := 0; i < n; i++ {
+ code[i] = nop6
}
-
- env := &Env6{
+ code[n] = nil
+ return &Env6{
Binds: make([]r.Value, 10),
+ Code: code,
}
- all := make([]Stmt6, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
+}
+func BenchmarkStmt6(b *testing.B) {
+ env := newEnv6()
b.ResetTimer()
for i := 0; i < b.N; i++ {
env.IP = 0
- stmt := all[0]
- for stmt != nil {
- stmt, env = stmt(env)
+ stmt := env.Code[0]
+ for {
+ if stmt, env = stmt(env); stmt == nil {
+ break
+ }
}
}
}
-func BenchmarkThreadedStmtFunc6Unroll(b *testing.B) {
- var nop Stmt6 = func(env *Env6) (Stmt6, *Env6) {
- env.IP++
- return env.Code[env.IP], env
- }
- env := &Env6{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt6, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
+func BenchmarkStmt6Unroll(b *testing.B) {
+ env := newEnv6()
b.ResetTimer()
for i := 0; i < b.N; i++ {
env.IP = 0
- stmt := all[0]
- for stmt != nil {
+ stmt := env.Code[0]
+ for {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
@@ -219,9 +92,7 @@ func BenchmarkThreadedStmtFunc6Unroll(b *testing.B) {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
- if stmt, env = stmt(env); stmt != nil {
- stmt, env = stmt(env)
- }
+ continue
}
}
}
@@ -235,41 +106,23 @@ func BenchmarkThreadedStmtFunc6Unroll(b *testing.B) {
}
}
}
+ break
}
}
}
-func BenchmarkThreadedStmtFunc6Terminate(b *testing.B) {
- var interrupt Stmt6
- interrupt = func(env *Env6) (Stmt6, *Env6) {
- return interrupt, env
- }
- unsafeInterrupt := *(**uintptr)(unsafe.Pointer(&interrupt))
+func BenchmarkStmt6Spin(b *testing.B) {
- var nop Stmt6 = func(env *Env6) (Stmt6, *Env6) {
- env.IP++
- return env.Code[env.IP], env
- }
- env := &Env6{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt6, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = interrupt
- env.Code = all
+ env := newEnv6()
+ env.Interrupt = interrupt6
+ env.Code[n] = interrupt6
b.ResetTimer()
for i := 0; i < b.N; i++ {
env.IP = 0
- stmt := all[0]
+ env.Signal = 0
+ stmt := env.Code[0]
for {
- if x := stmt; *(**uintptr)(unsafe.Pointer(&x)) == unsafeInterrupt {
- break
- }
- stmt, env = stmt(env)
- stmt, env = stmt(env)
stmt, env = stmt(env)
stmt, env = stmt(env)
stmt, env = stmt(env)
@@ -283,35 +136,22 @@ func BenchmarkThreadedStmtFunc6Terminate(b *testing.B) {
stmt, env = stmt(env)
stmt, env = stmt(env)
stmt, env = stmt(env)
+ if env.Signal != 0 {
+ break
+ }
}
}
}
-func BenchmarkThreadedStmtFunc6Adaptive(b *testing.B) {
- var nop Stmt6 = func(env *Env6) (Stmt6, *Env6) {
- env.IP++
- return env.Code[env.IP], env
- }
- var interrupt Stmt6 = func(env *Env6) (Stmt6, *Env6) {
- return env.Interrupt, env
- }
- unsafeInterrupt := *(**uintptr)(unsafe.Pointer(&interrupt))
-
- env := &Env6{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt6, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
+func BenchmarkStmt6Adaptive13(b *testing.B) {
+ env := newEnv6()
b.ResetTimer()
outer:
for i := 0; i < b.N; i++ {
env.IP = 0
- stmt := all[0]
+ env.Signal = 0
+ stmt := env.Code[0]
if stmt == nil {
continue outer
}
@@ -329,9 +169,7 @@ outer:
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
- if stmt, env = stmt(env); stmt != nil {
- continue
- }
+ continue
}
}
}
@@ -348,8 +186,8 @@ outer:
continue outer
}
- all[n] = interrupt
- env.Interrupt = interrupt
+ env.Code[n] = interrupt6
+ env.Interrupt = interrupt6
for {
stmt, env = stmt(env)
stmt, env = stmt(env)
@@ -364,10 +202,8 @@ outer:
stmt, env = stmt(env)
stmt, env = stmt(env)
stmt, env = stmt(env)
- stmt, env = stmt(env)
- stmt, env = stmt(env)
- if x := stmt; *(**uintptr)(unsafe.Pointer(&x)) == unsafeInterrupt {
+ if env.Signal != 0 {
continue outer
}
}
@@ -387,13 +223,7 @@ type (
}
)
-func init() {
- println("sizeof(*uintptr) =", unsafe.Sizeof((*uintptr)(nil)))
- println("sizeof(Stmt6) =", unsafe.Sizeof(func(env *Env6) (Stmt6, *Env6) { return nil, env }))
- println("sizeof(StmtS6) =", unsafe.Sizeof(StmtS6{}))
-}
-
-func BenchmarkThreadedStmtStruct6(b *testing.B) {
+func _BenchmarkStmtStruct6(b *testing.B) {
var nop StmtS6 = StmtS6{func(env *EnvS6) (StmtS6, *EnvS6) {
env.IP++
@@ -419,7 +249,7 @@ func BenchmarkThreadedStmtStruct6(b *testing.B) {
}
}
-func BenchmarkThreadedStmtStruct6Unroll(b *testing.B) {
+func _BenchmarkStmtStruct6Unroll(b *testing.B) {
var nop StmtS6 = StmtS6{func(env *EnvS6) (StmtS6, *EnvS6) {
env.IP++
@@ -473,7 +303,7 @@ func BenchmarkThreadedStmtStruct6Unroll(b *testing.B) {
}
}
-func BenchmarkThreadedStmtStruct6Terminate(b *testing.B) {
+func _BenchmarkStmtStruct6Spin(b *testing.B) {
var nop StmtS6 = StmtS6{func(env *EnvS6) (StmtS6, *EnvS6) {
env.IP++
@@ -522,7 +352,7 @@ func BenchmarkThreadedStmtStruct6Terminate(b *testing.B) {
}
}
-func BenchmarkThreadedStmtStruct6Adaptive(b *testing.B) {
+func _BenchmarkStmtStruct6Adaptive13(b *testing.B) {
var nop StmtS6 = StmtS6{func(env *EnvS6) (StmtS6, *EnvS6) {
env.IP++
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/stmt_7_test.go b/vendor/github.com/cosmos72/gomacro/experiments/stmt_7_test.go
new file mode 100644
index 0000000..5dfab4e
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/stmt_7_test.go
@@ -0,0 +1,296 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * stmt_3_test.go
+ *
+ * Created on May 01, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package experiments
+
+import (
+ r "reflect"
+ "testing"
+)
+
+type (
+ Env7 struct {
+ Binds []r.Value
+ Outer *Env7
+ }
+ Run7 struct {
+ Env *Env7
+ Code []Stmt7
+ IP int
+ Signal int
+ Interrupt Stmt7
+ }
+ Stmt7 func(run *Run7) Stmt7
+)
+
+func nop7(run *Run7) Stmt7 {
+ run.IP++
+ return run.Code[run.IP]
+}
+
+func interrupt7(run *Run7) Stmt7 {
+ run.Signal = 1
+ return run.Interrupt
+}
+
+func newRun7() *Run7 {
+ env := &Env7{
+ Binds: make([]r.Value, 10),
+ }
+ code := make([]Stmt7, n+1)
+ for i := 0; i < n; i++ {
+ code[i] = nop7
+ }
+ code[n] = nil
+ return &Run7{Env: env, Code: code}
+}
+
+func BenchmarkStmt7(b *testing.B) {
+ run := newRun7()
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ run.IP = 0
+ stmt := run.Code[0]
+ for {
+ if stmt = stmt(run); stmt == nil {
+ break
+ }
+ }
+ }
+}
+
+func BenchmarkStmt7Unroll(b *testing.B) {
+ run := newRun7()
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ run.IP = 0
+ stmt := run.Code[0]
+ for {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ continue
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ break
+ }
+ }
+}
+
+func BenchmarkStmt7Spin(b *testing.B) {
+ run := newRun7()
+
+ run.Code[n] = interrupt7
+ run.Interrupt = interrupt7
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ run.IP = 0
+ run.Signal = 0
+ stmt := run.Code[0]
+ for {
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ if run.Signal != 0 {
+ break
+ }
+ }
+ }
+}
+
+func BenchmarkStmt7Adaptive13(b *testing.B) {
+ run := newRun7()
+
+ b.ResetTimer()
+outer:
+ for i := 0; i < b.N; i++ {
+ run.IP = 0
+ run.Signal = 0
+ stmt := run.Code[0]
+ if stmt == nil {
+ continue outer
+ }
+ for j := 0; j < 5; j++ {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ continue
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ continue outer
+ }
+ run.Code[n] = interrupt7
+ run.Interrupt = interrupt7
+ for {
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+
+ if run.Signal != 0 {
+ continue outer
+ }
+ }
+ }
+}
+
+func BenchmarkStmt7Adaptive19(b *testing.B) {
+ run := newRun7()
+
+ b.ResetTimer()
+outer:
+ for i := 0; i < b.N; i++ {
+ run.IP = 0
+ run.Signal = 0
+ stmt := run.Code[0]
+ if stmt == nil {
+ continue outer
+ }
+ for j := 0; j < 5; j++ {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ if stmt = stmt(run); stmt != nil {
+ continue
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ continue outer
+ }
+ run.Code[n] = interrupt7
+ run.Interrupt = interrupt7
+ for {
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+ stmt = stmt(run)
+
+ if run.Signal != 0 {
+ continue outer
+ }
+ }
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/stmt_old_test.go b/vendor/github.com/cosmos72/gomacro/experiments/stmt_old_test.go
deleted file mode 100644
index f487e36..0000000
--- a/vendor/github.com/cosmos72/gomacro/experiments/stmt_old_test.go
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * gomacro - A Go interpreter with Lisp-like macros
- *
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * stmt_test.go
- *
- * Created on Apr 04, 2017
- * Author Massimiliano Ghilardi
- */
-
-package experiments
-
-import (
- r "reflect"
- "testing"
- "unsafe"
-)
-
-type (
- Env0 struct {
- Binds []r.Value
- Outer *Env0
- }
- Stmt0 func(env *Env0, code []Stmt0) (Stmt0, *Env0)
-)
-
-func BenchmarkThreadedStmtFunc0(b *testing.B) {
-
- env := &Env0{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt0, n+1)
- for i := 0; i < n; i++ {
- i := i
- all[i] = func(env *Env0, code []Stmt0) (Stmt0, *Env0) {
- return code[i+1], env
- }
- }
- all[n] = nil
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- stmt := all[0]
- for stmt != nil {
- stmt, env = stmt(env, all)
- }
- }
-}
-
-type (
- Env1 struct {
- Binds []r.Value
- Outer *Env1
- IP int
- }
- Stmt1 func(env *Env1, all []Stmt1) (Stmt1, *Env1)
-)
-
-func BenchmarkThreadedStmtFunc1(b *testing.B) {
-
- var nop Stmt1 = func(env *Env1, code []Stmt1) (Stmt1, *Env1) {
- env.IP++
- return code[env.IP], env
- }
-
- env := &Env1{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt1, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- env.IP = 0
- stmt := all[0]
- for stmt != nil {
- stmt, env = stmt(env, all)
- }
- }
-}
-
-type (
- Env2 struct {
- Binds []r.Value
- Outer *Env2
- Code []Stmt2
- }
- Stmt2 func(env *Env2, ip int) (Stmt2, *Env2, int)
-)
-
-func BenchmarkThreadedStmtFunc2(b *testing.B) {
-
- var nop Stmt2 = func(env *Env2, ip int) (Stmt2, *Env2, int) {
- ip++
- return env.Code[ip], env, ip
- }
-
- env := &Env2{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt2, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- ip := 0
- stmt := all[ip]
- for stmt != nil {
- stmt, env, ip = stmt(env, ip)
- }
- }
-}
-
-type (
- Env3 struct {
- Binds []r.Value
- Outer *Env0
- Code []Stmt3
- }
- Stmt3 func(env *Env3, ip int) (Stmt3, int)
-)
-
-func BenchmarkThreadedStmtFunc3(b *testing.B) {
-
- var nop Stmt3 = func(env *Env3, ip int) (Stmt3, int) {
- ip++
- return env.Code[ip], ip
- }
- env := &Env3{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt3, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- ip := 0
- stmt := all[ip]
- for stmt != nil {
- stmt, ip = stmt(env, ip)
- }
- }
-}
-
-type (
- Env4 struct {
- Binds []r.Value
- Outer *Env4
- IP int
- Code []Stmt4
- Interrupt Stmt4
- }
- Stmt4 func(env *Env4) Stmt4
-)
-
-func BenchmarkThreadedStmtFunc4(b *testing.B) {
- var nop Stmt4 = func(env *Env4) Stmt4 {
- env.IP++
- return env.Code[env.IP]
- }
- env := &Env4{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt4, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- env.IP = 0
- stmt := all[0]
- for stmt != nil {
- stmt = stmt(env)
- }
- }
-}
-
-func BenchmarkThreadedStmtFunc4Unroll(b *testing.B) {
- var nop Stmt4 = func(env *Env4) Stmt4 {
- env.IP++
- return env.Code[env.IP]
- }
- env := &Env4{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt4, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- env.IP = 0
- stmt := all[0]
- for stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- stmt = stmt(env)
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-
-func BenchmarkThreadedStmtFunc4Terminate(b *testing.B) {
- var interrupt Stmt4
- interrupt = func(env *Env4) Stmt4 {
- return interrupt
- }
- unsafeInterrupt := *(**uintptr)(unsafe.Pointer(&interrupt))
-
- var nop Stmt4 = func(env *Env4) Stmt4 {
- env.IP++
- return env.Code[env.IP]
- }
- env := &Env4{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt4, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = interrupt
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- env.IP = 0
- stmt := all[0]
- for {
- if x := stmt; *(**uintptr)(unsafe.Pointer(&x)) == unsafeInterrupt {
- break
- }
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- }
- }
-}
-
-func BenchmarkThreadedStmtFunc4Adaptive(b *testing.B) {
- var nop Stmt4 = func(env *Env4) Stmt4 {
- env.IP++
- return env.Code[env.IP]
- }
- var interrupt Stmt4 = func(env *Env4) Stmt4 {
- return env.Interrupt
- }
- unsafeInterrupt := *(**uintptr)(unsafe.Pointer(&interrupt))
- _ = unsafeInterrupt
- env := &Env4{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt4, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
-
- b.ResetTimer()
-outer:
- for i := 0; i < b.N; i++ {
- env.IP = 0
- stmt := all[0]
- if stmt == nil {
- continue outer
- }
- for j := 0; j < 5; j++ {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- if stmt = stmt(env); stmt != nil {
- continue
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- continue outer
- }
- all[n] = interrupt
- env.Interrupt = interrupt
- for {
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
-
- if x := stmt; *(**uintptr)(unsafe.Pointer(&x)) == unsafeInterrupt {
- continue outer
- }
- }
- }
-}
-
-func BenchmarkThreadedStmtFunc4Panic(b *testing.B) {
- var terminate Stmt4 = func(env *Env4) Stmt4 {
- panic("end of code")
- }
-
- var nop Stmt4 = func(env *Env4) Stmt4 {
- env.IP++
- return env.Code[env.IP]
- }
- env := &Env4{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt4, n+1)
- for i := 0; i < n; i++ {
- all[i] = nop
- }
- all[n] = terminate
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- runThreadedStmtFunc4Panic(env)
- }
-}
-
-func runThreadedStmtFunc4Panic(env *Env4) {
- env.IP = 0
- stmt := env.Code[0]
- defer func() {
- recover()
- }()
- for {
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- stmt = stmt(env)
- }
-}
-
-type (
- Env5 struct {
- Binds []r.Value
- IP int
- Code []Stmt5
- Outer *Env5
- }
- Stmt5 func(**Env5) Stmt5
-)
-
-func BenchmarkThreadedStmtFunc5(b *testing.B) {
-
- var nop Stmt5 = func(penv **Env5) Stmt5 {
- env := *penv
- env.IP++
- return env.Code[env.IP]
- }
-
- env := &Env5{
- Binds: make([]r.Value, 10),
- }
- all := make([]Stmt5, n+1)
- for i := 0; i < n; i++ {
- i := i
- all[i] = nop
- }
- all[n] = nil
- env.Code = all
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- env.IP = 0
- stmt := all[0]
- for stmt != nil {
- stmt = stmt(&env)
- }
- }
-}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/stmt_test.go b/vendor/github.com/cosmos72/gomacro/experiments/stmt_test.go
new file mode 100644
index 0000000..e99d5af
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/stmt_test.go
@@ -0,0 +1,105 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * stmt_0-3_test.go
+ *
+ * Created on Apr 04, 2017
+ * Author Massimiliano Ghilardi
+ */
+
+package experiments
+
+const (
+ n int = 2000
+)
+
+func init() {
+ println("n =", n)
+}
+
+/*
+ benchmark results on Intel Core i7 4770 @3.2GHz, Debian 9, Linux 4.15.13 amd64, Go 1.10.1 linux/amd64
+
+ -------- n = 10 --------
+ BenchmarkStmt4-8 100000000 23.0 ns/op
+ BenchmarkStmt4Unroll-8 100000000 23.7 ns/op
+ BenchmarkStmt4Spin-8 50000000 27.4 ns/op
+ BenchmarkStmt4Adaptive13-8 50000000 26.0 ns/op
+ BenchmarkStmt5-8 50000000 26.2 ns/op
+ BenchmarkStmt6-8 50000000 27.6 ns/op
+ BenchmarkStmt6Unroll-8 50000000 27.7 ns/op
+ BenchmarkStmt6Spin-8 50000000 35.4 ns/op
+ BenchmarkStmt6Adaptive13-8 50000000 28.1 ns/op
+ BenchmarkStmt7-8 100000000 23.1 ns/op
+ BenchmarkStmt7Unroll-8 50000000 24.6 ns/op
+ BenchmarkStmt7Spin-8 50000000 26.9 ns/op
+ BenchmarkStmt7Adaptive13-8 100000000 24.0 ns/op
+
+ -------- n = 20 --------
+ BenchmarkStmt4-8 30000000 48.2 ns/op
+ BenchmarkStmt4Unroll-8 30000000 49.7 ns/op
+ BenchmarkStmt4Spin-8 30000000 56.7 ns/op
+ BenchmarkStmt4Adaptive13-8 30000000 55.1 ns/op
+ BenchmarkStmt5-8 30000000 51.4 ns/op
+ BenchmarkStmt6-8 30000000 55.4 ns/op
+ BenchmarkStmt6Unroll-8 30000000 55.9 ns/op
+ BenchmarkStmt6Spin-8 20000000 72.0 ns/op
+ BenchmarkStmt6Adaptive13-8 30000000 55.9 ns/op
+ BenchmarkStmt7-8 30000000 45.7 ns/op
+ BenchmarkStmt7Unroll-8 30000000 45.8 ns/op
+ BenchmarkStmt7Spin-8 30000000 57.1 ns/op
+ BenchmarkStmt7Adaptive13-8 30000000 46.6 ns/op
+
+ -------- n = 50 --------
+ BenchmarkStmt4-8 10000000 127 ns/op
+ BenchmarkStmt4Unroll-8 20000000 115 ns/op
+ BenchmarkStmt4Spin-8 10000000 135 ns/op
+ BenchmarkStmt4Adaptive13-8 10000000 125 ns/op
+ BenchmarkStmt5-8 10000000 136 ns/op
+ BenchmarkStmt6-8 10000000 142 ns/op
+ BenchmarkStmt6Unroll-8 10000000 136 ns/op
+ BenchmarkStmt6Spin-8 10000000 151 ns/op
+ BenchmarkStmt6Adaptive13-8 10000000 137 ns/op
+ BenchmarkStmt7-8 10000000 133 ns/op
+ BenchmarkStmt7Unroll-8 20000000 120 ns/op
+ BenchmarkStmt7Spin-8 10000000 137 ns/op
+ BenchmarkStmt7Adaptive13-8 20000000 114 ns/op
+
+ -------- n = 100 --------
+ BenchmarkStmt4-8 5000000 238 ns/op
+ BenchmarkStmt4Unroll-8 10000000 236 ns/op
+ BenchmarkStmt4Spin-8 10000000 233 ns/op
+ BenchmarkStmt4Adaptive13-8 5000000 260 ns/op
+ BenchmarkStmt5-8 5000000 263 ns/op
+ BenchmarkStmt6-8 5000000 273 ns/op
+ BenchmarkStmt6Unroll-8 5000000 281 ns/op
+ BenchmarkStmt6Spin-8 5000000 289 ns/op
+ BenchmarkStmt6Adaptive13-8 5000000 311 ns/op
+ BenchmarkStmt7-8 10000000 237 ns/op
+ BenchmarkStmt7Unroll-8 10000000 233 ns/op
+ BenchmarkStmt7Spin-8 10000000 235 ns/op
+ BenchmarkStmt7Adaptive13-8 5000000 269 ns/op
+
+ -------- n = 200 --------
+ BenchmarkStmt4-8 3000000 479 ns/op
+ BenchmarkStmt4Unroll-8 3000000 483 ns/op
+ BenchmarkStmt4Spin-8 3000000 496 ns/op
+ BenchmarkStmt4Adaptive13-8 3000000 480 ns/op
+ BenchmarkStmt5-8 3000000 520 ns/op
+ BenchmarkStmt6-8 3000000 558 ns/op
+ BenchmarkStmt6Unroll-8 3000000 563 ns/op
+ BenchmarkStmt6Spin-8 3000000 588 ns/op
+ BenchmarkStmt6Adaptive13-8 3000000 585 ns/op
+ BenchmarkStmt7-8 3000000 449 ns/op
+ BenchmarkStmt7Unroll-8 3000000 455 ns/op
+ BenchmarkStmt7Spin-8 3000000 456 ns/op
+ BenchmarkStmt7Adaptive13-8 3000000 471 ns/op
+
+*/
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/zero/function_zero.go b/vendor/github.com/cosmos72/gomacro/experiments/zero/function_zero.go
new file mode 100644
index 0000000..0df5c0c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/zero/function_zero.go
@@ -0,0 +1,328 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * function_zero.go
+ *
+ * Created on May 26, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package zero
+
+import (
+ r "reflect"
+ "unsafe"
+)
+
+// Functions that return the zero value of their return type
+
+// Note: since Go GC relies on per-function stack maps to scavenge pointers,
+// these functions can be used with pointer arguments and return types
+// only because they do *NOT* actually access or create any pointer value.
+
+// We use an integer-based 8-byte struct instead of complex128
+// to avoid complications due to floating point registers:
+// since IEE 754 represents floating-point zero as 'all bits are 0',
+// this acceptable for zero values
+type uint128 struct {
+ a, b uint64
+}
+
+// return no values
+
+//go:nosplit
+func zeroArg0Ret0() {
+}
+
+//go:nosplit
+func zeroArg1Ret0(uint8) {
+}
+
+//go:nosplit
+func zeroArg2Ret0(uint16) {
+}
+
+//go:nosplit
+func zeroArg4Ret0(uint32) {
+}
+
+//go:nosplit
+func zeroArg8Ret0(uint64) {
+}
+
+//go:nosplit
+func zeroArg16Ret0(uint128) {
+}
+
+// return a 1-byte zero value
+
+//go:nosplit
+func zeroArg0Ret1() (ret uint8) {
+ return
+}
+
+//go:nosplit
+func zeroArg1Ret1(uint8) (ret uint8) {
+ return
+}
+
+//go:nosplit
+func zeroArg2Ret1(uint16) (ret uint8) {
+ return
+}
+
+//go:nosplit
+func zeroArg4Ret1(uint32) (ret uint8) {
+ return
+}
+
+//go:nosplit
+func zeroArg8Ret1(uint64) (ret uint8) {
+ return
+}
+
+//go:nosplit
+func zeroArg16Ret1(uint128) (ret uint8) {
+ return
+}
+
+// return a 2-byte zero value
+
+//go:nosplit
+func zeroArg0Ret2() (ret uint16) {
+ return
+}
+
+//go:nosplit
+func zeroArg1Ret2(uint8) (ret uint16) {
+ return
+}
+
+//go:nosplit
+func zeroArg2Ret2(uint16) (ret uint16) {
+ return
+}
+
+//go:nosplit
+func zeroArg4Ret2(uint32) (ret uint16) {
+ return
+}
+
+//go:nosplit
+func zeroArg8Ret2(uint64) (ret uint16) {
+ return
+}
+
+//go:nosplit
+func zeroArg16Ret2(uint128) (ret uint16) {
+ return
+}
+
+// return a 4-byte zero value
+
+//go:nosplit
+func zeroArg0Ret4() (ret uint32) {
+ return
+}
+
+//go:nosplit
+func zeroArg1Ret4(uint8) (ret uint32) {
+ return
+}
+
+//go:nosplit
+func zeroArg2Ret4(uint16) (ret uint32) {
+ return
+}
+
+//go:nosplit
+func zeroArg4Ret4(uint32) (ret uint32) {
+ return
+}
+
+//go:nosplit
+func zeroArg8Ret4(uint64) (ret uint32) {
+ return
+}
+
+//go:nosplit
+func zeroArg16Ret4(uint128) (ret uint32) {
+ return
+}
+
+// return a 8-byte zero value
+
+//go:nosplit
+func zeroArg0Ret8() (ret uint64) {
+ return
+}
+
+//go:nosplit
+func zeroArg1Ret8(uint8) (ret uint64) {
+ return
+}
+
+//go:nosplit
+func zeroArg2Ret8(uint16) (ret uint64) {
+ return
+}
+
+//go:nosplit
+func zeroArg4Ret8(uint32) (ret uint64) {
+ return
+}
+
+//go:nosplit
+func zeroArg8Ret8(uint64) (ret uint64) {
+ return
+}
+
+//go:nosplit
+func zeroArg16Ret8(uint128) (ret uint64) {
+ return
+}
+
+// return a 16-byte zero value
+
+//go:nosplit
+func zeroArg0Ret16() (ret uint128) {
+ return
+}
+
+//go:nosplit
+func zeroArg1Ret16(uint8) (ret uint128) {
+ return
+}
+
+//go:nosplit
+func zeroArg2Ret16(uint16) (ret uint128) {
+ return
+}
+
+//go:nosplit
+func zeroArg4Ret16(uint32) (ret uint128) {
+ return
+}
+
+//go:nosplit
+func zeroArg8Ret16(uint64) (ret uint128) {
+ return
+}
+
+//go:nosplit
+func zeroArg16Ret16(uint128) (ret uint128) {
+ return
+}
+
+var functionZero [6][6]uintptr
+
+func init() {
+ v00, v01, v02, v03, v04, v05 := zeroArg0Ret0, zeroArg0Ret1, zeroArg0Ret2, zeroArg0Ret4, zeroArg0Ret8, zeroArg0Ret16
+
+ functionZero[0][0] = *(*uintptr)(unsafe.Pointer(&v00))
+ functionZero[0][1] = *(*uintptr)(unsafe.Pointer(&v01))
+ functionZero[0][2] = *(*uintptr)(unsafe.Pointer(&v02))
+ functionZero[0][3] = *(*uintptr)(unsafe.Pointer(&v03))
+ functionZero[0][4] = *(*uintptr)(unsafe.Pointer(&v04))
+ functionZero[0][5] = *(*uintptr)(unsafe.Pointer(&v05))
+
+ v10, v11, v12, v13, v14, v15 := zeroArg1Ret0, zeroArg1Ret1, zeroArg1Ret2, zeroArg1Ret4, zeroArg1Ret8, zeroArg1Ret16
+
+ functionZero[1][0] = *(*uintptr)(unsafe.Pointer(&v10))
+ functionZero[1][1] = *(*uintptr)(unsafe.Pointer(&v11))
+ functionZero[1][2] = *(*uintptr)(unsafe.Pointer(&v12))
+ functionZero[1][3] = *(*uintptr)(unsafe.Pointer(&v13))
+ functionZero[1][4] = *(*uintptr)(unsafe.Pointer(&v14))
+ functionZero[1][5] = *(*uintptr)(unsafe.Pointer(&v15))
+
+ v20, v21, v22, v23, v24, v25 := zeroArg2Ret0, zeroArg2Ret1, zeroArg2Ret2, zeroArg2Ret4, zeroArg2Ret8, zeroArg2Ret16
+
+ functionZero[2][0] = *(*uintptr)(unsafe.Pointer(&v20))
+ functionZero[2][1] = *(*uintptr)(unsafe.Pointer(&v21))
+ functionZero[2][2] = *(*uintptr)(unsafe.Pointer(&v22))
+ functionZero[2][3] = *(*uintptr)(unsafe.Pointer(&v23))
+ functionZero[2][4] = *(*uintptr)(unsafe.Pointer(&v24))
+ functionZero[2][5] = *(*uintptr)(unsafe.Pointer(&v25))
+
+ v30, v31, v32, v33, v34, v35 := zeroArg4Ret0, zeroArg4Ret1, zeroArg4Ret2, zeroArg4Ret4, zeroArg4Ret8, zeroArg4Ret16
+
+ functionZero[3][0] = *(*uintptr)(unsafe.Pointer(&v30))
+ functionZero[3][1] = *(*uintptr)(unsafe.Pointer(&v31))
+ functionZero[3][2] = *(*uintptr)(unsafe.Pointer(&v32))
+ functionZero[3][3] = *(*uintptr)(unsafe.Pointer(&v33))
+ functionZero[3][4] = *(*uintptr)(unsafe.Pointer(&v34))
+ functionZero[3][5] = *(*uintptr)(unsafe.Pointer(&v35))
+
+ v40, v41, v42, v43, v44, v45 := zeroArg8Ret0, zeroArg8Ret1, zeroArg8Ret2, zeroArg8Ret4, zeroArg8Ret8, zeroArg8Ret16
+
+ functionZero[4][0] = *(*uintptr)(unsafe.Pointer(&v40))
+ functionZero[4][1] = *(*uintptr)(unsafe.Pointer(&v41))
+ functionZero[4][2] = *(*uintptr)(unsafe.Pointer(&v42))
+ functionZero[4][3] = *(*uintptr)(unsafe.Pointer(&v43))
+ functionZero[4][4] = *(*uintptr)(unsafe.Pointer(&v44))
+ functionZero[4][5] = *(*uintptr)(unsafe.Pointer(&v45))
+
+ v50, v51, v52, v53, v54, v55 := zeroArg16Ret0, zeroArg16Ret1, zeroArg16Ret2, zeroArg16Ret4, zeroArg16Ret8, zeroArg16Ret16
+
+ functionZero[5][0] = *(*uintptr)(unsafe.Pointer(&v50))
+ functionZero[5][1] = *(*uintptr)(unsafe.Pointer(&v51))
+ functionZero[5][2] = *(*uintptr)(unsafe.Pointer(&v52))
+ functionZero[5][3] = *(*uintptr)(unsafe.Pointer(&v53))
+ functionZero[5][4] = *(*uintptr)(unsafe.Pointer(&v54))
+ functionZero[5][5] = *(*uintptr)(unsafe.Pointer(&v55))
+}
+
+// if available, return the zero function matching function type 't'
+func FunctionZero(t r.Type) r.Value {
+ if t.NumIn() > 1 || t.NumOut() > 1 {
+ return r.Value{}
+ }
+ var insize, outsize uintptr
+ if t.NumIn() != 0 {
+ insize = t.In(0).Size()
+ }
+ if t.NumOut() != 0 {
+ outsize = t.Out(0).Size()
+ }
+
+ var i, o uint8
+ ni, no := uint8(len(functionZero)), uint8(len(functionZero[0]))
+ if insize != 0 {
+ for i = 1; i < ni; i++ {
+ if insize == 1<<(i-1) {
+ break
+ }
+ }
+ }
+ if outsize != 0 {
+ for o = 1; o < no; o++ {
+ if outsize == 1<<(o-1) {
+ break
+ }
+ }
+ }
+ if i >= ni || o >= no {
+ return r.Value{}
+ }
+
+ ret := r.Zero(t)
+
+ u := (*unsafeReflectValue)(unsafe.Pointer(&ret))
+ u.ptr = functionZero[i][o]
+ u.flag = uintptr(r.Func)
+
+ return ret
+}
+
+type unsafeReflectValue struct {
+ t *struct{} // actually *reflect.rtype
+ ptr uintptr
+ flag uintptr
+}
diff --git a/vendor/github.com/cosmos72/gomacro/experiments/zero/z_test.go b/vendor/github.com/cosmos72/gomacro/experiments/zero/z_test.go
new file mode 100644
index 0000000..18d321e
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/experiments/zero/z_test.go
@@ -0,0 +1,80 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * z_test.go
+ *
+ * Created on May 26, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package zero
+
+import (
+ r "reflect"
+ "testing"
+ "unsafe"
+)
+
+var rbasictypes = []r.Type{
+ r.Bool: r.TypeOf(bool(false)),
+ r.Int: r.TypeOf(int(0)),
+ r.Int8: r.TypeOf(int8(0)),
+ r.Int16: r.TypeOf(int16(0)),
+ r.Int32: r.TypeOf(int32(0)),
+ r.Int64: r.TypeOf(int64(0)),
+ r.Uint: r.TypeOf(uint(0)),
+ r.Uint8: r.TypeOf(uint8(0)),
+ r.Uint16: r.TypeOf(uint16(0)),
+ r.Uint32: r.TypeOf(uint32(0)),
+ r.Uint64: r.TypeOf(uint64(0)),
+ r.Uintptr: r.TypeOf(uintptr(0)),
+ r.Float32: r.TypeOf(float32(0)),
+ r.Float64: r.TypeOf(float64(0)),
+ r.Complex64: r.TypeOf(complex64(0)),
+ r.Complex128: r.TypeOf(complex128(0)),
+ r.String: r.TypeOf(string("")),
+ r.UnsafePointer: r.TypeOf(unsafe.Pointer(nil)),
+}
+
+func TestFunctionZero(t *testing.T) {
+ var targs, trets = []r.Type{nil}, []r.Type{nil}
+ lo, hi := r.Bool, r.UnsafePointer
+
+ for karg := lo; karg <= hi; karg++ {
+ targ := rbasictypes[karg]
+ if targ == nil {
+ continue
+ }
+ targs[0] = targ
+ for kret := lo; kret <= hi; kret++ {
+ tret := rbasictypes[kret]
+ if tret == nil {
+ continue
+ }
+ trets[0] = tret
+ typ := r.FuncOf(targs, trets, false)
+ f := FunctionZero(typ)
+ if !f.IsValid() {
+ t.Logf("FunctionZero(%v)\treturned nil function", typ)
+ continue
+ }
+ rets := f.Call([]r.Value{r.Zero(targ)})
+ if len(rets) != 1 {
+ t.Errorf("f(%v) %v\treturned %d values, expecting one: %v", targ, tret, len(rets), rets)
+ continue
+ }
+ if zero := r.Zero(tret); rets[0].Interface() != zero.Interface() {
+ t.Errorf("f(%v) %v\treturned value %v, expecting zero value %v", targ, tret, rets[0], zero)
+ continue
+ }
+ // t.Logf("f(%v) %v\treturned zero value %v", targ, tret, rets[0])
+ }
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/README.md b/vendor/github.com/cosmos72/gomacro/fast/README.md
index 6dc82b2..b13ef1f 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/README.md
+++ b/vendor/github.com/cosmos72/gomacro/fast/README.md
@@ -2,102 +2,20 @@
The package `fast` contains a faster reimplementation of gomacro interpreter.
-To learn about gomacro, download, compile and use it, please refer to the original implementation [README.md](../README.md)
-
-If you want to help with the reimplementation, or you are simply curious, read on :)
+To learn about gomacro, download, compile and use it, please refer to the main [README.md](../README.md)
## Current Status
STABLE.
-The fast interpreter supports:
-* multiline input - shared with the classic interpreter
-* line comments starting with #! in addition to // - shared with the classic interpreter
-* basic types: booleans, integers, floats, complex numbers, strings (and iota)
-* the empty interface, i.e. interface{} - other interfaces not implemented yet
-* constant, variable and type declarations (including untyped constants)
-* Go 1.9 type aliases (experimental)
-* unary and binary operators
-* assignment, i.e. operators := = += -= *= /= %= &= |= ^= <<= >>= &^=
-* composite types: arrays, channels, maps, pointers, slices, strings, structs (including composite literals)
-* accessing struct fields, including embedded fields
-* slicing
-* type assertions and type conversions
-* interface declarations (**only** declarations. interfaces cannot be implemented or used yet)
-* importing and using interfaces declared (and implemented) by compiled code
-* function declarations and calls, including variadic functions
-* method declarations and calls, including wrapper methods for embedded fields
-* closures
-* Type.Method i.e. converting methods to functions (examples: time.Duration.Hours, fmt.Stringer.String)
-* seamless invocation of compiled functions from interpreter, and vice-versa
-* if, for, range, select, switch, type switch, break, continue, fallthrough, return (unimplemented: goto)
-* all builtins: append, cap, close, complex, defer, delete, imag, len, make, new, panic, print, println, real, recover
-* go i.e. goroutines
-* imports
- * Go standard packages "just work"
- * importing other packages requires the "plugin" package (available only on Linux with Go 1.8+)
-* ~quote, ~quasiquote, ~unquote, ~unquote_splice
-* macro declarations, for example `macro foo(a, b, c interface{}) interface{} { return b }`
-* macro calls, for example `foo; x; y; z`
-
-Missing features - you are welcome to contribute:
-* goto
-* interfaces. They can be declared, but nothing more: there is no way to implement them or call their methods
- (interfaces declared in compiled code can be used, but not yet implemented by interpreted code)
-* conversion from/to interpreted interfaces
-
-Current limitations:
-* named types declared by interpreted code are approximated.
- Inside the interpreter they look and behave correctly, but if you pass them to compiled code,
- the type is actually unnamed.
-
- For example, if interpreted code declares `type Pair struct { A, B int }`,
- then passes a `Pair` to compiled code, it will be received as `struct { A, B int }`
-
- The reason for such limitation is simple: the function `reflect.NamedOf()` does not exist,
- so the interpreter uses `reflect.StructOf()` to define new types,
- which can only create unnamed types.
-
-* recursive types declared by interpreted code are approximated.
- Inside the interpreter they look and behave correctly, but if you pass them to compiled code,
- the type is unnamed (as above) and self-references are actually interface{}.
-
- For example, if interpreted code declares `type List struct { First int; Rest *List }`
- then passes a `List` to compiled code, it will be received as `struct { First int; Rest *interface{} }`
-
- The reason is the same as above: the interpreter uses `reflect.StructOf()` to define new types,
- which cannot create recursive types.
-
- Interestingly, this means the interpreter also accepts the following declaration,
- which is rejected by Go compiler: `type List2 struct { First int; Rest List2 }`
- Note that `Rest` is a `List2` **not** a pointer to `List2`
-
-* interfaces declared by interpreted code are emulated.
- Inside the interpreter they look and behave correctly, but if you pass them to compiled code,
- the type is actually a pointer to a struct containing a header and a lot of functions.
-
- The reason is: the function `reflect.InterfaceOf()` does not exist,
- so the interpreter has to emulate interfaces with `reflect.StructOf()` and a lot of bookkeeping
+## Features and limitations
-* operators << and >> on untyped constants do not follow the exact type deduction rules.
- The implemented behavior is:
- * an untyped constant shifted by a non-constant expression always returns an int
- * an untyped floating point constant shifted by a constant expression returns an untyped integer constant.
- the interpreter signals an error during the precompile phase
- if the left operand has a non-zero fractional or imaginary part,
- or it overflows both int64 and uint64.
- See [Go Language Specification](https://golang.org/ref/spec#Operators) for the correct behavior
+See [../doc/features-and-limitations.md](../doc/features-and-limitations.md)
-* recover() does not support mixing interpreted and compiled code:
- if an interpreted function invokes as defer a compiled function,
- or a compiled function invokes as defer an interpreted function,
- then, inside that defer, recover() will not work:
- it will return nil and will **not** stop panics.
- recover() works normally if the function and its defer are either
- **both interpreted** or **both compiled**.
+## Misc TODO notes
-Misc TODO notes:
-* when importing a package, reuse compiled .so if exists already
-* gomacro FILE: execute main() if (re)defined and package == "main"
+* contact github.com/neugram/ng author?
+* when importing a package, reuse compiled .so if exists already?
+* gomacro FILE: execute all the init() functions, then execute main() if (re)defined and package == "main"
* try to run Go compiler tests
diff --git a/vendor/github.com/cosmos72/gomacro/fast/address.go b/vendor/github.com/cosmos72/gomacro/fast/address.go
index 342af20..c995ea3 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/address.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/address.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* address.go
@@ -39,8 +30,8 @@ import (
xr "github.com/cosmos72/gomacro/xreflect"
)
-func (c *Comp) AddressOf(node *ast.UnaryExpr) *Expr { return c.addressOf(node.X) }
-func (c *Comp) addressOf(expr ast.Expr) *Expr {
+func (c *Comp) AddressOf(node *ast.UnaryExpr) *Expr { return c.addressOf(node.X, nil) }
+func (c *Comp) addressOf(expr ast.Expr, t xr.Type) *Expr {
for {
switch e := expr.(type) {
case *ast.ParenExpr:
@@ -48,7 +39,11 @@ func (c *Comp) addressOf(expr ast.Expr) *Expr {
continue
case *ast.StarExpr:
- ret := c.Expr1(e.X)
+ if t != nil {
+ t = t.Elem()
+ }
+
+ ret := c.Expr1(e.X, t)
if ret.Type.Kind() != r.Ptr {
c.Errorf("unary operation * on non-pointer <%v>: %v", ret.Type, e)
}
@@ -56,7 +51,7 @@ func (c *Comp) addressOf(expr ast.Expr) *Expr {
}
break
}
- place := c.placeOrAddress(expr, PlaceAddress)
+ place := c.placeOrAddress(expr, PlaceAddress, t)
if place.IsVar() {
va := place.Var
@@ -92,201 +87,214 @@ func (va *Var) Address(maxdepth int) *Expr {
if intbinds {
ret = func(env *Env) *bool {
- env.AddressTaken = true
- return (*bool)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*bool)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *bool {
- return env.Binds[index].Addr().Interface().(*bool)
+ return env.Vals[index].Addr().Interface().(*bool)
}
}
case r.Int:
if intbinds {
ret = func(env *Env) *int {
- env.AddressTaken = true
- return (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int {
- return env.Binds[index].Addr().Interface().(*int)
+ return env.Vals[index].Addr().Interface().(*int)
}
}
case r.Int8:
if intbinds {
ret = func(env *Env) *int8 {
- env.AddressTaken = true
- return (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int8 {
- return env.Binds[index].Addr().Interface().(*int8)
+ return env.Vals[index].Addr().Interface().(*int8)
}
}
case r.Int16:
if intbinds {
ret = func(env *Env) *int16 {
- env.AddressTaken = true
- return (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int16 {
- return env.Binds[index].Addr().Interface().(*int16)
+ return env.Vals[index].Addr().Interface().(*int16)
}
}
case r.Int32:
if intbinds {
ret = func(env *Env) *int32 {
- env.AddressTaken = true
- return (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int32 {
- return env.Binds[index].Addr().Interface().(*int32)
+ return env.Vals[index].Addr().Interface().(*int32)
}
}
case r.Int64:
if intbinds {
ret = func(env *Env) *int64 {
- env.AddressTaken = true
- return (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int64 {
- return env.Binds[index].Addr().Interface().(*int64)
+ return env.Vals[index].Addr().Interface().(*int64)
}
}
case r.Uint:
if intbinds {
ret = func(env *Env) *uint {
- env.AddressTaken = true
- return (*uint)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint {
- return env.Binds[index].Addr().Interface().(*uint)
+ return env.Vals[index].Addr().Interface().(*uint)
}
}
case r.Uint8:
if intbinds {
ret = func(env *Env) *uint8 {
- env.AddressTaken = true
- return (*uint8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint8 {
- return env.Binds[index].Addr().Interface().(*uint8)
+ return env.Vals[index].Addr().Interface().(*uint8)
}
}
case r.Uint16:
if intbinds {
ret = func(env *Env) *uint16 {
- env.AddressTaken = true
- return (*uint16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint16 {
- return env.Binds[index].Addr().Interface().(*uint16)
+ return env.Vals[index].Addr().Interface().(*uint16)
}
}
case r.Uint32:
if intbinds {
ret = func(env *Env) *uint32 {
- env.AddressTaken = true
- return (*uint32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint32 {
- return env.Binds[index].Addr().Interface().(*uint32)
+ return env.Vals[index].Addr().Interface().(*uint32)
}
}
case r.Uint64:
if intbinds {
ret = func(env *Env) *uint64 {
- env.AddressTaken = true
- return &env.IntBinds[index]
+ env.IntAddressTaken = true
+ return &env.Ints[index]
}
} else {
ret = func(env *Env) *uint64 {
- return env.Binds[index].Addr().Interface().(*uint64)
+ return env.Vals[index].Addr().Interface().(*uint64)
}
}
case r.Uintptr:
if intbinds {
ret = func(env *Env) *uintptr {
- env.AddressTaken = true
- return (*uintptr)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uintptr)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uintptr {
- return env.Binds[index].Addr().Interface().(*uintptr)
+ return env.Vals[index].Addr().Interface().(*uintptr)
}
}
case r.Float32:
if intbinds {
ret = func(env *Env) *float32 {
- env.AddressTaken = true
- return (*float32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float32 {
- return env.Binds[index].Addr().Interface().(*float32)
+ return env.Vals[index].Addr().Interface().(*float32)
}
}
case r.Float64:
if intbinds {
ret = func(env *Env) *float64 {
- env.AddressTaken = true
- return (*float64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float64 {
- return env.Binds[index].Addr().Interface().(*float64)
+ return env.Vals[index].Addr().Interface().(*float64)
}
}
case r.Complex64:
if intbinds {
ret = func(env *Env) *complex64 {
- env.AddressTaken = true
- return (*complex64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*complex64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *complex64 {
- return env.Binds[index].Addr().Interface().(*complex64)
+ return env.Vals[index].Addr().Interface().(*complex64)
+ }
+ }
+ case r.Complex128:
+
+ if intbinds {
+ ret = func(env *Env) *complex128 {
+ env.IntAddressTaken = true
+ return (*complex128)(unsafe.Pointer(&env.Ints[index]))
+
+ }
+ } else {
+ ret = func(env *Env) *complex128 {
+ return env.Vals[index].Addr().Interface().(*complex128)
}
}
default:
ret = func(env *Env) r.Value {
- return env.Binds[index].Addr()
+ return env.Vals[index].Addr()
}
}
case 1:
@@ -298,15 +306,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*bool)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*bool)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *bool {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*bool)
+ return env.Vals[index].Addr().Interface().(*bool)
}
}
case r.Int:
@@ -316,15 +324,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*int)
+ return env.Vals[index].Addr().Interface().(*int)
}
}
case r.Int8:
@@ -334,15 +342,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int8 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*int8)
+ return env.Vals[index].Addr().Interface().(*int8)
}
}
case r.Int16:
@@ -352,15 +360,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int16 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*int16)
+ return env.Vals[index].Addr().Interface().(*int16)
}
}
case r.Int32:
@@ -370,15 +378,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int32 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*int32)
+ return env.Vals[index].Addr().Interface().(*int32)
}
}
case r.Int64:
@@ -388,15 +396,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int64 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*int64)
+ return env.Vals[index].Addr().Interface().(*int64)
}
}
case r.Uint:
@@ -406,15 +414,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*uint)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*uint)
+ return env.Vals[index].Addr().Interface().(*uint)
}
}
case r.Uint8:
@@ -424,15 +432,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*uint8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint8 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*uint8)
+ return env.Vals[index].Addr().Interface().(*uint8)
}
}
case r.Uint16:
@@ -442,15 +450,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*uint16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint16 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*uint16)
+ return env.Vals[index].Addr().Interface().(*uint16)
}
}
case r.Uint32:
@@ -460,15 +468,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*uint32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint32 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*uint32)
+ return env.Vals[index].Addr().Interface().(*uint32)
}
}
case r.Uint64:
@@ -478,15 +486,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return &env.IntBinds[index]
+ env.IntAddressTaken = true
+ return &env.Ints[index]
}
} else {
ret = func(env *Env) *uint64 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*uint64)
+ return env.Vals[index].Addr().Interface().(*uint64)
}
}
case r.Uintptr:
@@ -496,15 +504,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*uintptr)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uintptr)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uintptr {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*uintptr)
+ return env.Vals[index].Addr().Interface().(*uintptr)
}
}
case r.Float32:
@@ -514,15 +522,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*float32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float32 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*float32)
+ return env.Vals[index].Addr().Interface().(*float32)
}
}
case r.Float64:
@@ -532,15 +540,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*float64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float64 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*float64)
+ return env.Vals[index].Addr().Interface().(*float64)
}
}
case r.Complex64:
@@ -550,15 +558,33 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer
- env.AddressTaken = true
- return (*complex64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*complex64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *complex64 {
env = env.
Outer
- return env.Binds[index].Addr().Interface().(*complex64)
+ return env.Vals[index].Addr().Interface().(*complex64)
+ }
+ }
+ case r.Complex128:
+
+ if intbinds {
+ ret = func(env *Env) *complex128 {
+ env = env.
+ Outer
+
+ env.IntAddressTaken = true
+ return (*complex128)(unsafe.Pointer(&env.Ints[index]))
+
+ }
+ } else {
+ ret = func(env *Env) *complex128 {
+ env = env.
+ Outer
+ return env.Vals[index].Addr().Interface().(*complex128)
}
}
default:
@@ -566,7 +592,7 @@ func (va *Var) Address(maxdepth int) *Expr {
ret = func(env *Env) r.Value {
env = env.
Outer
- return env.Binds[index].Addr()
+ return env.Vals[index].Addr()
}
}
@@ -579,15 +605,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*bool)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*bool)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *bool {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*bool)
+ return env.Vals[index].Addr().Interface().(*bool)
}
}
case r.Int:
@@ -597,15 +623,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*int)
+ return env.Vals[index].Addr().Interface().(*int)
}
}
case r.Int8:
@@ -615,15 +641,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int8 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*int8)
+ return env.Vals[index].Addr().Interface().(*int8)
}
}
case r.Int16:
@@ -633,15 +659,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int16 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*int16)
+ return env.Vals[index].Addr().Interface().(*int16)
}
}
case r.Int32:
@@ -651,15 +677,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int32 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*int32)
+ return env.Vals[index].Addr().Interface().(*int32)
}
}
case r.Int64:
@@ -669,15 +695,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int64 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*int64)
+ return env.Vals[index].Addr().Interface().(*int64)
}
}
case r.Uint:
@@ -687,15 +713,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*uint)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*uint)
+ return env.Vals[index].Addr().Interface().(*uint)
}
}
case r.Uint8:
@@ -705,15 +731,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*uint8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint8 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*uint8)
+ return env.Vals[index].Addr().Interface().(*uint8)
}
}
case r.Uint16:
@@ -723,15 +749,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*uint16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint16 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*uint16)
+ return env.Vals[index].Addr().Interface().(*uint16)
}
}
case r.Uint32:
@@ -741,15 +767,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*uint32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint32 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*uint32)
+ return env.Vals[index].Addr().Interface().(*uint32)
}
}
case r.Uint64:
@@ -759,15 +785,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return &env.IntBinds[index]
+ env.IntAddressTaken = true
+ return &env.Ints[index]
}
} else {
ret = func(env *Env) *uint64 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*uint64)
+ return env.Vals[index].Addr().Interface().(*uint64)
}
}
case r.Uintptr:
@@ -777,15 +803,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*uintptr)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uintptr)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uintptr {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*uintptr)
+ return env.Vals[index].Addr().Interface().(*uintptr)
}
}
case r.Float32:
@@ -795,15 +821,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*float32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float32 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*float32)
+ return env.Vals[index].Addr().Interface().(*float32)
}
}
case r.Float64:
@@ -813,15 +839,15 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*float64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float64 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*float64)
+ return env.Vals[index].Addr().Interface().(*float64)
}
}
case r.Complex64:
@@ -831,15 +857,33 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.
Outer.Outer
- env.AddressTaken = true
- return (*complex64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*complex64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *complex64 {
env = env.
Outer.Outer
- return env.Binds[index].Addr().Interface().(*complex64)
+ return env.Vals[index].Addr().Interface().(*complex64)
+ }
+ }
+ case r.Complex128:
+
+ if intbinds {
+ ret = func(env *Env) *complex128 {
+ env = env.
+ Outer.Outer
+
+ env.IntAddressTaken = true
+ return (*complex128)(unsafe.Pointer(&env.Ints[index]))
+
+ }
+ } else {
+ ret = func(env *Env) *complex128 {
+ env = env.
+ Outer.Outer
+ return env.Vals[index].Addr().Interface().(*complex128)
}
}
default:
@@ -847,7 +891,7 @@ func (va *Var) Address(maxdepth int) *Expr {
ret = func(env *Env) r.Value {
env = env.
Outer.Outer
- return env.Binds[index].Addr()
+ return env.Vals[index].Addr()
}
}
@@ -862,8 +906,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*bool)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*bool)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -872,7 +916,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*bool)
+ return env.Vals[index].Addr().Interface().(*bool)
}
}
case r.Int:
@@ -884,8 +928,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -894,7 +938,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*int)
+ return env.Vals[index].Addr().Interface().(*int)
}
}
case r.Int8:
@@ -906,8 +950,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -916,7 +960,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*int8)
+ return env.Vals[index].Addr().Interface().(*int8)
}
}
case r.Int16:
@@ -928,8 +972,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -938,7 +982,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*int16)
+ return env.Vals[index].Addr().Interface().(*int16)
}
}
case r.Int32:
@@ -950,8 +994,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -960,7 +1004,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*int32)
+ return env.Vals[index].Addr().Interface().(*int32)
}
}
case r.Int64:
@@ -972,8 +1016,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -982,7 +1026,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*int64)
+ return env.Vals[index].Addr().Interface().(*int64)
}
}
case r.Uint:
@@ -994,8 +1038,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*uint)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1004,7 +1048,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*uint)
+ return env.Vals[index].Addr().Interface().(*uint)
}
}
case r.Uint8:
@@ -1016,8 +1060,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*uint8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1026,7 +1070,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*uint8)
+ return env.Vals[index].Addr().Interface().(*uint8)
}
}
case r.Uint16:
@@ -1038,8 +1082,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*uint16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1048,7 +1092,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*uint16)
+ return env.Vals[index].Addr().Interface().(*uint16)
}
}
case r.Uint32:
@@ -1060,8 +1104,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*uint32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1070,7 +1114,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*uint32)
+ return env.Vals[index].Addr().Interface().(*uint32)
}
}
case r.Uint64:
@@ -1082,8 +1126,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return &env.IntBinds[index]
+ env.IntAddressTaken = true
+ return &env.Ints[index]
}
} else {
@@ -1092,7 +1136,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*uint64)
+ return env.Vals[index].Addr().Interface().(*uint64)
}
}
case r.Uintptr:
@@ -1104,8 +1148,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*uintptr)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uintptr)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1114,7 +1158,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*uintptr)
+ return env.Vals[index].Addr().Interface().(*uintptr)
}
}
case r.Float32:
@@ -1126,8 +1170,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*float32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1136,7 +1180,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*float32)
+ return env.Vals[index].Addr().Interface().(*float32)
}
}
case r.Float64:
@@ -1148,8 +1192,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*float64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1158,7 +1202,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*float64)
+ return env.Vals[index].Addr().Interface().(*float64)
}
}
case r.Complex64:
@@ -1170,8 +1214,8 @@ func (va *Var) Address(maxdepth int) *Expr {
env = env.Outer
}
- env.AddressTaken = true
- return (*complex64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*complex64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
@@ -1180,7 +1224,29 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr().Interface().(*complex64)
+ return env.Vals[index].Addr().Interface().(*complex64)
+ }
+ }
+ case r.Complex128:
+
+ if intbinds {
+ ret = func(env *Env) *complex128 {
+ env = env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ env = env.Outer
+ }
+
+ env.IntAddressTaken = true
+ return (*complex128)(unsafe.Pointer(&env.Ints[index]))
+
+ }
+ } else {
+ ret = func(env *Env) *complex128 {
+ env = env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ env = env.Outer
+ }
+ return env.Vals[index].Addr().Interface().(*complex128)
}
}
default:
@@ -1190,7 +1256,7 @@ func (va *Var) Address(maxdepth int) *Expr {
for i := 3; i < upn; i++ {
env = env.Outer
}
- return env.Binds[index].Addr()
+ return env.Vals[index].Addr()
}
}
@@ -1200,247 +1266,263 @@ func (va *Var) Address(maxdepth int) *Expr {
if intbinds {
ret = func(env *Env) *bool {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*bool)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*bool)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *bool {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*bool)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*bool)
}
}
case r.Int:
if intbinds {
ret = func(env *Env) *int {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*int)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*int)
}
}
case r.Int8:
if intbinds {
ret = func(env *Env) *int8 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int8 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*int8)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*int8)
}
}
case r.Int16:
if intbinds {
ret = func(env *Env) *int16 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int16 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*int16)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*int16)
}
}
case r.Int32:
if intbinds {
ret = func(env *Env) *int32 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int32 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*int32)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*int32)
}
}
case r.Int64:
if intbinds {
ret = func(env *Env) *int64 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int64 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*int64)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*int64)
}
}
case r.Uint:
if intbinds {
ret = func(env *Env) *uint {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*uint)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*uint)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*uint)
}
}
case r.Uint8:
if intbinds {
ret = func(env *Env) *uint8 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*uint8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint8 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*uint8)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*uint8)
}
}
case r.Uint16:
if intbinds {
ret = func(env *Env) *uint16 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*uint16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint16 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*uint16)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*uint16)
}
}
case r.Uint32:
if intbinds {
ret = func(env *Env) *uint32 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*uint32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint32 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*uint32)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*uint32)
}
}
case r.Uint64:
if intbinds {
ret = func(env *Env) *uint64 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return &env.IntBinds[index]
+ env.IntAddressTaken = true
+ return &env.Ints[index]
}
} else {
ret = func(env *Env) *uint64 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*uint64)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*uint64)
}
}
case r.Uintptr:
if intbinds {
ret = func(env *Env) *uintptr {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*uintptr)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uintptr)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uintptr {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*uintptr)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*uintptr)
}
}
case r.Float32:
if intbinds {
ret = func(env *Env) *float32 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*float32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float32 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*float32)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*float32)
}
}
case r.Float64:
if intbinds {
ret = func(env *Env) *float64 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*float64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float64 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*float64)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*float64)
}
}
case r.Complex64:
if intbinds {
ret = func(env *Env) *complex64 {
- env = env.ThreadGlobals.FileEnv
+ env = env.FileEnv
- env.AddressTaken = true
- return (*complex64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*complex64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *complex64 {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr().Interface().(*complex64)
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*complex64)
+ }
+ }
+ case r.Complex128:
+
+ if intbinds {
+ ret = func(env *Env) *complex128 {
+ env = env.FileEnv
+
+ env.IntAddressTaken = true
+ return (*complex128)(unsafe.Pointer(&env.Ints[index]))
+
+ }
+ } else {
+ ret = func(env *Env) *complex128 {
+ env = env.FileEnv
+ return env.Vals[index].Addr().Interface().(*complex128)
}
}
default:
ret = func(env *Env) r.Value {
- env = env.ThreadGlobals.FileEnv
- return env.Binds[index].Addr()
+ env = env.FileEnv
+ return env.Vals[index].Addr()
}
}
@@ -1450,250 +1532,267 @@ func (va *Var) Address(maxdepth int) *Expr {
if intbinds {
ret = func(env *Env) *bool {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*bool)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*bool)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *bool {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*bool)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*bool)
}
}
case r.Int:
if intbinds {
ret = func(env *Env) *int {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*int)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*int)
}
}
case r.Int8:
if intbinds {
ret = func(env *Env) *int8 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int8 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*int8)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*int8)
}
}
case r.Int16:
if intbinds {
ret = func(env *Env) *int16 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int16 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*int16)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*int16)
}
}
case r.Int32:
if intbinds {
ret = func(env *Env) *int32 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int32 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*int32)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*int32)
}
}
case r.Int64:
if intbinds {
ret = func(env *Env) *int64 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*int64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *int64 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*int64)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*int64)
}
}
case r.Uint:
if intbinds {
ret = func(env *Env) *uint {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*uint)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*uint)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*uint)
}
}
case r.Uint8:
if intbinds {
ret = func(env *Env) *uint8 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*uint8)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint8)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint8 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*uint8)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*uint8)
}
}
case r.Uint16:
if intbinds {
ret = func(env *Env) *uint16 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*uint16)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint16)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint16 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*uint16)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*uint16)
}
}
case r.Uint32:
if intbinds {
ret = func(env *Env) *uint32 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*uint32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uint32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uint32 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*uint32)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*uint32)
}
}
case r.Uint64:
if intbinds {
ret = func(env *Env) *uint64 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return &env.IntBinds[index]
+ env.IntAddressTaken = true
+ return &env.Ints[index]
}
} else {
ret = func(env *Env) *uint64 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*uint64)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*uint64)
}
}
case r.Uintptr:
if intbinds {
ret = func(env *Env) *uintptr {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*uintptr)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*uintptr)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *uintptr {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*uintptr)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*uintptr)
}
}
case r.Float32:
if intbinds {
ret = func(env *Env) *float32 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*float32)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float32)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float32 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*float32)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*float32)
}
}
case r.Float64:
if intbinds {
ret = func(env *Env) *float64 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*float64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*float64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *float64 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*float64)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*float64)
}
}
case r.Complex64:
if intbinds {
ret = func(env *Env) *complex64 {
- env = env.ThreadGlobals.TopEnv
+ env = env.FileEnv.Outer
- env.AddressTaken = true
- return (*complex64)(unsafe.Pointer(&env.IntBinds[index]))
+ env.IntAddressTaken = true
+ return (*complex64)(unsafe.Pointer(&env.Ints[index]))
}
} else {
ret = func(env *Env) *complex64 {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr().Interface().(*complex64)
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*complex64)
+ }
+ }
+ case r.Complex128:
+
+ if intbinds {
+ ret = func(env *Env) *complex128 {
+ env = env.FileEnv.Outer
+
+ env.IntAddressTaken = true
+ return (*complex128)(unsafe.Pointer(&env.Ints[index]))
+
+ }
+ } else {
+ ret = func(env *Env) *complex128 {
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr().Interface().(*complex128)
}
}
default:
ret = func(env *Env) r.Value {
- env = env.ThreadGlobals.TopEnv
- return env.Binds[index].Addr()
+ env = env.FileEnv.Outer
+ return env.Vals[index].Addr()
}
}
}
- return &Expr{Lit: Lit{Type: xr.PtrTo(va.Type)}, Fun: ret}
+ u := va.Type.Universe()
+ return &Expr{Lit: Lit{Type: u.PtrTo(va.Type)}, Fun: ret}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/address.gomacro b/vendor/github.com/cosmos72/gomacro/fast/address.gomacro
index 6d4424c..6baccf5 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/address.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/address.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* address.go
@@ -62,9 +53,9 @@ import (
env = ~,decls
}}
} else if upn == FileDepth {
- decls = ~'{{env = env.ThreadGlobals.FileEnv}}
+ decls = ~'{{env = env.FileEnv}}
} else if upn == TopDepth {
- decls = ~'{{env = env.ThreadGlobals.TopEnv}}
+ decls = ~'{{env = env.FileEnv.Outer}}
} else {
decls = ~'{
env = env.Outer.Outer.Outer
@@ -74,9 +65,10 @@ import (
}
}
if t == nil {
- // no need to set env.AddressTaken = true
- // because env.Binds[index] actually contains a pointer to the variable
- bind = ~'{env .Binds[index].Addr()}
+ // env.Vals[index] actually contains the variable's address
+ // no need to set special flags like env.IntAddressTaken.
+ // that's needed instead when taking the address of env.Ints[index]
+ bind = ~'{env .Vals[index].Addr()}
rettype = ~'{r.Value}
return ~"{
ret = func(env *Env) (~,rettype) {
@@ -86,12 +78,12 @@ import (
}
}
- addresstaken = ~"{{env.AddressTaken = true}}
+ addresstaken = ~"{{env.IntAddressTaken = true}}
rettype = ~"{* ~,typ}
if t.Kind() == r.Uint64 {
- bind = ~'{&env.IntBinds[index]}
+ bind = ~'{&env.Ints[index]}
} else {
- bind = ~"{(*~,typ)(unsafe.Pointer(&env.IntBinds[index]))}
+ bind = ~"{(*~,typ)(unsafe.Pointer(&env.Ints[index]))}
}
return ~"{
@@ -104,7 +96,7 @@ import (
} else {
ret = func(env *Env) (~,rettype) {
~,@decls
- return env.Binds[index].Addr().Interface().(~,rettype)
+ return env.Vals[index].Addr().Interface().(~,rettype)
}
}
}
@@ -135,16 +127,17 @@ import (
case r.Float32: address; ~,depth; float32
case r.Float64: address; ~,depth; float64
case r.Complex64: address; ~,depth; complex64
+ case r.Complex128: address; ~,depth; complex128
default: address; ~,depth; nil
}
}
}
func (c *Comp) AddressOf(node *ast.UnaryExpr) *Expr {
- return c.addressOf(node.X)
+ return c.addressOf(node.X, nil)
}
-func (c *Comp) addressOf(expr ast.Expr) *Expr {
+func (c *Comp) addressOf(expr ast.Expr, t xr.Type) *Expr {
for {
switch e := expr.(type) {
case *ast.ParenExpr:
@@ -152,14 +145,17 @@ func (c *Comp) addressOf(expr ast.Expr) *Expr {
continue
case *ast.StarExpr:
// optimize & * x -> x, but check that x is a pointer
- ret := c.Expr1(e.X)
+ if t != nil {
+ t = t.Elem()
+ }
+ ret := c.Expr1(e.X, t)
if ret.Type.Kind() != r.Ptr {
c.Errorf("unary operation * on non-pointer <%v>: %v", ret.Type, e)
}
}
break
}
- place := c.placeOrAddress(expr, PlaceAddress)
+ place := c.placeOrAddress(expr, PlaceAddress, t)
// c.Debugf("AddressOf: place %v has type %v, taking its address", expr, place.Type)
if place.IsVar() {
va := place.Var // make a copy of place.Var, do not alter the original's type
@@ -198,5 +194,6 @@ func (va *Var) Address(maxdepth int) *Expr {
case maxdepth-1: addresses; -2
case maxdepth: addresses; -3
}
- return &Expr{Lit: Lit{Type: xr.PtrTo(va.Type)}, Fun: ret}
+ u := va.Type.Universe()
+ return &Expr{Lit: Lit{Type: u.PtrTo(va.Type)}, Fun: ret}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/assignment.go b/vendor/github.com/cosmos72/gomacro/fast/assignment.go
index c8246dd..5d57a25 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/assignment.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/assignment.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* declaration.go
@@ -29,6 +20,8 @@ import (
"go/ast"
"go/token"
r "reflect"
+
+ xr "github.com/cosmos72/gomacro/xreflect"
)
type Assign struct {
@@ -51,6 +44,7 @@ func (a *Assign) init(c *Comp, place *Place) {
// Assign compiles an *ast.AssignStmt into an assignment to one or more place
func (c *Comp) Assign(node *ast.AssignStmt) {
c.Pos = node.Pos()
+ // c.Debugf("compiling assignment at [% 3d] %s: %v // %T", c.Pos, c.Fileset.Position(c.Pos), node, node)
lhs, rhs := node.Lhs, node.Rhs
if node.Tok == token.DEFINE {
@@ -88,14 +82,15 @@ func (c *Comp) Assign(node *ast.AssignStmt) {
canreorder = canreorder && places[i].IsVar() // ach, needed. see for example i := 0; i, x[i] = 1, 2 // set i = 1, x[0] = 2
}
if rn == 1 && ln > 1 {
- exprs[0] = c.Expr(rhs[0])
+ exprs[0] = c.Expr(rhs[0], nil)
canreorder = false
} else {
for i, ri := range rhs {
- exprs[i] = c.Expr1(ri)
+ exprs[i] = c.Expr1(ri, nil)
canreorder = canreorder && exprs[i].Const()
}
}
+
if ln == rn && (ln <= 1 || canreorder) {
for i := range lhs {
c.assign1(lhs[i], node.Tok, rhs[i], places[i], exprs[i])
@@ -152,8 +147,7 @@ func (c *Comp) assignPrepareRhs(node *ast.AssignStmt, places []*Place, exprs []*
c.Pos = node.Pos()
c.Errorf("invalid assignment: expression returns %d values, cannot assign them to %d places: %v", nexpr, ln, node)
}
- convs := make([]func(r.Value, r.Type) r.Value, nexpr)
- rtypes := make([]r.Type, nexpr)
+ convs := make([]func(r.Value) r.Value, nexpr)
needconvs := false
for i := 0; i < nexpr; i++ {
texpr := expr.Out(i)
@@ -163,17 +157,16 @@ func (c *Comp) assignPrepareRhs(node *ast.AssignStmt, places []*Place, exprs []*
c.Errorf("cannot assign <%v> to %v <%v> in multiple assignment", texpr, lhs[i], tplace)
} else if conv := c.Converter(texpr, tplace); conv != nil {
convs[i] = conv
- rtypes[i] = tplace.ReflectType()
needconvs = true
}
}
- f := expr.AsXV(OptDefaults)
+ f := expr.AsXV(COptDefaults)
if needconvs {
return nil, func(env *Env) (r.Value, []r.Value) {
_, vs := f(env)
for i, conv := range convs {
if conv != nil {
- vs[i] = conv(vs[i], rtypes[i])
+ vs[i] = conv(vs[i])
}
}
return vs[0], vs
@@ -304,6 +297,9 @@ func (c *Comp) assign1(lhs ast.Expr, op token.Token, rhs ast.Expr, place *Place,
node := &ast.AssignStmt{Lhs: []ast.Expr{lhs}, Tok: op, Rhs: []ast.Expr{rhs}} // for nice error messages
c.Errorf("error compiling assignment: %v\n\t%v", node, rec)
}()
+ c.Pos = lhs.Pos()
+ // c.Debugf("compiling assign1 at [% 3d] %s: %v // %T", c.Pos, c.Fileset.Position(c.Pos), lhs, lhs)
+
if place.IsVar() {
c.SetVar(&place.Var, op, init)
} else {
@@ -323,11 +319,12 @@ func (c *Comp) LookupVar(name string) *Var {
// Place compiles the left-hand-side of an assignment
func (c *Comp) Place(node ast.Expr) *Place {
- return c.placeOrAddress(node, false)
+ return c.placeOrAddress(node, PlaceSettable, nil)
}
// PlaceOrAddress compiles the left-hand-side of an assignment or the location of an address-of
-func (c *Comp) placeOrAddress(in ast.Expr, opt PlaceOption) *Place {
+// t is optional, used for type inference
+func (c *Comp) placeOrAddress(in ast.Expr, opt PlaceOption, t xr.Type) *Place {
for {
if in != nil {
c.Pos = in.Pos()
@@ -338,7 +335,10 @@ func (c *Comp) placeOrAddress(in ast.Expr, opt PlaceOption) *Place {
if opt == PlaceSettable {
c.Errorf("%s composite literal", opt)
}
- e := c.Expr1(node)
+ if t != nil {
+ t = t.Elem()
+ }
+ e := c.CompositeLit(node, t)
fun := e.AsX1()
var addr func(*Env) r.Value
switch e.Type.Kind() {
@@ -373,7 +373,7 @@ func (c *Comp) placeOrAddress(in ast.Expr, opt PlaceOption) *Place {
in = node.X
continue
case *ast.StarExpr:
- e := c.Expr1(node.X)
+ e := c.Expr1(node.X, nil)
if e.Const() {
c.Errorf("%s a constant: %v <%v>", opt, node, e.Type)
return nil
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call0ret1compact.go b/vendor/github.com/cosmos72/gomacro/fast/attic/call0ret1_compact.go
similarity index 75%
rename from vendor/github.com/cosmos72/gomacro/fast/call0ret1compact.go
rename to vendor/github.com/cosmos72/gomacro/fast/attic/call0ret1_compact.go
index 8f40ec2..2aa310c 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call0ret1compact.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/attic/call0ret1_compact.go
@@ -3,23 +3,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * call0ret1compact.go
+ * call0ret1_compact.go
*
* Created on Jun 14, 2017
* Author Massimiliano Ghilardi
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call1ret1compact.go b/vendor/github.com/cosmos72/gomacro/fast/attic/call1ret1_compact.go
similarity index 82%
rename from vendor/github.com/cosmos72/gomacro/fast/call1ret1compact.go
rename to vendor/github.com/cosmos72/gomacro/fast/attic/call1ret1_compact.go
index 5d3c91d..ac33b70 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call1ret1compact.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/attic/call1ret1_compact.go
@@ -3,23 +3,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * call1ret1compact.go
+ * call1ret1_compact.go
*
* Created on Apr 15, 2017
* Author Massimiliano Ghilardi
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call2ret1.gomacro b/vendor/github.com/cosmos72/gomacro/fast/attic/call2ret1.gomacro
similarity index 91%
rename from vendor/github.com/cosmos72/gomacro/fast/call2ret1.gomacro
rename to vendor/github.com/cosmos72/gomacro/fast/attic/call2ret1.gomacro
index 30476dc..da16853 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call2ret1.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/attic/call2ret1.gomacro
@@ -5,21 +5,12 @@
*
* Copyright (C) 2017 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * call_ret1.go
+ * call2ret1.go
*
* Created on Apr 15, 2017
* Author Massimiliano Ghilardi
diff --git a/vendor/github.com/cosmos72/gomacro/fast/callnret0compact.go b/vendor/github.com/cosmos72/gomacro/fast/attic/callnret0_compact.go
similarity index 56%
rename from vendor/github.com/cosmos72/gomacro/fast/callnret0compact.go
rename to vendor/github.com/cosmos72/gomacro/fast/attic/callnret0_compact.go
index 238c196..de6dcb1 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/callnret0compact.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/attic/callnret0_compact.go
@@ -3,23 +3,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * callnret0compact.go
+ * callnret0_compact.go
*
* Created on Jun 14, 2017
* Author Massimiliano Ghilardi
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary.go b/vendor/github.com/cosmos72/gomacro/fast/binary.go
index cfc7eb8..7c9a0e8 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary.go
@@ -32,17 +23,13 @@ import (
r "reflect"
"github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/base/untyped"
mt "github.com/cosmos72/gomacro/token"
)
func (c *Comp) BinaryExpr(node *ast.BinaryExpr) *Expr {
- x := c.Expr(node.X)
- y := c.Expr(node.Y)
- if x.NumOut() == 0 {
- c.Errorf("operand returns no values, cannot use in binary expression: %v", node.X)
- } else if y.NumOut() == 0 {
- c.Errorf("operand returns no values, cannot use in binary expression: %v", node.Y)
- }
+ x := c.Expr1(node.X, nil)
+ y := c.Expr1(node.Y, nil)
return c.BinaryExpr1(node, x, y)
}
@@ -97,7 +84,7 @@ func (c *Comp) BinaryExpr1(node *ast.BinaryExpr, x *Expr, y *Expr) *Expr {
}
if bothConst {
// constant propagation
- z.EvalConst(OptKeepUntyped)
+ z.EvalConst(COptKeepUntyped)
}
return z
}
@@ -106,7 +93,7 @@ func (c *Comp) BinaryExprUntyped(node *ast.BinaryExpr, x UntypedLit, y UntypedLi
op := node.Op
switch op {
case token.LAND, token.LOR:
- xb, yb := x.ConstTo(c.TypeOfBool()).(bool), y.ConstTo(c.TypeOfBool()).(bool)
+ xb, yb := x.Convert(c.TypeOfBool()).(bool), y.Convert(c.TypeOfBool()).(bool)
var flag bool
if op == token.LAND {
flag = xb && yb
@@ -116,7 +103,7 @@ func (c *Comp) BinaryExprUntyped(node *ast.BinaryExpr, x UntypedLit, y UntypedLi
return c.exprUntypedLit(r.Bool, constant.MakeBool(flag))
case token.EQL, token.LSS, token.GTR, token.NEQ, token.LEQ, token.GEQ:
// comparison gives an untyped bool
- flag := constant.Compare(x.Obj, op, y.Obj)
+ flag := constant.Compare(x.Val, op, y.Val)
return c.exprUntypedLit(r.Bool, constant.MakeBool(flag))
case token.SHL, token.SHL_ASSIGN:
return c.ShiftUntyped(node, token.SHL, x, y)
@@ -130,8 +117,8 @@ func (c *Comp) BinaryExprUntyped(node *ast.BinaryExpr, x UntypedLit, y UntypedLi
// untyped integer division
op2 = token.QUO_ASSIGN
}
- zobj := constant.BinaryOp(x.Obj, op2, y.Obj)
- zkind := constantKindToUntypedLitKind(zobj.Kind())
+ zobj := constant.BinaryOp(x.Val, op2, y.Val)
+ zkind := untyped.ConstantKindToUntypedLitKind(zobj.Kind())
// c.Debugf("untyped binary expression %v %s %v returned {%v %v}", x, op2, y, zkind, zobj)
// reflect.Int32 (i.e. rune) has precedence over reflect.Int
if zobj.Kind() == constant.Int {
@@ -142,7 +129,7 @@ func (c *Comp) BinaryExprUntyped(node *ast.BinaryExpr, x UntypedLit, y UntypedLi
}
}
if zkind == r.Invalid {
- c.Errorf("invalid binary operation: %v %v %v", x.Obj, op, y.Obj)
+ c.Errorf("invalid binary operation: %v %v %v", x.Val, op, y.Val)
}
return c.exprUntypedLit(zkind, zobj)
}
@@ -179,15 +166,28 @@ func tokenWithoutAssign(op token.Token) token.Token {
var warnUntypedShift, warnUntypedShift2 = true, true
func (c *Comp) ShiftUntyped(node *ast.BinaryExpr, op token.Token, x UntypedLit, y UntypedLit) *Expr {
- if y.Obj.Kind() != constant.Int {
- c.Errorf("invalid shift: %v %v %v", x.Obj, op, y.Obj)
+ var yn64 uint64
+ var exact bool
+
+ switch y.Val.Kind() {
+ case constant.Int:
+ yn64, exact = constant.Uint64Val(y.Val)
+ case constant.Float:
+ yf, fexact := constant.Float64Val(y.Val)
+ if fexact {
+ yn64 = uint64(yf)
+ exact = float64(yn64) == yf
+ }
+ // c.Debugf("ShiftUntyped: %v %v %v, rhs converted to %v => %v (exact = %v)", x.Val, op, y.Val, yf, yn64, exact)
+ }
+ if !exact {
+ c.Errorf("invalid shift: %v %v %v", x.Val.ExactString(), op, y.Val.ExactString())
}
- yn64, exact := constant.Uint64Val(y.Obj)
yn := uint(yn64)
- if !exact || uint64(yn) != yn64 {
- c.Errorf("invalid shift: %v %v %v", x.Obj, op, y.Obj)
+ if uint64(yn) != yn64 {
+ c.Errorf("invalid shift: %v %v %v", x.Val.ExactString(), op, y.Val.ExactString())
}
- xn := x.Obj
+ xn := x.Val
xkind := x.Kind
switch xkind {
case r.Int, r.Int32:
@@ -203,17 +203,17 @@ func (c *Comp) ShiftUntyped(node *ast.BinaryExpr, op token.Token, x UntypedLit,
sign = constant.Sign(constant.Real(xn))
}
if sign >= 0 {
- xn = constant.MakeUint64(x.ConstTo(c.TypeOfUint64()).(uint64))
+ xn = constant.MakeUint64(x.Convert(c.TypeOfUint64()).(uint64))
} else {
- xn = constant.MakeInt64(x.ConstTo(c.TypeOfInt64()).(int64))
+ xn = constant.MakeInt64(x.Convert(c.TypeOfInt64()).(int64))
}
xkind = r.Int
default:
- c.Errorf("invalid shift: %v %v %v", x.Obj, op, y.Obj)
+ c.Errorf("invalid shift: %v %v %v", x.Val, op, y.Val)
}
zobj := constant.Shift(xn, op, yn)
if zobj.Kind() == constant.Unknown {
- c.Errorf("invalid shift: %v %v %v", x.Obj, op, y.Obj)
+ c.Errorf("invalid shift: %v %v %v", x.Val, op, y.Val)
}
return c.exprUntypedLit(xkind, zobj)
}
@@ -232,8 +232,8 @@ func (c *Comp) prepareShift(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
if xe.Untyped() {
xuntyp := xe.Value.(UntypedLit)
if ye.Const() {
- // untyped << typed
- yuntyp := UntypedLit{r.Int, constant.MakeUint64(r.ValueOf(ye.Value).Uint()), c.Universe}
+ // untyped << constant
+ yuntyp := MakeUntypedLit(r.Int, constant.MakeUint64(r.ValueOf(ye.Value).Uint()), &c.Universe.BasicTypes)
return c.ShiftUntyped(node, node.Op, xuntyp, yuntyp)
}
// untyped << expression
@@ -355,7 +355,7 @@ func (c *Comp) toSameFuncType(node ast.Expr, xe *Expr, ye *Expr) {
}
} else if xconst {
xe.ConstTo(ye.Type)
- } else if xe.Type.ReflectType() != ye.Type.ReflectType() {
+ } else if !xe.Type.IdenticalTo(ye.Type) {
c.mismatchedTypes(node, xe, ye)
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.go b/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.go
index 1d5a3e9..d227740 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_eql.go
@@ -39,13 +30,13 @@ import (
)
func (c *Comp) Eql(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
- if xe.IsNil {
- if ye.IsNil {
+ if xe.IsNil() {
+ if ye.IsNil() {
return c.invalidBinaryExpr(node, xe, ye)
} else {
return c.eqlneqNil(node, xe, ye)
}
- } else if ye.IsNil {
+ } else if ye.IsNil() {
return c.eqlneqNil(node, xe, ye)
}
@@ -538,13 +529,13 @@ func (c *Comp) Eql(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
return c.eqlneqMisc(node, xe, ye)
}
func (c *Comp) Neq(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
- if xe.IsNil {
- if ye.IsNil {
+ if xe.IsNil() {
+ if ye.IsNil() {
return c.invalidBinaryExpr(node, xe, ye)
} else {
return c.eqlneqNil(node, xe, ye)
}
- } else if ye.IsNil {
+ } else if ye.IsNil() {
return c.eqlneqNil(node, xe, ye)
}
@@ -1015,129 +1006,65 @@ func (c *Comp) Neq(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
func (c *Comp) eqlneqMisc(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
var fun func(*Env) bool
- if xe.Type.Kind() == r.Interface || ye.Type.Kind() == r.Interface {
+ x := xe.AsX1()
+ y := ye.AsX1()
+ t1 := xe.Type
+ t2 := ye.Type
+ extractor1 := c.extractor(t1)
+ extractor2 := c.extractor(t2)
- xe.CheckX1()
- ye.CheckX1()
- }
+ if node.Op == token.EQL {
+ fun = func(env *Env) bool {
+ v1 := x(env)
+ v2 := y(env)
+ if v1 == Nil || v2 == Nil {
+ return v1 == v2
+ }
- switch x := xe.Fun.(type) {
- case func(*Env) (r.Value, []r.Value):
- switch y := ye.Fun.(type) {
- case func(*Env) (r.Value, []r.Value):
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
-
- }
- } else {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
-
- }
- }
-
- default:
- y1 := ye.AsX1()
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
-
- }
- } else {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
-
- }
+ t1, t2 := t1, t2
+ if extractor1 != nil {
+ v1, t1 = extractor1(v1)
}
+ if extractor2 != nil {
+ v2, t2 = extractor2(v2)
+ }
+
+ if v1 == Nil || v2 == Nil {
+ return v1 == v2
+ }
+ return v1.Interface() == v2.Interface() &&
+ (t1 == nil || t2 == nil || t1.IdenticalTo(t2))
}
- default:
- x1 := xe.AsX1()
-
- switch y := ye.Fun.(type) {
- case func(*Env) (r.Value, []r.Value):
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
-
- }
- } else {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
-
- }
- }
-
- default:
- y1 := ye.AsX1()
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
-
- }
- } else {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
-
- }
+ } else {
+ fun = func(env *Env) bool {
+ v1 := x(env)
+ v2 := y(env)
+ if v1 == Nil || v2 == Nil {
+ return v1 != v2
+ }
+
+ t1, t2 := t1, t2
+ if extractor1 != nil {
+ v1, t1 = extractor1(v1)
}
+ if extractor2 != nil {
+ v2, t2 = extractor2(v2)
+ }
+
+ if v1 == Nil || v2 == Nil {
+ return v1 != v2
+ }
+ return v1.Interface() != v2.Interface() ||
+ t1 != nil && t2 != nil && !t1.IdenticalTo(t2)
}
}
return c.exprBool(fun)
}
func (c *Comp) eqlneqNil(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
var e *Expr
- if ye.IsNil {
+ if ye.IsNil() {
e = xe
} else {
e = ye
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.gomacro b/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.gomacro
index d77abbd..1393fe1 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_eqlneq.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_eql.go
@@ -164,14 +155,14 @@ import (
}
func (c *Comp) Eql(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
- if xe.IsNil {
- if ye.IsNil {
+ if xe.IsNil() {
+ if ye.IsNil() {
return c.invalidBinaryExpr(node, xe, ye)
} else {
// nil == expr
return c.eqlneqNil(node, xe, ye)
}
- } else if ye.IsNil {
+ } else if ye.IsNil() {
// expr == nil
return c.eqlneqNil(node, xe, ye)
}
@@ -218,14 +209,14 @@ func (c *Comp) Eql(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
}
func (c *Comp) Neq(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
- if xe.IsNil {
- if ye.IsNil {
+ if xe.IsNil() {
+ if ye.IsNil() {
return c.invalidBinaryExpr(node, xe, ye)
} else {
// nil == expr
return c.eqlneqNil(node, xe, ye)
}
- } else if ye.IsNil {
+ } else if ye.IsNil() {
// expr == nil
return c.eqlneqNil(node, xe, ye)
}
@@ -275,110 +266,52 @@ func (c *Comp) Neq(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
func (c *Comp) eqlneqMisc(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
var fun func(*Env) bool
- if xe.Type.Kind() == r.Interface || ye.Type.Kind() == r.Interface {
- // not checked yet that xe and ye return at least one value... check now
- xe.CheckX1()
- ye.CheckX1()
- }
-
- switch x := xe.Fun.(type) {
- case func(*Env) (r.Value, []r.Value):
- switch y := ye.Fun.(type) {
- case func(*Env) (r.Value, []r.Value):
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
- }
- } else {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
- }
+ x := xe.AsX1()
+ y := ye.AsX1()
+ t1 := xe.Type
+ t2 := ye.Type
+ extractor1 := c.extractor(t1)
+ extractor2 := c.extractor(t2)
+
+ if node.Op == token.EQL {
+ fun = func(env *Env) bool {
+ v1 := x(env)
+ v2 := y(env)
+ if v1 == Nil || v2 == Nil {
+ return v1 == v2
+ }
+ t1, t2 := t1, t2
+ if extractor1 != nil {
+ v1, t1 = extractor1(v1)
+ }
+ if extractor2 != nil {
+ v2, t2 = extractor2(v2)
}
- default:
- y1 := ye.AsX1()
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
- }
- } else {
- fun = func(env *Env) bool {
- v1, _ := x(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
- }
+ if v1 == Nil || v2 == Nil {
+ return v1 == v2
}
+ return v1.Interface() == v2.Interface() &&
+ (t1 == nil || t2 == nil || t1.IdenticalTo(t2))
}
- default:
- x1 := xe.AsX1()
-
- switch y := ye.Fun.(type) {
- case func(*Env) (r.Value, []r.Value):
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
- }
- } else {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2, _ := y(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
- }
+ } else {
+ fun = func(env *Env) bool {
+ v1 := x(env)
+ v2 := y(env)
+ if v1 == Nil || v2 == Nil {
+ return v1 != v2
+ }
+ t1, t2 := t1, t2
+ if extractor1 != nil {
+ v1, t1 = extractor1(v1)
+ }
+ if extractor2 != nil {
+ v2, t2 = extractor2(v2)
}
- default:
- y1 := ye.AsX1()
- if node.Op == token.EQL {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 == v2
- } else {
- return v1.Interface() == v2.Interface()
- }
- }
- } else {
- fun = func(env *Env) bool {
- v1 := x1(env)
- v2 := y1(env)
- if v1 == Nil || v2 == Nil {
- return v1 != v2
- } else {
- return v1.Interface() != v2.Interface()
- }
- }
+ if v1 == Nil || v2 == Nil {
+ return v1 != v2
}
+ return v1.Interface() != v2.Interface() ||
+ (t1 != nil && t2 != nil && !t1.IdenticalTo(t2))
}
}
return c.exprBool(fun)
@@ -386,7 +319,7 @@ func (c *Comp) eqlneqMisc(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
func (c *Comp) eqlneqNil(node *ast.BinaryExpr, xe *Expr, ye *Expr) *Expr {
var e *Expr
- if ye.IsNil {
+ if ye.IsNil() {
e = xe
} else {
e = ye
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_ops.go b/vendor/github.com/cosmos72/gomacro/fast/binary_ops.go
index 679dc39..714ad31 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_ops.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_ops.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_ops.go
@@ -4961,7 +4952,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Bool:
{
x := x.(func(*Env) bool)
- fun = func(env *Env) (zero bool) {
+ fun = func(env *Env) (zero bool,
+
+ ) {
x(env)
return
@@ -4970,7 +4963,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Int:
{
x := x.(func(*Env) int)
- fun = func(env *Env) (zero int) {
+ fun = func(env *Env) (zero int,
+
+ ) {
x(env)
return
@@ -4979,7 +4974,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Int8:
{
x := x.(func(*Env) int8)
- fun = func(env *Env) (zero int8) {
+ fun = func(env *Env) (zero int8,
+
+ ) {
x(env)
return
@@ -4988,7 +4985,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Int16:
{
x := x.(func(*Env) int16)
- fun = func(env *Env) (zero int16) {
+ fun = func(env *Env) (zero int16,
+
+ ) {
x(env)
return
@@ -4997,7 +4996,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Int32:
{
x := x.(func(*Env) int32)
- fun = func(env *Env) (zero int32) {
+ fun = func(env *Env) (zero int32,
+
+ ) {
x(env)
return
@@ -5006,7 +5007,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Int64:
{
x := x.(func(*Env) int64)
- fun = func(env *Env) (zero int64) {
+ fun = func(env *Env) (zero int64,
+
+ ) {
x(env)
return
@@ -5070,7 +5073,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Float32:
{
x := x.(func(*Env) float32)
- fun = func(env *Env) (zero float32) {
+ fun = func(env *Env) (zero float32,
+
+ ) {
x(env)
return
@@ -5080,7 +5085,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Float64:
{
x := x.(func(*Env) float64)
- fun = func(env *Env) (zero float64) {
+ fun = func(env *Env) (zero float64,
+
+ ) {
x(env)
return
@@ -5090,7 +5097,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Complex64:
{
x := x.(func(*Env) complex64)
- fun = func(env *Env) (zero complex64) {
+ fun = func(env *Env) (zero complex64,
+
+ ) {
x(env)
return
@@ -5100,7 +5109,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.Complex128:
{
x := x.(func(*Env) complex128)
- fun = func(env *Env) (zero complex128) {
+ fun = func(env *Env) (zero complex128,
+
+ ) {
x(env)
return
@@ -5110,7 +5121,9 @@ func (c *Comp) exprZero(xe *Expr) *Expr {
case r.String:
{
x := x.(func(*Env) string)
- fun = func(env *Env) (zero string) {
+ fun = func(env *Env) (zero string,
+
+ ) {
x(env)
return
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_ops.gomacro b/vendor/github.com/cosmos72/gomacro/fast/binary_ops.gomacro
index 2ca3cf0..2eea8f5 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_ops.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_ops.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_ops.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_relops.go b/vendor/github.com/cosmos72/gomacro/fast/binary_relops.go
index 36a0d18..08507ae 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_relops.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_relops.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_relops.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_relops.gomacro b/vendor/github.com/cosmos72/gomacro/fast/binary_relops.gomacro
index 5b02a6b..9ab9076 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_relops.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_relops.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_relops.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.go b/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.go
index a3faff4..eb583a2 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_shifts.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.gomacro b/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.gomacro
index bb2ce26..7561f97 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/binary_shifts.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* binary_shifts.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/builtin.go b/vendor/github.com/cosmos72/gomacro/fast/builtin.go
index ef31d10..b9f754a 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/builtin.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/builtin.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* builtin.go
@@ -35,61 +26,47 @@ import (
"github.com/cosmos72/gomacro/ast2"
"github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/base/untyped"
xr "github.com/cosmos72/gomacro/xreflect"
)
var (
zeroTypes = []xr.Type{}
rtypeOfSliceOfByte = r.TypeOf([]byte{})
-
-/*
- typeOfPtrBool = xr.PtrTo(xr.TypeOfBool)
- typeOfPtrInt = xr.PtrTo(xr.TypeOfInt)
- typeOfPtrInt8 = xr.PtrTo(xr.TypeOfInt)
- typeOfPtrInt16 = xr.PtrTo(xr.TypeOfInt16)
- typeOfPtrInt32 = xr.PtrTo(xr.TypeOfInt32)
- typeOfPtrInt64 = xr.PtrTo(xr.TypeOfInt64)
- typeOfPtrUint = xr.PtrTo(xr.TypeOfUint)
- typeOfPtrUint8 = xr.PtrTo(xr.TypeOfUint)
- typeOfPtrUint16 = xr.PtrTo(xr.TypeOfUint16)
- typeOfPtrUint32 = xr.PtrTo(xr.TypeOfUint32)
- typeOfPtrUint64 = xr.PtrTo(xr.TypeOfUint64)
- typeOfPtrUintptr = xr.PtrTo(xr.TypeOfUintptr)
- typeOfPtrFloat32 = xr.PtrTo(xr.TypeOfFloat32)
- typeOfPtrFloat64 = xr.PtrTo(xr.TypeOfFloat64)
- typeOfPtrComplex64 = xr.PtrTo(xr.TypeOfComplex64)
- typeOfPtrComplex128 = xr.PtrTo(xr.TypeOfComplex128)
- typeOfPtrString = xr.PtrTo(xr.TypeOfString)
-*/
)
// =================================== iota ===================================
-func (top *Comp) addIota() {
- // https://golang.org/ref/spec#Constants
- // "Literal constants, true, false, iota, and certain constant expressions containing only untyped constant operands are untyped."
- top.Binds["iota"] = top.BindUntyped(untypedZero)
+// returns the previous definition of iota - to be restored by Comp.endIota() below
+func (top *Comp) beginIota() *Bind {
+ return top.Binds["iota"]
}
-func (top *Comp) removeIota() {
- delete(top.Binds, "iota")
+func (top *Comp) endIota(orig *Bind) {
+ if orig == nil {
+ delete(top.Binds, "iota")
+ } else {
+ top.Binds["iota"] = orig
+ }
}
-func (top *Comp) incrementIota() {
- iota := top.Binds["iota"].Lit.Value.(UntypedLit).Obj
- iota = constant.BinaryOp(iota, token.ADD, untypedOne.Obj)
- top.Binds["iota"] = top.BindUntyped(UntypedLit{Kind: r.Int, Obj: iota})
+func (top *Comp) setIota(iota int) {
+ // https://golang.org/ref/spec#Constants
+ // "Literal constants, true, false, iota, and certain constant expressions containing only untyped constant operands are untyped."
+
+ // Binds are supposed to be immutable. to avoid issues, create a new Bind every time
+ top.Binds["iota"] = top.BindUntyped(r.Int, constant.MakeInt64(int64(iota)))
}
// ============================== initialization ===============================
func (ce *Interp) addBuiltins() {
- universe := ce.Comp.Universe
+ basicTypes := &ce.Comp.Universe.BasicTypes
// https://golang.org/ref/spec#Constants
// "Literal constants, true, false, iota, and certain constant expressions containing only untyped constant operands are untyped."
- ce.DeclConst("false", nil, UntypedLit{r.Bool, constant.MakeBool(false), universe})
- ce.DeclConst("true", nil, UntypedLit{r.Bool, constant.MakeBool(true), universe})
+ ce.DeclConst("false", nil, MakeUntypedLit(r.Bool, constant.MakeBool(false), basicTypes))
+ ce.DeclConst("true", nil, MakeUntypedLit(r.Bool, constant.MakeBool(true), basicTypes))
// https://golang.org/ref/spec#Variables : "[...] the predeclared identifier nil, which has no type"
ce.DeclConst("nil", nil, nil)
@@ -113,14 +90,15 @@ func (ce *Interp) addBuiltins() {
tfunI2_Nb := ce.Comp.TypeOf(funI2_Nb)
- ce.DeclEnvFunc("Env", Function{callIdentity, ce.Comp.TypeOf(funI_I)})
+ ce.DeclEnvFunc("Interp", Function{callIdentity, ce.Comp.TypeOf(funI_I)})
ce.DeclEnvFunc("Eval", Function{callEval, ce.Comp.TypeOf(funI2_I)})
+ ce.DeclEnvFunc("EvalKeepUntyped", Function{callEvalKeepUntyped, ce.Comp.TypeOf(funI2_I)})
ce.DeclEnvFunc("EvalType", Function{callEvalType, ce.Comp.TypeOf(funI2_T)})
ce.DeclEnvFunc("MacroExpand", Function{callMacroExpand, tfunI2_Nb})
ce.DeclEnvFunc("MacroExpand1", Function{callMacroExpand1, tfunI2_Nb})
ce.DeclEnvFunc("MacroExpandCodeWalk", Function{callMacroExpandCodeWalk, tfunI2_Nb})
+ ce.DeclEnvFunc("Parse", Function{callParse, ce.Comp.TypeOf(funSI_I)})
/*
- binds["Parse"] = r.ValueOf(Function{funcParse, 1})
binds["Read"] = r.ValueOf(ReadString)
binds["ReadDir"] = r.ValueOf(callReadDir)
binds["ReadFile"] = r.ValueOf(callReadFile)
@@ -161,7 +139,7 @@ func compileAppend(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
n := len(node.Args)
args := make([]*Expr, n)
- args[0] = c.Expr1(node.Args[0])
+ args[0] = c.Expr1(node.Args[0], nil)
t0 := args[0].Type
if t0.Kind() != r.Slice {
c.Errorf("first argument to %s must be slice; have <%s>", sym.Name, t0)
@@ -176,7 +154,7 @@ func compileAppend(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
telem = t0 // second argument is a slice too
}
for i := 1; i < n; i++ {
- argi := c.Expr1(node.Args[i])
+ argi := c.Expr1(node.Args[i], nil)
if argi.Const() {
argi.ConstTo(telem)
} else if ti := argi.Type; ti == nil || !ti.AssignableTo(telem) {
@@ -184,7 +162,7 @@ func compileAppend(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
}
args[i] = argi
}
- t := xr.FuncOf([]xr.Type{t0, t0}, []xr.Type{t0}, true) // compile as reflect.Append(), which is variadic
+ t := c.Universe.FuncOf([]xr.Type{t0, t0}, []xr.Type{t0}, true) // compile as reflect.Append(), which is variadic
sym.Type = t
fun := exprLit(Lit{Type: t, Value: r.Append}, &sym)
return &Call{
@@ -204,7 +182,7 @@ func callCap(val r.Value) int {
func compileCap(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
// argument of builtin cap() cannot be a literal
- arg := c.Expr1(node.Args[0])
+ arg := c.Expr1(node.Args[0], nil)
tin := arg.Type
tout := c.TypeOfInt()
switch tin.Kind() {
@@ -224,7 +202,7 @@ func compileCap(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
default:
return c.badBuiltinCallArgType(sym.Name, node.Args[0], tin, "array, channel, slice, pointer to array")
}
- t := xr.FuncOf([]xr.Type{tin}, []xr.Type{tout}, false)
+ t := c.Universe.FuncOf([]xr.Type{tin}, []xr.Type{tout}, false)
sym.Type = t
fun := exprLit(Lit{Type: t, Value: callCap}, &sym)
// capacity of arrays is part of their type: cannot change at runtime, we could optimize it.
@@ -240,12 +218,12 @@ func callClose(val r.Value) {
}
func compileClose(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
- arg := c.Expr1(node.Args[0])
+ arg := c.Expr1(node.Args[0], nil)
tin := arg.Type
if tin.Kind() != r.Chan {
return c.badBuiltinCallArgType(sym.Name, node.Args[0], tin, "channel")
}
- t := xr.FuncOf([]xr.Type{tin}, zeroTypes, false)
+ t := c.Universe.FuncOf([]xr.Type{tin}, zeroTypes, false)
sym.Type = t
fun := exprLit(Lit{Type: t, Value: callClose}, &sym)
return newCall1(fun, arg, false)
@@ -262,12 +240,11 @@ func callComplex128(re float64, im float64) complex128 {
}
func compileComplex(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
- re := c.Expr1(node.Args[0])
- im := c.Expr1(node.Args[1])
+ re := c.Expr1(node.Args[0], nil)
+ im := c.Expr1(node.Args[1], nil)
if re.Untyped() {
if im.Untyped() {
- re.ConstTo(c.TypeOfFloat64())
- im.ConstTo(c.TypeOfFloat64())
+ return compileComplexUntyped(c, sym, node, re.Value.(UntypedLit), im.Value.(UntypedLit))
} else {
re.ConstTo(im.Type)
}
@@ -286,11 +263,11 @@ func compileComplex(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
kim = r.Float64
}
if kre != r.Float64 {
- c.Errorf("invalid operation: %v (arguments have type %v, expected floating-point)",
+ c.Errorf("invalid operation: %v (arguments have type %v, expected integer or floating-point)",
node, re.Type)
}
if kim != r.Float64 {
- c.Errorf("invalid operation: %v (arguments have type %v, expected floating-point)",
+ c.Errorf("invalid operation: %v (arguments have type %v, expected integer or floating-point)",
node, im.Type)
}
tin := re.Type
@@ -308,11 +285,48 @@ func compileComplex(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
return c.badBuiltinCallArgType(sym.Name, node.Args[0], tin, "floating point")
}
touts := []xr.Type{tout}
- t := xr.FuncOf([]xr.Type{tin}, touts, false)
- sym.Type = t
- fun := exprLit(Lit{Type: t, Value: call}, &sym)
+ tfun := c.Universe.FuncOf([]xr.Type{tin}, touts, false)
+ sym.Type = tfun
+ fun := exprLit(Lit{Type: tfun, Value: call}, &sym)
// complex() of two constants is constant: it can be computed at compile time
- return &Call{Fun: fun, Args: []*Expr{re, im}, Const: re.Const() && im.Const(), OutTypes: touts}
+ return &Call{Fun: fun, Args: []*Expr{re, im}, OutTypes: touts, Const: re.Const() && im.Const()}
+}
+
+var complexImagOne = constant.MakeFromLiteral("1i", token.IMAG, 0)
+
+func compileComplexUntyped(c *Comp, sym Symbol, node *ast.CallExpr, re UntypedLit, im UntypedLit) *Call {
+ checkComplexUntypedArg(c, node, re, "first")
+ checkComplexUntypedArg(c, node, im, "second")
+ rev := re.Val
+ imv := constant.BinaryOp(im.Val, token.MUL, complexImagOne)
+ val := MakeUntypedLit(r.Complex128, constant.BinaryOp(rev, token.ADD, imv), &c.Universe.BasicTypes)
+ touts := []xr.Type{c.TypeOfUntypedLit()}
+ tfun := c.Universe.FuncOf(nil, touts, false)
+ sym.Type = tfun
+ fun := exprLit(Lit{Type: tfun, Value: val}, &sym)
+ // complex() of two untyped constants is both untyped and constant: it can be computed at compile time
+ return &Call{Fun: fun, Args: nil, OutTypes: touts, Const: true}
+}
+
+func checkComplexUntypedArg(c *Comp, node *ast.CallExpr, arg UntypedLit, label string) {
+ switch arg.Kind {
+ case r.Int, r.Int32 /*rune*/, r.Float64:
+ return
+ case r.Complex128:
+ im := constant.Imag(arg.Val)
+ switch im.Kind() {
+ case constant.Int:
+ if x, exact := constant.Int64Val(im); x == 0 && exact {
+ return
+ }
+ case constant.Float:
+ if x, exact := constant.Float64Val(im); x == 0.0 && exact {
+ return
+ }
+ }
+ }
+ c.Errorf("invalid operation: %v (first argument is untyped %v, expected untyped integer, untyped float, or untyped complex with zero imaginary part)",
+ node, arg)
}
// --- copy() ---
@@ -324,8 +338,8 @@ func copyStringToBytes(dst []byte, src string) int {
func compileCopy(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
args := []*Expr{
- c.Expr1(node.Args[0]),
- c.Expr1(node.Args[1]),
+ c.Expr1(node.Args[0], nil),
+ c.Expr1(node.Args[1], nil),
}
if args[1].Const() {
// we also accept a string literal as second argument
@@ -333,7 +347,7 @@ func compileCopy(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
}
t0, t1 := args[0].Type, args[1].Type
var funCopy I = r.Copy
- if t0 == nil || t0.Kind() != r.Slice || !t0.AssignableTo(xr.SliceOf(t0.Elem())) {
+ if t0 == nil || t0.Kind() != r.Slice || !t0.AssignableTo(c.Universe.SliceOf(t0.Elem())) {
// https://golang.org/ref/spec#Appending_and_copying_slices
// copy [...] arguments must have identical element type T and must be assignable to a slice of type []T.
c.Errorf("first argument to copy should be slice; have %v <%v>", node.Args[0], t0)
@@ -342,14 +356,14 @@ func compileCopy(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
// [...] As a special case, copy also accepts a destination argument assignable to type []byte
// with a source argument of a string type. This form copies the bytes from the string into the byte slice.
funCopy = copyStringToBytes
- } else if t1 == nil || t1.Kind() != r.Slice || !t1.AssignableTo(xr.SliceOf(t1.Elem())) {
+ } else if t1 == nil || t1.Kind() != r.Slice || !t1.AssignableTo(c.Universe.SliceOf(t1.Elem())) {
c.Errorf("second argument to copy should be slice or string; have %v <%v>", node.Args[1], t1)
return nil
- } else if !xr.SameType(t0.Elem(), t1.Elem()) {
+ } else if !t0.Elem().IdenticalTo(t1.Elem()) {
c.Errorf("arguments to copy have different element types: <%v> and <%v>", t0.Elem(), t1.Elem())
}
outtypes := []xr.Type{c.TypeOfInt()}
- t := xr.FuncOf([]xr.Type{t0, t1}, outtypes, false)
+ t := c.Universe.FuncOf([]xr.Type{t0, t1}, outtypes, false)
sym.Type = t
fun := exprLit(Lit{Type: t, Value: funCopy}, &sym)
return &Call{Fun: fun, Args: args, OutTypes: outtypes, Const: false}
@@ -364,8 +378,8 @@ func callDelete(vmap r.Value, vkey r.Value) {
}
func compileDelete(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
- emap := c.Expr1(node.Args[0])
- ekey := c.Expr1(node.Args[1])
+ emap := c.Expr1(node.Args[0], nil)
+ ekey := c.Expr1(node.Args[1], nil)
tmap := emap.Type
if tmap.Kind() != r.Map {
c.Errorf("first argument to delete must be map; have %v", tmap)
@@ -377,7 +391,7 @@ func compileDelete(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
} else if ekey.Type == nil || !ekey.Type.AssignableTo(tkey) {
c.Errorf("cannot use %v <%v> as type <%v> in delete", node.Args[1], ekey.Type, tkey)
}
- t := xr.FuncOf([]xr.Type{tmap, tkey}, zeroTypes, false)
+ t := c.Universe.FuncOf([]xr.Type{tmap, tkey}, zeroTypes, false)
sym.Type = t
fun := exprLit(Lit{Type: t, Value: callDelete}, &sym)
return &Call{Fun: fun, Args: []*Expr{emap, ekey}, OutTypes: zeroTypes, Const: false}
@@ -401,15 +415,45 @@ func funI2_I(interface{}, interface{}) interface{} {
}
func callEval(argv r.Value, interpv r.Value) r.Value {
+ // always convert untyped constants to their default type.
+ // To retrieve untyped constants, use EvalKeepUntyped()
+ return callEval3(argv, interpv, COptDefaults)
+}
+
+func callEvalKeepUntyped(argv r.Value, interpv r.Value) r.Value {
+ return callEval3(argv, interpv, COptKeepUntyped)
+}
+
+func callEval3(argv r.Value, interpv r.Value, opt CompileOptions) r.Value {
if !argv.IsValid() {
return argv
}
- form := ast2.AnyToAst(argv.Interface(), "Eval")
+ form := anyToAst(argv.Interface(), "Eval")
form = base.SimplifyAstForQuote(form, true)
- interp := interpv.Interface().(*Interp)
- e := interp.CompileAst(form)
- return interp.RunExpr1(e)
+ ir := interpv.Interface().(*Interp)
+
+ // use Comp.Compile(), which always compiles, instead of Interp.CompileAst():
+ // the latter compiles only if option MacroExpandOnly is unset
+ e := ir.Comp.Compile(form)
+
+ if e == nil {
+ return base.None
+ }
+ e.CheckX1()
+
+ if opt&COptKeepUntyped == 0 && e.Untyped() {
+ e.ConstTo(e.DefaultType())
+ }
+
+ // do not use Interp.RunExpr() or Interp.RunExpr1()
+ // because they convert untyped constants to their default type
+ // if Interp.Comp.Globals.Options&OptKeepUntyped == 0
+ env := ir.PrepareEnv()
+
+ fun := e.AsXV(COptKeepUntyped)
+ v, _ := fun(env)
+ return v
}
// --- EvalType() ---
@@ -422,7 +466,7 @@ func callEvalType(argv r.Value, interpv r.Value) r.Value {
if !argv.IsValid() {
return zeroOfReflectType
}
- form := ast2.AnyToAst(argv.Interface(), "EvalType")
+ form := anyToAst(argv.Interface(), "EvalType")
form = base.UnwrapTrivialAst(form)
node := form.Interface().(ast.Expr)
@@ -445,7 +489,7 @@ func callLenString(val string) int {
}
func compileLen(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
- arg := c.Expr1(node.Args[0])
+ arg := c.Expr1(node.Args[0], nil)
if arg.Const() {
arg.ConstTo(arg.DefaultType())
}
@@ -465,7 +509,7 @@ func compileLen(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
default:
return c.badBuiltinCallArgType(sym.Name, node.Args[0], tin, "array, channel, map, slice, string, pointer to array")
}
- t := xr.FuncOf([]xr.Type{tin}, []xr.Type{tout}, false)
+ t := c.Universe.FuncOf([]xr.Type{tin}, []xr.Type{tout}, false)
sym.Type = t
fun := exprLit(Lit{Type: t, Value: callLenValue}, &sym)
if tin.Kind() == r.String {
@@ -499,7 +543,7 @@ func callMacroExpandDispatch(argv r.Value, interpv r.Value, caller string) (r.Va
if !argv.IsValid() {
return r.Zero(rtypeOfNode), base.False
}
- form := ast2.AnyToAst(argv.Interface(), caller)
+ form := anyToAst(argv.Interface(), caller)
form = base.SimplifyAstForQuote(form, true)
interp := interpv.Interface().(*Interp)
@@ -565,17 +609,17 @@ func compileMake(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
args[0] = c.exprValue(argtypes[0], tin.ReflectType()) // no need to build TypeOfReflectType
te := c.TypeOfInt()
for i := 1; i < nargs; i++ {
- argi := c.Expr1(node.Args[i])
+ argi := c.Expr1(node.Args[i], nil)
if argi.Const() {
argi.ConstTo(te)
- } else if ti := argi.Type; ti == nil || (!xr.SameType(ti, te) && !ti.AssignableTo(te)) {
+ } else if ti := argi.Type; ti == nil || (!ti.IdenticalTo(te) && !ti.AssignableTo(te)) {
return c.badBuiltinCallArgType(sym.Name, node.Args[i], ti, te)
}
args[i] = argi
argtypes[i] = te
}
outtypes := []xr.Type{tin}
- t := xr.FuncOf(argtypes, outtypes, false)
+ t := c.Universe.FuncOf(argtypes, outtypes, false)
sym.Type = t
funMake := funMakes[nargs]
if funMake == nil {
@@ -590,8 +634,8 @@ func compileMake(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
func compileNew(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
tin := c.Type(node.Args[0])
- tout := xr.PtrTo(tin)
- t := xr.FuncOf([]xr.Type{c.TypeOfInterface()}, []xr.Type{tout}, false) // no need to build TypeOfReflectType
+ tout := c.Universe.PtrTo(tin)
+ t := c.Universe.FuncOf([]xr.Type{c.TypeOfInterface()}, []xr.Type{tout}, false) // no need to build TypeOfReflectType
sym.Type = t
fun := exprLit(Lit{Type: t, Value: r.New}, &sym)
arg := c.exprValue(c.TypeOfInterface(), tin.ReflectType())
@@ -605,7 +649,7 @@ func callPanic(arg interface{}) {
}
func compilePanic(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
- arg := c.Expr1(node.Args[0])
+ arg := c.Expr1(node.Args[0], nil)
arg.To(c, c.TypeOfInterface())
t := c.TypeOf(callPanic)
sym.Type = t
@@ -613,6 +657,29 @@ func compilePanic(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
return newCall1(fun, arg, false)
}
+// --- Parse() ---
+
+func funSI_I(string, interface{}) interface{} {
+ return nil
+}
+
+func callParse(argv r.Value, interpv r.Value) r.Value {
+ if !argv.IsValid() {
+ return argv
+ }
+ ir := interpv.Interface().(*Interp)
+
+ if argv.Kind() == r.Interface {
+ argv = argv.Elem()
+ }
+ if argv.Kind() != r.String {
+ ir.Comp.Errorf("cannot convert %v to string: %v", argv.Type(), argv)
+ }
+
+ form := ir.Comp.Parse(argv.String())
+ return r.ValueOf(&form).Elem() // always return type ast2.Ast
+}
+
// --- print(), println() ---
func callPrint(out interface{}, args ...interface{}) {
@@ -624,7 +691,7 @@ func callPrintln(out interface{}, args ...interface{}) {
}
func getStdout(env *Env) r.Value {
- return r.ValueOf(env.ThreadGlobals.Stdout)
+ return r.ValueOf(env.Run.Stdout)
}
func compilePrint(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
@@ -664,8 +731,11 @@ func callImag64(val complex128) float64 {
}
func compileRealImag(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
- arg := c.Expr1(node.Args[0])
+ arg := c.Expr1(node.Args[0], nil)
if arg.Const() {
+ if arg.Untyped() {
+ return compileRealImagUntyped(c, sym, node, arg.Value.(UntypedLit))
+ }
arg.ConstTo(arg.DefaultType())
}
tin := arg.Type
@@ -689,21 +759,41 @@ func compileRealImag(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
default:
return c.badBuiltinCallArgType(sym.Name, node.Args[0], tin, "complex")
}
- t := xr.FuncOf([]xr.Type{tin}, []xr.Type{tout}, false)
+ t := c.Universe.FuncOf([]xr.Type{tin}, []xr.Type{tout}, false)
sym.Type = t
fun := exprLit(Lit{Type: t, Value: call}, &sym)
// real() and imag() of a constant are constants: they can be computed at compile time
return newCall1(fun, arg, arg.Const(), tout)
}
+func compileRealImagUntyped(c *Comp, sym Symbol, node *ast.CallExpr, arg UntypedLit) *Call {
+ val := arg.Val
+ if sym.Name == "real" {
+ val = constant.Real(val)
+ } else {
+ val = constant.Imag(val)
+ }
+ // convert constant.Value result to UntypedLit of appropriate kind
+ kind := untyped.ConstantKindToUntypedLitKind(val.Kind())
+ arg = MakeUntypedLit(kind, val, &c.Universe.BasicTypes)
+
+ touts := []xr.Type{c.TypeOfUntypedLit()}
+ tfun := c.Universe.FuncOf(nil, touts, false)
+ sym.Type = tfun
+
+ fun := exprLit(Lit{Type: tfun, Value: arg}, &sym)
+ // real() and imag() of untyped constant is both untyped and constant: it can be computed at compile time
+ return &Call{Fun: fun, Args: nil, OutTypes: touts, Const: true}
+}
+
var nilInterface = r.Zero(base.TypeOfInterface)
// we can use whatever signature we want, as long as call_builtin supports it
func callRecover(v r.Value) r.Value {
env := v.Interface().(*Env)
- g := env.ThreadGlobals
- debug := g.Options&base.OptDebugPanicRecover != 0
- if !g.IsDefer {
+ g := env.Run
+ debug := g.Options&base.OptDebugRecover != 0
+ if !g.ExecFlags.IsDefer() {
if debug {
base.Debugf("recover() not directly inside a defer")
}
@@ -745,7 +835,7 @@ func argEnv(env *Env) r.Value {
func compileRecover(c *Comp, sym Symbol, node *ast.CallExpr) *Call {
ti := c.TypeOfInterface()
- t := xr.FuncOf([]xr.Type{ti}, []xr.Type{ti}, false)
+ t := c.Universe.FuncOf([]xr.Type{ti}, []xr.Type{ti}, false)
sym.Type = t
fun := exprLit(Lit{Type: t, Value: callRecover}, &sym)
arg := exprX1(ti, argEnv)
@@ -779,6 +869,8 @@ func (c *Comp) call_builtin(call *Call) I {
}
var ret I
switch fun := call.Fun.Value.(type) {
+ case UntypedLit: // complex(), real(), imag() of untyped constants
+ ret = fun
case func(float32, float32) complex64: // complex
arg0fun := argfuns[0].(func(*Env) float32)
arg1fun := argfuns[1].(func(*Env) float32)
@@ -969,7 +1061,7 @@ func (c *Comp) call_builtin(call *Call) I {
}
case func(r.Value) r.Value: // Env()
argfun := call.MakeArgfunsX1()[0]
- if name == "Env" {
+ if name == "Interp" {
ret = func(env *Env) r.Value {
return argfun(env)
}
@@ -1001,7 +1093,7 @@ func (c *Comp) call_builtin(call *Call) I {
arg1 := argfuns[1](env)
return fun(arg0, arg1)
}
- case func(r.Value, r.Value) r.Value: // Eval(), EvalType()
+ case func(r.Value, r.Value) r.Value: // Eval(), EvalType(), Parse()
argfunsX1 := call.MakeArgfunsX1()
argfuns := [2]func(env *Env) r.Value{
argfunsX1[0],
@@ -1171,3 +1263,10 @@ func (c *Comp) badBuiltinCallArgType(name string, arg ast.Expr, tactual xr.Type,
c.Errorf("cannot use %v <%v> as %v in builtin %s()", arg, tactual, texpected, name)
return nil
}
+
+func anyToAst(any interface{}, caller interface{}) ast2.Ast {
+ if untyped, ok := any.(UntypedLit); ok {
+ any = untyped.Convert(untyped.DefaultType())
+ }
+ return ast2.AnyToAst(any, caller)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call.go b/vendor/github.com/cosmos72/gomacro/fast/call.go
index a2afd73..4bc4152 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/call.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call.go
@@ -80,14 +71,14 @@ func (c *Comp) CallExpr(node *ast.CallExpr) *Expr {
// callExpr compiles the common part between CallExpr and Go statement
func (c *Comp) prepareCall(node *ast.CallExpr, fun *Expr) *Call {
if fun == nil {
- fun = c.Expr1(node.Fun)
+ fun = c.Expr1(node.Fun, nil)
}
t := fun.Type
var builtin bool
var lastarg *Expr
- if xr.SameType(t, c.TypeOfBuiltin()) {
+ if t.IdenticalTo(c.TypeOfBuiltin()) {
return c.callBuiltin(node, fun)
- } else if xr.SameType(t, c.TypeOfFunction()) {
+ } else if t.IdenticalTo(c.TypeOfFunction()) {
fun, lastarg = c.callFunction(node, fun)
t = fun.Type
builtin = true
@@ -99,7 +90,7 @@ func (c *Comp) prepareCall(node *ast.CallExpr, fun *Expr) *Call {
var args []*Expr
if len(node.Args) == 1 {
// support foo(bar()) where bar() returns multiple values
- arg := c.Expr(node.Args[0])
+ arg := c.Expr(node.Args[0], nil)
if arg.NumOut() == 0 {
c.Errorf("function argument returns zero values: %v ", node.Args[0])
}
@@ -133,7 +124,14 @@ func (c *Comp) call_any(call *Call) *Expr {
// but call_builtin does not know about them
if call.Fun.Const() {
if call.Builtin {
- expr.Fun = c.call_builtin(call)
+ fun := c.call_builtin(call)
+ if _, untyped := fun.(UntypedLit); untyped {
+ // complex(), real(), imag() of untyped constants produce an untyped constant, not a function
+ expr.Value = fun
+ return expr
+ } else {
+ expr.Fun = fun
+ }
} else {
// normal calls do not expect function to be a constant.
call.Fun.WithFun()
@@ -154,7 +152,7 @@ func (c *Comp) call_any(call *Call) *Expr {
}
// constant propagation - only if function returns a single value
if call.Const && len(call.OutTypes) == 1 {
- expr.EvalConst(OptDefaults)
+ expr.EvalConst(COptDefaults)
// c.Debugf("pre-computed result of constant call %v: %v <%v>", call, expr.Value, TypeOf(expr.Value))
}
return expr
@@ -187,13 +185,11 @@ func (c *Comp) checkCallArgs(node *ast.CallExpr, t xr.Type, args []*Expr, ellips
if variadic {
tlast = t.In(n - 1).Elem()
}
- var convs []func(r.Value, r.Type) r.Value
- var rtypes []r.Type
+ var convs []func(r.Value) r.Value
needconvs := false
multivalue := len(args) != narg
if multivalue {
- convs = make([]func(r.Value, r.Type) r.Value, narg)
- rtypes = make([]r.Type, narg)
+ convs = make([]func(r.Value) r.Value, narg)
}
for i := 0; i < narg; i++ {
if variadic && i >= n-1 {
@@ -208,7 +204,6 @@ func (c *Comp) checkCallArgs(node *ast.CallExpr, t xr.Type, args []*Expr, ellips
c.Errorf("cannot use <%v> as <%v> in argument to %v", targ, ti, node.Fun)
} else if conv := c.Converter(targ, ti); conv != nil {
convs[i] = conv
- rtypes[i] = ti.ReflectType()
args[0].Types[i] = ti
needconvs = true
}
@@ -227,12 +222,12 @@ func (c *Comp) checkCallArgs(node *ast.CallExpr, t xr.Type, args []*Expr, ellips
if !multivalue || !needconvs {
return
}
- f := args[0].AsXV(OptDefaults)
+ f := args[0].AsXV(COptDefaults)
args[0].Fun = func(env *Env) (r.Value, []r.Value) {
_, vs := f(env)
for i, conv := range convs {
if conv != nil {
- vs[i] = conv(vs[i], rtypes[i])
+ vs[i] = conv(vs[i])
}
}
return vs[0], vs
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call0ret1.go b/vendor/github.com/cosmos72/gomacro/fast/call0ret1.go
index 51c7d7f..ab15c7f 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call0ret1.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/call0ret1.go
@@ -3,25 +3,14 @@
// Any change will be lost when the file is re-generated
// -------------------------------------------------------------
-// +build !gomacro_fast_compact
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call0ret1.go
@@ -35,7 +24,6 @@ package fast
import (
r "reflect"
"github.com/cosmos72/gomacro/base"
- xr "github.com/cosmos72/gomacro/xreflect"
)
func (c *Comp) call0ret1(call *Call, maxdepth int) I {
@@ -59,7 +47,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
case r.Bool:
{
- if !xr.SameType(tret, c.TypeOfBool(),
+ if !tret.IdenticalTo(c.TypeOfBool(),
) {
ret = func(env *Env) bool {
fun := exprfun(env)
@@ -74,26 +62,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() bool
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() bool)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func() bool)
+ fun := env.Vals[funindex].Interface().(func() bool)
return fun()
}
case 1:
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func() bool)
+ fun := env.Outer.Vals[funindex].Interface().(func() bool)
return fun()
}
case 2:
ret = func(env *Env) bool {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() bool)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() bool)
return fun()
}
}
@@ -110,7 +98,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
case r.Int:
{
- if !xr.SameType(tret, c.TypeOfInt(),
+ if !tret.IdenticalTo(c.TypeOfInt(),
) {
ret = func(env *Env) int {
fun := exprfun(env)
@@ -124,26 +112,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() int
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() int)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func() int)
+ fun := env.Vals[funindex].Interface().(func() int)
return fun()
}
case 1:
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func() int)
+ fun := env.Outer.Vals[funindex].Interface().(func() int)
return fun()
}
case 2:
ret = func(env *Env) int {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() int)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() int)
return fun()
}
}
@@ -160,7 +148,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
case r.Int8:
{
- if !xr.SameType(tret, c.TypeOfInt8(),
+ if !tret.IdenticalTo(c.TypeOfInt8(),
) {
ret = func(env *Env) int8 {
fun := exprfun(env)
@@ -174,26 +162,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() int8
ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() int8)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) int8 {
- fun := env.Binds[funindex].Interface().(func() int8)
+ fun := env.Vals[funindex].Interface().(func() int8)
return fun()
}
case 1:
ret = func(env *Env) int8 {
- fun := env.Outer.Binds[funindex].Interface().(func() int8)
+ fun := env.Outer.Vals[funindex].Interface().(func() int8)
return fun()
}
case 2:
ret = func(env *Env) int8 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() int8)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() int8)
return fun()
}
}
@@ -209,7 +197,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Int16:
{
- if !xr.SameType(tret, c.TypeOfInt16(),
+ if !tret.IdenticalTo(c.TypeOfInt16(),
) {
ret = func(env *Env) int16 {
fun := exprfun(env)
@@ -223,26 +211,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() int16
ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() int16)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) int16 {
- fun := env.Binds[funindex].Interface().(func() int16)
+ fun := env.Vals[funindex].Interface().(func() int16)
return fun()
}
case 1:
ret = func(env *Env) int16 {
- fun := env.Outer.Binds[funindex].Interface().(func() int16)
+ fun := env.Outer.Vals[funindex].Interface().(func() int16)
return fun()
}
case 2:
ret = func(env *Env) int16 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() int16)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() int16)
return fun()
}
}
@@ -258,7 +246,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Int32:
{
- if !xr.SameType(tret, c.TypeOfInt32(),
+ if !tret.IdenticalTo(c.TypeOfInt32(),
) {
ret = func(env *Env) int32 {
fun := exprfun(env)
@@ -272,26 +260,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() int32
ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() int32)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func() int32)
+ fun := env.Vals[funindex].Interface().(func() int32)
return fun()
}
case 1:
ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func() int32)
+ fun := env.Outer.Vals[funindex].Interface().(func() int32)
return fun()
}
case 2:
ret = func(env *Env) int32 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() int32)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() int32)
return fun()
}
}
@@ -307,7 +295,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Int64:
{
- if !xr.SameType(tret, c.TypeOfInt64(),
+ if !tret.IdenticalTo(c.TypeOfInt64(),
) {
ret = func(env *Env) int64 {
fun := exprfun(env)
@@ -322,26 +310,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() int64
ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() int64)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func() int64)
+ fun := env.Vals[funindex].Interface().(func() int64)
return fun()
}
case 1:
ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func() int64)
+ fun := env.Outer.Vals[funindex].Interface().(func() int64)
return fun()
}
case 2:
ret = func(env *Env) int64 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() int64)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() int64)
return fun()
}
}
@@ -357,7 +345,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Uint:
{
- if !xr.SameType(tret, c.TypeOfUint(),
+ if !tret.IdenticalTo(c.TypeOfUint(),
) {
ret = func(env *Env) uint {
fun := exprfun(env)
@@ -371,26 +359,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() uint
ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() uint)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func() uint)
+ fun := env.Vals[funindex].Interface().(func() uint)
return fun()
}
case 1:
ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func() uint)
+ fun := env.Outer.Vals[funindex].Interface().(func() uint)
return fun()
}
case 2:
ret = func(env *Env) uint {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() uint)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() uint)
return fun()
}
}
@@ -406,7 +394,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Uint8:
{
- if !xr.SameType(tret, c.TypeOfUint8(),
+ if !tret.IdenticalTo(c.TypeOfUint8(),
) {
ret = func(env *Env) uint8 {
fun := exprfun(env)
@@ -420,26 +408,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() uint8
ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() uint8)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) uint8 {
- fun := env.Binds[funindex].Interface().(func() uint8)
+ fun := env.Vals[funindex].Interface().(func() uint8)
return fun()
}
case 1:
ret = func(env *Env) uint8 {
- fun := env.Outer.Binds[funindex].Interface().(func() uint8)
+ fun := env.Outer.Vals[funindex].Interface().(func() uint8)
return fun()
}
case 2:
ret = func(env *Env) uint8 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() uint8)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() uint8)
return fun()
}
}
@@ -455,7 +443,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Uint16:
{
- if !xr.SameType(tret, c.TypeOfUint16(),
+ if !tret.IdenticalTo(c.TypeOfUint16(),
) {
ret = func(env *Env) uint16 {
fun := exprfun(env)
@@ -469,26 +457,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() uint16
ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() uint16)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) uint16 {
- fun := env.Binds[funindex].Interface().(func() uint16)
+ fun := env.Vals[funindex].Interface().(func() uint16)
return fun()
}
case 1:
ret = func(env *Env) uint16 {
- fun := env.Outer.Binds[funindex].Interface().(func() uint16)
+ fun := env.Outer.Vals[funindex].Interface().(func() uint16)
return fun()
}
case 2:
ret = func(env *Env) uint16 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() uint16)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() uint16)
return fun()
}
}
@@ -504,7 +492,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Uint32:
{
- if !xr.SameType(tret, c.TypeOfUint32(),
+ if !tret.IdenticalTo(c.TypeOfUint32(),
) {
ret = func(env *Env) uint32 {
fun := exprfun(env)
@@ -518,26 +506,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() uint32
ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() uint32)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) uint32 {
- fun := env.Binds[funindex].Interface().(func() uint32)
+ fun := env.Vals[funindex].Interface().(func() uint32)
return fun()
}
case 1:
ret = func(env *Env) uint32 {
- fun := env.Outer.Binds[funindex].Interface().(func() uint32)
+ fun := env.Outer.Vals[funindex].Interface().(func() uint32)
return fun()
}
case 2:
ret = func(env *Env) uint32 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() uint32)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() uint32)
return fun()
}
}
@@ -553,7 +541,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Uint64:
{
- if !xr.SameType(tret, c.TypeOfUint64(),
+ if !tret.IdenticalTo(c.TypeOfUint64(),
) {
ret = func(env *Env) uint64 {
fun := exprfun(env)
@@ -568,26 +556,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() uint64
ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() uint64)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func() uint64)
+ fun := env.Vals[funindex].Interface().(func() uint64)
return fun()
}
case 1:
ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func() uint64)
+ fun := env.Outer.Vals[funindex].Interface().(func() uint64)
return fun()
}
case 2:
ret = func(env *Env) uint64 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() uint64)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() uint64)
return fun()
}
}
@@ -603,7 +591,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Uintptr:
{
- if !xr.SameType(tret, c.TypeOfUintptr(),
+ if !tret.IdenticalTo(c.TypeOfUintptr(),
) {
ret = func(env *Env) uintptr {
fun := exprfun(env)
@@ -617,26 +605,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() uintptr
ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() uintptr)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) uintptr {
- fun := env.Binds[funindex].Interface().(func() uintptr)
+ fun := env.Vals[funindex].Interface().(func() uintptr)
return fun()
}
case 1:
ret = func(env *Env) uintptr {
- fun := env.Outer.Binds[funindex].Interface().(func() uintptr)
+ fun := env.Outer.Vals[funindex].Interface().(func() uintptr)
return fun()
}
case 2:
ret = func(env *Env) uintptr {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() uintptr)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() uintptr)
return fun()
}
}
@@ -652,7 +640,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Float32:
{
- if !xr.SameType(tret, c.TypeOfFloat32(),
+ if !tret.IdenticalTo(c.TypeOfFloat32(),
) {
ret = func(env *Env) float32 {
fun := exprfun(env)
@@ -666,26 +654,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() float32
ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() float32)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) float32 {
- fun := env.Binds[funindex].Interface().(func() float32)
+ fun := env.Vals[funindex].Interface().(func() float32)
return fun()
}
case 1:
ret = func(env *Env) float32 {
- fun := env.Outer.Binds[funindex].Interface().(func() float32)
+ fun := env.Outer.Vals[funindex].Interface().(func() float32)
return fun()
}
case 2:
ret = func(env *Env) float32 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() float32)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() float32)
return fun()
}
}
@@ -701,7 +689,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Float64:
{
- if !xr.SameType(tret, c.TypeOfFloat64(),
+ if !tret.IdenticalTo(c.TypeOfFloat64(),
) {
ret = func(env *Env) float64 {
fun := exprfun(env)
@@ -716,26 +704,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() float64
ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() float64)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) float64 {
- fun := env.Binds[funindex].Interface().(func() float64)
+ fun := env.Vals[funindex].Interface().(func() float64)
return fun()
}
case 1:
ret = func(env *Env) float64 {
- fun := env.Outer.Binds[funindex].Interface().(func() float64)
+ fun := env.Outer.Vals[funindex].Interface().(func() float64)
return fun()
}
case 2:
ret = func(env *Env) float64 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() float64)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() float64)
return fun()
}
}
@@ -751,7 +739,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Complex64:
{
- if !xr.SameType(tret, c.TypeOfComplex64(),
+ if !tret.IdenticalTo(c.TypeOfComplex64(),
) {
ret = func(env *Env) complex64 {
fun := exprfun(env)
@@ -765,26 +753,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
var cachedfun func() complex64
ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() complex64)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) complex64 {
- fun := env.Binds[funindex].Interface().(func() complex64)
+ fun := env.Vals[funindex].Interface().(func() complex64)
return fun()
}
case 1:
ret = func(env *Env) complex64 {
- fun := env.Outer.Binds[funindex].Interface().(func() complex64)
+ fun := env.Outer.Vals[funindex].Interface().(func() complex64)
return fun()
}
case 2:
ret = func(env *Env) complex64 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() complex64)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() complex64)
return fun()
}
}
@@ -800,7 +788,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.Complex128:
{
- if !xr.SameType(tret, c.TypeOfComplex128(),
+ if !tret.IdenticalTo(c.TypeOfComplex128(),
) {
ret = func(env *Env) complex128 {
fun := exprfun(env)
@@ -814,26 +802,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
case maxdepth - 1:
var cachedfun func() complex128
ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() complex128)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) complex128 {
- fun := env.Binds[funindex].Interface().(func() complex128)
+ fun := env.Vals[funindex].Interface().(func() complex128)
return fun()
}
case 1:
ret = func(env *Env) complex128 {
- fun := env.Outer.Binds[funindex].Interface().(func() complex128)
+ fun := env.Outer.Vals[funindex].Interface().(func() complex128)
return fun()
}
case 2:
ret = func(env *Env) complex128 {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() complex128)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() complex128)
return fun()
}
}
@@ -849,7 +837,7 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
}
case r.String:
{
- if !xr.SameType(tret, c.TypeOfString(),
+ if !tret.IdenticalTo(c.TypeOfString(),
) {
ret = func(env *Env) string {
fun := exprfun(env)
@@ -863,26 +851,26 @@ func (c *Comp) call0ret1(call *Call, maxdepth int) I {
case maxdepth - 1:
var cachedfun func() string
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() string)
+ cachedfunv = funv
}
return cachedfun()
}
case 0:
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func() string)
+ fun := env.Vals[funindex].Interface().(func() string)
return fun()
}
case 1:
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func() string)
+ fun := env.Outer.Vals[funindex].Interface().(func() string)
return fun()
}
case 2:
ret = func(env *Env) string {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() string)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() string)
return fun()
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call0ret1.gomacro b/vendor/github.com/cosmos72/gomacro/fast/call0ret1.gomacro
index 1ef9ce6..90610e3 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call0ret1.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/call0ret1.gomacro
@@ -1,22 +1,11 @@
-// +build !gomacro_fast_compact
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call0ret1.go
@@ -30,7 +19,6 @@ package fast
import (
r "reflect"
"github.com/cosmos72/gomacro/base"
- xr "github.com/cosmos72/gomacro/xreflect"
)
:import (
@@ -104,8 +92,8 @@ import (
cachefun := ~"{
if cachedfunv != funv {
- cachedfunv = funv
cachedfun = funv.Interface().(func() ~,rettyp)
+ cachedfunv = funv
}
}
@@ -113,7 +101,7 @@ import (
retconv := convertvalue1(rettyp, ~'ret)
return ~"{
- if !xr.SameType(tret, ~,typevar) {
+ if !tret.IdenticalTo(~,typevar) {
ret = func(env *Env) ~,rettyp {
fun := exprfun(env)
// Debugf("calling %v with args []", fun.Type())
@@ -125,26 +113,26 @@ import (
case maxdepth - 1:
var cachedfun func() ~,rettyp
ret = func(env *Env) ~,rettyp {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
~,cachefun
// Debugf("calling %v with args []", r.TypeOf(cachedfun))
return cachedfun()
}
case 0:
ret = func(env *Env) ~,rettyp {
- fun := env.Binds[funindex].Interface().(func() ~,rettyp)
+ fun := env.Vals[funindex].Interface().(func() ~,rettyp)
// Debugf("calling %v with args []", r.TypeOf(fun))
return fun()
}
case 1:
ret = func(env *Env) ~,rettyp {
- fun := env.Outer.Binds[funindex].Interface().(func() ~,rettyp)
+ fun := env.Outer.Vals[funindex].Interface().(func() ~,rettyp)
// Debugf("calling %v with args []", r.TypeOf(fun))
return fun()
}
case 2:
ret = func(env *Env) ~,rettyp {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func() ~,rettyp)
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func() ~,rettyp)
// Debugf("calling %v with args []", r.TypeOf(fun))
return fun()
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call1ret1.go b/vendor/github.com/cosmos72/gomacro/fast/call1ret1.go
index 7f87eb7..6d864bf 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call1ret1.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/call1ret1.go
@@ -3,25 +3,14 @@
// Any change will be lost when the file is re-generated
// -------------------------------------------------------------
-// +build !gomacro_fast_compact
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call1ret1.go
@@ -69,26 +58,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Bool:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool) bool
+ var cachedfun func(bool,
+
+ ) bool
if arg.Const() {
argconst := r.ValueOf(arg.Value).Bool()
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) bool)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) bool)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) bool)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) bool)
}
arg := argfun(env)
@@ -99,19 +94,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) bool)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(bool) bool)
+ fun := env.Vals[funindex].Interface().(func(bool,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(bool) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(bool,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(bool) bool)
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -121,7 +122,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int) bool
+ var cachedfun func(int,
+
+ ) bool
if arg.Const() {
argconst := int(
@@ -129,20 +132,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) bool)
+ cachedfun = funv.Interface().(func(int,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) bool)
+ cachedfun = funv.Interface().(func(int,
+
+ ) bool)
}
arg := argfun(env)
@@ -153,19 +160,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(int) bool)
+ fun := env.Vals[funindex].Interface().(func(int,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(int) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(int,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int) bool)
+ fun := exprfun(env).Interface().(func(int,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -175,7 +188,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) bool
+ var cachedfun func(int8,
+
+ ) bool
if arg.Const() {
argconst := int8(
@@ -183,20 +198,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) bool)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int8)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) bool)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) bool)
}
arg := argfun(env)
@@ -207,19 +226,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int8)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(int8) bool)
+ fun := env.Vals[funindex].Interface().(func(int8,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(int8,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int8) bool)
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -229,7 +254,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) bool
+ var cachedfun func(int16,
+
+ ) bool
if arg.Const() {
argconst := int16(
@@ -237,20 +264,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) bool)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int16)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) bool)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) bool)
}
arg := argfun(env)
@@ -261,19 +292,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int16)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(int16) bool)
+ fun := env.Vals[funindex].Interface().(func(int16,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(int16,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int16) bool)
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -283,7 +320,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32) bool
+ var cachedfun func(int32,
+
+ ) bool
if arg.Const() {
argconst := int32(
@@ -291,20 +330,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) bool)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int32)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) bool)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) bool)
}
arg := argfun(env)
@@ -315,19 +358,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(int32) bool)
+ fun := env.Vals[funindex].Interface().(func(int32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(int32) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(int32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int32) bool)
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -337,26 +386,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64) bool
+ var cachedfun func(int64,
+
+ ) bool
if arg.Const() {
argconst := r.ValueOf(arg.Value).Int()
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) bool)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int64)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) bool)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) bool)
}
arg := argfun(env)
@@ -367,19 +422,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(int64) bool)
+ fun := env.Vals[funindex].Interface().(func(int64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(int64) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(int64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int64) bool)
+ fun := exprfun(env).Interface().(func(int64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -389,7 +450,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint) bool
+ var cachedfun func(uint,
+
+ ) bool
if arg.Const() {
argconst := uint(
@@ -397,20 +460,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) bool)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) bool)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) bool)
}
arg := argfun(env)
@@ -421,19 +488,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(uint) bool)
+ fun := env.Vals[funindex].Interface().(func(uint,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(uint) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint) bool)
+ fun := exprfun(env).Interface().(func(uint,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -443,7 +516,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) bool
+ var cachedfun func(uint8,
+
+ ) bool
if arg.Const() {
argconst := uint8(
@@ -451,20 +526,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) bool)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint8)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) bool)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) bool)
}
arg := argfun(env)
@@ -475,19 +554,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint8)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(uint8) bool)
+ fun := env.Vals[funindex].Interface().(func(uint8,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint8,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint8) bool)
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -497,7 +582,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) bool
+ var cachedfun func(uint16,
+
+ ) bool
if arg.Const() {
argconst := uint16(
@@ -505,20 +592,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) bool)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint16)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) bool)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) bool)
}
arg := argfun(env)
@@ -529,19 +620,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint16)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(uint16) bool)
+ fun := env.Vals[funindex].Interface().(func(uint16,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint16,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint16) bool)
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -551,7 +648,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) bool
+ var cachedfun func(uint32,
+
+ ) bool
if arg.Const() {
argconst := uint32(
@@ -559,20 +658,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) bool)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint32)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) bool)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) bool)
}
arg := argfun(env)
@@ -583,19 +686,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(uint32) bool)
+ fun := env.Vals[funindex].Interface().(func(uint32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint32) bool)
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -605,26 +714,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64) bool
+ var cachedfun func(uint64,
+
+ ) bool
if arg.Const() {
argconst := r.ValueOf(arg.Value).Uint()
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) bool)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint64)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) bool)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) bool)
}
arg := argfun(env)
@@ -635,19 +750,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(uint64) bool)
+ fun := env.Vals[funindex].Interface().(func(uint64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(uint64) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint64) bool)
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -657,7 +778,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uintptr:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) bool
+ var cachedfun func(uintptr,
+
+ ) bool
if arg.Const() {
argconst := uintptr(
@@ -665,20 +788,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) bool)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uintptr)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) bool)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) bool)
}
arg := argfun(env)
@@ -689,19 +816,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uintptr)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(uintptr) bool)
+ fun := env.Vals[funindex].Interface().(func(uintptr,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(uintptr,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uintptr) bool)
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -711,7 +844,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) bool
+ var cachedfun func(float32,
+
+ ) bool
if arg.Const() {
argconst := float32(
@@ -719,20 +854,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Float())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) bool)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float32)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) bool)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) bool)
}
arg := argfun(env)
@@ -743,19 +882,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) float32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(float32) bool)
+ fun := env.Vals[funindex].Interface().(func(float32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(float32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(float32) bool)
+ fun := exprfun(env).Interface().(func(float32,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -765,26 +910,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) bool
+ var cachedfun func(float64,
+
+ ) bool
if arg.Const() {
argconst := r.ValueOf(arg.Value).Float()
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) bool)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float64)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) bool)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) bool)
}
arg := argfun(env)
@@ -795,19 +946,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) float64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(float64) bool)
+ fun := env.Vals[funindex].Interface().(func(float64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(float64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(float64) bool)
+ fun := exprfun(env).Interface().(func(float64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -817,7 +974,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) bool
+ var cachedfun func(complex64,
+
+ ) bool
if arg.Const() {
argconst := complex64(
@@ -825,20 +984,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Complex())
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) bool)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex64)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) bool)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) bool)
}
arg := argfun(env)
@@ -849,19 +1012,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) complex64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(complex64) bool)
+ fun := env.Vals[funindex].Interface().(func(complex64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(complex64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(complex64) bool)
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -871,26 +1040,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex128:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) bool
+ var cachedfun func(complex128,
+
+ ) bool
if arg.Const() {
argconst := r.ValueOf(arg.Value).Complex()
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) bool)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex128)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) bool)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) bool)
}
arg := argfun(env)
@@ -901,19 +1076,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) complex128)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(complex128) bool)
+ fun := env.Vals[funindex].Interface().(func(complex128,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(complex128,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(complex128) bool)
+ fun := exprfun(env).Interface().(func(complex128,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -923,26 +1104,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.String:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string) bool
+ var cachedfun func(string,
+
+ ) bool
if arg.Const() {
argconst := r.ValueOf(arg.Value).String()
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) bool)
+ cachedfun = funv.Interface().(func(string,
+
+ ) bool)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) string)
ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) bool)
+ cachedfun = funv.Interface().(func(string,
+
+ ) bool)
}
arg := argfun(env)
@@ -953,19 +1140,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) string)
if funsym != nil && funupn == 0 {
ret = func(env *Env) bool {
- fun := env.Binds[funindex].Interface().(func(string) bool)
+ fun := env.Vals[funindex].Interface().(func(string,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) bool {
- fun := env.Outer.Binds[funindex].Interface().(func(string) bool)
+ fun := env.Outer.Vals[funindex].Interface().(func(string,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(string) bool)
+ fun := exprfun(env).Interface().(func(string,
+
+ ) bool)
arg := argfun(env)
return fun(arg)
}
@@ -989,26 +1182,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Bool:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool) int
+ var cachedfun func(bool,
+
+ ) int
if arg.Const() {
argconst := r.ValueOf(arg.Value).Bool()
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) int)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) bool)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) int)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) int)
}
arg := argfun(env)
@@ -1019,19 +1218,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) bool)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(bool) int)
+ fun := env.Vals[funindex].Interface().(func(bool,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(bool) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(bool,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(bool) int)
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1041,7 +1246,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int) int
+ var cachedfun func(int,
+
+ ) int
if arg.Const() {
argconst := int(
@@ -1049,20 +1256,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) int)
+ cachedfun = funv.Interface().(func(int,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) int)
+ cachedfun = funv.Interface().(func(int,
+
+ ) int)
}
arg := argfun(env)
@@ -1073,19 +1284,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(int) int)
+ fun := env.Vals[funindex].Interface().(func(int,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(int) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(int,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int) int)
+ fun := exprfun(env).Interface().(func(int,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1095,7 +1312,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) int
+ var cachedfun func(int8,
+
+ ) int
if arg.Const() {
argconst := int8(
@@ -1103,20 +1322,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int8)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) int)
}
arg := argfun(env)
@@ -1127,19 +1350,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int8)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(int8) int)
+ fun := env.Vals[funindex].Interface().(func(int8,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(int8,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int8) int)
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1149,7 +1378,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) int
+ var cachedfun func(int16,
+
+ ) int
if arg.Const() {
argconst := int16(
@@ -1157,20 +1388,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int16)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) int)
}
arg := argfun(env)
@@ -1181,19 +1416,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int16)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(int16) int)
+ fun := env.Vals[funindex].Interface().(func(int16,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(int16,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int16) int)
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1203,7 +1444,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32) int
+ var cachedfun func(int32,
+
+ ) int
if arg.Const() {
argconst := int32(
@@ -1211,20 +1454,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) int)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int32)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) int)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) int)
}
arg := argfun(env)
@@ -1235,19 +1482,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(int32) int)
+ fun := env.Vals[funindex].Interface().(func(int32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(int32) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(int32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int32) int)
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1257,26 +1510,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64) int
+ var cachedfun func(int64,
+
+ ) int
if arg.Const() {
argconst := r.ValueOf(arg.Value).Int()
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) int)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int64)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) int)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) int)
}
arg := argfun(env)
@@ -1287,19 +1546,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(int64) int)
+ fun := env.Vals[funindex].Interface().(func(int64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(int64) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(int64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int64) int)
+ fun := exprfun(env).Interface().(func(int64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1309,7 +1574,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint) int
+ var cachedfun func(uint,
+
+ ) int
if arg.Const() {
argconst := uint(
@@ -1317,20 +1584,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) int)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) int)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) int)
}
arg := argfun(env)
@@ -1341,19 +1612,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(uint) int)
+ fun := env.Vals[funindex].Interface().(func(uint,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(uint) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint) int)
+ fun := exprfun(env).Interface().(func(uint,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1363,7 +1640,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) int
+ var cachedfun func(uint8,
+
+ ) int
if arg.Const() {
argconst := uint8(
@@ -1371,20 +1650,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) int)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint8)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) int)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) int)
}
arg := argfun(env)
@@ -1395,19 +1678,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint8)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(uint8) int)
+ fun := env.Vals[funindex].Interface().(func(uint8,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint8,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint8) int)
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1417,7 +1706,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) int
+ var cachedfun func(uint16,
+
+ ) int
if arg.Const() {
argconst := uint16(
@@ -1425,20 +1716,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) int)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint16)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) int)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) int)
}
arg := argfun(env)
@@ -1449,19 +1744,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint16)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(uint16) int)
+ fun := env.Vals[funindex].Interface().(func(uint16,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint16,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint16) int)
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1471,7 +1772,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) int
+ var cachedfun func(uint32,
+
+ ) int
if arg.Const() {
argconst := uint32(
@@ -1479,20 +1782,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) int)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint32)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) int)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) int)
}
arg := argfun(env)
@@ -1503,19 +1810,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(uint32) int)
+ fun := env.Vals[funindex].Interface().(func(uint32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint32) int)
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1525,26 +1838,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64) int
+ var cachedfun func(uint64,
+
+ ) int
if arg.Const() {
argconst := r.ValueOf(arg.Value).Uint()
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) int)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint64)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) int)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) int)
}
arg := argfun(env)
@@ -1555,19 +1874,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(uint64) int)
+ fun := env.Vals[funindex].Interface().(func(uint64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(uint64) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint64) int)
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1577,7 +1902,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uintptr:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) int
+ var cachedfun func(uintptr,
+
+ ) int
if arg.Const() {
argconst := uintptr(
@@ -1585,20 +1912,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) int)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uintptr)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) int)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) int)
}
arg := argfun(env)
@@ -1609,19 +1940,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uintptr)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(uintptr) int)
+ fun := env.Vals[funindex].Interface().(func(uintptr,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(uintptr,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uintptr) int)
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1631,7 +1968,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) int
+ var cachedfun func(float32,
+
+ ) int
if arg.Const() {
argconst := float32(
@@ -1639,20 +1978,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Float())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) int)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float32)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) int)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) int)
}
arg := argfun(env)
@@ -1663,19 +2006,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) float32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(float32) int)
+ fun := env.Vals[funindex].Interface().(func(float32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(float32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(float32) int)
+ fun := exprfun(env).Interface().(func(float32,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1685,26 +2034,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) int
+ var cachedfun func(float64,
+
+ ) int
if arg.Const() {
argconst := r.ValueOf(arg.Value).Float()
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) int)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float64)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) int)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) int)
}
arg := argfun(env)
@@ -1715,19 +2070,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) float64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(float64) int)
+ fun := env.Vals[funindex].Interface().(func(float64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(float64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(float64) int)
+ fun := exprfun(env).Interface().(func(float64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1737,7 +2098,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) int
+ var cachedfun func(complex64,
+
+ ) int
if arg.Const() {
argconst := complex64(
@@ -1745,20 +2108,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Complex())
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) int)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex64)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) int)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) int)
}
arg := argfun(env)
@@ -1769,19 +2136,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) complex64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(complex64) int)
+ fun := env.Vals[funindex].Interface().(func(complex64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(complex64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(complex64) int)
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1791,26 +2164,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex128:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) int
+ var cachedfun func(complex128,
+
+ ) int
if arg.Const() {
argconst := r.ValueOf(arg.Value).Complex()
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) int)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex128)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) int)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) int)
}
arg := argfun(env)
@@ -1821,19 +2200,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) complex128)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(complex128) int)
+ fun := env.Vals[funindex].Interface().(func(complex128,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(complex128,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(complex128) int)
+ fun := exprfun(env).Interface().(func(complex128,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1843,26 +2228,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.String:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string) int
+ var cachedfun func(string,
+
+ ) int
if arg.Const() {
argconst := r.ValueOf(arg.Value).String()
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) int)
+ cachedfun = funv.Interface().(func(string,
+
+ ) int)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) string)
ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) int)
+ cachedfun = funv.Interface().(func(string,
+
+ ) int)
}
arg := argfun(env)
@@ -1873,19 +2264,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) string)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int {
- fun := env.Binds[funindex].Interface().(func(string) int)
+ fun := env.Vals[funindex].Interface().(func(string,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int {
- fun := env.Outer.Binds[funindex].Interface().(func(string) int)
+ fun := env.Outer.Vals[funindex].Interface().(func(string,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(string) int)
+ fun := exprfun(env).Interface().(func(string,
+
+ ) int)
arg := argfun(env)
return fun(arg)
}
@@ -1907,7 +2304,9 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int8:
if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) int8
+ var cachedfun func(int8,
+
+ ) int8
if arg.Const() {
argconst := int8(
@@ -1915,20 +2314,24 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
r.ValueOf(arg.Value).Int())
ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int8)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) int8)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int8)
ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int8)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) int8)
}
arg := argfun(env)
@@ -1939,19 +2342,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int8)
if funsym != nil && funupn == 0 {
ret = func(env *Env) int8 {
- fun := env.Binds[funindex].Interface().(func(int8) int8)
+ fun := env.Vals[funindex].Interface().(func(int8,
+
+ ) int8)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) int8 {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) int8)
+ fun := env.Outer.Vals[funindex].Interface().(func(int8,
+
+ ) int8)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int8) int8)
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) int8)
arg := argfun(env)
return fun(arg)
}
@@ -1959,205 +2368,126 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
} else {
- switch karg {
- case r.Bool:
+ ret = func(env *Env) int8 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
+ }
+
+ ret0 := funv.Call(argv)[0]
+ return int8(ret0.Int())
+ }
+ }
+
+ case r.Int16:
+ if karg == kret {
+ if funsym != nil && funupn == maxdepth-1 {
+ var cachedfun func(int16,
+
+ ) int16
+
+ if arg.Const() {
+ argconst := int16(
+
+ r.ValueOf(arg.Value).Int())
+
+ ret = func(env *Env) int16 {
+ funv := env.FileEnv.Vals[funindex]
+ if cachedfunv != funv {
+ cachedfunv = funv
+ cachedfun = funv.Interface().(func(int16,
+
+ ) int16)
+ }
+ return cachedfun(argconst)
+ }
+ } else {
+ argfun := arg.Fun.(func(env *Env) int16)
+ ret = func(env *Env) int16 {
+ funv := env.FileEnv.Vals[funindex]
+ if cachedfunv != funv {
+ cachedfunv = funv
+ cachedfun = funv.Interface().(func(int16,
+
+ ) int16)
+ }
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(bool) int8)
arg := argfun(env)
- return fun(arg)
+ return cachedfun(arg)
}
}
- case r.Int:
+ } else {
+ argfun := arg.WithFun().(func(env *Env) int16)
+ if funsym != nil && funupn == 0 {
+ ret = func(env *Env) int16 {
+ fun := env.Vals[funindex].Interface().(func(int16,
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int) int8)
+ ) int16)
arg := argfun(env)
return fun(arg)
}
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int8) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int16) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int32) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int64) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint8) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint16) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint32) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint64) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uintptr) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(float32) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(float64) int8)
- arg := argfun(env)
- return fun(arg)
- }
- }
+ } else if funsym != nil && funupn == 1 {
+ ret = func(env *Env) int16 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int16,
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(complex64) int8)
+ ) int16)
arg := argfun(env)
return fun(arg)
}
- }
+ } else {
+ ret = func(env *Env) int16 {
+ fun := exprfun(env).Interface().(func(int16,
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(complex128) int8)
+ ) int16)
arg := argfun(env)
return fun(arg)
}
}
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(string) int8)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ } else {
+ ret = func(env *Env) int16 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
- default:
- ret = func(env *Env) int8 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return int8(ret0.Int())
- }
+ ret0 := funv.Call(argv)[0]
+ return int16(ret0.Int())
}
}
- case r.Int16:
+ case r.Int32:
if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) int16
+ var cachedfun func(int32,
+
+ ) int32
if arg.Const() {
- argconst := int16(
+ argconst := int32(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int32 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int16)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) int32)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) int16)
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) int32)
+ ret = func(env *Env) int32 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int16)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) int32)
}
arg := argfun(env)
@@ -2165,22 +2495,28 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) int16)
+ argfun := arg.WithFun().(func(env *Env) int32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int16 {
- fun := env.Binds[funindex].Interface().(func(int16) int16)
+ ret = func(env *Env) int32 {
+ fun := env.Vals[funindex].Interface().(func(int32,
+
+ ) int32)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int16 {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) int16)
+ ret = func(env *Env) int32 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int32,
+
+ ) int32)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int16) int16)
+ ret = func(env *Env) int32 {
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) int32)
arg := argfun(env)
return fun(arg)
}
@@ -2188,205 +2524,48 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
} else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(bool) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int:
-
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int8) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int16) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int32) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int64) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint8) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint16) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint32) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint64) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uintptr) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(float32) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(float64) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(complex64) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(complex128) int16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(string) int16)
- arg := argfun(env)
- return fun(arg)
- }
+ ret = func(env *Env) int32 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
- default:
- ret = func(env *Env) int16 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return int16(ret0.Int())
- }
+ ret0 := funv.Call(argv)[0]
+ return int32(ret0.Int())
}
}
- case r.Int32:
+ case r.Int64:
switch karg {
case r.Bool:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool) int32
+ var cachedfun func(bool,
+
+ ) int64
if arg.Const() {
argconst := r.ValueOf(arg.Value).Bool()
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) int32)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) bool)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) int32)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) int64)
}
arg := argfun(env)
@@ -2396,20 +2575,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) bool)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(bool) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(bool,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(bool) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(bool,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(bool) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2419,28 +2604,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int) int32
+ var cachedfun func(int,
+
+ ) int64
if arg.Const() {
argconst := int(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) int32)
+ cachedfun = funv.Interface().(func(int,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) int32)
+ cachedfun = funv.Interface().(func(int,
+
+ ) int64)
}
arg := argfun(env)
@@ -2450,20 +2641,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(int) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(int,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(int) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(int,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2473,28 +2670,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) int32
+ var cachedfun func(int8,
+
+ ) int64
if arg.Const() {
argconst := int8(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int32)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int8)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int32)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) int64)
}
arg := argfun(env)
@@ -2504,20 +2707,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int8)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(int8) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(int8,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int8,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int8) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2527,28 +2736,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) int32
+ var cachedfun func(int16,
+
+ ) int64
if arg.Const() {
argconst := int16(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int32)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int16)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int32)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) int64)
}
arg := argfun(env)
@@ -2558,20 +2773,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int16)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(int16) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(int16,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int16,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int16) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2581,28 +2802,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32) int32
+ var cachedfun func(int32,
+
+ ) int64
if arg.Const() {
argconst := int32(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) int32)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int32)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) int32)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) int64)
}
arg := argfun(env)
@@ -2612,20 +2839,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(int32) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(int32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(int32) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int32) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2635,26 +2868,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64) int32
+ var cachedfun func(int64,
+
+ ) int64
if arg.Const() {
argconst := r.ValueOf(arg.Value).Int()
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) int32)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int64)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) int32)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) int64)
}
arg := argfun(env)
@@ -2664,20 +2903,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(int64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(int64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(int64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int64) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(int64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2687,28 +2932,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint) int32
+ var cachedfun func(uint,
+
+ ) int64
if arg.Const() {
argconst := uint(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) int32)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) int32)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) int64)
}
arg := argfun(env)
@@ -2718,20 +2969,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(uint) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(uint,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(uint,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2741,28 +2998,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) int32
+ var cachedfun func(uint8,
+
+ ) int64
if arg.Const() {
argconst := uint8(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) int32)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint8)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) int32)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) int64)
}
arg := argfun(env)
@@ -2772,20 +3035,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint8)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(uint8) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(uint8,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint8,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint8) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2795,28 +3064,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) int32
+ var cachedfun func(uint16,
+
+ ) int64
if arg.Const() {
argconst := uint16(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) int32)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint16)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) int32)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) int64)
}
arg := argfun(env)
@@ -2826,20 +3101,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint16)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(uint16) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(uint16,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint16,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint16) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2849,28 +3130,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) int32
+ var cachedfun func(uint32,
+
+ ) int64
if arg.Const() {
argconst := uint32(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) int32)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint32)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) int32)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) int64)
}
arg := argfun(env)
@@ -2880,20 +3167,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(uint32) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(uint32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint32) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2903,26 +3196,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64) int32
+ var cachedfun func(uint64,
+
+ ) int64
if arg.Const() {
argconst := r.ValueOf(arg.Value).Uint()
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) int32)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint64)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) int32)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) int64)
}
arg := argfun(env)
@@ -2932,20 +3231,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(uint64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(uint64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint64) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -2955,28 +3260,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uintptr:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) int32
+ var cachedfun func(uintptr,
+
+ ) int64
if arg.Const() {
argconst := uintptr(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) int32)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uintptr)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) int32)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) int64)
}
arg := argfun(env)
@@ -2986,20 +3297,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uintptr)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(uintptr) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(uintptr,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uintptr,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uintptr) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -3009,28 +3326,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) int32
+ var cachedfun func(float32,
+
+ ) int64
if arg.Const() {
argconst := float32(
r.ValueOf(arg.Value).Float())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) int32)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float32)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) int32)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) int64)
}
arg := argfun(env)
@@ -3040,20 +3363,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) float32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(float32) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(float32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(float32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(float32) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(float32,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -3063,26 +3392,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) int32
+ var cachedfun func(float64,
+
+ ) int64
if arg.Const() {
argconst := r.ValueOf(arg.Value).Float()
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) int32)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float64)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) int32)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) int64)
}
arg := argfun(env)
@@ -3092,20 +3427,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) float64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(float64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(float64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(float64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(float64) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(float64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -3115,28 +3456,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) int32
+ var cachedfun func(complex64,
+
+ ) int64
if arg.Const() {
argconst := complex64(
r.ValueOf(arg.Value).Complex())
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) int32)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex64)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) int32)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) int64)
}
arg := argfun(env)
@@ -3146,20 +3493,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) complex64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(complex64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(complex64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(complex64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(complex64) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -3169,26 +3522,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex128:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) int32
+ var cachedfun func(complex128,
+
+ ) int64
if arg.Const() {
argconst := r.ValueOf(arg.Value).Complex()
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) int32)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex128)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) int32)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) int64)
}
arg := argfun(env)
@@ -3198,20 +3557,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) complex128)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(complex128) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(complex128,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(complex128,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(complex128) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(complex128,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -3221,26 +3586,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.String:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string) int32
+ var cachedfun func(string,
+
+ ) int64
if arg.Const() {
argconst := r.ValueOf(arg.Value).String()
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) int32)
+ cachedfun = funv.Interface().(func(string,
+
+ ) int64)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) string)
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) int64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) int32)
+ cachedfun = funv.Interface().(func(string,
+
+ ) int64)
}
arg := argfun(env)
@@ -3250,20 +3621,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) string)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int32 {
- fun := env.Binds[funindex].Interface().(func(string) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Vals[funindex].Interface().(func(string,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int32 {
- fun := env.Outer.Binds[funindex].Interface().(func(string) int32)
+ ret = func(env *Env) int64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(string,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(string) int32)
+ ret = func(env *Env) int64 {
+ fun := exprfun(env).Interface().(func(string,
+
+ ) int64)
arg := argfun(env)
return fun(arg)
}
@@ -3271,42 +3648,48 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
default:
- ret = func(env *Env) int32 {
+ ret = func(env *Env) int64 {
funv := exprfun(env)
argv := []r.Value{
argfun(env),
}
ret0 := funv.Call(argv)[0]
- return int32(ret0.Int())
+ return ret0.Int()
}
}
- case r.Int64:
+ case r.Uint:
switch karg {
case r.Bool:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool) int64
+ var cachedfun func(bool,
+
+ ) uint
if arg.Const() {
argconst := r.ValueOf(arg.Value).Bool()
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) int64)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) bool)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) int64)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) uint)
}
arg := argfun(env)
@@ -3316,20 +3699,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) bool)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(bool) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(bool,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(bool) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(bool,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(bool) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3339,28 +3728,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int) int64
+ var cachedfun func(int,
+
+ ) uint
if arg.Const() {
argconst := int(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) int64)
+ cachedfun = funv.Interface().(func(int,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) int64)
+ cachedfun = funv.Interface().(func(int,
+
+ ) uint)
}
arg := argfun(env)
@@ -3370,20 +3765,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(int) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(int,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(int,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(int,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3393,28 +3794,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) int64
+ var cachedfun func(int8,
+
+ ) uint
if arg.Const() {
argconst := int8(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int64)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int8)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) int64)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) uint)
}
arg := argfun(env)
@@ -3424,20 +3831,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int8)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(int8) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(int8,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(int8,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int8) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3447,28 +3860,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) int64
+ var cachedfun func(int16,
+
+ ) uint
if arg.Const() {
argconst := int16(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int64)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int16)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) int64)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) uint)
}
arg := argfun(env)
@@ -3478,20 +3897,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int16)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(int16) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(int16,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(int16,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int16) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3501,28 +3926,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32) int64
+ var cachedfun func(int32,
+
+ ) uint
if arg.Const() {
argconst := int32(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) int64)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int32)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) int64)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) uint)
}
arg := argfun(env)
@@ -3532,20 +3963,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(int32) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(int32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int32) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(int32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int32) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3555,26 +3992,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64) int64
+ var cachedfun func(int64,
+
+ ) uint
if arg.Const() {
argconst := r.ValueOf(arg.Value).Int()
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) int64)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int64)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) int64)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) uint)
}
arg := argfun(env)
@@ -3584,20 +4027,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) int64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(int64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(int64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(int64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int64) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(int64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3607,28 +4056,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint) int64
+ var cachedfun func(uint,
+
+ ) uint
if arg.Const() {
argconst := uint(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) int64)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) int64)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) uint)
}
arg := argfun(env)
@@ -3638,20 +4093,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(uint) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(uint,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(uint,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3661,28 +4122,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) int64
+ var cachedfun func(uint8,
+
+ ) uint
if arg.Const() {
argconst := uint8(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) int64)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint8)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) int64)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) uint)
}
arg := argfun(env)
@@ -3692,20 +4159,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint8)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(uint8) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(uint8,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint8,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint8) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3715,28 +4188,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) int64
+ var cachedfun func(uint16,
+
+ ) uint
if arg.Const() {
argconst := uint16(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) int64)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint16)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) int64)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) uint)
}
arg := argfun(env)
@@ -3746,20 +4225,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint16)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(uint16) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(uint16,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint16,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint16) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3769,28 +4254,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) int64
+ var cachedfun func(uint32,
+
+ ) uint
if arg.Const() {
argconst := uint32(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) int64)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint32)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) int64)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) uint)
}
arg := argfun(env)
@@ -3800,20 +4291,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(uint32) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(uint32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint32) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3823,26 +4320,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64) int64
+ var cachedfun func(uint64,
+
+ ) uint
if arg.Const() {
argconst := r.ValueOf(arg.Value).Uint()
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) int64)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint64)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) int64)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) uint)
}
arg := argfun(env)
@@ -3852,20 +4355,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uint64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(uint64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(uint64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint64) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3875,28 +4384,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uintptr:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) int64
+ var cachedfun func(uintptr,
+
+ ) uint
if arg.Const() {
argconst := uintptr(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) int64)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uintptr)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) int64)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) uint)
}
arg := argfun(env)
@@ -3906,20 +4421,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) uintptr)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(uintptr) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(uintptr,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(uintptr,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uintptr) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3929,28 +4450,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) int64
+ var cachedfun func(float32,
+
+ ) uint
if arg.Const() {
argconst := float32(
r.ValueOf(arg.Value).Float())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) int64)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float32)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) int64)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) uint)
}
arg := argfun(env)
@@ -3960,20 +4487,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) float32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(float32) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(float32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(float32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(float32) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(float32,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -3983,26 +4516,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) int64
+ var cachedfun func(float64,
+
+ ) uint
if arg.Const() {
argconst := r.ValueOf(arg.Value).Float()
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) int64)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float64)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) int64)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) uint)
}
arg := argfun(env)
@@ -4012,20 +4551,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) float64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(float64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(float64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(float64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(float64) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(float64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -4035,28 +4580,34 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) int64
+ var cachedfun func(complex64,
+
+ ) uint
if arg.Const() {
argconst := complex64(
r.ValueOf(arg.Value).Complex())
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) int64)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex64)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) int64)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) uint)
}
arg := argfun(env)
@@ -4066,20 +4617,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) complex64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(complex64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(complex64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(complex64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(complex64) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -4089,26 +4646,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex128:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) int64
+ var cachedfun func(complex128,
+
+ ) uint
if arg.Const() {
argconst := r.ValueOf(arg.Value).Complex()
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) int64)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex128)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) int64)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) uint)
}
arg := argfun(env)
@@ -4118,20 +4681,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) complex128)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(complex128) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(complex128,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(complex128,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(complex128) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(complex128,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -4141,26 +4710,32 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.String:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string) int64
+ var cachedfun func(string,
+
+ ) uint
if arg.Const() {
argconst := r.ValueOf(arg.Value).String()
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) int64)
+ cachedfun = funv.Interface().(func(string,
+
+ ) uint)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) string)
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) int64)
+ cachedfun = funv.Interface().(func(string,
+
+ ) uint)
}
arg := argfun(env)
@@ -4170,20 +4745,26 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
} else {
argfun := arg.WithFun().(func(env *Env) string)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) int64 {
- fun := env.Binds[funindex].Interface().(func(string) int64)
+ ret = func(env *Env) uint {
+ fun := env.Vals[funindex].Interface().(func(string,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) int64 {
- fun := env.Outer.Binds[funindex].Interface().(func(string) int64)
+ ret = func(env *Env) uint {
+ fun := env.Outer.Vals[funindex].Interface().(func(string,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(string) int64)
+ ret = func(env *Env) uint {
+ fun := exprfun(env).Interface().(func(string,
+
+ ) uint)
arg := argfun(env)
return fun(arg)
}
@@ -4191,42 +4772,44 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
default:
- ret = func(env *Env) int64 {
+ ret = func(env *Env) uint {
funv := exprfun(env)
argv := []r.Value{
argfun(env),
}
ret0 := funv.Call(argv)[0]
- return ret0.Int()
+ return uint(ret0.Uint())
}
}
- case r.Uint:
- switch karg {
- case r.Bool:
-
+ case r.Uint8:
+ if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool) uint
+ var cachedfun func(uint8,
+
+ ) uint8
if arg.Const() {
- argconst := r.ValueOf(arg.Value).Bool()
+ argconst := uint8(
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ r.ValueOf(arg.Value).Uint())
+
+ ret = func(env *Env) uint8 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) uint)
+ cachedfun = funv.Interface().(func(uint8) uint8)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) bool)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint8)
+ ret = func(env *Env) uint8 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) uint)
+ cachedfun = funv.Interface().(func(uint8) uint8)
}
arg := argfun(env)
@@ -4234,53 +4817,75 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) bool)
+ argfun := arg.WithFun().(func(env *Env) uint8)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(bool) uint)
+ ret = func(env *Env) uint8 {
+ fun := env.Vals[funindex].Interface().(func(uint8,
+
+ ) uint8)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(bool) uint)
+ ret = func(env *Env) uint8 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint8,
+
+ ) uint8)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(bool) uint)
+ ret = func(env *Env) uint8 {
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ) uint8)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Int:
+ } else {
+ ret = func(env *Env) uint8 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
+ }
+
+ ret0 := funv.Call(argv)[0]
+ return uint8(ret0.Uint())
+ }
+ }
+ case r.Uint16:
+ if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int) uint
+ var cachedfun func(uint16,
+
+ ) uint16
if arg.Const() {
- argconst := int(
+ argconst := uint16(
- r.ValueOf(arg.Value).Int())
+ r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint16 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) uint)
+ cachedfun = funv.Interface().(func(
+ uint16) uint16)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) int)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint16)
+ ret = func(env *Env) uint16 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) uint)
+ cachedfun = funv.Interface().(func(
+ uint16) uint16)
}
arg := argfun(env)
@@ -4288,53 +4893,77 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) int)
+ argfun := arg.WithFun().(func(env *Env) uint16)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(int) uint)
+ ret = func(env *Env) uint16 {
+ fun := env.Vals[funindex].Interface().(func(uint16,
+
+ ) uint16)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(int) uint)
+ ret = func(env *Env) uint16 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint16,
+
+ ) uint16)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int) uint)
+ ret = func(env *Env) uint16 {
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ) uint16)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Int8:
+ } else {
+ ret = func(env *Env) uint16 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
+ }
+
+ ret0 := funv.Call(argv)[0]
+ return uint16(ret0.Uint())
+ }
+ }
+ case r.Uint32:
+ if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) uint
+ var cachedfun func(uint32,
+
+ ) uint32
if arg.Const() {
- argconst := int8(
+ argconst := uint32(
- r.ValueOf(arg.Value).Int())
+ r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint32 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) uint)
+ cachedfun = funv.Interface().(func(
+
+ uint32) uint32)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) int8)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint32)
+ ret = func(env *Env) uint32 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) uint)
+ cachedfun = funv.Interface().(func(
+
+ uint32) uint32)
}
arg := argfun(env)
@@ -4342,53 +4971,77 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) int8)
+ argfun := arg.WithFun().(func(env *Env) uint32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(int8) uint)
+ ret = func(env *Env) uint32 {
+ fun := env.Vals[funindex].Interface().(func(uint32,
+
+ ) uint32)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) uint)
+ ret = func(env *Env) uint32 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint32,
+
+ ) uint32)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int8) uint)
+ ret = func(env *Env) uint32 {
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ) uint32)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Int16:
+ } else {
+ ret = func(env *Env) uint32 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
+ }
+
+ ret0 := funv.Call(argv)[0]
+ return uint32(ret0.Uint())
+ }
+ }
+
+ case r.Uint64:
+ switch karg {
+ case r.Bool:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) uint
+ var cachedfun func(bool,
- if arg.Const() {
- argconst := int16(
+ ) uint64
- r.ValueOf(arg.Value).Int())
+ if arg.Const() {
+ argconst := r.ValueOf(arg.Value).Bool()
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) uint)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) int16)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) bool)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) uint)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4396,53 +5049,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) int16)
+ argfun := arg.WithFun().(func(env *Env) bool)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(int16) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(bool,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(bool,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int16) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Int32:
+ case r.Int:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32) uint
+ var cachedfun func(int,
+
+ ) uint64
if arg.Const() {
- argconst := int32(
+ argconst := int(
r.ValueOf(arg.Value).Int())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) uint)
+ cachedfun = funv.Interface().(func(int,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) int32)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) int)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) uint)
+ cachedfun = funv.Interface().(func(int,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4450,51 +5115,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) int32)
+ argfun := arg.WithFun().(func(env *Env) int)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(int32) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(int,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(int32) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int32) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(int,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Int64:
+ case r.Int8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64) uint
+ var cachedfun func(int8,
+
+ ) uint64
if arg.Const() {
- argconst := r.ValueOf(arg.Value).Int()
+ argconst := int8(
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ r.ValueOf(arg.Value).Int())
+
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) uint)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) int64)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) int8)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) uint)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4502,53 +5181,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) int64)
+ argfun := arg.WithFun().(func(env *Env) int8)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(int64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(int8,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(int64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int8,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int64) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Uint:
+ case r.Int16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint) uint
+ var cachedfun func(int16,
+
+ ) uint64
if arg.Const() {
- argconst := uint(
+ argconst := int16(
- r.ValueOf(arg.Value).Uint())
+ r.ValueOf(arg.Value).Int())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) uint)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) uint)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) int16)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) uint)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4556,53 +5247,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) uint)
+ argfun := arg.WithFun().(func(env *Env) int16)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(uint) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(int16,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(uint) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int16,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Uint8:
+ case r.Int32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) uint
+ var cachedfun func(int32,
+
+ ) uint64
if arg.Const() {
- argconst := uint8(
+ argconst := int32(
- r.ValueOf(arg.Value).Uint())
+ r.ValueOf(arg.Value).Int())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) uint)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) uint8)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) int32)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) uint)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4610,53 +5313,63 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) uint8)
+ argfun := arg.WithFun().(func(env *Env) int32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(uint8) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(int32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint8) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Uint16:
+ case r.Int64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) uint
+ var cachedfun func(int64,
- if arg.Const() {
- argconst := uint16(
+ ) uint64
- r.ValueOf(arg.Value).Uint())
+ if arg.Const() {
+ argconst := r.ValueOf(arg.Value).Int()
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) uint)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) uint16)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) int64)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) uint)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4664,53 +5377,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) uint16)
+ argfun := arg.WithFun().(func(env *Env) int64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(uint16) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(int64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(int64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint16) uint)
- arg := argfun(env)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(int64,
+
+ ) uint64)
+ arg := argfun(env)
return fun(arg)
}
}
}
- case r.Uint32:
+ case r.Uint:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) uint
+ var cachedfun func(uint,
+
+ ) uint64
if arg.Const() {
- argconst := uint32(
+ argconst := uint(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) uint)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) uint32)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) uint)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4718,51 +5443,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) uint32)
+ argfun := arg.WithFun().(func(env *Env) uint)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(uint32) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(uint,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint32) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(uint,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Uint64:
+ case r.Uint8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64) uint
+ var cachedfun func(uint8,
+
+ ) uint64
if arg.Const() {
- argconst := r.ValueOf(arg.Value).Uint()
+ argconst := uint8(
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ r.ValueOf(arg.Value).Uint())
+
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) uint)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) uint64)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint8)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) uint)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4770,53 +5509,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) uint64)
+ argfun := arg.WithFun().(func(env *Env) uint8)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(uint64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(uint8,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(uint64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint8,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint64) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Uintptr:
+ case r.Uint16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) uint
+ var cachedfun func(uint16,
+
+ ) uint64
if arg.Const() {
- argconst := uintptr(
+ argconst := uint16(
r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) uint)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) uintptr)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint16)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) uint)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4824,53 +5575,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) uintptr)
+ argfun := arg.WithFun().(func(env *Env) uint16)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(uintptr) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(uint16,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint16,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uintptr) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Float32:
+ case r.Uint32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) uint
+ var cachedfun func(uint32,
+
+ ) uint64
if arg.Const() {
- argconst := float32(
+ argconst := uint32(
- r.ValueOf(arg.Value).Float())
+ r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) uint)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) float32)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint32)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) uint)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4878,51 +5641,63 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) float32)
+ argfun := arg.WithFun().(func(env *Env) uint32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(float32) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(uint32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(float32) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Float64:
+ case r.Uint64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) uint
+ var cachedfun func(uint64,
+
+ ) uint64
if arg.Const() {
- argconst := r.ValueOf(arg.Value).Float()
+ argconst := r.ValueOf(arg.Value).Uint()
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) uint)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) float64)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uint64)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) uint)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4930,53 +5705,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) float64)
+ argfun := arg.WithFun().(func(env *Env) uint64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(float64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(uint64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uint64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(float64) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Complex64:
+ case r.Uintptr:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) uint
+ var cachedfun func(uintptr,
+
+ ) uint64
if arg.Const() {
- argconst := complex64(
+ argconst := uintptr(
- r.ValueOf(arg.Value).Complex())
+ r.ValueOf(arg.Value).Uint())
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) uint)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) complex64)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) uintptr)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) uint)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) uint64)
}
arg := argfun(env)
@@ -4984,51 +5771,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) complex64)
+ argfun := arg.WithFun().(func(env *Env) uintptr)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(complex64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(uintptr,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(uintptr,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(complex64) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.Complex128:
+ case r.Float32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) uint
+ var cachedfun func(float32,
+
+ ) uint64
if arg.Const() {
- argconst := r.ValueOf(arg.Value).Complex()
+ argconst := float32(
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ r.ValueOf(arg.Value).Float())
+
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) uint)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) complex128)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) float32)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) uint)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) uint64)
}
arg := argfun(env)
@@ -5036,51 +5837,63 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) complex128)
+ argfun := arg.WithFun().(func(env *Env) float32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(complex128) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(float32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(float32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(complex128) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(float32,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- case r.String:
+ case r.Float64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string) uint
+ var cachedfun func(float64,
+
+ ) uint64
if arg.Const() {
- argconst := r.ValueOf(arg.Value).String()
+ argconst := r.ValueOf(arg.Value).Float()
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) uint)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) string)
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) float64)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) uint)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) uint64)
}
arg := argfun(env)
@@ -5088,65 +5901,65 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) string)
+ argfun := arg.WithFun().(func(env *Env) float64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint {
- fun := env.Binds[funindex].Interface().(func(string) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(float64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint {
- fun := env.Outer.Binds[funindex].Interface().(func(string) uint)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(float64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(string) uint)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(float64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- default:
- ret = func(env *Env) uint {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint(ret0.Uint())
- }
- }
+ case r.Complex64:
- case r.Uint8:
- if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) uint8
+ var cachedfun func(complex64,
+
+ ) uint64
if arg.Const() {
- argconst := uint8(
+ argconst := complex64(
- r.ValueOf(arg.Value).Uint())
+ r.ValueOf(arg.Value).Complex())
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) uint8)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) uint8)
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) complex64)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) uint8)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) uint64)
}
arg := argfun(env)
@@ -5154,1835 +5967,63 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) uint8)
+ argfun := arg.WithFun().(func(env *Env) complex64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint8 {
- fun := env.Binds[funindex].Interface().(func(uint8) uint8)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(complex64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint8 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) uint8)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(complex64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint8) uint8)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- } else {
- switch karg {
- case r.Bool:
+ case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(bool) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int:
+ if funsym != nil && funupn == maxdepth-1 {
+ var cachedfun func(complex128,
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int8) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int16) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int32) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int64) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint8) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint16) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint32) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint64) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uintptr) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(float32) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(float64) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(complex64) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(complex128) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(string) uint8)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- default:
- ret = func(env *Env) uint8 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint8(ret0.Uint())
- }
- }
- }
-
- case r.Uint16:
- if karg == kret {
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) uint16
-
- if arg.Const() {
- argconst := uint16(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) uint16)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uint16)
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) uint16)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint16 {
- fun := env.Binds[funindex].Interface().(func(uint16) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint16 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint16) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- } else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(bool) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int:
-
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int8) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int16) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int32) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int64) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint8) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint16) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint32) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint64) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uintptr) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(float32) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(float64) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(complex64) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(complex128) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(string) uint16)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- default:
- ret = func(env *Env) uint16 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint16(ret0.Uint())
- }
- }
- }
-
- case r.Uint32:
- if karg == kret {
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) uint32
-
- if arg.Const() {
- argconst := uint32(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) uint32)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uint32)
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) uint32)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint32 {
- fun := env.Binds[funindex].Interface().(func(uint32) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint32 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint32) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- } else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(bool) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int:
-
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int8) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int16) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int32) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int64) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint8) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint16) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint32) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint64) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uintptr) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(float32) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(float64) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(complex64) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(complex128) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(string) uint32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- default:
- ret = func(env *Env) uint32 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint32(ret0.Uint())
- }
- }
- }
-
- case r.Uint64:
- switch karg {
- case r.Bool:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool) uint64
-
- if arg.Const() {
- argconst := r.ValueOf(arg.Value).Bool()
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) bool)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(bool) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(bool) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(bool) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Int:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int) uint64
-
- if arg.Const() {
- argconst := int(
-
- r.ValueOf(arg.Value).Int())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) int)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) int)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(int) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Int8:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) uint64
-
- if arg.Const() {
- argconst := int8(
-
- r.ValueOf(arg.Value).Int())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) int8)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(int8) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int8) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Int16:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) uint64
-
- if arg.Const() {
- argconst := int16(
-
- r.ValueOf(arg.Value).Int())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) int16)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(int16) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int16) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Int32:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32) uint64
-
- if arg.Const() {
- argconst := int32(
-
- r.ValueOf(arg.Value).Int())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) int32)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(int32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Int64:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64) uint64
-
- if arg.Const() {
- argconst := r.ValueOf(arg.Value).Int()
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) int64)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(int64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(int64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Uint:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint) uint64
-
- if arg.Const() {
- argconst := uint(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uint)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(uint) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Uint8:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) uint64
-
- if arg.Const() {
- argconst := uint8(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uint8)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(uint8) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint8) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Uint16:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) uint64
-
- if arg.Const() {
- argconst := uint16(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uint16)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(uint16) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint16) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Uint32:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) uint64
-
- if arg.Const() {
- argconst := uint32(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uint32)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(uint32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Uint64:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64) uint64
-
- if arg.Const() {
- argconst := r.ValueOf(arg.Value).Uint()
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uint64)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(uint64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uint64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Uintptr:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) uint64
-
- if arg.Const() {
- argconst := uintptr(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uintptr)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(uintptr) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uintptr) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Float32:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) uint64
-
- if arg.Const() {
- argconst := float32(
-
- r.ValueOf(arg.Value).Float())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) float32)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(float32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(float32) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Float64:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) uint64
-
- if arg.Const() {
- argconst := r.ValueOf(arg.Value).Float()
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) float64)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(float64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(float64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Complex64:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) uint64
-
- if arg.Const() {
- argconst := complex64(
-
- r.ValueOf(arg.Value).Complex())
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) complex64)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(complex64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(complex64) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.Complex128:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) uint64
-
- if arg.Const() {
- argconst := r.ValueOf(arg.Value).Complex()
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) complex128)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(complex128) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(complex128) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- case r.String:
-
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string) uint64
-
- if arg.Const() {
- argconst := r.ValueOf(arg.Value).String()
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string) uint64)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) string)
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string) uint64)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) string)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uint64 {
- fun := env.Binds[funindex].Interface().(func(string) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uint64 {
- fun := env.Outer.Binds[funindex].Interface().(func(string) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(string) uint64)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- default:
- ret = func(env *Env) uint64 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.Uint()
- }
- }
-
- case r.Uintptr:
- if karg == kret {
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) uintptr
-
- if arg.Const() {
- argconst := uintptr(
-
- r.ValueOf(arg.Value).Uint())
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) uintptr)
- }
- return cachedfun(argconst)
- }
- } else {
- argfun := arg.Fun.(func(env *Env) uintptr)
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) uintptr)
- }
-
- arg := argfun(env)
- return cachedfun(arg)
- }
- }
- } else {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == 0 {
- ret = func(env *Env) uintptr {
- fun := env.Binds[funindex].Interface().(func(uintptr) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) uintptr {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uintptr) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- } else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(bool) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int:
-
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int8) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int16) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int32) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int64) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint8) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint16) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint32) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint64) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uintptr) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(float32) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(float64) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(complex64) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(complex128) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(string) uintptr)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- default:
- ret = func(env *Env) uintptr {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uintptr(ret0.Uint())
- }
- }
- }
-
- case r.Float32:
- if karg == kret {
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) float32
+ ) uint64
if arg.Const() {
- argconst := float32(
-
- r.ValueOf(arg.Value).Float())
+ argconst := r.ValueOf(arg.Value).Complex()
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) float32)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) float32)
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) complex128)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) float32)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) uint64)
}
arg := argfun(env)
@@ -6990,226 +6031,63 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) float32)
+ argfun := arg.WithFun().(func(env *Env) complex128)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) float32 {
- fun := env.Binds[funindex].Interface().(func(float32) float32)
- arg := argfun(env)
- return fun(arg)
- }
- } else if funsym != nil && funupn == 1 {
- ret = func(env *Env) float32 {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) float32)
- arg := argfun(env)
- return fun(arg)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(float32) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- }
- } else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(bool) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int:
-
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int8) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int16) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int32) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int64) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint8) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint16) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint32) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint64) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uintptr) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(float32) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
-
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(float64) float32)
- arg := argfun(env)
- return fun(arg)
- }
- }
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(complex128,
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(complex64) float32)
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
- }
+ } else if funsym != nil && funupn == 1 {
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(complex128,
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(complex128) float32)
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
- }
+ } else {
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(complex128,
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(string) float32)
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
- default:
- ret = func(env *Env) float32 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return float32(ret0.Float())
- }
}
- }
+ case r.String:
- case r.Float64:
- if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) float64
+ var cachedfun func(string,
+
+ ) uint64
if arg.Const() {
- argconst := r.ValueOf(arg.Value).Float()
+ argconst := r.ValueOf(arg.Value).String()
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) float64)
+ cachedfun = funv.Interface().(func(string,
+
+ ) uint64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) float64)
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) string)
+ ret = func(env *Env) uint64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) float64)
+ cachedfun = funv.Interface().(func(string,
+
+ ) uint64)
}
arg := argfun(env)
@@ -7217,228 +6095,155 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) float64)
+ argfun := arg.WithFun().(func(env *Env) string)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) float64 {
- fun := env.Binds[funindex].Interface().(func(float64) float64)
+ ret = func(env *Env) uint64 {
+ fun := env.Vals[funindex].Interface().(func(string,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) float64 {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) float64)
+ ret = func(env *Env) uint64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(string,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(float64) float64)
+ ret = func(env *Env) uint64 {
+ fun := exprfun(env).Interface().(func(string,
+
+ ) uint64)
arg := argfun(env)
return fun(arg)
}
}
}
- } else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(bool) float64)
- arg := argfun(env)
- return fun(arg)
- }
+ default:
+ ret = func(env *Env) uint64 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
- case r.Int:
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int8) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int16) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int32) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int64) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint8) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint16) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint32) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint64) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uintptr) float64)
- arg := argfun(env)
- return fun(arg)
- }
- }
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(float32) float64)
- arg := argfun(env)
- return fun(arg)
+ ret0 := funv.Call(argv)[0]
+ return ret0.Uint()
+ }
+ }
+
+ case r.Uintptr:
+ if karg == kret {
+ if funsym != nil && funupn == maxdepth-1 {
+ var cachedfun func(uintptr,
+
+ ) uintptr
+
+ if arg.Const() {
+ argconst := uintptr(
+
+ r.ValueOf(arg.Value).Uint())
+
+ ret = func(env *Env) uintptr {
+ funv := env.FileEnv.Vals[funindex]
+ if cachedfunv != funv {
+ cachedfunv = funv
+ cachedfun = funv.Interface().(func(
+
+ uintptr) uintptr)
+ }
+ return cachedfun(argconst)
}
- }
+ } else {
+ argfun := arg.Fun.(func(env *Env) uintptr)
+ ret = func(env *Env) uintptr {
+ funv := env.FileEnv.Vals[funindex]
+ if cachedfunv != funv {
+ cachedfunv = funv
+ cachedfun = funv.Interface().(func(
+
+ uintptr) uintptr)
+ }
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(float64) float64)
arg := argfun(env)
- return fun(arg)
+ return cachedfun(arg)
}
}
+ } else {
+ argfun := arg.WithFun().(func(env *Env) uintptr)
+ if funsym != nil && funupn == 0 {
+ ret = func(env *Env) uintptr {
+ fun := env.Vals[funindex].Interface().(func(uintptr,
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(complex64) float64)
+ ) uintptr)
arg := argfun(env)
return fun(arg)
}
- }
+ } else if funsym != nil && funupn == 1 {
+ ret = func(env *Env) uintptr {
+ fun := env.Outer.Vals[funindex].Interface().(func(uintptr,
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(complex128) float64)
+ ) uintptr)
arg := argfun(env)
return fun(arg)
}
- }
+ } else {
+ ret = func(env *Env) uintptr {
+ fun := exprfun(env).Interface().(func(uintptr,
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(string) float64)
+ ) uintptr)
arg := argfun(env)
return fun(arg)
}
}
- default:
- ret = func(env *Env) float64 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.Float()
+ }
+ } else {
+ ret = func(env *Env) uintptr {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
+
+ ret0 := funv.Call(argv)[0]
+ return uintptr(ret0.Uint())
}
}
- case r.Complex64:
+ case r.Float32:
if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) complex64
+ var cachedfun func(float32,
+
+ ) float32
if arg.Const() {
- argconst := complex64(
+ argconst := float32(
- r.ValueOf(arg.Value).Complex())
+ r.ValueOf(arg.Value).Float())
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) float32 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) complex64)
+ cachedfun = funv.Interface().(func(
+
+ float32) float32)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) complex64)
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) float32)
+ ret = func(env *Env) float32 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) complex64)
+ cachedfun = funv.Interface().(func(
+
+ float32) float32)
}
arg := argfun(env)
@@ -7446,22 +6251,28 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) complex64)
+ argfun := arg.WithFun().(func(env *Env) float32)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) complex64 {
- fun := env.Binds[funindex].Interface().(func(complex64) complex64)
+ ret = func(env *Env) float32 {
+ fun := env.Vals[funindex].Interface().(func(float32,
+
+ ) float32)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) complex64 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) complex64)
+ ret = func(env *Env) float32 {
+ fun := env.Outer.Vals[funindex].Interface().(func(float32,
+
+ ) float32)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(complex64) complex64)
+ ret = func(env *Env) float32 {
+ fun := exprfun(env).Interface().(func(float32,
+
+ ) float32)
arg := argfun(env)
return fun(arg)
}
@@ -7469,203 +6280,252 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
} else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(bool) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ ret = func(env *Env) float32 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
- case r.Int:
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ ret0 := funv.Call(argv)[0]
+ return float32(ret0.Float())
+ }
+ }
+
+ case r.Float64:
+ switch karg {
+ case r.Bool:
+
+ {
+ argfun := arg.WithFun().(func(env *Env) bool)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int8) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int:
+
+ {
+ argfun := arg.WithFun().(func(env *Env) int)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(int,
+
+ ) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int16) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int8:
+ {
+ argfun := arg.WithFun().(func(env *Env) int8)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int32) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int16:
+ {
+ argfun := arg.WithFun().(func(env *Env) int16)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int64) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int32:
+ {
+ argfun := arg.WithFun().(func(env *Env) int32)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int64:
+ {
+ argfun := arg.WithFun().(func(env *Env) int64)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(int64,
+ ) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint8) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(uint) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint16) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint8:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint8)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+ uint8) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint32) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint16:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint16)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ uint16) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint64) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint32:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint32)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ uint32) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uintptr) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint64:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint64)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ uint64) float64)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(float32) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uintptr:
+ {
+ argfun := arg.WithFun().(func(env *Env) uintptr)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ uintptr) float64)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
+ case r.Float32:
+ {
+ argfun := arg.WithFun().(func(env *Env) float32)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(float64) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ float32) float64)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(complex64) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ case r.Float64:
+ {
+ argfun := arg.WithFun().(func(env *Env) float64)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ float64) float64)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(complex128) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ case r.Complex64:
+ {
+ argfun := arg.WithFun().(func(env *Env) complex64)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ complex64) float64)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(string) complex64)
- arg := argfun(env)
- return fun(arg)
- }
+ case r.Complex128:
+ {
+ argfun := arg.WithFun().(func(env *Env) complex128)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ complex128) float64)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- default:
- ret = func(env *Env) complex64 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
+ case r.String:
+ {
+ argfun := arg.WithFun().(func(env *Env) string)
+ ret = func(env *Env) float64 {
+ fun := exprfun(env).Interface().(func(
+
+ string) float64)
+ arg := argfun(env)
+ return fun(arg)
+ }
+ }
- ret0 := funv.Call(argv)[0]
- return complex64(ret0.Complex())
+ default:
+ ret = func(env *Env) float64 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
+
+ ret0 := funv.Call(argv)[0]
+ return ret0.Float()
}
}
- case r.Complex128:
+ case r.Complex64:
if karg == kret {
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) complex128
+ var cachedfun func(complex64,
+
+ ) complex64
if arg.Const() {
- argconst := r.ValueOf(arg.Value).Complex()
+ argconst := complex64(
+
+ r.ValueOf(arg.Value).Complex())
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ ret = func(env *Env) complex64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) complex128)
+ cachedfun = funv.Interface().(func(
+
+ complex64) complex64)
}
return cachedfun(argconst)
}
} else {
- argfun := arg.Fun.(func(env *Env) complex128)
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ argfun := arg.Fun.(func(env *Env) complex64)
+ ret = func(env *Env) complex64 {
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) complex128)
+ cachedfun = funv.Interface().(func(
+
+ complex64) complex64)
}
arg := argfun(env)
@@ -7673,22 +6533,28 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
}
} else {
- argfun := arg.WithFun().(func(env *Env) complex128)
+ argfun := arg.WithFun().(func(env *Env) complex64)
if funsym != nil && funupn == 0 {
- ret = func(env *Env) complex128 {
- fun := env.Binds[funindex].Interface().(func(complex128) complex128)
+ ret = func(env *Env) complex64 {
+ fun := env.Vals[funindex].Interface().(func(complex64,
+
+ ) complex64)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
- ret = func(env *Env) complex128 {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) complex128)
+ ret = func(env *Env) complex64 {
+ fun := env.Outer.Vals[funindex].Interface().(func(complex64,
+
+ ) complex64)
arg := argfun(env)
return fun(arg)
}
} else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(complex128) complex128)
+ ret = func(env *Env) complex64 {
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ) complex64)
arg := argfun(env)
return fun(arg)
}
@@ -7696,177 +6562,218 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
}
} else {
- switch karg {
- case r.Bool:
-
- {
- argfun := arg.WithFun().(func(env *Env) bool)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(bool) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ ret = func(env *Env) complex64 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
- case r.Int:
- {
- argfun := arg.WithFun().(func(env *Env) int)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ ret0 := funv.Call(argv)[0]
+ return complex64(ret0.Complex())
+ }
+ }
+
+ case r.Complex128:
+ switch karg {
+ case r.Bool:
+
+ {
+ argfun := arg.WithFun().(func(env *Env) bool)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int8:
- {
- argfun := arg.WithFun().(func(env *Env) int8)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int8) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int:
+
+ {
+ argfun := arg.WithFun().(func(env *Env) int)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(int,
+
+ ) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int16:
- {
- argfun := arg.WithFun().(func(env *Env) int16)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int16) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int8:
+ {
+ argfun := arg.WithFun().(func(env *Env) int8)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int32:
- {
- argfun := arg.WithFun().(func(env *Env) int32)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int32) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int16:
+ {
+ argfun := arg.WithFun().(func(env *Env) int16)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Int64:
- {
- argfun := arg.WithFun().(func(env *Env) int64)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int64) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int32:
+ {
+ argfun := arg.WithFun().(func(env *Env) int32)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint:
- {
- argfun := arg.WithFun().(func(env *Env) uint)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Int64:
+ {
+ argfun := arg.WithFun().(func(env *Env) int64)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(int64,
+ ) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint8:
- {
- argfun := arg.WithFun().(func(env *Env) uint8)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint8) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(uint) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint16:
- {
- argfun := arg.WithFun().(func(env *Env) uint16)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint16) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint8:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint8)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+ uint8) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint32:
- {
- argfun := arg.WithFun().(func(env *Env) uint32)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint32) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint16:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint16)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+
+ uint16) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uint64:
- {
- argfun := arg.WithFun().(func(env *Env) uint64)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint64) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint32:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint32)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+
+ uint32) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Uintptr:
- {
- argfun := arg.WithFun().(func(env *Env) uintptr)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uintptr) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uint64:
+ {
+ argfun := arg.WithFun().(func(env *Env) uint64)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+
+ uint64) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
- case r.Float32:
- {
- argfun := arg.WithFun().(func(env *Env) float32)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(float32) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ }
+ case r.Uintptr:
+ {
+ argfun := arg.WithFun().(func(env *Env) uintptr)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+
+ uintptr) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
+ case r.Float32:
+ {
+ argfun := arg.WithFun().(func(env *Env) float32)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
- case r.Float64:
- {
- argfun := arg.WithFun().(func(env *Env) float64)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(float64) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ float32) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- case r.Complex64:
- {
- argfun := arg.WithFun().(func(env *Env) complex64)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(complex64) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ case r.Float64:
+ {
+ argfun := arg.WithFun().(func(env *Env) float64)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+
+ float64) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- case r.Complex128:
- {
- argfun := arg.WithFun().(func(env *Env) complex128)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(complex128) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ case r.Complex64:
+ {
+ argfun := arg.WithFun().(func(env *Env) complex64)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+
+ complex64) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- case r.String:
- {
- argfun := arg.WithFun().(func(env *Env) string)
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(string) complex128)
- arg := argfun(env)
- return fun(arg)
- }
+ case r.Complex128:
+ {
+ argfun := arg.WithFun().(func(env *Env) complex128)
+ ret = func(env *Env) complex128 {
+ fun := exprfun(env).Interface().(func(
+
+ complex128) complex128)
+ arg := argfun(env)
+ return fun(arg)
}
+ }
- default:
+ case r.String:
+ {
+ argfun := arg.WithFun().(func(env *Env) string)
ret = func(env *Env) complex128 {
- funv := exprfun(env)
- argv := []r.Value{
- argfun(env),
- }
+ fun := exprfun(env).Interface().(func(
+
+ string) complex128)
+ arg := argfun(env)
+ return fun(arg)
+ }
+ }
- ret0 := funv.Call(argv)[0]
- return ret0.Complex()
+ default:
+ ret = func(env *Env) complex128 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfun(env),
}
+
+ ret0 := funv.Call(argv)[0]
+ return ret0.Complex()
}
}
@@ -7875,25 +6782,31 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Bool:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool) string
+ var cachedfun func(bool,
+
+ ) string
if arg.Const() {
argconst := r.ValueOf(arg.Value).Bool()
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) string)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) bool)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool) string)
+ cachedfun = funv.Interface().(func(bool,
+
+ ) string)
}
arg := argfun(env)
@@ -7904,19 +6817,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) bool)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(bool) string)
+ fun := env.Vals[funindex].Interface().(func(bool,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(bool) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(bool,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(bool) string)
+ fun := exprfun(env).Interface().(func(bool,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -7926,27 +6845,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int) string
+ var cachedfun func(int,
+
+ ) string
if arg.Const() {
argconst := int(
r.ValueOf(arg.Value).Int())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) string)
+ cachedfun = funv.Interface().(func(int,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int) string)
+ cachedfun = funv.Interface().(func(int,
+
+ ) string)
}
arg := argfun(env)
@@ -7957,19 +6882,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(int) string)
+ fun := env.Vals[funindex].Interface().(func(int,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(int) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(int,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int) string)
+ fun := exprfun(env).Interface().(func(int,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -7979,27 +6910,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8) string
+ var cachedfun func(int8,
+
+ ) string
if arg.Const() {
argconst := int8(
r.ValueOf(arg.Value).Int())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) string)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int8)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8) string)
+ cachedfun = funv.Interface().(func(int8,
+
+ ) string)
}
arg := argfun(env)
@@ -8010,19 +6947,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int8)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(int8) string)
+ fun := env.Vals[funindex].Interface().(func(int8,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(int8) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(int8,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int8) string)
+ fun := exprfun(env).Interface().(func(int8,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8032,27 +6975,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16) string
+ var cachedfun func(int16,
+
+ ) string
if arg.Const() {
argconst := int16(
r.ValueOf(arg.Value).Int())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) string)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int16)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16) string)
+ cachedfun = funv.Interface().(func(int16,
+
+ ) string)
}
arg := argfun(env)
@@ -8063,19 +7012,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int16)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(int16) string)
+ fun := env.Vals[funindex].Interface().(func(int16,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(int16) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(int16,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int16) string)
+ fun := exprfun(env).Interface().(func(int16,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8085,27 +7040,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32) string
+ var cachedfun func(int32,
+
+ ) string
if arg.Const() {
argconst := int32(
r.ValueOf(arg.Value).Int())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) string)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int32)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32) string)
+ cachedfun = funv.Interface().(func(int32,
+
+ ) string)
}
arg := argfun(env)
@@ -8116,19 +7077,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(int32) string)
+ fun := env.Vals[funindex].Interface().(func(int32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(int32) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(int32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int32) string)
+ fun := exprfun(env).Interface().(func(int32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8138,25 +7105,31 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Int64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64) string
+ var cachedfun func(int64,
+
+ ) string
if arg.Const() {
argconst := r.ValueOf(arg.Value).Int()
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) string)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) int64)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64) string)
+ cachedfun = funv.Interface().(func(int64,
+
+ ) string)
}
arg := argfun(env)
@@ -8167,19 +7140,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) int64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(int64) string)
+ fun := env.Vals[funindex].Interface().(func(int64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(int64) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(int64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int64) string)
+ fun := exprfun(env).Interface().(func(int64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8189,27 +7168,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint) string
+ var cachedfun func(uint,
+
+ ) string
if arg.Const() {
argconst := uint(
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) string)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint) string)
+ cachedfun = funv.Interface().(func(uint,
+
+ ) string)
}
arg := argfun(env)
@@ -8220,19 +7205,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(uint) string)
+ fun := env.Vals[funindex].Interface().(func(uint,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(uint) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint) string)
+ fun := exprfun(env).Interface().(func(uint,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8242,27 +7233,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint8:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8) string
+ var cachedfun func(uint8,
+
+ ) string
if arg.Const() {
argconst := uint8(
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) string)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint8)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8) string)
+ cachedfun = funv.Interface().(func(uint8,
+
+ ) string)
}
arg := argfun(env)
@@ -8273,19 +7270,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint8)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(uint8) string)
+ fun := env.Vals[funindex].Interface().(func(uint8,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(uint8) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint8,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint8) string)
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8295,27 +7298,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint16:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16) string
+ var cachedfun func(uint16,
+
+ ) string
if arg.Const() {
argconst := uint16(
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) string)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint16)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16) string)
+ cachedfun = funv.Interface().(func(uint16,
+
+ ) string)
}
arg := argfun(env)
@@ -8326,19 +7335,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint16)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(uint16) string)
+ fun := env.Vals[funindex].Interface().(func(uint16,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(uint16) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint16,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint16) string)
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8348,27 +7363,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32) string
+ var cachedfun func(uint32,
+
+ ) string
if arg.Const() {
argconst := uint32(
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) string)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint32)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32) string)
+ cachedfun = funv.Interface().(func(uint32,
+
+ ) string)
}
arg := argfun(env)
@@ -8379,19 +7400,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(uint32) string)
+ fun := env.Vals[funindex].Interface().(func(uint32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(uint32) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint32) string)
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8401,25 +7428,31 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uint64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64) string
+ var cachedfun func(uint64,
+
+ ) string
if arg.Const() {
argconst := r.ValueOf(arg.Value).Uint()
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) string)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uint64)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64) string)
+ cachedfun = funv.Interface().(func(uint64,
+
+ ) string)
}
arg := argfun(env)
@@ -8430,19 +7463,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uint64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(uint64) string)
+ fun := env.Vals[funindex].Interface().(func(uint64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(uint64) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(uint64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint64) string)
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8452,27 +7491,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Uintptr:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr) string
+ var cachedfun func(uintptr,
+
+ ) string
if arg.Const() {
argconst := uintptr(
r.ValueOf(arg.Value).Uint())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) string)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) uintptr)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr) string)
+ cachedfun = funv.Interface().(func(uintptr,
+
+ ) string)
}
arg := argfun(env)
@@ -8483,19 +7528,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) uintptr)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(uintptr) string)
+ fun := env.Vals[funindex].Interface().(func(uintptr,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(uintptr) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(uintptr,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uintptr) string)
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8505,27 +7556,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float32:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32) string
+ var cachedfun func(float32,
+
+ ) string
if arg.Const() {
argconst := float32(
r.ValueOf(arg.Value).Float())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) string)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float32)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32) string)
+ cachedfun = funv.Interface().(func(float32,
+
+ ) string)
}
arg := argfun(env)
@@ -8536,19 +7593,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) float32)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(float32) string)
+ fun := env.Vals[funindex].Interface().(func(float32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(float32) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(float32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(float32) string)
+ fun := exprfun(env).Interface().(func(float32,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8558,25 +7621,31 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Float64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64) string
+ var cachedfun func(float64,
+
+ ) string
if arg.Const() {
argconst := r.ValueOf(arg.Value).Float()
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) string)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) float64)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64) string)
+ cachedfun = funv.Interface().(func(float64,
+
+ ) string)
}
arg := argfun(env)
@@ -8587,19 +7656,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) float64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(float64) string)
+ fun := env.Vals[funindex].Interface().(func(float64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(float64) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(float64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(float64) string)
+ fun := exprfun(env).Interface().(func(float64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8609,27 +7684,33 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex64:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64) string
+ var cachedfun func(complex64,
+
+ ) string
if arg.Const() {
argconst := complex64(
r.ValueOf(arg.Value).Complex())
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) string)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex64)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64) string)
+ cachedfun = funv.Interface().(func(complex64,
+
+ ) string)
}
arg := argfun(env)
@@ -8640,19 +7721,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) complex64)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(complex64) string)
+ fun := env.Vals[funindex].Interface().(func(complex64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(complex64) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(complex64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(complex64) string)
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8662,25 +7749,31 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.Complex128:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128) string
+ var cachedfun func(complex128,
+
+ ) string
if arg.Const() {
argconst := r.ValueOf(arg.Value).Complex()
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) string)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) complex128)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128) string)
+ cachedfun = funv.Interface().(func(complex128,
+
+ ) string)
}
arg := argfun(env)
@@ -8691,19 +7784,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) complex128)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(complex128) string)
+ fun := env.Vals[funindex].Interface().(func(complex128,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(complex128) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(complex128,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(complex128) string)
+ fun := exprfun(env).Interface().(func(complex128,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
@@ -8713,25 +7812,31 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
case r.String:
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string) string
+ var cachedfun func(string,
+
+ ) string
if arg.Const() {
argconst := r.ValueOf(arg.Value).String()
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) string)
+ cachedfun = funv.Interface().(func(string,
+
+ ) string)
}
return cachedfun(argconst)
}
} else {
argfun := arg.Fun.(func(env *Env) string)
ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string) string)
+ cachedfun = funv.Interface().(func(string,
+
+ ) string)
}
arg := argfun(env)
@@ -8742,19 +7847,25 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
argfun := arg.WithFun().(func(env *Env) string)
if funsym != nil && funupn == 0 {
ret = func(env *Env) string {
- fun := env.Binds[funindex].Interface().(func(string) string)
+ fun := env.Vals[funindex].Interface().(func(string,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) string {
- fun := env.Outer.Binds[funindex].Interface().(func(string) string)
+ fun := env.Outer.Vals[funindex].Interface().(func(string,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
} else {
ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(string) string)
+ fun := exprfun(env).Interface().(func(string,
+
+ ) string)
arg := argfun(env)
return fun(arg)
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call1ret1.gomacro b/vendor/github.com/cosmos72/gomacro/fast/call1ret1.gomacro
index 7b6aa7a..84ca9c1 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call1ret1.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/call1ret1.gomacro
@@ -1,22 +1,11 @@
-// +build !gomacro_fast_compact
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call1ret1.go
@@ -131,7 +120,7 @@ import (
if arg.Const() {
argconst := ~,argconv
ret = func(env *Env) ~,rettyp {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
~,cachefun
// Debugf("calling %v with args [%v]", r.TypeOf(cachedfun), argconst)
return cachedfun(argconst)
@@ -139,7 +128,7 @@ import (
} else {
argfun := arg.Fun.(func(env *Env) ~,argtyp)
ret = func(env *Env) ~,rettyp {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
~,cachefun
arg := argfun(env)
// Debugf("calling %v with args [%v]", r.TypeOf(fun), arg)
@@ -150,14 +139,14 @@ import (
argfun := arg.WithFun().(func(env *Env) ~,argtyp)
if funsym != nil && funupn == 0 {
ret = func(env *Env) ~,rettyp {
- fun := env.Binds[funindex].Interface().(func(~,argtyp) ~,rettyp)
+ fun := env.Vals[funindex].Interface().(func(~,argtyp) ~,rettyp)
arg := argfun(env)
// Debugf("calling %v with args [%v]", r.TypeOf(fun), arg)
return fun(arg)
}
} else if funsym != nil && funupn == 1 {
ret = func(env *Env) ~,rettyp {
- fun := env.Outer.Binds[funindex].Interface().(func(~,argtyp) ~,rettyp)
+ fun := env.Outer.Vals[funindex].Interface().(func(~,argtyp) ~,rettyp)
arg := argfun(env)
// Debugf("calling %v with args [%v]", r.TypeOf(fun), arg)
return fun(arg)
@@ -241,6 +230,16 @@ import (
}
}
+:macro mcallx1ret1minimal(rettyp ast.Node) ast.Node {
+ return ~"{
+ if karg == kret {
+ mcall1ret1; ~,rettyp; ~,rettyp
+ } else {
+ mcall1ret1; nil; ~,rettyp
+ }
+ }
+}
+
func (c *Comp) call1ret1(call *Call, maxdepth int) I {
expr := call.Fun
exprfun := expr.AsX1()
@@ -266,23 +265,23 @@ func (c *Comp) call1ret1(call *Call, maxdepth int) I {
switch kret {
// do NOT optimize all cases... too many combinations
- case r.Bool: {mcallx1ret1; bool}
- case r.Int: {mcallx1ret1; int}
- case r.Int8: if karg == kret {mcall1ret1; int8; int8} else {mcallx1ret1compact; int8}
- case r.Int16: if karg == kret {mcall1ret1; int16; int16} else {mcallx1ret1compact; int16}
- case r.Int32: {mcallx1ret1; int32}
- case r.Int64: {mcallx1ret1; int64}
- case r.Uint: {mcallx1ret1; uint}
- case r.Uint8: if karg == kret {mcall1ret1; uint8; uint8} else {mcallx1ret1compact; uint8}
- case r.Uint16: if karg == kret {mcall1ret1; uint16; uint16} else {mcallx1ret1compact; uint16}
- case r.Uint32: if karg == kret {mcall1ret1; uint32; uint32} else {mcallx1ret1compact; uint32}
- case r.Uint64: {mcallx1ret1; uint64}
- case r.Uintptr: if karg == kret {mcall1ret1; uintptr; uintptr} else {mcallx1ret1compact; uintptr}
- case r.Float32: if karg == kret {mcall1ret1; float32; float32} else {mcallx1ret1compact; float32}
- case r.Float64: if karg == kret {mcall1ret1; float64; float64} else {mcallx1ret1compact; float64}
- case r.Complex64: if karg == kret {mcall1ret1; complex64; complex64} else {mcallx1ret1compact; complex64}
- case r.Complex128:if karg == kret {mcall1ret1; complex128; complex128} else {mcallx1ret1compact; complex128}
- case r.String: {mcallx1ret1; string}
+ case r.Bool: {mcallx1ret1; bool}
+ case r.Int: {mcallx1ret1; int}
+ case r.Int8: {mcallx1ret1minimal; int8}
+ case r.Int16: {mcallx1ret1minimal; int16}
+ case r.Int32: {mcallx1ret1minimal; int32}
+ case r.Int64: {mcallx1ret1; int64}
+ case r.Uint: {mcallx1ret1; uint}
+ case r.Uint8: {mcallx1ret1minimal; uint8}
+ case r.Uint16: {mcallx1ret1minimal; uint16}
+ case r.Uint32: {mcallx1ret1minimal; uint32}
+ case r.Uint64: {mcallx1ret1; uint64}
+ case r.Uintptr: {mcallx1ret1minimal; uintptr}
+ case r.Float32: {mcallx1ret1minimal; float32}
+ case r.Float64: {mcallx1ret1compact; float64}
+ case r.Complex64: {mcallx1ret1minimal; complex64}
+ case r.Complex128:{mcallx1ret1compact; complex128}
+ case r.String: {mcallx1ret1; string}
}
if ret == nil {
{mcall1ret1; nil; nil} // cannot optimize more this one...
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call2ret1.go b/vendor/github.com/cosmos72/gomacro/fast/call2ret1.go
index 0ad68bd..da35292 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call2ret1.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/call2ret1.go
@@ -1,30 +1,14 @@
-// -------------------------------------------------------------
-// DO NOT EDIT! this file was generated automatically by gomacro
-// Any change will be lost when the file is re-generated
-// -------------------------------------------------------------
-
-// +build !gomacro_fast_compact
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
- * call_ret1.go
+ * call2ret1.go
*
* Created on Apr 15, 2017
* Author Massimiliano Ghilardi
@@ -34,8787 +18,200 @@ package fast
import (
r "reflect"
+
. "github.com/cosmos72/gomacro/base"
)
func (c *Comp) call2ret1(call *Call, maxdepth int) I {
- expr := call.Fun
- exprfun := expr.AsX1()
- funsym := expr.Sym
- funupn, funindex := -1, -1
- if funsym != nil {
- funupn = funsym.Upn
- funindex = funsym.Desc.Index()
- if funindex == NoIndex {
- Errorf("internal error: call2ret1() invoked for constant function %#v. use call_builtin() instead", expr)
- }
+ expr := call.Fun
+ if expr.Sym != nil && expr.Sym.Desc.Index() == NoIndex {
+ Errorf("internal error: call2ret1() invoked for constant function %#v. use call_builtin() instead", expr)
}
t := expr.Type
- rtarg0, rtarg1, rtret := t.In(0).ReflectType(), t.In(1).ReflectType(), t.Out(0).ReflectType()
- karg0, kret := rtarg0.Kind(), rtret.Kind()
- args := call.Args
+ rtout := t.Out(0).ReflectType()
+ kout := rtout.Kind()
+
+ exprfun := expr.AsX1()
argfunsX1 := call.MakeArgfunsX1()
argfuns := [2]func(*Env) r.Value{
argfunsX1[0],
argfunsX1[1],
}
- var cachedfunv r.Value
- var ret I
- if KindToType(kret) == rtret {
- switch kret {
- case r.Bool:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(bool, bool) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int, int) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int8, int8) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int16, int16) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int32, int32) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(int64, int64) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint, uint) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint8, uint8) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint16, uint16) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint32, uint32) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uint64, uint64) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(float32, float32) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(float64, float64) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(complex64, complex64) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(complex128, complex128) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) bool
-
- ret = func(env *Env) bool {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) bool)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) bool {
- fun := exprfun(env).Interface().(func(string, string) bool)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) bool {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.Bool()
- }
- }
+ var ret I
+ switch kout {
+ case r.Bool:
+ ret = func(env *Env) bool {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
- case r.Int:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(bool, bool) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int, int) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int8, int8) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int16, int16) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int32, int32) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(int64, int64) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint, uint) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint8, uint8) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint16, uint16) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint32, uint32) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uint64, uint64) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(float32, float32) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(float64, float64) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(complex64, complex64) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(complex128, complex128) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) int
-
- ret = func(env *Env) int {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) int)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int {
- fun := exprfun(env).Interface().(func(string, string) int)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) int {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return int(ret0.Int())
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return ret0.Bool()
+ }
+ case r.Int:
+ ret = func(env *Env) int {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
- case r.Int8:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(bool, bool) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int, int) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int8, int8) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int16, int16) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int32, int32) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(int64, int64) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint, uint) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint8, uint8) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint16, uint16) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint32, uint32) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uint64, uint64) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(float32, float32) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(float64, float64) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(complex64, complex64) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(complex128, complex128) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) int8
-
- ret = func(env *Env) int8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) int8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int8 {
- fun := exprfun(env).Interface().(func(string, string) int8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) int8 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return int8(ret0.Int())
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return int(ret0.Int())
+ }
+ case r.Int8:
+ ret = func(env *Env) int8 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
- case r.Int16:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(bool, bool) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int, int) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int8, int8) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int16, int16) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int32, int32) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(int64, int64) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint, uint) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint8, uint8) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint16, uint16) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint32, uint32) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uint64, uint64) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(float32, float32) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(float64, float64) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(complex64, complex64) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(complex128, complex128) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) int16
-
- ret = func(env *Env) int16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) int16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int16 {
- fun := exprfun(env).Interface().(func(string, string) int16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) int16 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return int16(ret0.Int())
- }
- }
-
- }
- case r.Int32:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(bool, bool) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int, int) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int8, int8) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int16, int16) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int32, int32) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(int64, int64) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint, uint) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint8, uint8) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint16, uint16) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint32, uint32) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uint64, uint64) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(float32, float32) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(float64, float64) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(complex64, complex64) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(complex128, complex128) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) int32
-
- ret = func(env *Env) int32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) int32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int32 {
- fun := exprfun(env).Interface().(func(string, string) int32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) int32 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return int32(ret0.Int())
- }
- }
-
- }
- case r.Int64:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(bool, bool) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int, int) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int8, int8) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int16, int16) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int32, int32) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(int64, int64) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint, uint) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint8, uint8) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint16, uint16) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint32, uint32) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uint64, uint64) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(float32, float32) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(float64, float64) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(complex64, complex64) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(complex128, complex128) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) int64
-
- ret = func(env *Env) int64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) int64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) int64 {
- fun := exprfun(env).Interface().(func(string, string) int64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) int64 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.Int()
- }
- }
-
- }
- case r.Uint:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(bool, bool) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int, int) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int8, int8) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int16, int16) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int32, int32) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(int64, int64) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint, uint) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint8, uint8) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint16, uint16) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint32, uint32) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uint64, uint64) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(float32, float32) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(float64, float64) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(complex64, complex64) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(complex128, complex128) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) uint
-
- ret = func(env *Env) uint {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) uint)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint {
- fun := exprfun(env).Interface().(func(string, string) uint)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) uint {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint(ret0.Uint())
- }
- }
-
- }
- case r.Uint8:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(bool, bool) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int, int) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int8, int8) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int16, int16) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int32, int32) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(int64, int64) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint, uint) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint8, uint8) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint16, uint16) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint32, uint32) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uint64, uint64) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(float32, float32) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(float64, float64) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(complex64, complex64) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(complex128, complex128) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) uint8
-
- ret = func(env *Env) uint8 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) uint8)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint8 {
- fun := exprfun(env).Interface().(func(string, string) uint8)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) uint8 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint8(ret0.Uint())
- }
- }
-
- }
-
- case r.Uint16:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(bool, bool) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int, int) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int8, int8) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int16, int16) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int32, int32) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(int64, int64) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint, uint) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint8, uint8) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint16, uint16) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint32, uint32) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uint64, uint64) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(float32, float32) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(float64, float64) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(complex64, complex64) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(complex128, complex128) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) uint16
-
- ret = func(env *Env) uint16 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) uint16)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint16 {
- fun := exprfun(env).Interface().(func(string, string) uint16)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) uint16 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint16(ret0.Uint())
- }
- }
-
- }
-
- case r.Uint32:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(bool, bool) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int, int) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int8, int8) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int16, int16) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int32, int32) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(int64, int64) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint, uint) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint8, uint8) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint16, uint16) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint32, uint32) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uint64, uint64) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(float32, float32) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(float64, float64) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(complex64, complex64) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(complex128, complex128) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) uint32
-
- ret = func(env *Env) uint32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) uint32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint32 {
- fun := exprfun(env).Interface().(func(string, string) uint32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) uint32 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uint32(ret0.Uint())
- }
- }
-
- }
-
- case r.Uint64:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(bool, bool) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int, int) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int8, int8) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int16, int16) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int32, int32) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(int64, int64) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint, uint) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint8, uint8) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint16, uint16) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint32, uint32) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uint64, uint64) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(float32, float32) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(float64, float64) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(complex64, complex64) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(complex128, complex128) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) uint64
-
- ret = func(env *Env) uint64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) uint64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uint64 {
- fun := exprfun(env).Interface().(func(string, string) uint64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) uint64 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.Uint()
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return int8(ret0.Int())
+ }
+ case r.Int16:
+ ret = func(env *Env) int16 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
-
- case r.Uintptr:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(bool, bool) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int, int) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int8, int8) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int16, int16) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int32, int32) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(int64, int64) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint, uint) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint8, uint8) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint16, uint16) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint32, uint32) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uint64, uint64) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(float32, float32) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(float64, float64) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(complex64, complex64) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(complex128, complex128) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) uintptr
-
- ret = func(env *Env) uintptr {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) uintptr)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) uintptr {
- fun := exprfun(env).Interface().(func(string, string) uintptr)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) uintptr {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return uintptr(ret0.Uint())
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return int16(ret0.Int())
+ }
+ case r.Int32:
+ ret = func(env *Env) int32 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
-
- case r.Float32:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(bool, bool) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int, int) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int8, int8) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int16, int16) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int32, int32) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(int64, int64) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint, uint) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint8, uint8) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint16, uint16) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint32, uint32) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uint64, uint64) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(float32, float32) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(float64, float64) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(complex64, complex64) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(complex128, complex128) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) float32
-
- ret = func(env *Env) float32 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) float32)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float32 {
- fun := exprfun(env).Interface().(func(string, string) float32)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) float32 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return float32(ret0.Float())
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return int32(ret0.Int())
+ }
+ case r.Int64:
+ ret = func(env *Env) int64 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
-
- case r.Float64:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(bool, bool) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int, int) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int8, int8) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int16, int16) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int32, int32) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(int64, int64) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint, uint) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint8, uint8) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint16, uint16) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint32, uint32) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uint64, uint64) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(float32, float32) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(float64, float64) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(complex64, complex64) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(complex128, complex128) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) float64
-
- ret = func(env *Env) float64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) float64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) float64 {
- fun := exprfun(env).Interface().(func(string, string) float64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) float64 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.Float()
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return ret0.Int()
+ }
+ case r.Uint:
+ ret = func(env *Env) uint {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
+ }
+ ret0 := funv.Call(argv)[0]
+ return uint(ret0.Uint())
+ }
+ case r.Uint8:
+ ret = func(env *Env) uint8 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
+ }
+ ret0 := funv.Call(argv)[0]
+ return uint8(ret0.Uint())
+ }
+ case r.Uint16:
+ ret = func(env *Env) uint16 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
+ }
+ ret0 := funv.Call(argv)[0]
+ return uint16(ret0.Uint())
+ }
+ case r.Uint32:
+ ret = func(env *Env) uint32 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
+ }
+ ret0 := funv.Call(argv)[0]
+ return uint32(ret0.Uint())
+ }
+ case r.Uint64:
+ ret = func(env *Env) uint64 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
-
- case r.Complex64:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(bool, bool) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int, int) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int8, int8) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int16, int16) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int32, int32) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(int64, int64) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint, uint) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint8, uint8) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint16, uint16) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint32, uint32) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uint64, uint64) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(float32, float32) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(float64, float64) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(complex64, complex64) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(complex128, complex128) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) complex64
-
- ret = func(env *Env) complex64 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) complex64)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex64 {
- fun := exprfun(env).Interface().(func(string, string) complex64)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) complex64 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return complex64(ret0.Complex())
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return ret0.Uint()
+ }
+ case r.Uintptr:
+ ret = func(env *Env) uintptr {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
-
- case r.Complex128:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(bool, bool) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int, int) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int8, int8) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int16, int16) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int32, int32) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(int64, int64) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint, uint) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint8, uint8) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint16, uint16) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint32, uint32) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uint64, uint64) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(float32, float32) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(float64, float64) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(complex64, complex64) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(complex128, complex128) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) complex128
-
- ret = func(env *Env) complex128 {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) complex128)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) complex128 {
- fun := exprfun(env).Interface().(func(string, string) complex128)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) complex128 {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.Complex()
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return uintptr(ret0.Uint())
+ }
+ case r.Float32:
+ ret = func(env *Env) float32 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
-
- case r.String:
- {
- if rtarg0 == rtarg1 && KindToType(karg0) == rtarg0 {
- switch karg0 {
- case r.Bool:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) bool)
- arg1fun := args[1].WithFun().(func(env *Env) bool)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(bool, bool) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int)
- arg1fun := args[1].WithFun().(func(env *Env) int)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int, int) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int8)
- arg1fun := args[1].WithFun().(func(env *Env) int8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8, int8) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int8, int8) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int16)
- arg1fun := args[1].WithFun().(func(env *Env) int16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int16, int16) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int32)
- arg1fun := args[1].WithFun().(func(env *Env) int32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int32, int32) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Int64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) int64)
- arg1fun := args[1].WithFun().(func(env *Env) int64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(int64, int64) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint)
- arg1fun := args[1].WithFun().(func(env *Env) uint)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint, uint) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint8:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint8)
- arg1fun := args[1].WithFun().(func(env *Env) uint8)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint8, uint8) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint16:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint16)
- arg1fun := args[1].WithFun().(func(env *Env) uint16)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint16, uint16) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint32)
- arg1fun := args[1].WithFun().(func(env *Env) uint32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint32, uint32) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uint64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uint64)
- arg1fun := args[1].WithFun().(func(env *Env) uint64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uint64, uint64) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Uintptr:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) uintptr)
- arg1fun := args[1].WithFun().(func(env *Env) uintptr)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(uintptr, uintptr) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float32:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float32)
- arg1fun := args[1].WithFun().(func(env *Env) float32)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(float32, float32) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Float64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) float64)
- arg1fun := args[1].WithFun().(func(env *Env) float64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(float64, float64) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex64:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex64)
- arg1fun := args[1].WithFun().(func(env *Env) complex64)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(complex64, complex64) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.Complex128:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) complex128)
- arg1fun := args[1].WithFun().(func(env *Env) complex128)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(complex128, complex128) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- case r.String:
-
- {
- arg0fun := args[0].WithFun().(func(env *Env) string)
- arg1fun := args[1].WithFun().(func(env *Env) string)
- if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string) string
-
- ret = func(env *Env) string {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
- if cachedfunv != funv {
- cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string) string)
- }
-
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return cachedfun(arg0, arg1)
- }
- } else {
- ret = func(env *Env) string {
- fun := exprfun(env).Interface().(func(string, string) string)
- arg0 := arg0fun(env)
- arg1 := arg1fun(env)
- return fun(arg0, arg1)
- }
- }
-
- }
- }
- }
-
- if ret == nil {
- ret = func(env *Env) string {
- funv := exprfun(env)
- argv := []r.Value{
- argfuns[0](env),
- argfuns[1](env),
- }
-
- ret0 := funv.Call(argv)[0]
- return ret0.String()
- }
- }
-
+ ret0 := funv.Call(argv)[0]
+ return float32(ret0.Float())
+ }
+ case r.Float64:
+ ret = func(env *Env) float64 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
}
-
+ ret0 := funv.Call(argv)[0]
+ return ret0.Float()
}
- }
-
- if ret == nil {
+ case r.Complex64:
+ ret = func(env *Env) complex64 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
+ }
+ ret0 := funv.Call(argv)[0]
+ return complex64(ret0.Complex())
+ }
+ case r.Complex128:
+ ret = func(env *Env) complex128 {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
+ }
+ ret0 := funv.Call(argv)[0]
+ return ret0.Complex()
+ }
+ case r.String:
+ ret = func(env *Env) string {
+ funv := exprfun(env)
+ argv := []r.Value{
+ argfuns[0](env),
+ argfuns[1](env),
+ }
+ ret0 := funv.Call(argv)[0]
+ return ret0.String()
+ }
+ default:
ret = func(env *Env) r.Value {
funv := exprfun(env)
argv := []r.Value{
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call2ret1compact.go b/vendor/github.com/cosmos72/gomacro/fast/call2ret1compact.go
deleted file mode 100644
index e1663ba..0000000
--- a/vendor/github.com/cosmos72/gomacro/fast/call2ret1compact.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// +build gomacro_fast_compact
-
-/*
- * gomacro - A Go interpreter with Lisp-like macros
- *
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * call1ret1compact.go
- *
- * Created on Jun 14, 2017
- * Author Massimiliano Ghilardi
- */
-
-package fast
-
-func (c *Comp) call2ret1(call *Call, maxdepth int) I {
- return c.callnret1(call, maxdepth)
-}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call_ellipsis.go b/vendor/github.com/cosmos72/gomacro/fast/call_ellipsis.go
index f0bc691..aac410a 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call_ellipsis.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/call_ellipsis.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call_ellipsis.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call_multivalue.go b/vendor/github.com/cosmos72/gomacro/fast/call_multivalue.go
index d706bde..b9a9bb0 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call_multivalue.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/call_multivalue.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call_multivalue.go
@@ -34,7 +25,7 @@ func call_multivalue(call *Call, maxdepth int) I {
// no need to special case variadic functions here
expr := call.Fun
exprfun := expr.AsX1()
- argfun := call.Args[0].AsXV(OptDefaults)
+ argfun := call.Args[0].AsXV(COptDefaults)
nout := len(call.OutTypes)
var ret I
switch nout {
@@ -82,7 +73,7 @@ func call_multivalue(call *Call, maxdepth int) I {
// returning bool, int, uint, float, complex, string do NOT wrap them in reflect.Value
func call_multivalue_ret1(call *Call, maxdepth int) I {
exprfun := call.Fun.AsX1()
- argfun := call.Args[0].AsXV(OptDefaults)
+ argfun := call.Args[0].AsXV(COptDefaults)
kout := call.OutTypes[0].Kind()
var ret I
switch kout {
@@ -219,7 +210,7 @@ func call_multivalue_ret1(call *Call, maxdepth int) I {
// returning bool, int, uint, float, complex, string do NOT wrap them in reflect.Value
func call_multivalue_ellipsis_ret1(call *Call, maxdepth int) I {
exprfun := call.Fun.AsX1()
- argfun := call.Args[0].AsXV(OptDefaults)
+ argfun := call.Args[0].AsXV(COptDefaults)
kout := call.OutTypes[0].Kind()
var ret I
switch kout {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/call_variadic.go b/vendor/github.com/cosmos72/gomacro/fast/call_variadic.go
index c123965..36a5631 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/call_variadic.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/call_variadic.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* call_variadic.go
@@ -72,8 +63,7 @@ func call_variadic_ret0(c *Call, maxdepth int) func(env *Env) {
}
funv.Call(argv)
}
- }
- if call == nil {
+ default:
call = func(env *Env) {
funv := exprfun(env)
argv := make([]r.Value, len(argfunsX1))
diff --git a/vendor/github.com/cosmos72/gomacro/fast/callnret0.go b/vendor/github.com/cosmos72/gomacro/fast/callnret0.go
index 365193c..0b558dd 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/callnret0.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/callnret0.go
@@ -3,25 +3,14 @@
// Any change will be lost when the file is re-generated
// -------------------------------------------------------------
-// +build !gomacro_fast_compact
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* callnret0.go
@@ -56,7 +45,7 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
switch funupn {
case maxdepth - 1:
return func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
cachedfun = funv.Interface().(func())
@@ -65,17 +54,17 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
}
case 0:
return func(env *Env) {
- fun := env.Binds[funindex].Interface().(func())
+ fun := env.Vals[funindex].Interface().(func())
fun()
}
case 1:
return func(env *Env) {
- fun := env.Outer.Binds[funindex].Interface().(func())
+ fun := env.Outer.Vals[funindex].Interface().(func())
fun()
}
case 2:
return func(env *Env) {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func())
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func())
fun()
}
default:
@@ -85,7 +74,7 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
env = env.Outer
}
- fun := env.Binds[funindex].Interface().(func())
+ fun := env.Vals[funindex].Interface().(func())
fun()
}
}
@@ -118,20 +107,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := r.ValueOf(arg.Value).Bool()
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool)
+ var cachedfun func(bool,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool))
+ cachedfun = funv.Interface().(func(
+
+ bool))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(bool))
+ fun := exprfun(env).Interface().(func(bool,
+
+ ))
fun(argconst)
}
@@ -140,13 +134,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) bool)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool)
+ var cachedfun func(bool,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool))
+ cachedfun = funv.Interface().(func(
+
+ bool))
}
arg := argfun(env)
@@ -155,7 +152,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(bool))
+ fun := exprfun(env).Interface().(func(bool,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -168,20 +167,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := int(r.ValueOf(arg.Value).Int())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int)
+ var cachedfun func(int,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int))
+ cachedfun = funv.Interface().(func(
+
+ int))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int))
+ fun := exprfun(env).Interface().(func(int,
+
+ ))
fun(argconst)
}
@@ -190,13 +194,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) int)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int)
+ var cachedfun func(int,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int))
+ cachedfun = funv.Interface().(func(
+
+ int))
}
arg := argfun(env)
@@ -205,7 +212,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int))
+ fun := exprfun(env).Interface().(func(int,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -217,20 +226,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := int8(r.ValueOf(arg.Value).Int())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8)
+ var cachedfun func(int8,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8))
+ cachedfun = funv.Interface().(func(
+
+ int8))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int8))
+ fun := exprfun(env).Interface().(func(int8,
+
+ ))
fun(argconst)
}
@@ -239,13 +253,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) int8)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int8)
+ var cachedfun func(int8,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8))
+ cachedfun = funv.Interface().(func(
+
+ int8))
}
arg := argfun(env)
@@ -254,7 +271,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int8))
+ fun := exprfun(env).Interface().(func(int8,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -266,20 +285,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := int16(r.ValueOf(arg.Value).Int())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16)
+ var cachedfun func(int16,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16))
+ cachedfun = funv.Interface().(func(
+
+ int16))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int16))
+ fun := exprfun(env).Interface().(func(int16,
+
+ ))
fun(argconst)
}
@@ -288,13 +312,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) int16)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16)
+ var cachedfun func(int16,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16))
+ cachedfun = funv.Interface().(func(
+
+ int16))
}
arg := argfun(env)
@@ -303,7 +330,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int16))
+ fun := exprfun(env).Interface().(func(int16,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -315,20 +344,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := int32(r.ValueOf(arg.Value).Int())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32)
+ var cachedfun func(int32,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32))
+ cachedfun = funv.Interface().(func(
+
+ int32))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int32))
+ fun := exprfun(env).Interface().(func(int32,
+
+ ))
fun(argconst)
}
@@ -337,13 +371,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) int32)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32)
+ var cachedfun func(int32,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32))
+ cachedfun = funv.Interface().(func(
+
+ int32))
}
arg := argfun(env)
@@ -352,7 +389,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int32))
+ fun := exprfun(env).Interface().(func(int32,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -364,20 +403,24 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := r.ValueOf(arg.Value).Int()
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64)
-
+ var cachedfun func(int64,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64))
+ cachedfun = funv.Interface().(func(
+
+ int64))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int64))
+ fun := exprfun(env).Interface().(func(int64,
+
+ ))
fun(argconst)
}
@@ -386,13 +429,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) int64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64)
+ var cachedfun func(int64,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64))
+ cachedfun = funv.Interface().(func(
+
+ int64))
}
arg := argfun(env)
@@ -401,7 +447,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int64))
+ fun := exprfun(env).Interface().(func(int64,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -417,17 +465,21 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if funsym != nil && funupn == maxdepth-1 {
var cachedfun func(uint)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint))
+ cachedfun = funv.Interface().(func(
+
+ uint))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint))
+ fun := exprfun(env).Interface().(func(uint,
+
+ ))
fun(argconst)
}
@@ -436,13 +488,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) uint)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint)
+ var cachedfun func(uint,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint))
+ cachedfun = funv.Interface().(func(
+
+ uint))
}
arg := argfun(env)
@@ -451,7 +506,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint))
+ fun := exprfun(env).Interface().(func(uint,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -465,19 +522,24 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
uint8(r.ValueOf(arg.Value).Uint())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8)
+ var cachedfun func(
+ uint8)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8))
+ cachedfun = funv.Interface().(func(
+
+ uint8))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint8))
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ))
fun(argconst)
}
@@ -486,13 +548,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) uint8)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8)
+ var cachedfun func(uint8,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8))
+ cachedfun = funv.Interface().(func(
+
+ uint8))
}
arg := argfun(env)
@@ -501,7 +566,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint8))
+ fun := exprfun(env).Interface().(func(uint8,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -515,19 +582,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
uint16(r.ValueOf(arg.Value).Uint())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16)
+ var cachedfun func(
+
+ uint16)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16))
+ cachedfun = funv.Interface().(func(
+
+ uint16))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint16))
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ))
fun(argconst)
}
@@ -536,13 +609,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) uint16)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16)
+ var cachedfun func(uint16,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16))
+ cachedfun = funv.Interface().(func(
+
+ uint16))
}
arg := argfun(env)
@@ -551,7 +627,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint16))
+ fun := exprfun(env).Interface().(func(uint16,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -565,19 +643,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
uint32(r.ValueOf(arg.Value).Uint())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32)
+ var cachedfun func(
+
+ uint32)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32))
+ cachedfun = funv.Interface().(func(
+
+ uint32))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint32))
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ))
fun(argconst)
}
@@ -586,13 +670,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) uint32)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32)
+ var cachedfun func(uint32,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32))
+ cachedfun = funv.Interface().(func(
+
+ uint32))
}
arg := argfun(env)
@@ -601,7 +688,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint32))
+ fun := exprfun(env).Interface().(func(uint32,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -613,19 +702,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := r.ValueOf(arg.Value).Uint()
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64)
+ var cachedfun func(
+
+ uint64)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64))
+ cachedfun = funv.Interface().(func(
+
+ uint64))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint64))
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ))
fun(argconst)
}
@@ -634,13 +729,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) uint64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64)
+ var cachedfun func(uint64,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64))
+ cachedfun = funv.Interface().(func(
+
+ uint64))
}
arg := argfun(env)
@@ -649,7 +747,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint64))
+ fun := exprfun(env).Interface().(func(uint64,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -663,19 +763,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
uintptr(r.ValueOf(arg.Value).Uint())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr)
+ var cachedfun func(
+
+ uintptr)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr))
+ cachedfun = funv.Interface().(func(
+
+ uintptr))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uintptr))
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ))
fun(argconst)
}
@@ -684,13 +790,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) uintptr)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr)
+ var cachedfun func(uintptr,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr))
+ cachedfun = funv.Interface().(func(
+
+ uintptr))
}
arg := argfun(env)
@@ -699,7 +808,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uintptr))
+ fun := exprfun(env).Interface().(func(uintptr,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -713,19 +824,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
float32(r.ValueOf(arg.Value).Float())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32)
+ var cachedfun func(
+
+ float32)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32))
+ cachedfun = funv.Interface().(func(
+
+ float32))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(float32))
+ fun := exprfun(env).Interface().(func(float32,
+
+ ))
fun(argconst)
}
@@ -734,13 +851,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) float32)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32)
+ var cachedfun func(float32,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32))
+ cachedfun = funv.Interface().(func(
+
+ float32))
}
arg := argfun(env)
@@ -749,7 +869,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(float32))
+ fun := exprfun(env).Interface().(func(float32,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -761,19 +883,25 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := r.ValueOf(arg.Value).Float()
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64)
+ var cachedfun func(
+
+ float64)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64))
+ cachedfun = funv.Interface().(func(
+
+ float64))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(float64))
+ fun := exprfun(env).Interface().(func(float64,
+
+ ))
fun(argconst)
}
@@ -782,13 +910,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) float64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64)
+ var cachedfun func(float64,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64))
+ cachedfun = funv.Interface().(func(
+
+ float64))
}
arg := argfun(env)
@@ -797,7 +928,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(float64))
+ fun := exprfun(env).Interface().(func(float64,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -811,19 +944,24 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
complex64(r.ValueOf(arg.Value).Complex())
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64)
+ var cachedfun func(
+
+ complex64)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64))
+ cachedfun = funv.Interface().(func(
+
+ complex64))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(complex64))
+ fun := exprfun(env).Interface().(func(complex64,
+ ))
fun(argconst)
}
@@ -832,13 +970,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) complex64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64)
+ var cachedfun func(complex64,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64))
+ cachedfun = funv.Interface().(func(
+
+ complex64))
}
arg := argfun(env)
@@ -847,7 +988,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(complex64))
+ fun := exprfun(env).Interface().(func(complex64,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -859,12 +1002,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := r.ValueOf(arg.Value).Complex()
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128)
+ var cachedfun func(
+
+ complex128)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128))
+ cachedfun = funv.Interface().(func(
+
+ complex128))
}
cachedfun(argconst)
@@ -880,13 +1027,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) complex128)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128)
+ var cachedfun func(complex128,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128))
+ cachedfun = funv.Interface().(func(
+
+ complex128))
}
arg := argfun(env)
@@ -895,7 +1045,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(complex128))
+ fun := exprfun(env).Interface().(func(complex128,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -907,19 +1059,24 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if arg.Const() {
argconst := r.ValueOf(arg.Value).String()
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string)
+ var cachedfun func(
+
+ string)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string))
+ cachedfun = funv.Interface().(func(
+
+ string))
}
cachedfun(argconst)
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(string))
+ fun := exprfun(env).Interface().(func(
+ string))
fun(argconst)
}
@@ -928,13 +1085,16 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
} else {
argfun := arg.Fun.(func(env *Env) string)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string)
+ var cachedfun func(string,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string))
+ cachedfun = funv.Interface().(func(
+
+ string))
}
arg := argfun(env)
@@ -943,7 +1103,9 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(string))
+ fun := exprfun(env).Interface().(func(string,
+
+ ))
arg := argfun(env)
fun(arg)
@@ -999,13 +1161,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) bool)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(bool, bool)
+ var cachedfun func(bool, bool,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(bool, bool))
+ cachedfun = funv.Interface().(func(
+
+ bool, bool))
}
arg0 := arg0fun(env)
@@ -1014,7 +1179,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(bool, bool))
+ fun := exprfun(env).Interface().(func(bool, bool,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1028,13 +1195,15 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) int)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int, int)
-
+ var cachedfun func(int, int,
+ )
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int, int))
+ cachedfun = funv.Interface().(func(
+
+ int, int))
}
arg0 := arg0fun(env)
@@ -1043,7 +1212,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int, int))
+ fun := exprfun(env).Interface().(func(int, int,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1059,10 +1230,12 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
if funsym != nil && funupn == maxdepth-1 {
var cachedfun func(int8, int8)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int8, int8))
+ cachedfun = funv.Interface().(func(
+
+ int8, int8))
}
arg0 := arg0fun(env)
@@ -1071,7 +1244,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int8, int8))
+ fun := exprfun(env).Interface().(func(int8, int8,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1085,12 +1260,15 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) int16)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int16, int16)
+ var cachedfun func(
+ int16, int16)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int16, int16))
+ cachedfun = funv.Interface().(func(
+
+ int16, int16))
}
arg0 := arg0fun(env)
@@ -1099,7 +1277,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int16, int16))
+ fun := exprfun(env).Interface().(func(int16, int16,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1113,12 +1293,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) int32)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int32, int32)
+ var cachedfun func(
+
+ int32, int32)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int32, int32))
+ cachedfun = funv.Interface().(func(
+
+ int32, int32))
}
arg0 := arg0fun(env)
@@ -1127,7 +1311,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int32, int32))
+ fun := exprfun(env).Interface().(func(int32, int32,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1141,12 +1327,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) int64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(int64, int64)
+ var cachedfun func(
+
+ int64, int64)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(int64, int64))
+ cachedfun = funv.Interface().(func(
+
+ int64, int64))
}
arg0 := arg0fun(env)
@@ -1155,7 +1345,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(int64, int64))
+ fun := exprfun(env).Interface().(func(int64, int64,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1169,12 +1361,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) uint)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint, uint)
+ var cachedfun func(
+
+ uint, uint)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint, uint))
+ cachedfun = funv.Interface().(func(
+
+ uint, uint))
}
arg0 := arg0fun(env)
@@ -1183,7 +1379,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint, uint))
+ fun := exprfun(env).Interface().(func(uint, uint,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1197,12 +1395,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) uint8)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint8, uint8)
+ var cachedfun func(
+
+ uint8, uint8)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint8, uint8))
+ cachedfun = funv.Interface().(func(
+
+ uint8, uint8))
}
arg0 := arg0fun(env)
@@ -1211,7 +1413,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint8, uint8))
+ fun := exprfun(env).Interface().(func(uint8, uint8,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1225,12 +1429,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) uint16)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint16, uint16)
+ var cachedfun func(
+
+ uint16, uint16)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint16, uint16))
+ cachedfun = funv.Interface().(func(
+
+ uint16, uint16))
}
arg0 := arg0fun(env)
@@ -1239,7 +1447,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint16, uint16))
+ fun := exprfun(env).Interface().(func(uint16, uint16,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1253,12 +1463,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) uint32)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint32, uint32)
+ var cachedfun func(
+
+ uint32, uint32)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint32, uint32))
+ cachedfun = funv.Interface().(func(
+
+ uint32, uint32))
}
arg0 := arg0fun(env)
@@ -1267,7 +1481,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint32, uint32))
+ fun := exprfun(env).Interface().(func(uint32, uint32,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1281,12 +1497,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) uint64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uint64, uint64)
+ var cachedfun func(
+
+ uint64, uint64)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uint64, uint64))
+ cachedfun = funv.Interface().(func(
+
+ uint64, uint64))
}
arg0 := arg0fun(env)
@@ -1295,7 +1515,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uint64, uint64))
+ fun := exprfun(env).Interface().(func(uint64, uint64,
+
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1309,12 +1531,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) uintptr)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(uintptr, uintptr)
+ var cachedfun func(
+
+ uintptr, uintptr)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(uintptr, uintptr))
+ cachedfun = funv.Interface().(func(
+
+ uintptr, uintptr))
}
arg0 := arg0fun(env)
@@ -1323,7 +1549,8 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(uintptr, uintptr))
+ fun := exprfun(env).Interface().(func(uintptr, uintptr,
+ ))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1337,12 +1564,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) float32)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float32, float32)
+ var cachedfun func(
+
+ float32, float32)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float32, float32))
+ cachedfun = funv.Interface().(func(
+
+ float32, float32))
}
arg0 := arg0fun(env)
@@ -1365,12 +1596,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) float64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(float64, float64)
+ var cachedfun func(
+
+ float64, float64)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(float64, float64))
+ cachedfun = funv.Interface().(func(
+
+ float64, float64))
}
arg0 := arg0fun(env)
@@ -1379,7 +1614,8 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(float64, float64))
+ fun := exprfun(env).Interface().(func(
+ float64, float64))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1393,12 +1629,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) complex64)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex64, complex64)
+ var cachedfun func(
+
+ complex64, complex64)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex64, complex64))
+ cachedfun = funv.Interface().(func(
+
+ complex64, complex64))
}
arg0 := arg0fun(env)
@@ -1407,7 +1647,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(complex64, complex64))
+ fun := exprfun(env).Interface().(func(
+
+ complex64, complex64))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1421,12 +1663,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) complex128)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(complex128, complex128)
+ var cachedfun func(
+
+ complex128, complex128)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(complex128, complex128))
+ cachedfun = funv.Interface().(func(
+
+ complex128, complex128))
}
arg0 := arg0fun(env)
@@ -1435,7 +1681,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(complex128, complex128))
+ fun := exprfun(env).Interface().(func(
+
+ complex128, complex128))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
@@ -1449,12 +1697,16 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
arg1fun := args[1].WithFun().(func(*Env) string)
if funsym != nil && funupn == maxdepth-1 {
- var cachedfun func(string, string)
+ var cachedfun func(
+
+ string, string)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
- cachedfun = funv.Interface().(func(string, string))
+ cachedfun = funv.Interface().(func(
+
+ string, string))
}
arg0 := arg0fun(env)
@@ -1463,7 +1715,9 @@ func (c *Comp) call2ret0(call *Call, maxdepth int) func(env *Env) {
}
} else {
ret = func(env *Env) {
- fun := exprfun(env).Interface().(func(string, string))
+ fun := exprfun(env).Interface().(func(
+
+ string, string))
arg0 := arg0fun(env)
arg1 := arg1fun(env)
fun(arg0, arg1)
diff --git a/vendor/github.com/cosmos72/gomacro/fast/callnret0.gomacro b/vendor/github.com/cosmos72/gomacro/fast/callnret0.gomacro
index b0c8180..f912c99 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/callnret0.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/callnret0.gomacro
@@ -1,22 +1,11 @@
-// +build !gomacro_fast_compact
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* callnret0.go
@@ -109,7 +98,7 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
switch funupn {
case maxdepth - 1:
return func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
if cachedfunv != funv {
cachedfunv = funv
cachedfun = funv.Interface().(func())
@@ -118,17 +107,17 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
}
case 0:
return func(env *Env) {
- fun := env.Binds[funindex].Interface().(func())
+ fun := env.Vals[funindex].Interface().(func())
fun()
}
case 1:
return func(env *Env) {
- fun := env.Outer.Binds[funindex].Interface().(func())
+ fun := env.Outer.Vals[funindex].Interface().(func())
fun()
}
case 2:
return func(env *Env) {
- fun := env.Outer.Outer.Binds[funindex].Interface().(func())
+ fun := env.Outer.Outer.Vals[funindex].Interface().(func())
fun()
}
default:
@@ -137,7 +126,7 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
for i := 3; i < funupn; i++ {
env = env.Outer
}
- fun := env.Binds[funindex].Interface().(func())
+ fun := env.Vals[funindex].Interface().(func())
fun()
}
}
@@ -173,7 +162,7 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
if funsym != nil && funupn == maxdepth - 1 {
var cachedfun func(~,argtyp)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
~,cachefun
// Debugf("calling %v with args [%v]", r.TypeOf(cachedfun), argconst)
cachedfun(argconst)
@@ -190,7 +179,7 @@ func (c *Comp) call0ret0(call *Call, maxdepth int) func(env *Env) {
if funsym != nil && funupn == maxdepth - 1 {
var cachedfun func(~,argtyp)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
~,cachefun
arg := argfun(env)
// Debugf("calling %v with args [%v]", r.TypeOf(cachedfun), arg)
@@ -287,7 +276,7 @@ func (c *Comp) call1ret0(call *Call, maxdepth int) func(env *Env) {
if funsym != nil && funupn == maxdepth - 1 {
var cachedfun func(~,arg0typ, ~,arg1typ)
ret = func(env *Env) {
- funv := env.ThreadGlobals.FileEnv.Binds[funindex]
+ funv := env.FileEnv.Vals[funindex]
~,cachefun
arg0 := arg0fun(env)
arg1 := arg1fun(env)
diff --git a/vendor/github.com/cosmos72/gomacro/fast/callnret1.go b/vendor/github.com/cosmos72/gomacro/fast/callnret1.go
index bffd2fb..2aa8b2d 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/callnret1.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/callnret1.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* callnret1.go
@@ -32,14 +23,13 @@ package fast
import (
r "reflect"
- . "github.com/cosmos72/gomacro/base"
)
func (c *Comp) callnret1(call *Call, maxdepth int) I {
expr := call.Fun
exprfun := expr.AsX1()
if expr.Sym != nil && expr.Sym.Desc.Index() == NoIndex {
- Errorf("internal error: callnret1() invoked for constant function %#v. use call_builtin() instead", expr)
+ c.Errorf("internal error: callnret1() invoked for constant function %#v. use call_builtin() instead", expr)
}
kret := expr.Type.Out(0).Kind()
diff --git a/vendor/github.com/cosmos72/gomacro/fast/callnret1.gomacro b/vendor/github.com/cosmos72/gomacro/fast/callnret1.gomacro
index 12d094b..12dfa4f 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/callnret1.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/callnret1.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* callnret1.go
@@ -27,7 +18,6 @@ package fast
import (
r "reflect"
- . "github.com/cosmos72/gomacro/base"
)
:import (
@@ -104,7 +94,7 @@ func (c *Comp) callnret1(call *Call, maxdepth int) I {
expr := call.Fun
exprfun := expr.AsX1()
if expr.Sym != nil && expr.Sym.Desc.Index() == NoIndex {
- Errorf("internal error: callnret1() invoked for constant function %#v. use call_builtin() instead", expr)
+ c.Errorf("internal error: callnret1() invoked for constant function %#v. use call_builtin() instead", expr)
}
kret := expr.Type.Out(0).Kind()
argfuns := call.MakeArgfunsX1()
diff --git a/vendor/github.com/cosmos72/gomacro/fast/channel.go b/vendor/github.com/cosmos72/gomacro/fast/channel.go
index a04afcc..e61f685 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/channel.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/channel.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* channel.go
@@ -526,7 +517,7 @@ func (c *Comp) Recv1(node *ast.UnaryExpr, xe *Expr) *Expr {
return exprFun(telem, fun)
}
func (c *Comp) Send(node *ast.SendStmt) {
- channel := c.Expr1(node.Chan)
+ channel := c.Expr1(node.Chan, nil)
t := channel.Type
if t.Kind() != r.Chan {
c.Errorf("cannot send to non-channel type %v: %v", t, node)
@@ -539,7 +530,7 @@ func (c *Comp) Send(node *ast.SendStmt) {
telem := t.Elem()
rtelem := telem.ReflectType()
kelem := rtelem.Kind()
- expr := c.Expr1(node.Value)
+ expr := c.Expr1(node.Value, nil)
if expr.Const() {
expr.ConstTo(telem)
} else if expr.Type == nil || !expr.Type.AssignableTo(telem) {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/channel.gomacro b/vendor/github.com/cosmos72/gomacro/fast/channel.gomacro
index 4914fa6..d7d2548 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/channel.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/channel.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* channel.go
@@ -313,7 +304,7 @@ func (c *Comp) Recv1(node *ast.UnaryExpr, xe *Expr) *Expr {
}
func (c *Comp) Send(node *ast.SendStmt) {
- channel := c.Expr1(node.Chan)
+ channel := c.Expr1(node.Chan, nil)
t := channel.Type
if t.Kind() != r.Chan {
c.Errorf("cannot send to non-channel type %v: %v", t, node)
@@ -326,7 +317,7 @@ func (c *Comp) Send(node *ast.SendStmt) {
telem := t.Elem()
rtelem := telem.ReflectType()
kelem := rtelem.Kind()
- expr := c.Expr1(node.Value)
+ expr := c.Expr1(node.Value, nil)
if expr.Const() {
expr.ConstTo(telem)
} else if expr.Type == nil || !expr.Type.AssignableTo(telem) {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/cmd.go b/vendor/github.com/cosmos72/gomacro/fast/cmd.go
new file mode 100644
index 0000000..08f6b14
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/cmd.go
@@ -0,0 +1,405 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * cmd.go
+ *
+ * Created on: Apr 20, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package fast
+
+import (
+ "errors"
+ "io"
+ "sort"
+ "strings"
+
+ . "github.com/cosmos72/gomacro/base"
+)
+
+// ====================== Cmd ==============================
+
+// Cmd is an interpreter special command.
+//
+// The following Interp methods look for special commands and execute them:
+// Cmd, EvalFile, EvalReader, ParseEvalPrint, ReadParseEvalPrint, Repl, ReplStdin
+// note that Interp.Eval() does **not** look for special commands!
+//
+// Cmd.Name is the command name **without** the initial ':'
+// it must be a valid Go identifier and must not be empty.
+// Using a reserved Go keyword (const, for, func, if, package, return, switch, type, var...)
+// or predefined identifier (bool, int, rune, true, false, nil...)
+// is a bad idea because it interferes with gomacro preprocessor mode.
+// Current limitation: Cmd.Name[0] must be ASCII.
+//
+// Cmd.Help is the help string that will be displayed by :help
+// please look at current :help output and use the same layout if possible.
+//
+// Cmd.Func is the command implementation. it receives as arguments:
+// - the current Interp object,
+// - the (possibly multi-line) argument string typed by the user
+// note: it will always have balanced amounts of {} [] () '' "" and ``
+// - the current command options
+//
+// Cmd.Func can perform any action desired by the implementor,
+// including calls to Interp methods, and it must return:
+// - a string to be subsequently evaluated by the interpreter.
+// return the empty string if the command does not need any subsequent evaluation,
+// or if it performed the evaluation by itself.
+// - the updated command options.
+// return the received 'opt' argument unless you need to update it.
+//
+// If Cmd.Func needs to print something, it's recommended to use
+// g := &interp.Comp.Globals
+// g.Fprintf(g.Stdout, FORMAT, ARGS...)
+// instead of the various fmt.*Print* functions, in order to
+// pretty-print interpreter-generated objects (g.Fprintf)
+// and to honour configured redirections (g.Stdout)
+//
+// To register a new special command, use Commands.Add()
+// To unregister an existing special command, use Commands.Del()
+// To list existing special commands, use Commands.List()
+type Cmd struct {
+ Name string
+ Func func(interp *Interp, arg string, opt CmdOpt) (string, CmdOpt)
+ Help string
+}
+
+// if cmd.Name starts with prefix return 0;
+// else if cmd.Name < prefix return -1;
+// else return 1
+func (cmd *Cmd) Match(prefix string) int {
+ name := cmd.Name
+ if strings.HasPrefix(name, prefix) {
+ return 0
+ } else if name < prefix {
+ return -1
+ } else {
+ return 1
+ }
+}
+
+func (cmd *Cmd) ShowHelp(g *Globals) {
+ c := string(g.ReplCmdChar)
+
+ help := strings.Replace(cmd.Help, "%c", c, -1)
+ g.Fprintf(g.Stdout, "%s%s\n", c, help)
+}
+
+// ===================== Cmds ==============================
+
+type Cmds struct {
+ m map[byte][]Cmd
+}
+
+// search for a Cmd whose name starts with prefix.
+// return (zero value, io.EOF) if no match.
+// return (cmd, nil) if exactly one match.
+// return (zero value, list of match names) if more than one match
+func (cmds Cmds) Lookup(prefix string) (Cmd, error) {
+ if len(prefix) != 0 {
+ if vec, ok := cmds.m[prefix[0]]; ok {
+ i, err := prefixSearch(vec, prefix)
+ if err != nil {
+ return Cmd{}, err
+ }
+ return vec[i], nil
+ }
+ }
+ return Cmd{}, io.EOF
+}
+
+// prefix search: find all the Cmds whose name start with prefix.
+// if there are none, return 0 and io.EOF
+// if there is exactly one, return its index and nil.
+// if there is more than one, return 0 and an error listing the matching ones
+func prefixSearch(vec []Cmd, prefix string) (int, error) {
+ lo, _ := binarySearch(vec, prefix)
+ n := len(vec)
+ for ; lo < n; lo++ {
+ cmp := vec[lo].Match(prefix)
+ if cmp < 0 {
+ continue
+ } else if cmp == 0 {
+ break
+ } else {
+ return 0, io.EOF
+ }
+ }
+ if lo == n {
+ return 0, io.EOF
+ }
+ hi := lo + 1
+ for ; hi < n; hi++ {
+ if vec[hi].Match(prefix) > 0 {
+ break
+ }
+ }
+ if lo+1 == hi {
+ return lo, nil
+ }
+ names := make([]string, hi-lo)
+ for i := lo; i < hi; i++ {
+ names[i-lo] = vec[i].Name
+ }
+ return 0, errors.New(strings.Join(names, " "))
+}
+
+// plain binary search for exact Cmd name
+func binarySearch(vec []Cmd, exact string) (int, bool) {
+ lo, hi := 0, len(vec)-1
+ for lo <= hi {
+ mid := (lo + hi) / 2
+ name := vec[mid].Name
+ if name < exact {
+ lo = mid + 1
+ } else if name > exact {
+ hi = mid - 1
+ } else {
+ return mid, true
+ }
+ }
+ return lo, false
+}
+
+// return the list of currently registered special commands
+func (cmds Cmds) List() []Cmd {
+ var list []Cmd
+ for _, vec := range cmds.m {
+ for _, cmd := range vec {
+ list = append(list, cmd)
+ }
+ }
+ sortCmdList(list)
+ return list
+}
+
+// order Cmd list by name
+func sortCmdList(vec []Cmd) {
+ sort.Slice(vec, func(i, j int) bool {
+ return vec[i].Name < vec[j].Name
+ })
+}
+
+// register a new Cmd.
+// if cmd.Name is the empty string, do nothing and return false.
+// overwrites any existing Cmd with the same name
+func (cmds Cmds) Add(cmd Cmd) bool {
+ name := cmd.Name
+ if len(name) == 0 {
+ return false
+ }
+ c := name[0]
+ vec, _ := cmds.m[c]
+ if pos, ok := binarySearch(vec, name); ok {
+ vec[pos] = cmd
+ } else {
+ vec = append(vec, cmd)
+ sortCmdList(vec)
+ cmds.m[c] = vec
+ }
+ return true
+}
+
+// unregister an existing Cmd by name. return true if existed.
+// Use with care!
+func (cmds Cmds) Del(name string) bool {
+ if len(name) != 0 {
+ c := name[0]
+ if vec, ok := cmds.m[c]; ok {
+ if pos, ok := binarySearch(vec, name); ok {
+ vec = removeCmd(vec, pos)
+ if len(vec) == 0 {
+ delete(cmds.m, c)
+ } else {
+ cmds.m[c] = vec
+ }
+ return true
+ }
+ }
+ }
+ return false
+}
+
+// remove Cmd at index 'pos' from slice.
+// return updated slice.
+func removeCmd(vec []Cmd, pos int) []Cmd {
+ head := vec[:pos]
+ n := len(vec)
+ if pos == n-1 {
+ return head
+ }
+ tail := vec[pos+1:]
+ if pos == 0 {
+ return tail
+ }
+ headn, tailn := pos, len(tail)
+ if headn >= tailn {
+ copy(vec[headn:], tail)
+ vec = vec[:n-1]
+ } else {
+ copy(vec[1:], head)
+ vec = vec[1:]
+ }
+ return vec
+}
+
+func (cmds Cmds) ShowHelp(g *Globals) {
+ out := g.Stdout
+ g.Fprintf(out, "%s",
+ "// type Go code to execute it. example: func add(x, y int) int { return x + y }\n\n// interpreter commands:\n")
+
+ for _, cmd := range cmds.List() {
+ cmd.ShowHelp(g)
+ }
+ g.Fprintf(out, "%s", "// abbreviations are allowed if unambiguous.\n")
+}
+
+var Commands Cmds
+
+func init() {
+ Commands.m = map[byte][]Cmd{
+ 'd': []Cmd{{"debug", (*Interp).cmdDebug, `debug EXPR debug expression or statement interactively`}},
+ 'e': []Cmd{{"env", (*Interp).cmdEnv, `env [NAME] show available functions, variables and constants
+ in current package, or from imported package NAME`}},
+ 'h': []Cmd{{"help", (*Interp).cmdHelp, `help show this help`}},
+ 'i': []Cmd{{"inspect", (*Interp).cmdInspect, `inspect EXPR inspect expression interactively`}},
+ 'o': []Cmd{{"options", (*Interp).cmdOptions, `options [OPTS] show or toggle interpreter options`}},
+ 'p': []Cmd{{"package", (*Interp).cmdPackage, `package "PKGPATH" switch to package PKGPATH, importing it if possible`}},
+ 'q': []Cmd{{"quit", (*Interp).cmdQuit, `quit quit the interpreter`}},
+ 'u': []Cmd{{"unload", (*Interp).cmdUnload, `unload "PKGPATH" remove package PKGPATH from the list of known packages.
+ later attempts to import it will trigger a recompile`}},
+ 'w': []Cmd{{"write", (*Interp).cmdWrite, `write [FILE] write collected declarations and/or statements to standard output or to FILE
+ use %copt Declarations and/or %copt Statements to start collecting them`}},
+ }
+}
+
+// ==================== Interp =============================
+
+// execute one of the REPL commands starting with ':'
+// return any remainder string to be evaluated, and the options to evaluate it
+func (ir *Interp) Cmd(src string) (string, CmdOpt) {
+ g := &ir.Comp.Globals
+ var opt CmdOpt
+
+ trim := strings.TrimSpace(src)
+ n := len(trim)
+ if n > 0 && trim[0] == g.ReplCmdChar {
+ prefix, arg := Split2(trim[1:], ' ') // skip g.ReplCmdChar
+ cmd, err := Commands.Lookup(prefix)
+ if err == nil {
+ src, opt = cmd.Func(ir, arg, opt)
+ } else if err == io.EOF {
+ // ":"
+ // temporarily disable collection of declarations and statements,
+ // and temporarily disable macroexpandonly (i.e. re-enable eval)
+ opt |= CmdOptForceEval
+ src = " " + src[1:] // slower than src = src[1:], but gives accurate column positions in error messages
+ } else {
+ g.Warnf("ambiguous command %q matches: %s", prefix, err)
+ return "", opt
+ }
+ } else if g.Options&OptMacroExpandOnly == 0 && (trim == "package" || strings.HasPrefix(trim, "package ")) {
+ _, arg := Split2(trim, ' ')
+ src, opt = ir.cmdPackage(arg, opt)
+ }
+ return src, opt
+}
+
+func (ir *Interp) cmdDebug(arg string, opt CmdOpt) (string, CmdOpt) {
+ g := &ir.Comp.Globals
+ if len(arg) == 0 {
+ g.Fprintf(g.Stdout, "// debug: missing argument\n")
+ } else {
+ g.Print(ir.Debug(arg))
+ }
+ return "", opt
+}
+
+func (ir *Interp) cmdEnv(arg string, opt CmdOpt) (string, CmdOpt) {
+ ir.ShowPackage(arg)
+ return "", opt
+}
+
+func (ir *Interp) cmdHelp(arg string, opt CmdOpt) (string, CmdOpt) {
+ Commands.ShowHelp(&ir.Comp.Globals)
+ return "", opt
+}
+
+func (ir *Interp) cmdInspect(arg string, opt CmdOpt) (string, CmdOpt) {
+ g := &ir.Comp.Globals
+ if len(arg) == 0 {
+ g.Fprintf(g.Stdout, "// inspect: missing argument\n")
+ } else {
+ ir.Inspect(arg)
+ }
+ return "", opt
+}
+
+func (ir *Interp) cmdOptions(arg string, opt CmdOpt) (string, CmdOpt) {
+ c := ir.Comp
+ g := &c.Globals
+
+ if len(arg) != 0 {
+ g.Options ^= ParseOptions(arg)
+
+ debugdepth := 0
+ if g.Options&OptDebugFromReflect != 0 {
+ debugdepth = 1
+ }
+ c.CompGlobals.Universe.DebugDepth = debugdepth
+
+ } else {
+ g.Fprintf(g.Stdout, "// current options: %v\n", g.Options)
+ g.Fprintf(g.Stdout, "// unset options: %v\n", ^g.Options)
+ }
+ return "", opt
+}
+
+// change package. path can be empty or a package path WITH quotes
+// 'package NAME' where NAME is without quotes has no effect.
+func (ir *Interp) cmdPackage(path string, cmdopt CmdOpt) (string, CmdOpt) {
+ c := ir.Comp
+ g := &c.Globals
+ path = strings.TrimSpace(path)
+ n := len(path)
+ if len(path) == 0 {
+ g.Fprintf(g.Stdout, "// current package: %s %q\n", c.Name, c.Path)
+ } else if n > 2 && path[0] == '"' && path[n-1] == '"' {
+ path = path[1 : n-1]
+ ir.ChangePackage(FileName(path), path)
+ } else if g.Options&OptShowPrompt != 0 {
+ g.Debugf(`package %s has no effect. To switch to a different package, use package "PACKAGE/FULL/PATH" - note the quotes`, path)
+ }
+ return "", cmdopt
+}
+
+func (ir *Interp) cmdQuit(_ string, opt CmdOpt) (string, CmdOpt) {
+ return "", opt | CmdOptQuit
+}
+
+// remove package 'path' from the list of known packages
+func (ir *Interp) cmdUnload(path string, opt CmdOpt) (string, CmdOpt) {
+ if len(path) != 0 {
+ ir.Comp.UnloadPackage(path)
+ }
+ return "", opt
+}
+
+func (ir *Interp) cmdWrite(filepath string, opt CmdOpt) (string, CmdOpt) {
+ g := &ir.Comp.Globals
+ if len(filepath) == 0 {
+ g.WriteDeclsToStream(g.Stdout)
+ } else {
+ g.WriteDeclsToFile(filepath)
+ }
+ return "", opt
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/code.go b/vendor/github.com/cosmos72/gomacro/fast/code.go
index cb58e79..418c844 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/code.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/code.go
@@ -1,23 +1,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * code.go
+ * exec.go
*
* Created on Apr 09, 2017
* Author Massimiliano Ghilardi
@@ -27,7 +18,8 @@ package fast
import (
"go/token"
- "unsafe"
+
+ . "github.com/cosmos72/gomacro/base"
)
func (code *Code) Clear() {
@@ -40,6 +32,15 @@ func (code *Code) Len() int {
return len(code.List)
}
+func (code *Code) Truncate(n int) {
+ if len(code.List) > n {
+ code.List = code.List[0:n]
+ }
+ if len(code.DebugPos) > n {
+ code.DebugPos = code.DebugPos[0:n]
+ }
+}
+
func (code *Code) Append(stmt Stmt, pos token.Pos) {
if stmt != nil {
code.List = append(code.List, stmt)
@@ -55,41 +56,77 @@ func (code *Code) AsExpr() *Expr {
return expr0(fun)
}
-// declare a var instead of function: Code.Exec() needs the address of Interrupt
-var Interrupt Stmt = func(env *Env) (Stmt, *Env) {
- return env.ThreadGlobals.Interrupt, env
+// spinInterrupt is the statement executed while waiting for an interrupt to be serviced.
+// To signal an interrupt, a statement must set env.ThreadGlobals.Signal to the desired signal,
+// then return env.ThreadGlobals.Interrupt, env
+func spinInterrupt(env *Env) (Stmt, *Env) {
+ run := env.Run
+ if run.Signals.IsEmpty() {
+ run.Signals.Sync = SigReturn
+ } else if sig := run.Signals.Async; sig != SigNone {
+ run.applyAsyncSignal(sig)
+ }
+ return run.Interrupt, env
}
-func pushDefer(g *ThreadGlobals, deferOf *Env, panicking bool) (retg *ThreadGlobals, deferOf_ *Env, isDefer bool) {
+func (run *Run) applyAsyncSignal(sig Signal) {
+ run.Signals.Async = SigNone
+ switch sig {
+ case SigNone:
+ break
+ case SigDebug:
+ run.applyDebugOp(DebugOpStep)
+ default:
+ panic(SigInterrupt)
+ }
+}
+
+func pushDefer(g *Run, deferOf *Env, panicking bool) (retg *Run, deferOf_ *Env, isDefer bool) {
deferOf_ = g.DeferOfFun
if panicking {
g.PanicFun = deferOf
}
g.DeferOfFun = deferOf
- g.StartDefer = true
- return g, deferOf_, g.IsDefer
+ g.ExecFlags.SetStartDefer(true)
+ return g, deferOf_, g.ExecFlags.IsDefer()
}
-func popDefer(g *ThreadGlobals, deferOf *Env, isDefer bool) {
- g.DeferOfFun = deferOf
- g.StartDefer = false
- g.IsDefer = isDefer
+func popDefer(run *Run, deferOf *Env, isDefer bool) {
+ run.DeferOfFun = deferOf
+ run.ExecFlags.SetStartDefer(false)
+ run.ExecFlags.SetDefer(isDefer)
}
-func restore(g *ThreadGlobals, flag bool, interrupt Stmt) {
- g.IsDefer = flag
- g.Signal = SigNone
- g.Interrupt = interrupt
+func restore(run *Run, isDefer bool, interrupt Stmt, caller *Env) {
+ run.ExecFlags.SetDefer(isDefer)
+ run.Interrupt = interrupt
+ run.CurrEnv = caller
+ run.Signals.Sync = SigNone
+ if sig := run.Signals.Async; sig == SigInterrupt {
+ // do NOT handle async SigDebug here
+ run.applyAsyncSignal(sig)
+ }
}
-func maybeRepanic(g *ThreadGlobals) bool {
- if g.PanicFun != nil {
- panic(g.Panic)
+func maybeRepanic(run *Run) bool {
+ if run.PanicFun != nil {
+ panic(run.Panic)
}
// either not panicking or recover() invoked, no longer panicking
return false
}
+func (run *Run) interrupt() {
+ const CtrlCDebug = OptDebugger | OptCtrlCEnterDebugger
+ var sig Signal
+ if run.Options&CtrlCDebug == CtrlCDebug {
+ sig = SigDebug
+ } else {
+ sig = SigInterrupt
+ }
+ run.Signals.Async = sig
+}
+
// Exec returns a func(*Env) that will execute the compiled code
func (code *Code) Exec() func(*Env) {
all := code.List
@@ -100,36 +137,35 @@ func (code *Code) Exec() func(*Env) {
if len(all) == 0 {
return nil
}
- all = append(all, Interrupt)
+ all = append(all, spinInterrupt)
if defers {
// code to support defer is slower... isolate it in a separate function
- return func(env *Env) {
- execWithDefers(env, all, pos)
- }
- } else {
- return exec(all, pos)
+ return execWithFlags(all, pos)
}
+ return exec(all, pos)
}
func exec(all []Stmt, pos []token.Pos) func(*Env) {
return func(env *Env) {
- g := env.ThreadGlobals
- if g.IsDefer || g.StartDefer {
- // code to support defer is slower... isolate it in a separate function
- execWithDefers(env, all, pos)
+ run := env.Run
+ run.Signals.Sync = SigNone
+ if run.ExecFlags != 0 {
+ // code to support defer and debugger is slower... isolate it in a separate function
+ reExecWithFlags(env, all, pos, all[0], 0)
return
}
+ if sig := run.Signals.Async; sig != SigNone {
+ run.applyAsyncSignal(sig)
+ }
+ saveInterrupt := run.Interrupt
+ run.Interrupt = nil
+
stmt := all[0]
env.IP = 0
env.Code = all
env.DebugPos = pos
- interrupt := g.Interrupt
- g.Interrupt = nil
- var unsafeInterrupt *uintptr
- g.Signal = SigNone
-
for j := 0; j < 5; j++ {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
@@ -145,7 +181,9 @@ func exec(all []Stmt, pos []token.Pos) func(*Env) {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
- continue
+ if run.Signals.IsEmpty() {
+ continue
+ }
}
}
}
@@ -163,8 +201,7 @@ func exec(all []Stmt, pos []token.Pos) func(*Env) {
goto finish
}
- unsafeInterrupt = *(**uintptr)(unsafe.Pointer(&Interrupt))
- env.ThreadGlobals.Interrupt = Interrupt
+ run.Interrupt = spinInterrupt
for {
stmt, env = stmt(env)
stmt, env = stmt(env)
@@ -182,53 +219,76 @@ func exec(all []Stmt, pos []token.Pos) func(*Env) {
stmt, env = stmt(env)
stmt, env = stmt(env)
- if *(**uintptr)(unsafe.Pointer(&stmt)) == unsafeInterrupt {
+ if !run.Signals.IsEmpty() {
break
}
}
finish:
// restore env.ThreadGlobals.Interrupt and Signal before returning
- g.Interrupt = interrupt
- g.Signal = SigNone
- return
+ run.Interrupt = saveInterrupt
+ if sig := run.Signals.Async; sig != SigNone {
+ run.applyAsyncSignal(sig) // may set run.Signals.Debug if OptCtrlCEnterDebugger is set
+ }
+ if run.Signals.Debug == SigNone {
+ run.Signals.Sync = SigNone
+ } else {
+ reExecWithFlags(env, all, pos, stmt, env.IP)
+ }
}
}
-// execWithDefers executes the given compiled code, including support for defer()
-func execWithDefers(env *Env, all []Stmt, pos []token.Pos) {
+// execWithFlags returns a function that will execute the given compiled code, including support for defer() and debugger
+func execWithFlags(all []Stmt, pos []token.Pos) func(*Env) {
+ return func(env *Env) {
+ env.Run.Signals.Sync = SigNone
+ reExecWithFlags(env, all, pos, all[0], 0)
+ }
+}
+
+func reExecWithFlags(env *Env, all []Stmt, pos []token.Pos, stmt Stmt, ip int) {
+ run := env.Run
+
+ ef := &run.ExecFlags
+ trace := run.Options&OptDebugDebugger != 0
+ if trace {
+ run.Debugf("reExecWithFlags: executing function stmt = %p, env = %p, IP = %v, execFlags = %v, signals = %#v", stmt, env, ip, *ef, run.Signals)
+ }
+ if sig := run.Signals.Async; sig != SigNone {
+ run.applyAsyncSignal(sig)
+ }
+ caller := run.CurrEnv
+ // restore g.IsDefer, g.Signal, g.DebugCallDepth, g.Interrupt and g.Caller on return
+ defer restore(run, run.ExecFlags.IsDefer(), run.Interrupt, caller)
+ ef.SetDefer(ef.StartDefer())
+ ef.SetStartDefer(false)
+ ef.SetDebug(run.Signals.Debug != SigNone)
+
funenv := env
- stmt := all[0]
- env.IP = 0
+ env.IP = ip
env.Code = all
env.DebugPos = pos
- g := env.ThreadGlobals
- interrupt := g.Interrupt
- g.Interrupt = nil
- var unsafeInterrupt *uintptr
-
- defer restore(g, g.IsDefer, interrupt) // restore g.IsDefer, g.Signal and g.Interrupt on return
- g.Signal = SigNone
- g.IsDefer = g.StartDefer
- g.StartDefer = false
- panicking := true
- panicking2 := false
-
+ panicking, panicking2 := true, false
rundefer := func(fun func()) {
if panicking || panicking2 {
panicking = true
panicking2 = false
- g.Panic = recover()
+ run.Panic = recover()
}
- defer popDefer(pushDefer(g, funenv, panicking))
+ defer popDefer(pushDefer(run, funenv, panicking))
panicking2 = true // detect panics inside defer
fun()
panicking2 = false
if panicking {
- panicking = maybeRepanic(g)
+ panicking = maybeRepanic(run)
}
}
+ if stmt == nil || !run.Signals.IsEmpty() {
+ goto signal
+ }
+again:
+ run.Interrupt = nil
for j := 0; j < 5; j++ {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
@@ -244,7 +304,9 @@ func execWithDefers(env *Env, all []Stmt, pos []token.Pos) {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
if stmt, env = stmt(env); stmt != nil {
- continue
+ if run.Signals.IsEmpty() {
+ continue
+ }
}
}
}
@@ -259,22 +321,23 @@ func execWithDefers(env *Env, all []Stmt, pos []token.Pos) {
}
}
}
- if g.Signal != SigDefer {
- goto finish
+ for run.Signals.Sync == SigDefer {
+ run.Signals.Sync = SigNone
+ fun := run.InstallDefer
+ run.InstallDefer = nil
+ defer rundefer(fun)
+ stmt = env.Code[env.IP]
+ if stmt == nil {
+ goto signal
+ }
}
- fun := g.InstallDefer
- g.Signal = SigNone
- g.InstallDefer = nil
- defer rundefer(fun)
- stmt = env.Code[env.IP]
- if stmt != nil {
- continue
+ if !run.Signals.IsEmpty() {
+ goto signal
}
- break
+ continue
}
- unsafeInterrupt = *(**uintptr)(unsafe.Pointer(&Interrupt))
- env.ThreadGlobals.Interrupt = Interrupt
+ run.Interrupt = spinInterrupt
for {
stmt, env = stmt(env)
stmt, env = stmt(env)
@@ -292,22 +355,44 @@ func execWithDefers(env *Env, all []Stmt, pos []token.Pos) {
stmt, env = stmt(env)
stmt, env = stmt(env)
- if *(**uintptr)(unsafe.Pointer(&stmt)) == unsafeInterrupt {
- if g.Signal != SigDefer {
- goto finish
- }
- fun := g.InstallDefer
- g.Signal = SigNone
- g.InstallDefer = nil
+ for run.Signals.Sync == SigDefer {
+ run.Signals.Sync = SigNone
+ fun := run.InstallDefer
+ run.InstallDefer = nil
defer rundefer(fun)
+ // single step
stmt = env.Code[env.IP]
- if *(**uintptr)(unsafe.Pointer(&stmt)) != unsafeInterrupt {
- continue
- }
+ stmt, env = stmt(env)
+ }
+ if !run.Signals.IsEmpty() {
+ goto signal
+ }
+ }
+signal:
+ if sig := run.Signals.Async; sig != SigNone {
+ // if OptCtrlCEnterDebugger is set, convert early
+ // Signals.Async = SigDebug to Signals.Debug = SigDebug
+ run.applyAsyncSignal(sig)
+ }
+
+ for run.Signals.Debug != SigNone {
+ run.Interrupt = spinInterrupt
+ stmt, env = singleStep(env)
+ if trace {
+ run.Debugf("singleStep returned stmt = %p, env = %p, IP = %v, execFlags = %v, signals = %#v", stmt, env, env.IP, run.ExecFlags, run.Signals)
+ }
+ // a Sync or Async signal may be pending.
+ sig := run.Signals.Sync
+ if run.Signals.IsEmpty() || sig == SigDefer {
+ goto again
+ } else if sig == SigReturn {
break
+ } else if sig = run.Signals.Async; sig != SigNone {
+ run.applyAsyncSignal(sig)
}
}
-finish:
panicking = false
+ // no need to restore g.IsDefer, g.Signal, g.Interrupt:
+ // done by defer restore(g, g.IsDefer, interrupt) above
return
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/compile.go b/vendor/github.com/cosmos72/gomacro/fast/compile.go
index 9e601e9..ecaead0 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/compile.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/compile.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* compile.go
@@ -28,106 +19,23 @@ package fast
import (
"go/ast"
"go/token"
- "go/types"
r "reflect"
- "strings"
. "github.com/cosmos72/gomacro/ast2"
. "github.com/cosmos72/gomacro/base"
- xr "github.com/cosmos72/gomacro/xreflect"
+ "github.com/cosmos72/gomacro/base/dep"
+ "github.com/cosmos72/gomacro/gls"
)
-func NewThreadGlobals() *ThreadGlobals {
- return &ThreadGlobals{
- Globals: NewGlobals(),
- }
-}
-
-func New() *Interp {
- top := NewCompEnvTop("builtin")
- top.env.UsedByClosure = true // do not free this *Env
- file := NewCompEnv(top, "main")
- file.env.UsedByClosure = true // do not free this *Env
- return file
-}
-
-func NewCompEnvTop(path string) *Interp {
- name := path[1+strings.LastIndexByte(path, '/'):]
-
- globals := NewGlobals()
- universe := xr.NewUniverse()
-
- compGlobals := &CompThreadGlobals{
- Universe: universe,
- interf2proxy: make(map[r.Type]r.Type),
- proxy2interf: make(map[r.Type]xr.Type),
- Globals: globals,
- }
- envGlobals := &ThreadGlobals{Globals: globals}
- ce := &Interp{
- Comp: &Comp{
- UpCost: 1,
- Depth: 0,
- Outer: nil,
- Name: name,
- Path: path,
- CompThreadGlobals: compGlobals,
- },
- env: &Env{
- Outer: nil,
- ThreadGlobals: envGlobals,
- },
- }
- // tell xreflect about our packages "fast" and "main"
- compGlobals.Universe.CachePackage(types.NewPackage("fast", "fast"))
- compGlobals.Universe.CachePackage(types.NewPackage("main", "main"))
-
- // no need to scavenge for Builtin, Function, Import, Macro and UntypedLit fields and methods.
- // actually, making them opaque helps securing against malicious interpreted code.
- for _, rtype := range []r.Type{rtypeOfBuiltin, rtypeOfFunction, rtypeOfImport, rtypeOfMacro, rtypeOfUntypedLit} {
- compGlobals.opaqueType(rtype)
- }
-
- envGlobals.TopEnv = ce.env
- ce.addBuiltins()
- return ce
-}
-
-func NewCompEnv(outer *Interp, path string) *Interp {
- name := path[1+strings.LastIndexByte(path, '/'):]
-
- compGlobals := outer.Comp.CompThreadGlobals
- envGlobals := outer.env.ThreadGlobals
- c := &Interp{
- Comp: &Comp{
- UpCost: 1,
- Depth: outer.Comp.Depth + 1,
- Outer: outer.Comp,
- Name: name,
- Path: path,
- CompThreadGlobals: compGlobals,
- },
- env: &Env{
- Outer: outer.env,
- ThreadGlobals: envGlobals,
- },
- }
- if outer.env.Outer == nil {
- envGlobals.FileEnv = c.env
- }
- return c
-}
-
func NewComp(outer *Comp, code *Code) *Comp {
if outer == nil {
return &Comp{UpCost: 1}
}
c := Comp{
- UpCost: 1,
- Depth: outer.Depth + 1,
- Outer: outer,
- CompileOptions: outer.CompileOptions,
- CompThreadGlobals: outer.CompThreadGlobals,
+ UpCost: 1,
+ Depth: outer.Depth + 1,
+ Outer: outer,
+ CompGlobals: outer.CompGlobals,
}
// Debugf("NewComp(%p->%p) %s", outer, &c, debug.Stack())
if code != nil {
@@ -155,72 +63,169 @@ func (c *Comp) FileComp() *Comp {
return c
}
-// if a function Env only declares ignored binds, it gets this scratch buffers
-var ignoredBinds = []r.Value{Nil}
-var ignoredIntBinds = []uint64{0}
+func NewIrGlobals() *IrGlobals {
+ return &IrGlobals{
+ gls: make(map[uintptr]*Run),
+ Globals: *NewGlobals(),
+ }
+}
+
+func (g *IrGlobals) glsGet(goid uintptr) *Run {
+ g.lock.Lock()
+ ret := g.gls[goid]
+ g.lock.Unlock()
+ return ret
+}
+
+func (run *Run) getRun4Goid(goid uintptr) *Run {
+ g := run.IrGlobals
+ ret := g.glsGet(goid)
+ if ret == nil {
+ ret = run.new(goid)
+ ret.glsStore()
+ }
+ return ret
+}
+
+func (tg *Run) glsStore() {
+ g := tg.IrGlobals
+ goid := tg.goid
+ g.lock.Lock()
+ g.gls[goid] = tg
+ g.lock.Unlock()
+}
+
+func (tg *Run) glsDel() {
+ g := tg.IrGlobals
+ goid := tg.goid
+ g.lock.Lock()
+ delete(g.gls, goid)
+ g.lock.Unlock()
+}
+
+func (run *Run) new(goid uintptr) *Run {
+ return &Run{
+ IrGlobals: run.IrGlobals,
+ goid: goid,
+ // Interrupt, Signal, PoolSize and Pool are zero-initialized, fine with that
+ }
+}
-func NewEnv(outer *Env, nbinds int, nintbinds int) *Env {
- tg := outer.ThreadGlobals
- pool := &tg.Pool // pool is an array, do NOT copy it!
- index := tg.PoolSize - 1
+// common part between NewEnv() and newEnv4Func()
+func newEnv(run *Run, outer *Env, nbind int, nintbind int) *Env {
+ pool := &run.Pool // pool is an array, do NOT copy it!
+ index := run.PoolSize - 1
var env *Env
if index >= 0 {
- tg.PoolSize = index
+ run.PoolSize = index
env = pool[index]
pool[index] = nil
} else {
env = &Env{}
}
- if nbinds <= 1 {
- env.Binds = ignoredBinds
- } else if cap(env.Binds) < nbinds {
- env.Binds = make([]r.Value, nbinds)
+ if cap(env.Vals) >= nbind {
+ env.Vals = env.Vals[0:nbind]
} else {
- env.Binds = env.Binds[0:nbinds]
+ env.Vals = make([]r.Value, nbind)
}
- if nintbinds <= 1 {
- env.IntBinds = ignoredIntBinds
- } else if cap(env.IntBinds) < nintbinds {
- env.IntBinds = make([]uint64, nintbinds)
+ if cap(env.Ints) >= nintbind {
+ env.Ints = env.Ints[0:nintbind]
} else {
- env.IntBinds = env.IntBinds[0:nintbinds]
+ env.Ints = make([]uint64, nintbind)
}
env.Outer = outer
+ env.Run = run
+ env.FileEnv = outer.FileEnv
+ return env
+}
+
+// return a new, nested Env with given number of binds and intbinds
+func NewEnv(outer *Env, nbind int, nintbind int) *Env {
+ run := outer.Run
+
+ // manually inline
+ // env := newEnv(run, outer, nbind, nintbind)
+ var env *Env
+ {
+ pool := &run.Pool // pool is an array, do NOT copy it!
+ index := run.PoolSize - 1
+ if index >= 0 {
+ run.PoolSize = index
+ env = pool[index]
+ pool[index] = nil
+ } else {
+ env = &Env{}
+ }
+ if cap(env.Vals) >= nbind {
+ env.Vals = env.Vals[0:nbind]
+ } else {
+ env.Vals = make([]r.Value, nbind)
+ }
+ if cap(env.Ints) >= nintbind {
+ env.Ints = env.Ints[0:nintbind]
+ } else {
+ env.Ints = make([]uint64, nintbind)
+ }
+ env.Outer = outer
+ env.Run = run
+ env.FileEnv = outer.FileEnv
+ }
env.IP = outer.IP
env.Code = outer.Code
- env.ThreadGlobals = tg
+ env.DebugPos = outer.DebugPos
+ env.CallDepth = outer.CallDepth
+ // this is a nested *Env, not a function body: to obtain the caller function,
+ // follow env.Outer.Outer... chain until you find an *Env with non-nil Caller
+ // env.Caller = nil
+ // DebugCallStack Debugf("NewEnv(%p->%p) nbind=%d nintbind=%d calldepth: %d->%d", outer, env, nbind, nintbind, outer.CallDepth, env.CallDepth)
+ run.CurrEnv = env
return env
}
-func NewEnv4Func(outer *Env, nbinds int, nintbinds int) *Env {
- tg := outer.ThreadGlobals
- pool := &tg.Pool // pool is an array, do NOT copy it!
- index := tg.PoolSize - 1
- var env *Env
- if index >= 0 {
- tg.PoolSize = index
- env = pool[index]
- pool[index] = nil
- } else {
- env = &Env{}
+func newEnv4Func(outer *Env, nbind int, nintbind int, debugComp *Comp) *Env {
+ goid := gls.GoID()
+ run := outer.Run
+ if run.goid != goid {
+ // no luck... get the correct ThreadGlobals for goid
+ run = run.getRun4Goid(goid)
}
- if nbinds <= 1 {
- env.Binds = ignoredBinds
- } else if cap(env.Binds) < nbinds {
- env.Binds = make([]r.Value, nbinds)
- } else {
- env.Binds = env.Binds[0:nbinds]
+ // manually inline
+ // env := newEnv(run, outer, nbind, nintbind)
+ var env *Env
+ {
+ pool := &run.Pool // pool is an array, do NOT copy it!
+ index := run.PoolSize - 1
+ if index >= 0 {
+ run.PoolSize = index
+ env = pool[index]
+ pool[index] = nil
+ } else {
+ env = &Env{}
+ }
+ if cap(env.Vals) >= nbind {
+ env.Vals = env.Vals[0:nbind]
+ } else {
+ env.Vals = make([]r.Value, nbind)
+ }
+ if cap(env.Ints) >= nintbind {
+ env.Ints = env.Ints[0:nintbind]
+ } else {
+ env.Ints = make([]uint64, nintbind)
+ }
+ env.Outer = outer
+ env.Run = run
+ env.FileEnv = outer.FileEnv
}
- if nintbinds <= 1 {
- env.IntBinds = ignoredIntBinds
- } else if cap(env.IntBinds) < nintbinds {
- env.IntBinds = make([]uint64, nintbinds)
+ env.DebugComp = debugComp
+ caller := run.CurrEnv
+ env.Caller = caller
+ if caller == nil {
+ env.CallDepth = 1
} else {
- env.IntBinds = env.IntBinds[0:nintbinds]
+ env.CallDepth = caller.CallDepth + 1
}
- env.Outer = outer
- env.ThreadGlobals = tg
- // Debugf("NewEnv4Func(%p->%p) binds=%d intbinds=%d", outer, env, nbinds, nintbinds)
+ // DebugCallStack Debugf("newEnv4Func(%p->%p) nbind=%d nintbind=%d calldepth: %d->%d", caller, env, nbind, nintbind, env.CallDepth-1, env.CallDepth)
+ run.CurrEnv = env
return env
}
@@ -230,63 +235,80 @@ func (env *Env) MarkUsedByClosure() {
}
}
-// FreeEnv tells the interpreter that given Env is no longer needed.
+// FreeEnv tells the interpreter that given nested *Env is no longer needed.
func (env *Env) FreeEnv() {
- // Debugf("FreeEnv(%p->%p), IP = %d of %d", env, env.Outer, env.Outer.IP, len(env.Outer.Code))
+ run := env.Run
+ run.CurrEnv = env.Outer
+ env.freeEnv(run)
+}
+
+// freeEnv4Func tells the interpreter that given function body *Env is no longer needed.
+func (env *Env) freeEnv4Func() {
+ run := env.Run
+ run.CurrEnv = env.Caller
+ env.freeEnv(run)
+}
+
+func (env *Env) freeEnv(run *Run) {
+ // DebugCallStack Debugf("FreeEnv(%p->%p), calldepth: %d->%d", env, caller, env.CallDepth, caller.CallDepth)
if env.UsedByClosure {
// in use, cannot recycle
return
}
- common := env.ThreadGlobals
- n := common.PoolSize
- if n >= PoolCapacity {
+ n := run.PoolSize
+ if n >= poolCapacity {
return
}
- if env.AddressTaken {
- env.IntBinds = nil
- env.AddressTaken = false
+ if env.IntAddressTaken {
+ env.Ints = nil
+ env.IntAddressTaken = false
}
env.Outer = nil
env.Code = nil
- env.ThreadGlobals = nil
- common.Pool[n] = env // pool is an array, be careful NOT to copy it!
- common.PoolSize = n + 1
-}
-
-func (c *Comp) IsCompiled() bool {
- return c.CompileOptions.IsCompiled()
-}
-
-func (c *Comp) ErrorIfCompiled(x interface{}) {
- if c.IsCompiled() {
- c.Errorf("internal error: compiler for %v has flag OptIsCompiled set. this should not happen!", x)
- }
+ env.DebugPos = nil
+ env.DebugComp = nil
+ env.Caller = nil
+ env.Run = nil
+ env.FileEnv = nil
+ run.Pool[n] = env // pool is an array, be careful NOT to copy it!
+ run.PoolSize = n + 1
}
func (env *Env) Top() *Env {
- for ; env != nil; env = env.Outer {
- if env.Outer == nil {
- break
+ if env == nil {
+ return nil
+ }
+ if file := env.FileEnv; file != nil {
+ if top := file.Outer; top != nil && top.Outer == nil {
+ return top
}
}
+ for o := env.Outer; o != nil; o = o.Outer {
+ env = o
+ }
return env
}
-func (env *Env) File() *Env {
- for ; env != nil; env = env.Outer {
- outer := env.Outer
- if outer == nil || outer.Outer == nil {
- break
- }
+func (env *Env) Up(n int) *Env {
+ for ; n >= 3; n -= 3 {
+ env = env.Outer.Outer.Outer
+ }
+ switch n {
+ case 2:
+ env = env.Outer
+ fallthrough
+ case 1:
+ env = env.Outer
}
return env
}
// combined Parse + MacroExpandCodeWalk
func (c *Comp) Parse(src string) Ast {
- c.Line = 0
+ // do NOT set c.Globals.Line = 0
+ // caller can do it manually if needed
nodes := c.ParseBytes([]byte(src))
- forms := AnyToAst(nodes, "Parse")
+ forms := anyToAst(nodes, "Parse")
forms, _ = c.MacroExpandCodewalk(forms)
if c.Options&OptShowMacroExpand != 0 {
@@ -295,24 +317,76 @@ func (c *Comp) Parse(src string) Ast {
return forms
}
+// compile code. support out-of-order declarations
func (c *Comp) Compile(in Ast) *Expr {
- switch form := in.(type) {
- case nil:
+ if in == nil {
return nil
- case AstWithNode:
- return c.CompileNode(form.Node())
- case AstWithSlice:
- n := form.Size()
- var list []*Expr
- for i := 0; i < n; i++ {
- e := c.Compile(form.Get(i))
+ }
+ switch node := in.Interface().(type) {
+ case *ast.File, ast.Decl, *ast.ValueSpec:
+ // complicated, use general technique below
+ case ast.Node:
+ // shortcut
+ return c.compileNode(node, dep.Unknown)
+ }
+ // order declarations by topological sort on their dependencies
+ sorter := dep.NewSorter()
+ sorter.LoadAst(in)
+
+ decls := sorter.All()
+
+ switch n := len(decls); n {
+ case 0:
+ return nil
+ case 1:
+ return c.compileDecl(decls[0])
+ default:
+ exprs := make([]*Expr, 0, n)
+ for _, decl := range decls {
+ e := c.compileDecl(decl)
if e != nil {
- list = append(list, e)
+ exprs = append(exprs, e)
}
}
- return exprList(list, c.CompileOptions)
+ return exprList(exprs, c.CompileOptions())
}
- c.Errorf("Compile: unsupported value, expecting or , found %v <%v>", in, r.TypeOf(in))
+ return nil
+}
+
+// compile code. support out-of-order declarations too
+func (c *Comp) CompileNode(node ast.Node) *Expr {
+ return c.Compile(ToAst(node))
+}
+
+func (c *Comp) compileDecl(decl *dep.Decl) *Expr {
+ if decl == nil {
+ return nil
+ }
+ if extra := decl.Extra; extra != nil {
+ // decl.Node may declare multiple constants or variables:
+ // do not use it!
+ // instead get the single const or var declaration from Extra
+ switch decl.Kind {
+ case dep.Const:
+ // see Comp.GenDecl() in declaration.go for a discussion
+ // on the scope where to declare iota, and what to do
+ // with any previous declaration of iota in the same scope
+ top := c.TopComp()
+ defer top.endIota(top.beginIota())
+ top.setIota(extra.Iota)
+
+ c.DeclConsts(extra.Spec(), nil, nil)
+ return c.Code.AsExpr()
+ case dep.Var:
+ c.DeclVars(extra.Spec())
+ return c.Code.AsExpr()
+ }
+ }
+ if node := decl.Node; node != nil {
+ return c.compileNode(node, decl.Kind)
+ }
+ // may happen for second and later variables in VarMulti,
+ // which CANNOT be declared individually
return nil
}
@@ -326,38 +400,61 @@ func (c *Comp) compileExpr(in Ast) *Expr {
return cf.Compile(in)
}
-func (c *Comp) CompileNode(node ast.Node) *Expr {
+// common backend for Compile, CompileNode, File, compileDecl.
+// does NOT support out-of-order declarations
+func (c *Comp) compileNode(node ast.Node, kind dep.Kind) *Expr {
if n := c.Code.Len(); n != 0 {
c.Warnf("Compile: discarding %d previously compiled statements from code buffer", n)
}
- c.Code.Clear()
if node == nil {
return nil
}
+ c.Code.Clear()
+ c.Loop = nil
+ c.Func = nil
+ c.Labels = nil
+ c.FuncMaker = nil
c.Pos = node.Pos()
switch node := node.(type) {
case ast.Decl:
c.Decl(node)
case ast.Expr:
- return c.Expr(node)
+ return c.Expr(node, nil)
+ case *ast.ImportSpec:
+ // dep.Sorter.Some() returns naked *ast.ImportSpec,
+ // instead of *ast.GenDecl containing one or more *ast.ImportSpec as parser does
+ c.Import(node)
+ case *ast.TypeSpec:
+ // dep.Sorter.Some() returns naked *ast.TypeSpec,
+ // instead of *ast.GenDecl containing one or more *ast.TypeSpec as parser does
+ if kind == dep.TypeFwd {
+ // forward type declaration
+ c.DeclNamedType(node.Name.Name)
+ } else {
+ c.DeclType(node)
+ }
case *ast.ExprStmt:
// special case of statement
- return c.Expr(node.X)
+ return c.Expr(node.X, nil)
case ast.Stmt:
c.Stmt(node)
case *ast.File:
- c.File(node)
+ // not c.File(node): unnecessary and risks an infinite recursion
+ for _, decl := range node.Decls {
+ c.Decl(decl)
+ }
default:
- c.Errorf("Compile: unsupported expression, expecting , , or <*ast.File>, found %v <%v>", node, r.TypeOf(node))
+ c.Errorf("unsupported node type, expecting , , or <*ast.File>, found %v <%v>", node, r.TypeOf(node))
return nil
}
return c.Code.AsExpr()
}
+// compile file. support out-of-order declarations too
func (c *Comp) File(node *ast.File) {
- c.Name = node.Name.Name
- for _, decl := range node.Decls {
- c.Decl(decl)
+ if node != nil {
+ c.Name = node.Name.Name
+ c.Compile(File{node})
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/compositelit.go b/vendor/github.com/cosmos72/gomacro/fast/compositelit.go
index 7f7cb0b..de76434 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/compositelit.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/compositelit.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* compositelit.go
@@ -30,11 +21,27 @@ import (
r "reflect"
. "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/base/untyped"
xr "github.com/cosmos72/gomacro/xreflect"
)
-func (c *Comp) CompositeLit(node *ast.CompositeLit) *Expr {
- t, ellipsis := c.compileType2(node.Type, false)
+func (c *Comp) CompositeLit(node *ast.CompositeLit, t xr.Type) *Expr {
+ var ellipsis bool
+ // node.Type is nil when exploiting type inference
+ if node.Type != nil {
+ var et xr.Type
+ et, ellipsis = c.compileType2(node.Type, false)
+ if et != nil {
+ if t == nil || et.AssignableTo(t) {
+ t = et
+ } else {
+ c.Errorf("invalid type for composite literal: <%v> %v, expecting %v", et, node.Type, t)
+ }
+ }
+ }
+ if t == nil {
+ c.Errorf("no explicit type and no inferred type, cannot compile composite literal: %v", node)
+ }
switch t.Kind() {
case r.Array:
return c.compositeLitArray(t, ellipsis, node)
@@ -44,10 +51,14 @@ func (c *Comp) CompositeLit(node *ast.CompositeLit) *Expr {
return c.compositeLitSlice(t, node)
case r.Struct:
return c.compositeLitStruct(t, node)
- default:
- c.Errorf("invalid type for composite literal: <%v> %v", t, node.Type)
- return nil
+ case r.Ptr:
+ switch t.Elem().Kind() {
+ case r.Array, r.Map, r.Slice, r.Struct:
+ return c.addressOf(node, t)
+ }
}
+ c.Errorf("invalid type for composite literal: <%v> %v", t, node.Type)
+ return nil
}
func (c *Comp) compositeLitArray(t xr.Type, ellipsis bool, node *ast.CompositeLit) *Expr {
@@ -62,7 +73,7 @@ func (c *Comp) compositeLitArray(t xr.Type, ellipsis bool, node *ast.CompositeLi
size, keys, funvals := c.compositeLitElements(t, ellipsis, node)
if ellipsis {
// rebuild type with correct length
- t = xr.ArrayOf(size, t.Elem())
+ t = c.Universe.ArrayOf(size, t.Elem())
rtype = t.ReflectType()
}
@@ -126,13 +137,13 @@ func (c *Comp) compositeLitElements(t xr.Type, ellipsis bool, node *ast.Composit
elv := el
switch elkv := el.(type) {
case *ast.KeyValueExpr:
- ekey := c.Expr1(elkv.Key)
+ ekey := c.Expr1(elkv.Key, nil)
if !ekey.Const() {
c.Errorf("literal %s index must be non-negative integer constant: %v", t.Kind(), elkv.Key)
} else if ekey.Untyped() {
key = ekey.ConstTo(c.TypeOfInt()).(int)
} else {
- key = convertLiteralCheckOverflow(ekey.Value, c.TypeOfInt()).(int)
+ key = untyped.ConvertLiteralCheckOverflow(ekey.Value, c.TypeOfInt()).(int)
}
lastkey = key
elv = elkv.Value
@@ -155,7 +166,7 @@ func (c *Comp) compositeLitElements(t xr.Type, ellipsis bool, node *ast.Composit
}
keys[i] = lastkey
- eval := c.Expr1(elv)
+ eval := c.Expr1(elv, tval)
if eval.Const() {
eval.ConstTo(tval)
} else if !eval.Type.AssignableTo(tval) {
@@ -186,7 +197,7 @@ func (c *Comp) compositeLitMap(t xr.Type, node *ast.CompositeLit) *Expr {
for i, el := range node.Elts {
switch elkv := el.(type) {
case *ast.KeyValueExpr:
- ekey := c.Expr1(elkv.Key)
+ ekey := c.Expr1(elkv.Key, tkey)
if ekey.Const() {
ekey.ConstTo(tkey)
if seen[ekey.Value] {
@@ -198,7 +209,7 @@ func (c *Comp) compositeLitMap(t xr.Type, node *ast.CompositeLit) *Expr {
} else {
ekey.To(c, tkey)
}
- eval := c.Expr1(elkv.Value)
+ eval := c.Expr1(elkv.Value, tval)
if eval.Const() {
eval.ConstTo(tval)
} else if !eval.Type.AssignableTo(tval) {
@@ -260,7 +271,7 @@ func (c *Comp) compositeLitStruct(t xr.Type, node *ast.CompositeLit) *Expr {
if !ok {
c.Errorf("unknown field '%v' in struct literal of type %v", name, t)
}
- expr := c.Expr1(elkv.Value)
+ expr := c.Expr1(elkv.Value, field.Type)
if expr.Const() {
expr.ConstTo(field.Type)
} else if !expr.Type.AssignableTo(field.Type) {
@@ -279,7 +290,7 @@ func (c *Comp) compositeLitStruct(t xr.Type, node *ast.CompositeLit) *Expr {
c.Errorf("mixture of field:value and value in struct literal: %v", node)
}
field := t.Field(i)
- expr := c.Expr1(el)
+ expr := c.Expr1(el, field.Type)
if expr.Const() {
expr.ConstTo(field.Type)
} else if !expr.Type.AssignableTo(field.Type) {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/convert.go b/vendor/github.com/cosmos72/gomacro/fast/convert.go
index 37fd61f..bbffdb4 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/convert.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/convert.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* convert.go
@@ -35,19 +26,31 @@ import (
// Convert compiles a type conversion expression
func (c *Comp) Convert(node ast.Expr, t xr.Type) *Expr {
- e := c.Expr1(node)
+ e := c.Expr1(node, nil)
+
+ return c.convert(e, t, node)
+}
+
+// Convert compiles a type conversion expression
+func (c *Comp) convert(e *Expr, t xr.Type, nodeOpt ast.Expr) *Expr {
if e.Untyped() {
- e.ConstTo(e.DefaultType())
+ e.ConstTo(t)
}
- if xr.SameType(e.Type, t) {
+ if e.Type != nil && e.Type.IdenticalTo(t) {
return e
+ } else if e.Type != nil && e.Type.ReflectType() == t.ReflectType() {
+ if e.Const() {
+ return c.exprValue(t, e.Value)
+ } else {
+ return exprFun(t, e.Fun)
+ }
} else if e.Type == nil && IsNillableKind(t.Kind()) {
e.Type = t
e.Value = xr.Zero(t).Interface()
} else if e.Type != nil && e.Type.ConvertibleTo(t) {
} else {
- c.Errorf("cannot convert %v to %v: %v", e.Type, t, node)
+ c.Errorf("cannot convert %v to %v: %v", e.Type, t, nodeOpt)
return nil
}
rtype := t.ReflectType()
@@ -146,7 +149,7 @@ func (c *Comp) Convert(node ast.Expr, t xr.Type) *Expr {
default:
if conv := c.Converter(e.Type, t); conv != nil {
ret = func(env *Env) r.Value {
- return conv(fun(env), rtype)
+ return conv(fun(env))
}
} else {
ret = func(env *Env) r.Value {
@@ -154,12 +157,16 @@ func (c *Comp) Convert(node ast.Expr, t xr.Type) *Expr {
}
}
}
- return exprFun(t, ret)
+ eret := exprFun(t, ret)
+ if e.Const() {
+ eret.EvalConst(COptKeepUntyped)
+ }
+ return eret
}
// Converter returns a function that converts reflect.Value from tin to tout
// also supports conversion from interpreted types to interfaces
-func (c *Comp) Converter(tin, tout xr.Type) func(val r.Value, rtout r.Type) r.Value {
+func (c *Comp) Converter(tin, tout xr.Type) func(r.Value) r.Value {
if !tin.ConvertibleTo(tout) {
c.Errorf("cannot convert from <%v> to <%v>", tin, tout)
}
@@ -170,12 +177,90 @@ func (c *Comp) Converter(tin, tout xr.Type) func(val r.Value, rtout r.Type) r.Va
return nil
case rtin.ConvertibleTo(rtout):
// most conversions, including from compiled type to compiled interface
- return r.Value.Convert
- case tin.Kind() != r.Interface && rtout.Kind() == r.Interface:
- // conversion from interpreted type to compiled interface
- return c.converterToInterface(tin, tout)
+ if rtin.Kind() != r.Interface {
+ return func(obj r.Value) r.Value {
+ return obj.Convert(rtout)
+ }
+ }
+ // extract objects wrapped in proxies (if any)
+ g := c.CompGlobals
+ return func(obj r.Value) r.Value {
+ obj, _ = g.extractFromProxy(obj)
+ if obj.IsValid() {
+ return obj.Convert(rtout)
+ } else {
+ return r.Zero(rtout)
+ }
+ }
+ case xr.IsEmulatedInterface(tout):
+ // conversion from type to emulated interface
+ return c.converterToEmulatedInterface(tin, tout)
+ case rtin == c.Universe.TypeOfForward.ReflectType():
+ // conversion from forward-declared type
+ return c.converterFromForward(tin, tout)
+ case rtout.Kind() == r.Interface:
+ // conversion from interpreted type to compiled interface.
+ // must use a proxy that pre-implement compiled interfaces.
+ return c.converterToProxy(tin, tout)
+ case rtin.Kind() == r.Func && rtout.Kind() == r.Func:
+ // conversion between func() and self-referencing named func type,
+ // as for example type F func(F)
+ return c.converterFunc(tin, tout)
default:
- c.Errorf("unimplemented conversion from <%v> to <%v>", tin, tout)
+ c.Errorf("unimplemented conversion from <%v> to <%v> with reflect.Type <%v> to <%v>",
+ tin, tout, rtin, rtout)
return nil
}
}
+
+// conversion from forward-declared type
+func (c *Comp) converterFromForward(tin, tout xr.Type) func(r.Value) r.Value {
+ rtout := tout.ReflectType()
+ return func(val r.Value) r.Value {
+ val = val.Elem()
+ if val.Type() != rtout {
+ val = val.Convert(rtout)
+ }
+ return val
+ }
+}
+
+// conversion between func() and self-referencing named func type,
+// as for example type F func(F)
+func (c *Comp) converterFunc(tin, tout xr.Type) func(r.Value) r.Value {
+ rtin := tin.ReflectType()
+ rtout := tout.ReflectType()
+ nin := rtin.NumIn()
+ nout := rtin.NumOut()
+ if nin != rtout.NumIn() || nout != rtout.NumOut() || rtin.IsVariadic() != rtout.IsVariadic() {
+
+ c.Errorf("unimplemented conversion from <%v> to <%v> with reflect.Type <%v> to <%v>",
+ tin, tout, rtin, rtout)
+ }
+ convarg := make([]func(r.Value) r.Value, nin)
+ for i := 0; i < nin; i++ {
+ // arguments must be adapted to actual func type: rtin
+ convarg[i] = c.Converter(tout.In(i), tin.In(i))
+ }
+ convret := make([]func(r.Value) r.Value, nout)
+ for i := 0; i < nout; i++ {
+ // results must be adapted to expected func type: rtout
+ convret[i] = c.Converter(tin.Out(i), tout.Out(i))
+ }
+ return func(f r.Value) r.Value {
+ return r.MakeFunc(rtout, func(args []r.Value) []r.Value {
+ for i, conv := range convarg {
+ if conv != nil {
+ args[i] = conv(args[i])
+ }
+ }
+ rets := f.Call(args)
+ for i, conv := range convret {
+ if conv != nil {
+ rets[i] = conv(rets[i])
+ }
+ }
+ return rets
+ })
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/debug.go b/vendor/github.com/cosmos72/gomacro/fast/debug.go
new file mode 100644
index 0000000..7e599fb
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/debug.go
@@ -0,0 +1,156 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * debug.go
+ *
+ * Created on Apr 20, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package fast
+
+import (
+ "go/ast"
+ "go/token"
+
+ . "github.com/cosmos72/gomacro/base"
+)
+
+type stubDebugger struct{}
+
+func (s stubDebugger) Breakpoint(ir *Interp, env *Env) DebugOp {
+ return DebugOpContinue
+}
+
+func (s stubDebugger) At(ir *Interp, env *Env) DebugOp {
+ return DebugOpContinue
+}
+
+// return true if statement is either "break" or _ = "break"
+func isBreakpoint(stmt ast.Stmt) bool {
+ switch node := stmt.(type) {
+ case *ast.ExprStmt:
+ return isBreakLiteral(node.X)
+ case *ast.AssignStmt:
+ if node.Tok == token.ASSIGN && len(node.Lhs) == 1 && len(node.Rhs) == 1 {
+ return isUnderscore(node.Lhs[0]) && isBreakLiteral(node.Rhs[0])
+ }
+ }
+ return false
+}
+
+func isUnderscore(node ast.Expr) bool {
+ switch node := node.(type) {
+ case *ast.Ident:
+ return node.Name == "_"
+ }
+ return false
+}
+
+func isBreakLiteral(node ast.Expr) bool {
+ switch node := node.(type) {
+ case *ast.BasicLit:
+ return node.Kind == token.STRING && node.Value == `"break"`
+ }
+ return false
+}
+
+func (c *Comp) breakpoint() Stmt {
+ return func(env *Env) (Stmt, *Env) {
+ ir := Interp{c, env}
+ sig := ir.debug(true)
+ env.IP++
+ stmt := env.Code[env.IP]
+ if sig != SigNone {
+ run := env.Run
+ stmt = run.Interrupt
+ if run.Options&OptDebugDebugger != 0 {
+ run.Debugf("after breakpoint: single-stepping with stmt = %p, env = %p, IP = %v, execFlags = %v, signals = %#v", stmt, env, env.IP, run.ExecFlags, run.Signals)
+ }
+ }
+ return stmt, env
+ }
+}
+
+func singleStep(env *Env) (Stmt, *Env) {
+ stmt := env.Code[env.IP]
+ run := env.Run
+ if run.Signals.Debug == SigNone {
+ return stmt, env // resume normal execution
+ }
+
+ if env.CallDepth < run.DebugDepth {
+ if run.Options&OptDebugDebugger != 0 {
+ run.Debugf("single-stepping: stmt = %p, env = %p, IP = %v, env.CallDepth = %d, g.DebugDepth = %d", stmt, env, env.IP, env.CallDepth, run.DebugDepth)
+ }
+ c := env.DebugComp
+ if c != nil {
+ ir := Interp{c, env}
+ sig := ir.debug(false) // not a breakpoint
+ if sig != SigNone {
+ run := env.Run
+ run.Signals.Debug = sig
+ }
+ }
+ }
+
+ // single step
+ stmt, env = stmt(env)
+ if run.Signals.Debug != SigNone {
+ stmt = run.Interrupt
+ }
+ return stmt, env
+}
+
+func (ir *Interp) debug(breakpoint bool) Signal {
+ run := ir.env.Run
+ if run.Debugger == nil {
+ ir.Comp.Warnf("// breakpoint: no debugger set with Interp.SetDebugger(), resuming execution (warned only once)")
+ run.Debugger = stubDebugger{}
+ }
+ var op DebugOp
+ if breakpoint {
+ op = run.Debugger.Breakpoint(ir, ir.env)
+ } else {
+ op = run.Debugger.At(ir, ir.env)
+ }
+ if run.Options&OptDebugDebugger != 0 {
+ run.Debugf("Debugger returned op = %v", op)
+ }
+ return run.applyDebugOp(op)
+}
+
+func (run *Run) applyDebugOp(op DebugOp) Signal {
+ if op.Panic != nil {
+ if run.Options&OptDebugDebugger != 0 {
+ run.Debugf("applyDebugOp: op = %v, signaling panic(%v)", op, *op.Panic)
+ }
+ panic(*op.Panic)
+ }
+ saveOp := op
+ var sig Signal
+ if op.Depth > 0 {
+ sig = SigDebug
+ } else {
+ sig = SigNone
+ op.Depth = 0
+ }
+ if run.Options&OptDebugDebugger != 0 {
+ if op == saveOp {
+ run.Debugf("applyDebugOp: op = %v, updated run.DebugDepth from %v to %v", op, run.DebugDepth, op.Depth)
+ } else {
+ run.Debugf("applyDebugOp: op = %v, replaced with %v and updated run.DebugDepth from %v to %v", saveOp, op, run.DebugDepth, op.Depth)
+ }
+ }
+ run.DebugDepth = op.Depth
+ run.ExecFlags.SetDebug(sig != SigNone)
+ run.Signals.Debug = sig
+ return sig
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/debug/api.go b/vendor/github.com/cosmos72/gomacro/fast/debug/api.go
new file mode 100644
index 0000000..132df20
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/debug/api.go
@@ -0,0 +1,60 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * api.go
+ *
+ * Created on Apr 21, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package debug
+
+import (
+ "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/fast"
+)
+
+type DebugOp = fast.DebugOp
+
+var (
+ DebugOpContinue = fast.DebugOpContinue
+ DebugOpStep = fast.DebugOpStep
+ DebugOpRepl = DebugOp{-1, nil}
+)
+
+type Debugger struct {
+ interp *fast.Interp
+ env *fast.Env
+ globals *base.Globals
+ lastcmd string
+}
+
+func (d *Debugger) Breakpoint(interp *fast.Interp, env *fast.Env) DebugOp {
+ return d.main(interp, env, true)
+}
+
+func (d *Debugger) At(interp *fast.Interp, env *fast.Env) DebugOp {
+ return d.main(interp, env, false)
+}
+
+func (d *Debugger) main(interp *fast.Interp, env *fast.Env, breakpoint bool) DebugOp {
+ // create an inner Interp to preserve existing Binds, compiled Code and IP
+ //
+ // this is needed to allow compiling and evaluating code at a breakpoint or single step
+ // without disturbing the code being debugged
+ d.interp = fast.NewInnerInterp(interp, "debug", "debug")
+ d.env = env
+ d.globals = &interp.Comp.Globals
+ if !d.Show(breakpoint) {
+ // skip synthetic statements
+ return DebugOp{Depth: env.Run.DebugDepth}
+ }
+ return d.Repl()
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/debug/backtrace.go b/vendor/github.com/cosmos72/gomacro/fast/debug/backtrace.go
new file mode 100644
index 0000000..294d20b
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/debug/backtrace.go
@@ -0,0 +1,68 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * backtrace.go
+ *
+ * Created on Apr 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package debug
+
+import (
+ "github.com/cosmos72/gomacro/fast"
+)
+
+func (d *Debugger) Backtrace(arg string) DebugOp {
+ env := d.env
+ var calls []*fast.Env
+ for env != nil {
+ if env.Caller != nil {
+ // function body
+ calls = append(calls, env)
+ env = env.Caller
+ } else {
+ // nested env
+ env = env.Outer
+ }
+ }
+ d.showFunctionCalls(calls)
+ return DebugOpRepl
+}
+
+func (d *Debugger) showFunctionCalls(calls []*fast.Env) {
+ // show outermost stack frame first
+ for i := len(calls) - 1; i >= 0; i-- {
+ d.showFunctionCall(calls[i])
+ }
+}
+
+func (d *Debugger) showFunctionCall(env *fast.Env) {
+ g := d.globals
+ c := env.DebugComp
+ if c == nil || c.FuncMaker == nil {
+ g.Fprintf(g.Stdout, "%p\tfunc (???) ???\n", env)
+ return
+ }
+ m := c.FuncMaker
+
+ g.Fprintf(g.Stdout, "%p\tfunc %s(", env, m.Name)
+ d.showBinds(env, m.Param)
+ g.Fprintf(g.Stdout, ") ")
+ if len(m.Result) > 1 {
+ g.Fprintf(g.Stdout, "(")
+ }
+ d.showBinds(env, m.Result)
+ if len(m.Result) > 1 {
+ g.Fprintf(g.Stdout, ")\n")
+ } else {
+ g.Fprintf(g.Stdout, "\n")
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/debug/bind.go b/vendor/github.com/cosmos72/gomacro/fast/debug/bind.go
new file mode 100644
index 0000000..0ac1a16
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/debug/bind.go
@@ -0,0 +1,93 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * bind.go
+ *
+ * Created on Apr 27, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package debug
+
+import (
+ "sort"
+
+ "github.com/cosmos72/gomacro/fast"
+)
+
+// show local variables
+func (d *Debugger) Vars() {
+ env := d.env
+ var envs []*fast.Env
+ for env != nil {
+ envs = append(envs, env)
+ env = env.Outer
+ if env == nil || env.FileEnv == env {
+ break // omit global variables
+ }
+ }
+ d.showEnvs(envs)
+}
+
+func (d *Debugger) showEnvs(envs []*fast.Env) {
+ // show outermost scope first
+ for i := len(envs) - 1; i >= 0; i-- {
+ d.showEnv(envs[i])
+ }
+}
+
+func (d *Debugger) showEnv(env *fast.Env) {
+ c := env.DebugComp
+ if c == nil || (c.BindNum == 0 && c.IntBindNum == 0) {
+ return
+ }
+ g := d.globals
+ g.Fprintf(g.Stdout, "// ----------\n")
+ binds := make([]*fast.Bind, len(c.Binds))
+ i := 0
+ for _, bind := range c.Binds {
+ binds[i] = bind
+ i++
+ }
+ sort.Slice(binds, func(i, j int) bool {
+ return binds[i].Name < binds[j].Name
+ })
+ for _, bind := range binds {
+ value := bind.RuntimeValue(env)
+ g.Fprintf(g.Stdout, "%s\t= %v\t// %v\n", bind.Name, value, bind.Type)
+ }
+}
+
+// =============================================================================
+
+func (d *Debugger) showBinds(env *fast.Env, binds []*fast.Bind) {
+ g := d.globals
+ for i, bind := range binds {
+ if i != 0 {
+ g.Fprintf(g.Stdout, ", ")
+ }
+ d.showBind(env, bind)
+ }
+}
+
+func (d *Debugger) showBind(env *fast.Env, bind *fast.Bind) {
+ value := bind.RuntimeValue(env)
+ var ivalue interface{} = value
+ if !value.IsValid() {
+ ivalue = "nil"
+ }
+
+ g := d.globals
+ if name := bind.Name; len(name) != 0 {
+ g.Fprintf(g.Stdout, "%s=%v <%v>", name, ivalue, bind.Type)
+ } else {
+ g.Fprintf(g.Stdout, "%v <%v>", ivalue, bind.Type)
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/debug/cmd.go b/vendor/github.com/cosmos72/gomacro/fast/debug/cmd.go
new file mode 100644
index 0000000..0d50ca4
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/debug/cmd.go
@@ -0,0 +1,161 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * global.go
+ *
+ * Created on Apr 21, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package debug
+
+import (
+ "strings"
+
+ "github.com/cosmos72/gomacro/base"
+)
+
+type Cmd struct {
+ Name string
+ Func func(d *Debugger, arg string) DebugOp
+}
+
+type Cmds map[byte]Cmd
+
+func (cmd *Cmd) Match(prefix string) bool {
+ return strings.HasPrefix(cmd.Name, prefix)
+}
+
+func (cmds Cmds) Lookup(prefix string) (Cmd, bool) {
+ if len(prefix) != 0 {
+ cmd, found := cmds[prefix[0]]
+ if found && cmd.Match(prefix) {
+ return cmd, true
+ }
+ }
+ return Cmd{}, false
+}
+
+var cmds = Cmds{
+ 'b': Cmd{"backtrace", (*Debugger).cmdBacktrace},
+ 'c': Cmd{"continue", (*Debugger).cmdContinue},
+ 'e': Cmd{"env", (*Debugger).cmdEnv},
+ 'f': Cmd{"finish", (*Debugger).cmdFinish},
+ 'h': Cmd{"help", (*Debugger).cmdHelp},
+ '?': Cmd{"?", (*Debugger).cmdHelp},
+ 'i': Cmd{"inspect", (*Debugger).cmdInspect},
+ 'k': Cmd{"kill", (*Debugger).cmdKill},
+ 'l': Cmd{"list", (*Debugger).cmdList},
+ 'n': Cmd{"next", (*Debugger).cmdNext},
+ 'p': Cmd{"print", (*Debugger).cmdPrint},
+ 's': Cmd{"step", (*Debugger).cmdStep},
+ 'v': Cmd{"vars", (*Debugger).cmdVars},
+}
+
+// execute one of the debugger commands
+func (d *Debugger) Cmd(src string) DebugOp {
+ op := DebugOpRepl
+ src = strings.TrimSpace(src)
+ n := len(src)
+ if n > 0 {
+ prefix, arg := base.Split2(src, ' ')
+ cmd, found := cmds.Lookup(prefix)
+ if found {
+ d.lastcmd = src
+ op = cmd.Func(d, arg)
+ } else {
+ g := d.globals
+ g.Fprintf(g.Stdout, "// unknown debugger command, type ? for help: %s\n", src)
+ }
+ }
+ return op
+}
+
+func (d *Debugger) cmdBacktrace(arg string) DebugOp {
+ d.Backtrace(arg)
+ return DebugOpRepl
+}
+
+func (d *Debugger) cmdContinue(arg string) DebugOp {
+ return DebugOpContinue
+}
+
+func (d *Debugger) cmdEnv(arg string) DebugOp {
+ d.interp.ShowPackage(arg)
+ return DebugOpRepl
+}
+
+func (d *Debugger) cmdFinish(arg string) DebugOp {
+ return DebugOp{d.env.CallDepth, nil}
+}
+
+func (d *Debugger) cmdHelp(arg string) DebugOp {
+ d.Help()
+ return DebugOpRepl
+}
+
+func (d *Debugger) cmdInspect(arg string) DebugOp {
+ if len(arg) == 0 {
+ g := d.globals
+ g.Fprintf(g.Stdout, "// inspect: missing argument\n")
+ } else {
+ d.interp.Inspect(arg)
+ }
+ return DebugOpRepl
+}
+
+func (d *Debugger) cmdKill(arg string) DebugOp {
+ var panick interface{} = base.SigInterrupt
+ if len(arg) != 0 {
+ vals, _ := d.Eval(arg)
+ if len(vals) != 0 {
+ if !vals[0].IsValid() {
+ panick = nil
+ } else {
+ val := vals[0]
+ if val.CanInterface() {
+ panick = val.Interface()
+ } else {
+ panick = val
+ }
+ }
+ }
+ }
+ return DebugOp{0, &panick}
+}
+
+func (d *Debugger) cmdList(arg string) DebugOp {
+ d.Show(false)
+ return DebugOpRepl
+}
+
+func (d *Debugger) cmdNext(arg string) DebugOp {
+ return DebugOp{d.env.CallDepth + 1, nil}
+}
+
+func (d *Debugger) cmdPrint(arg string) DebugOp {
+ g := d.globals
+ if len(arg) == 0 {
+ g.Fprintf(g.Stdout, "// print: missing argument\n")
+ } else {
+ vals, types := d.Eval(arg)
+ g.Print(vals, types)
+ }
+ return DebugOpRepl
+}
+
+func (d *Debugger) cmdStep(arg string) DebugOp {
+ return DebugOpStep
+}
+
+func (d *Debugger) cmdVars(arg string) DebugOp {
+ d.Vars()
+ return DebugOpRepl
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/debug/debugger.go b/vendor/github.com/cosmos72/gomacro/fast/debug/debugger.go
new file mode 100644
index 0000000..9bbe1f8
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/debug/debugger.go
@@ -0,0 +1,153 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * debugger.go
+ *
+ * Created on Apr 21, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package debug
+
+import (
+ "go/token"
+ "reflect"
+ "runtime/debug"
+
+ "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/xreflect"
+)
+
+func (d *Debugger) Help() {
+ g := d.globals
+ g.Fprintf(g.Stdout, "%s", `// debugger commands:
+backtrace show call stack
+env [NAME] show available functions, variables and constants
+ in current scope, or from imported package NAME
+? show this help
+help show this help
+inspect EXPR inspect expression interactively
+kill [EXPR] terminate execution with panic(EXPR)
+print EXPR print expression, statement or declaration
+list show current source code
+continue resume normal execution
+finish run until the end of current function
+next execute a single statement, skipping functions
+step execute a single statement, entering functions
+vars show local variables
+// abbreviations are allowed if unambiguous. enter repeats last command.
+`)
+ /*
+ not implemented yet:
+
+ backtrace [N] show function stack frames
+ */
+}
+
+func (d *Debugger) Show(breakpoint bool) bool {
+ // d.env is the Env being debugged.
+ // to execute code at debugger prompt, use d.interp
+ env := d.env
+ pos := env.DebugPos
+ g := d.globals
+ ip := env.IP
+
+ var label string
+ if breakpoint {
+ label = "breakpoint"
+ } else {
+ label = "stopped"
+ }
+ if ip < len(pos) && g.Fileset != nil {
+ p := pos[ip]
+ if p == token.NoPos {
+ return false
+ }
+ source, pos := g.Fileset.Source(p)
+ g.Fprintf(g.Stdout, "// %s at %s IP=%d, call depth=%d. type ? for debugger help\n", label, pos, ip, env.CallDepth)
+ if len(source) != 0 {
+ g.Fprintf(g.Stdout, "%s\n", source)
+ d.showCaret(source, pos.Column)
+ }
+ } else {
+ g.Fprintf(g.Stdout, "// %s at IP=%d, call depth=%d. type ? for debugger help\n", label, ip, env.CallDepth)
+ }
+ return true
+}
+
+var spaces = []byte(" ")
+
+func (d *Debugger) showCaret(source string, col int) {
+ col--
+ n := len(source)
+ if col >= 0 && col < n && n >= 5 {
+ out := d.globals.Stdout
+ chunk := len(spaces)
+ for col >= chunk {
+ out.Write(spaces)
+ col -= chunk
+ }
+ out.Write(spaces[:col])
+ out.Write([]byte("^^^\n"))
+ }
+}
+
+func (d *Debugger) Repl() DebugOp {
+ g := d.globals
+ var opts base.ReadOptions
+ if g.Options&base.OptShowPrompt != 0 {
+ opts |= base.ReadOptShowPrompt
+ }
+ op := DebugOpRepl
+ for op == DebugOpRepl {
+ src, firstToken := g.ReadMultiline(opts, "debug> ")
+ empty := len(src) == 0
+ if firstToken < 0 && empty {
+ // EOF
+ op = DebugOpContinue
+ break
+ }
+ if empty || src == "\n" {
+ // keyboard enter repeats last command
+ src = d.lastcmd
+ }
+ if g.Options&base.OptDebugDebugger != 0 {
+ g.Debugf("Debugger: command is %q", src)
+ }
+ op = d.Cmd(src)
+ }
+ return op
+}
+
+func (d *Debugger) Eval(src string) ([]reflect.Value, []xreflect.Type) {
+ g := d.globals
+ trap := g.Options&base.OptTrapPanic != 0
+
+ // do NOT debug expression evaluated at debugger prompt!
+ sig := &d.env.Run.Signals
+ sigdebug := sig.Debug
+ sig.Debug = base.SigNone
+
+ defer func() {
+ sig.Debug = sigdebug
+ if trap {
+ rec := recover()
+ if g.Options&base.OptPanicStackTrace != 0 {
+ g.Fprintf(g.Stderr, "%v\n%s", rec, debug.Stack())
+ } else {
+ g.Fprintf(g.Stderr, "%v\n", rec)
+ }
+ }
+ }()
+ vals, types := d.interp.Eval(src)
+
+ trap = false // no panic happened
+ return vals, types
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/declaration.go b/vendor/github.com/cosmos72/gomacro/fast/declaration.go
index c042243..1148dc1 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/declaration.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/declaration.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* declaration.go
@@ -45,7 +36,7 @@ func (c *Comp) Decl(node ast.Decl) {
case *ast.FuncDecl:
c.FuncDecl(node)
default:
- c.Errorf("Compile: unsupported declaration, expecting <*ast.GenDecl> or <*ast.FuncDecl>, found: %v <%v>", node, r.TypeOf(node))
+ c.Errorf("unsupported declaration, expecting <*ast.GenDecl> or <*ast.FuncDecl>, found: %v <%v>", node, r.TypeOf(node))
}
}
@@ -56,26 +47,25 @@ func (c *Comp) GenDecl(node *ast.GenDecl) {
for _, decl := range node.Specs {
c.Import(decl)
}
- /*
- case token.PACKAGE:
- // modified parser converts 'package foo' to ast.GenDecl{Tok: token.Package}
- for _, decl := range node.Specs {
- c.changePackage(decl)
- }
- */
case token.CONST:
var defaultType ast.Expr
var defaultExprs []ast.Expr
+ // https://go-review.googlesource.com/c/go/+/71750
+ // states "each block has its own version of iota"
+ // which is also implied, although somewhat subtly,
+ // by the latest definition of iota in Go language specs.
+ //
+ // So declare iota in the top scope, but restore the original bind after the const declarations,
+ // because an in-progress outer const declaration may have a current value for it.
top := c.TopComp()
- top.addIota()
- defer top.removeIota()
- for _, decl := range node.Specs {
+ defer top.endIota(top.beginIota())
+ for i, decl := range node.Specs {
+ top.setIota(i)
c.DeclConsts(decl, defaultType, defaultExprs)
if valueSpec, ok := decl.(*ast.ValueSpec); ok && valueSpec.Values != nil {
defaultType = valueSpec.Type
defaultExprs = valueSpec.Values
}
- top.incrementIota()
}
case token.TYPE:
for _, decl := range node.Specs {
@@ -85,9 +75,41 @@ func (c *Comp) GenDecl(node *ast.GenDecl) {
for _, decl := range node.Specs {
c.DeclVars(decl)
}
+ case token.PACKAGE:
+ /*
+ modified parser converts 'package foo' to:
+
+ ast.GenDecl{
+ Tok: token.PACKAGE,
+ Specs: []ast.Spec{
+ &ast.ValueSpec{
+ Values: []ast.Expr{
+ &ast.BasicLit{
+ Kind: token.String,
+ Value: "path/to/package",
+ },
+ },
+ },
+ },
+ }
+ */
+ if len(node.Specs) == 1 {
+ if decl, ok := node.Specs[0].(*ast.ValueSpec); ok {
+ if len(decl.Values) == 1 {
+ if lit, ok := decl.Values[0].(*ast.BasicLit); ok {
+ if lit.Kind == token.STRING && (lit.Value == c.Name || base.MaybeUnescapeString(lit.Value) == c.Path) {
+ break
+ }
+ }
+ // c.changePackage(name)
+ c.Debugf("cannot switch package from fast.Comp.Compile(), use Interp.ChangePackage() instead: %v // %T", node, node)
+ }
+ }
+ }
+ c.Errorf("unsupported package syntax, expecting a single package name, found: %v // %T", node, node)
default:
- c.Errorf("Compile: unsupported declaration kind, expecting token.IMPORT, token.CONST, token.TYPE or token.VAR, found %v: %v <%v>",
- node.Tok, node, r.TypeOf(node))
+ c.Errorf("unsupported declaration kind, expecting token.IMPORT, token.PACKAGE, token.CONST, token.TYPE or token.VAR, found %v: %v // %T",
+ node.Tok, node, node)
}
}
@@ -100,10 +122,10 @@ func (c *Comp) DeclConsts(node ast.Spec, defaultType ast.Expr, defaultExprs []as
defaultType = node.Type
defaultExprs = node.Values
}
- names, t, inits := c.prepareDeclConstsOrVars(tostrings(node.Names), defaultType, defaultExprs)
+ names, t, inits := c.prepareDeclConstsOrVars(toStrings(node.Names), defaultType, defaultExprs)
c.DeclConsts0(names, t, inits)
default:
- c.Errorf("Compile: unsupported constant declaration: expecting <*ast.ValueSpec>, found: %v <%v>", node, r.TypeOf(node))
+ c.Errorf("unsupported constant declaration: expecting <*ast.ValueSpec>, found: %v <%v>", node, r.TypeOf(node))
}
}
@@ -112,29 +134,34 @@ func (c *Comp) DeclVars(node ast.Spec) {
c.Pos = node.Pos()
switch node := node.(type) {
case *ast.ValueSpec:
- names, t, inits := c.prepareDeclConstsOrVars(tostrings(node.Names), node.Type, node.Values)
- c.DeclVars0(names, t, inits)
+ names, t, inits := c.prepareDeclConstsOrVars(toStrings(node.Names), node.Type, node.Values)
+ c.DeclVars0(names, t, inits, toPos(node.Names))
default:
- c.Errorf("Compile: unsupported variable declaration: expecting <*ast.ValueSpec>, found: %v <%v>", node, r.TypeOf(node))
+ c.Errorf("unsupported variable declaration: expecting <*ast.ValueSpec>, found: %v <%v>", node, r.TypeOf(node))
}
}
// DeclVarsShort compiles a set of variable short declarations i.e. "x1, x2... := expr1, expr2..."
func (c *Comp) DeclVarsShort(lhs []ast.Expr, rhs []ast.Expr) {
n := len(lhs)
+ if n == 0 {
+ return
+ }
names := make([]string, n)
+ pos := make([]token.Pos, n)
for i := range lhs {
if ident, ok := lhs[i].(*ast.Ident); ok {
names[i] = ident.Name
+ pos[i] = ident.NamePos
} else {
c.Errorf("non-name %v on left side of :=", lhs[i])
}
}
_, t, inits := c.prepareDeclConstsOrVars(names, nil, rhs)
- c.DeclVars0(names, t, inits)
+ c.DeclVars0(names, t, inits, pos)
}
-func tostrings(idents []*ast.Ident) []string {
+func toStrings(idents []*ast.Ident) []string {
n := len(idents)
names := make([]string, n)
for i, ident := range idents {
@@ -143,6 +170,15 @@ func tostrings(idents []*ast.Ident) []string {
return names
}
+func toPos(idents []*ast.Ident) []token.Pos {
+ n := len(idents)
+ pos := make([]token.Pos, n)
+ for i, ident := range idents {
+ pos[i] = ident.NamePos
+ }
+ return pos
+}
+
func (c *Comp) prepareDeclConstsOrVars(names []string, typ ast.Expr, exprs []ast.Expr) (names_out []string, t xr.Type, inits []*Expr) {
n := len(names)
if typ != nil {
@@ -171,19 +207,23 @@ func (c *Comp) DeclConsts0(names []string, t xr.Type, inits []*Expr) {
}
// DeclVars0 compiles a set of variable declarations
-func (c *Comp) DeclVars0(names []string, t xr.Type, inits []*Expr) {
+func (c *Comp) DeclVars0(names []string, t xr.Type, inits []*Expr, pos []token.Pos) {
n := len(names)
ni := len(inits)
- if ni == 0 {
- for i := 0; i < n; i++ {
- c.DeclVar0(names[i], t, nil)
- }
- } else if ni == n {
- for i := 0; i < n; i++ {
- c.DeclVar0(names[i], t, inits[i])
+ if ni == 0 || ni == n {
+ npos := len(pos)
+ for i, name := range names {
+ var init *Expr
+ if i < ni {
+ init = inits[i]
+ }
+ if i < npos {
+ c.Pos = pos[i]
+ }
+ c.DeclVar0(name, t, init)
}
} else if ni == 1 && n > 1 {
- c.DeclMultiVar0(names, t, inits[0])
+ c.DeclMultiVar0(names, t, inits[0], pos)
} else {
c.Errorf("cannot declare %d variables from %d expressions: %v", n, ni, names)
}
@@ -201,35 +241,50 @@ func (c *Comp) DeclConst0(name string, t xr.Type, value I) {
} else {
value = lit.ConstTo(t)
}
- bind := c.AddBind(name, ConstBind, t)
+ bind := c.NewBind(name, ConstBind, t)
bind.Value = value // c.Binds[] is a map[string]*Bind => changes to *Bind propagate to the map
}
-// AddFuncBind reserves space for a subsequent function declaration
-func (c *Comp) AddFuncBind(name string, t xr.Type) *Bind {
- bind := c.AddBind(name, FuncBind, t)
+// NewFuncBind reserves space for a subsequent function declaration
+func (c *Comp) NewFuncBind(name string, t xr.Type) *Bind {
+ bind := c.NewBind(name, FuncBind, t)
if bind.Desc.Class() != FuncBind {
- c.Errorf("internal error! Comp.AddBind(name=%q, class=FuncBind, type=%v) returned class=%v, expecting FuncBind",
+ c.Errorf("internal error! Comp.NewBind(name=%q, class=FuncBind, type=%v) returned class=%v, expecting FuncBind",
name, t, bind.Desc.Class())
}
return bind
}
-// AddBind reserves space for a subsequent constant, function or variable declaration
-func (c *Comp) AddBind(name string, class BindClass, t xr.Type) *Bind {
+// NewBind reserves space for a subsequent constant, function or variable declaration
+func (c *Comp) NewBind(name string, class BindClass, t xr.Type) *Bind {
if class == IntBind || class == VarBind {
- if !c.IsCompiled() && (base.IsCategory(t.Kind(), r.Bool, r.Int, r.Uint, r.Float64) || t.Kind() == r.Complex64) {
+ // respect c.IntBindMax: if != 0, it's the maximum number of IntBind variables we can declare
+ // reason: see comment in IntBindMax definition. Shortly, Ent.Ints[] address was taken
+ // thus we cannot reallocate it => we must stop at its capacity, stored in c.IntBindMax
+ // by Interp.PrepareEnv()
+ if (c.IntBindMax == 0 || c.IntBindNum < c.IntBindMax) &&
+ base.IsCategory(t.Kind(), r.Bool, r.Int, r.Uint, r.Float64, r.Complex128) {
+ // optimize booleans, integers, floats and complexes by storing them in Env.Ints []uint64
+ // note: complex128 occupies two uint64 slots!
class = IntBind
} else {
class = VarBind
}
}
+ return c.CompBinds.NewBind(&c.Output, name, class, t)
+}
+
+// NewBind reserves space for a subsequent constant, function or variable declaration
+func (c *CompBinds) NewBind(o *base.Output, name string, class BindClass, t xr.Type) *Bind {
+ // do NOT replace VarBind -> IntBind here: done by Comp.NewBind() above,
+ // and we are also invoked by Import.loadBinds() which needs to store
+ // booleans, integers, floats and complex64 into reflect.Value
+ // because such compiled global variables already exist at their own address
var index = NoIndex
if name == "_" {
// never store bindings for "_" in c.Binds
- desc := MakeBindDescriptor(class, index)
- bind := &Bind{Lit: Lit{Type: t}, Desc: desc, Name: name}
- return bind
+ desc := class.MakeDescriptor(index)
+ return &Bind{Lit: Lit{Type: t}, Desc: desc, Name: name}
}
if c.Binds == nil {
c.Binds = make(map[string]*Bind)
@@ -237,12 +292,16 @@ func (c *Comp) AddBind(name string, class BindClass, t xr.Type) *Bind {
if len(name) == 0 {
// unnamed function result, or unnamed switch/range/... expression
} else if bind := c.Binds[name]; bind != nil {
- c.Warnf("redefined identifier: %v", name)
+ o.Warnf("redefined identifier: %v", name)
oldclass := bind.Desc.Class()
if (oldclass == IntBind) == (class == IntBind) {
// both are IntBind, or neither is.
- // we can reuse the bind index
- index = bind.Desc.Index()
+ if bind.Type.Kind() == r.Complex128 || t.Kind() != r.Complex128 {
+ // the new bind occupies fewer slots than the old one,
+ // or occupies the same number of slots
+ // => we can reuse the bind index
+ index = bind.Desc.Index()
+ }
}
}
// allocate a slot either in Binds or in IntBinds
@@ -251,22 +310,20 @@ func (c *Comp) AddBind(name string, class BindClass, t xr.Type) *Bind {
index = NoIndex
default: // case FuncBind, VarBind:
if index == NoIndex {
- if c.BindNum == NoIndex {
- c.BindNum++
- }
index = c.BindNum
c.BindNum++
}
case IntBind:
if index == NoIndex {
- if c.IntBindNum == NoIndex {
- c.IntBindNum++
- }
index = c.IntBindNum
c.IntBindNum++
+ if t.Kind() == r.Complex128 {
+ // complex128 occupies two slots
+ c.IntBindNum++
+ }
}
}
- desc := MakeBindDescriptor(class, index)
+ desc := class.MakeDescriptor(index)
bind := &Bind{Lit: Lit{Type: t}, Desc: desc, Name: name}
if len(name) != 0 {
// skip unnamed function results, and unnamed switch/range/... expression
@@ -277,7 +334,7 @@ func (c *Comp) AddBind(name string, class BindClass, t xr.Type) *Bind {
func (c *Comp) declUnnamedBind(init *Expr, o *Comp, upn int) *Symbol {
t := init.Type
- bind := o.AddBind("", VarBind, t)
+ bind := o.NewBind("", VarBind, t)
// c.Debugf("declUnnamedBind: allocated bind %v, upn = %d", bind, upn)
switch bind.Desc.Class() {
case IntBind:
@@ -291,16 +348,15 @@ func (c *Comp) declUnnamedBind(init *Expr, o *Comp, upn int) *Symbol {
index := bind.Desc.Index()
f := init.AsX1()
conv := c.Converter(init.Type, t)
- rtype := t.ReflectType()
switch upn {
case 0:
c.append(func(env *Env) (Stmt, *Env) {
v := f(env)
if conv != nil {
- v = conv(v, rtype)
+ v = conv(v)
}
// no need to create a settable reflect.Value
- env.Binds[index] = v
+ env.Vals[index] = v
env.IP++
return env.Code[env.IP], env
})
@@ -308,10 +364,10 @@ func (c *Comp) declUnnamedBind(init *Expr, o *Comp, upn int) *Symbol {
c.append(func(env *Env) (Stmt, *Env) {
v := f(env)
if conv != nil {
- v = conv(v, rtype)
+ v = conv(v)
}
// no need to create a settable reflect.Value
- env.Outer.Binds[index] = v
+ env.Outer.Vals[index] = v
env.IP++
return env.Code[env.IP], env
})
@@ -323,16 +379,16 @@ func (c *Comp) declUnnamedBind(init *Expr, o *Comp, upn int) *Symbol {
}
v := f(env)
if conv != nil {
- v = conv(v, rtype)
+ v = conv(v)
}
// no need to create a settable reflect.Value
- o.Binds[index] = v
+ o.Vals[index] = v
env.IP++
return env.Code[env.IP], env
})
}
default:
- c.Errorf("internal error! Comp.AddBind(name=%q, class=VarBind, type=%v) returned class=%v, expecting VarBind or IntBind",
+ c.Errorf("internal error! Comp.NewBind(name=%q, class=VarBind, type=%v) returned class=%v, expecting VarBind or IntBind",
"", t, bind.Desc.Class())
return nil
}
@@ -356,11 +412,11 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
c.Warnf("initializer returns %d values, using only the first one to declare variable: %v", n, name)
}
}
- bind := c.AddBind(name, VarBind, t)
+ bind := c.NewBind(name, VarBind, t)
desc := bind.Desc
switch desc.Class() {
default:
- c.Errorf("internal error! Comp.AddBind(name=%q, class=VarBind, type=%v) returned class=%v, expecting VarBind or IntBind",
+ c.Errorf("internal error! Comp.NewBind(name=%q, class=VarBind, type=%v) returned class=%v, expecting VarBind or IntBind",
name, t, desc.Class())
return bind
case IntBind:
@@ -377,6 +433,7 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
// assigning a constant or expression to _
// only keep the expression side effects
c.append(init.AsStmt())
+ return bind
}
// declaring a variable in Env.Binds[], we must create a settable and addressable reflect.Value
if init == nil {
@@ -384,7 +441,7 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
rtype := t.ReflectType()
c.append(func(env *Env) (Stmt, *Env) {
// base.Debugf("declaring %v", bind)
- env.Binds[index] = r.New(rtype).Elem()
+ env.Vals[index] = r.New(rtype).Elem()
env.IP++
return env.Code[env.IP], env
})
@@ -395,8 +452,8 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
}
fun := init.AsX1() // AsX1() panics if init.NumOut() == 0, warns if init.NumOut() > 1
tfun := init.Out(0)
- if tfun == nil || (!xr.SameType(tfun, t) && !tfun.AssignableTo(t)) {
- c.Errorf("cannot assign <%v> to <%v> in variable declaration: %v <%v>", tfun, t, name, t)
+ if tfun == nil || (!tfun.IdenticalTo(t) && !tfun.AssignableTo(t)) {
+ c.Errorf("cannot assign <%v> to <%v> in variable declaration: %v <%v>%s", tfun, t, name, t, interfaceMissingMethod(tfun, t))
return bind
}
var ret func(env *Env) (Stmt, *Env)
@@ -408,8 +465,8 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
ret = func(env *Env) (Stmt, *Env) {
ret, _ := f(env)
place := r.New(rtype).Elem()
- place.Set(conv(ret, rtype))
- env.Binds[index] = place
+ place.Set(conv(ret))
+ env.Vals[index] = place
env.IP++
return env.Code[env.IP], env
}
@@ -418,7 +475,7 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
ret, _ := f(env)
place := r.New(rtype).Elem()
place.Set(ret)
- env.Binds[index] = place
+ env.Vals[index] = place
env.IP++
return env.Code[env.IP], env
}
@@ -428,8 +485,8 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
ret = func(env *Env) (Stmt, *Env) {
ret := fun(env)
place := r.New(rtype).Elem()
- place.Set(conv(ret, rtype))
- env.Binds[index] = place
+ place.Set(conv(ret))
+ env.Vals[index] = place
env.IP++
return env.Code[env.IP], env
}
@@ -438,7 +495,7 @@ func (c *Comp) DeclVar0(name string, t xr.Type, init *Expr) *Bind {
ret := fun(env)
place := r.New(rtype).Elem()
place.Set(ret)
- env.Binds[index] = place
+ env.Vals[index] = place
env.IP++
return env.Code[env.IP], env
}
@@ -465,7 +522,7 @@ func (c *Comp) DeclBindRuntimeValue(bind *Bind) func(*Env, r.Value) {
case FuncBind:
// declaring a function in Env.Binds[], the reflect.Value must not be addressable or settable
return func(env *Env, v r.Value) {
- env.Binds[index] = v.Convert(rtype)
+ env.Vals[index] = v.Convert(rtype)
}
case VarBind:
// declaring a variable in Env.Binds[], we must create a settable and addressable reflect.Value
@@ -475,7 +532,7 @@ func (c *Comp) DeclBindRuntimeValue(bind *Bind) func(*Env, r.Value) {
v = v.Convert(rtype)
}
place.Set(v)
- env.Binds[index] = place
+ env.Vals[index] = place
}
case IntBind:
// no difference between declaration and assignment for IntBind
@@ -484,14 +541,18 @@ func (c *Comp) DeclBindRuntimeValue(bind *Bind) func(*Env, r.Value) {
}
// DeclMultiVar0 compiles multiple variable declarations from a single multi-valued expression
-func (c *Comp) DeclMultiVar0(names []string, t xr.Type, init *Expr) {
+func (c *Comp) DeclMultiVar0(names []string, t xr.Type, init *Expr, pos []token.Pos) {
if t == nil {
if init == nil {
c.Errorf("no value and no type, cannot declare variables: %v", names)
}
}
n := len(names)
+ npos := len(pos)
if n == 1 {
+ if npos != 0 {
+ c.Pos = pos[0]
+ }
c.DeclVar0(names[0], t, init)
return
}
@@ -504,7 +565,7 @@ func (c *Comp) DeclMultiVar0(names []string, t xr.Type, init *Expr) {
decls := make([]func(*Env, r.Value), n)
for i, name := range names {
ti := init.Out(i)
- if t != nil && !xr.SameType(t, ti) {
+ if t != nil && !t.IdenticalTo(ti) {
if ti != nil && !ti.AssignableTo(t) {
c.Errorf("cannot assign <%v> to <%v> in variable declaration: %v", ti, t, names)
return
@@ -512,10 +573,13 @@ func (c *Comp) DeclMultiVar0(names []string, t xr.Type, init *Expr) {
ti = t // declared variable has type t, not the i-th type returned by multi-valued expression
}
}
- bind := c.AddBind(name, VarBind, ti)
+ bind := c.NewBind(name, VarBind, ti)
decls[i] = c.DeclBindRuntimeValue(bind)
}
- fun := init.AsXV(0)
+ fun := init.AsXV(COptDefaults)
+ if npos != 0 {
+ c.Pos = pos[0]
+ }
c.append(func(env *Env) (Stmt, *Env) {
// call the multi-valued function. we know ni > 1, so just use the []r.Value
_, rets := fun(env)
@@ -538,10 +602,10 @@ func (c *Comp) DeclFunc0(name string, fun I) *Bind {
if t.Kind() != r.Func {
c.Errorf("DeclFunc0(%s): expecting a function, received %v <%v>", name, fun, t)
}
- bind := c.AddFuncBind(name, t)
+ bind := c.NewFuncBind(name, t)
index := bind.Desc.Index()
ret := func(env *Env) (Stmt, *Env) {
- env.Binds[index] = funv
+ env.Vals[index] = funv
env.IP++
return env.Code[env.IP], env
}
@@ -552,7 +616,7 @@ func (c *Comp) DeclFunc0(name string, fun I) *Bind {
// DeclEnvFunc0 compiles a function declaration that accesses interpreter's Env. For caller's convenience, returns allocated Bind
func (c *Comp) DeclEnvFunc0(name string, envfun Function) *Bind {
t := c.TypeOfFunction()
- bind := c.AddBind(name, ConstBind, t) // not a regular function... its type is not accurate
+ bind := c.NewBind(name, ConstBind, t) // not a regular function... its type is not accurate
bind.Value = envfun // c.Binds[] is a map[string]*Bind => changes to *Bind propagate to the map
return bind
}
@@ -560,7 +624,7 @@ func (c *Comp) DeclEnvFunc0(name string, envfun Function) *Bind {
// DeclBuiltin0 compiles a builtin function declaration. For caller's convenience, returns allocated Bind
func (c *Comp) DeclBuiltin0(name string, builtin Builtin) *Bind {
t := c.TypeOfBuiltin()
- bind := c.AddBind(name, ConstBind, t) // not a regular function... its type is not accurate
+ bind := c.NewBind(name, ConstBind, t) // not a regular function... its type is not accurate
bind.Value = builtin // c.Binds[] is a map[string]*Bind => changes to *Bind propagate to the map
return bind
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/expr.go b/vendor/github.com/cosmos72/gomacro/fast/expr.go
index fd4340e..3cd8b06 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/expr.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/expr.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* expr.go
@@ -43,7 +34,7 @@ func (c *Comp) ExprsMultipleValues(nodes []ast.Expr, expectedValuesN int) (inits
n, expectedValuesN, nodes)
return nil
}
- e := c.Expr(nodes[0])
+ e := c.Expr(nodes[0], nil)
if actualN := e.NumOut(); actualN != expectedValuesN {
var plural string
if actualN != 1 {
@@ -64,14 +55,16 @@ func (c *Comp) Exprs(nodes []ast.Expr) []*Expr {
if n := len(nodes); n != 0 {
inits = make([]*Expr, n)
for i := range nodes {
- inits[i] = c.Expr1(nodes[i])
+ inits[i] = c.Expr1(nodes[i], nil)
}
}
return inits
}
// Expr compiles an expression that returns a single value
-func (c *Comp) Expr1(in ast.Expr) *Expr {
+// t is optional and used for type inference on composite literals,
+// see https://golang.org/ref/spec#Composite_literals
+func (c *Comp) Expr1(in ast.Expr, t xr.Type) *Expr {
for {
if in != nil {
c.Pos = in.Pos()
@@ -87,7 +80,7 @@ func (c *Comp) Expr1(in ast.Expr) *Expr {
return c.TypeAssert1(node)
case *ast.UnaryExpr:
if node.Op == token.ARROW {
- xe := c.Expr1(node.X)
+ xe := c.Expr1(node.X, nil)
return c.Recv1(node, xe)
} else {
return c.UnaryExpr(node)
@@ -95,23 +88,23 @@ func (c *Comp) Expr1(in ast.Expr) *Expr {
}
break
}
- e := c.Expr(in)
+ e := c.Expr(in, t)
nout := e.NumOut()
switch nout {
case 0:
c.Errorf("expression returns no values, expecting one: %v", in)
return nil
- default:
- c.Warnf("expression returns %d values %v, using only the first one: %v",
- len(e.Types), e.Types, in)
- fallthrough
case 1:
return e
+ default:
+ return e.exprXVAsI()
}
}
-// Expr compiles an expression
-func (c *Comp) Expr(in ast.Expr) *Expr {
+// Expr compiles an expression.
+// t is optional and used for type inference on composite literals,
+// see https://golang.org/ref/spec#Composite_literals
+func (c *Comp) Expr(in ast.Expr, t xr.Type) *Expr {
for {
if in != nil {
c.Pos = in.Pos()
@@ -125,7 +118,8 @@ func (c *Comp) Expr(in ast.Expr) *Expr {
case *ast.CallExpr:
return c.CallExpr(node)
case *ast.CompositeLit:
- return c.CompositeLit(node)
+ // propagate inferred type
+ return c.CompositeLit(node, t)
case *ast.FuncLit:
return c.FuncLit(node)
case *ast.Ident:
@@ -162,7 +156,7 @@ func (c *Comp) Expr1OrType(node ast.Expr) (e *Expr, t xr.Type) {
t = c.Type(node)
}
}()
- e = c.Expr1(node)
+ e = c.Expr1(node, nil)
panicking = false
return
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/expr1.go b/vendor/github.com/cosmos72/gomacro/fast/expr1.go
index 125199e..702d22a 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/expr1.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/expr1.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* expr1.go
@@ -34,26 +25,29 @@ import (
)
func (c *Comp) litValue(value I) Lit {
- if untyp, ok := value.(UntypedLit); ok && untyp.Universe != c.Universe {
- untyp.Universe = c.Universe
- value = untyp
- }
return Lit{Type: c.TypeOf(value), Value: value}
}
func (c *Comp) exprUntypedLit(kind r.Kind, obj constant.Value) *Expr {
- return &Expr{Lit: Lit{Type: c.TypeOfUntypedLit(), Value: UntypedLit{kind, obj, c.Universe}}}
+ return &Expr{Lit: Lit{Type: c.TypeOfUntypedLit(), Value: MakeUntypedLit(kind, obj, &c.Universe.BasicTypes)}}
}
func (c *Comp) exprValue(t xr.Type, value I) *Expr {
if t == nil {
t = c.TypeOf(value)
}
- return &Expr{Lit: Lit{Type: t, Value: value}, IsNil: value == nil}
+ return exprValue(t, value)
+}
+
+func exprValue(t xr.Type, value I) *Expr {
+ if t == nil {
+ base.Errorf("internal error! exprValue() value = %v invoked with type = nil", value)
+ }
+ return &Expr{Lit: Lit{Type: t, Value: value}, EFlags: EFlag4Value(value)}
}
func exprLit(lit Lit, sym *Symbol) *Expr {
- return &Expr{Lit: lit, Sym: sym, IsNil: lit.Value == nil}
+ return &Expr{Lit: lit, Sym: sym, EFlags: EFlag4Value(lit.Value)}
}
func exprFun(t xr.Type, fun I) *Expr {
@@ -93,7 +87,7 @@ func (expr *Expr) EvalConst(opts CompileOptions) I {
return nil
}
if expr.Const() {
- if opts == OptDefaults && expr.Untyped() {
+ if opts == COptDefaults && expr.Untyped() {
return expr.ConstTo(expr.DefaultType())
}
return expr.Value
@@ -108,7 +102,7 @@ func (expr *Expr) EvalConst(opts CompileOptions) I {
value = ret.Interface()
}
expr.Value = value
- expr.IsNil = value == nil
+ expr.EFlags = EFlag4Value(value)
expr.Fun = nil // no longer needed, will be recreated if needed as a wrapper for the computed value
return value
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func0ret0.go b/vendor/github.com/cosmos72/gomacro/fast/func0ret0.go
index 4ce1585..5b289f6 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func0ret0.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/func0ret0.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func0ret0.go
@@ -28,6 +19,7 @@ package fast
import (
r "reflect"
+ . "github.com/cosmos72/gomacro/base"
xr "github.com/cosmos72/gomacro/xreflect"
)
@@ -38,18 +30,22 @@ func (c *Comp) func0ret0(t xr.Type, m *funcMaker) func(env *Env) r.Value {
return valueOfNopFunc
}
}
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ debugC = c
+ }
- nbinds := m.nbinds
- nintbinds := m.nintbinds
+ nbind := m.nbind
+ nintbind := m.nintbind
return func(env *Env) r.Value {
// function is closed over the env used to DECLARE it
env.MarkUsedByClosure()
return r.ValueOf(func() {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
// execute the body
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func0ret1.go b/vendor/github.com/cosmos72/gomacro/fast/func0ret1.go
index 50c2791..48b8172 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func0ret1.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/func0ret1.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func0ret1.go
@@ -32,15 +23,21 @@ package fast
import (
r "reflect"
+ . "github.com/cosmos72/gomacro/base"
xr "github.com/cosmos72/gomacro/xreflect"
)
func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
- nbinds := m.nbinds
- nintbinds := m.nintbinds
+ nbind := m.nbind
+ nintbind := m.nintbind
funcbody := m.funcbody
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ debugC = c
+ }
+
tret0 := t.Out(0)
kret0 := tret0.Kind()
switch kret0 {
@@ -48,24 +45,24 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 bool) {
- return
- },
+ return r.ValueOf(func() (ret0 bool) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) bool)
+ resultfun := m.resultfun[0].(func(*Env) bool)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
- return r.ValueOf(func() (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ return r.ValueOf(func() (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -80,17 +77,19 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
}
}
- resultfun := m.resultfuns[0].(func(*Env) int)
+ resultfun := m.resultfun[0].(func(*Env) int)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
- return r.ValueOf(func() (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ return r.ValueOf(func() (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -100,24 +99,24 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 int8) {
- return
- },
+ return r.ValueOf(func() (ret0 int8) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) int8)
+ resultfun := m.resultfun[0].(func(*Env) int8)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
- return r.ValueOf(func() (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ return r.ValueOf(func() (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -127,24 +126,24 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 int16) {
- return
- },
+ return r.ValueOf(func() (ret0 int16) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) int16)
+ resultfun := m.resultfun[0].(func(*Env) int16)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
- return r.ValueOf(func() (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ return r.ValueOf(func() (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -154,24 +153,23 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 int32) {
- return
- },
+ return r.ValueOf(func() (ret0 int32) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) int32)
+ resultfun := m.resultfun[0].(func(*Env) int32)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
- return r.ValueOf(func() (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ return r.ValueOf(func() (ret0 int32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -181,24 +179,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 int64) {
- return
- },
+ return r.ValueOf(func() (ret0 int64) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) int64)
+ resultfun := m.resultfun[0].(func(*Env) int64)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -208,24 +204,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 uint) {
- return
- },
+ return r.ValueOf(func() (ret0 uint) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) uint)
+ resultfun := m.resultfun[0].(func(*Env) uint)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -235,24 +229,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 uint8) {
- return
- },
+ return r.ValueOf(func() (ret0 uint8) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) uint8)
+ resultfun := m.resultfun[0].(func(*Env) uint8)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -262,24 +254,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 uint16) {
- return
- },
+ return r.ValueOf(func() (ret0 uint16) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) uint16)
+ resultfun := m.resultfun[0].(func(*Env) uint16)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -289,24 +279,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 uint32) {
- return
- },
+ return r.ValueOf(func() (ret0 uint32) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) uint32)
+ resultfun := m.resultfun[0].(func(*Env) uint32)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -316,24 +304,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 uint64) {
- return
- },
+ return r.ValueOf(func() (ret0 uint64) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) uint64)
+ resultfun := m.resultfun[0].(func(*Env) uint64)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -343,24 +329,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 uintptr) {
- return
- },
+ return r.ValueOf(func() (ret0 uintptr) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) uintptr)
+ resultfun := m.resultfun[0].(func(*Env) uintptr)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -370,24 +354,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 float32) {
- return
- },
+ return r.ValueOf(func() (ret0 float32) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) float32)
+ resultfun := m.resultfun[0].(func(*Env) float32)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -397,24 +379,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 float64) {
- return
- },
+ return r.ValueOf(func() (ret0 float64) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) float64)
+ resultfun := m.resultfun[0].(func(*Env) float64)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -424,24 +404,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 complex64) {
- return
- },
+ return r.ValueOf(func() (ret0 complex64) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) complex64)
+ resultfun := m.resultfun[0].(func(*Env) complex64)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -451,24 +429,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 complex128) {
- return
- },
+ return r.ValueOf(func() (ret0 complex128) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) complex128)
+ resultfun := m.resultfun[0].(func(*Env) complex128)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
@@ -478,24 +454,22 @@ func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
if funcbody == nil {
return func(env *Env) r.Value {
- return r.ValueOf(func() (ret0 string) {
- return
- },
+ return r.ValueOf(func() (ret0 string) { return },
)
}
}
- resultfun := m.resultfuns[0].(func(*Env) string)
+ resultfun := m.resultfun[0].(func(*Env) string)
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
funcbody(env)
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func0ret1.gomacro b/vendor/github.com/cosmos72/gomacro/fast/func0ret1.gomacro
index 22ce94a..1661da1 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func0ret1.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/func0ret1.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func0ret1.go
@@ -27,6 +18,7 @@ package fast
import (
r "reflect"
+ . "github.com/cosmos72/gomacro/base"
xr "github.com/cosmos72/gomacro/xreflect"
)
@@ -53,19 +45,19 @@ import (
})
}
}
- resultfun := m.resultfuns[0].(func (*Env) ~,ret0typ)
+ resultfun := m.resultfun[0].(func (*Env) ~,ret0typ)
return func(env *Env) r.Value {
// function is closed over the env used to DECLARE it
env.MarkUsedByClosure()
return r.ValueOf(func() (ret0 ~,ret0typ) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
// execute the body
funcbody(env)
// extract result
ret0 = resultfun(env)
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
}
@@ -74,10 +66,15 @@ import (
func (c *Comp) func0ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
// do NOT keep a reference to funcMaker
- nbinds := m.nbinds
- nintbinds := m.nintbinds
+ nbind := m.nbind
+ nintbind := m.nintbind
funcbody := m.funcbody
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ // keep a reference to c only if needed
+ debugC = c
+ }
tret0 := t.Out(0)
kret0 := tret0.Kind()
switch kret0 {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func1ret0.go b/vendor/github.com/cosmos72/gomacro/fast/func1ret0.go
index bbed054..7abf1c7 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func1ret0.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/func1ret0.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func1ret0.go
@@ -40,10 +31,15 @@ import (
func (c *Comp) func1ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
- nbinds := m.nbinds
- nintbinds := m.nintbinds
+ nbind := m.nbind
+ nintbind := m.nintbind
funcbody := m.funcbody
- param0index := m.parambinds[0].Desc.Index()
+ param0index := m.Param[0].Desc.Index()
+
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ debugC = c
+ }
targ0 := t.In(0)
karg0 := targ0.Kind()
@@ -51,356 +47,377 @@ func (c *Comp) func1ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
case r.Bool:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) {
- })
- }
+ funv := r.ValueOf(func(
+
+ bool) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*bool)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Int:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) {
- })
- }
+ funv := r.ValueOf(func(
+
+ int) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*int)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Int8:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) {
- })
- }
+ funv := r.ValueOf(func(
+
+ int8) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int8)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Int16:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) {
- })
- }
+ funv := r.ValueOf(func(
+
+ int16) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int16)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*int16)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Int32:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) {
- })
- }
+ funv := r.ValueOf(func(
+
+ int32) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*int32)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Int64:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) {
- })
- }
+ funv := r.ValueOf(func(
+
+ int64) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int64)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*int64)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Uint:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) {
- })
- }
+ funv := r.ValueOf(func(
+
+ uint) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*uint)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Uint8:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) {
- })
- }
+ funv := r.ValueOf(func(
+
+ uint8) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*uint8)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Uint16:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) {
- })
- }
+ funv := r.ValueOf(func(
+
+ uint16) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*uint16)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Uint32:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) {
- })
- }
+ funv := r.ValueOf(func(
+
+ uint32) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*uint32)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
case r.Uint64:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) {
- })
- }
+ funv := r.ValueOf(func(
+
+ uint64) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.IntBinds[param0index] = arg0
+ env.Ints[param0index] = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
+
case r.Uintptr:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) {
- })
- }
+ funv := r.ValueOf(func(
+
+ uintptr) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*uintptr)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
+
case r.Float32:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) {
- })
- }
+ funv := r.ValueOf(func(
+
+ float32) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float32)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*float32)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
+
case r.Float64:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) {
- })
- }
+ funv := r.ValueOf(func(
+
+ float64) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float64)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*float64)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
+
case r.Complex64:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) {
- })
- }
+ funv := r.ValueOf(func(
+
+ complex64) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[param0index])) = arg0
+ *(*complex64)(unsafe.Pointer(&env.Ints[param0index])) = arg0
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
+
case r.Complex128:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) {
- })
- }
+ funv := r.ValueOf(func(
+
+ complex128) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
{
place := r.New(TypeOfComplex128).Elem()
place.SetComplex(arg0,
)
- env.Binds[param0index] = place
+ env.Vals[param0index] = place
}
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
@@ -408,26 +425,27 @@ func (c *Comp) func1ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
case r.String:
{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) {
- })
- }
+ funv := r.ValueOf(func(
+
+ string) {})
+ return func(env *Env) r.Value { return funv }
+
}
return func(env *Env) r.Value {
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
{
place := r.New(TypeOfString).Elem()
place.SetString(arg0,
)
- env.Binds[param0index] = place
+ env.Vals[param0index] = place
}
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
@@ -436,17 +454,17 @@ func (c *Comp) func1ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
{
rtype := t.ReflectType()
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.MakeFunc(rtype, func([]r.Value) []r.Value { return ZeroValues },
- )
- }
+ funv := r.MakeFunc(rtype, func([]r.Value) []r.Value { return nil },
+ )
+ return func(env *Env) r.Value { return funv }
+
} else {
return func(env *Env) r.Value {
env.MarkUsedByClosure()
rtarg0 := targ0.ReflectType()
return r.MakeFunc(rtype, func(args []r.Value) []r.Value {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
if param0index != NoIndex {
place := r.New(rtarg0).Elem()
@@ -454,7 +472,7 @@ func (c *Comp) func1ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
place.Set(arg0.Convert(rtarg0))
}
- env.Binds[param0index] = place
+ env.Vals[param0index] = place
}
funcbody(env)
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func1ret0.gomacro b/vendor/github.com/cosmos72/gomacro/fast/func1ret0.gomacro
index 7cfb591..eabb9f9 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func1ret0.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/func1ret0.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func1ret0.go
@@ -60,7 +51,7 @@ import (
bind = ~"{
place := r.New(~,tident).Elem()
place.Set(r.ValueOf(~,name))
- env.Binds[~,index] = place
+ env.Vals[~,index] = place
}
} else {
typeident := maketypeident(t)
@@ -69,18 +60,18 @@ import (
bind = ~"{
place := r.New(~,typeident).Elem()
place.SetComplex(~,name)
- env.Binds[~,index] = place
+ env.Vals[~,index] = place
}
case r.String:
bind = ~"{
place := r.New(~,typeident).Elem()
place.SetString(~,name)
- env.Binds[~,index] = place
+ env.Vals[~,index] = place
}
case r.Uint64:
- bind = ~"{env.IntBinds[~,index] = ~,name}
+ bind = ~"{env.Ints[~,index] = ~,name}
default:
- bind = ~"{*(*~,typ)(unsafe.Pointer(&env.IntBinds[~,index])) = ~,name}
+ bind = ~"{*(*~,typ)(unsafe.Pointer(&env.Ints[~,index])) = ~,name}
}
}
return bind
@@ -93,22 +84,22 @@ import (
arg0bind := fsetarg(arg0typ, ~'targ0, ~'arg0, ~'param0index)
return ~"{
if funcbody == nil {
+ funv := r.ValueOf(func(~,arg0typ) {})
return func(env *Env) r.Value {
- return r.ValueOf(func(~,arg0typ) {
- })
+ return funv
}
}
return func(env *Env) r.Value {
// function is closed over the env used to DECLARE it
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 ~,arg0typ) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
// copy arg0 into allocated binds
~,arg0bind
// execute the body
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
@@ -117,10 +108,11 @@ import (
return ~"{
rtype := t.ReflectType()
if funcbody == nil {
+ funv := r.MakeFunc(rtype, func([]r.Value) []r.Value {
+ return nil
+ })
return func(env *Env) r.Value {
- return r.MakeFunc(rtype, func([]r.Value) []r.Value {
- return ZeroValues
- })
+ return funv
}
} else {
return func(env *Env) r.Value {
@@ -128,7 +120,7 @@ import (
env.MarkUsedByClosure()
rtarg0 := targ0.ReflectType()
return r.MakeFunc(rtype, func(args []r.Value) []r.Value {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
// copy arg0 into allocated binds
if param0index != NoIndex {
@@ -136,7 +128,7 @@ import (
if arg0 := args[0]; arg0 != Nil && arg0 != None {
place.Set(arg0.Convert(rtarg0))
}
- env.Binds[param0index] = place
+ env.Vals[param0index] = place
}
// execute the body
funcbody(env)
@@ -150,11 +142,16 @@ import (
func (c *Comp) func1ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
// do NOT keep a reference to funcMaker
- nbinds := m.nbinds
- nintbinds := m.nintbinds
+ nbind := m.nbind
+ nintbind := m.nintbind
funcbody := m.funcbody
- param0index := m.parambinds[0].Desc.Index()
+ param0index := m.Param[0].Desc.Index()
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ // keep a reference to c only if needed
+ debugC = c
+ }
targ0 := t.In(0)
karg0 := targ0.Kind()
switch karg0 {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func1ret1.go b/vendor/github.com/cosmos72/gomacro/fast/func1ret1.go
index 7f0589b..62eab27 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func1ret1.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/func1ret1.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func_ret1.go
@@ -39,8265 +30,9470 @@ import (
)
func (c *Comp) func1ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ debugC = c
+ }
- nbinds := m.nbinds
- nintbinds := m.nintbinds
- funcbody := m.funcbody
-
- targ0 := t.In(0)
- karg0 := targ0.Kind()
+ karg0 := t.In(0).Kind()
kret0 := t.Out(0).Kind()
- indexes := [2]int{
- m.parambinds[0].Desc.Index(),
- m.resultbinds[0].Desc.Index(),
+ indexes := &[2]int{
+ m.Param[0].Desc.Index(),
+ m.Result[0].Desc.Index(),
}
+ var ret func(*Env) r.Value
switch karg0 {
case r.Bool:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func1ret1Bool(m, indexes, kret0, debugC)
+ case r.Int:
+ ret = func1ret1Int(m, indexes, kret0, debugC)
+ case r.Int8:
+ ret = func1ret1Int8(m, indexes, kret0, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Int16:
+ ret = func1ret1Int16(m, indexes, kret0, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ case r.Int32:
+ ret = func1ret1Int32(m, indexes, kret0, debugC)
- funcbody(env)
+ case r.Int64:
+ ret = func1ret1Int64(m, indexes, kret0, debugC)
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ case r.Uint:
+ ret = func1ret1Uint(m, indexes, kret0, debugC)
- env.FreeEnv()
- return
+ case r.Uint8:
+ ret = func1ret1Uint8(m, indexes, kret0, debugC)
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ case r.Uint16:
+ ret = func1ret1Uint16(m, indexes, kret0, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Uint32:
+ ret = func1ret1Uint32(m, indexes, kret0, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ case r.Uint64:
+ ret = func1ret1Uint64(m, indexes, kret0, debugC)
- funcbody(env)
+ case r.Uintptr:
+ ret = func1ret1Uintptr(m, indexes, kret0, debugC)
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ case r.Float32:
+ ret = func1ret1Float32(m, indexes, kret0, debugC)
- env.FreeEnv()
- return
+ case r.Float64:
+ ret = func1ret1Float64(m, indexes, kret0, debugC)
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ case r.Complex64:
+ ret = func1ret1Complex64(m, indexes, kret0, debugC)
+
+ case r.Complex128:
+ ret = func1ret1Complex128(m, indexes, kret0, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.String:
+ ret = func1ret1String(m, indexes, kret0, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ }
+ return ret
+}
+func func1ret1Bool(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.IntBinds[indexes[1]]
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.Binds[indexes[1]].Complex()
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.Binds[indexes[1]].String()
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- }
- case r.Int:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = env.Vals[indexes[1]].String()
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Int(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- ret0 = env.IntBinds[indexes[1]]
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.Binds[indexes[1]].Complex()
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].String()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- }
- case r.Int8:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.IntBinds[indexes[1]]
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
- case r.Int16:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = env.Vals[indexes[1]].String()
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Int8(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.IntBinds[indexes[1]]
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.Binds[indexes[1]].Complex()
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].String()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- }
- case r.Int32:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = env.Vals[indexes[1]].String()
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Int16(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.IntBinds[indexes[1]]
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.Binds[indexes[1]].String()
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
+ env.freeEnv4Func()
+ return
+
+ })
}
}
case r.Int64:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.IntBinds[indexes[1]]
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
-
- funcbody(env)
-
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
+ break
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
-
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
- case r.Uint:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = env.Vals[indexes[1]].String()
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Int32(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.IntBinds[indexes[1]]
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.Binds[indexes[1]].Complex()
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].String()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- }
- case r.Uint8:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = env.Vals[indexes[1]].String()
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Int64(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.IntBinds[indexes[1]]
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
- case r.Uint16:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.IntBinds[indexes[1]]
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].Complex()
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = env.Vals[indexes[1]].String()
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
- case r.Uint32:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
-
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ }
+ return ret
+}
+func func1ret1Uint(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.IntBinds[indexes[1]]
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.Binds[indexes[1]].String()
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
+ env.freeEnv4Func()
+ return
+
+ })
}
}
- case r.Uint64:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- env.IntBinds[indexes[0]] = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[0]] = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- env.IntBinds[indexes[0]] = arg0
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- env.IntBinds[indexes[0]] = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[0]] = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = env.Vals[indexes[1]].String()
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- env.IntBinds[indexes[0]] = arg0
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Uint8(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.IntBinds[indexes[1]]
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- env.IntBinds[indexes[0]] = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- env.IntBinds[indexes[0]] = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.Binds[indexes[1]].Complex()
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.IntBinds[indexes[0]] = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.Binds[indexes[1]].String()
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- }
- case r.Uintptr:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = env.Ints[indexes[1]]
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.IntBinds[indexes[1]]
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
-
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
-
- funcbody(env)
-
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- funcbody(env)
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- env.FreeEnv()
- return
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = env.Vals[indexes[1]].String()
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
- case r.Float32:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
-
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ }
+ return ret
+}
+func func1ret1Uint16(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.FreeEnv()
- return
+ ) (ret0 int64,
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.FreeEnv()
- return
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.IntBinds[indexes[1]]
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.FreeEnv()
- return
+ ) (ret0 uint8,
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.FreeEnv()
- return
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.FreeEnv()
- return
+ ) (ret0 uint32,
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.FreeEnv()
- return
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 uint64,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = env.Ints[indexes[1]]
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
- case r.Float64:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.FreeEnv()
- return
+ ) (ret0 uintptr,
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.FreeEnv()
- return
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- funcbody(env)
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- return
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.FreeEnv()
- return
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = env.Vals[indexes[1]].String()
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ return
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Uint32(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = env.IntBinds[indexes[1]]
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- env.FreeEnv()
- return
+ ) (ret0 int,
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- env.FreeEnv()
- return
+ ) (ret0 int16,
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- env.FreeEnv()
- return
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.Binds[indexes[1]].Complex()
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
+ env.freeEnv4Func()
+ return
+
+ })
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64) (ret0 string) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 int64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.Binds[indexes[1]].String()
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
+ env.freeEnv4Func()
+ return
+
+ })
}
}
- case r.Complex64:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- env.FreeEnv()
- return
+ ) (ret0 uint,
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- env.FreeEnv()
- return
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- env.FreeEnv()
- return
+ ) (ret0 uint16,
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- env.FreeEnv()
- return
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ return
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- env.FreeEnv()
- return
+ ) (ret0 uint64,
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = env.Ints[indexes[1]]
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- env.FreeEnv()
- return
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 uintptr,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- return
+ funcbody(env)
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Vals[indexes[1]].String()
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Uint64(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 bool,
+
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = env.Ints[indexes[1]]
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ funcbody(env)
+
+ ret0 = env.Vals[indexes[1]].String()
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Uintptr(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 bool,
+
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Ints[indexes[1]]
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Vals[indexes[1]].String()
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Float32(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 bool,
+
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Ints[indexes[1]]
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Vals[indexes[1]].String()
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Float64(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 bool,
+
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Ints[indexes[1]]
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Vals[indexes[1]].String()
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Complex64(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 bool,
+
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Ints[indexes[1]]
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Vals[indexes[1]].String()
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1Complex128(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 bool,
+
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Ints[indexes[1]]
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
+
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- funcbody(env)
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- ret0 = env.IntBinds[indexes[1]]
+ funcbody(env)
- env.FreeEnv()
- return
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- })
- }
+ env.freeEnv4Func()
+ return
+
+ })
}
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ funcbody(env)
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ funcbody(env)
+
+ ret0 = env.Vals[indexes[1]].String()
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ }
+ return ret
+}
+func func1ret1String(m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
- funcbody(env)
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch kret0 {
+ case r.Bool:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ ) (ret0 bool,
- env.FreeEnv()
- return
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 complex64) {
- return
- },
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
+ })
+ }
+ }
+ case r.Int:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- return
+ ) (ret0 int,
+ ) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 complex128) {
- return
- },
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].Complex()
+ })
+ }
+ }
+ case r.Int8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- return
+ ) (ret0 int8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64) (ret0 string) {
- return
- },
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ret0 = *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]]))
- funcbody(env)
+ env.freeEnv4Func()
+ return
- ret0 = env.Binds[indexes[1]].String()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- return
+ ) (ret0 int16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
- })
- }
+ break
}
- }
- case r.Complex128:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 int32) {
- return
- },
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 int64) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 int32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 uint) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 int64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 uint8) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 uint) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 uint16) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 uint8) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 uint32) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 uint16) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 uint64) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 uint32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = env.IntBinds[indexes[1]]
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 uintptr) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 uint64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 float32) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = env.Ints[indexes[1]]
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 uintptr) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 float64) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 float32) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 float32,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 complex64) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 float64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 float64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 complex128) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 complex64) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 complex64) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = env.Binds[indexes[1]].Complex()
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128) (ret0 string) {
- return
- },
+
+ funcbody(env)
+
+ ret0 = *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]]))
+
+ env.freeEnv4Func()
+ return
+
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 complex128) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]]))
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
case r.String:
- switch kret0 {
- case r.Bool:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 bool) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 int) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 int8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 int16) { return },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 int32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 int64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 uint) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 uint8) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 uint16) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 uint32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 uint64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = env.IntBinds[indexes[1]]
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 uintptr) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 float32) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 float64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 complex64) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]]))
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 complex128) {
- return
- },
- )
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- funcbody(env)
-
- ret0 = env.Binds[indexes[1]].Complex()
-
- env.FreeEnv()
- return
-
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string) (ret0 string) {
- return
- },
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
+
+ ) (ret0 string) { return },
+ )
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
+
+ ) (ret0 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
)
+ env.Vals[indexes[0]] = place
}
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string) (ret0 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
- funcbody(env)
+ funcbody(env)
- ret0 = env.Binds[indexes[1]].String()
+ ret0 = env.Vals[indexes[1]].String()
- env.FreeEnv()
- return
+ env.freeEnv4Func()
+ return
- })
- }
+ })
}
}
}
- return nil
+ return ret
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func1ret1.gomacro b/vendor/github.com/cosmos72/gomacro/fast/func1ret1.gomacro
index cd0653f..311b314 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func1ret1.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/func1ret1.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func_ret1.go
@@ -48,33 +39,88 @@ import (
return str
}
+:func makeprefixtypeident(prefix string, t r.Type) *ast.Ident {
+ name := prefix + upcasefirstbyte(t.Name())
+ return &ast.Ident{Name: name}
+}
+
// convert a well-known reflect.Type into one of the constants TypeOf*
:func maketypeident(t r.Type) *ast.Ident {
- name := "TypeOf" + upcasefirstbyte(t.Name())
- return &ast.Ident{Name: name}
+ return makeprefixtypeident("TypeOf", t)
+}
+
+:macro mcallfunc1retx1(typ ast.Node) ast.Node {
+ var t r.Type = EvalType(typ)
+ ident := makeprefixtypeident("func1ret1", t)
+ return ~"{
+ ret = ~,ident (m, indexes, kret0, debugC)
+ }
+}
+
+:macro mcallfuncx1retx1(dummy ast.Node) ast.Node {
+ return ~"{
+ switch karg0 {
+ case r.Bool: {mcallfunc1retx1; bool}
+ case r.Int: {mcallfunc1retx1; int}
+ case r.Int8: {mcallfunc1retx1; int8}
+ case r.Int16: {mcallfunc1retx1; int16}
+ case r.Int32: {mcallfunc1retx1; int32}
+ case r.Int64: {mcallfunc1retx1; int64}
+ case r.Uint: {mcallfunc1retx1; uint}
+ case r.Uint8: {mcallfunc1retx1; uint8}
+ case r.Uint16: {mcallfunc1retx1; uint16}
+ case r.Uint32: {mcallfunc1retx1; uint32}
+ case r.Uint64: {mcallfunc1retx1; uint64}
+ case r.Uintptr: {mcallfunc1retx1; uintptr}
+ case r.Float32: {mcallfunc1retx1; float32}
+ case r.Float64: {mcallfunc1retx1; float64}
+ case r.Complex64: {mcallfunc1retx1; complex64}
+ case r.Complex128:{mcallfunc1retx1; complex128}
+ case r.String: {mcallfunc1retx1; string}
+ }
+ }
+}
+
+// ==================================== func1ret1 ========================================
+
+func (c *Comp) func1ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ // keep a reference to c only if needed
+ debugC = c
+ }
+ karg0 := t.In(0).Kind()
+ kret0 := t.Out(0).Kind()
+
+ indexes := &[2]int{
+ m.Param[0].Desc.Index(),
+ m.Result[0].Desc.Index(),
+ }
+ var ret func(*Env) r.Value
+
+ // if IsOptimizedKind(karg0) && IsOptimizedKind(kret0)
+ mcallfuncx1retx1; nil
+
+ return ret
}
+// ==================================== func1ret1{Bool,Int,...} ========================================
+
:func fsetarg(typ, name, index ast.Node) ast.Node {
var t r.Type = EvalType(typ)
var bind ast.Node
typeident := maketypeident(t)
switch t.Kind() {
- case r.Complex128:
- bind = ~"{
- place := r.New(~,typeident).Elem()
- place.SetComplex(~,name)
- env.Binds[~,index] = place
- }
case r.String:
bind = ~"{
place := r.New(~,typeident).Elem()
place.SetString(~,name)
- env.Binds[~,index] = place
+ env.Vals[~,index] = place
}
case r.Uint64:
- bind = ~"{env.IntBinds[~,index] = ~,name}
+ bind = ~"{env.Ints[~,index] = ~,name}
default:
- bind = ~"{*(*~,typ)(unsafe.Pointer(&env.IntBinds[~,index])) = ~,name}
+ bind = ~"{*(*~,typ)(unsafe.Pointer(&env.Ints[~,index])) = ~,name}
}
return bind
}
@@ -83,18 +129,16 @@ import (
var t r.Type = EvalType(typ)
var bind ast.Node
if t == nil {
- bind = ~"{env.Binds[~,index]}
+ bind = ~"{env.Vals[~,index]}
} else {
typeident := maketypeident(t)
switch t.Kind() {
- case r.Complex128:
- bind = ~"{env.Binds[~,index].Complex()}
case r.String:
- bind = ~"{env.Binds[~,index].String()}
+ bind = ~"{env.Vals[~,index].String()}
case r.Uint64:
- bind = ~"{env.IntBinds[~,index]}
+ bind = ~"{env.Ints[~,index]}
default:
- bind = ~"{*(*~,typ)(unsafe.Pointer(&env.IntBinds[~,index]))}
+ bind = ~"{*(*~,typ)(unsafe.Pointer(&env.Ints[~,index]))}
}
}
return bind
@@ -108,18 +152,19 @@ import (
ret0bind := fgetresult(ret0typ, ~'{indexes[1]})
return ~"{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(~,arg0typ) (ret0 ~,ret0typ) {
- return
- })
+ funv := r.ValueOf(func(~,arg0typ) (ret0 ~,ret0typ) {
+ return
+ })
+ ret = func(env *Env) r.Value {
+ return funv
}
+ break
}
-
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
// function is closed over the env used to DECLARE it
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 ~,arg0typ) (ret0 ~,ret0typ) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
// copy arg into allocated binds
~,arg0bind
@@ -129,7 +174,7 @@ import (
// extract result
ret0 = ~,ret0bind
- env.FreeEnv()
+ env.freeEnv4Func()
return
})
}
@@ -160,47 +205,39 @@ import (
}
}
-:macro mfuncx1retx1(dummy ast.Node) ast.Node {
- return ~"{
- switch karg0 {
- case r.Bool: {mfunc1retx1; bool}
- case r.Int: {mfunc1retx1; int}
- case r.Int8: {mfunc1retx1; int8}
- case r.Int16: {mfunc1retx1; int16}
- case r.Int32: {mfunc1retx1; int32}
- case r.Int64: {mfunc1retx1; int64}
- case r.Uint: {mfunc1retx1; uint}
- case r.Uint8: {mfunc1retx1; uint8}
- case r.Uint16: {mfunc1retx1; uint16}
- case r.Uint32: {mfunc1retx1; uint32}
- case r.Uint64: {mfunc1retx1; uint64}
- case r.Uintptr: {mfunc1retx1; uintptr}
- case r.Float32: {mfunc1retx1; float32}
- case r.Float64: {mfunc1retx1; float64}
- case r.Complex64: {mfunc1retx1; complex64}
- case r.Complex128:{mfunc1retx1; complex128}
- case r.String: {mfunc1retx1; string}
- }
- }
-}
-
-func (c *Comp) func1ret1(t xr.Type, m *funcMaker) func(*Env) r.Value {
- // do NOT keep a reference to funcMaker
- nbinds := m.nbinds
- nintbinds := m.nintbinds
- funcbody := m.funcbody
+:macro mdeclfunc1retx1(arg0typ ast.Node) ast.Node {
+ decl := ~"{
+ ~func foo (m *funcMaker, indexes *[2]int, kret0 r.Kind, debugC *Comp) func(*Env) r.Value {
+ // do NOT keep a reference to funcMaker
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
- targ0 := t.In(0)
- karg0 := targ0.Kind()
- kret0 := t.Out(0).Kind()
+ mfunc1retx1; ~,arg0typ
- indexes := [2]int{
- m.parambinds[0].Desc.Index(),
- m.resultbinds[0].Desc.Index(),
+ return ret
+ }
}
-
- // if IsOptimizedKind(karg0) && IsOptimizedKind(kret0)
- mfuncx1retx1; nil
-
- return nil
+ var t r.Type = EvalType(arg0typ)
+ decl.Name = makeprefixtypeident("func1ret1", t)
+ return decl
}
+
+mdeclfunc1retx1; bool
+mdeclfunc1retx1; int
+mdeclfunc1retx1; int8
+mdeclfunc1retx1; int16
+mdeclfunc1retx1; int32
+mdeclfunc1retx1; int64
+mdeclfunc1retx1; uint
+mdeclfunc1retx1; uint8
+mdeclfunc1retx1; uint16
+mdeclfunc1retx1; uint32
+mdeclfunc1retx1; uint64
+mdeclfunc1retx1; uintptr
+mdeclfunc1retx1; float32
+mdeclfunc1retx1; float64
+mdeclfunc1retx1; complex64
+mdeclfunc1retx1; complex128
+mdeclfunc1retx1; string
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func2ret0.go b/vendor/github.com/cosmos72/gomacro/fast/func2ret0.go
index 6ce5d7d..f23830b 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func2ret0.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/func2ret0.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func2ret0.go
@@ -46,7656 +37,9196 @@ func (c *Comp) func2ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
return nil
}
- indexes := [2]int{
- m.parambinds[0].Desc.Index(),
- m.parambinds[1].Desc.Index(),
+ indexes := &[2]int{
+ m.Param[0].Desc.Index(),
+ m.Param[1].Desc.Index(),
+ }
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ debugC = c
}
- nbinds := m.nbinds
- nintbinds := m.nintbinds
- funcbody := m.funcbody
- {
- argdecls := [2]func(*Env, r.Value){nil, nil}
- for i, bind := range m.parambinds {
- argdecls[i] = c.DeclBindRuntimeValue(bind)
- if argdecls[i] == nil {
- argdecls[i] = declBindRuntimeValueNop
- }
-
- }
- switch karg0 {
- case r.Bool:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ var ret func(*Env) r.Value
+ switch karg0 {
+ case r.Bool:
+ ret = func2ret0Bool(m, indexes, karg1, debugC)
- arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Int:
+ ret = func2ret0Int(m, indexes, karg1, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ case r.Int8:
+ ret = func2ret0Int8(m, indexes, karg1, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ case r.Int16:
+ ret = func2ret0Int16(m, indexes, karg1, debugC)
- funcbody(env)
+ case r.Int32:
+ ret = func2ret0Int32(m, indexes, karg1, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ case r.Int64:
+ ret = func2ret0Int64(m, indexes, karg1, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ case r.Uint:
+ ret = func2ret0Uint(m, indexes, karg1, debugC)
- arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Uint8:
+ ret = func2ret0Uint8(m, indexes, karg1, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ case r.Uint16:
+ ret = func2ret0Uint16(m, indexes, karg1, debugC)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ case r.Uint32:
+ ret = func2ret0Uint32(m, indexes, karg1, debugC)
- funcbody(env)
+ case r.Uint64:
+ ret = func2ret0Uint64(m, indexes, karg1, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ case r.Uintptr:
+ ret = func2ret0Uintptr(m, indexes, karg1, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ case r.Float32:
+ ret = func2ret0Float32(m, indexes, karg1, debugC)
- arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ case r.Float64:
+ ret = func2ret0Float64(m, indexes, karg1, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ case r.Complex64:
+ ret = func2ret0Complex64(m, indexes, karg1, debugC)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ case r.Complex128:
+ ret = func2ret0Complex128(m, indexes, karg1, debugC)
- funcbody(env)
+ case r.String:
+ ret = func2ret0String(m, indexes, karg1, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ }
+ return ret
+}
+func func2ret0Bool(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ bool,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ arg1 bool,
- arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ int,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ int8,
- arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- funcbody(env)
+ arg1 int8,
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
- uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int16,
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int16,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ int32,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[1]] = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int64,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ funcbody(env)
- arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uint8,
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(bool,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 bool,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- })
- }
- }
- }
- case r.Int:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uint16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uint32,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ funcbody(env)
- arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uint64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.Ints[indexes[1]] = arg1
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uintptr,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ funcbody(env)
- arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 float32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 float64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ funcbody(env)
- arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
- uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- funcbody(env)
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
-
- uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.IntBinds[indexes[1]] = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
-
- uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 bool,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
-
- float32) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ funcbody(env)
- arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
-
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Int(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- funcbody(env)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
-
- float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 bool,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
-
- complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- funcbody(env)
+ int,
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
-
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int,
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int,
+ funcbody(env)
- arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ int8,
- env.FreeEnv()
- })
- }
- }
- }
- case r.Int8:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int8,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ funcbody(env)
- arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int16,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ arg1 int16,
- arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ int32,
- arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- funcbody(env)
+ arg1 int32,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- funcbody(env)
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int64,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- funcbody(env)
+ arg1 uint,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- funcbody(env)
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint8,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- funcbody(env)
+ arg1 uint16,
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8,
- uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- env.IntBinds[indexes[1]] = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- funcbody(env)
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8,
-
- uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint32,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8,
-
- float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- funcbody(env)
+ arg1 uint64,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8,
-
- float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.Ints[indexes[1]] = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- funcbody(env)
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8,
-
- complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uintptr,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8,
-
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- funcbody(env)
+ arg1 float32,
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int8,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int8,
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.FreeEnv()
- })
- }
- }
- }
- case r.Int16:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 float64,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ funcbody(env)
- arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- funcbody(env)
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, int64) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ funcbody(env)
- arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Int8(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- funcbody(env)
+ bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 bool,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ funcbody(env)
- arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int,
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int8,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ arg1 int8,
- arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.IntBinds[indexes[1]] = arg1
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16,
- uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ int16,
- arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- funcbody(env)
+ arg1 int16,
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16,
-
- float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- funcbody(env)
+ int32,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16,
-
- float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int32,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16,
-
- complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ funcbody(env)
- arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16,
-
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int16,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int16,
+ break
+ }
+ ret = func(env *Env) r.Value {
- arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uint,
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- }
- case r.Int32:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ arg1 uint8,
- arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ arg1 uint32,
- arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 uint64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ env.Ints[indexes[1]] = arg1
- arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ arg1 uintptr,
- arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 float32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ arg1 float64,
- arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.IntBinds[indexes[1]] = arg1
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32,
- float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ funcbody(env)
- arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32,
-
- float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int8,
- funcbody(env)
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32,
-
- complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int8,
- arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
+ }
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32,
-
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Int16(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ bool,
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int32,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int32,
+ arg1 bool,
- arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- }
- case r.Int64:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ arg1 int,
- arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ int8,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 int8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ int16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 int16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int32,
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int32,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- funcbody(env)
+ arg1 int64,
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- funcbody(env)
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.IntBinds[indexes[1]] = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- funcbody(env)
+ arg1 uint8,
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- funcbody(env)
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint16,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64,
- float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- funcbody(env)
+ arg1 uint32,
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64,
-
- complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- funcbody(env)
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64,
-
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint64,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ env.Ints[indexes[1]] = arg1
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(int64,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 int64,
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- })
- }
- }
- }
- case r.Uint:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uintptr,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- funcbody(env)
+ arg1 float32,
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 float64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- funcbody(env)
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int16,
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int16,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, uint32) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Int32(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- funcbody(env)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.IntBinds[indexes[1]] = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- funcbody(env)
+ arg1 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ int,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint,
- complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int8,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint,
-
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int8,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint,
- arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int16,
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- }
- case r.Uint8:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int16,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int32,
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int32,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- funcbody(env)
+ arg1 uint8,
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- env.IntBinds[indexes[1]] = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- funcbody(env)
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uint32,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ env.Ints[indexes[1]] = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8,
- complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uintptr,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint8,
-
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint8, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.FreeEnv()
- })
- }
- }
- }
- case r.Uint16:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 float32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- funcbody(env)
+ arg1 float64,
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int32,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int32,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, uint8) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Int64(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- funcbody(env)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- funcbody(env)
+ arg1 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ int,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[1]] = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int8,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int8,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int16,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int16,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint16,
- string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint16, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ int32,
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- }
- case r.Uint32:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int32,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int64,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- funcbody(env)
+ arg1 uint8,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- funcbody(env)
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uint32,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.IntBinds[indexes[1]] = arg1
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint64,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ env.Ints[indexes[1]] = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uintptr,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- funcbody(env)
+ arg1 float32,
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint32, string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint32, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ arg1 float64,
- env.FreeEnv()
- })
- }
- }
- }
- case r.Uint64:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.IntBinds[indexes[0]] = arg0
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.IntBinds[indexes[0]] = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- env.IntBinds[indexes[0]] = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.IntBinds[indexes[0]] = arg0
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(int64,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.IntBinds[indexes[0]] = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 int64,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, int64) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- env.IntBinds[indexes[0]] = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Uint(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- funcbody(env)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[0]] = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- funcbody(env)
+ arg1 bool,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.IntBinds[indexes[0]] = arg0
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ int,
- env.IntBinds[indexes[0]] = arg0
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 int,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.IntBinds[indexes[0]] = arg0
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.IntBinds[indexes[0]] = arg0
+ int8,
- env.IntBinds[indexes[1]] = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int8,
- env.IntBinds[indexes[0]] = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.IntBinds[indexes[0]] = arg0
+ int16,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int16,
- env.IntBinds[indexes[0]] = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.IntBinds[indexes[0]] = arg0
+ int32,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int32,
- env.IntBinds[indexes[0]] = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uint64, string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uint64, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.IntBinds[indexes[0]] = arg0
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- }
- case r.Uintptr:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 int64,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- funcbody(env)
+ arg1 uint8,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 uint16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- funcbody(env)
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uint32,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint64,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ env.Ints[indexes[1]] = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[1]] = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uintptr,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- funcbody(env)
+ arg1 float32,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 float64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- funcbody(env)
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(uintptr, string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 uintptr, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
}
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
- case r.Float32:
- switch karg1 {
- case r.Bool:
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, int8) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Uint8(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ bool,
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 bool,
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- funcbody(env)
+ int,
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 int,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- funcbody(env)
+ int8,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int16,
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int16,
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, uint64) {
- })
- }
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint8,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint8,
+
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Uint16(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ bool,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ int,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ int8,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
- env.IntBinds[indexes[1]] = arg1
+ arg1 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint16,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint16,
+
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
+ }
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Uint32(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ bool,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ int,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ int8,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint32,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint32,
+
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
+ }
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Uint64(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ bool,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ int,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ int8,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uint64,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uint64,
+
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ env.Ints[indexes[0]] = arg0
+
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
+ }
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Uintptr(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ bool,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ int,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ int8,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(uintptr,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 uintptr,
+
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
+ }
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Float32(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ bool,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ int,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ int8,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float32,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float32,
+
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
+ }
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Float64(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ bool,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ int,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ int8,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(float64,
+
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 float64,
+
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
+ }
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Complex64(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ bool,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 bool,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ int,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 int,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
+
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ int8,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 int8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 int16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ int32,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 int64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 uint,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 uint8,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 uint16,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 uint32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 uint64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ env.Ints[indexes[1]] = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 uintptr,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 float32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
+
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
+
+ break
+ }
+ ret = func(env *Env) r.Value {
+
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
+
+ arg1 float64,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
+
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
- funcbody(env)
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex64,
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex64,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, complex128) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
-
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
-
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0Complex128(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float32, string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float32, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ bool,
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
+ break
}
+ ret = func(env *Env) r.Value {
- case r.Float64:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 bool,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ int,
- funcbody(env)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int,
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- funcbody(env)
+ int8,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 int8,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- funcbody(env)
+ int16,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 int16,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- funcbody(env)
+ int32,
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 int32,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- funcbody(env)
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 int64,
- env.IntBinds[indexes[1]] = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uint8,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- funcbody(env)
+ arg1 uint16,
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(float64, string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 float64, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
+ env.freeEnv4Func()
+ })
}
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- case r.Complex64:
- switch karg1 {
- case r.Bool:
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 uint32,
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- funcbody(env)
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ arg1 uint64,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ env.Ints[indexes[1]] = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 uintptr,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- funcbody(env)
+ arg1 float32,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 float64,
- funcbody(env)
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ funcbody(env)
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- funcbody(env)
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ break
+ }
+ ret = func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- funcbody(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[1]] = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(complex128,
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 complex128,
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
- funcbody(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[0]])) = arg0
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, float64) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ }
+ return ret
+}
+func func2ret0String(m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
+ switch karg1 {
+ case r.Bool:
- funcbody(env)
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ bool,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 bool,
- env.FreeEnv()
- })
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ *(*bool)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
+
+ funcbody(env)
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int:
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- funcbody(env)
+ int,
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex64, string) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex64, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[0]])) = arg0
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
+ arg1 int,
- env.FreeEnv()
- })
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- }
- case r.Complex128:
- switch karg1 {
- case r.Bool:
+ *(*int)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ funcbody(env)
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int8:
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- funcbody(env)
+ int8,
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, int) {
- })
- }
- }
- return func(env *Env) r.Value {
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 int8,
- env.FreeEnv()
- })
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*int8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, int16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ int16,
+
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 int16,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, int32) {
- })
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*int16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, int64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ int32,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, uint) {
- })
- }
+ arg1 int32,
+
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*int32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Int64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, uint8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ int64,
+ ) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 int64,
- env.FreeEnv()
- })
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*int64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, uint32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 uint,
- env.FreeEnv()
- })
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*uint)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- env.IntBinds[indexes[1]] = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint8:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint8) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 uint8,
- env.FreeEnv()
- })
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*uint8)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint16:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, float64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint16) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 uint16,
- env.FreeEnv()
- })
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*uint16)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
-
- funcbody(env)
-
- env.FreeEnv()
- })
- }
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(complex128, string) {
- })
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 complex128, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg0,
- )
- env.Binds[indexes[0]] = place
- }
-
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
-
- env.FreeEnv()
- })
- }
- }
+ env.freeEnv4Func()
+ })
}
+ }
+ case r.Uint32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- case r.String:
- switch karg1 {
- case r.Bool:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, bool) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint32) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 bool) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*bool)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 uint32,
- env.FreeEnv()
- })
- }
- }
- case r.Int:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, int) {
- })
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 int) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*uint32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uint64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Int8:
-
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, int8) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uint64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 int8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 uint64,
- env.FreeEnv()
- })
- }
- }
- case r.Int16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, int16) {
- })
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 int16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ env.Ints[indexes[1]] = arg1
- *(*int16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Uintptr:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Int32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, int32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ uintptr) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 int32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*int32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 uintptr,
- env.FreeEnv()
- })
- }
- }
- case r.Int64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, int64) {
- })
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 int64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*uintptr)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*int64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float32:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Uint:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, uint) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float32) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 uint) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 float32,
- env.FreeEnv()
- })
- }
- }
- case r.Uint8:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, uint8) {
- })
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 uint8) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*float32)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint8)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Float64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.FreeEnv()
- })
- }
- }
- case r.Uint16:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, uint16) {
- })
- }
- }
- return func(env *Env) r.Value {
+ float64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 uint16) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ break
+ }
+ ret = func(env *Env) r.Value {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- funcbody(env)
+ arg1 float64,
- env.FreeEnv()
- })
- }
- }
- case r.Uint32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, uint32) {
- })
- }
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 uint32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*float64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*uint32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
-
- env.FreeEnv()
- })
- }
- }
- case r.Uint64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, uint64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex64:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 uint64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ complex64) {})
+ ret = func(env *Env) r.Value { return funv }
- env.IntBinds[indexes[1]] = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- env.FreeEnv()
- })
+ arg1 complex64,
+ ) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.Uintptr:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, uintptr) {
- })
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 uintptr) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ *(*complex64)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- funcbody(env)
+ funcbody(env)
- env.FreeEnv()
- })
- }
- }
- case r.Float32:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, float32) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.Complex128:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 float32) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ complex128) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*float32)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- env.FreeEnv()
- })
- }
- }
- case r.Float64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, float64) {
- })
- }
+ arg1 complex128) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- return func(env *Env) r.Value {
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 float64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ *(*complex128)(unsafe.Pointer(&env.Ints[indexes[1]])) = arg1
- *(*float64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ funcbody(env)
- funcbody(env)
-
- env.FreeEnv()
- })
- }
- }
- case r.Complex64:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, complex64) {
- })
- }
- }
- return func(env *Env) r.Value {
+ env.freeEnv4Func()
+ })
+ }
+ }
+ case r.String:
+ {
+ if funcbody == nil {
+ funv := r.ValueOf(func(string,
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 complex64) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
+ string) {})
+ ret = func(env *Env) r.Value { return funv }
- *(*complex64)(unsafe.Pointer(&env.IntBinds[indexes[1]])) = arg1
+ break
+ }
+ ret = func(env *Env) r.Value {
- funcbody(env)
+ env.MarkUsedByClosure()
+ return r.ValueOf(func(arg0 string,
- env.FreeEnv()
- })
- }
- }
- case r.Complex128:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, complex128) {
- })
- }
- }
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 complex128) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
- {
- place := r.New(TypeOfComplex128).Elem()
- place.SetComplex(arg1,
- )
- env.Binds[indexes[1]] = place
- }
-
- funcbody(env)
-
- env.FreeEnv()
- })
+ arg1 string) {
+ env := newEnv4Func(env, nbind, nintbind, debugC)
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg0,
+ )
+ env.Vals[indexes[0]] = place
}
- }
- case r.String:
- {
- if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(string, string) {
- })
- }
+ {
+ place := r.New(TypeOfString).Elem()
+ place.SetString(arg1,
+ )
+ env.Vals[indexes[1]] = place
}
- return func(env *Env) r.Value {
-
- env.MarkUsedByClosure()
- return r.ValueOf(func(arg0 string, arg1 string) {
- env := NewEnv4Func(env, nbinds, nintbinds)
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg0,
- )
- env.Binds[indexes[0]] = place
- }
- {
- place := r.New(TypeOfString).Elem()
- place.SetString(arg1,
- )
- env.Binds[indexes[1]] = place
- }
- funcbody(env)
-
- env.FreeEnv()
- })
- }
- }
- }
+ funcbody(env)
+
+ env.freeEnv4Func()
+ })
+ }
}
}
- return nil
+ return ret
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/func2ret0.gomacro b/vendor/github.com/cosmos72/gomacro/fast/func2ret0.gomacro
index 442c8e7..71f0cc2 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/func2ret0.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/func2ret0.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* func2ret0.go
@@ -47,12 +38,84 @@ import (
return str
}
+:func makeprefixtypeident(prefix string, t r.Type) *ast.Ident {
+ name := prefix + upcasefirstbyte(t.Name())
+ return &ast.Ident{Name: name}
+}
+
// convert a well-known reflect.Type into one of the constants TypeOf*
:func maketypeident(t r.Type) *ast.Ident {
- name := "TypeOf" + upcasefirstbyte(t.Name())
- return &ast.Ident{Name: name}
+ return makeprefixtypeident("TypeOf", t)
+}
+
+:macro mcallfuncy2ret0(typ ast.Node) ast.Node {
+ var t r.Type = EvalType(typ)
+ ident := makeprefixtypeident("func2ret0", t)
+ return ~"{
+ ret = ~,ident (m, indexes, karg1, debugC)
+ }
+}
+:macro mfuncxy2ret0(dummy ast.Node) ast.Node {
+ return ~"{
+ /* not used
+ argdecls := &[2]func(*Env, r.Value){nil, nil}
+ for i, bind := range m.Param {
+ argdecls[i] = c.DeclBindRuntimeValue(bind)
+ if argdecls[i] == nil {
+ argdecls[i] = declBindRuntimeValueNop
+ }
+ }
+ */
+ switch karg0 {
+ case r.Bool: {mcallfuncy2ret0; bool}
+ case r.Int: {mcallfuncy2ret0; int}
+ case r.Int8: {mcallfuncy2ret0; int8}
+ case r.Int16: {mcallfuncy2ret0; int16}
+ case r.Int32: {mcallfuncy2ret0; int32}
+ case r.Int64: {mcallfuncy2ret0; int64}
+ case r.Uint: {mcallfuncy2ret0; uint}
+ case r.Uint8: {mcallfuncy2ret0; uint8}
+ case r.Uint16: {mcallfuncy2ret0; uint16}
+ case r.Uint32: {mcallfuncy2ret0; uint32}
+ case r.Uint64: {mcallfuncy2ret0; uint64}
+ case r.Uintptr: {mcallfuncy2ret0; uintptr}
+ case r.Float32: {mcallfuncy2ret0; float32}
+ case r.Float64: {mcallfuncy2ret0; float64}
+ case r.Complex64: {mcallfuncy2ret0; complex64}
+ case r.Complex128:{mcallfuncy2ret0; complex128}
+ case r.String: {mcallfuncy2ret0; string}
+ }
+ }
+}
+
+// ==================================== func2ret0 ========================================
+
+func (c *Comp) func2ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
+ karg0 := t.In(0).Kind()
+ karg1 := t.In(1).Kind()
+
+ if !IsOptimizedKind(karg0) || !IsOptimizedKind(karg1) {
+ return nil
+ }
+ // do not keep a reference to funcMaker
+ indexes := &[2]int{
+ m.Param[0].Desc.Index(),
+ m.Param[1].Desc.Index(),
+ }
+ var debugC *Comp
+ if c.Globals.Options&OptDebugger != 0 {
+ // keep a reference to c only if needed
+ debugC = c
+ }
+ var ret func(*Env) r.Value
+
+ mfuncxy2ret0; nil
+
+ return ret
}
+// ==================================== func2ret0{Bool,Int,...} ========================================
+
:func fsetarg(typ, tident, name, index ast.Node) ast.Node {
var t r.Type = EvalType(typ)
var bind ast.Node
@@ -60,27 +123,21 @@ import (
bind = ~"{
place := r.New(~,tident).Elem()
place.Set(r.ValueOf(~,name))
- env.Binds[~,index] = place
+ env.Vals[~,index] = place
}
} else {
typeident := maketypeident(t)
switch t.Kind() {
- case r.Complex128:
- bind = ~"{
- place := r.New(~,typeident).Elem()
- place.SetComplex(~,name)
- env.Binds[~,index] = place
- }
case r.String:
bind = ~"{
place := r.New(~,typeident).Elem()
place.SetString(~,name)
- env.Binds[~,index] = place
+ env.Vals[~,index] = place
}
case r.Uint64:
- bind = ~"{env.IntBinds[~,index] = ~,name}
+ bind = ~"{env.Ints[~,index] = ~,name}
default:
- bind = ~"{*(*~,typ)(unsafe.Pointer(&env.IntBinds[~,index])) = ~,name}
+ bind = ~"{*(*~,typ)(unsafe.Pointer(&env.Ints[~,index])) = ~,name}
}
}
return bind
@@ -97,59 +154,60 @@ import (
arg1bind := fsetarg(arg1typ, ~'targ1, ~'arg1, ~'{indexes[1]})
return ~"{
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.ValueOf(func(~,arg0typ, ~,arg1typ) {
- })
+ funv := r.ValueOf(func(~,arg0typ, ~,arg1typ) {})
+ ret = func(env *Env) r.Value {
+ return funv
}
+ break
}
- return func(env *Env) r.Value {
+ ret = func(env *Env) r.Value {
// function is closed over the env used to DECLARE it
env.MarkUsedByClosure()
return r.ValueOf(func(arg0 ~,arg0typ, arg1 ~,arg1typ) {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbind, nintbind, debugC)
// copy arg0, arg1 into allocated binds
~,arg0bind
~,arg1bind
// execute the body
funcbody(env)
- env.FreeEnv()
+ env.freeEnv4Func()
})
}
}
}
- // not well-known types... use reflect.MakeFunc()
return ~"{
rtype := t.ReflectType()
if funcbody == nil {
- return func(env *Env) r.Value {
- return r.MakeFunc(rtype, func([]r.Value) []r.Value {
- return ZeroValues
- })
+ funv := r.MakeFunc(rtype, func([]r.Value) []r.Value {
+ return nil
+ })
+ ret = func(env *Env) r.Value {
+ return funv
}
- } else {
- return func(env *Env) r.Value {
- // function is closed over the env used to DECLARE it
- env.MarkUsedByClosure()
- return r.MakeFunc(rtype, func(args []r.Value) []r.Value {
- env := NewEnv4Func(env, nbinds, nintbinds)
-
- // copy args into allocated binds
- for i := range rtargs {
- if idx := indexes[i]; idx != NoIndex {
- place := r.New(rtargs[i]).Elem()
- if arg := args[i]; arg != Nil && arg != None {
- place.Set(arg.Convert(rtargs[i]))
- }
- env.Binds[idx] = place
+ break
+ }
+ ret = func(env *Env) r.Value {
+ // function is closed over the env used to DECLARE it
+ env.MarkUsedByClosure()
+ return r.MakeFunc(rtype, func(args []r.Value) []r.Value {
+ env := newEnv4Func(env, nbind, nintbind)
+
+ // copy args into allocated binds
+ for i := range rtargs {
+ if idx := indexes[i]; idx != NoIndex {
+ place := r.New(rtargs[i]).Elem()
+ if arg := args[i]; arg != Nil && arg != None {
+ place.Set(arg.Convert(rtargs[i]))
}
+ env.Vals[idx] = place
}
- // execute the body
- funcbody(env)
+ }
+ // execute the body
+ funcbody(env)
- return ZeroValues
- })
- }
+ return ZeroValues
+ })
}
}
}
@@ -179,54 +237,39 @@ import (
}
}
-:macro mfuncxy2ret0(dummy ast.Node) ast.Node {
- return ~"{
- argdecls := [2]func(*Env, r.Value){nil, nil}
- for i, bind := range m.parambinds {
- argdecls[i] = c.DeclBindRuntimeValue(bind)
- if argdecls[i] == nil {
- argdecls[i] = declBindRuntimeValueNop
- }
- }
- switch karg0 {
- case r.Bool: {mfuncy2ret0; bool}
- case r.Int: {mfuncy2ret0; int}
- case r.Int8: {mfuncy2ret0; int8}
- case r.Int16: {mfuncy2ret0; int16}
- case r.Int32: {mfuncy2ret0; int32}
- case r.Int64: {mfuncy2ret0; int64}
- case r.Uint: {mfuncy2ret0; uint}
- case r.Uint8: {mfuncy2ret0; uint8}
- case r.Uint16: {mfuncy2ret0; uint16}
- case r.Uint32: {mfuncy2ret0; uint32}
- case r.Uint64: {mfuncy2ret0; uint64}
- case r.Uintptr: {mfuncy2ret0; uintptr}
- case r.Float32: {mfuncy2ret0; float32}
- case r.Float64: {mfuncy2ret0; float64}
- case r.Complex64: {mfuncy2ret0; complex64}
- case r.Complex128:{mfuncy2ret0; complex128}
- case r.String: {mfuncy2ret0; string}
- }
- }
-}
-
+:macro mdeclfuncy2ret0(arg0typ ast.Node) ast.Node {
+ decl := ~"{
+ ~func foo (m *funcMaker, indexes *[2]int, karg1 r.Kind, debugC *Comp) func(*Env) r.Value {
+ // do NOT keep a reference to funcMaker
+ nbind := m.nbind
+ nintbind := m.nintbind
+ funcbody := m.funcbody
+ var ret func(*Env) r.Value
-func (c *Comp) func2ret0(t xr.Type, m *funcMaker) func(*Env) r.Value {
- karg0 := t.In(0).Kind()
- karg1 := t.In(1).Kind()
+ mfuncy2ret0; ~,arg0typ
- if !IsOptimizedKind(karg0) || !IsOptimizedKind(karg1) {
- return nil
- }
- indexes := [2]int{
- m.parambinds[0].Desc.Index(),
- m.parambinds[1].Desc.Index(),
+ return ret
+ }
}
- nbinds := m.nbinds
- nintbinds := m.nintbinds
- funcbody := m.funcbody
-
- mfuncxy2ret0; nil
-
- return nil
+ var t r.Type = EvalType(arg0typ)
+ decl.Name = makeprefixtypeident("func2ret0", t)
+ return decl
}
+
+mdeclfuncy2ret0; bool
+mdeclfuncy2ret0; int
+mdeclfuncy2ret0; int8
+mdeclfuncy2ret0; int16
+mdeclfuncy2ret0; int32
+mdeclfuncy2ret0; int64
+mdeclfuncy2ret0; uint
+mdeclfuncy2ret0; uint8
+mdeclfuncy2ret0; uint16
+mdeclfuncy2ret0; uint32
+mdeclfuncy2ret0; uint64
+mdeclfuncy2ret0; uintptr
+mdeclfuncy2ret0; float32
+mdeclfuncy2ret0; float64
+mdeclfuncy2ret0; complex64
+mdeclfuncy2ret0; complex128
+mdeclfuncy2ret0; string
diff --git a/vendor/github.com/cosmos72/gomacro/fast/function.go b/vendor/github.com/cosmos72/gomacro/fast/function.go
index 1f6204e..5a1be92 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/function.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/function.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* function.go
@@ -34,12 +25,13 @@ import (
)
type funcMaker struct {
- nbinds int
- nintbinds int
- parambinds []*Bind
- resultbinds []*Bind
- resultfuns []I
- funcbody func(*Env)
+ Name string
+ nbind int
+ nintbind int
+ Param []*Bind
+ Result []*Bind
+ resultfun []I
+ funcbody func(*Env)
}
// DeclFunc compiles a function, macro or method declaration
@@ -78,12 +70,12 @@ func (c *Comp) FuncDecl(funcdecl *ast.FuncDecl) {
var funcbind *Bind
if ismacro {
// use a ConstBind, as builtins do
- funcbind = c.AddBind(funcname, ConstBind, c.TypeOfMacro())
+ funcbind = c.NewBind(funcname, ConstBind, c.TypeOfMacro())
} else {
- funcbind = c.AddBind(funcname, FuncBind, t)
+ funcbind = c.NewBind(funcname, FuncBind, t)
}
cf := NewComp(c, nil)
- info, resultfuns := cf.funcBinds(functype, t, paramnames, resultnames)
+ info, resultfuns := cf.funcBinds(funcname, functype, t, paramnames, resultnames)
cf.Func = info
if body := funcdecl.Body; body != nil {
@@ -124,12 +116,12 @@ func (c *Comp) FuncDecl(funcdecl *ast.FuncDecl) {
stmt = func(env *Env) (Stmt, *Env) {
fun := f(env)
// Debugf("setting env.Binds[%d] = %v <%v>", funcindex, fun.Interface(), fun.Type())
- env.Binds[funcindex] = fun
+ env.Vals[funcindex] = fun
env.IP++
return env.Code[env.IP], env
}
}
- c.Code.Append(stmt, funcdecl.Pos())
+ c.Append(stmt, funcdecl.Pos())
panicking = false
}
@@ -148,9 +140,9 @@ func (c *Comp) methodAdd(funcdecl *ast.FuncDecl, t xr.Type) (methodindex int, me
c.Errorf("error adding method %s <%v> to type <%v>\n\t%v", name, t, trecv, rec)
}
}()
- n1 := trecv.NumMethod()
+ n1 := trecv.NumExplicitMethod()
methodindex = trecv.AddMethod(name, t)
- n2 := trecv.NumMethod()
+ n2 := trecv.NumExplicitMethod()
if n1 == n2 {
c.Warnf("redefined method: %s.%s", trecv.Name(), name)
}
@@ -179,7 +171,7 @@ func (c *Comp) methodDecl(funcdecl *ast.FuncDecl) {
methodindex, methods := c.methodAdd(funcdecl, t)
cf := NewComp(c, nil)
- info, resultfuns := cf.funcBinds(functype, t, paramnames, resultnames)
+ info, resultfuns := cf.funcBinds(funcdecl.Name.Name, functype, t, paramnames, resultnames)
cf.Func = info
body := funcdecl.Body
@@ -203,7 +195,7 @@ func (c *Comp) methodDecl(funcdecl *ast.FuncDecl) {
methodname := funcdecl.Name
stmt = func(env *Env) (Stmt, *Env) {
(*methods)[methodindex] = f(env)
- env.ThreadGlobals.Debugf("implemented method %s.%s", tname, methodname)
+ env.Run.Debugf("implemented method %s.%s", tname, methodname)
env.IP++
return env.Code[env.IP], env
}
@@ -214,7 +206,7 @@ func (c *Comp) methodDecl(funcdecl *ast.FuncDecl) {
return env.Code[env.IP], env
}
}
- c.Code.Append(stmt, funcdecl.Pos())
+ c.Append(stmt, funcdecl.Pos())
}
// FuncLit compiles a function literal, i.e. a closure.
@@ -224,7 +216,7 @@ func (c *Comp) FuncLit(funclit *ast.FuncLit) *Expr {
t, paramnames, resultnames := c.TypeFunction(functype)
cf := NewComp(c, nil)
- info, resultfuns := cf.funcBinds(functype, t, paramnames, resultnames)
+ info, resultfuns := cf.funcBinds("", functype, t, paramnames, resultnames)
cf.Func = info
body := funclit.Body
@@ -243,7 +235,7 @@ func (c *Comp) FuncLit(funclit *ast.FuncLit) *Expr {
}
// prepare the function parameter binds, result binds and FuncInfo
-func (c *Comp) funcBinds(functype *ast.FuncType, t xr.Type, paramnames, resultnames []string) (info *FuncInfo, resultfuns []I) {
+func (c *Comp) funcBinds(funcname string, functype *ast.FuncType, t xr.Type, paramnames, resultnames []string) (info *FuncInfo, resultfuns []I) {
parambinds := c.funcParamBinds(functype, t, paramnames)
@@ -255,8 +247,9 @@ func (c *Comp) funcBinds(functype *ast.FuncType, t xr.Type, paramnames, resultna
}
}
return &FuncInfo{
- Params: parambinds,
- Results: resultbinds,
+ Name: funcname,
+ Param: parambinds,
+ Result: resultbinds,
NamedResults: namedresults,
}, resultfuns
}
@@ -269,7 +262,7 @@ func (c *Comp) funcParamBinds(functype *ast.FuncType, t xr.Type, names []string)
ismethod := t.IsMethod()
for i := 0; i < nin; i++ {
// names[i] == "" means that argument is unnamed, and thus ignored inside the function.
- // change to "_" so that AddBind will not allocate a bind for it - correct optimization...
+ // change to "_" so that NewBind will not allocate a bind for it - correct optimization...
// just remember to check for such case when creating the function
name := names[i]
if !ismethod || i != 0 {
@@ -284,7 +277,7 @@ func (c *Comp) funcParamBinds(functype *ast.FuncType, t xr.Type, names []string)
if namedparams && unnamedparams {
c.Errorf("cannot mix named and unnamed parameters in function declaration: %v", functype)
}
- bind := c.AddBind(name, VarBind, t.In(i))
+ bind := c.NewBind(name, VarBind, t.In(i))
binds[i] = bind
}
return binds
@@ -312,26 +305,27 @@ func (c *Comp) funcResultBinds(functype *ast.FuncType, t xr.Type, names []string
bind := c.DeclVar0(name, t.Out(i), nil)
binds[i] = bind
// compile the extraction of results from runtime env
- sym := bind.AsSymbol(0)
- funs[i] = c.Symbol(sym).WithFun()
+ funs[i] = c.Bind(bind).WithFun()
}
return
}
func (c *Comp) funcMaker(info *FuncInfo, resultfuns []I, funcbody func(*Env)) *funcMaker {
- return &funcMaker{
- nbinds: c.BindNum,
- nintbinds: c.IntBindNum,
- parambinds: info.Params,
- resultbinds: info.Results,
- resultfuns: resultfuns,
- funcbody: funcbody,
+ m := &funcMaker{
+ Name: info.Name,
+ nbind: c.BindNum,
+ nintbind: c.IntBindNum,
+ Param: info.Param,
+ Result: info.Result,
+ resultfun: resultfuns,
+ funcbody: funcbody,
}
+ c.FuncMaker = m // store it for debugger command 'backtrace'
+ return m
}
// actually create the function
func (c *Comp) funcCreate(t xr.Type, info *FuncInfo, resultfuns []I, funcbody func(*Env)) func(*Env) r.Value {
- c.ErrorIfCompiled(t)
m := c.funcMaker(info, resultfuns, funcbody)
@@ -385,46 +379,64 @@ func (c *Comp) funcCreate(t xr.Type, info *FuncInfo, resultfuns []I, funcbody fu
// fallback: create a non-optimized function
func (c *Comp) funcGeneric(t xr.Type, m *funcMaker) func(*Env) r.Value {
- paramdecls := make([]func(*Env, r.Value), len(m.parambinds))
- for i, bind := range m.parambinds {
+ // do NOT keep a reference to funcMaker
+ nbinds := m.nbind
+ nintbinds := m.nintbind
+ funcbody := m.funcbody
+ rtype := t.ReflectType()
+
+ if funcbody == nil {
+ // pre-fill rets with zero values
+ rets := make([]r.Value, len(m.Result))
+ for i, bind := range m.Result {
+ rets[i] = xr.Zero(bind.Type)
+ }
+ return func(env *Env) r.Value {
+ return r.MakeFunc(rtype, func(args []r.Value) []r.Value {
+ return rets
+ })
+ }
+ }
+
+ paramdecls := make([]func(*Env, r.Value), len(m.Param))
+ for i, bind := range m.Param {
if bind.Desc.Index() != NoIndex {
paramdecls[i] = c.DeclBindRuntimeValue(bind)
}
}
- resultexprs := make([]func(*Env) r.Value, len(m.resultfuns))
- for i, resultfun := range m.resultfuns {
- resultexprs[i] = funAsX1(resultfun, m.resultbinds[i].Type)
+ resultexprs := make([]func(*Env) r.Value, len(m.resultfun))
+ for i, resultfun := range m.resultfun {
+ resultexprs[i] = funAsX1(resultfun, m.Result[i].Type)
}
- // do NOT keep a reference to funcMaker
- nbinds := m.nbinds
- nintbinds := m.nintbinds
- funcbody := m.funcbody
- rtype := t.ReflectType()
+ var debugC *Comp
+ if c.Globals.Options&base.OptDebugger != 0 {
+ // keep a reference to c only if needed
+ debugC = c
+ }
return func(env *Env) r.Value {
// function is closed over the env used to DECLARE it
env.MarkUsedByClosure()
return r.MakeFunc(rtype, func(args []r.Value) []r.Value {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbinds, nintbinds, debugC)
- if funcbody != nil {
- // copy runtime arguments into allocated binds
- for i, decl := range paramdecls {
- if decl != nil {
- // decl == nil means the argument is ignored inside the function
- decl(env, args[i])
- }
+ // copy runtime arguments into allocated binds
+ for i, decl := range paramdecls {
+ if decl != nil {
+ // decl == nil means the argument is ignored inside the function
+ decl(env, args[i])
}
- // execute the body
- funcbody(env)
}
+ // execute the body
+ funcbody(env)
+
// read results from allocated binds and return them
rets := make([]r.Value, len(resultexprs))
for i, expr := range resultexprs {
rets[i] = expr(env)
}
- env.FreeEnv()
+ env.freeEnv4Func()
return rets
})
}
@@ -434,26 +446,32 @@ func (c *Comp) funcGeneric(t xr.Type, m *funcMaker) func(*Env) r.Value {
func (c *Comp) macroCreate(t xr.Type, info *FuncInfo, resultfuns []I, funcbody func(*Env)) func(*Env) func(args []r.Value) []r.Value {
m := c.funcMaker(info, resultfuns, funcbody)
- paramdecls := make([]func(*Env, r.Value), len(m.parambinds))
- for i, bind := range m.parambinds {
+ paramdecls := make([]func(*Env, r.Value), len(m.Param))
+ for i, bind := range m.Param {
if bind.Desc.Index() != NoIndex {
paramdecls[i] = c.DeclBindRuntimeValue(bind)
}
}
- resultexprs := make([]func(*Env) r.Value, len(m.resultfuns))
- for i, resultfun := range m.resultfuns {
- resultexprs[i] = funAsX1(resultfun, m.resultbinds[i].Type)
+ resultexprs := make([]func(*Env) r.Value, len(m.resultfun))
+ for i, resultfun := range m.resultfun {
+ resultexprs[i] = funAsX1(resultfun, m.Result[i].Type)
}
// do NOT keep a reference to funcMaker
- nbinds := m.nbinds
- nintbinds := m.nintbinds
+ nbinds := m.nbind
+ nintbinds := m.nintbind
+
+ var debugC *Comp
+ if c.Globals.Options&base.OptDebugger != 0 {
+ // keep a reference to c only if needed
+ debugC = c
+ }
return func(env *Env) func(args []r.Value) []r.Value {
// macro is closed over the env used to DECLARE it
env.MarkUsedByClosure()
return func(args []r.Value) []r.Value {
- env := NewEnv4Func(env, nbinds, nintbinds)
+ env := newEnv4Func(env, nbinds, nintbinds, debugC)
if funcbody != nil {
// copy runtime arguments into allocated binds
@@ -471,7 +489,7 @@ func (c *Comp) macroCreate(t xr.Type, info *FuncInfo, resultfuns []I, funcbody f
for i, expr := range resultexprs {
rets[i] = expr(env)
}
- env.FreeEnv()
+ env.freeEnv4Func()
return rets
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/global.go b/vendor/github.com/cosmos72/gomacro/fast/global.go
index a7a7474..75ebd86 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/global.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/global.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* global.go
@@ -33,56 +24,22 @@ import (
r "reflect"
"sort"
+ "github.com/cosmos72/gomacro/atomic"
. "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/base/untyped"
xr "github.com/cosmos72/gomacro/xreflect"
)
-// opaqueTypeOf returns an xr.Type with the same name and package as r.TypeOf(val) but without fields or methods
-func (g *CompThreadGlobals) opaqueType(rtype r.Type) xr.Type {
- if k := rtype.Kind(); k != r.Struct {
- g.Errorf("internal error: unimplemented opaqueTypeOf for kind=%v, expecting kind=Struct", k)
- }
- v := g.Universe
- t := v.NamedOf(rtype.Name(), "fast")
- t.SetUnderlying(v.TypeOf(struct{}{}))
- t.UnsafeForceReflectType(rtype)
- v.ReflectTypes[rtype] = t // also cache Type in g.Universe.ReflectTypes
- // g.Debugf("initialized opaque type %v <%v> <%v>", t.Kind(), t.GoType(), t.ReflectType())
- return t
-}
+type I = interface{}
// ================================= Untyped =================================
-// UntypedLit represents an untyped literal value, i.e. an untyped constant
-type UntypedLit struct {
- Kind r.Kind // default type. matches Obj.Kind() except for rune literals, where Kind == reflect.Int32
- Obj constant.Value
- Universe *xr.Universe
-}
+type UntypedLit = untyped.Lit
-var (
- untypedZero = UntypedLit{Kind: r.Int, Obj: constant.MakeInt64(0)}
- untypedOne = UntypedLit{Kind: r.Int, Obj: constant.MakeInt64(1)}
-)
+var untypedOne = UntypedLit{Kind: r.Int, Val: constant.MakeInt64(1)}
-// pretty-print untyped constants
-func (untyp UntypedLit) String() string {
- obj := untyp.Obj
- var strkind, strobj interface{} = untyp.Kind, nil
- if untyp.Kind == r.Int32 {
- strkind = "rune"
- if obj.Kind() == constant.Int {
- if i, exact := constant.Int64Val(obj); exact {
- if i >= 0 && i <= 0x10FFFF {
- strobj = fmt.Sprintf("%q", i)
- }
- }
- }
- }
- if strobj == nil {
- strobj = obj.ExactString()
- }
- return fmt.Sprintf("{%v %v}", strkind, strobj)
+func MakeUntypedLit(kind r.Kind, val constant.Value, basicTypes *[]xr.Type) UntypedLit {
+ return untyped.MakeLit(kind, val, basicTypes)
}
// ================================= Lit =================================
@@ -124,19 +81,13 @@ func (lit *Lit) UntypedKind() r.Kind {
}
}
-func (lit *Lit) ReflectValue() r.Value {
- if lit.Untyped() {
- // do not modify original Lit type
- tmp := *lit
- lit = &tmp
- lit.ConstTo(lit.DefaultType())
- }
+func (lit *Lit) ConstValue() r.Value {
v := r.ValueOf(lit.Value)
if lit.Type != nil {
rtype := lit.Type.ReflectType()
if !v.IsValid() {
v = r.Zero(rtype)
- } else if v.Type() != rtype {
+ } else if !lit.Untyped() && v.Type() != rtype {
v = v.Convert(rtype)
}
}
@@ -152,6 +103,34 @@ func (lit Lit) String() string {
}
}
+// ================================= EFlags =================================
+
+// EFlags represents the flags of an expression
+type EFlags uint32
+
+const (
+ EIsNil EFlags = 1 << iota
+ EIsTypeAssert
+)
+
+func (f EFlags) IsNil() bool {
+ return f&EIsNil != 0
+}
+
+func MakeEFlag(flag bool, iftrue EFlags) EFlags {
+ if flag {
+ return iftrue
+ }
+ return 0
+}
+
+func EFlag4Value(value I) EFlags {
+ if value == nil {
+ return EIsNil
+ }
+ return 0
+}
+
// ================================= Expr =================================
// Expr represents an expression in the "compiler"
@@ -160,11 +139,11 @@ type Expr struct {
Types []xr.Type // in case the expression produces multiple values. if nil, use Lit.Type.
Fun I // function that evaluates the expression at runtime.
Sym *Symbol // in case the expression is a symbol
- IsNil bool
+ EFlags
}
func (e *Expr) Const() bool {
- return e.Value != nil || e.IsNil
+ return e.Value != nil || e.IsNil()
}
// NumOut returns the number of values that an expression will produce when evaluated
@@ -183,14 +162,6 @@ func (e *Expr) Out(i int) xr.Type {
return e.Types[i]
}
-// Outs returns the types that an expression will produce when evaluated
-func (e *Expr) Outs() []xr.Type {
- if e.Types == nil {
- return []xr.Type{e.Type}
- }
- return e.Types
-}
-
func (e *Expr) String() string {
if e == nil {
return "nil"
@@ -224,7 +195,7 @@ type Builtin struct {
// ================================= Function =================================
-// Function represents a function that accesses *CompEnv in the fast interpreter
+// Function represents a function that accesses *Interp in the fast interpreter
type Function struct {
Fun interface{}
Type xr.Type
@@ -240,10 +211,13 @@ type Macro struct {
// ================================= BindClass =================================
-type BindClass int
+// BindDescriptor uses two bits to store the class.
+// use all remaining bits as unsigned => we lose only one bit
+// when representing non-negative ints
+type BindClass uint
const (
- ConstBind = BindClass(iota)
+ ConstBind BindClass = iota
FuncBind
VarBind
IntBind
@@ -262,20 +236,21 @@ func (class BindClass) String() string {
// ================================== BindDescriptor =================================
-// the zero value of BindDescriptor is a valid descriptor for all constants
+// the zero value of BindDescriptor is a valid descriptor for all constants,
+// and also for functions and variables named "_"
type BindDescriptor BindClass
const (
bindClassMask = BindClass(0x3)
bindIndexShift = 2
- NoIndex = int(0) // index of constants, functions and variables named "_"
+ NoIndex = int(-1) // index of constants, functions and variables named "_"
ConstBindDescriptor = BindDescriptor(ConstBind) // bind descriptor for all constants
)
-func MakeBindDescriptor(class BindClass, index int) BindDescriptor {
+func (class BindClass) MakeDescriptor(index int) BindDescriptor {
class &= bindClassMask
- return BindDescriptor(index<> bindIndexShift)
+ index := int(desc>>bindIndexShift) - 1
// debugf("BindDescriptor=%v, class=%v, index=%v", desc, desc.Class(), index)
return index
}
@@ -317,16 +292,31 @@ func (bind *Bind) Const() bool {
return bind.Desc.Class() == ConstBind
}
+// return bind value for constant binds.
+// if bind is untyped constant, returns UntypedLit wrapped in reflect.Value
func (bind *Bind) ConstValue() r.Value {
if !bind.Const() {
return Nil
}
- return bind.Lit.ReflectValue()
+ return bind.Lit.ConstValue()
}
-func (c *Comp) BindUntyped(value UntypedLit) *Bind {
- value.Universe = c.Universe
- return &Bind{Lit: Lit{Type: c.TypeOfUntypedLit(), Value: value}, Desc: ConstBindDescriptor}
+// return bind value.
+// if bind is untyped constant, returns UntypedLit wrapped in reflect.Value
+func (bind *Bind) RuntimeValue(env *Env) r.Value {
+ var v r.Value
+ switch bind.Desc.Class() {
+ case ConstBind:
+ v = bind.Lit.ConstValue()
+ case IntBind:
+ expr := bind.intExpr(&env.Run.Stringer)
+ // no need for Interp.RunExpr(): expr is a local variable,
+ // not a statement or a function call that may be stopped by the debugger
+ v = expr.AsX1()(env)
+ default:
+ v = env.Vals[bind.Desc.Index()]
+ }
+ return v
}
func (bind *Bind) AsVar(upn int, opt PlaceOption) *Var {
@@ -344,8 +334,9 @@ func (bind *Bind) AsSymbol(upn int) *Symbol {
return &Symbol{Bind: *bind, Upn: upn}
}
-type NamedType struct {
- Name, Path string
+func (c *Comp) BindUntyped(kind r.Kind, value constant.Value) *Bind {
+ untypedlit := MakeUntypedLit(kind, value, &c.Universe.BasicTypes)
+ return &Bind{Lit: Lit{Type: c.TypeOfUntypedLit(), Value: untypedlit}, Desc: ConstBindDescriptor}
}
// ================================== Symbol, Var, Place =================================
@@ -393,7 +384,7 @@ type Place struct {
// For map[key], Fun returns the map itself (which may NOT be settable).
// Call Fun only once, it may have side effects!
Fun func(*Env) r.Value
- // Fddr is nil for variables.
+ // Addr is nil for variables.
// For non-variables, it will return the address of the place.
// For map[key], it is nil since map[key] is not addressable
// Call Addr only once, it may have side effects!
@@ -422,34 +413,15 @@ func (opt PlaceOption) String() string {
}
}
-// ================================= Import =================================
-
-// Import represents an imported package
-type Import struct {
- // no need to split compile-time bind descriptors map from runtime values slice,
- // because an import is a singleton - cannot be "instantiated" multiple times.
- // Instead function or block activation record (*Env) can:
- // think about goroutines, recursive functions or even loops.
- Binds map[string]r.Value
- BindTypes map[string]xr.Type
- Types map[string]xr.Type
- Name, Path string
-}
-
// ================================== Comp, Env =================================
type CompileOptions int
const (
- OptKeepUntyped CompileOptions = 1 << iota // if set, Compile() on expressions will keep all untyped constants as such (in expressions where Go compiler would compute an untyped constant too)
- OptIsCompiled // if set, packages is at least partially compiled. Effect: variables may be pre-existing, so Comp.intBinds cannot be used
- OptDefaults CompileOptions = 0
+ COptKeepUntyped CompileOptions = 1 << iota // if set, Compile() on expressions will keep all untyped constants as such (in expressions where Go compiler would compute an untyped constant too)
+ COptDefaults CompileOptions = 0
)
-func (opts CompileOptions) IsCompiled() bool {
- return opts&OptIsCompiled != 0
-}
-
type Code struct {
List []Stmt
DebugPos []token.Pos // for debugging interpreted code: position of each statement
@@ -459,7 +431,6 @@ type Code struct {
type LoopInfo struct {
Break *int
Continue *int
- Labels map[string]*int
ThisLabels []string // sorted. for labeled "switch" and "for"
}
@@ -469,109 +440,189 @@ func (l *LoopInfo) HasLabel(label string) bool {
}
type FuncInfo struct {
- Params []*Bind
- Results []*Bind
+ Name string
+ Param []*Bind
+ Result []*Bind
NamedResults bool
}
const (
- PoolCapacity = 32
+ poolCapacity = 32
+)
+
+type ExecFlags uint32
+
+const (
+ EFStartDefer ExecFlags = 1 << iota // true next executed function body is a defer
+ EFDefer // function body being executed is a defer
+ EFDebug // function body is executed with debugging enabled
+)
+
+func (ef ExecFlags) StartDefer() bool {
+ return ef&EFStartDefer != 0
+}
+
+func (ef ExecFlags) IsDefer() bool {
+ return ef&EFDefer != 0
+}
+
+func (ef ExecFlags) IsDebug() bool {
+ return ef&EFDebug != 0
+}
+
+func (ef *ExecFlags) SetDefer(flag bool) {
+ if flag {
+ (*ef) |= EFDefer
+ } else {
+ (*ef) &^= EFDefer
+ }
+}
+
+func (ef *ExecFlags) SetStartDefer(flag bool) {
+ if flag {
+ (*ef) |= EFStartDefer
+ } else {
+ (*ef) &^= EFStartDefer
+ }
+}
+
+func (ef *ExecFlags) SetDebug(flag bool) {
+ if flag {
+ (*ef) |= EFDebug
+ } else {
+ (*ef) &^= EFDebug
+ }
+}
+
+type DebugOp struct {
+ // statements at env.CallDepth < Depth will be executed in single-stepping mode,
+ // i.e. invoking the debugger after every statement
+ Depth int
+ // nil = do not panic.
+ // otherwise, address of value to panic() in order to terminate execution
+ Panic *interface{}
+}
+
+var (
+ // NEVER modify these!
+ DebugOpContinue = DebugOp{0, nil}
+ DebugOpStep = DebugOp{MaxInt, nil}
)
-// ThreadGlobals contains per-goroutine interpreter runtime bookeeping information
-type ThreadGlobals struct {
- FileEnv *Env
- TopEnv *Env
+type Debugger interface {
+ Breakpoint(ir *Interp, env *Env) DebugOp
+ At(ir *Interp, env *Env) DebugOp
+}
+
+// IrGlobals contains interpreter configuration
+type IrGlobals struct {
+ gls map[uintptr]*Run
+ lock atomic.SpinLock
+ Globals
+}
+
+// Run contains per-goroutine interpreter runtime bookeeping information
+type Run struct {
+ *IrGlobals
+ goid uintptr // owner goroutine id
Interrupt Stmt
- Signal Signal // set by interrupts: Return, Defer...
- PoolSize int
- Pool [PoolCapacity]*Env
+ Signals Signals // set by defer, return, breakpoint, debugger and Run.interrupt(os.Signal)
+ ExecFlags ExecFlags
+ CurrEnv *Env // caller of current function. used ONLY at function entry to build call stack
InstallDefer func() // defer function to be installed
- Panic interface{} // current panic. needed for recover()
- PanicFun *Env // the currently panicking function
DeferOfFun *Env // function whose defer are running
- StartDefer bool // true if next executed function body is a defer
- IsDefer bool // true if function body being executed is a defer
- *Globals
+ PanicFun *Env // the currently panicking function
+ Panic interface{} // current panic. needed for recover()
+ CmdOpt CmdOpt
+ Debugger Debugger
+ DebugDepth int // depth of function to debug with single-step
+ PoolSize int
+ Pool [poolCapacity]*Env
}
-// CompGlobals contains per-goroutine interpreter compile bookeeping information
-type CompThreadGlobals struct {
+// CompGlobals contains interpreter compile bookeeping information
+type CompGlobals struct {
+ *IrGlobals
Universe *xr.Universe
+ KnownImports map[string]*Import // map[path]*Import cache of known imports
interf2proxy map[r.Type]r.Type // interface -> proxy
proxy2interf map[r.Type]xr.Type // proxy -> interface
- *Globals
+ Prompt string
}
-// Comp is a tree-of-closures builder: it transforms ast.Nodes into closures
-// for faster execution. Consider it a poor man's compiler (hence the name)
-type Comp struct {
+func (cg *CompGlobals) CompileOptions() CompileOptions {
+ var opts CompileOptions
+ if cg.Options&OptKeepUntyped != 0 {
+ opts = COptKeepUntyped
+ }
+ return opts
+}
+
+type CompBinds struct {
Binds map[string]*Bind
BindNum int // len(Binds) == BindNum + IntBindNum + # of constants
IntBindNum int
+ // if address of some Env.Ints[index] was taken, we must honor it:
+ // we can no longer reallocate Env.Ints[], thus we cannot declare IntBind variables
+ // beyond Env.Ints[] capacity. In such case, we set IntBindMax to cap(Env.Ints):
+ // Comp.NewBind() will allocate IntBind variables only up to IntBindMax,
+ // then switch and allocate them as VarBind instead (they are slower and each one allocates memory)
+ IntBindMax int
+ Types map[string]xr.Type
+ Name string // set by "package" directive
+ Path string
+}
+
+// Comp is a tree-of-closures builder: it transforms ast.Nodes into closures
+// for faster execution. Consider it a poor man's compiler (hence the name)
+type Comp struct {
+ *CompGlobals
+ CompBinds
// UpCost is the number of *Env.Outer hops to perform at runtime to reach the *Env corresponding to *Comp.Outer
// usually equals one. will be zero if this *Comp defines no local variables/functions.
- UpCost int
- Depth int
- Types map[string]xr.Type
- Code Code // "compiled" code
- Loop *LoopInfo // != nil when compiling a for or switch
- Func *FuncInfo // != nil when compiling a function
- Outer *Comp
- Name string // set by "package" directive
- Path string
- CompileOptions CompileOptions
- *CompThreadGlobals
+ UpCost int
+ Depth int
+ Code Code // "compiled" code
+ Loop *LoopInfo // != nil when compiling a for or switch
+ Func *FuncInfo // != nil when compiling a function
+ Labels map[string]*int
+ Outer *Comp
+ FuncMaker *funcMaker // used by debugger command 'backtrace' to obtain function name, type and binds for arguments and results
}
-const (
- // conventional values
- AnyDepth = -1
- FileDepth = -2
- TopDepth = -3
-)
-
-type Signal int
+// ================================= Env =================================
-const (
- SigNone Signal = iota
- SigReturn
- SigDefer // request to install a defer function
-)
+type EnvBinds struct {
+ Vals []r.Value
+ Ints []uint64
+}
// Env is the interpreter's runtime environment
type Env struct {
- Binds []r.Value
- IntBinds []uint64
- Outer *Env
- IP int
- Code []Stmt
- DebugPos []token.Pos // for debugging interpreted code: position of each statement
- ThreadGlobals *ThreadGlobals
- UsedByClosure bool // a bitfield would introduce more races among goroutines
- AddressTaken bool // true if &Env.IntBinds[index] was executed... then we cannot reuse IntBinds
-}
-
-type (
- I interface{}
- /*
- XBool func(*Env) bool
- XInt func(*Env) int
- XInt8 func(*Env) int8
- XInt16 func(*Env) int16
- XInt32 func(*Env) int32
- XInt64 func(*Env) int64
- XUint func(*Env) uint
- XUint8 func(*Env) uint8
- XUint16 func(*Env) uint16
- XUint32 func(*Env) uint32
- XUint64 func(*Env) uint64
- XUintptr func(*Env) uintptr
- XFloat32 func(*Env) float32
- XFloat64 func(*Env) float64
- XComplex64 func(*Env) complex64
- XComplex128 func(*Env) complex128
- XString func(*Env) string
- XV func(*Env) (r.Value, []r.Value)
- */
-)
+ EnvBinds
+ Outer *Env
+ IP int
+ Code []Stmt
+ Run *Run
+ FileEnv *Env
+ DebugPos []token.Pos // for debugging interpreted code: position of each statement
+ DebugComp *Comp // for debugging interpreted code: compiler with Binds, and to rebuild an Interp if needed
+ Caller *Env // for debugging interpreted code: previous function in call stack. nil for nested *Env
+ CallDepth int // for debugging interpreted code: depth of call stack
+ UsedByClosure bool // a bitfield would introduce more races among goroutines
+ IntAddressTaken bool // true if &Env.Ints[index] was executed... then we cannot reuse or reallocate Ints
+}
+
+// ================================= Import =================================
+
+// Import represents an imported package.
+// we cannot name it "Package" because it conflicts with ast2.Package
+type Import struct {
+ // model as a combination of CompBinds and EnvBinds, because to support the command 'package PATH'
+ // we must convert Comp+Env to Import and vice-versa.
+ // This has the added benefit of allowing packages to freely mix
+ // interpreted and compiled constants, functions, variables and types.
+ CompBinds
+ *EnvBinds
+ env *Env
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/identifier.go b/vendor/github.com/cosmos72/gomacro/fast/identifier.go
index b655e3a..85b445f 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/identifier.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/identifier.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* identifier.go
@@ -28,20 +19,9 @@ package fast
import (
r "reflect"
"unsafe"
-)
-func (c *Comp) IsCompiledOuter(upn int) bool {
- for ; upn > 0; upn-- {
- for c.UpCost == 0 {
- c = c.Outer
- }
- c = c.Outer
- }
- for c.UpCost == 0 {
- c = c.Outer
- }
- return c.IsCompiled()
-}
+ "github.com/cosmos72/gomacro/base"
+)
func (c *Comp) Resolve(name string) *Symbol {
sym := c.TryResolve(name)
@@ -76,862 +56,929 @@ func (c *Comp) IdentPlace(name string, opt PlaceOption) *Place {
return nil
}
// assignment to _ is allowed: it does nothing
- bind := c.AddBind(name, VarBind, c.TypeOfInterface())
+ bind := c.NewBind(name, VarBind, c.TypeOfInterface())
return &Place{Var: *bind.AsVar(0, PlaceSettable)}
}
sym := c.Resolve(name)
return &Place{Var: *sym.AsVar(opt)}
}
+// Bind compiles a read operation on a constant, variable or function declared in 'c'
+func (c *Comp) Bind(bind *Bind) *Expr {
+ return bind.Expr(&c.Globals.Stringer)
+}
+
// Symbol compiles a read operation on a constant, variable or function
func (c *Comp) Symbol(sym *Symbol) *Expr {
+ return sym.Expr(c.Depth, &c.Globals.Stringer)
+}
+
+// Expr returns an expression that will read the given Bind at runtime
+func (bind *Bind) Expr(st *base.Stringer) *Expr {
+ switch bind.Desc.Class() {
+ case ConstBind:
+ return exprLit(bind.Lit, bind.AsSymbol(0))
+ case VarBind, FuncBind:
+ return bind.expr(st)
+ case IntBind:
+ return bind.intExpr(st)
+ default:
+ st.Errorf("unknown symbol class %s", bind.Desc.Class())
+ }
+ return nil
+}
+
+// Expr returns an expression that will read the given Symbol at runtime
+func (sym *Symbol) Expr(depth int, st *base.Stringer) *Expr {
switch sym.Desc.Class() {
case ConstBind:
return exprLit(sym.Lit, sym)
case VarBind, FuncBind:
- return c.symbol(sym)
+ return sym.expr(depth, st)
case IntBind:
- if c.IsCompiledOuter(sym.Upn) {
- return c.symbol(sym)
- } else {
- return c.intSymbol(sym)
- }
+ return sym.intExpr(depth, st)
default:
- c.Errorf("unknown symbol class %s", sym.Desc.Class())
+ st.Errorf("unknown symbol class %s", sym.Desc.Class())
}
return nil
}
-func (c *Comp) symbol(sym *Symbol) *Expr {
+// upn must be >= 3
+func outerEnv3(env *Env, upn int) *Env {
+ for ; upn >= 3; upn -= 3 {
+ env = env.Outer.Outer.Outer
+ }
+ switch upn {
+ case 2:
+ env = env.Outer
+ fallthrough
+ case 1:
+ env = env.Outer
+ }
+ return env
+}
+
+// return an expression that will read Bind value at runtime
+func (bind *Bind) expr(st *base.Stringer) *Expr {
+ idx := bind.Desc.Index()
+ var fun I
+
+ // if package is (partially) compiled, kind can also be one of Bool, Int*, Uint*, Float*, Complex64
+ switch bind.Type.Kind() {
+ case r.Bool:
+ fun = func(env *Env) bool {
+ return env.Vals[idx].Bool()
+ }
+ case r.Int:
+ fun = func(env *Env) int {
+ return int(env.Vals[idx].Int())
+ }
+ case r.Int8:
+ fun = func(env *Env) int8 {
+ return int8(env.Vals[idx].Int())
+ }
+ case r.Int16:
+ fun = func(env *Env) int16 {
+ return int16(env.Vals[idx].Int())
+ }
+ case r.Int32:
+ fun = func(env *Env) int32 {
+ return int32(env.Vals[idx].Int())
+ }
+ case r.Int64:
+ fun = func(env *Env) int64 {
+ return env.Vals[idx].Int()
+ }
+ case r.Uint:
+ fun = func(env *Env) uint {
+ return uint(env.Vals[idx].Uint())
+ }
+ case r.Uint8:
+ fun = func(env *Env) uint8 {
+ return uint8(env.Vals[idx].Uint())
+ }
+ case r.Uint16:
+ fun = func(env *Env) uint16 {
+ return uint16(env.Vals[idx].Uint())
+ }
+ case r.Uint32:
+ fun = func(env *Env) uint32 {
+ return uint32(env.Vals[idx].Uint())
+ }
+ case r.Uint64:
+ fun = func(env *Env) uint64 {
+ return env.Vals[idx].Uint()
+ }
+ case r.Uintptr:
+ fun = func(env *Env) uintptr {
+ return uintptr(env.Vals[idx].Uint())
+ }
+ case r.Float32:
+ fun = func(env *Env) float32 {
+ return float32(env.Vals[idx].Float())
+ }
+ case r.Float64:
+ fun = func(env *Env) float64 {
+ return env.Vals[idx].Float()
+ }
+ case r.Complex64:
+ fun = func(env *Env) complex64 {
+ return complex64(env.Vals[idx].Complex())
+ }
+ case r.Complex128:
+ fun = func(env *Env) complex128 {
+ return env.Vals[idx].Complex()
+ }
+ case r.String:
+ fun = func(env *Env) string {
+ return env.Vals[idx].String()
+ }
+ default:
+ fun = func(env *Env) r.Value {
+ return env.Vals[idx]
+ }
+ }
+ return &Expr{Lit: Lit{Type: bind.Type}, Fun: fun, Sym: bind.AsSymbol(0)}
+}
+
+// return an expression that will read Symbol value at runtime
+func (sym *Symbol) expr(depth int, st *base.Stringer) *Expr {
idx := sym.Desc.Index()
upn := sym.Upn
kind := sym.Type.Kind()
var fun I
switch upn {
case 0:
- // if package is (partially) compiled, kind can also be one of Bool, Int*, Uint*, Float*, Complex64
- switch kind {
- case r.Bool:
- fun = func(env *Env) bool {
- return env.Binds[idx].Bool()
- }
- case r.Int:
- fun = func(env *Env) int {
- return int(env.Binds[idx].Int())
- }
- case r.Int8:
- fun = func(env *Env) int8 {
- return int8(env.Binds[idx].Int())
- }
- case r.Int16:
- fun = func(env *Env) int16 {
- return int16(env.Binds[idx].Int())
- }
- case r.Int32:
- fun = func(env *Env) int32 {
- return int32(env.Binds[idx].Int())
- }
- case r.Int64:
- fun = func(env *Env) int64 {
- return env.Binds[idx].Int()
- }
- case r.Uint:
- fun = func(env *Env) uint {
- return uint(env.Binds[idx].Uint())
- }
- case r.Uint8:
- fun = func(env *Env) uint8 {
- return uint8(env.Binds[idx].Uint())
- }
- case r.Uint16:
- fun = func(env *Env) uint16 {
- return uint16(env.Binds[idx].Uint())
- }
- case r.Uint32:
- fun = func(env *Env) uint32 {
- return uint32(env.Binds[idx].Uint())
- }
- case r.Uint64:
- fun = func(env *Env) uint64 {
- return env.Binds[idx].Uint()
- }
- case r.Uintptr:
- fun = func(env *Env) uintptr {
- return uintptr(env.Binds[idx].Uint())
- }
- case r.Float32:
- fun = func(env *Env) float32 {
- return float32(env.Binds[idx].Float())
- }
- case r.Float64:
- fun = func(env *Env) float64 {
- return env.Binds[idx].Float()
- }
- case r.Complex64:
- fun = func(env *Env) complex64 {
- return complex64(env.Binds[idx].Complex())
- }
- case r.Complex128:
- fun = func(env *Env) complex128 {
- return env.Binds[idx].Complex()
- }
- case r.String:
- fun = func(env *Env) string {
- return env.Binds[idx].String()
- }
- default:
- fun = func(env *Env) r.Value {
- return env.Binds[idx]
- }
- }
+ return sym.Bind.expr(st)
case 1:
switch kind {
case r.Bool:
fun = func(env *Env) bool {
- return env.Outer.Binds[idx].Bool()
+ return env.Outer.Vals[idx].Bool()
}
case r.Int:
fun = func(env *Env) int {
- return int(env.Outer.Binds[idx].Int())
+ return int(env.Outer.Vals[idx].Int())
}
case r.Int8:
fun = func(env *Env) int8 {
- return int8(env.Outer.Binds[idx].Int())
+ return int8(env.Outer.Vals[idx].Int())
}
case r.Int16:
fun = func(env *Env) int16 {
- return int16(env.Outer.Binds[idx].Int())
+ return int16(env.Outer.Vals[idx].Int())
}
case r.Int32:
fun = func(env *Env) int32 {
- return int32(env.Outer.Binds[idx].Int())
+ return int32(env.Outer.Vals[idx].Int())
}
case r.Int64:
fun = func(env *Env) int64 {
- return env.Outer.Binds[idx].Int()
+ return env.Outer.Vals[idx].Int()
}
case r.Uint:
fun = func(env *Env) uint {
- return uint(env.Outer.Binds[idx].Uint())
+ return uint(env.Outer.Vals[idx].Uint())
}
case r.Uint8:
fun = func(env *Env) uint8 {
- return uint8(env.Outer.Binds[idx].Uint())
+ return uint8(env.Outer.Vals[idx].Uint())
}
case r.Uint16:
fun = func(env *Env) uint16 {
- return uint16(env.Outer.Binds[idx].Uint())
+ return uint16(env.Outer.Vals[idx].Uint())
}
case r.Uint32:
fun = func(env *Env) uint32 {
- return uint32(env.Outer.Binds[idx].Uint())
+ return uint32(env.Outer.Vals[idx].Uint())
}
case r.Uint64:
fun = func(env *Env) uint64 {
- return env.Outer.Binds[idx].Uint()
+ return env.Outer.Vals[idx].Uint()
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- return uintptr(env.Outer.Binds[idx].Uint())
+ return uintptr(env.Outer.Vals[idx].Uint())
}
case r.Float32:
fun = func(env *Env) float32 {
- return float32(env.Outer.Binds[idx].Float())
+ return float32(env.Outer.Vals[idx].Float())
}
case r.Float64:
fun = func(env *Env) float64 {
- return env.Outer.Binds[idx].Float()
+ return env.Outer.Vals[idx].Float()
}
case r.Complex64:
fun = func(env *Env) complex64 {
- return complex64(env.Outer.Binds[idx].Complex())
+ return complex64(env.Outer.Vals[idx].Complex())
}
case r.Complex128:
fun = func(env *Env) complex128 {
- return env.Outer.Binds[idx].Complex()
+ return env.Outer.Vals[idx].Complex()
}
case r.String:
fun = func(env *Env) string {
- return env.Outer.Binds[idx].String()
+ return env.Outer.Vals[idx].String()
}
default:
fun = func(env *Env) r.Value {
- return env.Outer.Binds[idx]
+ return env.Outer.Vals[idx]
}
}
case 2:
switch kind {
case r.Bool:
fun = func(env *Env) bool {
- return env.Outer.Outer.Binds[idx].Bool()
+ return env.Outer.Outer.Vals[idx].Bool()
}
case r.Int:
fun = func(env *Env) int {
- return int(env.Outer.Outer.Binds[idx].Int())
+ return int(env.Outer.Outer.Vals[idx].Int())
}
case r.Int8:
fun = func(env *Env) int8 {
- return int8(env.Outer.Outer.Binds[idx].Int())
+ return int8(env.Outer.Outer.Vals[idx].Int())
}
case r.Int16:
fun = func(env *Env) int16 {
- return int16(env.Outer.Outer.Binds[idx].Int())
+ return int16(env.Outer.Outer.Vals[idx].Int())
}
case r.Int32:
fun = func(env *Env) int32 {
- return int32(env.Outer.Outer.Binds[idx].Int())
+ return int32(env.Outer.Outer.Vals[idx].Int())
}
case r.Int64:
fun = func(env *Env) int64 {
- return env.Outer.Outer.Binds[idx].Int()
+ return env.Outer.Outer.Vals[idx].Int()
}
case r.Uint:
fun = func(env *Env) uint {
- return uint(env.Outer.Outer.Binds[idx].Uint())
+ return uint(env.Outer.Outer.Vals[idx].Uint())
}
case r.Uint8:
fun = func(env *Env) uint8 {
- return uint8(env.Outer.Outer.Binds[idx].Uint())
+ return uint8(env.Outer.Outer.Vals[idx].Uint())
}
case r.Uint16:
fun = func(env *Env) uint16 {
- return uint16(env.Outer.Outer.Binds[idx].Uint())
+ return uint16(env.Outer.Outer.Vals[idx].Uint())
}
case r.Uint32:
fun = func(env *Env) uint32 {
- return uint32(env.Outer.Outer.Binds[idx].Uint())
+ return uint32(env.Outer.Outer.Vals[idx].Uint())
}
case r.Uint64:
fun = func(env *Env) uint64 {
- return env.Outer.Outer.Binds[idx].Uint()
+ return env.Outer.Outer.Vals[idx].Uint()
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- return uintptr(env.Outer.Outer.Binds[idx].Uint())
+ return uintptr(env.Outer.Outer.Vals[idx].Uint())
}
case r.Float32:
fun = func(env *Env) float32 {
- return float32(env.Outer.Outer.Binds[idx].Float())
+ return float32(env.Outer.Outer.Vals[idx].Float())
}
case r.Float64:
fun = func(env *Env) float64 {
- return env.Outer.Outer.Binds[idx].Float()
+ return env.Outer.Outer.Vals[idx].Float()
}
case r.Complex64:
fun = func(env *Env) complex64 {
- return complex64(env.Outer.Outer.Binds[idx].Complex())
+ return complex64(env.Outer.Outer.Vals[idx].Complex())
}
case r.Complex128:
fun = func(env *Env) complex128 {
- return env.Outer.Outer.Binds[idx].Complex()
+ return env.Outer.Outer.Vals[idx].Complex()
}
case r.String:
fun = func(env *Env) string {
- return env.Outer.Outer.Binds[idx].String()
+ return env.Outer.Outer.Vals[idx].String()
}
default:
fun = func(env *Env) r.Value {
- return env.Outer.Outer.Binds[idx]
+ return env.Outer.Outer.Vals[idx]
}
}
- default:
+ case depth - 1:
switch kind {
case r.Bool:
fun = func(env *Env) bool {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.Outer.Binds[idx].Bool()
+ return env.FileEnv.Vals[idx].Bool()
}
case r.Int:
fun = func(env *Env) int {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return int(env.Outer.Outer.Outer.Binds[idx].Int())
+ return int(env.FileEnv.Vals[idx].Int())
}
case r.Int8:
fun = func(env *Env) int8 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return int8(env.Outer.Outer.Outer.Binds[idx].Int())
+ return int8(env.FileEnv.Vals[idx].Int())
}
case r.Int16:
fun = func(env *Env) int16 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return int16(env.Outer.Outer.Outer.Binds[idx].Int())
+ return int16(env.FileEnv.Vals[idx].Int())
}
case r.Int32:
fun = func(env *Env) int32 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return int32(env.Outer.Outer.Outer.Binds[idx].Int())
+ return int32(env.FileEnv.Vals[idx].Int())
}
case r.Int64:
fun = func(env *Env) int64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.Outer.Binds[idx].Int()
+ return env.FileEnv.Vals[idx].Int()
}
case r.Uint:
fun = func(env *Env) uint {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return uint(env.Outer.Outer.Outer.Binds[idx].Uint())
+ return uint(env.FileEnv.Vals[idx].Uint())
}
case r.Uint8:
fun = func(env *Env) uint8 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return uint8(env.Outer.Outer.Outer.Binds[idx].Uint())
+ return uint8(env.FileEnv.Vals[idx].Uint())
}
case r.Uint16:
fun = func(env *Env) uint16 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return uint16(env.Outer.Outer.Outer.Binds[idx].Uint())
+ return uint16(env.FileEnv.Vals[idx].Uint())
}
case r.Uint32:
fun = func(env *Env) uint32 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return uint32(env.Outer.Outer.Outer.Binds[idx].Uint())
+ return uint32(env.FileEnv.Vals[idx].Uint())
}
case r.Uint64:
fun = func(env *Env) uint64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.Outer.Binds[idx].Uint()
+ return env.FileEnv.Vals[idx].Uint()
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return uintptr(env.Outer.Outer.Outer.Binds[idx].Uint())
+ return uintptr(env.FileEnv.Vals[idx].Uint())
}
case r.Float32:
fun = func(env *Env) float32 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return float32(env.Outer.Outer.Outer.Binds[idx].Float())
+ return float32(env.FileEnv.Vals[idx].Float())
}
case r.Float64:
fun = func(env *Env) float64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.Outer.Binds[idx].Float()
+ return env.FileEnv.Vals[idx].Float()
}
case r.Complex64:
fun = func(env *Env) complex64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return complex64(env.Outer.Outer.Outer.Binds[idx].Complex())
+ return complex64(env.FileEnv.Vals[idx].Complex())
}
case r.Complex128:
fun = func(env *Env) complex128 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.Outer.Binds[idx].Complex()
+ return env.FileEnv.Vals[idx].Complex()
}
case r.String:
fun = func(env *Env) string {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.Outer.Binds[idx].String()
+ return env.FileEnv.Vals[idx].String()
}
default:
fun = func(env *Env) r.Value {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.Outer.Binds[idx]
+ return env.FileEnv.Vals[idx]
}
}
- case c.Depth - 1:
+ case depth: // TopEnv should not contain variables or functions... but no harm
switch kind {
case r.Bool:
fun = func(env *Env) bool {
- return env.ThreadGlobals.FileEnv.Binds[idx].Bool()
+ return env.FileEnv.Outer.Vals[idx].Bool()
}
case r.Int:
fun = func(env *Env) int {
- return int(env.ThreadGlobals.FileEnv.Binds[idx].Int())
+ return int(env.FileEnv.Outer.Vals[idx].Int())
}
case r.Int8:
fun = func(env *Env) int8 {
- return int8(env.ThreadGlobals.FileEnv.Binds[idx].Int())
+ return int8(env.FileEnv.Outer.Vals[idx].Int())
}
case r.Int16:
fun = func(env *Env) int16 {
- return int16(env.ThreadGlobals.FileEnv.Binds[idx].Int())
+ return int16(env.FileEnv.Outer.Vals[idx].Int())
}
case r.Int32:
fun = func(env *Env) int32 {
- return int32(env.ThreadGlobals.FileEnv.Binds[idx].Int())
+ return int32(env.FileEnv.Outer.Vals[idx].Int())
}
case r.Int64:
fun = func(env *Env) int64 {
- return env.ThreadGlobals.FileEnv.Binds[idx].Int()
+ return env.FileEnv.Outer.Vals[idx].Int()
}
case r.Uint:
fun = func(env *Env) uint {
- return uint(env.ThreadGlobals.FileEnv.Binds[idx].Uint())
+ return uint(env.FileEnv.Outer.Vals[idx].Uint())
}
case r.Uint8:
fun = func(env *Env) uint8 {
- return uint8(env.ThreadGlobals.FileEnv.Binds[idx].Uint())
+ return uint8(env.FileEnv.Outer.Vals[idx].Uint())
}
case r.Uint16:
fun = func(env *Env) uint16 {
- return uint16(env.ThreadGlobals.FileEnv.Binds[idx].Uint())
+ return uint16(env.FileEnv.Outer.Vals[idx].Uint())
}
case r.Uint32:
fun = func(env *Env) uint32 {
- return uint32(env.ThreadGlobals.FileEnv.Binds[idx].Uint())
+ return uint32(env.FileEnv.Outer.Vals[idx].Uint())
}
case r.Uint64:
fun = func(env *Env) uint64 {
- return env.ThreadGlobals.FileEnv.Binds[idx].Uint()
+ return env.FileEnv.Outer.Vals[idx].Uint()
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- return uintptr(env.ThreadGlobals.FileEnv.Binds[idx].Uint())
+ return uintptr(env.FileEnv.Outer.Vals[idx].Uint())
}
case r.Float32:
fun = func(env *Env) float32 {
- return float32(env.ThreadGlobals.FileEnv.Binds[idx].Float())
+ return float32(env.FileEnv.Outer.Vals[idx].Float())
}
case r.Float64:
fun = func(env *Env) float64 {
- return env.ThreadGlobals.FileEnv.Binds[idx].Float()
+ return env.FileEnv.Outer.Vals[idx].Float()
}
case r.Complex64:
fun = func(env *Env) complex64 {
- return complex64(env.ThreadGlobals.FileEnv.Binds[idx].Complex())
+ return complex64(env.FileEnv.Outer.Vals[idx].Complex())
}
case r.Complex128:
fun = func(env *Env) complex128 {
- return env.ThreadGlobals.FileEnv.Binds[idx].Complex()
+ return env.FileEnv.Outer.Vals[idx].Complex()
}
case r.String:
fun = func(env *Env) string {
- return env.ThreadGlobals.FileEnv.Binds[idx].String()
+ return env.FileEnv.Outer.Vals[idx].String()
}
default:
fun = func(env *Env) r.Value {
- return env.ThreadGlobals.FileEnv.Binds[idx]
+ return env.FileEnv.Outer.Vals[idx]
}
}
- case c.Depth: // TopEnv should not contain variables or functions... but no harm
+ default:
switch kind {
case r.Bool:
fun = func(env *Env) bool {
- return env.ThreadGlobals.TopEnv.Binds[idx].Bool()
+ env = env.Up(upn)
+ return env.Vals[idx].Bool()
}
case r.Int:
fun = func(env *Env) int {
- return int(env.ThreadGlobals.TopEnv.Binds[idx].Int())
+ env = env.Up(upn)
+ return int(env.Vals[idx].Int())
}
case r.Int8:
fun = func(env *Env) int8 {
- return int8(env.ThreadGlobals.TopEnv.Binds[idx].Int())
+ env = env.Up(upn)
+ return int8(env.Vals[idx].Int())
}
case r.Int16:
fun = func(env *Env) int16 {
- return int16(env.ThreadGlobals.TopEnv.Binds[idx].Int())
+ env = env.Up(upn)
+ return int16(env.Vals[idx].Int())
}
case r.Int32:
fun = func(env *Env) int32 {
- return int32(env.ThreadGlobals.TopEnv.Binds[idx].Int())
+ env = env.Up(upn)
+ return int32(env.Vals[idx].Int())
}
case r.Int64:
fun = func(env *Env) int64 {
- return env.ThreadGlobals.TopEnv.Binds[idx].Int()
+ env = env.Up(upn)
+ return env.Vals[idx].Int()
}
case r.Uint:
fun = func(env *Env) uint {
- return uint(env.ThreadGlobals.TopEnv.Binds[idx].Uint())
+ env = env.Up(upn)
+ return uint(env.Vals[idx].Uint())
}
case r.Uint8:
fun = func(env *Env) uint8 {
- return uint8(env.ThreadGlobals.TopEnv.Binds[idx].Uint())
+ env = env.Up(upn)
+ return uint8(env.Vals[idx].Uint())
}
case r.Uint16:
fun = func(env *Env) uint16 {
- return uint16(env.ThreadGlobals.TopEnv.Binds[idx].Uint())
+ env = env.Up(upn)
+ return uint16(env.Vals[idx].Uint())
}
case r.Uint32:
fun = func(env *Env) uint32 {
- return uint32(env.ThreadGlobals.TopEnv.Binds[idx].Uint())
+ env = env.Up(upn)
+ return uint32(env.Vals[idx].Uint())
}
case r.Uint64:
fun = func(env *Env) uint64 {
- return env.ThreadGlobals.TopEnv.Binds[idx].Uint()
+ env = env.Up(upn)
+ return env.Vals[idx].Uint()
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- return uintptr(env.ThreadGlobals.TopEnv.Binds[idx].Uint())
+ env = env.Up(upn)
+ return uintptr(env.Vals[idx].Uint())
}
case r.Float32:
fun = func(env *Env) float32 {
- return float32(env.ThreadGlobals.TopEnv.Binds[idx].Float())
+ env = env.Up(upn)
+ return float32(env.Vals[idx].Float())
}
case r.Float64:
fun = func(env *Env) float64 {
- return env.ThreadGlobals.TopEnv.Binds[idx].Float()
+ env = env.Up(upn)
+ return env.Vals[idx].Float()
}
case r.Complex64:
fun = func(env *Env) complex64 {
- return complex64(env.ThreadGlobals.TopEnv.Binds[idx].Complex())
+ env = env.Up(upn)
+ return complex64(env.Vals[idx].Complex())
}
case r.Complex128:
fun = func(env *Env) complex128 {
- return env.ThreadGlobals.TopEnv.Binds[idx].Complex()
+ env = env.Up(upn)
+ return env.Vals[idx].Complex()
}
case r.String:
fun = func(env *Env) string {
- return env.ThreadGlobals.TopEnv.Binds[idx].String()
+ env = env.Up(upn)
+ return env.Vals[idx].String()
}
default:
fun = func(env *Env) r.Value {
- return env.ThreadGlobals.TopEnv.Binds[idx]
+ env = env.Up(upn)
+ return env.Vals[idx]
}
}
}
return &Expr{Lit: Lit{Type: sym.Type}, Fun: fun, Sym: sym}
}
-func (c *Comp) intSymbol(sym *Symbol) *Expr {
+// return an expression that will read Bind optimized value at runtime
+func (bind *Bind) intExpr(st *base.Stringer) *Expr {
+ idx := bind.Desc.Index()
+ var fun I
+ switch bind.Type.Kind() {
+ case r.Bool:
+ fun = func(env *Env) bool {
+ return *(*bool)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int:
+ fun = func(env *Env) int {
+ return *(*int)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int8:
+ fun = func(env *Env) int8 {
+ return *(*int8)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int16:
+ fun = func(env *Env) int16 {
+ return *(*int16)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int32:
+ fun = func(env *Env) int32 {
+ return *(*int32)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int64:
+ fun = func(env *Env) int64 {
+ return *(*int64)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint:
+ fun = func(env *Env) uint {
+ return *(*uint)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint8:
+ fun = func(env *Env) uint8 {
+ return *(*uint8)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint16:
+ fun = func(env *Env) uint16 {
+ return *(*uint16)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint32:
+ fun = func(env *Env) uint32 {
+ return *(*uint32)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint64:
+ fun = func(env *Env) uint64 {
+ return env.Ints[idx]
+ }
+ case r.Uintptr:
+ fun = func(env *Env) uintptr {
+ return *(*uintptr)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Float32:
+ fun = func(env *Env) float32 {
+ return *(*float32)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Float64:
+ fun = func(env *Env) float64 {
+ return *(*float64)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Complex64:
+ fun = func(env *Env) complex64 {
+ return *(*complex64)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Complex128:
+ fun = func(env *Env) complex128 {
+ return *(*complex128)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ default:
+ st.Errorf("unsupported symbol type, cannot use for optimized read: %s %s <%v>", bind.Desc.Class(), bind.Name, bind.Type)
+ return nil
+ }
+ return &Expr{Lit: Lit{Type: bind.Type}, Fun: fun, Sym: bind.AsSymbol(0)}
+}
+
+// return an expression that will read Symbol optimized value at runtime
+func (sym *Symbol) intExpr(depth int, st *base.Stringer) *Expr {
+ upn := sym.Upn
k := sym.Type.Kind()
idx := sym.Desc.Index()
- upn := sym.Upn
var fun I
switch upn {
case 0:
+ return sym.Bind.intExpr(st)
+ case 1:
switch k {
case r.Bool:
fun = func(env *Env) bool {
- return *(*bool)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*bool)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Int:
fun = func(env *Env) int {
- return *(*int)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*int)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Int8:
fun = func(env *Env) int8 {
- return *(*int8)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*int8)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Int16:
fun = func(env *Env) int16 {
- return *(*int16)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*int16)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Int32:
fun = func(env *Env) int32 {
- return *(*int32)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*int32)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Int64:
fun = func(env *Env) int64 {
- return *(*int64)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*int64)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Uint:
fun = func(env *Env) uint {
- return *(*uint)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*uint)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Uint8:
fun = func(env *Env) uint8 {
- return *(*uint8)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*uint8)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Uint16:
fun = func(env *Env) uint16 {
- return *(*uint16)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*uint16)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Uint32:
fun = func(env *Env) uint32 {
- return *(*uint32)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*uint32)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Uint64:
fun = func(env *Env) uint64 {
- return env.IntBinds[idx]
+ return env.Outer.Ints[idx]
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- return *(*uintptr)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*uintptr)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Float32:
fun = func(env *Env) float32 {
- return *(*float32)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*float32)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Float64:
fun = func(env *Env) float64 {
- return *(*float64)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*float64)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
case r.Complex64:
fun = func(env *Env) complex64 {
- return *(*complex64)(unsafe.Pointer(&env.IntBinds[idx]))
+ return *(*complex64)(unsafe.Pointer(&env.Outer.Ints[idx]))
+ }
+ case r.Complex128:
+ fun = func(env *Env) complex128 {
+ return *(*complex128)(unsafe.Pointer(&env.Outer.Ints[idx]))
}
- default:
- c.Errorf("unsupported symbol type, cannot use for optimized read: %s %s <%v>", sym.Desc.Class(), sym.Name, sym.Type)
- return nil
}
- case 1:
+ case 2:
switch k {
case r.Bool:
fun = func(env *Env) bool {
- return *(*bool)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*bool)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Int:
fun = func(env *Env) int {
- return *(*int)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*int)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Int8:
fun = func(env *Env) int8 {
- return *(*int8)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*int8)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Int16:
fun = func(env *Env) int16 {
- return *(*int16)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*int16)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Int32:
fun = func(env *Env) int32 {
- return *(*int32)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*int32)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Int64:
fun = func(env *Env) int64 {
- return *(*int64)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*int64)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Uint:
fun = func(env *Env) uint {
- return *(*uint)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*uint)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Uint8:
fun = func(env *Env) uint8 {
- return *(*uint8)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*uint8)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Uint16:
fun = func(env *Env) uint16 {
- return *(*uint16)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*uint16)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Uint32:
fun = func(env *Env) uint32 {
- return *(*uint32)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*uint32)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Uint64:
fun = func(env *Env) uint64 {
- return env.Outer.IntBinds[idx]
+ return env.Outer.Outer.Ints[idx]
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- return *(*uintptr)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*uintptr)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Float32:
fun = func(env *Env) float32 {
- return *(*float32)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*float32)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Float64:
fun = func(env *Env) float64 {
- return *(*float64)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*float64)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
case r.Complex64:
fun = func(env *Env) complex64 {
- return *(*complex64)(unsafe.Pointer(&env.Outer.IntBinds[idx]))
+ return *(*complex64)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
+ }
+ case r.Complex128:
+ fun = func(env *Env) complex128 {
+ return *(*complex128)(unsafe.Pointer(&env.Outer.Outer.Ints[idx]))
}
- default:
- c.Errorf("unsupported variable type, cannot use for optimized read: %s <%v>", sym.Name, sym.Type)
- return nil
}
- case 2:
+ case depth - 1:
switch k {
case r.Bool:
fun = func(env *Env) bool {
- return *(*bool)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*bool)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Int:
fun = func(env *Env) int {
- return *(*int)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*int)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Int8:
fun = func(env *Env) int8 {
- return *(*int8)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Int16:
fun = func(env *Env) int16 {
- return *(*int16)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Int32:
fun = func(env *Env) int32 {
- return *(*int32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Int64:
fun = func(env *Env) int64 {
- return *(*int64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Uint:
fun = func(env *Env) uint {
- return *(*uint)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Uint8:
fun = func(env *Env) uint8 {
- return *(*uint8)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Uint16:
fun = func(env *Env) uint16 {
- return *(*uint16)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Uint32:
fun = func(env *Env) uint32 {
- return *(*uint32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Uint64:
fun = func(env *Env) uint64 {
- return env.Outer.Outer.IntBinds[idx]
+ return env.FileEnv.Ints[idx]
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- return *(*uintptr)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Float32:
fun = func(env *Env) float32 {
- return *(*float32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Float64:
fun = func(env *Env) float64 {
- return *(*float64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
case r.Complex64:
fun = func(env *Env) complex64 {
- return *(*complex64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ return *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
+ }
+ case r.Complex128:
+ fun = func(env *Env) complex128 {
+ return *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[idx]))
}
- default:
- c.Errorf("unsupported variable type, cannot use for optimized read: %s <%v>", sym.Name, sym.Type)
- return nil
}
default:
switch k {
case r.Bool:
fun = func(env *Env) bool {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*bool)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*bool)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Int:
fun = func(env *Env) int {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*int)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*int)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Int8:
fun = func(env *Env) int8 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*int8)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*int8)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Int16:
fun = func(env *Env) int16 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*int16)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*int16)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Int32:
fun = func(env *Env) int32 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*int32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*int32)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Int64:
fun = func(env *Env) int64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*int64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*int64)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Uint:
fun = func(env *Env) uint {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*uint)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*uint)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Uint8:
fun = func(env *Env) uint8 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*uint8)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*uint8)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Uint16:
fun = func(env *Env) uint16 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*uint16)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*uint16)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Uint32:
fun = func(env *Env) uint32 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*uint32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*uint32)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Uint64:
fun = func(env *Env) uint64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return env.Outer.Outer.IntBinds[idx]
+ env = env.Up(upn)
+ return env.Outer.Outer.Ints[idx]
}
case r.Uintptr:
fun = func(env *Env) uintptr {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*uintptr)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*uintptr)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Float32:
fun = func(env *Env) float32 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*float32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*float32)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Float64:
fun = func(env *Env) float64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*float64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*float64)(unsafe.Pointer(&env.Ints[idx]))
}
case r.Complex64:
fun = func(env *Env) complex64 {
- for i := 3; i < upn; i++ {
- env = env.Outer
- }
- return *(*complex64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[idx]))
+ env = env.Up(upn)
+ return *(*complex64)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Complex128:
+ fun = func(env *Env) complex128 {
+ env = env.Up(upn)
+ return *(*complex128)(unsafe.Pointer(&env.Ints[idx]))
}
- default:
- c.Errorf("unsupported variable type, cannot use for optimized read: %s <%v>", sym.Name, sym.Type)
- return nil
}
}
+ if fun == nil {
+ st.Errorf("unsupported variable type, cannot use for optimized read: %s <%v>", sym.Name, sym.Type)
+ }
return &Expr{Lit: Lit{Type: sym.Type}, Fun: fun, Sym: sym}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/import.go b/vendor/github.com/cosmos72/gomacro/fast/import.go
index 28a8ac7..5099f92 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/import.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/import.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* import.go
@@ -27,15 +18,95 @@ package fast
import (
"go/ast"
- "go/types"
r "reflect"
"strconv"
"strings"
+ "unsafe"
. "github.com/cosmos72/gomacro/base"
xr "github.com/cosmos72/gomacro/xreflect"
)
+// =========================== forget package ==================================
+
+// remove package 'path' from the list of known packages.
+// later attempts to import it again will trigger a recompile.
+func (cg *CompGlobals) UnloadPackage(path string) {
+ cg.Globals.UnloadPackage(path)
+ delete(cg.KnownImports, path)
+}
+
+// ========================== switch to package ================================
+
+func (ir *Interp) ChangePackage(name, path string) {
+ if len(path) == 0 {
+ path = name
+ } else {
+ name = FileName(path)
+ }
+ c := ir.Comp
+ if path == c.Path {
+ return
+ }
+ // load requested package if it exists, but do not define any binding in current one
+ newp, err := c.ImportPackageOrError("_", path)
+ if err != nil {
+ c.Debugf("%v", err)
+ }
+ oldp := ir.asImport()
+
+ c.CompGlobals.KnownImports[oldp.Path] = oldp // overwrite any cached import with same path as current Interp
+
+ trace := c.Globals.Options&OptShowPrompt != 0
+ top := &Interp{c.TopComp(), ir.env.Top()}
+ if newp != nil {
+ newp.Name = name
+ *ir = newp.asInterpreter(top)
+ if trace {
+ c.Debugf("switched to package %v", newp)
+ }
+ } else {
+ // requested package does not exist - create an empty one
+ ir.Comp = NewComp(top.Comp, nil)
+ ir.env = NewEnv(top.env, 0, 0)
+ if c.Globals.Options&OptDebugger != 0 {
+ ir.env.DebugComp = ir.Comp
+ }
+ ir.Comp.Name = name
+ ir.Comp.Path = path
+ if trace {
+ c.Debugf("switched to new package %v", path)
+ }
+ }
+ ir.env.Run.Globals.PackagePath = path
+}
+
+// convert *Interp to *Import. used to change package from 'ir'
+func (ir *Interp) asImport() *Import {
+ env := ir.env
+ env.MarkUsedByClosure() // do not try to recycle this Env
+ return &Import{
+ CompBinds: ir.Comp.CompBinds,
+ EnvBinds: &ir.env.EnvBinds,
+ env: env,
+ }
+}
+
+// convert *Import to *Interp. used to change package to 'imp'
+func (imp *Import) asInterpreter(outer *Interp) Interp {
+ c := NewComp(outer.Comp, nil)
+ c.CompBinds = imp.CompBinds
+ env := imp.env
+ // preserve env.IP, env.Code[], env.DebugPos[]
+ if env.Outer == nil {
+ env.Outer = outer.env
+ }
+ env.Run = outer.env.Run
+ return Interp{c, env}
+}
+
+// =========================== import package =================================
+
// Import compiles an import statement
func (c *Comp) Import(node ast.Spec) {
switch node := node.(type) {
@@ -50,7 +121,7 @@ func (c *Comp) Import(node ast.Spec) {
if node.Name != nil {
name = node.Name.Name
} else {
- name = path[1+strings.LastIndexByte(path, '/'):]
+ name = FileName(path)
}
// yes, we support local imports
// i.e. a function or block can import packages
@@ -60,7 +131,7 @@ func (c *Comp) Import(node ast.Spec) {
}
}
-func (g *CompThreadGlobals) sanitizeImportPath(path string) string {
+func (g *CompGlobals) sanitizeImportPath(path string) string {
path = strings.Replace(path, "\\", "/", -1)
l := len(path)
if path == ".." || l >= 3 && (path[:3] == "../" || path[l-3:] == "/..") || strings.Contains(path, "/../") {
@@ -72,85 +143,193 @@ func (g *CompThreadGlobals) sanitizeImportPath(path string) string {
return path
}
-// Import imports a package. Usually invoked as Comp.FileComp().ImportPackage(name, path)
+// ImportPackage imports a package. Usually invoked as Comp.FileComp().ImportPackage(name, path)
// because imports are usually top-level statements in a source file.
// But we also support local imports, i.e. import statements inside a function or block.
-func (c *Comp) ImportPackage(name, path string) *Import {
- g := c.CompThreadGlobals
- pkgref := g.ImportPackage(name, path)
- if pkgref == nil {
- return nil
+func (c *Comp) ImportPackage(name, path string) {
+ _, err := c.ImportPackageOrError(name, path)
+ if err != nil {
+ panic(err)
}
- binds, bindtypes := g.parseImportBinds(pkgref.Binds, pkgref.Untypeds)
+}
- imp := Import{
- Binds: binds,
- BindTypes: bindtypes,
- Types: g.parseImportTypes(pkgref.Types, pkgref.Wrappers),
- Name: name,
- Path: path,
+func (c *Comp) ImportPackageOrError(name, path string) (*Import, error) {
+ g := c.CompGlobals
+ imp := g.KnownImports[path]
+ if imp == nil {
+ pkgref, err := g.ImportPackageOrError(name, path)
+ if err != nil {
+ return nil, err
+ }
+ imp = g.NewImport(pkgref)
}
-
- g.loadProxies(pkgref.Proxies, imp.Types)
-
- c.declImport0(name, imp)
- return &imp
+ if name == "." {
+ c.declDotImport0(imp)
+ } else if name != "_" {
+ c.declImport0(name, imp)
+ }
+ g.KnownImports[path] = imp
+ return imp, nil
}
-// declImport0 compiles an import declaration.
+// declDotImport0 compiles an import declaration.
// Note: does not loads proxies, use ImportPackage for that
-func (c *Comp) declImport0(name string, imp Import) {
+func (c *Comp) declImport0(name string, imp *Import) {
// treat imported package as a constant,
// because to compile code we need the declarations it contains:
// importing them at runtime would be too late.
- t := c.TypeOfImport()
- bind := c.AddBind(name, ConstBind, t)
- bind.Value = imp // cfile.Binds[] is a map[string]*Bind => changes to *Bind propagate to the map
+ bind := c.NewBind(name, ConstBind, c.TypeOfPtrImport())
+ bind.Value = imp // Comp.Binds[] is a map[string]*Bind => changes to *Bind propagate to the map
}
-func (g *CompThreadGlobals) parseImportBinds(binds map[string]r.Value, untypeds map[string]string) (map[string]r.Value, map[string]xr.Type) {
- retbinds := make(map[string]r.Value)
- rettypes := make(map[string]xr.Type)
- for name, bind := range binds {
+// declDotImport0 compiles an import . "path" declaration, i.e. a dot-import.
+// Note: does not loads proxies, use ImportPackage for that
+func (c *Comp) declDotImport0(imp *Import) {
+ // Note 2: looking at the difference between the above Comp.declImport0() and this ugly monster,
+ // shows one more reason why dot-imports are dirty and discouraged.
+ if c.Types == nil {
+ c.Types = make(map[string]xr.Type)
+ }
+ for name, typ := range imp.Types {
+ if t, exists := c.Types[name]; exists {
+ c.Warnf("redefined type: %v", t)
+ }
+ c.Types[name] = typ
+ }
+
+ var indexv, cindexv []int // mapping between Import.Vals[index] and Env.Vals[cindex]
+
+ var funv []func(*Env) r.Value
+ var findexv []int
+
+ for name, bind := range imp.Binds {
+ // use c.CompBinds.NewBind() to prevent optimization VarBind -> IntBind
+ // also, if class == IntBind, we must preserve the address of impenv.Ints[idx]
+ // thus we must convert it into a VarBind (argh!)
+ class := bind.Desc.Class()
+ if class == IntBind {
+ class = VarBind
+ }
+ cbind := c.CompBinds.NewBind(&c.Output, name, class, bind.Type)
+ cidx := cbind.Desc.Index()
+ switch bind.Desc.Class() {
+ case ConstBind:
+ cbind.Value = bind.Value
+ case IntBind:
+ if cidx == NoIndex {
+ continue
+ }
+ // this is painful. and slow
+ fun := imp.intPlace(c, bind, PlaceSettable).Fun
+ funv = append(funv, fun)
+ findexv = append(findexv, cidx)
+ default:
+ if cidx == NoIndex {
+ continue
+ }
+ indexv = append(indexv, bind.Desc.Index())
+ cindexv = append(cindexv, cidx)
+ }
+ }
+ if len(indexv) != 0 || len(funv) != 0 {
+ impvals := imp.Vals
+ c.append(func(env *Env) (Stmt, *Env) {
+ for i, index := range indexv {
+ env.Vals[cindexv[i]] = impvals[index]
+ }
+ for i, fun := range funv {
+ env.Vals[findexv[i]] = fun(nil) // fun(env) is unnecessary
+ }
+ env.IP++
+ return env.Code[env.IP], env
+ })
+ }
+}
+
+func (g *CompGlobals) NewImport(pkgref *PackageRef) *Import {
+ env := &Env{
+ UsedByClosure: true, // do not try to recycle this Env
+ }
+ imp := &Import{
+ EnvBinds: &env.EnvBinds,
+ env: env,
+ }
+ if pkgref != nil {
+ imp.Name = pkgref.Name
+ imp.Path = pkgref.Path
+ imp.loadBinds(g, pkgref)
+ imp.loadTypes(g, pkgref)
+ g.loadProxies(pkgref.Proxies, imp.Types)
+ }
+ return imp
+}
+
+func (imp *Import) loadBinds(g *CompGlobals, pkgref *PackageRef) {
+ vals := make([]r.Value, len(pkgref.Binds))
+ untypeds := pkgref.Untypeds
+ o := &g.Output
+ for name, val := range pkgref.Binds {
if untyped, ok := untypeds[name]; ok {
- value, typ, ok := g.parseImportUntyped(untyped)
- if ok {
- retbinds[name] = value
- rettypes[name] = typ
+ untypedlit, typ := g.parseUntyped(untyped)
+ if typ != nil {
+ bind := imp.CompBinds.NewBind(o, name, ConstBind, typ)
+ bind.Value = untypedlit
continue
}
}
- retbinds[name] = bind
- rettypes[name] = g.Universe.FromReflectType(bind.Type())
+ k := val.Kind()
+ class := FuncBind
+ // distinguish typed constants, variables and functions
+ if val.IsValid() && val.CanAddr() && val.CanSet() {
+ class = VarBind
+ } else if k == r.Invalid || (IsOptimizedKind(k) && val.CanInterface()) {
+ class = ConstBind
+ }
+ typ := g.Universe.FromReflectType(val.Type())
+ bind := imp.CompBinds.NewBind(o, name, class, typ)
+ if class == ConstBind && k != r.Invalid {
+ bind.Value = val.Interface()
+ }
+ idx := bind.Desc.Index()
+ if idx == NoIndex {
+ continue
+ }
+ if len(vals) <= idx {
+ tmp := make([]r.Value, idx*2)
+ copy(tmp, vals)
+ vals = tmp
+ }
+ vals[idx] = val
}
- return retbinds, rettypes
+ imp.Vals = vals
}
-func (g *CompThreadGlobals) parseImportUntyped(untyped string) (r.Value, xr.Type, bool) {
- gkind, value := UnmarshalUntyped(untyped)
- if gkind == types.Invalid {
- return Nil, nil, false
+func (g *CompGlobals) parseUntyped(untyped string) (UntypedLit, xr.Type) {
+ kind, value := UnmarshalUntyped(untyped)
+ if kind == r.Invalid {
+ return UntypedLit{}, nil
}
- lit := UntypedLit{Kind: xr.ToReflectKind(gkind), Obj: value, Universe: g.Universe}
- return r.ValueOf(lit), g.TypeOfUntypedLit(), true
+ lit := MakeUntypedLit(kind, value, &g.Universe.BasicTypes)
+ return lit, g.TypeOfUntypedLit()
}
-func (g *CompThreadGlobals) parseImportTypes(rtypes map[string]r.Type, wrappers map[string][]string) map[string]xr.Type {
+func (imp *Import) loadTypes(g *CompGlobals, pkgref *PackageRef) {
v := g.Universe
- xtypes := make(map[string]xr.Type)
- for name, rtype := range rtypes {
+ types := make(map[string]xr.Type)
+ wrappers := pkgref.Wrappers
+ for name, rtype := range pkgref.Types {
// Universe.FromReflectType uses cached *types.Package if possible
t := v.FromReflectType(rtype)
if twrappers := wrappers[name]; len(twrappers) != 0 {
t.RemoveMethods(twrappers, "")
}
- xtypes[name] = t
+ types[name] = t
}
- return xtypes
+ imp.Types = types
}
// loadProxies adds to thread-global maps the proxies found in import
-func (g *CompThreadGlobals) loadProxies(proxies map[string]r.Type, xtypes map[string]xr.Type) {
+func (g *CompGlobals) loadProxies(proxies map[string]r.Type, xtypes map[string]xr.Type) {
for name, proxy := range proxies {
xtype := xtypes[name]
if xtype == nil {
@@ -167,86 +346,330 @@ func (g *CompThreadGlobals) loadProxies(proxies map[string]r.Type, xtypes map[st
}
}
-// v is an imported variable. build a function that will return it.
-// Do NOT expose its value while compiling, otherwise the fast interpreter
-// will (incorrectly) assume that it's a constant and will perform constant propagation.
+// ======================== use package symbols ===============================
+
+// selectorPlace compiles pkgname.varname returning a settable and/or addressable Place
+func (imp *Import) selectorPlace(c *Comp, name string, opt PlaceOption) *Place {
+ bind, ok := imp.Binds[name]
+ if !ok {
+ c.Errorf("package %v %q has no symbol %s", imp.Name, imp.Path, name)
+ }
+ class := bind.Desc.Class()
+ if bind.Desc.Index() != NoIndex {
+ switch class {
+ case IntBind:
+ return imp.intPlace(c, bind, opt)
+ case VarBind:
+ // optimization: read imp.Vals[] at compile time:
+ // val remains valid even if imp.Vals[] is reallocated
+ val := imp.Vals[bind.Desc.Index()]
+ // a settable reflect.Value is always addressable.
+ // the converse is not guaranteed: unexported fields can be addressed but not set.
+ // see implementation of reflect.Value.CanAddr() and reflect.Value.CanSet() for details
+ if val.IsValid() && val.CanAddr() && val.CanSet() {
+ return &Place{
+ Var: Var{Type: bind.Type},
+ Fun: func(*Env) r.Value {
+ return val
+ },
+ Addr: func(*Env) r.Value {
+ return val.Addr()
+ },
+ }
+ }
+ }
+ }
+ c.Errorf("%v %v %v.%v", opt, class, bind.Type.Kind(), imp.Name, name)
+ return nil
+}
+
+// selector compiles foo.bar where 'foo' is an imported package
+func (imp *Import) selector(name string, st *Stringer) *Expr {
+ bind, ok := imp.Binds[name]
+ if !ok {
+ st.Errorf("package %v %q has no symbol %s", imp.Name, imp.Path, name)
+ }
+ switch bind.Desc.Class() {
+ case ConstBind:
+ return exprLit(bind.Lit, bind.AsSymbol(0))
+ case FuncBind, VarBind:
+ return imp.symbol(bind, st)
+ case IntBind:
+ return imp.intSymbol(bind, st)
+ default:
+ st.Errorf("package symbol %s.%s has unknown class %s", imp.Name, name, bind.Desc.Class())
+ return nil
+ }
+}
+
+// create an expression that will return the value of imported variable described by bind.
//
// mandatory optimization: for basic kinds, unwrap reflect.Value
-func importedBindAsFun(t xr.Type, v r.Value) I {
+func (imp *Import) symbol(bind *Bind, st *Stringer) *Expr {
+ idx := bind.Desc.Index()
+ if idx == NoIndex {
+ st.Errorf("undefined identifier %s._", imp.Name)
+ }
+ // optimization: read imp.Vals[] at compile time:
+ // v remains valid even if imp.Vals[] is reallocated
+ v := imp.Vals[idx]
+ t := bind.Type
+ if !v.IsValid() {
+ return exprValue(t, xr.Zero(t).Interface())
+ }
var fun I
switch t.Kind() {
case r.Bool:
- fun = func(env *Env) bool {
+ fun = func(*Env) bool {
return v.Bool()
}
case r.Int:
- fun = func(env *Env) int {
+ fun = func(*Env) int {
return int(v.Int())
}
case r.Int8:
- fun = func(env *Env) int8 {
+ fun = func(*Env) int8 {
return int8(v.Int())
}
case r.Int16:
- fun = func(env *Env) int16 {
+ fun = func(*Env) int16 {
return int16(v.Int())
}
case r.Int32:
- fun = func(env *Env) int32 {
+ fun = func(*Env) int32 {
return int32(v.Int())
}
case r.Int64:
- fun = func(env *Env) int64 {
+ fun = func(*Env) int64 {
return v.Int()
}
case r.Uint:
- fun = func(env *Env) uint {
+ fun = func(*Env) uint {
return uint(v.Uint())
}
case r.Uint8:
- fun = func(env *Env) uint8 {
+ fun = func(*Env) uint8 {
return uint8(v.Uint())
}
case r.Uint16:
- fun = func(env *Env) uint16 {
+ fun = func(*Env) uint16 {
return uint16(v.Uint())
}
case r.Uint32:
- fun = func(env *Env) uint32 {
+ fun = func(*Env) uint32 {
return uint32(v.Uint())
}
case r.Uint64:
- fun = func(env *Env) uint64 {
+ fun = func(*Env) uint64 {
return v.Uint()
}
case r.Uintptr:
- fun = func(env *Env) uintptr {
+ fun = func(*Env) uintptr {
return uintptr(v.Uint())
}
case r.Float32:
- fun = func(env *Env) float32 {
+ fun = func(*Env) float32 {
return float32(v.Float())
}
case r.Float64:
- fun = func(env *Env) float64 {
+ fun = func(*Env) float64 {
return v.Float()
}
case r.Complex64:
- fun = func(env *Env) complex64 {
+ fun = func(*Env) complex64 {
return complex64(v.Complex())
}
case r.Complex128:
- fun = func(env *Env) complex128 {
+ fun = func(*Env) complex128 {
return v.Complex()
}
case r.String:
- fun = func(env *Env) string {
+ fun = func(*Env) string {
return v.String()
}
default:
- fun = func(env *Env) r.Value {
+ fun = func(*Env) r.Value {
return v
}
}
- return fun
+ // v is an imported variable. do NOT store its value in *Expr,
+ // because that's how constants are represented:
+ // fast interpreter will then (incorrectly) perform constant propagation.
+ return exprFun(t, fun)
+}
+
+// create an expression that will return the value of imported variable described by bind.
+//
+// mandatory optimization: for basic kinds, do not wrap in reflect.Value
+func (imp *Import) intSymbol(bind *Bind, st *Stringer) *Expr {
+ idx := bind.Desc.Index()
+ if idx == NoIndex {
+ st.Errorf("undefined identifier %s._", imp.Name)
+ }
+ t := bind.Type
+ env := imp.env
+ var fun I
+ switch t.Kind() {
+ case r.Bool:
+ fun = func(*Env) bool {
+ return *(*bool)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int:
+ fun = func(*Env) int {
+ return *(*int)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int8:
+ fun = func(*Env) int8 {
+ return *(*int8)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int16:
+ fun = func(*Env) int16 {
+ return *(*int16)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int32:
+ fun = func(*Env) int32 {
+ return *(*int32)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Int64:
+ fun = func(*Env) int64 {
+ return *(*int64)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint:
+ fun = func(*Env) uint {
+ return *(*uint)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint8:
+ fun = func(*Env) uint8 {
+ return *(*uint8)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint16:
+ fun = func(*Env) uint16 {
+ return *(*uint16)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint32:
+ fun = func(*Env) uint32 {
+ return *(*uint32)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Uint64:
+ fun = func(*Env) uint64 {
+ return env.Ints[idx]
+ }
+ case r.Uintptr:
+ fun = func(*Env) uintptr {
+ return *(*uintptr)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Float32:
+ fun = func(*Env) float32 {
+ return *(*float32)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Float64:
+ fun = func(*Env) float64 {
+ return *(*float64)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Complex64:
+ fun = func(*Env) complex64 {
+ return *(*complex64)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ case r.Complex128:
+ fun = func(*Env) complex128 {
+ return *(*complex128)(unsafe.Pointer(&env.Ints[idx]))
+ }
+ default:
+ st.Errorf("unsupported symbol type, cannot use for optimized read: %v %v.%v <%v>",
+ bind.Desc.Class(), imp.Name, bind.Name, bind.Type)
+ return nil
+ }
+ // Do NOT store env.Ints[idx] into *Expr, because that's how constants are represented:
+ // fast interpreter will then (incorrectly) perform constant propagation.
+ return exprFun(t, fun)
+}
+
+// return a Place representing the imported variable described by bind.
+//
+// mandatory optimization: for basic kinds, do not wrap in reflect.Value
+func (imp *Import) intPlace(c *Comp, bind *Bind, opt PlaceOption) *Place {
+ idx := bind.Desc.Index()
+ if idx == NoIndex {
+ c.Errorf("%v %v %v.%v", opt, bind.Desc.Class(), imp.Name, bind.Name)
+ }
+ t := bind.Type
+ var addr func(*Env) r.Value
+ impenv := imp.env
+ switch t.Kind() {
+ case r.Bool:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*bool)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Int:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*int)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Int8:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*int8)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Int16:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*int16)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Int32:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*int32)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Int64:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*int64)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Uint:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*uint)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Uint8:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*uint8)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Uint16:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*uint16)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Uint32:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*uint32)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Uint64:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf(&impenv.Ints[idx])
+ }
+ case r.Uintptr:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*uintptr)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Float32:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*float32)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Float64:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*float64)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Complex64:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*complex64)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ case r.Complex128:
+ addr = func(env *Env) r.Value {
+ return r.ValueOf((*complex128)(unsafe.Pointer(&impenv.Ints[idx])))
+ }
+ default:
+ c.Errorf("%s unsupported variable type <%v>: %s %s.%s",
+ opt, t, bind.Desc.Class(), imp.Name, bind.Name)
+ return nil
+ }
+ return &Place{
+ Var: Var{Type: bind.Type, Name: bind.Name},
+ Fun: func(env *Env) r.Value {
+ return addr(env).Elem()
+ },
+ Addr: addr,
+ }
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/index.go b/vendor/github.com/cosmos72/gomacro/fast/index.go
index 59ba864..1ffa044 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/index.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/index.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* index.go
@@ -41,8 +32,8 @@ import (
func (c *Comp) IndexExpr(node *ast.IndexExpr) *Expr { return c.indexExpr(node, true) }
func (c *Comp) IndexExpr1(node *ast.IndexExpr) *Expr { return c.indexExpr(node, false) }
func (c *Comp) indexExpr(node *ast.IndexExpr, multivalued bool) *Expr {
- obj := c.Expr1(node.X)
- idx := c.Expr1(node.Index)
+ obj := c.Expr1(node.X, nil)
+ idx := c.Expr1(node.Index, nil)
if obj.Untyped() {
obj.ConstTo(obj.DefaultType())
}
@@ -73,16 +64,19 @@ func (c *Comp) indexExpr(node *ast.IndexExpr, multivalued bool) *Expr {
return nil
}
if obj.Const() && idx.Const() {
- ret.EvalConst(OptKeepUntyped)
+ ret.EvalConst(COptKeepUntyped)
}
return ret
}
func (c *Comp) vectorIndex(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
- idxconst := idx.Const()
- if idxconst {
- idx.ConstTo(c.TypeOfInt())
- } else if idx.Type == nil || !idx.Type.AssignableTo(c.TypeOfInt()) {
- c.Errorf("non-integer %s index: %v <%v>", obj.Type.Kind(), node.Index, idx.Type)
+ k := idx.Type.Kind()
+ cat := base.KindToCategory(k)
+ if cat == r.Int || cat == r.Uint || idx.Untyped() {
+ if !c.TypeOfInt().IdenticalTo(idx.Type) {
+ idx = c.convert(idx, c.TypeOfInt(), node.Index)
+ }
+ } else {
+ c.Errorf("non-integer %s index: %v <%v>", k, node.Index, idx.Type)
}
t := obj.Type
@@ -93,7 +87,7 @@ func (c *Comp) vectorIndex(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
t = t.Elem()
objfun := obj.AsX1()
var fun I
- if idxconst {
+ if idx.Const() {
i := idx.Value.(int)
switch t.Kind() {
case r.Bool:
@@ -363,7 +357,20 @@ func (c *Comp) stringIndex(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
return str[i]
}
}
- return c.exprUint8(fun)
+
+ e := c.exprUint8(fun)
+ if obj.Const() && idx.Const() {
+ panicking := true
+ defer func() {
+ if panicking {
+ recover()
+ c.Errorf("string index out of range: %v", node)
+ }
+ }()
+ e.EvalConst(COptKeepUntyped)
+ panicking = false
+ }
+ return e
}
func (c *Comp) mapIndex(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
t := obj.Type
@@ -881,8 +888,8 @@ func (c *Comp) mapIndex1(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
return exprFun(tval, fun)
}
func (c *Comp) IndexPlace(node *ast.IndexExpr, opt PlaceOption) *Place {
- obj := c.Expr1(node.X)
- idx := c.Expr1(node.Index)
+ obj := c.Expr1(node.X, nil)
+ idx := c.Expr1(node.Index, nil)
if obj.Untyped() {
obj.ConstTo(obj.DefaultType())
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/index.gomacro b/vendor/github.com/cosmos72/gomacro/fast/index.gomacro
index 8210cf8..c37ab77 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/index.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/index.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* index.go
@@ -49,8 +40,8 @@ func (c *Comp) IndexExpr1(node *ast.IndexExpr) *Expr {
}
func (c *Comp) indexExpr(node *ast.IndexExpr, multivalued bool) *Expr {
- obj := c.Expr1(node.X)
- idx := c.Expr1(node.Index)
+ obj := c.Expr1(node.X, nil)
+ idx := c.Expr1(node.Index, nil)
if obj.Untyped() {
obj.ConstTo(obj.DefaultType())
}
@@ -81,7 +72,7 @@ func (c *Comp) indexExpr(node *ast.IndexExpr, multivalued bool) *Expr {
}
if obj.Const() && idx.Const() {
// constant propagation
- ret.EvalConst(CompileKeepUntyped)
+ ret.EvalConst(COptKeepUntyped)
}
return ret
}
@@ -177,20 +168,25 @@ func (c *Comp) indexExpr(node *ast.IndexExpr, multivalued bool) *Expr {
// vectorIndex compiles obj[idx] where obj is an array or slice
func (c *Comp) vectorIndex(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
- idxconst := idx.Const()
- if idxconst {
- idx.ConstTo(c.TypeOfInt())
- } else if idx.Type == nil || !idx.Type.AssignableTo(c.TypeOfInt()) {
- c.Errorf("non-integer %s index: %v <%v>", obj.Type.Kind(), node.Index, idx.Type)
+ k := idx.Type.Kind()
+ cat := base.KindToCategory(k)
+ if cat == r.Int || cat == r.Uint || idx.Untyped() {
+ if !c.TypeOfInt().IdenticalTo(idx.Type) {
+ idx = c.convert(idx, c.TypeOfInt(), node.Index)
+ }
+ } else {
+ c.Errorf("non-integer %s index: %v <%v>", k, node.Index, idx.Type)
}
+
t := obj.Type
if t.Kind() == r.String {
return c.stringIndex(node, obj, idx)
}
+
t = t.Elem()
objfun := obj.AsX1()
var fun I
- if idxconst {
+ if idx.Const() {
i := idx.Value.(int)
switch t.Kind() {
{vec_index_c; bool}
@@ -262,7 +258,19 @@ func (c *Comp) stringIndex(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
return str[i]
}
}
- return c.exprUint8(fun)
+ e := c.exprUint8(fun)
+ if obj.Const() && idx.Const() {
+ panicking := true
+ defer func() {
+ if panicking {
+ recover()
+ c.Errorf("string index out of range: %v", node)
+ }
+ }()
+ e.EvalConst(COptKeepUntyped)
+ panicking = false
+ }
+ return e
}
// mapIndex compiles obj[idx] where obj is a map
@@ -433,8 +441,8 @@ func (c *Comp) mapIndex1(node *ast.IndexExpr, obj *Expr, idx *Expr) *Expr {
// IndexPlace compiles obj[idx] returning a Place, i.e. a settable (and addressable, if possible) reflect.Value
func (c *Comp) IndexPlace(node *ast.IndexExpr, opt PlaceOption) *Place {
- obj := c.Expr1(node.X)
- idx := c.Expr1(node.Index)
+ obj := c.Expr1(node.X, nil)
+ idx := c.Expr1(node.Index, nil)
if obj.Untyped() {
obj.ConstTo(obj.DefaultType())
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/inspect.go b/vendor/github.com/cosmos72/gomacro/fast/inspect.go
new file mode 100644
index 0000000..5e968a0
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/inspect.go
@@ -0,0 +1,47 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * inspect.go
+ *
+ * Created on: Apr 20, 2017
+ * Author: Massimiliano Ghilardi
+ */
+
+package fast
+
+import (
+ r "reflect"
+
+ . "github.com/cosmos72/gomacro/base"
+)
+
+func (ir *Interp) Inspect(src string) {
+ c := ir.Comp
+ g := &c.Globals
+ inspector := g.Inspector
+ if inspector == nil {
+ c.Errorf("no inspector set: call Interp.SetInspector() first")
+ return
+ }
+ // not ir.Compile because it only macroexpands if OptMacroExpandOnly is set
+ val, xtyp := ir.RunExpr1(c.Compile(c.Parse(src)))
+ var typ r.Type
+ if xtyp != nil {
+ typ = xtyp.ReflectType()
+ }
+ if val.IsValid() && val != None {
+ if val.CanInterface() {
+ typ = r.TypeOf(val.Interface()) // show concrete type
+ } else if typ == nil {
+ typ = val.Type()
+ }
+ }
+ inspector.Inspect(src, val, typ, xtyp, &ir.Comp.Globals)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/interface.go b/vendor/github.com/cosmos72/gomacro/fast/interface.go
index 480f34c..ca475d9 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/interface.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/interface.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* interface.go
@@ -26,20 +17,33 @@
package fast
import (
+ "fmt"
"go/ast"
r "reflect"
+ "github.com/cosmos72/gomacro/base"
xr "github.com/cosmos72/gomacro/xreflect"
)
+// compile an interface definition
func (c *Comp) TypeInterface(node *ast.InterfaceType) xr.Type {
if node.Methods == nil || len(node.Methods.List) == 0 {
return c.TypeOfInterface()
}
- methodtypes, methodnames := c.TypeFields(node.Methods)
+ types, names := c.TypeFields(node.Methods)
- // TODO embedded interfaces
- return c.Universe.InterfaceOf(methodnames, methodtypes, nil)
+ // parser returns embedded interfaces as unnamed fields
+ var methodnames []string
+ var methodtypes, embeddedtypes []xr.Type
+ for i, typ := range types {
+ if i < len(names) && len(names[i]) != 0 {
+ methodnames = append(methodnames, names[i])
+ methodtypes = append(methodtypes, typ)
+ } else {
+ embeddedtypes = append(embeddedtypes, typ)
+ }
+ }
+ return c.Universe.InterfaceOf(methodnames, methodtypes, embeddedtypes)
}
// InterfaceProxy returns the proxy struct that implements a compiled interface
@@ -51,36 +55,49 @@ func (c *Comp) InterfaceProxy(t xr.Type) r.Type {
return ret
}
-// converterToInterface compiles a conversion from 'tin' into a proxy struct that implements the interface type 'tout'
+// converterToProxy compiles a conversion from 'tin' into a proxy struct that implements the interface type 'tout'
// and returns a function that performs such conversion
-func (c *Comp) converterToInterface(tin xr.Type, tout xr.Type) func(val r.Value, rtout r.Type) r.Value {
- rtproxy := c.InterfaceProxy(tout)
- rtout := tout.ReflectType()
+func (c *Comp) converterToProxy(tin xr.Type, tout xr.Type) func(val r.Value) r.Value {
+ rtout := tout.ReflectType() // a compiled interface
+ rtproxy := c.InterfaceProxy(tout) // one of our proxies that pre-implement the compiled interface
vtable := r.New(rtproxy).Elem()
n := rtout.NumMethod()
for i := 0; i < n; i++ {
- imtd := rtout.Method(i)
- xmtd, count := tin.MethodByName(imtd.Name, imtd.PkgPath)
+ mtdout := rtout.Method(i)
+ mtdin, count := tin.MethodByName(mtdout.Name, mtdout.PkgPath)
if count == 0 {
- c.Errorf("cannot convert type <%v> to interface <%v>: missing method %s %s", tin, rtout, imtd.PkgPath, imtd.Name)
+ c.Errorf("cannot convert type <%v> to interface <%v>: missing method %s %s", tin, rtout, mtdout.PkgPath, mtdout.Name)
} else if count > 1 {
c.Errorf("type <%v> has %d wrapper methods %s %s all at the same depth=%d - cannot convert to interface <%v>",
- tin, count, imtd.PkgPath, imtd.Name, len(xmtd.FieldIndex), tout)
+ tin, count, mtdout.PkgPath, mtdout.Name, len(mtdin.FieldIndex), tout)
}
- e := c.compileMethodAsFunc(tin, xmtd)
- setProxyMethod(vtable.Field(i+1), r.ValueOf(e.Value))
+ e := c.compileMethodAsFunc(tin, mtdin)
+ setProxyField(vtable.Field(i+1), r.ValueOf(e.Value))
}
- return func(val r.Value, rtout r.Type) r.Value {
+ extractor := c.extractor(tin)
+ if extractor == nil {
+ return func(val r.Value) r.Value {
+ vaddr := r.New(rtproxy)
+ vproxy := vaddr.Elem()
+ vproxy.Set(vtable)
+ vproxy.Field(0).Set(r.ValueOf(xr.MakeInterfaceHeader(val, tin)))
+ return vaddr.Convert(rtout)
+ }
+ }
+ // extract object from tin proxy or emulated interface (if any),
+ // and wrap it in tout proxy
+ return func(val r.Value) r.Value {
+ v, t := extractor(val)
vaddr := r.New(rtproxy)
vproxy := vaddr.Elem()
vproxy.Set(vtable)
- vproxy.Field(0).Set(r.ValueOf(xr.MakeInterfaceHeader(val, tin)))
+ vproxy.Field(0).Set(r.ValueOf(xr.MakeInterfaceHeader(v, t)))
return vaddr.Convert(rtout)
}
}
-func setProxyMethod(place r.Value, mtd r.Value) {
+func setProxyField(place r.Value, mtd r.Value) {
rtin := mtd.Type()
rtout := place.Type()
if rtin == rtout {
@@ -94,3 +111,101 @@ func setProxyMethod(place r.Value, mtd r.Value) {
}))
}
}
+
+// extract a value from a proxy struct (one of the imports.* structs) that implements an interface
+// this is the inverse of the function returned by Comp.converterToProxy() above
+func (g *CompGlobals) extractFromProxy(v r.Value) (r.Value, xr.Type) {
+ // base.Debugf("type assertion: value = %v <%v>", v, base.ValueType(v))
+ if v == base.Nil || v == base.None || !v.IsValid() || !v.CanInterface() {
+ // cannot rebuild with concrete type
+ return v, nil
+ }
+ i := v.Interface()
+ v = r.ValueOf(i) // rebuild with concrete type
+ rt := r.TypeOf(i)
+ var xt xr.Type
+ // base.Debugf("type assertion: concrete value = %v <%v>", i, t)
+ if rt != nil && rt.Kind() == r.Ptr && g.proxy2interf[rt.Elem()] != nil {
+ v = v.Elem().Field(0)
+ i = base.ValueInterface(v)
+ if j, ok := i.(xr.InterfaceHeader); ok {
+ // base.Debugf("type assertion: unwrapped value = %v <%T>", j, j)
+ v = j.Value()
+ xt = j.Type()
+ } else {
+ // base.Debugf("type assertion: failed to unwrap value = %v <%T>", i, i)
+ v = r.ValueOf(i) // rebuild with concrete type
+ }
+ }
+ return v, xt
+}
+
+// converterToProxy compiles a conversion from 'tin' into the emulated interface type 'tout'
+// and returns a function that performs such conversion
+func (c *Comp) converterToEmulatedInterface(tin, tout xr.Type) func(val r.Value) r.Value {
+ if !tin.Implements(tout) {
+ c.Errorf("cannot convert from <%v> to <%v>", tin, tout)
+ }
+ n := tout.NumMethod()
+ obj2methodFuncs := make([]func(r.Value) r.Value, n)
+
+ tsrc := tin
+ if tin.Kind() == r.Ptr {
+ // xr.Type.MethodByName wants T, not *T, even for methods with pointer receiver
+ tsrc = tin.Elem()
+ }
+ for i := 0; i < n; i++ {
+ mtdout := tout.Method(i)
+ mtdin, count := tsrc.MethodByName(mtdout.Name, c.PackagePath) // pkgpath is ignored for exported names
+
+ if count == 0 {
+ c.Errorf("cannot convert from <%v> to <%v>: missing method %s %s", tin, tout, mtdout.Name, mtdout.Type)
+ } else if count > 1 {
+ c.Errorf("cannot convert from <%v> to <%v>: multiple methods match %s %s", tin, tout, mtdout.Name, mtdout.Type)
+ }
+ if !mtdin.Type.AssignableTo(mtdout.Type) {
+ c.Errorf("cannot convert from <%v> to <%v>: mismatched method %s: expecting %s, found %s",
+ tin, tout, mtdout.Name, mtdout.Type, mtdin.Type)
+ }
+ obj2methodFuncs[i] = c.compileObjGetMethod(tin, mtdin)
+ }
+ rtout := tout.ReflectType()
+
+ extractor := c.extractor(tin)
+ if extractor == nil {
+ return func(obj r.Value) r.Value {
+ return xr.ToEmulatedInterface(rtout, obj, tin, obj2methodFuncs)
+ }
+ }
+ // extract object from tin proxy or emulated interface (if any),
+ // and wrap it in tout emulated interface
+ return func(obj r.Value) r.Value {
+ v, t := extractor(obj)
+ return xr.ToEmulatedInterface(rtout, v, t, obj2methodFuncs)
+ }
+}
+
+// return a function that extracts value wrapped in a proxy or emulated interface
+// returns nil if no extraction is needed
+func (g *CompGlobals) extractor(tin xr.Type) func(r.Value) (r.Value, xr.Type) {
+ if tin.Kind() != r.Interface {
+ return nil
+ } else if xr.IsEmulatedInterface(tin) {
+ return xr.FromEmulatedInterface
+ } else {
+ return g.extractFromProxy
+ }
+}
+
+// return the error "\n\treason: t does not implement tinterf: missing method "
+func interfaceMissingMethod(t, tinterf xr.Type) string {
+ var s string
+ if tinterf.Kind() == r.Interface {
+ s = fmt.Sprintf("\n\treason: %v does not implement %v", t, tinterf)
+ missingmtd := xr.MissingMethod(t, tinterf)
+ if missingmtd != nil {
+ s = fmt.Sprintf("%s: missing method %s", s, missingmtd.String())
+ }
+ }
+ return s
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/interpreter.go b/vendor/github.com/cosmos72/gomacro/fast/interpreter.go
index c99ded4..234c413 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/interpreter.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/interpreter.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* interpreter.go
@@ -26,12 +17,16 @@
package fast
import (
- "go/ast"
+ "bufio"
+ "errors"
+ "fmt"
+ "go/types"
+ "io"
+ "os"
r "reflect"
- "strings"
- "github.com/cosmos72/gomacro/ast2"
. "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/gls"
xr "github.com/cosmos72/gomacro/xreflect"
)
@@ -40,64 +35,119 @@ import (
// and the interpreter's runtime environment Env
type Interp struct {
Comp *Comp
- env *Env // not exported. to access it, call CompEnv.PrepareEnv()
+ env *Env // not exported. to access it, call Interp.PrepareEnv()
}
-func (ir *Interp) RunExpr1(e *Expr) r.Value {
- if e == nil {
- return None
- }
- env := ir.PrepareEnv()
- fun := e.AsX1()
- return fun(env)
+func New() *Interp {
+ top := newTopInterp("builtin")
+ top.env.UsedByClosure = true // do not free this *Env
+ file := NewInnerInterp(top, "main", "main")
+ file.env.UsedByClosure = true // do not free this *Env
+ return file
}
-func (ir *Interp) RunExpr(e *Expr) (r.Value, []r.Value) {
- if e == nil {
- return None, nil
+func newTopInterp(path string) *Interp {
+ name := FileName(path)
+
+ g := NewIrGlobals()
+ universe := xr.NewUniverse()
+
+ cg := &CompGlobals{
+ IrGlobals: g,
+ Universe: universe,
+ KnownImports: make(map[string]*Import),
+ interf2proxy: make(map[r.Type]r.Type),
+ proxy2interf: make(map[r.Type]xr.Type),
+ Prompt: "gomacro> ",
}
- env := ir.PrepareEnv()
- fun := e.AsXV(ir.Comp.CompileOptions)
- return fun(env)
-}
+ goid := gls.GoID()
+ run := &Run{IrGlobals: g, goid: goid}
+ // early register run in goroutine-local data
+ g.gls[goid] = run
-func (ir *Interp) Parse(src string) ast2.Ast {
- return ir.Comp.Parse(src)
-}
+ ir := &Interp{
+ Comp: &Comp{
+ CompGlobals: cg,
+ CompBinds: CompBinds{
+ Name: name,
+ Path: path,
+ },
+ UpCost: 1,
+ Depth: 0,
+ Outer: nil,
+ },
+ env: &Env{
+ Outer: nil,
+ Run: run,
+ },
+ }
+ // tell xreflect about our packages "fast" and "main"
+ universe.CachePackage(types.NewPackage("fast", "fast"))
+ universe.CachePackage(types.NewPackage("main", "main"))
-// combined Parse + Compile
-func (ir *Interp) Compile(src string) *Expr {
- c := ir.Comp
- return c.Compile(c.Parse(src))
-}
+ // no need to scavenge for Builtin, Function, Macro and UntypedLit fields and methods.
+ // actually, making them opaque helps securing against malicious interpreted code.
+ for _, rtype := range []r.Type{rtypeOfBuiltin, rtypeOfFunction, rtypeOfPtrImport, rtypeOfMacro} {
+ cg.opaqueType(rtype, "fast")
+ }
+ cg.opaqueType(rtypeOfUntypedLit, "untyped")
-func (ir *Interp) CompileNode(node ast.Node) *Expr {
- return ir.Comp.CompileNode(node)
+ ir.addBuiltins()
+ return ir
}
-func (ir *Interp) CompileAst(form ast2.Ast) *Expr {
- return ir.Comp.Compile(form)
-}
+func NewInnerInterp(outer *Interp, name string, path string) *Interp {
+ if len(name) == 0 {
+ name = FileName(path)
+ }
-// combined Parse + Compile + RunExpr
-func (ir *Interp) Eval(src string) (r.Value, []r.Value) {
- c := ir.Comp
- return ir.RunExpr(c.Compile(c.Parse(src)))
-}
+ outerComp := outer.Comp
+ outerEnv := outer.env
+ run := outerEnv.Run
-func (ir *Interp) ChangePackage(name, path string) {
- if len(path) == 0 {
- path = name
+ env := &Env{
+ Outer: outerEnv,
+ Run: run,
+ FileEnv: outerEnv.FileEnv,
+ CallDepth: outerEnv.CallDepth,
+ }
+
+ if outerEnv.Outer == nil {
+ env.FileEnv = env
} else {
- name = path[1+strings.LastIndexByte(path, '/'):]
+ env.FileEnv = outerEnv.FileEnv
}
- c := ir.Comp
- currpath := c.Path
- if path == currpath {
- return
+
+ // do NOT set g.CurrEnv = ir.Env, it messes up the call stack
+ return &Interp{
+ &Comp{
+ CompGlobals: outerComp.CompGlobals,
+ CompBinds: CompBinds{
+ Name: name,
+ Path: path,
+ },
+ UpCost: 1,
+ Depth: outerComp.Depth + 1,
+ Outer: outerComp,
+ },
+ env,
}
}
+func (ir *Interp) SetInspector(inspector Inspector) {
+ ir.Comp.Globals.Inspector = inspector
+}
+
+func (ir *Interp) SetDebugger(debugger Debugger) {
+ ir.env.Run.Debugger = debugger
+}
+
+func (ir *Interp) Interrupt(os.Signal) {
+ ir.env.Run.interrupt()
+}
+
+// ============================================================================
+
// DeclConst compiles a constant declaration
func (ir *Interp) DeclConst(name string, t xr.Type, value I) {
ir.Comp.DeclConst0(name, t, value)
@@ -153,15 +203,16 @@ func (ir *Interp) apply() {
func (ir *Interp) AddressOfVar(name string) (addr r.Value) {
c := ir.Comp
sym := c.TryResolve(name)
+ var v r.Value
if sym != nil {
switch sym.Desc.Class() {
case VarBind, IntBind:
va := sym.AsVar(PlaceAddress)
expr := va.Address(c.Depth)
- return ir.RunExpr1(expr)
+ v, _ = ir.RunExpr1(expr)
}
}
- return Nil
+ return v
}
// replacement of reflect.TypeOf() that uses xreflect.TypeOf()
@@ -182,71 +233,81 @@ func (ir *Interp) ValueOf(name string) (value r.Value) {
return sym.Bind.ConstValue()
case IntBind:
value = ir.AddressOfVar(name)
- if value != Nil {
+ if value.IsValid() {
value = value.Elem() // dereference
}
return value
- case VarBind:
+ default:
env := ir.PrepareEnv()
for i := 0; i < sym.Upn; i++ {
env = env.Outer
}
- return env.Binds[sym.Desc.Index()]
- default:
- expr := ir.Comp.Symbol(sym)
- return ir.RunExpr1(expr)
+ return env.Vals[sym.Desc.Index()]
}
}
-func (ir *Interp) PrepareEnv() *Env {
- return ir.prepareEnv(128)
+// ===================== Eval(), EvalFile(), EvalReader() ============================
+
+// combined Parse + Compile + RunExpr1
+func (ir *Interp) Eval1(src string) (r.Value, xr.Type) {
+ return ir.RunExpr1(ir.Compile(src))
}
-func (ir *Interp) prepareEnv(minDelta int) *Env {
- c := ir.Comp
- env := ir.env
- // usually we know at Env creation how many slots are needed in c.Env.Binds
- // but here we are modifying an existing Env...
- if minDelta < 0 {
- minDelta = 0
+// combined Parse + Compile + RunExpr
+func (ir *Interp) Eval(src string) ([]r.Value, []xr.Type) {
+ return ir.RunExpr(ir.Compile(src))
+}
+
+func (ir *Interp) EvalFile(filepath string) (comments string, err error) {
+ g := ir.Comp.CompGlobals
+ saveFilename := g.Filepath
+ f, err := os.Open(filepath)
+ if err != nil {
+ return "", err
}
- capacity, min := cap(env.Binds), c.BindNum
- // c.Debugf("prepareEnv() before: c.BindNum = %v, minDelta = %v, len(env.Binds) = %v, cap(env.Binds) = %v, env = %p", c.BindNum, minDelta, len(env.Binds), cap(env.Binds), env)
-
- if capacity < min {
- if capacity <= min/2 {
- capacity = min
- } else {
- capacity *= 2
+ defer func() {
+ f.Close()
+ g.Filepath = saveFilename
+ }()
+ g.Filepath = filepath
+ return ir.EvalReader(f)
+}
+
+func (ir *Interp) EvalReader(src io.Reader) (comments string, err error) {
+ g := ir.Comp.CompGlobals
+ savein := g.Readline
+ saveopts := g.Options
+ g.Line = 0
+ in := MakeBufReadline(bufio.NewReader(src), g.Stdout)
+ g.Readline = in
+ // parsing a file: suppress prompt and printing expression results
+ g.Options &^= OptShowPrompt | OptShowEval | OptShowEvalType
+ defer func() {
+ g.Readline = savein
+ g.Options = saveopts
+ if rec := recover(); rec != nil {
+ switch rec := rec.(type) {
+ case error:
+ err = rec
+ default:
+ err = errors.New(fmt.Sprint(rec))
+ }
}
- if capacity-min < minDelta {
- capacity = min + minDelta
+ }()
+
+ // perform the first iteration manually, to collect comments
+ str, firstToken := g.ReadMultiline(ReadOptCollectAllComments, g.Prompt)
+ if firstToken >= 0 {
+ comments = str[0:firstToken]
+ if firstToken > 0 {
+ str = str[firstToken:]
+ g.IncLine(comments)
}
- binds := make([]r.Value, min, capacity)
- copy(binds, env.Binds)
- env.Binds = binds
- }
- if len(env.Binds) < min {
- env.Binds = env.Binds[0:min:cap(env.Binds)]
}
- // c.Debugf("prepareEnv() after: c.BindNum = %v, minDelta = %v, len(env.Binds) = %v, cap(env.Binds) = %v, env = %p", c.BindNum, minDelta, len(env.Binds), cap(env.Binds), env)
-
- capacity, min = cap(env.IntBinds), c.IntBindNum
- if capacity < min {
- if capacity <= min/2 {
- capacity = min
- } else {
- capacity *= 2
- }
- if capacity-min < minDelta {
- capacity = min + minDelta
+
+ if ir.ParseEvalPrint(str) {
+ for ir.ReadParseEvalPrint() {
}
- binds := make([]uint64, min, capacity)
- copy(binds, env.IntBinds)
- env.IntBinds = binds
- }
- if len(env.IntBinds) < min {
- env.IntBinds = env.IntBinds[0:min:cap(env.IntBinds)]
}
- return env
+ return comments, nil
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/literal.go b/vendor/github.com/cosmos72/gomacro/fast/literal.go
index aa3fe2b..9d05a31 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/literal.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/literal.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* literal.go
@@ -29,6 +20,7 @@ import (
"go/ast"
"go/constant"
"go/token"
+ "math/big"
r "reflect"
. "github.com/cosmos72/gomacro/base"
@@ -62,23 +54,6 @@ func (c *Comp) BasicLit(node *ast.BasicLit) *Expr {
return c.exprUntypedLit(kind, obj)
}
-func constantKindToUntypedLitKind(ckind constant.Kind) r.Kind {
- ret := r.Invalid
- switch ckind {
- case constant.Bool:
- ret = r.Bool
- case constant.Int:
- ret = r.Int // actually ambiguous, could be a rune - thus r.Int32
- case constant.Float:
- ret = r.Float64
- case constant.Complex:
- ret = r.Complex128
- case constant.String:
- ret = r.String
- }
- return ret
-}
-
func isLiteral(x interface{}) bool {
if x == nil {
return true
@@ -124,33 +99,12 @@ func isLiteralNumber(x I, n int64) bool {
case r.Value:
return false
case UntypedLit:
- return x.IsLiteralNumber(n)
+ return x.EqualInt64(n)
}
Errorf("isLiteralNumber: unexpected literal type %v <%v>", x, r.TypeOf(x))
return false
}
-func (untyp *UntypedLit) IsLiteralNumber(n int64) bool {
- obj := untyp.Obj
- switch obj.Kind() {
- case constant.Int:
- m, exact := constant.Int64Val(obj)
- return exact && m == n
- case constant.Float:
- m, exact := constant.Float64Val(obj)
- return exact && float64(int64(m)) == m && int64(m) == n
- case constant.Complex:
- m, exact := constant.Float64Val(constant.Imag(obj))
- if !exact || m != 0.0 {
- return false
- }
- m, exact = constant.Float64Val(constant.Real(obj))
- return exact && float64(int64(m)) == m && int64(m) == n
- default:
- return false
- }
-}
-
// ================================= ConstTo =================================
// ConstTo checks that a constant Expr can be used as the given type.
@@ -161,9 +115,13 @@ func (e *Expr) ConstTo(t xr.Type) I {
Errorf("internal error: expression is not constant, use Expr.To() instead of Expr.ConstTo() to convert from <%v> to <%v>", e.Type, t)
}
val := e.Lit.ConstTo(t)
- if e.Fun != nil {
- // no longer valid, recompute it
- e.Fun = nil
+ fun := makeMathBigFun(val)
+ if fun != nil {
+ // no longer a constant
+ e.Lit.Value = nil
+ e.Fun = fun
+ } else if e.Fun != nil {
+ // e.Fun is no longer valid, recompute it
e.WithFun()
}
return val
@@ -183,17 +141,17 @@ func (lit *Lit) ConstTo(t xr.Type) I {
return nil
}
// stricter than t == lit.Type
- rfrom := r.TypeOf(value)
- rto := t.ReflectType()
- if rfrom == rto {
+ tfrom := lit.Type
+ if tfrom != nil && t != nil && tfrom.IdenticalTo(t) {
return value
}
switch x := value.(type) {
case UntypedLit:
+ val := x.Convert(t)
lit.Type = t
- lit.Value = x.ConstTo(t)
- // Debugf("Lit.ConstTo(): converted untyped constant %v to %v <%v> (stored as <%v>)", x, lit.Value, TypeOf(lit.Value), t)
- return lit.Value
+ lit.Value = val
+ // Debugf("UntypedLit.Convert(): converted untyped constant %v to %v <%v> (stored as <%v>)", x, val, TypeOf(val), t)
+ return val
case nil:
// literal nil can only be converted to nillable types
if IsNillableKind(t.Kind()) {
@@ -203,57 +161,40 @@ func (lit *Lit) ConstTo(t xr.Type) I {
// return lit.Value
}
}
- if rfrom != nil && rto != nil && (rfrom.AssignableTo(rto) || rfrom.Implements(rto)) {
+ if tfrom != nil && t != nil && (tfrom.AssignableTo(t) || t.Kind() == r.Interface && tfrom.Implements(t)) {
lit.Type = t
- lit.Value = r.ValueOf(value).Convert(rto).Interface()
+ // FIXME: use (*Comp).Converter(), requires a *Comp parameter
+ lit.Value = r.ValueOf(value).Convert(t.ReflectType()).Interface()
return lit.Value
}
- Errorf("cannot convert typed constant %v <%v> to <%v>", value, r.TypeOf(value), t)
+ Errorf("cannot convert typed constant %v <%v> to <%v>%s", value, lit.Type, t, interfaceMissingMethod(lit.Type, t))
return nil
}
-// ConstTo checks that an UntypedLit can be used as the given type.
-// performs actual untyped -> typed conversion and subsequent overflow checks.
-// returns the constant converted to given type
-func (untyp *UntypedLit) ConstTo(t xr.Type) I {
- obj := untyp.Obj
- var val interface{}
-again:
- switch t.Kind() {
- case r.Bool:
- if obj.Kind() != constant.Bool {
- Errorf("cannot convert untyped constant %v to <%v>", untyp, t)
- }
- val = constant.BoolVal(obj)
- case r.Int, r.Int8, r.Int16, r.Int32, r.Int64,
- r.Uint, r.Uint8, r.Uint16, r.Uint32, r.Uint64, r.Uintptr,
- r.Float32, r.Float64, r.Complex64, r.Complex128:
-
- n := untyp.extractNumber(obj, t)
- return convertLiteralCheckOverflow(n, t)
- case r.String:
- if untyp.Obj.Kind() != constant.String {
- Errorf("cannot convert untyped constant %v to <%v>", untyp, t)
+// return a closure that duplicates at each invokation any *big.Int, *big.Rat, *big.Float passed as 'val'
+func makeMathBigFun(val I) func(*Env) r.Value {
+ switch a := val.(type) {
+ case *big.Int:
+ return func(*Env) r.Value {
+ var b big.Int
+ b.Set(a)
+ return r.ValueOf(&b)
+ }
+ case *big.Rat:
+ return func(*Env) r.Value {
+ var b big.Rat
+ b.Set(a)
+ return r.ValueOf(&b)
+ }
+ case *big.Float:
+ return func(*Env) r.Value {
+ var b big.Float
+ b.Set(a)
+ return r.ValueOf(&b)
}
- val = UnescapeString(obj.ExactString())
- case r.Interface:
- // this can happen too... for example in "var foo interface{} = 7"
- // and it requites to convert the untyped constant to its default type.
- // obviously, untyped constants can only implement empty interfaces
- if t.NumMethod() == 0 {
- t = untyp.DefaultType()
- goto again
- }
- fallthrough
default:
- Errorf("cannot convert untyped constant %v to <%v>", untyp, t)
return nil
}
- v := r.ValueOf(val)
- if v.Type() != t.ReflectType() {
- val = v.Convert(t.ReflectType())
- }
- return val
}
// ================================= DefaultType =================================
@@ -276,90 +217,6 @@ func (lit *Lit) DefaultType() xr.Type {
}
}
-// DefaultType returns the default type of an untyped constant.
-func (untyp *UntypedLit) DefaultType() xr.Type {
- switch untyp.Kind {
- case r.Bool, r.Int32, r.Int, r.Uint, r.Float64, r.Complex128, r.String:
- if universe := untyp.Universe; universe == nil {
- Errorf("UntypedLit.DefaultType(): malformed untyped constant %v, has nil Universe!", untyp)
- return nil
- } else {
- return universe.BasicTypes[untyp.Kind]
- }
-
- default:
- Errorf("unexpected untyped constant %v, its default type is not known", untyp)
- return nil
- }
-}
-
-// ======================= utilities for ConstTo and ConstToDefaultType =======================
-
-// extractNumber converts the untyped constant src to an integer, float or complex.
-// panics if src has different kind from constant.Int, constant.Float and constant.Complex
-// the receiver (untyp UntypedLit) and the second argument (t reflect.Type) are only used to pretty-print the panic error message
-func (untyp *UntypedLit) extractNumber(src constant.Value, t xr.Type) interface{} {
- var n interface{}
- var exact bool
- switch src.Kind() {
- case constant.Int:
- n, exact = constant.Int64Val(src)
- case constant.Float:
- n, exact = constant.Float64Val(src)
- case constant.Complex:
- re := untyp.extractNumber(constant.Real(src), t)
- im := untyp.extractNumber(constant.Imag(src), t)
- rfloat := r.ValueOf(re).Convert(TypeOfFloat64).Float()
- ifloat := r.ValueOf(im).Convert(TypeOfFloat64).Float()
- n = complex(rfloat, ifloat)
- exact = true
- default:
- Errorf("cannot convert untyped constant %v to <%v>", untyp, t)
- return nil
- }
- // allow inexact conversions to float64 and complex128:
- // floating point is intrinsically inexact, and Go compiler allows them too
- if !exact && src.Kind() == constant.Int {
- Errorf("untyped constant %v overflows <%v>", untyp, t)
- return nil
- }
- return n
-}
-
-// convertLiteralCheckOverflow converts a literal to type t and returns the converted value.
-// panics if the conversion overflows the given type
-func convertLiteralCheckOverflow(src interface{}, to xr.Type) interface{} {
- v := r.ValueOf(src)
- rto := to.ReflectType()
- vto := ConvertValue(v, rto)
-
- k, kto := v.Kind(), vto.Kind()
- if k == kto {
- return vto.Interface() // no numeric conversion happened
- }
- c, cto := KindToCategory(k), KindToCategory(kto)
- if cto == r.Int || cto == r.Uint {
- if c == r.Float64 || c == r.Complex128 {
- // float-to-integer conversion. check for truncation
- t1 := ValueType(v)
- vback := ConvertValue(vto, t1)
- if src != vback.Interface() {
- Errorf("constant %v truncated to %v", src, to)
- return nil
- }
- } else {
- // integer-to-integer conversion. convert back and compare the interfaces for overflows
- t1 := ValueType(v)
- vback := vto.Convert(t1)
- if src != vback.Interface() {
- Errorf("constant %v overflows %v", src, to)
- return nil
- }
- }
- }
- return vto.Interface()
-}
-
// SetTypes sets the expression result types
func (e *Expr) SetTypes(tout []xr.Type) {
switch len(tout) {
@@ -404,7 +261,7 @@ func (e *Expr) To(c *Comp, t xr.Type) {
e.ConstTo(t)
return
}
- if xr.SameType(e.Type, t) {
+ if e.Type.IdenticalTo(t) {
return
}
if !e.Type.AssignableTo(t) {
@@ -441,7 +298,7 @@ func (e *Expr) To(c *Comp, t xr.Type) {
if !v.IsValid() {
v = zero
} else {
- v = conv(v, rtype)
+ v = conv(v)
}
return v
}
@@ -485,7 +342,7 @@ again:
if rtexpected.Kind() == r.Interface && rtactual.Implements(rtexpected) {
v = v.Convert(rtexpected)
} else {
- Errorf("internal error: constant %v <%v> was assumed to have type <%v>", value, r.TypeOf(value), t.ReflectType())
+ Errorf("internal error: constant %v <%v> was assumed to have type <%v>", value, rtactual, rtexpected)
}
}
switch v.Kind() {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/macroexpand.go b/vendor/github.com/cosmos72/gomacro/fast/macroexpand.go
index f46bffa..2e3d0d7 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/macroexpand.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/macroexpand.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* macroexpand.go
@@ -77,10 +68,10 @@ func (c *Comp) macroExpandCodewalk(in Ast, quasiquoteDepth int) (out Ast, anythi
saved := in
if expr, ok := in.(UnaryExpr); ok {
- isBlockWithinExpr := false
- switch expr.X.Op {
+ op := expr.X.Op
+ switch op {
case mt.MACRO:
- isBlockWithinExpr = true
+ break
case mt.QUOTE:
// QUOTE prevents macroexpansion only if found outside any QUASIQUOTE
if quasiquoteDepth == 0 {
@@ -97,15 +88,14 @@ func (c *Comp) macroExpandCodewalk(in Ast, quasiquoteDepth int) (out Ast, anythi
}
inChild := UnwrapTrivialAst(in.Get(0).Get(1))
outChild, expanded := c.macroExpandCodewalk(inChild, quasiquoteDepth)
- if isBlockWithinExpr {
+ if op == mt.MACRO {
return outChild, expanded
- } else {
- out := in
- if expanded {
- out = MakeQuote2(expr, outChild.(AstWithNode))
- }
- return out, expanded
}
+ out := in
+ if expanded {
+ out = MakeQuote2(expr, outChild.(AstWithNode))
+ }
+ return out, expanded
}
Recurse:
if in == nil {
@@ -116,9 +106,9 @@ Recurse:
}
out = in.New()
n := in.Size()
- if outSlice, canAppend := out.(AstWithSlice); canAppend {
+ if outSlice, appendable := out.(AstWithSlice); appendable {
// New() returns zero-length slice... resize it
- for i := 0; i < n; i++ {
+ for outSlice.Size() < n {
outSlice = outSlice.Append(nil)
}
out = outSlice
@@ -193,7 +183,7 @@ func (c *Comp) extractMacroCall(form Ast) Macro {
switch form := form.(type) {
case Ident:
sym := c.TryResolve(form.X.Name)
- if sym != nil && sym.Bind.Desc.Class() == ConstBind && sym.Type.Kind() == r.Struct {
+ if sym != nil && sym.Bind.Desc.Class() == ConstBind && sym.Type != nil && sym.Type.Kind() == r.Struct {
switch value := sym.Value.(type) {
case Macro:
if c.Options&OptDebugMacroExpand != 0 {
@@ -223,8 +213,8 @@ func (c *Comp) MacroExpand1(in Ast) (out Ast, expanded bool) {
if debug {
c.Debugf("MacroExpand1: found list: %v", ins.Interface())
}
- outs := ins.New().(AstWithSlice)
n := ins.Size()
+ outs := ins.New().(AstWithSlice)
// since macro calls are sequences of statements,
// we must scan the whole list,
@@ -271,7 +261,7 @@ func (c *Comp) MacroExpand1(in Ast) (out Ast, expanded bool) {
case 1:
any := results[0].Interface()
if any != nil {
- out = AnyToAst(any, "macroexpansion")
+ out = anyToAst(any, "macroexpansion")
break
}
fallthrough
diff --git a/vendor/github.com/cosmos72/gomacro/fast/output.go b/vendor/github.com/cosmos72/gomacro/fast/output.go
new file mode 100644
index 0000000..a4f53f1
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/output.go
@@ -0,0 +1,182 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * output.go
+ *
+ * Created on: Mar 30, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package fast
+
+import (
+ "fmt"
+ "go/types"
+ "io"
+ r "reflect"
+ "sort"
+
+ "github.com/cosmos72/gomacro/base"
+ xr "github.com/cosmos72/gomacro/xreflect"
+)
+
+func (b Builtin) String() string {
+ return fmt.Sprintf("%p", b.Compile)
+}
+
+func (imp *Import) String() string {
+ return fmt.Sprintf("{%s %q, %d binds, %d types}", imp.Name, imp.Path, len(imp.Binds), len(imp.Types))
+}
+
+func typestringer(path string) func(xr.Type) string {
+ name := base.FileName(path)
+ if name == path {
+ return xr.Type.String
+ }
+ qualifier := func(pkg *types.Package) string {
+ pkgpath := pkg.Path()
+ if pkgpath == path {
+ // base.Debugf("replaced package path %q -> %s", path, name)
+ return name
+ }
+ // base.Debugf("keep package path %q, does not match %q", pkgpath, path)
+ return pkgpath
+ }
+ return func(t xr.Type) string {
+ return types.TypeString(t.GoType(), qualifier)
+ }
+}
+
+func (ir *Interp) ShowPackage(name string) {
+ if len(name) != 0 {
+ ir.ShowImportedPackage(name)
+ return
+ }
+ // show current package and its outer scopes
+ stack := make([]*Interp, 0)
+ interp := ir
+ for {
+ stack = append(stack, interp)
+ c := interp.Comp
+ env := interp.env
+ for i := 0; i < c.UpCost && env != nil; i++ {
+ env = env.Outer
+ }
+ c = c.Outer
+ if env == nil || c == nil {
+ break
+ }
+ interp = &Interp{c, env}
+ }
+ for i := len(stack) - 1; i >= 0; i-- {
+ stack[i].ShowAsPackage()
+ }
+}
+
+func (ir *Interp) ShowAsPackage() {
+ c := ir.Comp
+ env := ir.PrepareEnv()
+ out := c.Globals.Stdout
+ stringer := typestringer(c.Path)
+ if binds := c.Binds; len(binds) > 0 {
+ base.ShowPackageHeader(out, c.Name, c.Path, "binds")
+
+ keys := make([]string, len(binds))
+ i := 0
+ for k := range binds {
+ keys[i] = k
+ i++
+ }
+ sort.Strings(keys)
+ for _, k := range keys {
+ if bind := binds[k]; bind != nil {
+ v := bind.RuntimeValue(env)
+ showValue(out, k, v, bind.Type, stringer)
+ }
+ }
+ fmt.Fprintln(out)
+ }
+ showTypes(out, c.Name, c.Path, c.Types, stringer)
+}
+
+func (ir *Interp) ShowImportedPackage(name string) {
+ var imp *Import
+ var ok bool
+ if bind := ir.Comp.Binds[name]; bind != nil && bind.Const() && bind.Type != nil && bind.Type.ReflectType() == rtypeOfPtrImport {
+ imp, ok = bind.Value.(*Import)
+ }
+ if !ok {
+ ir.Comp.Warnf("not an imported package: %q", name)
+ return
+ }
+ imp.Show(ir.Comp.CompGlobals)
+}
+
+func (imp *Import) Show(g *CompGlobals) {
+ stringer := typestringer(imp.Path)
+ out := g.Stdout
+ if binds := imp.Binds; len(binds) > 0 {
+ base.ShowPackageHeader(out, imp.Name, imp.Path, "binds")
+
+ keys := make([]string, len(binds))
+ i := 0
+ for k := range binds {
+ keys[i] = k
+ i++
+ }
+ sort.Strings(keys)
+ env := imp.env
+ for _, k := range keys {
+ bind := imp.Binds[k]
+ v := bind.RuntimeValue(env)
+ showValue(out, k, v, bind.Type, stringer)
+ }
+ fmt.Fprintln(out)
+ }
+ showTypes(out, imp.Name, imp.Path, imp.Types, stringer)
+}
+
+func showTypes(out io.Writer, name string, path string, types map[string]xr.Type, stringer func(xr.Type) string) {
+ if len(types) > 0 {
+ base.ShowPackageHeader(out, name, path, "types")
+
+ keys := make([]string, len(types))
+ i := 0
+ for k := range types {
+ keys[i] = k
+ i++
+ }
+ sort.Strings(keys)
+ for _, k := range keys {
+ t := types[k]
+ if t != nil {
+ showType(out, k, t, stringer)
+ }
+ }
+ fmt.Fprintln(out)
+ }
+}
+
+const spaces15 = " "
+
+func showValue(out io.Writer, name string, v r.Value, t xr.Type, stringer func(xr.Type) string) {
+ n := len(name) & 15
+ str := stringer(t)
+ if v == base.Nil || v == base.None {
+ fmt.Fprintf(out, "%s%s = nil\t// %s\n", name, spaces15[n:], str)
+ } else {
+ fmt.Fprintf(out, "%s%s = %v\t// %s\n", name, spaces15[n:], v, str)
+ }
+}
+
+func showType(out io.Writer, name string, t xr.Type, stringer func(xr.Type) string) {
+ n := len(name) & 15
+ fmt.Fprintf(out, "%s%s = %v\t// %v\n", name, spaces15[n:], stringer(t), t.Kind())
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_get.go b/vendor/github.com/cosmos72/gomacro/fast/place_get.go
index e981c1a..3a21339 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_get.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_get.go
@@ -1,25 +1,11 @@
-// -------------------------------------------------------------
-// DO NOT EDIT! this file was generated automatically by gomacro
-// Any change will be lost when the file is re-generated
-// -------------------------------------------------------------
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_get.go
@@ -34,6 +20,7 @@ import (
r "reflect"
)
+// compile a read operation on a place
func (c *Comp) GetPlace(place *Place) *Expr {
if place.IsVar() {
return c.Symbol(place.Var.AsSymbol())
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_ops.go b/vendor/github.com/cosmos72/gomacro/fast/place_ops.go
index 83c1dd0..a26e1f8 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_ops.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_ops.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_ops.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_ops.gomacro b/vendor/github.com/cosmos72/gomacro/fast/place_ops.gomacro
index dc790cf..f3fb288 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_ops.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_ops.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_ops.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_set.go b/vendor/github.com/cosmos72/gomacro/fast/place_set.go
index a845a42..8923918 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_set.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_set.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_set.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_set.gomacro b/vendor/github.com/cosmos72/gomacro/fast/place_set.gomacro
index 49491b6..089c664 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_set.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_set.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_set.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_set_value.go b/vendor/github.com/cosmos72/gomacro/fast/place_set_value.go
index 271f5a5..29de6c6 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_set_value.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_set_value.go
@@ -1,25 +1,11 @@
-// -------------------------------------------------------------
-// DO NOT EDIT! this file was generated automatically by gomacro
-// Any change will be lost when the file is re-generated
-// -------------------------------------------------------------
-
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_set_value.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_shifts.go b/vendor/github.com/cosmos72/gomacro/fast/place_shifts.go
index 1721c6f..d37edaa 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_shifts.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_shifts.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_shifts.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/place_shifts.gomacro b/vendor/github.com/cosmos72/gomacro/fast/place_shifts.gomacro
index 48973f7..5d22407 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/place_shifts.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/place_shifts.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* place_shifts.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/quasiquote.go b/vendor/github.com/cosmos72/gomacro/fast/quasiquote.go
index b958f17..7868742 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/quasiquote.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/quasiquote.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* quasiquote.go
@@ -83,23 +74,23 @@ func (c *Comp) Quasiquote(in Ast) *Expr {
return c.Compile(in)
}
-func (c *Comp) quasiquote1(in Ast, depth int, can_splice bool) *Expr {
- expr, _ := c.quasiquote(in, depth, can_splice)
+func (c *Comp) quasiquote1(in Ast, depth int, canSplice bool) *Expr {
+ expr, _ := c.quasiquote(in, depth, canSplice)
return expr
}
// quasiquote expands and compiles the contents of a ~quasiquote
-func (c *Comp) quasiquote(in Ast, depth int, can_splice bool) (*Expr, bool) {
+func (c *Comp) quasiquote(in Ast, depth int, canSplice bool) (*Expr, bool) {
if in == nil || in.Interface() == nil {
return nil, false
}
debug := c.Options&OptDebugQuasiquote != 0
var label string
- if can_splice {
+ if canSplice {
label = " splice"
}
if debug {
- c.Debugf("Quasiquote[%d]%s expanding %s: %v <%v>", depth, label, mt.String(mt.QUASIQUOTE), in.Interface(), r.TypeOf(in.Interface()))
+ c.Debugf("Quasiquote[%d]%s expanding %s: %v // %T", depth, label, mt.String(mt.QUASIQUOTE), in.Interface(), in.Interface())
}
switch in := in.(type) {
@@ -114,7 +105,7 @@ func (c *Comp) quasiquote(in Ast, depth int, can_splice bool) (*Expr, bool) {
expr, splice := c.quasiquote(form, depth, true)
fun := expr.AsX1()
if fun == nil {
- c.Warnf("Quasiquote[%d]%s: node expanded to nil: %v <%v>", depth, label, form.Interface(), r.TypeOf(form.Interface()))
+ c.Warnf("Quasiquote[%d]%s: node expanded to nil: %v // %T", depth, label, form.Interface(), form.Interface())
continue
}
funs = append(funs, fun)
@@ -136,12 +127,12 @@ func (c *Comp) quasiquote(in Ast, depth int, can_splice bool) (*Expr, bool) {
for i, fun := range funs {
x := ValueInterface(fun(env))
if debug {
- Debugf("Quasiquote: env=%p, append to AstWithSlice: <%v> returned %v <%v>", env, r.TypeOf(fun), x, r.TypeOf(x))
+ Debugf("Quasiquote: env=%p, append to AstWithSlice: <%v> returned %v // %T", env, r.TypeOf(fun), x, x)
}
if x == nil {
continue
} else if !splices[i] {
- out = out.Append(AnyToAst(x, positions[i]))
+ out = out.Append(anyToAst(x, positions[i]))
} else {
xs := AnyToAstWithSlice(x, positions[i])
n := xs.Size()
@@ -157,7 +148,52 @@ func (c *Comp) quasiquote(in Ast, depth int, can_splice bool) (*Expr, bool) {
case UnaryExpr:
unary := in.X
switch op := unary.Op; op {
- case mt.QUOTE, mt.QUASIQUOTE, mt.UNQUOTE, mt.UNQUOTE_SPLICE:
+ case mt.UNQUOTE, mt.UNQUOTE_SPLICE:
+ inner, unquoteDepth := DescendNestedUnquotes(in)
+ if debug {
+ c.Debugf("Quasiquote[%d]%s deep splice expansion? %v. unquoteDepth = %d, inner.Op() = %s: %v // %T",
+ depth, label, unquoteDepth > 1 && unquoteDepth >= depth && inner.Op() == mt.UNQUOTE_SPLICE,
+ unquoteDepth, mt.String(inner.Op()), inner, inner)
+ }
+ if unquoteDepth > 1 && unquoteDepth >= depth && inner.Op() == mt.UNQUOTE_SPLICE {
+ // complication: in Common Lisp, the right-most unquote pairs with the left-most comma!
+ // we implement the same mechanics, so we must drill down to the last unquote/unquote_splice
+ // and, for unquote_splice, create a copy of the unquote/unquote_splice stack for each result.
+ // Example:
+ // x:=quote{7; 8}
+ // quasiquote{quasiquote{1; unquote{2}; unquote{unquote_splice{x}}}}
+ // must return
+ // quasiquote{1; unquote{2}; unquote{7}; unquote{8}}
+
+ depth -= unquoteDepth
+ node := SimplifyNodeForQuote(inner.X.X.(*ast.FuncLit).Body, true)
+ form := ToAst(node)
+ if debug {
+ c.Debugf("Quasiquote[%d]%s deep splice compiling %s: %v // %T", depth, label, mt.String(inner.Op()), node, node)
+ }
+ fun := c.compileExpr(form).AsX1()
+ toks, pos := CollectNestedUnquotes(in)
+ position := c.Fileset.Position(pos[0])
+ pos0 := pos[0]
+ end := unary.End()
+ toks = toks[:unquoteDepth-1]
+ pos = pos[:unquoteDepth-1]
+
+ return exprX1(c.Universe.FromReflectType(rtypeOfBlockStmt), func(env *Env) r.Value {
+ x := ValueInterface(fun(env))
+ // Debugf("Quasiquote: runtime deep expansion returned: %v // %T", x, x)
+ form := AnyToAstWithSlice(x, position)
+ out := BlockStmt{&ast.BlockStmt{Lbrace: pos0, Rbrace: end}}
+ for i, ni := 0, form.Size(); i < ni; i++ {
+ // cheat: BlockStmt.Append() does not modify the receiver
+ formi := AnyToAstWithNode(form.Get(i), position)
+ out.Append(MakeNestedQuote(formi, toks, pos))
+ }
+ return r.ValueOf(out.X)
+ }), true
+ }
+ fallthrough
+ case mt.QUOTE, mt.QUASIQUOTE:
node := SimplifyNodeForQuote(unary.X.(*ast.FuncLit).Body, true)
form := ToAst(node)
@@ -168,13 +204,13 @@ func (c *Comp) quasiquote(in Ast, depth int, can_splice bool) (*Expr, bool) {
}
if depth <= 0 {
if debug {
- c.Debugf("Quasiquote[%d]%s compiling %s: %v <%v>", depth, label, mt.String(op), node, r.TypeOf(node))
+ c.Debugf("Quasiquote[%d]%s compiling %s: %v // %T", depth, label, mt.String(op), node, node)
}
return c.compileExpr(form), op == mt.UNQUOTE_SPLICE
}
fun := c.quasiquote1(form, depth, true).AsX1()
if fun == nil {
- c.Warnf("Quasiquote[%d]%s: node expanded to nil: %v <%v>", depth, label, node, r.TypeOf(node))
+ c.Warnf("Quasiquote[%d]%s: node expanded to nil: %v // %T", depth, label, node, node)
}
var pos token.Pos
var position token.Position
@@ -249,7 +285,7 @@ func (c *Comp) quasiquote(in Ast, depth int, can_splice bool) (*Expr, bool) {
if debug {
Debugf("Quasiquote: env = %p, <%v> returned %v <%v>", env, r.TypeOf(fun), x, r.TypeOf(x))
}
- out.Set(i, AnyToAst(x, positions[i]))
+ out.Set(i, anyToAst(x, positions[i]))
}
}
return r.ValueOf(out.Interface()).Convert(rtype)
@@ -261,7 +297,7 @@ func (c *Comp) quoteUnquoteSplice(op token.Token, pos token.Pos, position token.
var node ast.Node
if fun != nil {
x := ValueInterface(fun(env))
- form := AnyToAst(x, position)
+ form := anyToAst(x, position)
switch form := form.(type) {
case AstWithNode:
node = form.Node()
diff --git a/vendor/github.com/cosmos72/gomacro/fast/range.go b/vendor/github.com/cosmos72/gomacro/fast/range.go
index 05ef733..34dbb22 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/range.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/range.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* range.go
@@ -46,7 +37,7 @@ func (c *Comp) Range(node *ast.RangeStmt, labels []string) {
var nbinds [2]int
c, _ = c.pushEnvIfFlag(&nbinds, true)
- erange := c.Expr1(node.X)
+ erange := c.Expr1(node.X, nil)
t := erange.Type
if erange.Untyped() {
t = erange.DefaultType()
@@ -105,7 +96,7 @@ func (c *Comp) rangeChan(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
if placekey == nil {
c.append(func(env *Env) (Stmt, *Env) {
- _, ok := env.Binds[idxchan].Recv()
+ _, ok := env.Vals[idxchan].Recv()
var ip int
if ok {
ip = env.IP + 1
@@ -117,14 +108,14 @@ func (c *Comp) rangeChan(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
})
} else {
// unnamed bind, contains last received value
- bindrecv := c.AddBind("", VarBind, c.TypeOfInterface())
+ bindrecv := c.NewBind("", VarBind, c.TypeOfInterface())
idxrecv := bindrecv.Desc.Index()
c.append(func(env *Env) (Stmt, *Env) {
- v, ok := env.Binds[idxchan].Recv()
+ v, ok := env.Vals[idxchan].Recv()
var ip int
if ok {
- env.Binds[idxrecv] = v
+ env.Vals[idxrecv] = v
ip = env.IP + 1
} else {
ip = jump.Break
@@ -147,11 +138,9 @@ func (c *Comp) rangeChan(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
}
func (c *Comp) rangeMap(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
- c.ErrorIfCompiled(node)
-
t := erange.Type
tkey, tval := t.Key(), t.Elem()
- tkeyslice := xr.SliceOf(tkey)
+ tkeyslice := c.Universe.SliceOf(tkey)
rtkeyslice := tkeyslice.ReflectType()
// unnamed bind, contains map
@@ -159,16 +148,16 @@ func (c *Comp) rangeMap(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
idxmap := bindmap.Desc.Index()
// unnamed bind, contains map keys
- bindkeys := c.AddBind("", VarBind, tkeyslice)
+ bindkeys := c.NewBind("", VarBind, tkeyslice)
idxkeys := bindkeys.Desc.Index()
c.append(func(env *Env) (Stmt, *Env) {
// convert []r.Value slice into a []rtkey slice, to avoid reflect.Value.Interface() while iterating
- vkeys := env.Binds[idxmap].MapKeys()
+ vkeys := env.Vals[idxmap].MapKeys()
keys := r.MakeSlice(rtkeyslice, len(vkeys), len(vkeys))
for i, vkey := range vkeys {
keys.Index(i).Set(vkey)
}
- env.Binds[idxkeys] = keys
+ env.Vals[idxkeys] = keys
env.IP++
return env.Code[env.IP], env
})
@@ -192,8 +181,8 @@ func (c *Comp) rangeMap(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
if bindkey == nil {
// check iteration index against # of keys
c.append(func(env *Env) (Stmt, *Env) {
- n := env.Binds[idxkeys].Len()
- i := *(*int)(unsafe.Pointer(&env.IntBinds[idxnext]))
+ n := env.Vals[idxkeys].Len()
+ i := *(*int)(unsafe.Pointer(&env.Ints[idxnext]))
var ip int
if i < n {
ip = env.IP + 1
@@ -208,12 +197,12 @@ func (c *Comp) rangeMap(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
// and copy current map key into bindkey
idxkey := bindkey.Desc.Index()
c.append(func(env *Env) (Stmt, *Env) {
- vkeys := env.Binds[idxkeys]
+ vkeys := env.Vals[idxkeys]
n := vkeys.Len()
- i := *(*int)(unsafe.Pointer(&env.IntBinds[idxnext]))
+ i := *(*int)(unsafe.Pointer(&env.Ints[idxnext]))
var ip int
if i < n {
- env.Binds[idxkey] = vkeys.Index(i)
+ env.Vals[idxkey] = vkeys.Index(i)
ip = env.IP + 1
} else {
ip = jump.Break
@@ -237,8 +226,8 @@ func (c *Comp) rangeMap(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
rtype := tval.ReflectType()
zero := r.Zero(rtype)
c.append(func(env *Env) (Stmt, *Env) {
- vmap := env.Binds[idxmap]
- key := env.Binds[idxkey]
+ vmap := env.Vals[idxmap]
+ key := env.Vals[idxkey]
o := env
for j := 0; j < upval; j++ {
o = o.Outer
@@ -249,12 +238,12 @@ func (c *Comp) rangeMap(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
} else if val.Type() != rtype {
val = val.Convert(rtype)
}
- o.Binds[idxval].Set(val)
+ o.Vals[idxval].Set(val)
env.IP++
return env.Code[env.IP], env
})
} else {
- emap := c.Symbol(bindmap.AsSymbol(0))
+ emap := c.Bind(bindmap)
c.SetPlace(placeval, token.ASSIGN, c.mapIndex1(nil, emap, ekey))
}
@@ -263,7 +252,7 @@ func (c *Comp) rangeMap(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
// increase iteration index and jump back to start
c.append(func(env *Env) (Stmt, *Env) {
- (*(*int)(unsafe.Pointer(&env.IntBinds[idxnext])))++
+ (*(*int)(unsafe.Pointer(&env.Ints[idxnext])))++
ip := jump.Start
env.IP = ip
return env.Code[ip], env
@@ -278,8 +267,8 @@ func (c *Comp) rangeSlice(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
if node.Value != nil || t.Kind() != r.Array {
// Go spec: one-variable range on array ONLY evaluates the array length, not the array itself
// save range variable in an unnamed bind
- sym := c.DeclVar0("", nil, erange).AsSymbol(0)
- erange = c.Symbol(sym)
+ bind := c.DeclVar0("", nil, erange)
+ erange = c.Bind(bind)
}
if t.Kind() == r.Array {
@@ -290,8 +279,8 @@ func (c *Comp) rangeSlice(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
elen0 := exprFun(c.TypeOfInt(), func(env *Env) int {
return rangefun(env).Len()
})
- symlen := c.DeclVar0("", nil, elen0).AsSymbol(0)
- elen = c.Symbol(symlen)
+ bindlen := c.DeclVar0("", nil, elen0)
+ elen = c.Bind(bindlen)
}
placekey, placeval := c.rangeVars(node, c.TypeOfInt(), t.Elem())
@@ -371,12 +360,12 @@ func (c *Comp) rangeString(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
jump.Start = c.Code.Len()
if placekey != nil {
- c.SetPlace(placekey, token.ASSIGN, c.Symbol(bindnext.AsSymbol(0)))
+ c.SetPlace(placekey, token.ASSIGN, c.Bind(bindnext))
}
if placeval == nil {
c.append(func(env *Env) (Stmt, *Env) {
- s := env.Binds[idxrange].String()
- pnext := (*int)(unsafe.Pointer(&env.IntBinds[idxnext]))
+ s := env.Vals[idxrange].String()
+ pnext := (*int)(unsafe.Pointer(&env.Ints[idxnext]))
next := *pnext
_, size := utf8.DecodeRuneInString(s[next:])
@@ -395,8 +384,8 @@ func (c *Comp) rangeString(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
idxval := placeval.Var.Desc.Index()
upval := placeval.Var.Upn
c.append(func(env *Env) (Stmt, *Env) {
- s := env.Binds[idxrange].String()
- pnext := (*int)(unsafe.Pointer(&env.IntBinds[idxnext]))
+ s := env.Vals[idxrange].String()
+ pnext := (*int)(unsafe.Pointer(&env.Ints[idxnext]))
next := *pnext
r, size := utf8.DecodeRuneInString(s[next:])
@@ -408,7 +397,7 @@ func (c *Comp) rangeString(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
for i := 0; i < upval; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&env.IntBinds[idxval])) = r
+ *(*int32)(unsafe.Pointer(&env.Ints[idxval])) = r
ip = env.IP + 1
} else {
ip = jump.Break
@@ -419,8 +408,8 @@ func (c *Comp) rangeString(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
} else {
idxrune := bindrune.Desc.Index()
c.append(func(env *Env) (Stmt, *Env) {
- s := env.Binds[idxrange].String()
- pnext := (*int)(unsafe.Pointer(&env.IntBinds[idxnext]))
+ s := env.Vals[idxrange].String()
+ pnext := (*int)(unsafe.Pointer(&env.Ints[idxnext]))
next := *pnext
r, size := utf8.DecodeRuneInString(s[next:])
@@ -428,7 +417,7 @@ func (c *Comp) rangeString(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
if size != 0 {
next += size
*pnext = next
- *(*int32)(unsafe.Pointer(&env.IntBinds[idxrune])) = r
+ *(*int32)(unsafe.Pointer(&env.Ints[idxrune])) = r
ip = env.IP + 1
} else {
ip = jump.Break
@@ -436,7 +425,7 @@ func (c *Comp) rangeString(node *ast.RangeStmt, erange *Expr, jump *rangeJump) {
env.IP = ip
return env.Code[ip], env
})
- c.SetPlace(placeval, token.ASSIGN, c.Symbol(bindrune.AsSymbol(0)))
+ c.SetPlace(placeval, token.ASSIGN, c.Bind(bindrune))
}
// compile the body
diff --git a/vendor/github.com/cosmos72/gomacro/fast/repl.go b/vendor/github.com/cosmos72/gomacro/fast/repl.go
new file mode 100644
index 0000000..bdf0750
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/fast/repl.go
@@ -0,0 +1,632 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * repl.go
+ *
+ * Created on: Apr 28, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package fast
+
+import (
+ "bufio"
+ "go/ast"
+ "go/token"
+ "os"
+ r "reflect"
+ "runtime/debug"
+ "sort"
+ "strings"
+ "time"
+ "unicode"
+
+ "github.com/cosmos72/gomacro/ast2"
+ . "github.com/cosmos72/gomacro/base"
+ xr "github.com/cosmos72/gomacro/xreflect"
+)
+
+// return read string and position of first non-comment token.
+// return "", -1 on EOF
+func (ir *Interp) Read() (string, int) {
+ g := &ir.Comp.Globals
+ var opts ReadOptions
+
+ if g.Options&OptShowPrompt != 0 {
+ opts |= ReadOptShowPrompt
+ }
+ src, firstToken := g.ReadMultiline(opts, ir.Comp.Prompt)
+ if firstToken < 0 {
+ g.IncLine(src)
+ } else if firstToken > 0 {
+ g.IncLine(src[0:firstToken])
+ }
+ return src, firstToken
+}
+
+// parse + macroexpansion + collect declarations & statements
+func (ir *Interp) Parse(src string) ast2.Ast {
+ if len(src) == 0 {
+ return nil
+ }
+ form := ir.Comp.Parse(src)
+ if form == nil {
+ return nil
+ }
+ // collect phase
+ g := &ir.Comp.Globals
+ if g.Options&(OptCollectDeclarations|OptCollectStatements) != 0 {
+ g.CollectAst(form)
+ }
+ return form
+}
+
+// combined Parse + Compile
+func (ir *Interp) Compile(src string) *Expr {
+ return ir.CompileAst(ir.Parse(src))
+}
+
+func (ir *Interp) CompileNode(node ast.Node) *Expr {
+ return ir.CompileAst(ast2.ToAst(node))
+}
+
+func (ir *Interp) CompileAst(form ast2.Ast) *Expr {
+ if form == nil {
+ return nil
+ }
+ c := ir.Comp
+ g := c.CompGlobals
+
+ if g.Options&OptMacroExpandOnly != 0 {
+ x := form.Interface()
+ return c.exprValue(c.TypeOf(x), x)
+ }
+
+ // compile phase
+ expr := c.Compile(form)
+
+ if g.Options&OptKeepUntyped == 0 && expr != nil && expr.Untyped() {
+ expr.ConstTo(expr.DefaultType())
+ }
+ if g.Options&OptShowCompile != 0 {
+ g.Fprintf(g.Stdout, "%v\n", expr)
+ }
+ return expr
+}
+
+// run without debugging. to execute with single-step debugging, use Interp.DebugExpr() instead
+func (ir *Interp) RunExpr1(e *Expr) (r.Value, xr.Type) {
+ if e == nil {
+ return None, nil
+ }
+ // do NOT use e.AsX1(), it converts untyped constants to their default type => may overflow
+ e.CheckX1()
+ vs, ts := ir.RunExpr(e)
+ return vs[0], ts[0]
+}
+
+// run without debugging. to execute with single-step debugging, use Interp.DebugExpr() instead
+func (ir *Interp) RunExpr(e *Expr) ([]r.Value, []xr.Type) {
+ if e == nil {
+ return nil, nil
+ }
+ env := ir.PrepareEnv()
+
+ if ir.Comp.Globals.Options&OptKeepUntyped == 0 && e.Untyped() {
+ e.ConstTo(e.DefaultType())
+ }
+ run := env.Run
+ run.applyDebugOp(DebugOpContinue)
+
+ defer run.setCurrEnv(run.setCurrEnv(env))
+
+ fun := e.AsXV(COptKeepUntyped)
+ v, vs := fun(env)
+ return PackValuesAndTypes(v, vs, e.Type, e.Types)
+}
+
+// execute with single-step debugging. to run without debugging, use Interp.RunExpr() instead
+func (ir *Interp) DebugExpr1(e *Expr) (r.Value, xr.Type) {
+ if e == nil {
+ return None, nil
+ }
+ // do NOT use e.AsX1(), it converts untyped constants to their default type => may overflow
+ e.CheckX1()
+ vs, ts := ir.DebugExpr(e)
+ return vs[0], ts[0]
+}
+
+// execute with single-step debugging. to run without debugging, use Interp.RunExpr() instead
+func (ir *Interp) DebugExpr(e *Expr) ([]r.Value, []xr.Type) {
+ if e == nil {
+ return nil, nil
+ }
+ env := ir.PrepareEnv()
+
+ if ir.Comp.Globals.Options&OptKeepUntyped == 0 && e.Untyped() {
+ e.ConstTo(e.DefaultType())
+ }
+ run := env.Run
+ run.applyDebugOp(DebugOpStep)
+ defer run.setCurrEnv(run.setCurrEnv(env))
+
+ fun := e.AsXV(COptKeepUntyped)
+ v, vs := fun(env)
+ return PackValuesAndTypes(v, vs, e.Type, e.Types)
+}
+
+// combined Parse + Compile + DebugExpr
+func (ir *Interp) Debug(src string) ([]r.Value, []xr.Type) {
+ return ir.DebugExpr(ir.Compile(src))
+}
+
+// set CurrEnv, returns previous value
+func (g *Run) setCurrEnv(env *Env) *Env {
+ old := g.CurrEnv
+ g.CurrEnv = env
+ return old
+}
+
+// ================ PrepareEnv() ========================
+
+func (ir *Interp) PrepareEnv() *Env {
+ // allocate Env.Ints[] in large chunks while we can:
+ // once an Env.Ints[idx] address is taken, we can no longer reallocate it
+ return ir.prepareEnv(16, 1024)
+}
+
+func (ir *Interp) prepareEnv(minValDelta int, minIntDelta int) *Env {
+ c := ir.Comp
+ env := ir.env
+ // usually we know at Env creation how many slots are needed in c.Env.Binds
+ // but here we are modifying an existing Env...
+ if minValDelta < 0 {
+ minValDelta = 0
+ }
+ if minIntDelta < 0 {
+ minIntDelta = 0
+ }
+ capacity, min := cap(env.Vals), c.BindNum
+ // c.Debugf("prepareEnv() before: c.BindNum = %v, minValDelta = %v, len(env.Binds) = %v, cap(env.Binds) = %v, env = %p", c.BindNum, minValDelta, len(env.Binds), cap(env.Binds), env)
+
+ if capacity < min {
+ capacity *= 2
+ if capacity < min {
+ capacity = min
+ }
+ if capacity-cap(env.Vals) < minValDelta {
+ capacity = cap(env.Vals) + minValDelta
+ }
+ binds := make([]r.Value, min, capacity)
+ copy(binds, env.Vals)
+ env.Vals = binds
+ }
+ if len(env.Vals) < min {
+ env.Vals = env.Vals[0:min:cap(env.Vals)]
+ }
+ // c.Debugf("prepareEnv() after: c.BindNum = %v, minDelta = %v, len(env.Binds) = %v, cap(env.Binds) = %v, env = %p", c.BindNum, minDelta, len(env.Binds), cap(env.Binds), env)
+
+ capacity, min = cap(env.Ints), c.IntBindNum
+ if capacity < min {
+ if env.IntAddressTaken {
+ c.Errorf("internal error: attempt to reallocate Env.Ints[] after one of its addresses was taken")
+ }
+ capacity *= 2
+ if capacity < min {
+ capacity = min
+ }
+ if capacity-cap(env.Ints) < minIntDelta {
+ capacity = cap(env.Ints) + minIntDelta
+ }
+ binds := make([]uint64, min, capacity)
+ copy(binds, env.Ints)
+ env.Ints = binds
+ }
+ if len(env.Ints) < min {
+ env.Ints = env.Ints[0:min:cap(env.Ints)] // does not reallocate
+ }
+ if env.IntAddressTaken {
+ c.IntBindMax = cap(env.Ints)
+ }
+ g := env.Run
+ // do NOT set g.CurrEnv = env, it messes up the call stack. done by Interp.RunExpr* and Interp.DebugExpr*
+ // g.CurrEnv = env
+ // in case we received a SigInterrupt in the meantime
+ g.Signals.Sync = SigNone
+ g.Signals.Async = SigNone
+ if g.Options&OptDebugger != 0 {
+ // for debugger
+ env.DebugComp = c
+ } else {
+ env.DebugComp = nil
+ }
+ return env
+}
+
+// ====================== Repl() and friends =====================
+
+var historyfile = Subdir(UserHomeDir(), ".gomacro_history")
+
+func (ir *Interp) ReplStdin() {
+ g := ir.Comp.CompGlobals
+
+ if g.Options&OptShowPrompt != 0 {
+ g.Fprintf(g.Stdout, `// GOMACRO, an interactive Go interpreter with macros
+// Copyright (C) 2017-2018 Massimiliano Ghilardi
+// License MPL v2.0+: Mozilla Public License version 2.0 or later
+// This is free software with ABSOLUTELY NO WARRANTY.
+//
+// Type %chelp for help
+`, g.ReplCmdChar)
+ }
+ tty, _ := MakeTtyReadline(historyfile)
+ defer tty.Close(historyfile) // restore normal tty mode
+
+ ch := StartSignalHandler(ir.Interrupt)
+ defer StopSignalHandler(ch)
+
+ savetty := g.Readline
+ g.Readline = tty
+ defer func() {
+ g.Readline = savetty
+ }()
+ tty.Term.SetWordCompleter(ir.CompleteWords)
+
+ g.Line = 0
+ for ir.ReadParseEvalPrint() {
+ g.Line = 0
+ }
+ os.Stdout.WriteString("\n")
+}
+
+func (ir *Interp) Repl(in *bufio.Reader) {
+ g := ir.Comp.CompGlobals
+
+ r := MakeBufReadline(in, g.Stdout)
+
+ ch := StartSignalHandler(ir.Interrupt)
+ defer StopSignalHandler(ch)
+
+ savetty := g.Readline
+ g.Readline = r
+ defer func() {
+ g.Readline = savetty
+ }()
+
+ for ir.ReadParseEvalPrint() {
+ }
+}
+
+func (ir *Interp) ReadParseEvalPrint() (callAgain bool) {
+ src, firstToken := ir.Read()
+ if firstToken < 0 {
+ // skip comment-only lines and continue, but fail on EOF or other errors
+ return len(src) != 0
+ }
+ return ir.ParseEvalPrint(src)
+}
+
+func (ir *Interp) ParseEvalPrint(src string) (callAgain bool) {
+ if len(src) == 0 || len(strings.TrimSpace(src)) == 0 {
+ return true // no input => no form
+ }
+
+ t1, trap, duration := ir.beforeEval()
+ defer ir.afterEval(src, &callAgain, &trap, t1, duration)
+
+ src, opt := ir.Cmd(src)
+
+ callAgain = opt&CmdOptQuit == 0
+ if len(src) == 0 || !callAgain {
+ trap = false // no panic happened
+ return callAgain
+ }
+
+ g := &ir.Comp.Globals
+ if toenable := cmdOptForceEval(g, opt); toenable != 0 {
+ defer func() {
+ g.Options |= toenable
+ }()
+ }
+
+ ir.env.Run.CmdOpt = opt // store options where Interp.Interrupt() can find them
+
+ // parse + macroexpansion
+ form := ir.Parse(src)
+
+ // compile
+ expr := ir.CompileAst(form)
+
+ // run expression
+ values, types := ir.RunExpr(expr)
+
+ // print phase
+ g.Print(values, types)
+
+ trap = false // no panic happened
+ return callAgain
+}
+
+func (ir *Interp) beforeEval() (t1 time.Time, trap bool, duration bool) {
+ g := &ir.Comp.Globals
+ trap = g.Options&OptTrapPanic != 0
+ duration = g.Options&OptShowTime != 0
+ if duration {
+ t1 = time.Now()
+ }
+ return t1, trap, duration
+}
+
+func (ir *Interp) afterEval(src string, callAgain *bool, trap *bool, t1 time.Time, duration bool) {
+ g := &ir.Comp.Globals
+ g.IncLine(src)
+ if *trap {
+ rec := recover()
+ if g.Options&OptPanicStackTrace != 0 {
+ g.Fprintf(g.Stderr, "%v\n%s", rec, debug.Stack())
+ } else {
+ g.Fprintf(g.Stderr, "%v\n", rec)
+ }
+ *callAgain = true
+ }
+ if duration {
+ delta := time.Since(t1)
+ g.Debugf("eval time %v", delta)
+ }
+}
+
+func cmdOptForceEval(g *Globals, opt CmdOpt) (toenable Options) {
+ if opt&CmdOptForceEval != 0 {
+ // temporarily disable collection of declarations and statements,
+ // and temporarily re-enable eval (i.e. disable macroexpandonly)
+ const todisable = OptMacroExpandOnly | OptCollectDeclarations | OptCollectStatements
+ if g.Options&todisable != 0 {
+ g.Options &^= todisable
+ return todisable
+ }
+ }
+ return 0
+}
+
+// implement code completion API github.com/pererh/liner.WordCompleter
+// Currently only supports global symbols and imported packages,
+// optionally followed by a dot-separated sequence of field or method names,
+// including embedded fields and wrapper methods.
+func (ir *Interp) CompleteWords(line string, pos int) (head string, completions []string, tail string) {
+ if pos > len(line) {
+ pos = len(line)
+ }
+ head = line[:pos]
+ tail = line[pos:]
+ words := strings.Split(head, ".")
+ n := len(words)
+ // find the longest sequence of ident.ident.ident...
+
+ for i := n - 1; i >= 0; i-- {
+ if i == n-1 && len(words[i]) == 0 {
+ // last word can be empty: it means TAB immediately after '.'
+ continue
+ }
+ word := tailIdentifier(words[i])
+ if len(word) != len(words[i]) {
+ if len(word) != 0 {
+ words[i] = word
+ } else {
+ i++
+ }
+ words = words[i:]
+ break
+ }
+ }
+ completions = ir.Comp.CompleteWords(words)
+ if len(completions) != 0 {
+ fixed := len(head) - len(tailIdentifier(head))
+ pos := strings.LastIndexByte(head, '.')
+ if pos >= 0 && pos >= fixed {
+ head = head[:pos+1]
+ } else {
+ head = head[:fixed]
+ }
+ }
+ return head, completions, tail
+}
+
+// implement code completion on ident.ident.ident.ident...
+func (c *Comp) CompleteWords(words []string) []string {
+ var completions []string
+ switch len(words) {
+ case 0:
+ case 1:
+ completions = c.completeWord(words[0])
+ default:
+ var node interface{}
+ if sym := c.TryResolve(words[0]); sym != nil {
+ node = &sym.Bind
+ } else if typ := c.TryResolveType(words[0]); typ != nil {
+ node = typ
+ } else {
+ break
+ }
+ completions = c.completeWords(node, words[1:])
+ }
+ return completions
+}
+
+func (c *Comp) completeWords(node interface{}, words []string) []string {
+ i, n := 0, len(words)
+ for i+1 < n {
+ switch obj := node.(type) {
+ case *Bind:
+ if obj.Const() {
+ if imp, ok := obj.Value.(*Import); ok {
+ // complete on imported package contents
+ node = imp
+ continue
+ }
+ }
+ // complete on symbol type
+ node = obj.Type
+ continue
+ case *Import:
+ if i != 0 {
+ break
+ } else if bind := obj.Binds[words[i]]; bind != nil {
+ // complete on imported package binds
+ node = bind
+ i++
+ continue
+ } else if typ := obj.Types[words[i]]; typ != nil {
+ // complete on imported package types
+ node = typ
+ i++
+ continue
+ }
+ case xr.Type:
+ field, fieldok, _, _, err := c.TryLookupFieldOrMethod(obj, words[i])
+ if err != nil {
+ break
+ } else if fieldok {
+ node = field.Type
+ i++
+ continue
+ }
+ // {type,value}.method.anything will never compile
+ }
+ return nil
+ }
+ return c.completeLastWord(node, words[i])
+}
+
+var keywords []string
+
+func init() {
+ lo, hi := token.BREAK, token.VAR+1
+ keywords = make([]string, hi-lo+1)
+ for tok := lo; tok < hi; tok++ {
+ keywords[tok-lo] = tok.String()
+ }
+ keywords[hi-lo] = "macro"
+}
+
+// complete a single, partial word
+func (c *Comp) completeWord(word string) []string {
+ var completions []string
+ if size := len(word); size != 0 {
+ // complete binds
+ for co := c; co != nil; co = co.Outer {
+ for name := range co.Binds {
+ if len(name) >= size && name[:size] == word {
+ completions = append(completions, name)
+ }
+ }
+ }
+ // complete types
+ for co := c; co != nil; co = co.Outer {
+ for name := range co.Types {
+ if len(name) >= size && name[:size] == word {
+ completions = append(completions, name)
+ }
+ }
+ }
+ // complete keywords
+ for _, name := range keywords {
+ if len(name) >= size && name[:size] == word {
+ completions = append(completions, name)
+ }
+ }
+ }
+ return sortUnique(completions)
+}
+
+// complete the last partial word of a sequence ident.ident.ident...
+func (c *Comp) completeLastWord(node interface{}, word string) []string {
+ var completions []string
+ size := len(word)
+ for {
+ switch obj := node.(type) {
+ case *Bind:
+ if obj.Const() {
+ if imp, ok := obj.Value.(*Import); ok {
+ // complete on imported package contents
+ node = imp
+ continue
+ }
+ }
+ // complete on symbol type
+ node = obj.Type
+ continue
+ case *Import:
+ for name := range obj.Binds {
+ if len(name) >= size && name[:size] == word {
+ completions = append(completions, name)
+ }
+ }
+ for name := range obj.Types {
+ if len(name) >= size && name[:size] == word {
+ completions = append(completions, name)
+ }
+ }
+ case xr.Type:
+ completions = c.listFieldsAndMethods(obj, word)
+ }
+ break
+ }
+ return sortUnique(completions)
+}
+
+// return the trailing substring of s that is a valid identifier
+func tailIdentifier(s string) string {
+ if len(s) == 0 {
+ return s
+ }
+ // work on unicode runes, not on bytes
+ chars := []rune(s)
+ var i, n = 0, len(chars)
+ var digit bool
+ for i = n - 1; i >= 0; i-- {
+ ch := chars[i]
+ if ch < 0x80 {
+ if ch >= 'A' && ch <= 'Z' || ch == '_' || ch >= 'a' && ch <= 'z' {
+ digit = false
+ } else if ch >= '0' && ch <= '9' {
+ digit = true
+ } else {
+ break
+ }
+ } else if unicode.IsLetter(ch) {
+ digit = false
+ } else if unicode.IsDigit(ch) {
+ digit = true
+ } else {
+ break
+ }
+ }
+ if digit {
+ i++
+ }
+ return string(chars[i+1:])
+}
+
+func sortUnique(vec []string) []string {
+ if n := len(vec); n > 1 {
+ sort.Strings(vec)
+ prev := vec[0]
+ j := 1
+ for i := 1; i < n; i++ {
+ if s := vec[i]; s != prev {
+ vec[j] = s
+ prev = s
+ j++
+ }
+ }
+ vec = vec[:j]
+ }
+ return vec
+}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/select.go b/vendor/github.com/cosmos72/gomacro/fast/select.go
index 561e3c5..cb4de45 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/select.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/select.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* select.go
@@ -51,7 +42,7 @@ func (c *Comp) Select(node *ast.SelectStmt, labels []string) {
}
// unnamed bind, contains received value. Nil means nothing received
- bindrecv := c.AddBind("", VarBind, c.TypeOfInterface())
+ bindrecv := c.NewBind("", VarBind, c.TypeOfInterface())
idxrecv := bindrecv.Desc.Index()
list := node.Body.List
@@ -75,7 +66,7 @@ func (c *Comp) Select(node *ast.SelectStmt, labels []string) {
}
}
chosen, recv, _ := r.Select(cases)
- env.Binds[idxrecv] = recv
+ env.Vals[idxrecv] = recv
ip := ips[chosen]
env.IP = ip
return env.Code[ip], env
@@ -116,7 +107,7 @@ func (c *Comp) selectDefault(node *ast.CommClause) selectEntry {
func (c *Comp) selectCase(clause *ast.CommClause, bind *Bind) selectEntry {
var entry selectEntry
- var nbinds [2]int
+ var nbind [2]int
stmt := clause.Comm
c2 := c
locals := false
@@ -151,7 +142,7 @@ func (c *Comp) selectCase(clause *ast.CommClause, bind *Bind) selectEntry {
entry = selectEntry{Dir: r.SelectRecv, Chan: echan.AsX1()}
if id0 != nil && id0.Name != "_" || id1 != nil && id1.Name != "_" {
- c2, locals = c.pushEnvIfFlag(&nbinds, true)
+ c2, locals = c.pushEnvIfFlag(&nbind, true)
if id0 != nil && id0.Name != "_" {
t := echan.Type.Elem()
@@ -160,11 +151,11 @@ func (c *Comp) selectCase(clause *ast.CommClause, bind *Bind) selectEntry {
if id1 != nil && id1.Name != "_" {
idx := bind.Desc.Index()
c2.DeclVar0(id1.Name, c.TypeOfBool(), c.exprBool(func(env *Env) bool {
- return env.Outer.Binds[idx].IsValid()
+ return env.Outer.Vals[idx].IsValid()
}))
}
} else if len(clause.Body) != 0 {
- c2, locals = c.pushEnvIfLocalBinds(&nbinds, clause.Body...)
+ c2, locals = c.pushEnvIfLocalBinds(&nbind, clause.Body...)
}
case token.ASSIGN:
@@ -189,22 +180,22 @@ func (c *Comp) selectCase(clause *ast.CommClause, bind *Bind) selectEntry {
}
idx := bind.Desc.Index()
c.SetPlace(place, token.ASSIGN, c.exprBool(func(env *Env) bool {
- return env.Binds[idx].IsValid()
+ return env.Vals[idx].IsValid()
}))
}
if len(clause.Body) != 0 {
- c2, locals = c.pushEnvIfLocalBinds(&nbinds, clause.Body...)
+ c2, locals = c.pushEnvIfLocalBinds(&nbind, clause.Body...)
}
}
case *ast.SendStmt:
// ch <- v
- echan := c.Expr1(node.Chan)
+ echan := c.Expr1(node.Chan, nil)
if echan.Type.Kind() != r.Chan {
c.Errorf("cannot use %v <%v> as channel in select case", node, echan.Type)
}
- esend := c.Expr1(node.Value)
+ esend := c.Expr1(node.Value, nil)
tactual := esend.Type
texpected := echan.Type.Elem()
if !tactual.AssignableTo(texpected) {
@@ -220,7 +211,7 @@ func (c *Comp) selectCase(clause *ast.CommClause, bind *Bind) selectEntry {
c2.List(clause.Body)
}
if c2 != c {
- c2.popEnvIfFlag(&nbinds, locals)
+ c2.popEnvIfFlag(&nbind, locals)
}
c.jumpOut(0, c.Loop.Break)
return entry
@@ -234,7 +225,7 @@ func (c *Comp) selectRecv(stmt ast.Stmt, node ast.Expr) *Expr {
continue
case *ast.UnaryExpr:
if expr.Op == token.ARROW {
- e := c.Expr1(expr.X)
+ e := c.Expr1(expr.X, nil)
if e.Type.Kind() != r.Chan {
c.Errorf("cannot use %v <%v> as channel in select case", node, e.Type)
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/selector.go b/vendor/github.com/cosmos72/gomacro/fast/selector.go
index f1bba1e..e704347 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/selector.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/selector.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* selector.go
@@ -41,6 +32,12 @@ func (c *Comp) SelectorExpr(node *ast.SelectorExpr) *Expr {
}
t = e.Type
eorig := e
+ name := node.Sel.Name
+ if t.Kind() == r.Ptr && t.ReflectType() == rtypeOfPtrImport && e.Const() {
+ // access symbol from imported package, for example fmt.Printf
+ imp := e.Value.(*Import)
+ return imp.selector(name, &c.Stringer)
+ }
if t.Kind() == r.Ptr && t.Elem().Kind() == r.Struct {
t = t.Elem()
fun := e.AsX1()
@@ -48,14 +45,8 @@ func (c *Comp) SelectorExpr(node *ast.SelectorExpr) *Expr {
return fun(env).Elem()
})
}
- name := node.Sel.Name
switch t.Kind() {
case r.Struct:
- if t.ReflectType() == rtypeOfImport && e.Const() {
- // access symbol from imported package, for example fmt.Printf
- imp := e.Value.(Import)
- return c.selectorImport(&imp, name)
- }
field, fieldok, mtd, mtdok := c.LookupFieldOrMethod(t, name)
if fieldok {
return c.compileField(e, field)
@@ -63,44 +54,20 @@ func (c *Comp) SelectorExpr(node *ast.SelectorExpr) *Expr {
return c.compileMethod(node, eorig, mtd)
}
default:
- // interfaces and named types can have methods, but no fields
- if t.NumMethod() != 0 {
- mtd, mtdn := c.LookupMethod(t, name)
- switch mtdn {
- case 0:
- case 1:
- return c.compileMethod(node, eorig, mtd)
- default:
- c.Errorf("type %s has %d methods %q, expression is ambiguous: %v", t, mtdn, name, node)
- }
+ // interfaces and non-struct named types can have methods, but no fields
+ mtd, mtdn := c.LookupMethod(t, name)
+ switch mtdn {
+ case 0:
+ case 1:
+ return c.compileMethod(node, eorig, mtd)
+ default:
+ c.Errorf("type %s has %d methods %q, expression is ambiguous: %v", t, mtdn, name, node)
}
}
c.Errorf("type %s has no field or method %q: %v", t, name, node)
return nil
}
-// selectorImport compiles foo.bar where 'foo' is an imported package
-func (c *Comp) selectorImport(imp *Import, name string) *Expr {
- if bind, ok := imp.Binds[name]; ok {
- t := imp.BindTypes[name]
- var value interface{}
- if bind.IsValid() && bind.CanInterface() {
- if bind.CanAddr() {
- // bind is an imported variable. do NOT extract its value, otherwise the fast interpreter
- // will (incorrectly) assume that it's a constant and will perform constant propagation
- fun := importedBindAsFun(t, bind)
- return exprFun(t, fun)
- }
- value = bind.Interface()
- } else {
- value = xr.Zero(t)
- }
- return c.exprValue(t, value)
- }
- c.Errorf("package %v %q has no symbol %s", imp.Name, imp.Path, name)
- return nil
-}
-
// selectorType compiles foo.bar where 'foo' is a type
func (c *Comp) selectorType(node *ast.SelectorExpr, t xr.Type) *Expr {
mtd, count := c.LookupMethod(t, node.Sel.Name)
@@ -114,10 +81,26 @@ func (c *Comp) selectorType(node *ast.SelectorExpr, t xr.Type) *Expr {
// lookup fields and methods at the same time... it's and error if both exist at the same depth
func (c *Comp) LookupFieldOrMethod(t xr.Type, name string) (xr.StructField, bool, xr.Method, bool) {
+ field, fieldok, mtd, mtdok, err := c.TryLookupFieldOrMethod(t, name)
+ if err != nil {
+ c.Error(err)
+ }
+ return field, fieldok, mtd, mtdok
+}
+
+// lookup fields and methods at the same time... it's and error if both exist at the same depth
+func (c *Comp) TryLookupFieldOrMethod(t xr.Type, name string) (xr.StructField, bool, xr.Method, bool, error) {
field, fieldn := c.LookupField(t, name)
mtd, mtdn := c.LookupMethod(t, name)
+ if c.Options&OptDebugField != 0 {
+ c.Debugf("LookupFieldOrMethod for %v.%v found %d fields: %#v", t, name, fieldn, field)
+ }
+ if c.Options&OptDebugMethod != 0 {
+ c.Debugf("LookupFieldOrMethod for %v.%v found %d methods: %#v", t, name, mtdn, mtd)
+ }
fielddepth := len(field.Index)
mtddepth := len(mtd.FieldIndex) + 1
+ var err error
if fieldn != 0 && mtdn != 0 {
if fielddepth < mtddepth {
// prefer the field
@@ -126,16 +109,59 @@ func (c *Comp) LookupFieldOrMethod(t xr.Type, name string) (xr.StructField, bool
// prefer the method
fieldn = 0
} else {
- c.Errorf("type %v has %d field(s) and %d method(s) named %q at depth %d",
+ err = c.MakeRuntimeError("type %v has %d field(s) and %d method(s) named %q at depth %d",
t, fieldn, mtdn, name, fielddepth)
}
}
if fieldn > 1 {
- c.Errorf("type %v has %d fields named %q at depth %d", t, fieldn, name, fielddepth)
+ err = c.MakeRuntimeError("type %v has %d fields named %q at depth %d", t, fieldn, name, fielddepth)
} else if mtdn > 1 {
- c.Errorf("type %v has %d methods named %q at depth %d", t, mtdn, name, mtddepth)
+ err = c.MakeRuntimeError("type %v has %d methods named %q at depth %d", t, mtdn, name, mtddepth)
+ }
+ if err != nil {
+ return field, fieldn == 1, mtd, mtdn == 1, err
}
- return field, fieldn == 1, mtd, mtdn == 1
+ return field, fieldn == 1, mtd, mtdn == 1, nil
+}
+
+// list direct and embedded field names that start with prefix,
+// and explicit and wrapper methods that start with prefix
+func (c *Comp) listFieldsAndMethods(t xr.Type, prefix string) []string {
+ var names []string
+ size := len(prefix)
+
+ collectMethods := func(typ xr.Type) {
+ if t.Kind() == r.Ptr {
+ t = t.Elem()
+ if t.Kind() == r.Interface {
+ // ignore pointer-to-interface
+ return
+ }
+ }
+ for i, n := 0, typ.NumMethod(); i < n; i++ {
+ if name := typ.Method(i).Name; len(name) >= size && name[:size] == prefix {
+ names = append(names, name)
+ }
+ }
+ }
+ if t.Kind() == r.Ptr {
+ t = t.Elem()
+ if t.Kind() == r.Interface {
+ // ignore pointer-to-interface
+ return nil
+ }
+ }
+ collectMethods(t)
+ if t.Kind() == r.Struct {
+ size := len(prefix)
+ c.Universe.VisitFields(t, func(field xr.StructField) {
+ if name := field.Name; len(name) >= size && name[:size] == prefix {
+ names = append(names, name)
+ }
+ collectMethods(field.Type)
+ })
+ }
+ return names
}
// LookupField performs a breadth-first search for struct field with given name
@@ -148,8 +174,8 @@ func (c *Comp) LookupMethod(t xr.Type, name string) (mtd xr.Method, numfound int
return t.MethodByName(name, c.FileComp().Path)
}
-// field1 isa variand of reflect.Value.Field, also accepts pointer values
-// and dereferences pointer ONLY if index is negative (actually used index will be ^x)
+// field0 is a variant of reflect.Value.Field, also accepts pointer values
+// and dereferences pointer ONLY if index < 0 (actually used index will be ^index)
func field0(v r.Value, index int) r.Value {
if index < 0 {
v = v.Elem()
@@ -159,35 +185,47 @@ func field0(v r.Value, index int) r.Value {
}
// fieldByIndex is a variant of reflect.Value.FieldByIndex, also accepts pointer values
-// and dereferences pointers ONLY if index[i] is negative (actually used index will be ^x)
+// and dereferences pointers ONLY if index[i] < 0 (actually used index will be ^index[i])
func fieldByIndex(v r.Value, index []int) r.Value {
for _, x := range index {
if x < 0 {
- v = v.Elem()
x = ^x
+ v = v.Elem()
}
v = v.Field(x)
}
return v
}
-func (c *Comp) compileField(e *Expr, field xr.StructField) *Expr {
- objfun := e.AsX1()
- t := e.Type
- var fun I
+// descend embedded fields, detect any pointer-to-struct that must be dereferenced
+func descendEmbeddedFields(t xr.Type, field xr.StructField) []int {
index := field.Index
-
- // descend embedded fields
- for i, x := range index {
- if t.Kind() == r.Ptr && t.Elem().Kind() == r.Struct {
- // embedded field (or initial value) is a pointer, dereference it.
+ n := len(index)
+ var copied bool
+
+ for i, x := range field.Index {
+ // dereference pointer-to-struct
+ if t.Kind() == r.Ptr {
+ if !copied {
+ // make a copy before modifying it
+ index = make([]int, n)
+ copy(index, field.Index)
+ copied = true
+ }
+ index[i] = ^x // remember we will need a dereference at runtime
t = t.Elem()
- index[i] = ^x // remember we neeed a pointer dereference at runtime
}
t = t.Field(x).Type
}
+ return index
+}
+
+func (c *Comp) compileField(e *Expr, field xr.StructField) *Expr {
+ objfun := e.AsX1()
+ index := descendEmbeddedFields(e.Type, field)
+ t := field.Type
+ var fun I
- t = field.Type
// c.Debugf("compileField: field=%#v", field)
if len(index) == 1 {
index0 := index[0]
@@ -416,46 +454,258 @@ func (c *Comp) removeFirstParam(t xr.Type) xr.Type {
return c.Universe.FuncOf(params, results, t.IsVariadic())
}
-// compileMethod compiles a method call.
+// compileMethod compiles expr.method
// relatively slow, but simple: return a closure with the receiver already bound
func (c *Comp) compileMethod(node *ast.SelectorExpr, e *Expr, mtd xr.Method) *Expr {
- fieldindex := mtd.FieldIndex
- t := e.Type
- indirect := false // executed a dereference ?
+ obj2method := c.compileObjGetMethod(e.Type, mtd)
+ fun := e.AsX1()
+ tclosure := c.removeFirstParam(mtd.Type)
+
+ return exprX1(tclosure, func(env *Env) r.Value {
+ return obj2method(fun(env))
+ })
+}
+
+// create and return a function that, given a reflect.Value, returns its method specified by mtd
+func (c *Comp) compileObjGetMethod(t xr.Type, mtd xr.Method) (ret func(r.Value) r.Value) {
+ if c.Options&OptDebugMethod != 0 {
+ c.Debugf("compileObjGetMethod for %v.%v: method is %#v", t, mtd.Name, mtd)
+ }
+ index := mtd.Index
+ tfunc := mtd.Type
+ rtclosure := c.removeFirstParam(tfunc).ReflectType()
+
+ tfield, fieldindex, addressof, deref := c.computeMethodFieldIndex(t, mtd)
+ rtfield := tfield.ReflectType()
+
+ rmtd, ok := rtfield.MethodByName(mtd.Name)
+
+ if ok && xr.QName1(tfield) == xr.QName1(rtfield) && c.compatibleMethodType(tfield, mtd, rmtd) {
+ // closures for methods declared by compiled code are available
+ // simply with reflect.Value.Method(index). Easy.
+ index := rmtd.Index
+
+ switch len(fieldindex) {
+ case 0:
+ if addressof {
+ ret = func(obj r.Value) r.Value {
+ return obj.Addr().Method(index)
+ }
+ } else if deref {
+ ret = func(obj r.Value) r.Value {
+ return obj.Elem().Method(index)
+ }
+ } else {
+ ret = func(obj r.Value) r.Value {
+ return obj.Method(index)
+ }
+ }
+ case 1:
+ fieldindex := fieldindex[0]
+ ret = func(obj r.Value) r.Value {
+ return field0(obj, fieldindex)
+ return obj.Method(index)
+ }
+ default:
+ ret = func(obj r.Value) r.Value {
+ obj = fieldByIndex(obj, fieldindex)
+ return obj.Method(index)
+ }
+ }
+ } else {
+ tname := t.Name()
+ methodname := mtd.Name
+
+ if c.Options&OptDebugMethod != 0 {
+ c.Debugf("compiling method %v.%s: method declared by interpreted code, manually building the closure",
+ tname, methodname)
+ }
+ // method declared by interpreted code, manually build the closure.
+ //
+ // It's not possible to call r.MakeFunc() only once at compile-time,
+ // because the closure passed to it needs access to a variable holding the receiver.
+ // such variable would be allocated only once at compile-time,
+ // not once per goroutine!
+ funs := mtd.Funs
+ nin := tfunc.NumIn()
+ variadic := tfunc.IsVariadic()
+
+ if funs == nil {
+ c.Errorf("method declared but not yet implemented: %s.%s", tname, methodname)
+ } else if len(*funs) <= index || (*funs)[index].Kind() != r.Func {
+ // c.Warnf("method declared but not yet implemented: %s.%s", tname, methodname)
+ }
+ // Go compiled code crashes when extracting a method from nil interface,
+ // NOT later when calling the method.
+ //
+ // On the other hand, Go compiled code can extract methods from a nil pointer to named type,
+ // and it will crash later calling the method ONLY if the method implementation dereferences the receiver.
+ //
+ // Reproduce the same behaviour
+ if t.Kind() == r.Interface {
+ ret = compileInterfaceGetMethod(fieldindex, deref, index)
+ } else {
+ switch len(fieldindex) {
+ case 0:
+ ret = func(obj r.Value) r.Value {
+ if addressof {
+ obj = obj.Addr()
+ } else if deref {
+ obj = obj.Elem()
+ }
+ fun := (*funs)[index] // retrieve the function as soon as possible (early bind)
+ if fun == Nil {
+ Errorf("method is declared but not yet implemented: %s.%s", tname, methodname)
+ }
+ return r.MakeFunc(rtclosure, func(args []r.Value) []r.Value {
+ fullargs := make([]r.Value, nin)
+ fullargs[0] = obj
+ copy(fullargs[1:], args)
+ // Debugf("invoking <%v> with args %v", fun.Type(), fullargs
+ if variadic {
+ return fun.CallSlice(fullargs)
+ } else {
+ return fun.Call(fullargs)
+ }
+ })
+ }
+ case 1:
+ fieldindex := fieldindex[0]
+ ret = func(obj r.Value) r.Value {
+ obj = field0(obj, fieldindex)
+ // Debugf("invoking method <%v> on receiver <%v> (addressof=%t, deref=%t)", (*funs)[index].Type(), obj.Type(), addressof, deref)
+ if addressof {
+ obj = obj.Addr()
+ } else if deref {
+ obj = obj.Elem()
+ }
+ fun := (*funs)[index] // retrieve the function as soon as possible (early bind)
+ if fun == Nil {
+ Errorf("method is declared but not yet implemented: %s.%s", tname, methodname)
+ }
+ return r.MakeFunc(rtclosure, func(args []r.Value) []r.Value {
+ fullargs := make([]r.Value, nin)
+ fullargs[0] = obj
+ copy(fullargs[1:], args)
+ // Debugf("invoking <%v> with args %v", fun.Type(), fullargs)
+ if variadic {
+ return fun.CallSlice(fullargs)
+ } else {
+ return fun.Call(fullargs)
+ }
+ })
+ }
+ default:
+ ret = func(obj r.Value) r.Value {
+ obj = fieldByIndex(obj, fieldindex)
+ if addressof {
+ obj = obj.Addr()
+ } else if deref {
+ obj = obj.Elem()
+ }
+ fun := (*funs)[index] // retrieve the function as soon as possible (early bind)
+ if fun == Nil {
+ Errorf("method is declared but not yet implemented: %s.%s", tname, methodname)
+ }
+ return r.MakeFunc(rtclosure, func(args []r.Value) []r.Value {
+ fullargs := make([]r.Value, nin)
+ fullargs[0] = obj
+ copy(fullargs[1:], args)
+ // Debugf("invoking <%v> with args %v", fun.Type(), fullargs)
+ if variadic {
+ return fun.CallSlice(fullargs)
+ } else {
+ return fun.Call(fullargs)
+ }
+ })
+ }
+ }
+ }
+ }
+ return ret
+}
+
+// return true if t is not an interface and mtd.Type().ReflectType() == rmtd.Type,
+// or if t is an interface and rmtd.Type is the same as mtd.Type().ReflectType() _minus_ the receiver
+func (c *Comp) compatibleMethodType(t xr.Type, mtd xr.Method, rmtd r.Method) bool {
+ rt1 := mtd.Type.ReflectType()
+ rt2 := rmtd.Type
+ if t.Kind() != r.Interface {
+ return rt1 == rt2
+ }
+ return rt1.NumIn()-1 == rt2.NumIn() && c.removeFirstParam(mtd.Type).ReflectType() == rt2
+}
+
+func compileInterfaceGetMethod(fieldindex []int, deref bool, index int) func(r.Value) r.Value {
+ switch len(fieldindex) {
+ case 0:
+ return func(obj r.Value) r.Value {
+ if deref {
+ obj = obj.Elem()
+ }
+ return xr.EmulatedInterfaceGetMethod(obj, index)
+ }
+ case 1:
+ fieldindex := fieldindex[0]
+ return func(obj r.Value) r.Value {
+ obj = field0(obj, fieldindex)
+ if deref {
+ obj = obj.Elem()
+ }
+ return xr.EmulatedInterfaceGetMethod(obj, index)
+ }
+ default:
+ return func(obj r.Value) r.Value {
+ obj = fieldByIndex(obj, fieldindex)
+ if deref {
+ obj = obj.Elem()
+ }
+ return xr.EmulatedInterfaceGetMethod(obj, index)
+ }
+ }
+}
+
+// compute and return the dereferences and addressof to perform while descending
+// the embedded fields described by mtd.FieldIndex []int
+// also check that addressof will be performed on addressable fields
+func (c *Comp) computeMethodFieldIndex(t xr.Type, mtd xr.Method) (fieldtype xr.Type, fieldindex []int, addressof bool, deref bool) {
+ fieldindex = mtd.FieldIndex
+ var copied, indirect bool
// descend embedded fields
- for i, index := range fieldindex {
- if t.Kind() == r.Ptr && t.Elem().Kind() == r.Struct {
+ for i, x := range mtd.FieldIndex {
+ if t.Kind() == r.Ptr {
// embedded field (or initial value) is a pointer, dereference it.
t = t.Elem()
indirect = true
- fieldindex[i] = ^index // remember we neeed a pointer dereference at runtime
+ if !copied {
+ copied = true
+ fieldindex = make([]int, len(mtd.FieldIndex))
+ copy(fieldindex, mtd.FieldIndex)
+ }
+ fieldindex[i] = ^x // remember we need a pointer dereference at runtime
}
- t = t.Field(index).Type
+ t = t.Field(x).Type
}
- index := mtd.Index
- rtype := t.ReflectType()
tfunc := mtd.Type
- tclosure := c.removeFirstParam(tfunc)
- rtclosure := tclosure.ReflectType()
trecv := tfunc.In(0)
objPointer := t.Kind() == r.Ptr // field is pointer?
recvPointer := trecv.Kind() == r.Ptr // method with pointer receiver?
- addressof := !objPointer && recvPointer
- deref := objPointer && !recvPointer
+ addressof = !objPointer && recvPointer
+ deref = objPointer && !recvPointer
debug := c.Options&OptDebugMethod != 0
if debug {
- c.Debugf("compiling method %v: receiver is <%v>, value is <%v>", node, trecv, t)
+ c.Debugf("compiling method %v.%v", t.Name(), mtd.Name)
}
if t.AssignableTo(trecv) {
addressof = false
deref = false
if debug {
- c.Debugf("compiling method %v: value is assignable to receiver", node)
+ c.Debugf("compiling method %v.%v: value is assignable to receiver", t.Name(), mtd.Name)
}
- } else if addressof && xr.PtrTo(t).AssignableTo(trecv) {
+ } else if addressof && c.Universe.PtrTo(t).AssignableTo(trecv) {
// c.Debugf("method call <%v> will take address of receiver <%v>", tfunc, t)
// ensure receiver is addressable. maybe it was simply dereferenced by Comp.SelectorExpr
// or maybe we need to explicitly take its address
@@ -464,145 +714,41 @@ func (c *Comp) compileMethod(node *ast.SelectorExpr, e *Expr, mtd xr.Method) *Ex
// easy, we dereferenced some expression while descending embedded fields
// so the receiver is addressable
if debug {
- c.Debugf("compiling method %v: address-of-value is assignable to receiver", node)
+ c.Debugf("compiling method %v.%v: address-of-value is assignable to receiver", t.Name(), mtd.Name)
}
} else {
// even easier, the initial expression already contains the address we want
addressof = false
if debug {
- c.Debugf("compiling method %v: value was initially an address", node)
+ c.Debugf("compiling method %v.%v: value was initially an address", t.Name(), mtd.Name)
}
}
} else {
// manually compile "& receiver_expression"
if debug {
- c.Debugf("compiling method %v: compiling address-of-value", node)
- }
- if len(fieldindex) != 0 {
- // must execute address-of-field at runtime, just check that struct is addressable
- c.addressOf(node.X)
- } else {
- e = c.addressOf(node.X)
- addressof = false
- }
+ c.Debugf("compiling method %v.%v: compiling address-of-value", t.Name(), mtd.Name)
+ }
+ // FIXME restore and complete these addressability checks
+ /*
+ if len(index) != 0 {
+ // must execute addressof at runtime, just check that struct is addressable
+ c.addressOf(node.X)
+ } else {
+ e = c.addressOf(node.X)
+ addressof = false
+ }
+ */
}
+ t = c.Universe.PtrTo(t)
} else if deref && t.Elem().AssignableTo(trecv) {
+ t = t.Elem()
if debug {
c.Debugf("method call <%v> will dereference receiver <%v>", tfunc, t)
}
} else {
c.Errorf("cannot use <%v> as <%v> in receiver of method <%v>", t, trecv, tfunc)
}
-
- objfun := e.AsX1()
- var ret func(env *Env) r.Value
-
- if t.NumMethod() == rtype.NumMethod() && t.Named() && xr.QName1(t) == xr.QName1(rtype) {
- // closures for methods declared by compiled code are available
- // simply with reflect.Value.Method(index). Easy.
- switch len(fieldindex) {
- case 0:
- ret = func(env *Env) r.Value {
- obj := objfun(env)
- return obj.Method(index)
- }
- case 1:
- fieldindex := fieldindex[0]
- ret = func(env *Env) r.Value {
- obj := objfun(env)
- obj = field0(obj, fieldindex)
- return obj.Method(index)
- }
- default:
- ret = func(env *Env) r.Value {
- obj := objfun(env)
- obj = fieldByIndex(obj, fieldindex)
- return obj.Method(index)
- }
- }
- } else {
- // method declared by interpreted code, manually build the closure.
- //
- // It's not possible to call r.MakeFunc() only once at compile-time,
- // because the closure passed to it needs access to a variable holding the receiver.
- // such variable would be allocated only once at compile-time,
- // not once per goroutine!
- funs := mtd.Funs
- nin := tfunc.NumIn()
-
- tname := t.Name()
- methodname := mtd.Name
- if funs == nil {
- c.Errorf("method declared but not yet implemented: %s.%s", tname, methodname)
- } else if len(*funs) <= index || (*funs)[index].Kind() != r.Func {
- // c.Warnf("method declared but not yet implemented: %s.%s", tname, methodname)
- }
-
- switch len(fieldindex) {
- case 0:
- ret = func(env *Env) r.Value {
- obj := objfun(env)
- if addressof {
- obj = obj.Addr()
- } else if deref {
- obj = obj.Elem()
- }
- fun := (*funs)[index] // retrieve the function as soon as possible (early bind)
- if fun == Nil {
- Errorf("method is declared but not yet implemented: %s.%s", tname, methodname)
- }
-
- return r.MakeFunc(rtclosure, func(args []r.Value) []r.Value {
- fullargs := make([]r.Value, nin)
- fullargs[0] = obj
- copy(fullargs[1:], args)
- // Debugf("invoking <%v> with args %v", fun.Type(), fullargs)
- return fun.Call(fullargs)
- })
- }
- case 1:
- fieldindex := fieldindex[0]
- ret = func(env *Env) r.Value {
- obj := objfun(env)
- obj = field0(obj, fieldindex)
- // Debugf("invoking method <%v> on receiver <%v> (addressof=%t, deref=%t)", (*funs)[index].Type(), obj.Type(), addressof, deref)
- if addressof {
- obj = obj.Addr()
- } else if deref {
- obj = obj.Elem()
- }
- fun := (*funs)[index] // retrieve the function as soon as possible (early bind)
-
- return r.MakeFunc(rtclosure, func(args []r.Value) []r.Value {
- fullargs := make([]r.Value, nin)
- fullargs[0] = obj
- copy(fullargs[1:], args)
- // Debugf("invoking <%v> with args %v", fun.Type(), fullargs)
- return fun.Call(fullargs)
- })
- }
- default:
- ret = func(env *Env) r.Value {
- obj := objfun(env)
- obj = fieldByIndex(obj, fieldindex)
- if addressof {
- obj = obj.Addr()
- } else if deref {
- obj = obj.Elem()
- }
- fun := (*funs)[index] // retrieve the function as soon as possible (early bind)
-
- return r.MakeFunc(rtclosure, func(args []r.Value) []r.Value {
- fullargs := make([]r.Value, nin)
- fullargs[0] = obj
- copy(fullargs[1:], args)
- // Debugf("invoking <%v> with args %v", fun.Type(), fullargs)
- return fun.Call(fullargs)
- })
- }
- }
- }
- return exprX1(tclosure, ret)
+ return t, fieldindex, addressof, deref
}
// compileMethodAsFunc compiles a method as a function, for example time.Duration.String.
@@ -610,15 +756,21 @@ func (c *Comp) compileMethod(node *ast.SelectorExpr, e *Expr, mtd xr.Method) *Ex
func (c *Comp) compileMethodAsFunc(t xr.Type, mtd xr.Method) *Expr {
tsave := t
fieldindex := mtd.FieldIndex
+ var copied bool
// descend embedded fields
- for i, index := range fieldindex {
+ for i, x := range mtd.FieldIndex {
if t.Kind() == r.Ptr && t.Elem().Kind() == r.Struct {
// embedded field (or initial value) is a pointer, dereference it.
+ if !copied {
+ copied = true
+ fieldindex = make([]int, len(mtd.FieldIndex))
+ copy(fieldindex, mtd.FieldIndex)
+ }
+ fieldindex[i] = ^x // remember we neeed a pointer dereference at runtime
t = t.Elem()
- fieldindex[i] = ^index // remember we neeed a pointer dereference at runtime
}
- t = t.Field(index).Type
+ t = t.Field(x).Type
}
index := mtd.Index
@@ -635,7 +787,7 @@ func (c *Comp) compileMethodAsFunc(t xr.Type, mtd xr.Method) *Expr {
if recvPointer {
// receiver is pointer-to-tsave
if tsave.Kind() != r.Ptr {
- tsave = xr.PtrTo(tsave)
+ tsave = c.Universe.PtrTo(tsave)
if len(fieldindex) != 0 && fieldindex[0] >= 0 {
// remember we neeed a pointer dereference at runtime
fieldindex[0] = ^fieldindex[0]
@@ -780,13 +932,20 @@ func (c *Comp) compileMethodAsFunc(t xr.Type, mtd xr.Method) *Expr {
return c.exprValue(tfunc, ret.Interface())
}
-// SelectorPlace compiles a.b returning a settable and addressable Place
+// SelectorPlace compiles a.b returning a settable and/or addressable Place
func (c *Comp) SelectorPlace(node *ast.SelectorExpr, opt PlaceOption) *Place {
- obje := c.Expr1(node.X)
+ obje := c.Expr1(node.X, nil)
te := obje.Type
name := node.Sel.Name
+ if te.ReflectType() == rtypeOfPtrImport && obje.Const() {
+ // access settable and/or addressable variable from imported package, for example os.Stdout
+ imp := obje.Value.(*Import)
+ return imp.selectorPlace(c, name, opt)
+ }
+ ispointer := false
switch te.Kind() {
case r.Ptr:
+ ispointer = true
te = te.Elem()
if te.Kind() != r.Struct {
break
@@ -799,11 +958,6 @@ func (c *Comp) SelectorPlace(node *ast.SelectorExpr, opt PlaceOption) *Place {
})
fallthrough
case r.Struct:
- if te.ReflectType() == rtypeOfImport && obje.Const() {
- // access symbol from imported package, for example fmt.Printf
- imp := obje.Value.(Import)
- return c.selectorPlaceImport(&imp, name, opt)
- }
field, fieldn := c.LookupField(te, name)
if fieldn == 0 {
break
@@ -811,9 +965,9 @@ func (c *Comp) SelectorPlace(node *ast.SelectorExpr, opt PlaceOption) *Place {
c.Errorf("type %v has %d fields named %q, all at depth %d", te, fieldn, name, len(field.Index))
return nil
}
- // if te.Kind() == r.Ptr, field is automatically settable and addressable
+ // if ispointer, field is automatically settable and addressable
// because the 'a' in 'a.b' is actually a pointer
- if te.Kind() == r.Struct {
+ if !ispointer {
c.checkAddressableField(node)
}
return c.compileFieldPlace(obje, field)
@@ -822,29 +976,6 @@ func (c *Comp) SelectorPlace(node *ast.SelectorExpr, opt PlaceOption) *Place {
return nil
}
-// selectorImport compiles pkgname.varname returning a settable and/or addressable Place
-func (c *Comp) selectorPlaceImport(imp *Import, name string, opt PlaceOption) *Place {
- if bind, ok := imp.Binds[name]; ok {
- // a settable reflect.Value is always addressable.
- // the converse is not guaranteed: unexported fields can be addressed but not set.
- // see implementation of reflect.Value.CanAddr() and reflect.Value.CanSet() for details
- if bind.IsValid() && bind.CanAddr() {
- return &Place{
- Var: Var{Type: imp.BindTypes[name]},
- Fun: func(*Env) r.Value {
- return bind
- },
- Addr: func(*Env) r.Value {
- return bind.Addr()
- },
- }
- }
- c.Errorf("%s %s %s.%s", opt, bind.Kind(), imp.Name, name)
- }
- c.Errorf("package %v %q has no symbol %s", imp.Name, imp.Path, name)
- return nil
-}
-
// checkSettableField check that a struct field is settable and addressable.
// by Go specs, this requires the struct itself to be settable and addressable.
func (c *Comp) checkAddressableField(node *ast.SelectorExpr) {
@@ -856,16 +987,17 @@ func (c *Comp) checkAddressableField(node *ast.SelectorExpr) {
c.Errorf("cannot assign to %v\n\t%v", node, rec)
}
}()
- c.placeOrAddress(node.X, PlaceAddress)
+ c.placeOrAddress(node.X, PlaceAddress, nil)
panicking = false
}
func (c *Comp) compileFieldPlace(obje *Expr, field xr.StructField) *Place {
// c.Debugf("compileFieldPlace: field=%#v", field)
objfun := obje.AsX1()
+ index := descendEmbeddedFields(obje.Type, field)
t := field.Type
var fun, addr func(*Env) r.Value
- index := field.Index
+
if len(index) == 1 {
index0 := index[0]
fun = func(env *Env) r.Value {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/slice.go b/vendor/github.com/cosmos72/gomacro/fast/slice.go
index 828711d..3f8f99c 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/slice.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/slice.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* slice.go
@@ -28,13 +19,11 @@ package fast
import (
"go/ast"
r "reflect"
-
- xr "github.com/cosmos72/gomacro/xreflect"
)
// SliceExpr compiles slice[lo:hi] and slice[lo:hi:max]
func (c *Comp) SliceExpr(node *ast.SliceExpr) *Expr {
- e := c.Expr1(node.X)
+ e := c.Expr1(node.X, nil)
if e.Const() {
e.ConstTo(e.DefaultType())
}
@@ -52,7 +41,7 @@ func (c *Comp) SliceExpr(node *ast.SliceExpr) *Expr {
}
// constant propagation
if e.Const() && (lo == nil || lo.Const()) && (hi == nil || hi.Const()) && (max == nil || max.Const()) {
- ret.EvalConst(OptKeepUntyped)
+ ret.EvalConst(COptKeepUntyped)
}
return ret
}
@@ -61,7 +50,7 @@ func (c *Comp) sliceIndex(node ast.Expr) *Expr {
if node == nil {
return nil
}
- idx := c.Expr1(node)
+ idx := c.Expr1(node, nil)
if idx.Const() {
idx.ConstTo(c.TypeOfInt())
if idx.Value.(int) < 0 {
@@ -143,7 +132,7 @@ func (c *Comp) slice2(node *ast.SliceExpr, e, lo, hi *Expr) *Expr {
}
}
}
- tout := xr.SliceOf(t.Elem())
+ tout := c.Universe.SliceOf(t.Elem())
return exprX1(tout, fun)
}
c.Errorf("cannot slice %v: %v", t, node)
@@ -265,7 +254,7 @@ func (c *Comp) slice3(node *ast.SliceExpr, e, lo, hi, max *Expr) *Expr {
return obj.Slice3(lo, hi, max)
}
}
- tout := xr.SliceOf(t.Elem())
+ tout := c.Universe.SliceOf(t.Elem())
return exprX1(tout, fun)
}
c.Errorf("cannot slice %v: %v", t, node)
@@ -279,6 +268,6 @@ func (c *Comp) sliceArrayMustBeAddressable(node *ast.SliceExpr, e *Expr) {
c.Errorf("cannot slice: array must be addressable: %v <%v>", node, e.Type)
}
}()
- c.placeOrAddress(node.X, PlaceAddress)
+ c.placeOrAddress(node.X, PlaceAddress, nil)
panicking = false
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/statement.go b/vendor/github.com/cosmos72/gomacro/fast/statement.go
index b16f7ab..3984575 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/statement.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/statement.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* statement.go
@@ -32,6 +23,7 @@ import (
"sort"
. "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/gls"
)
func stmtNop(env *Env) (Stmt, *Env) {
@@ -48,9 +40,14 @@ func popEnv(env *Env) (Stmt, *Env) {
func (c *Comp) Stmt(in ast.Stmt) {
var labels []string
+ // DebugSource // codelen := len(c.Code.List)
for {
if in != nil {
c.Pos = in.Pos()
+ if isBreakpoint(in) {
+ c.append(c.breakpoint())
+ break
+ }
}
switch node := in.(type) {
case nil:
@@ -71,7 +68,7 @@ func (c *Comp) Stmt(in ast.Stmt) {
case *ast.EmptyStmt:
// nothing to do
case *ast.ExprStmt:
- expr := c.Expr(node.X)
+ expr := c.Expr(node.X, nil)
if !expr.Const() {
c.Append(expr.AsStmt(), in.Pos())
}
@@ -84,7 +81,16 @@ func (c *Comp) Stmt(in ast.Stmt) {
case *ast.IncDecStmt:
c.IncDec(node)
case *ast.LabeledStmt:
- labels = append(labels, node.Label.Name)
+ label := node.Label.Name
+ labels = append(labels, label)
+ ip := c.Code.Len()
+ if c.Labels == nil {
+ c.Labels = map[string]*int{label: &ip}
+ } else if addr := c.Labels[label]; addr != nil {
+ *addr = ip
+ } else {
+ c.Labels[label] = &ip
+ }
in = node.Stmt
continue
case *ast.RangeStmt:
@@ -100,9 +106,62 @@ func (c *Comp) Stmt(in ast.Stmt) {
case *ast.TypeSwitchStmt:
c.TypeSwitch(node, labels)
default:
- c.Errorf("unimplemented statement: %v <%v>", node, r.TypeOf(node))
+ c.Errorf("unimplemented statement: %v // %T", node, node)
+ }
+ break
+ }
+ // DebugSource // c.showStatementsSource(in, codelen)
+}
+
+/* DebugSource */
+func (c *Comp) showStatementsSource(in ast.Stmt, startIP int) {
+ n1, n2 := len(c.Code.List), len(c.Code.DebugPos)
+ if n1 != n2 {
+ c.Warnf("code mismatch: len(c.Code.List) = %d differs from len(c.Code.DebugPos) = %d",
+ n1, n2)
+ }
+ g := &c.Globals
+ g.Fprintf(g.Stdout, "source for statement: %v // %T\n", in, in)
+ for ip := startIP; ip < n2; ip++ {
+ c.showStatementSource(ip)
+ }
+}
+
+/* DebugSource */
+func (c *Comp) showStatementSource(ip int) {
+ code := c.Code
+ list := code.List
+ debugp := code.DebugPos
+ g := &c.Globals
+ if ip < len(debugp) && g.Fileset != nil {
+ p := debugp[ip]
+ source, pos := g.Fileset.Source(p)
+ if ip < len(list) {
+ g.Fprintf(g.Stdout, "IP = % 3d: statement %p at [% 3d] %s\n", ip, list[ip], p, pos)
+ } else {
+ g.Fprintf(g.Stdout, "IP = % 3d: unknown statement at [% 3d] %s\n", ip, p, pos)
+ }
+ if len(source) != 0 {
+ g.Fprintf(g.Stdout, "%s\n", source)
+ c.showCaret(source, pos.Column)
}
- return
+ }
+}
+
+var spaces = []byte(" ")
+
+func (c *Comp) showCaret(source string, col int) {
+ col--
+ n := len(source)
+ if col >= 0 && col < n && n >= 3 {
+ out := c.Globals.Stdout
+ chunk := len(spaces)
+ for col >= chunk {
+ out.Write(spaces)
+ col -= chunk
+ }
+ out.Write(spaces[:col])
+ out.Write([]byte("^^^\n"))
}
}
@@ -141,10 +200,8 @@ func (c *Comp) Branch(node *ast.BranchStmt) {
c.Continue(node)
case token.FALLTHROUGH:
c.misplacedFallthrough()
- /*
- case token.GOTO:
- c.Goto(node)
- */
+ case token.GOTO:
+ c.Goto(node)
default:
c.Errorf("unimplemented branch statement: %v <%v>", node, r.TypeOf(node))
}
@@ -200,13 +257,32 @@ func (c *Comp) Continue(node *ast.BranchStmt) {
}
}
+// Goto compiles a "goto" statement
+func (c *Comp) Goto(node *ast.BranchStmt) {
+ if node.Label == nil {
+ c.Errorf("goto without label: %v", node)
+ }
+ label := node.Label.Name
+ upn := 0
+ // do not cross function boundaries
+ for o := c; o != nil && o.Func == nil; o = o.Outer {
+ if ip := o.Labels[label]; ip != nil {
+ // only keep a reference to the jump target, NOT TO THE WHOLE *Comp!
+ c.jumpOut(upn, ip)
+ return
+ }
+ upn += o.UpCost // count how many Env:s we must exit at runtime
+ }
+ c.Errorf("goto label not found: %v", label)
+}
+
// Defer compiles a "defer" statement
func (c *Comp) Defer(node *ast.DeferStmt) {
call := c.prepareCall(node.Call, nil)
fun := call.Fun.AsX1()
argfuns := call.MakeArgfunsX1()
ellipsis := call.Ellipsis
- c.append(func(env *Env) (Stmt, *Env) {
+ c.Append(func(env *Env) (Stmt, *Env) {
// Go specs: arguments of a defer call are evaluated immediately.
// the call itself is executed when the function containing defer returns,
// either normally or with a panic
@@ -223,19 +299,19 @@ func (c *Comp) Defer(node *ast.DeferStmt) {
args[i] = v
}
env.IP++
- g := env.ThreadGlobals
+ run := env.Run
if ellipsis {
- g.InstallDefer = func() {
+ run.InstallDefer = func() {
f.CallSlice(args)
}
} else {
- g.InstallDefer = func() {
+ run.InstallDefer = func() {
f.Call(args)
}
}
- g.Signal = SigDefer
- return g.Interrupt, env
- })
+ run.Signals.Sync = SigDefer
+ return run.Interrupt, env
+ }, node.Pos())
c.Code.WithDefers = true
}
@@ -289,7 +365,7 @@ func (c *Comp) For(node *ast.ForStmt, labels []string) {
}
flag, fun, err := true, (func(*Env) bool)(nil), false // "for { }" without a condition means "for true { }"
if node.Cond != nil {
- pred := c.Expr(node.Cond)
+ pred := c.Expr(node.Cond, nil)
flag, fun, err = pred.TryAsPred()
if err {
c.invalidPred(node.Cond, pred)
@@ -345,7 +421,7 @@ func (c *Comp) For(node *ast.ForStmt, labels []string) {
if fun == nil && !flag {
// "for false { }" means that body, post and jump back to condition are never executed...
// still compiled above (to check for errors) but drop the generated code
- c.Code.List = c.Code.List[0:jump.Cond]
+ c.Code.Truncate(jump.Cond)
}
jump.Break = c.Code.Len()
@@ -365,16 +441,18 @@ func (c *Comp) Go(node *ast.GoStmt) {
exprfun := call.Fun.AsX1()
argfunsX1 := call.MakeArgfunsX1()
+ var debugC *Comp
+ if c2.Globals.Options&OptDebugger != 0 {
+ // keep a reference to c2 only if needed
+ debugC = c2
+ }
+
stmt := func(env *Env) (Stmt, *Env) {
- // create a new Env to hold the new ThreadGlobals and (initially empty) Pool
- env2 := NewEnv4Func(env, 0, 0)
- tg := env.ThreadGlobals
- env2.ThreadGlobals = &ThreadGlobals{
- FileEnv: tg.FileEnv,
- TopEnv: tg.TopEnv,
- // Interrupt, Signal, PoolSize and Pool are zero-initialized, fine with that
- Globals: tg.Globals,
- }
+ tg := env.Run
+ // create a new Env to hold the new ThreadGlobals (created in the goroutine below) and (initially empty) Pool
+ env2 := newEnv(tg, env, 0, 0)
+ env2.DebugComp = debugC
+
// env2.MarkUsedByClosure() // redundant, done by exprfun(env2) below
// function and arguments are evaluated in the caller's goroutine
@@ -386,7 +464,14 @@ func (c *Comp) Go(node *ast.GoStmt) {
}
// the call is executed in a new goroutine.
// make it easy and do not try to optimize this call.
- go funv.Call(argv)
+ go func() {
+ tg2 := tg.new(gls.GoID())
+ env2.Run = tg2
+ tg2.glsStore()
+ defer tg2.glsDel()
+
+ funv.Call(argv)
+ }()
env.IP++
return env.Code[env.IP], env
@@ -407,7 +492,7 @@ func (c *Comp) If(node *ast.IfStmt) {
if node.Init != nil {
c.Stmt(node.Init)
}
- pred := c.Expr(node.Cond)
+ pred := c.Expr(node.Cond, nil)
flag, fun, err := pred.TryAsPred()
if err {
c.invalidPred(node.Cond, pred)
@@ -432,7 +517,7 @@ func (c *Comp) If(node *ast.IfStmt) {
if fun == nil && !flag {
// 'then' branch is never executed...
// still compiled above (to check for errors) but drop the generated code
- c.Code.List = c.Code.List[0:jump.Then]
+ c.Code.Truncate(jump.Then)
}
// compile a 'goto' between 'then' and 'else' branches
if fun != nil && node.Else != nil {
@@ -461,7 +546,7 @@ func (c *Comp) If(node *ast.IfStmt) {
if fun == nil && flag {
// 'else' branch is never executed...
// still compiled above (to check for errors) but drop the generated code
- c.Code.List = c.Code.List[0:jump.Else]
+ c.Code.Truncate(jump.Else)
}
}
jump.End = c.Code.Len()
@@ -478,7 +563,7 @@ func (c *Comp) IncDec(node *ast.IncDecStmt) {
} else {
op = token.ADD
}
- one := c.exprUntypedLit(untypedOne.Kind, untypedOne.Obj)
+ one := c.exprUntypedLit(untypedOne.Kind, untypedOne.Val)
c.SetPlace(place, op, one)
}
@@ -499,7 +584,7 @@ func (c *Comp) Return(node *ast.ReturnStmt) {
return
}
- resultBinds := cinfo.Results
+ resultBinds := cinfo.Result
resultExprs := node.Results
n := len(resultBinds)
switch len(resultExprs) {
@@ -525,6 +610,7 @@ func (c *Comp) Return(node *ast.ReturnStmt) {
exprs := c.Exprs(resultExprs)
for i := 0; i < n; i++ {
+ c.Pos = resultExprs[i].Pos()
c.SetVar(resultBinds[i].AsVar(upn, PlaceSettable), token.ASSIGN, exprs[i])
}
c.Append(stmtReturn, node.Pos())
@@ -534,7 +620,7 @@ func (c *Comp) Return(node *ast.ReturnStmt) {
func (c *Comp) returnMultiValues(node *ast.ReturnStmt, resultBinds []*Bind, upn int, exprs []ast.Expr) {
n := len(resultBinds)
e := c.ExprsMultipleValues(exprs, n)[0]
- fun := e.AsXV(OptDefaults)
+ fun := e.AsXV(COptDefaults)
assigns := make([]func(*Env, r.Value), n)
for i := 0; i < n; i++ {
texpected := resultBinds[i].Type
@@ -551,16 +637,18 @@ func (c *Comp) returnMultiValues(node *ast.ReturnStmt, resultBinds []*Bind, upn
assign(env, vals[i])
}
// append the return epilogue
- common := env.ThreadGlobals
- common.Signal = SigReturn
- return common.Interrupt, env
+ env.IP++
+ g := env.Run
+ g.Signals.Sync = SigReturn
+ return g.Interrupt, env
}, node.Pos())
}
func stmtReturn(env *Env) (Stmt, *Env) {
- common := env.ThreadGlobals
- common.Signal = SigReturn
- return common.Interrupt, env
+ env.IP++
+ g := env.Run
+ g.Signals.Sync = SigReturn
+ return g.Interrupt, env
}
// containLocalBinds return true if one or more of the given statements (but not their contents:
@@ -607,7 +695,7 @@ func containLocalBinds(list ...ast.Stmt) bool {
// pushEnvIfLocalBinds compiles a PushEnv statement if list contains local binds
// returns the *Comp to use to compile statement list.
-func (c *Comp) pushEnvIfLocalBinds(nbinds *[2]int, list ...ast.Stmt) (inner *Comp, locals bool) {
+func (c *Comp) pushEnvIfLocalBinds(nbind *[2]int, list ...ast.Stmt) (inner *Comp, locals bool) {
if len(list) == 0 {
inner.Errorf("internal error: pushEnvIfLocalBinds() invoked on empty statement list")
}
@@ -615,33 +703,40 @@ func (c *Comp) pushEnvIfLocalBinds(nbinds *[2]int, list ...ast.Stmt) (inner *Com
// no need to create a new *Env at runtime
// note: we still create a new *Comp at compile time to handle constant/type declarations
locals = containLocalBinds(list...)
- return c.pushEnvIfFlag(nbinds, locals)
+ return c.pushEnvIfFlag(nbind, locals)
}
// pushEnvIfDefine compiles a PushEnv statement if tok is token.DEFINE
// returns the *Comp to use to compile statement list.
-func (c *Comp) pushEnvIfDefine(nbinds *[2]int, tok token.Token) (inner *Comp, locals bool) {
- return c.pushEnvIfFlag(nbinds, tok == token.DEFINE)
+func (c *Comp) pushEnvIfDefine(nbind *[2]int, tok token.Token) (inner *Comp, locals bool) {
+ return c.pushEnvIfFlag(nbind, tok == token.DEFINE)
}
// pushEnvIfFlag compiles a PushEnv statement if flag is true
// returns the *Comp to use to compile statement list.
-func (c *Comp) pushEnvIfFlag(nbinds *[2]int, flag bool) (*Comp, bool) {
+func (c *Comp) pushEnvIfFlag(nbind *[2]int, flag bool) (*Comp, bool) {
+ var debugC *Comp
if flag {
// push new *Env at runtime. we will know # of binds in the block only later, so use a closure on them
c.append(func(env *Env) (Stmt, *Env) {
- inner := NewEnv(env, nbinds[0], nbinds[1])
+ inner := NewEnv(env, nbind[0], nbind[1])
+ inner.DebugComp = debugC
inner.IP++
// Debugf("PushEnv(%p->%p), IP = %d of %d, pushed %d binds and %d intbinds", env, inner, inner.IP, nbinds[0], nbinds[1])
return inner.Code[inner.IP], inner
})
}
- inner := NewComp(c, &c.Code)
- if !flag {
- inner.UpCost = 0
- inner.Depth--
+ innerC := NewComp(c, &c.Code)
+ if flag {
+ if c.Globals.Options&OptDebugger != 0 {
+ // for debugger, inject the inner *Comp into the inner *Env
+ debugC = innerC
+ }
+ } else {
+ innerC.UpCost = 0
+ innerC.Depth--
}
- return inner, flag
+ return innerC, flag
}
// popEnvIfLocalBinds compiles a PopEnv statement if locals is true. also sets *nbinds and *nintbinds
diff --git a/vendor/github.com/cosmos72/gomacro/fast/switch.go b/vendor/github.com/cosmos72/gomacro/fast/switch.go
index fc6e738..fee4335 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/switch.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/switch.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* switch.go
@@ -84,7 +75,7 @@ func (c *Comp) Switch(node *ast.SwitchStmt, labels []string) {
tag = c.exprUntypedLit(r.Bool, constant.MakeBool(true))
tagnode = &ast.Ident{NamePos: node.Pos() + 6, Name: "true"} // only for error messages
} else {
- tag = c.Expr1(tagnode)
+ tag = c.Expr1(tagnode, nil)
}
if !tag.Const() {
// cannot invoke tag.Fun() multiple times because side effects must be applied only once!
@@ -172,7 +163,7 @@ func (c *Comp) switchCase(node *ast.CaseClause, tagnode ast.Expr, tag *Expr, can
// compile a comparison of tag against each expression
sometrue := false
for _, enode := range node.List {
- e := c.Expr1(enode)
+ e := c.Expr1(enode, nil)
if e.Const() {
e.ConstTo(tag.Type)
}
@@ -183,7 +174,7 @@ func (c *Comp) switchCase(node *ast.CaseClause, tagnode ast.Expr, tag *Expr, can
seen.add(c, e.Value, caseEntry{Pos: enode.Pos(), IP: ibody})
if tag.Const() {
// constant propagation
- flag := cmp.EvalConst(OptDefaults)
+ flag := cmp.EvalConst(COptDefaults)
if r.ValueOf(flag).Bool() {
sometrue = true
break // always matches, no need to check further expressions
diff --git a/vendor/github.com/cosmos72/gomacro/fast/switch2.go b/vendor/github.com/cosmos72/gomacro/fast/switch2.go
index b717b1b..d56e16f 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/switch2.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/switch2.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* switch2.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/switch2.gomacro b/vendor/github.com/cosmos72/gomacro/fast/switch2.gomacro
index 5eb3178..0661d97 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/switch2.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/switch2.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* switch2.go
diff --git a/vendor/github.com/cosmos72/gomacro/fast/switch_type.go b/vendor/github.com/cosmos72/gomacro/fast/switch_type.go
index 7aa1f44..8bc9f36 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/switch_type.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/switch_type.go
@@ -1,23 +1,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * switch.go
+ * switch_type.go
*
* Created on May 06, 2017
* Author Massimiliano Ghilardi
@@ -26,7 +17,6 @@
package fast
import (
- "fmt"
"go/ast"
"go/token"
"go/types"
@@ -63,7 +53,7 @@ func (seen *typecaseHelper) add(c *Comp, t xr.Type, entry typecaseEntry) {
}
entry.Type = t
seen.TypeMap.Set(gtype, entry)
- if t.Kind() == r.Interface {
+ if t != nil && t.Kind() == r.Interface {
seen.AllConcrete = false
} else if seen.AllConcrete {
seen.ConcreteMap.Set(gtype, entry)
@@ -92,7 +82,7 @@ func (c *Comp) TypeSwitch(node *ast.TypeSwitchStmt, labels []string) {
}
tagnode, varname := c.typeswitchNode(node.Assign)
- tagexpr := c.Expr1(tagnode)
+ tagexpr := c.Expr1(tagnode, nil)
if tagexpr.Type.Kind() != r.Interface {
c.Errorf("cannot type switch on non-interface type <%v>: %v", tagexpr.Type, tagnode)
}
@@ -102,7 +92,7 @@ func (c *Comp) TypeSwitch(node *ast.TypeSwitchStmt, labels []string) {
// just like Comp.Switch, we cannot invoke tagexpr.Fun() multiple times because
// side effects must be applied only once!
// typeswitchTag saves the result of tagexpr.Fun() in a runtime bind
- // and returns the bind
+ // and returns the bind.
bind := c.typeswitchTag(tagexpr)
if node.Body != nil {
@@ -194,7 +184,14 @@ func (c *Comp) typeswitchNode(stmt ast.Stmt) (ast.Expr, string) {
// finally returns another expression that retrieves the expression value
// with its concrete type
func (c *Comp) typeswitchTag(e *Expr) *Bind {
- bind := c.AddBind("", VarBind, e.Type) // e.Type must be an interface type...
+ bind := c.NewBind("", VarBind, e.Type) // e.Type must be an interface type...
+ tbind := c.NewBind("", VarBind, c.TypeOfInterface()) // no need to store as xr.Type
+ if tbind.Desc.Index() != bind.Desc.Index()+1 {
+ c.Errorf("internal error: consecutive binds have non-consecutive indexes %d and %d",
+ bind.Desc.Index()+1, tbind.Desc.Index())
+ }
+
+ extractor := c.extractor(e.Type)
// c.Debugf("typeswitchTag: allocated bind %v", bind)
switch bind.Desc.Class() {
@@ -205,15 +202,16 @@ func (c *Comp) typeswitchTag(e *Expr) *Bind {
index := bind.Desc.Index()
init := e.AsX1()
c.append(func(env *Env) (Stmt, *Env) {
- v := r.ValueOf(init(env).Interface()) // extract concrete type
+ v, xt := extractor(init(env)) // extract value with concrete type
// Debugf("typeswitchTag = %v <%v>", v, ValueType(v))
// no need to create a settable reflect.Value
- env.Binds[index] = v
+ env.Vals[index] = v
+ env.Vals[index+1] = r.ValueOf(xt)
env.IP++
return env.Code[env.IP], env
})
default:
- c.Errorf("internal error! Comp.AddBind(name=%q, class=VarBind, type=%v) returned class=%v, expecting VarBind",
+ c.Errorf("internal error! Comp.NewBind(name=%q, class=VarBind, type=%v) returned class=%v, expecting VarBind",
"", bind.Type, bind.Desc.Class())
return nil
}
@@ -225,17 +223,21 @@ func (c *Comp) typeswitchGotoMap(bind *Bind, seen *typecaseHelper, ip int) {
if seen.ConcreteMap.Len() <= 1 {
return
}
- m := make(map[r.Type]int) // FIXME this breaks on types declared in the interpreter
+ m := make(map[r.Type]int)
seen.ConcreteMap.Iterate(func(k types.Type, v interface{}) {
entry := v.(typecaseEntry)
m[entry.Type.ReflectType()] = entry.IP
})
+ if len(m) != seen.ConcreteMap.Len() {
+ // one or more interpreted types are implemented by the same reflect.Type.
+ // cannot optimize typeswitch based on reflect.Type only.
+ return
+ }
idx := bind.Desc.Index()
stmt := func(env *Env) (Stmt, *Env) {
- // FIXME this breaks on types declared in the interpreter
var rtype r.Type
- if v := env.Binds[idx]; v.IsValid() {
+ if v := env.Vals[idx]; v.IsValid() {
rtype = v.Type() // concrete reflect.Type already extracted by typeswitchTag
}
if ip, found := m[rtype]; found {
@@ -288,40 +290,87 @@ func (c *Comp) typeswitchCase(node *ast.CaseClause, varname string, bind *Bind,
t := ts[0]
rtype := rtypes[0]
if t == nil {
+ // case nil:
stmt = func(env *Env) (Stmt, *Env) {
- v := env.Binds[idx]
+ v := env.Vals[idx]
// Debugf("typeswitchCase: comparing %v <%v> against nil type", v, ValueType(v))
var ip int
- if !v.IsValid() {
- ip = env.IP + 1
- } else {
+ if v.IsValid() {
ip = iend
+ } else {
+ ip = env.IP + 1
+ }
+ env.IP = ip
+ return env.Code[ip], env
+ }
+ } else if t.Kind() == r.Interface && xr.IsEmulatedInterface(t) {
+ // case emulated_interface:
+ stmt = func(env *Env) (Stmt, *Env) {
+ v := env.Vals[idx]
+ // Debugf("typeswitchCase: comparing %v <%v> against interface type %v", v, ValueType(v), rtype)
+ ip := iend
+ if v.IsValid() {
+ // rtype may be an interpreted type:
+ // extract the concrete xr.Type and use it
+ xtv := env.Vals[idx+1]
+ if xtv.IsValid() && !xtv.IsNil() {
+ xt := xtv.Interface().(xr.Type)
+ if xt.Implements(t) {
+ ip = env.IP + 1
+ // need the compiler at run-time :(
+ conv := c.converterToEmulatedInterface(xt, t)
+ env.Vals[idx] = conv(v)
+ }
+ }
}
env.IP = ip
return env.Code[ip], env
}
} else if t.Kind() == r.Interface {
+ // case interface:
stmt = func(env *Env) (Stmt, *Env) {
- v := env.Binds[idx]
+ v := env.Vals[idx]
// Debugf("typeswitchCase: comparing %v <%v> against interface type %v", v, ValueType(v), rtype)
- var ip int
- if v.IsValid() && v.Type().Implements(rtype) {
- ip = env.IP + 1
- } else {
- ip = iend
+ ip := iend
+ if v.IsValid() {
+ if v.Type().Implements(rtype) {
+ ip = env.IP + 1
+ } else {
+ // rtype may be an interpreted type:
+ // extract the concrete xr.Type and use it
+ xtv := env.Vals[idx+1]
+ if xtv.IsValid() && !xtv.IsNil() {
+ xt := xtv.Interface().(xr.Type)
+ if xt.Implements(t) {
+ ip = env.IP + 1
+ // need the compiler at run-time :(
+ conv := c.converterToProxy(xt, t)
+ env.Vals[idx] = conv(v)
+ }
+ }
+ }
}
env.IP = ip
return env.Code[ip], env
}
} else {
+ // case concrete_type:
stmt = func(env *Env) (Stmt, *Env) {
- v := env.Binds[idx]
- // Debugf("typeswitchCase: comparing %v <%v> against concrete type %v", v, ValueType(v), rtype)
- var ip int
+ v := env.Vals[idx]
+ ip := iend
if v.IsValid() && v.Type() == rtype {
- ip = env.IP + 1
- } else {
- ip = iend
+ // rtype may be an interpreted type:
+ // extract the concrete xr.Type and use it
+ xtv := env.Vals[idx+1]
+ if xtv.IsValid() && !xtv.IsNil() {
+ xt := xtv.Interface().(xr.Type)
+ if xt.IdenticalTo(t) {
+ ip = env.IP + 1
+ }
+ } else {
+ // cannot check exactly...
+ ip = env.IP + 1
+ }
}
env.IP = ip
return env.Code[ip], env
@@ -329,7 +378,7 @@ func (c *Comp) typeswitchCase(node *ast.CaseClause, varname string, bind *Bind,
}
default:
stmt = func(env *Env) (Stmt, *Env) {
- v := env.Binds[idx]
+ v := env.Vals[idx]
var vt r.Type
if v.IsValid() {
vt = v.Type()
@@ -392,7 +441,7 @@ func (c *Comp) typeswitchBody(list []ast.Stmt, varname string, t xr.Type, bind *
locals := declvar || containLocalBinds(list1...)
var nbinds [2]int
- c2, locals2 := c.pushEnvIfFlag(&nbinds, locals || c.IsCompiled())
+ c2, locals2 := c.pushEnvIfFlag(&nbinds, locals)
if declvar {
sym := bind.AsSymbol(c2.UpCost)
if t == nil {
@@ -410,11 +459,9 @@ func (c *Comp) typeswitchBody(list []ast.Stmt, varname string, t xr.Type, bind *
// typeswitchVar compiles the tag variable declaration in a type-switch.
func (c *Comp) typeswitchVar(varname string, t xr.Type, sym *Symbol) {
- c.ErrorIfCompiled(fmt.Sprintf("switch %s.(type)", varname))
-
sidx := sym.Bind.Desc.Index()
- bind := c.AddBind(varname, VarBind, t)
+ bind := c.NewBind(varname, VarBind, t)
idx := bind.Desc.Index()
if sym.Upn != 1 {
@@ -424,91 +471,97 @@ func (c *Comp) typeswitchVar(varname string, t xr.Type, sym *Symbol) {
switch t.Kind() {
case r.Bool:
stmt = func(env *Env) (Stmt, *Env) {
- *(*bool)(unsafe.Pointer(&env.IntBinds[idx])) = env.Outer.Binds[sidx].Bool()
+ *(*bool)(unsafe.Pointer(&env.Ints[idx])) = env.Outer.Vals[sidx].Bool()
env.IP++
return env.Code[env.IP], env
}
case r.Int:
stmt = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[idx])) = int(env.Outer.Binds[sidx].Int())
+ *(*int)(unsafe.Pointer(&env.Ints[idx])) = int(env.Outer.Vals[sidx].Int())
env.IP++
return env.Code[env.IP], env
}
case r.Int8:
stmt = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[idx])) = int8(env.Outer.Binds[sidx].Int())
+ *(*int8)(unsafe.Pointer(&env.Ints[idx])) = int8(env.Outer.Vals[sidx].Int())
env.IP++
return env.Code[env.IP], env
}
case r.Int16:
stmt = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[idx])) = int16(env.Outer.Binds[sidx].Int())
+ *(*int16)(unsafe.Pointer(&env.Ints[idx])) = int16(env.Outer.Vals[sidx].Int())
env.IP++
return env.Code[env.IP], env
}
case r.Int32:
stmt = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[idx])) = int32(env.Outer.Binds[sidx].Int())
+ *(*int32)(unsafe.Pointer(&env.Ints[idx])) = int32(env.Outer.Vals[sidx].Int())
env.IP++
return env.Code[env.IP], env
}
case r.Int64:
stmt = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[idx])) = int64(env.Outer.Binds[sidx].Int())
+ *(*int64)(unsafe.Pointer(&env.Ints[idx])) = int64(env.Outer.Vals[sidx].Int())
env.IP++
return env.Code[env.IP], env
}
case r.Uint:
stmt = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[idx])) = uint(env.Outer.Binds[sidx].Uint())
+ *(*uint)(unsafe.Pointer(&env.Ints[idx])) = uint(env.Outer.Vals[sidx].Uint())
env.IP++
return env.Code[env.IP], env
}
case r.Uint8:
stmt = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[idx])) = uint8(env.Outer.Binds[sidx].Uint())
+ *(*uint8)(unsafe.Pointer(&env.Ints[idx])) = uint8(env.Outer.Vals[sidx].Uint())
env.IP++
return env.Code[env.IP], env
}
case r.Uint16:
stmt = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[idx])) = uint16(env.Outer.Binds[sidx].Uint())
+ *(*uint16)(unsafe.Pointer(&env.Ints[idx])) = uint16(env.Outer.Vals[sidx].Uint())
env.IP++
return env.Code[env.IP], env
}
case r.Uint32:
stmt = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[idx])) = uint32(env.Outer.Binds[sidx].Uint())
+ *(*uint32)(unsafe.Pointer(&env.Ints[idx])) = uint32(env.Outer.Vals[sidx].Uint())
env.IP++
return env.Code[env.IP], env
}
case r.Uint64:
stmt = func(env *Env) (Stmt, *Env) {
- env.IntBinds[idx] = env.Outer.Binds[sidx].Uint()
+ env.Ints[idx] = env.Outer.Vals[sidx].Uint()
env.IP++
return env.Code[env.IP], env
}
case r.Uintptr:
stmt = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[idx])) = uintptr(env.Outer.Binds[sidx].Uint())
+ *(*uintptr)(unsafe.Pointer(&env.Ints[idx])) = uintptr(env.Outer.Vals[sidx].Uint())
env.IP++
return env.Code[env.IP], env
}
case r.Float32:
stmt = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[idx])) = float32(env.Outer.Binds[sidx].Float())
+ *(*float32)(unsafe.Pointer(&env.Ints[idx])) = float32(env.Outer.Vals[sidx].Float())
env.IP++
return env.Code[env.IP], env
}
case r.Float64:
stmt = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[idx])) = env.Outer.Binds[sidx].Float()
+ *(*float64)(unsafe.Pointer(&env.Ints[idx])) = env.Outer.Vals[sidx].Float()
env.IP++
return env.Code[env.IP], env
}
case r.Complex64:
stmt = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[idx])) = complex64(env.Outer.Binds[sidx].Complex())
+ *(*complex64)(unsafe.Pointer(&env.Ints[idx])) = complex64(env.Outer.Vals[sidx].Complex())
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ case r.Complex128:
+ stmt = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.Ints[idx])) = env.Outer.Vals[sidx].Complex()
env.IP++
return env.Code[env.IP], env
}
@@ -516,7 +569,7 @@ func (c *Comp) typeswitchVar(varname string, t xr.Type, sym *Symbol) {
rtype := t.ReflectType()
zero := r.Zero(rtype)
stmt = func(env *Env) (Stmt, *Env) {
- v := env.Outer.Binds[sidx]
+ v := env.Outer.Vals[sidx]
place := r.New(rtype).Elem()
if !v.IsValid() {
v = zero
@@ -524,7 +577,7 @@ func (c *Comp) typeswitchVar(varname string, t xr.Type, sym *Symbol) {
v = v.Convert(rtype)
}
place.Set(v)
- env.Binds[idx] = place
+ env.Vals[idx] = place
env.IP++
return env.Code[env.IP], env
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/type.go b/vendor/github.com/cosmos72/gomacro/fast/type.go
index f01c402..3ac08b4 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/type.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/type.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* type.go
@@ -32,19 +23,19 @@ import (
r "reflect"
. "github.com/cosmos72/gomacro/base"
+ "github.com/cosmos72/gomacro/base/untyped"
xr "github.com/cosmos72/gomacro/xreflect"
)
// DeclType compiles a type declaration.
func (c *Comp) DeclType(node ast.Spec) {
- switch node := node.(type) {
- case *ast.TypeSpec:
+ if node, ok := node.(*ast.TypeSpec); ok {
name := node.Name.Name
- // PATCH: support type aliases
- if unary, ok := node.Type.(*ast.UnaryExpr); ok && unary.Op == token.ASSIGN {
- t := c.Type(unary.X)
+ // support type aliases
+ if node.Assign != token.NoPos {
+ t := c.Type(node.Type)
c.DeclTypeAlias(name, t)
- break
+ return
}
// support self-referencing types, as for example: type List struct { First int; Rest *List }
oldt := c.Types[name]
@@ -65,8 +56,8 @@ func (c *Comp) DeclType(node ast.Spec) {
c.SetUnderlyingType(t, u)
}
panicking = false
- default:
- c.Errorf("Compile: unexpected type declaration, expecting <*ast.TypeSpec>, found: %v <%v>", node, r.TypeOf(node))
+ } else {
+ c.Errorf("unexpected declaration type, expecting <*ast.TypeSpec>, found: %v <%v>", node, r.TypeOf(node))
}
}
@@ -76,8 +67,11 @@ func (c *Comp) DeclTypeAlias(name string, t xr.Type) xr.Type {
if name == "_" {
return t
}
- if _, ok := c.Types[name]; ok {
- c.Warnf("redefined type alias: %v", name)
+ if et := c.Types[name]; et != nil {
+ // forward-declared types have kind == r.Invalid, see Comp.DeclNamedType() below
+ if et.Kind() != r.Invalid {
+ c.Warnf("redefined type alias: %v", name)
+ }
c.Universe.InvalidateCache()
} else if c.Types == nil {
c.Types = make(map[string]xr.Type)
@@ -88,13 +82,15 @@ func (c *Comp) DeclTypeAlias(name string, t xr.Type) xr.Type {
// DeclNamedType executes a named type forward declaration.
// Returns nil if name == "_"
-// Otherwise it must be followed by Comp.SetUnderlyingType()
+// Otherwise it must be followed by Comp.SetUnderlyingType(t) where t is the returned type
func (c *Comp) DeclNamedType(name string) xr.Type {
if name == "_" {
return nil
}
- if t, ok := c.Types[name]; ok {
- c.Warnf("redefined type: %v", name)
+ if t := c.Types[name]; t != nil {
+ if t.Kind() != r.Invalid {
+ c.Warnf("redefined type: %v", name)
+ }
if xr.QName1(t) != xr.QName2(name, c.FileComp().Path) {
// the current type "name" is an alias, discard it
c.Universe.InvalidateCache()
@@ -105,7 +101,7 @@ func (c *Comp) DeclNamedType(name string) xr.Type {
} else if c.Types == nil {
c.Types = make(map[string]xr.Type)
}
- t := c.Universe.NamedOf(name, c.FileComp().Path)
+ t := c.Universe.NamedOf(name, c.FileComp().Path, r.Invalid /*kind not yet known*/)
c.Types[name] = t
return t
}
@@ -211,7 +207,7 @@ func (c *Comp) compileType2(node ast.Expr, allowEllipsis bool) (t xr.Type, ellip
case *ast.FuncType:
t, _, _ = c.TypeFunction(node)
case *ast.Ident:
- t = c.TypeIdent(node.Name)
+ t = c.ResolveType(node.Name)
case *ast.InterfaceType:
t = c.TypeInterface(node)
case *ast.MapType:
@@ -234,10 +230,10 @@ func (c *Comp) compileType2(node ast.Expr, allowEllipsis bool) (t xr.Type, ellip
}
if bind == nil {
c.Errorf("undefined %q in %v <%v>", name, node, r.TypeOf(node))
- } else if !bind.Const() || bind.Type.ReflectType() != rtypeOfImport {
+ } else if !bind.Const() || bind.Type.ReflectType() != rtypeOfPtrImport {
c.Errorf("not a package: %q in %v <%v>", name, node, r.TypeOf(node))
}
- imp, ok := bind.Value.(Import)
+ imp, ok := bind.Value.(*Import)
if !ok {
c.Errorf("not a package: %q in %v <%v>", name, node, r.TypeOf(node))
}
@@ -261,7 +257,7 @@ func (c *Comp) compileType2(node ast.Expr, allowEllipsis bool) (t xr.Type, ellip
// type can be omitted in many case - then we must perform type inference
break
default:
- // TODO which types are still missing?
+ // which types are still missing?
c.Errorf("unimplemented type: %v <%v>", node, r.TypeOf(node))
}
if t != nil {
@@ -291,14 +287,14 @@ func (c *Comp) TypeArray(node *ast.ArrayType) (t xr.Type, ellipsis bool) {
// "The length is part of the array's type; it must evaluate to a non-negative constant
// representable by a value of type int. "
var count int
- init := c.Expr(n)
+ init := c.Expr(n, nil)
if !init.Const() {
c.Errorf("array length is not a constant: %v", node)
return
} else if init.Untyped() {
count = init.ConstTo(c.TypeOfInt()).(int)
} else {
- count = convertLiteralCheckOverflow(init.Value, c.TypeOfInt()).(int)
+ count = untyped.ConvertLiteralCheckOverflow(init.Value, c.TypeOfInt()).(int)
}
if count < 0 {
c.Errorf("array length [%v] is negative: %v", count, node)
@@ -375,14 +371,22 @@ func (c *Comp) typeFieldsOrParams(list []*ast.Field, allowEllipsis bool) (types
return types, names, ellipsis
}
-func (c *Comp) TypeIdent(name string) xr.Type {
- for co := c; co != nil; co = co.Outer {
- if t, ok := co.Types[name]; ok {
- return t
+func (c *Comp) TryResolveType(name string) xr.Type {
+ var t xr.Type
+ for ; c != nil; c = c.Outer {
+ if t = c.Types[name]; t != nil {
+ break
}
}
- c.Errorf("undefined identifier: %v", name)
- return nil
+ return t
+}
+
+func (c *Comp) ResolveType(name string) xr.Type {
+ t := c.TryResolveType(name)
+ if t == nil {
+ c.Errorf("undefined identifier: %v", name)
+ }
+ return t
}
func (c *Comp) makeStructFields(pkg *xr.Package, names []string, types []xr.Type) []xr.StructField {
@@ -401,9 +405,16 @@ func (c *Comp) makeStructFields(pkg *xr.Package, names []string, types []xr.Type
return fields
}
+func rtypeof(v r.Value, t xr.Type) r.Type {
+ if t != nil {
+ return t.ReflectType()
+ }
+ return ValueType(v)
+}
+
// TypeAssert2 compiles a multi-valued type assertion
func (c *Comp) TypeAssert2(node *ast.TypeAssertExpr) *Expr {
- val := c.Expr1(node.X)
+ val := c.Expr1(node.X, nil)
tin := val.Type
tout := c.Type(node.Type)
rtout := tout.ReflectType()
@@ -411,88 +422,104 @@ func (c *Comp) TypeAssert2(node *ast.TypeAssertExpr) *Expr {
c.Errorf("invalid type assertion: %v (non-interface type <%v> on left)", node, tin)
return nil
}
- kin := tin.Kind()
kout := tout.Kind()
if kout != r.Interface && !tout.Implements(tin) {
c.Errorf("impossible type assertion: <%v> does not implement <%v>", tout, tin)
}
- fun := val.Fun.(func(*Env) r.Value) // val returns an interface... must be already wrapped in a reflect.Value
- fail := []r.Value{xr.Zero(tout), False} // returned by type assertion in case of failure
+ // extractor to unwrap value from proxy or emulated interface
+ extractor := c.extractor(tin)
+
+ fun := val.Fun.(func(*Env) r.Value) // val returns an interface... must be already wrapped in a reflect.Value
var ret func(env *Env) (r.Value, []r.Value)
- if IsOptimizedKind(kout) {
+ fail := []r.Value{xr.Zero(tout), False} // returned by type assertion in case of failure
+ switch {
+ case IsOptimizedKind(kout):
ret = func(env *Env) (r.Value, []r.Value) {
- v := fun(env)
- v = r.ValueOf(v.Interface()) // rebuild reflect.Value with concrete type
- if v.Type() != rtout {
+ v, t := extractor(fun(env))
+ if ValueType(v) != rtout || (t != nil && !t.AssignableTo(tout)) {
return fail[0], fail
}
return v, []r.Value{v, True}
}
- } else if tout.ReflectType() == TypeOfInterface {
- // special case, nil is a valid interface{}
- ret = func(env *Env) (r.Value, []r.Value) {
- v := fun(env).Convert(TypeOfInterface)
- return v, []r.Value{v, True}
+
+ case kout == r.Interface:
+ if tout.NumMethod() == 0 {
+ // type assertion to empty interface.
+ // everything, excluding nil, implements an empty interface
+ ret = func(env *Env) (r.Value, []r.Value) {
+ v, _ := extractor(fun(env))
+ if v == Nil {
+ return fail[0], fail
+ }
+ v = v.Convert(rtout)
+ return v, []r.Value{v, True}
+ }
+ break
}
- } else if kout == r.Interface && tin.Implements(tout) {
- ret = func(env *Env) (r.Value, []r.Value) {
- v := fun(env)
- // nil is not a valid tout, check for it.
- // IsNil() can be invoked only on nillable types...
- // but v.Type().Kind() should be r.Interface, which is nillable :)
- if v.IsNil() {
- return fail[0], fail
+ if tin.Implements(tout) {
+ // type assertion to interface.
+ // expression type implements such interface, can only fail if value is nil
+ ret = func(env *Env) (r.Value, []r.Value) {
+ v, _ := extractor(fun(env))
+ // nil is not a valid tout, check for it.
+ // IsNil() can be invoked only on nillable types...
+ if IsNillableKind(v.Kind()) && (v == Nil || v.IsNil()) {
+ return fail[0], fail
+ }
+ v = v.Convert(rtout)
+ return v, []r.Value{v, True}
}
- v = v.Convert(rtout)
- return v, []r.Value{v, True}
+ break
}
- } else if kout == r.Interface {
+ // type assertion to interface
+ // must check at runtime whether concrete type implements asserted interface
ret = func(env *Env) (r.Value, []r.Value) {
- v := fun(env)
+ v, t := extractor(fun(env))
// nil is not a valid tout, check for it.
// IsNil() can be invoked only on nillable types...
- // but v.Type().Kind() should be r.Interface, which is nillable :)
- if v.IsNil() {
+ if IsNillableKind(v.Kind()) && (v == Nil || v.IsNil()) {
return fail[0], fail
}
- v = r.ValueOf(v.Interface()) // rebuild reflect.Value with concrete type
- rtconcr := v.Type()
- if rtconcr != rtout && !rtconcr.Implements(rtout) {
+ rt := rtypeof(v, t)
+ if (rt != rtout && !rt.Implements(rtout)) ||
+ (t != nil && !t.IdenticalTo(tout) && !t.Implements(tout)) {
return fail[0], fail
}
v = v.Convert(rtout)
return v, []r.Value{v, True}
}
- } else if IsNillableKind(kin) {
+
+ case IsNillableKind(kout):
+ // type assertion to concrete (nillable) type
ret = func(env *Env) (r.Value, []r.Value) {
- v := fun(env)
+ v, t := extractor(fun(env))
// nil is not a valid tout, check for it.
// IsNil() can be invoked only on nillable types...
- // but we just checked IsNillableKind(kin)
- if v.IsNil() {
+ if IsNillableKind(v.Kind()) && (v == Nil || v.IsNil()) {
return fail[0], fail
}
- v = r.ValueOf(v.Interface()) // rebuild reflect.Value with concrete type
- rtconcr := v.Type()
- if rtconcr != rtout {
+ rt := rtypeof(v, t)
+ if rt != rtout || (t != nil && !t.IdenticalTo(tout)) {
return fail[0], fail
}
return v, []r.Value{v, True}
}
- } else {
+ default:
+ // type assertion to concrete (non-nillable) type
ret = func(env *Env) (r.Value, []r.Value) {
- v := fun(env)
- v = r.ValueOf(v.Interface()) // rebuild reflect.Value with concrete type
- rtconcr := v.Type()
- if rtconcr != rtout {
+ v, t := extractor(fun(env))
+ rt := rtypeof(v, t)
+ if rt != rtout || (t != nil && !t.IdenticalTo(tout)) {
return fail[0], fail
}
return v, []r.Value{v, True}
}
}
- return exprXV([]xr.Type{tout, c.TypeOfBool()}, ret)
+ e := exprXV([]xr.Type{tout, c.TypeOfBool()}, ret)
+ e.EFlags = EIsTypeAssert
+ return e
}
// TypeAssert1 compiles a single-valued type assertion
@@ -500,7 +527,7 @@ func (c *Comp) TypeAssert1(node *ast.TypeAssertExpr) *Expr {
if node.Type == nil {
c.Errorf("invalid type assertion: expecting actual type, found type switch: %v", node)
}
- val := c.Expr1(node.X)
+ val := c.Expr1(node.X, nil)
tin := val.Type
tout := c.Type(node.Type)
kout := tout.Kind()
@@ -511,241 +538,307 @@ func (c *Comp) TypeAssert1(node *ast.TypeAssertExpr) *Expr {
if tout.Kind() != r.Interface && !tout.Implements(tin) {
c.Errorf("impossible type assertion: <%v> does not implement <%v>", tout, tin)
}
+ // extractor to unwrap value from proxy or emulated interface
+ extractor := c.extractor(tin)
+
fun := val.Fun.(func(*Env) r.Value) // val returns an interface... must be already wrapped in a reflect.Value
- rtin := tin.ReflectType()
+
rtout := tout.ReflectType()
var ret I
switch kout {
case r.Bool:
ret = func(env *Env) bool {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return v.Bool()
}
case r.Int:
ret = func(env *Env) int {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return int(v.Int())
}
case r.Int8:
ret = func(env *Env) int8 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return int8(v.Int())
}
case r.Int16:
ret = func(env *Env) int16 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return int16(v.Int())
}
case r.Int32:
ret = func(env *Env) int32 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return int32(v.Int())
}
case r.Int64:
ret = func(env *Env) int64 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return v.Int()
}
case r.Uint:
ret = func(env *Env) uint {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return uint(v.Uint())
}
case r.Uint8:
ret = func(env *Env) uint8 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return uint8(v.Uint())
}
case r.Uint16:
ret = func(env *Env) uint16 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return uint16(v.Uint())
}
case r.Uint32:
ret = func(env *Env) uint32 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return uint32(v.Uint())
}
case r.Uint64:
ret = func(env *Env) uint64 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return v.Uint()
}
case r.Uintptr:
ret = func(env *Env) uintptr {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return uintptr(v.Uint())
}
case r.Float32:
ret = func(env *Env) float32 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return float32(v.Float())
}
case r.Float64:
ret = func(env *Env) float64 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return v.Float()
}
case r.Complex64:
ret = func(env *Env) complex64 {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return complex64(v.Complex())
}
case r.Complex128:
ret = func(env *Env) complex128 {
- v := typeassert(fun(env), rtin, rtout)
- return v.Convert(rtout).Complex()
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
+ return v.Complex()
}
case r.String:
ret = func(env *Env) string {
- v := typeassert(fun(env), rtin, rtout)
+ v, t := extractor(fun(env))
+ v = typeassert(v, t, tin, tout)
return v.String()
}
- default:
- if tout.ReflectType() == TypeOfInterface {
- // special case, nil is a valid interface{}
+ case r.Interface:
+ if tout.NumMethod() == 0 {
+ // type assertion to empty interface.
+ // everything, excluding untyped nil, implements an empty interface
ret = func(env *Env) r.Value {
- return fun(env).Convert(TypeOfInterface)
+ v, _ := extractor(fun(env))
+ if v == Nil {
+ typeassertpanic(nil, nil, tin, tout)
+ }
+ return v.Convert(rtout)
}
- break
- }
- if tout.Kind() == r.Interface && tin.Implements(tout) {
+ } else if tin.Implements(tout) {
+ // type assertion to interface.
+ // expression type implements such interface, can only fail if value is nil
ret = func(env *Env) r.Value {
- v := fun(env)
+ v, _ := extractor(fun(env))
// nil is not a valid tout, check for it.
// IsNil() can be invoked only on nillable types...
- // but v.Type().Kind() should be r.Interface, which is nillable :)
- if v.IsNil() {
- panic(&TypeAssertionError{
- Interface: rtin,
- Concrete: nil,
- Asserted: rtout,
- })
+ if IsNillableKind(v.Kind()) && (v == Nil || v.IsNil()) {
+ typeassertpanic(nil, nil, tin, tout)
+ }
+ return v.Convert(rtout)
+ }
+ } else {
+ // type assertion to interface.
+ // must check at runtime whether concrete type implements asserted interface
+ ret = func(env *Env) r.Value {
+ v, t := extractor(fun(env))
+ // nil is not a valid tout, check for it.
+ // IsNil() can be invoked only on nillable types...
+ if IsNillableKind(v.Kind()) && (v == Nil || v.IsNil()) {
+ typeassertpanic(nil, nil, tin, tout)
+ }
+ rt := rtypeof(v, t)
+ if (rt != rtout && !rt.AssignableTo(rtout) && !rt.Implements(rtout)) ||
+ (t != nil && !t.AssignableTo(tout) && !t.Implements(tout)) {
+ typeassertpanic(rt, t, tin, tout)
}
return v.Convert(rtout)
}
- break
}
- ret = func(env *Env) r.Value {
- v := fun(env)
- // nil is not a valid tout, check for it.
- // IsNil() can be invoked only on nillable types...
- // but v.Type().Kind() should be r.Interface, which is nillable :)
- if v.IsNil() {
- panic(&TypeAssertionError{
- Interface: rtin,
- Concrete: nil,
- Asserted: rtout,
- })
+ default:
+ if IsNillableKind(kout) {
+ // type assertion to concrete (nillable) type
+ ret = func(env *Env) r.Value {
+ v, t := extractor(fun(env))
+ // nil is not a valid tout, check for it.
+ // IsNil() can be invoked only on nillable types...
+ if IsNillableKind(v.Kind()) && (v == Nil || v.IsNil()) {
+ typeassertpanic(nil, nil, tin, tout)
+ }
+ rt := rtypeof(v, t)
+ if rt != rtout || (t != nil && !t.IdenticalTo(tout)) {
+ panic(&TypeAssertionError{
+ Interface: tin,
+ Concrete: t,
+ ReflectConcrete: rt,
+ Asserted: tout,
+ })
+ }
+ return v
}
- v = r.ValueOf(v.Interface()) // rebuild reflect.Value with concrete type
- rtconcr := v.Type()
- if rtconcr != rtout && (rtout.Kind() != r.Interface || !rtconcr.Implements(rtout)) {
- panic(&TypeAssertionError{
- Interface: rtin,
- Concrete: rtconcr,
- Asserted: rtout,
- })
+ } else {
+ // type assertion to concrete (non-nillable) type
+ ret = func(env *Env) r.Value {
+ v, t := extractor(fun(env))
+ rt := rtypeof(v, t)
+ if rt != rtout || (t != nil && !t.IdenticalTo(tout)) {
+ panic(&TypeAssertionError{
+ Interface: tin,
+ Concrete: t,
+ ReflectConcrete: rt,
+ Asserted: tout,
+ })
+ }
+ return v
}
- return v.Convert(rtout)
}
}
- return exprFun(tout, ret)
+ e := exprFun(tout, ret)
+ e.EFlags = EIsTypeAssert
+ return e
}
-func typeassert(v r.Value, rtin r.Type, rtout r.Type) r.Value {
- v = r.ValueOf(v.Interface()) // extract concrete type
- rtconcr := v.Type()
- if rtconcr != rtout {
+func typeassert(v r.Value, t xr.Type, tin xr.Type, tout xr.Type) r.Value {
+ rt := rtypeof(v, t)
+ if rt != tout.ReflectType() || t != nil && !t.IdenticalTo(tout) {
panic(&TypeAssertionError{
- Interface: rtin,
- Concrete: rtconcr,
- Asserted: rtout,
+ Interface: tin,
+ Concrete: t,
+ ReflectConcrete: rt,
+ Asserted: tout,
})
}
return v
}
-func (g *CompThreadGlobals) TypeOfBool() xr.Type {
+func typeassertpanic(rt r.Type, t xr.Type, tin xr.Type, tout xr.Type) {
+ var missingmethod *xr.Method
+ if t != nil && tout.Kind() == r.Interface {
+ missingmethod = xr.MissingMethod(t, tout)
+ }
+ panic(&TypeAssertionError{
+ Interface: tin,
+ Concrete: t,
+ ReflectConcrete: rt,
+ Asserted: tout,
+ MissingMethod: missingmethod,
+ })
+}
+
+func (g *CompGlobals) TypeOfBool() xr.Type {
return g.Universe.BasicTypes[r.Bool]
}
-func (g *CompThreadGlobals) TypeOfInt() xr.Type {
+func (g *CompGlobals) TypeOfInt() xr.Type {
return g.Universe.BasicTypes[r.Int]
}
-func (g *CompThreadGlobals) TypeOfInt8() xr.Type {
+func (g *CompGlobals) TypeOfInt8() xr.Type {
return g.Universe.BasicTypes[r.Int8]
}
-func (g *CompThreadGlobals) TypeOfInt16() xr.Type {
+func (g *CompGlobals) TypeOfInt16() xr.Type {
return g.Universe.BasicTypes[r.Int16]
}
-func (g *CompThreadGlobals) TypeOfInt32() xr.Type {
+func (g *CompGlobals) TypeOfInt32() xr.Type {
return g.Universe.BasicTypes[r.Int32]
}
-func (g *CompThreadGlobals) TypeOfInt64() xr.Type {
+func (g *CompGlobals) TypeOfInt64() xr.Type {
return g.Universe.BasicTypes[r.Int64]
}
-func (g *CompThreadGlobals) TypeOfUint() xr.Type {
+func (g *CompGlobals) TypeOfUint() xr.Type {
return g.Universe.BasicTypes[r.Uint]
}
-func (g *CompThreadGlobals) TypeOfUint8() xr.Type {
+func (g *CompGlobals) TypeOfUint8() xr.Type {
return g.Universe.BasicTypes[r.Uint8]
}
-func (g *CompThreadGlobals) TypeOfUint16() xr.Type {
+func (g *CompGlobals) TypeOfUint16() xr.Type {
return g.Universe.BasicTypes[r.Uint16]
}
-func (g *CompThreadGlobals) TypeOfUint32() xr.Type {
+func (g *CompGlobals) TypeOfUint32() xr.Type {
return g.Universe.BasicTypes[r.Uint32]
}
-func (g *CompThreadGlobals) TypeOfUint64() xr.Type {
+func (g *CompGlobals) TypeOfUint64() xr.Type {
return g.Universe.BasicTypes[r.Uint64]
}
-func (g *CompThreadGlobals) TypeOfUintptr() xr.Type {
+func (g *CompGlobals) TypeOfUintptr() xr.Type {
return g.Universe.BasicTypes[r.Uintptr]
}
-func (g *CompThreadGlobals) TypeOfFloat32() xr.Type {
+func (g *CompGlobals) TypeOfFloat32() xr.Type {
return g.Universe.BasicTypes[r.Float32]
}
-func (g *CompThreadGlobals) TypeOfFloat64() xr.Type {
+func (g *CompGlobals) TypeOfFloat64() xr.Type {
return g.Universe.BasicTypes[r.Float64]
}
-func (g *CompThreadGlobals) TypeOfComplex64() xr.Type {
+func (g *CompGlobals) TypeOfComplex64() xr.Type {
return g.Universe.BasicTypes[r.Complex64]
}
-func (g *CompThreadGlobals) TypeOfComplex128() xr.Type {
+func (g *CompGlobals) TypeOfComplex128() xr.Type {
return g.Universe.BasicTypes[r.Complex128]
}
-func (g *CompThreadGlobals) TypeOfString() xr.Type {
+func (g *CompGlobals) TypeOfString() xr.Type {
return g.Universe.BasicTypes[r.String]
}
-func (g *CompThreadGlobals) TypeOfError() xr.Type {
+func (g *CompGlobals) TypeOfError() xr.Type {
return g.Universe.TypeOfError
}
-func (g *CompThreadGlobals) TypeOfInterface() xr.Type {
+func (g *CompGlobals) TypeOfInterface() xr.Type {
return g.Universe.TypeOfInterface
}
var (
rtypeOfBuiltin = r.TypeOf(Builtin{})
rtypeOfFunction = r.TypeOf(Function{})
- rtypeOfImport = r.TypeOf(Import{})
+ rtypeOfPtrImport = r.TypeOf((*Import)(nil))
rtypeOfMacro = r.TypeOf(Macro{})
rtypeOfUntypedLit = r.TypeOf(UntypedLit{})
rtypeOfReflectType = r.TypeOf((*r.Type)(nil)).Elem()
@@ -753,44 +846,50 @@ var (
zeroOfReflectType = r.Zero(rtypeOfReflectType)
)
-func (g *CompThreadGlobals) TypeOfBuiltin() xr.Type {
+func (g *CompGlobals) TypeOfBuiltin() xr.Type {
return g.Universe.ReflectTypes[rtypeOfBuiltin]
}
-func (g *CompThreadGlobals) TypeOfFunction() xr.Type {
+func (g *CompGlobals) TypeOfFunction() xr.Type {
return g.Universe.ReflectTypes[rtypeOfFunction]
}
-func (g *CompThreadGlobals) TypeOfImport() xr.Type {
- return g.Universe.ReflectTypes[rtypeOfImport]
+func (g *CompGlobals) TypeOfPtrImport() xr.Type {
+ return g.Universe.ReflectTypes[rtypeOfPtrImport]
}
-func (g *CompThreadGlobals) TypeOfMacro() xr.Type {
+func (g *CompGlobals) TypeOfMacro() xr.Type {
return g.Universe.ReflectTypes[rtypeOfMacro]
}
-func (g *CompThreadGlobals) TypeOfUntypedLit() xr.Type {
+func (g *CompGlobals) TypeOfUntypedLit() xr.Type {
return g.Universe.ReflectTypes[rtypeOfUntypedLit]
}
// A TypeAssertionError explains a failed type assertion.
type TypeAssertionError struct {
- Interface r.Type
- Concrete r.Type
- Asserted r.Type
- MissingMethod string // one method needed by Interface, missing from Concrete
+ Interface xr.Type
+ Concrete xr.Type
+ ReflectConcrete r.Type // in case Concrete is not available
+ Asserted xr.Type
+ MissingMethod *xr.Method // one method needed by Interface, missing from Concrete
}
func (*TypeAssertionError) RuntimeError() {}
func (e *TypeAssertionError) Error() string {
in := e.Interface
- concr := e.Concrete
+ var concr interface{}
+ if e.Concrete != nil {
+ concr = e.Concrete
+ } else if e.ReflectConcrete != nil {
+ concr = e.ReflectConcrete
+ }
if concr == nil {
return fmt.Sprintf("interface conversion: <%v> is nil, not <%v>", in, e.Asserted)
}
- if len(e.MissingMethod) == 0 {
+ if e.MissingMethod == nil {
return fmt.Sprintf("interface conversion: <%v> is <%v>, not <%v>", in, concr, e.Asserted)
}
- return fmt.Sprintf("interface conversion: <%v> is not <%v>: missing method ", concr, e.Asserted, e.MissingMethod)
+ return fmt.Sprintf("interface conversion: <%v> does not implement <%v>: missing method %s", concr, e.Asserted, e.MissingMethod.String())
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/unary.go b/vendor/github.com/cosmos72/gomacro/fast/unary.go
index 5d559c1..debc6e5 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/unary.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/unary.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* unary.go
@@ -53,7 +44,7 @@ func (c *Comp) UnaryExpr(node *ast.UnaryExpr) *Expr {
return c.AddressOf(node)
}
- xe := c.Expr1(node.X)
+ xe := c.Expr1(node.X, nil)
if xe.Type == nil {
return c.invalidUnaryExpr(node, xe)
}
@@ -83,7 +74,7 @@ func (c *Comp) UnaryExpr(node *ast.UnaryExpr) *Expr {
}
if isConst {
// constant propagation
- z.EvalConst(OptKeepUntyped)
+ z.EvalConst(COptKeepUntyped)
}
return z
}
@@ -93,7 +84,7 @@ func (c *Comp) UnaryExprUntyped(node *ast.UnaryExpr, xe *Expr) *Expr {
switch op {
case token.ADD, token.SUB, token.XOR, token.NOT:
xlit := xe.Value.(UntypedLit)
- ret := constant.UnaryOp(op, xlit.Obj, 0)
+ ret := constant.UnaryOp(op, xlit.Val, 0)
if ret == constant.MakeUnknown() {
return c.invalidUnaryExpr(node, xe)
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/unary_ops.go b/vendor/github.com/cosmos72/gomacro/fast/unary_ops.go
index 2bf23c9..083dc4f 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/unary_ops.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/unary_ops.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* unary_plus.go
@@ -196,13 +187,13 @@ func (c *Comp) StarExpr(node *ast.StarExpr) *Expr {
case *ast.UnaryExpr:
if e.Op == token.AND {
// optimize * & x -> x, but check that x is addressable
- c.placeOrAddress(e.X, PlaceAddress)
- return c.Expr1(e.X)
+ c.placeOrAddress(e.X, PlaceAddress, nil)
+ return c.Expr1(e.X, nil)
}
}
break
}
- addr := c.Expr1(expr) // panics if addr returns zero values, warns if returns multiple values
+ addr := c.Expr1(expr, nil) // panics if addr returns zero values, warns if returns multiple values
taddr := addr.Type
if taddr.Kind() != r.Ptr {
c.Errorf("unary operation * on non-pointer <%v>: %v", taddr, node)
diff --git a/vendor/github.com/cosmos72/gomacro/fast/util.go b/vendor/github.com/cosmos72/gomacro/fast/util.go
index 527dfe1..09a5c70 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/util.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/util.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* identifier.go
@@ -42,9 +33,6 @@ func eTrue(*Env) bool {
return true
}
-func eNone(*Env) {
-}
-
func eNil(*Env) r.Value {
return Nil
}
@@ -58,6 +46,33 @@ func nop() {
var valueOfNopFunc = r.ValueOf(nop)
+// opaqueType returns an xr.Type corresponding to rtype but without fields or methods and with the given pkgpath
+func (g *CompGlobals) opaqueType(rtype r.Type, pkgpath string) xr.Type {
+ return g.opaqueNamedType(rtype, rtype.Name(), pkgpath)
+}
+
+// opaqueNamedType returns an xr.Type corresponding to rtype but without fields or methods and with the given name and pkgpath
+func (g *CompGlobals) opaqueNamedType(rtype r.Type, name string, pkgpath string) xr.Type {
+ v := g.Universe
+ switch k := rtype.Kind(); k {
+ case r.Ptr:
+ telem := g.opaqueType(rtype.Elem(), pkgpath)
+ t := v.PtrTo(telem)
+ v.ReflectTypes[rtype] = t
+ return t
+ case r.Struct:
+ break
+ default:
+ g.Errorf("internal error: unimplemented opaqueNamedType for kind=%v, expecting kind=Struct", k)
+ }
+ t := v.NamedOf(name, pkgpath, r.Struct)
+ t.SetUnderlying(v.TypeOf(struct{}{}))
+ t.UnsafeForceReflectType(rtype)
+ v.ReflectTypes[rtype] = t // also cache Type in g.Universe.ReflectTypes
+ // g.Debugf("initialized opaque type %v <%v> <%v>", t.Kind(), t.GoType(), t.ReflectType())
+ return t
+}
+
func asIdent(node ast.Expr) *ast.Ident {
ident, _ := node.(*ast.Ident)
return ident
@@ -69,7 +84,7 @@ func (e *Expr) TryAsPred() (value bool, fun func(*Env) bool, err bool) {
if untyp.Kind != r.Bool {
return false, nil, true
}
- return constant.BoolVal(untyp.Obj), nil, false
+ return constant.BoolVal(untyp.Val), nil, false
}
if e.Type.Kind() != r.Bool {
return false, nil, true
@@ -223,7 +238,7 @@ func (e *Expr) AsX1() func(*Env) r.Value {
return eNil
}
if e.Const() {
- return valueAsX1(e.Value, e.Type, OptDefaults)
+ return valueAsX1(e.Value, e.Type, COptDefaults)
}
e.CheckX1()
return funAsX1(e.Fun, e.Type)
@@ -240,14 +255,14 @@ func (e *Expr) AsXV(opts CompileOptions) func(*Env) (r.Value, []r.Value) {
}
func valueAsX1(any I, t xr.Type, opts CompileOptions) func(*Env) r.Value {
- convertuntyped := opts&OptKeepUntyped == 0
+ convertuntyped := opts&COptKeepUntyped == 0
untyp, untyped := any.(UntypedLit)
if untyped && convertuntyped {
if t == nil || t.ReflectType() == rtypeOfUntypedLit {
t = untyp.DefaultType()
}
// Debugf("late conversion of untyped constant %v <%v> to <%v>", untyp, r.TypeOf(untyp), t)
- any = untyp.ConstTo(t)
+ any = untyp.Convert(t)
}
v := r.ValueOf(any)
if t != nil {
@@ -264,7 +279,7 @@ func valueAsX1(any I, t xr.Type, opts CompileOptions) func(*Env) r.Value {
}
func valueAsXV(any I, t xr.Type, opts CompileOptions) func(*Env) (r.Value, []r.Value) {
- convertuntyped := opts&OptKeepUntyped == 0
+ convertuntyped := opts&COptKeepUntyped == 0
untyp, untyped := any.(UntypedLit)
if convertuntyped {
if untyped {
@@ -274,7 +289,7 @@ func valueAsXV(any I, t xr.Type, opts CompileOptions) func(*Env) (r.Value, []r.V
} else {
// Debugf("valueAsXV: late conversion of untyped constant %v <%v> to <%v>", untyp, r.TypeOf(untyp), t.ReflectType())
}
- any = untyp.ConstTo(t)
+ any = untyp.Convert(t)
}
}
v := r.ValueOf(any)
@@ -989,6 +1004,110 @@ func funAsXV(fun I, t xr.Type) func(*Env) (r.Value, []r.Value) {
return nil
}
+func (e *Expr) exprXVAsI() *Expr {
+ // Debugf("exprXVAsI() %v -> %v", e.Types, e.Type)
+ e.CheckX1()
+ if e.NumOut() <= 1 {
+ return e
+ }
+ fun := e.Fun.(func(*Env) (r.Value, []r.Value))
+ t := e.Type
+ var ret I
+ switch t.Kind() {
+ case r.Bool:
+ ret = func(env *Env) bool {
+ v, _ := fun(env)
+ return v.Bool()
+ }
+ case r.Int:
+ ret = func(env *Env) int {
+ v, _ := fun(env)
+ return int(v.Int())
+ }
+ case r.Int8:
+ ret = func(env *Env) int8 {
+ v, _ := fun(env)
+ return int8(v.Int())
+ }
+ case r.Int16:
+ ret = func(env *Env) int16 {
+ v, _ := fun(env)
+ return int16(v.Int())
+ }
+ case r.Int32:
+ ret = func(env *Env) int32 {
+ v, _ := fun(env)
+ return int32(v.Int())
+ }
+ case r.Int64:
+ ret = func(env *Env) int64 {
+ v, _ := fun(env)
+ return v.Int()
+ }
+ case r.Uint:
+ ret = func(env *Env) uint {
+ v, _ := fun(env)
+ return uint(v.Uint())
+ }
+ case r.Uint8:
+ ret = func(env *Env) uint8 {
+ v, _ := fun(env)
+ return uint8(v.Uint())
+ }
+ case r.Uint16:
+ ret = func(env *Env) uint16 {
+ v, _ := fun(env)
+ return uint16(v.Uint())
+ }
+ case r.Uint32:
+ ret = func(env *Env) uint32 {
+ v, _ := fun(env)
+ return uint32(v.Uint())
+ }
+ case r.Uint64:
+ ret = func(env *Env) uint64 {
+ v, _ := fun(env)
+ return v.Uint()
+ }
+ case r.Uintptr:
+ ret = func(env *Env) uintptr {
+ v, _ := fun(env)
+ return uintptr(v.Uint())
+ }
+ case r.Float32:
+ ret = func(env *Env) float32 {
+ v, _ := fun(env)
+ return float32(v.Float())
+ }
+ case r.Float64:
+ ret = func(env *Env) float64 {
+ v, _ := fun(env)
+ return v.Float()
+ }
+ case r.Complex64:
+ ret = func(env *Env) complex64 {
+ v, _ := fun(env)
+ return complex64(v.Complex())
+ }
+ case r.Complex128:
+ ret = func(env *Env) complex128 {
+ v, _ := fun(env)
+ return v.Complex()
+ }
+ case r.String:
+ ret = func(env *Env) string {
+ v, _ := fun(env)
+ return v.String()
+ }
+ default:
+ ret = func(env *Env) r.Value {
+ v, _ := fun(env)
+ return v
+ }
+ }
+ return exprFun(t, ret)
+}
+
func (e *Expr) AsStmt() Stmt {
if e == nil || e.Const() {
return nil
@@ -1190,7 +1309,7 @@ func funList(funs []func(*Env), last *Expr, opts CompileOptions) I {
var rt r.Type
if last.Type != nil {
// keep untyped constants only if requested
- if opts != OptKeepUntyped && last.Untyped() {
+ if opts != COptKeepUntyped && last.Untyped() {
last.ConstTo(last.DefaultType())
}
rt = last.Type.ReflectType()
@@ -1559,77 +1678,77 @@ func unwrapBind(bind *Bind, t xr.Type) *Expr {
switch t.Kind() {
case r.Bool:
ret = func(env *Env) bool {
- return env.Binds[idx].Bool()
+ return env.Vals[idx].Bool()
}
case r.Int:
ret = func(env *Env) int {
- return int(env.Binds[idx].Int())
+ return int(env.Vals[idx].Int())
}
case r.Int8:
ret = func(env *Env) int8 {
- return int8(env.Binds[idx].Int())
+ return int8(env.Vals[idx].Int())
}
case r.Int16:
ret = func(env *Env) int16 {
- return int16(env.Binds[idx].Int())
+ return int16(env.Vals[idx].Int())
}
case r.Int32:
ret = func(env *Env) int32 {
- return int32(env.Binds[idx].Int())
+ return int32(env.Vals[idx].Int())
}
case r.Int64:
ret = func(env *Env) int64 {
- return env.Binds[idx].Int()
+ return env.Vals[idx].Int()
}
case r.Uint:
ret = func(env *Env) uint {
- return uint(env.Binds[idx].Uint())
+ return uint(env.Vals[idx].Uint())
}
case r.Uint8:
ret = func(env *Env) uint8 {
- return uint8(env.Binds[idx].Uint())
+ return uint8(env.Vals[idx].Uint())
}
case r.Uint16:
ret = func(env *Env) uint16 {
- return uint16(env.Binds[idx].Uint())
+ return uint16(env.Vals[idx].Uint())
}
case r.Uint32:
ret = func(env *Env) uint32 {
- return uint32(env.Binds[idx].Uint())
+ return uint32(env.Vals[idx].Uint())
}
case r.Uint64:
ret = func(env *Env) uint64 {
- return env.Binds[idx].Uint()
+ return env.Vals[idx].Uint()
}
case r.Uintptr:
ret = func(env *Env) uintptr {
- return uintptr(env.Binds[idx].Uint())
+ return uintptr(env.Vals[idx].Uint())
}
case r.Float32:
ret = func(env *Env) float32 {
- return float32(env.Binds[idx].Float())
+ return float32(env.Vals[idx].Float())
}
case r.Float64:
ret = func(env *Env) float64 {
- return env.Binds[idx].Float()
+ return env.Vals[idx].Float()
}
case r.Complex64:
ret = func(env *Env) complex64 {
- return complex64(env.Binds[idx].Complex())
+ return complex64(env.Vals[idx].Complex())
}
case r.Complex128:
ret = func(env *Env) complex128 {
- return env.Binds[idx].Complex()
+ return env.Vals[idx].Complex()
}
case r.String:
ret = func(env *Env) string {
- return env.Binds[idx].String()
+ return env.Vals[idx].String()
}
default:
rtype := t.ReflectType()
zero := r.Zero(rtype)
ret = func(env *Env) r.Value {
- v := env.Binds[idx]
+ v := env.Vals[idx]
if !v.IsValid() {
v = zero
} else if v.Type() != rtype {
@@ -1649,77 +1768,77 @@ func unwrapBindUp1(bind *Bind, t xr.Type) *Expr {
switch t.Kind() {
case r.Bool:
ret = func(env *Env) bool {
- return env.Outer.Binds[idx].Bool()
+ return env.Outer.Vals[idx].Bool()
}
case r.Int:
ret = func(env *Env) int {
- return int(env.Outer.Binds[idx].Int())
+ return int(env.Outer.Vals[idx].Int())
}
case r.Int8:
ret = func(env *Env) int8 {
- return int8(env.Outer.Binds[idx].Int())
+ return int8(env.Outer.Vals[idx].Int())
}
case r.Int16:
ret = func(env *Env) int16 {
- return int16(env.Outer.Binds[idx].Int())
+ return int16(env.Outer.Vals[idx].Int())
}
case r.Int32:
ret = func(env *Env) int32 {
- return int32(env.Outer.Binds[idx].Int())
+ return int32(env.Outer.Vals[idx].Int())
}
case r.Int64:
ret = func(env *Env) int64 {
- return env.Outer.Binds[idx].Int()
+ return env.Outer.Vals[idx].Int()
}
case r.Uint:
ret = func(env *Env) uint {
- return uint(env.Outer.Binds[idx].Uint())
+ return uint(env.Outer.Vals[idx].Uint())
}
case r.Uint8:
ret = func(env *Env) uint8 {
- return uint8(env.Outer.Binds[idx].Uint())
+ return uint8(env.Outer.Vals[idx].Uint())
}
case r.Uint16:
ret = func(env *Env) uint16 {
- return uint16(env.Outer.Binds[idx].Uint())
+ return uint16(env.Outer.Vals[idx].Uint())
}
case r.Uint32:
ret = func(env *Env) uint32 {
- return uint32(env.Outer.Binds[idx].Uint())
+ return uint32(env.Outer.Vals[idx].Uint())
}
case r.Uint64:
ret = func(env *Env) uint64 {
- return env.Outer.Binds[idx].Uint()
+ return env.Outer.Vals[idx].Uint()
}
case r.Uintptr:
ret = func(env *Env) uintptr {
- return uintptr(env.Outer.Binds[idx].Uint())
+ return uintptr(env.Outer.Vals[idx].Uint())
}
case r.Float32:
ret = func(env *Env) float32 {
- return float32(env.Outer.Binds[idx].Float())
+ return float32(env.Outer.Vals[idx].Float())
}
case r.Float64:
ret = func(env *Env) float64 {
- return env.Outer.Binds[idx].Float()
+ return env.Outer.Vals[idx].Float()
}
case r.Complex64:
ret = func(env *Env) complex64 {
- return complex64(env.Outer.Binds[idx].Complex())
+ return complex64(env.Outer.Vals[idx].Complex())
}
case r.Complex128:
ret = func(env *Env) complex128 {
- return env.Outer.Binds[idx].Complex()
+ return env.Outer.Vals[idx].Complex()
}
case r.String:
ret = func(env *Env) string {
- return env.Outer.Binds[idx].String()
+ return env.Outer.Vals[idx].String()
}
default:
rtype := t.ReflectType()
zero := r.Zero(rtype)
ret = func(env *Env) r.Value {
- v := env.Outer.Binds[idx]
+ v := env.Outer.Vals[idx]
if !v.IsValid() {
v = zero
} else if v.Type() != rtype {
diff --git a/vendor/github.com/cosmos72/gomacro/fast/var_ops.go b/vendor/github.com/cosmos72/gomacro/fast/var_ops.go
index 9575265..fe136b2 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/var_ops.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/var_ops.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* var_setops.go
@@ -31,6 +22,7 @@
package fast
import (
+ "fmt"
"go/token"
r "reflect"
"unsafe"
@@ -57,7 +49,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -66,7 +58,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -81,7 +73,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -91,7 +83,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -106,7 +98,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -116,7 +108,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -126,29 +118,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -158,20 +141,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -189,7 +181,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -198,7 +190,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -213,7 +205,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -223,7 +215,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -238,7 +230,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -248,7 +240,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -258,29 +250,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -290,20 +273,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -321,7 +313,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -330,7 +322,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -345,7 +337,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -355,7 +347,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -370,7 +362,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -380,7 +372,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -390,29 +382,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -422,20 +405,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -453,7 +445,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -462,7 +454,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -477,7 +469,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -487,7 +479,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -502,7 +494,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -512,7 +504,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -522,29 +514,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -554,20 +537,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -585,7 +577,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -594,7 +586,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -609,7 +601,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -619,7 +611,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -634,7 +626,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -644,7 +636,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -654,29 +646,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -686,20 +669,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(val,
),
)
@@ -717,7 +709,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -726,7 +718,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -741,7 +733,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -751,7 +743,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -766,7 +758,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -776,7 +768,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -786,29 +778,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -818,20 +801,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -849,7 +841,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -858,7 +850,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -873,7 +865,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -883,7 +875,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -898,7 +890,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -908,7 +900,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -918,29 +910,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -950,20 +933,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -981,7 +973,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -990,7 +982,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1005,7 +997,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1015,7 +1007,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1030,7 +1022,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1040,7 +1032,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1050,29 +1042,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1082,20 +1065,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1113,7 +1105,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1122,7 +1114,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1137,7 +1129,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1147,7 +1139,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1162,7 +1154,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1172,7 +1164,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1182,29 +1174,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1214,20 +1197,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1246,7 +1238,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] += val
+ Ints[index] += val
env.IP++
return env.Code[env.IP], env
@@ -1255,7 +1247,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1271,7 +1263,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] += val
+ Ints[index] += val
env.IP++
return env.Code[env.IP], env
@@ -1281,7 +1273,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1297,7 +1289,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] += val
+ Ints[index] += val
env.IP++
return env.Code[env.IP], env
@@ -1307,7 +1299,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1317,31 +1309,21 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] += val
+ env.FileEnv.
+ Ints[index] += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1351,21 +1333,31 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1383,7 +1375,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1392,7 +1384,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1407,7 +1399,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1417,7 +1409,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1432,7 +1424,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1442,7 +1434,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1452,29 +1444,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1484,20 +1467,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(val,
),
)
@@ -1517,7 +1509,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1526,7 +1518,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1541,7 +1533,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1551,7 +1543,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1566,7 +1558,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1576,7 +1568,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1586,29 +1578,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1618,20 +1601,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1649,7 +1641,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1658,7 +1650,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1673,7 +1665,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1683,7 +1675,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1698,7 +1690,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1708,7 +1700,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1718,29 +1710,20 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1750,20 +1733,29 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(val,
),
)
@@ -1783,7 +1775,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) += val
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1792,7 +1784,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(val,
),
)
@@ -1807,7 +1799,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += val
+ Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1817,7 +1809,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(val,
),
)
@@ -1832,7 +1824,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += val
+ Outer.Outer.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1842,7 +1834,30 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(val,
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(val,
),
)
@@ -1860,7 +1875,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) += val
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1874,7 +1889,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(val,
),
)
@@ -1884,11 +1899,15 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Complex128:
+ val := r.ValueOf(val).Complex()
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += val
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) += val
env.IP++
return env.Code[env.IP], env
@@ -1896,8 +1915,8 @@ func (c *Comp) varAddConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(val,
),
)
@@ -1907,86 +1926,110 @@ func (c *Comp) varAddConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Complex128:
- val := r.ValueOf(val).Complex()
- switch upn {
- case 0:
+ case 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case 1:
+ case 2:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) += val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case 2:
+ case c.Depth - 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) += val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
default:
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) += val
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- val,
- )
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(val,
+ ),
+ )
+ }
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- val,
- )
+ env.IP++
+ return env.Code[env.IP], env
}
-
- env.IP++
- return env.Code[env.IP], env
}
}
case r.String:
@@ -1997,7 +2040,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetString(lhs.String() +
val,
)
@@ -2012,7 +2055,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetString(lhs.String() +
val,
)
@@ -2027,7 +2070,7 @@ func (c *Comp) varAddConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetString(lhs.String() +
val,
)
@@ -2036,17 +2079,12 @@ func (c *Comp) varAddConst(va *Var, val I) {
env.IP++
return env.Code[env.IP], env
}
- default:
+ case c.Depth - 1:
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetString(lhs.String() +
val,
)
@@ -2055,12 +2093,17 @@ func (c *Comp) varAddConst(va *Var, val I) {
env.IP++
return env.Code[env.IP], env
}
- case c.Depth - 1:
+ default:
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetString(lhs.String() +
val,
)
@@ -2090,7 +2133,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2099,7 +2142,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2114,7 +2157,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2124,7 +2167,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2139,7 +2182,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2149,7 +2192,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2159,29 +2202,20 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2191,20 +2225,29 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2221,7 +2264,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2230,7 +2273,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2245,7 +2288,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2255,7 +2298,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2270,7 +2313,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2280,7 +2323,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2290,29 +2333,20 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2322,20 +2356,29 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2352,7 +2395,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2361,7 +2404,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2376,7 +2419,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2386,7 +2429,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2401,7 +2444,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2411,7 +2454,30 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() + int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2429,7 +2495,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2443,7 +2509,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2453,11 +2519,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2465,8 +2534,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2476,14 +2545,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2492,7 +2559,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2502,12 +2570,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2516,8 +2584,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2527,12 +2595,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2540,9 +2607,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2560,7 +2626,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2574,7 +2640,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2584,11 +2650,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2596,8 +2665,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2607,14 +2676,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2623,7 +2690,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2633,12 +2701,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2647,8 +2715,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2658,12 +2726,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2671,9 +2738,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2691,7 +2757,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2705,7 +2771,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() + int64(fun(env),
),
)
@@ -2715,11 +2781,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2727,9 +2796,9 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() + int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
}
@@ -2738,14 +2807,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2754,7 +2821,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2764,12 +2832,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2778,8 +2846,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2789,12 +2857,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2802,9 +2869,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2822,7 +2888,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2836,7 +2902,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2846,11 +2912,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2858,8 +2927,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2869,14 +2938,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2885,7 +2952,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2895,12 +2963,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2909,8 +2977,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2920,12 +2988,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2933,9 +3000,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2953,7 +3019,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2967,7 +3033,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -2977,11 +3043,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2989,8 +3058,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3000,14 +3069,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3016,7 +3083,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3026,12 +3094,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3040,8 +3108,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3051,12 +3119,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3064,9 +3131,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3084,7 +3150,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3098,7 +3164,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3108,11 +3174,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3120,8 +3189,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3131,14 +3200,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3147,7 +3214,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3157,12 +3225,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3171,8 +3239,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3182,12 +3250,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3195,9 +3262,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3215,7 +3281,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3229,7 +3295,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3239,11 +3305,15 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ env.
+ Ints[index] += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3251,8 +3321,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3262,15 +3332,13 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] += fun(env)
+ Outer.
+ Ints[index] += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3279,7 +3347,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3289,13 +3358,13 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] += fun(env)
+ Outer.Outer.
+ Ints[index] += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3304,8 +3373,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3315,13 +3384,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] += fun(env)
+ env.FileEnv.
+ Ints[index] += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3329,9 +3397,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3351,7 +3418,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
}
o.
- IntBinds[index] += fun(env)
+ Ints[index] += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3365,7 +3432,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3375,12 +3442,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] += fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3388,8 +3457,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3399,14 +3468,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3415,7 +3482,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3425,12 +3493,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3439,8 +3507,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3450,12 +3518,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3463,9 +3530,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3483,7 +3549,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3497,7 +3563,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() + uint64(fun(env),
),
)
@@ -3507,11 +3573,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3519,9 +3588,9 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetUint(lhs.Uint() + uint64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
}
@@ -3530,14 +3599,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*float32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3546,7 +3613,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3556,12 +3624,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3570,8 +3638,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3581,12 +3649,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3594,9 +3661,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3614,7 +3680,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3628,7 +3694,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3638,11 +3704,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3650,8 +3719,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3661,14 +3730,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*float64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3677,7 +3744,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3687,12 +3755,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3701,8 +3769,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3712,12 +3780,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3725,9 +3792,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3745,7 +3811,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3759,7 +3825,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() + float64(fun(env),
),
)
@@ -3769,11 +3835,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3781,9 +3850,9 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetFloat(lhs.Float() + float64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(fun(env),
),
)
}
@@ -3792,14 +3861,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) complex64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) += fun(env)
+ *(*complex64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3808,7 +3875,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(fun(env),
),
)
@@ -3818,12 +3886,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) += fun(env)
+ Outer.Outer.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3832,8 +3900,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(fun(env),
),
)
@@ -3843,12 +3911,11 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) += fun(env)
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3856,9 +3923,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(fun(env),
),
)
@@ -3876,7 +3942,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) += fun(env)
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3890,7 +3956,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(fun(env),
),
)
@@ -3900,11 +3966,14 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex128:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) += fun(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) += fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3912,8 +3981,8 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetComplex(lhs.Complex() + complex128(fun(env),
),
)
@@ -3923,85 +3992,110 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) complex128:
- switch upn {
- case 0:
+ case 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) += fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case 1:
+ case 2:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) += fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case 2:
+ case c.Depth - 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) += fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
default:
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) += fun(env)
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- fun(env),
- )
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() + complex128(fun(env),
+ ),
+ )
+ }
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() +
- fun(env),
- )
+ env.IP++
+ return env.Code[env.IP], env
}
-
- env.IP++
- return env.Code[env.IP], env
}
}
case func(*Env) string:
@@ -4011,7 +4105,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetString(lhs.String() +
fun(env),
)
@@ -4026,7 +4120,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetString(lhs.String() +
fun(env),
)
@@ -4041,7 +4135,7 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetString(lhs.String() +
fun(env),
)
@@ -4050,17 +4144,12 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
env.IP++
return env.Code[env.IP], env
}
- default:
+ case c.Depth - 1:
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetString(lhs.String() +
fun(env),
)
@@ -4069,12 +4158,17 @@ func (c *Comp) varAddExpr(va *Var, fun I) {
env.IP++
return env.Code[env.IP], env
}
- case c.Depth - 1:
+ default:
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetString(lhs.String() +
fun(env),
)
@@ -4109,7 +4203,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4118,7 +4212,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4133,7 +4227,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4143,7 +4237,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4158,7 +4252,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4168,7 +4262,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4178,29 +4272,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4210,20 +4295,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4241,7 +4335,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4250,7 +4344,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4265,7 +4359,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4275,7 +4369,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4290,7 +4384,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4300,7 +4394,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4310,29 +4404,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4342,20 +4427,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4373,7 +4467,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4382,7 +4476,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4397,7 +4491,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4407,7 +4501,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4422,7 +4516,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4432,7 +4526,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4442,29 +4536,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4474,20 +4559,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4505,7 +4599,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4514,7 +4608,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4529,7 +4623,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4539,7 +4633,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4554,7 +4648,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4564,7 +4658,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4574,29 +4668,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4606,20 +4691,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4637,7 +4731,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4646,7 +4740,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4661,7 +4755,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4671,7 +4765,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4686,7 +4780,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4696,7 +4790,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4706,29 +4800,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4738,20 +4823,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(val,
),
)
@@ -4769,7 +4863,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4778,7 +4872,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4793,7 +4887,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4803,7 +4897,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4818,7 +4912,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4828,7 +4922,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4838,29 +4932,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4870,20 +4955,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4901,7 +4995,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4910,7 +5004,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4925,7 +5019,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4935,7 +5029,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4950,7 +5044,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -4960,7 +5054,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -4970,29 +5064,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5002,20 +5087,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5033,7 +5127,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5042,7 +5136,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5057,7 +5151,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5067,7 +5161,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5082,7 +5176,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5092,7 +5186,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5102,29 +5196,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5134,20 +5219,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5165,7 +5259,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5174,7 +5268,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5189,7 +5283,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5199,7 +5293,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5214,7 +5308,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5224,7 +5318,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5234,29 +5328,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5266,20 +5351,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5298,7 +5392,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] -= val
+ Ints[index] -= val
env.IP++
return env.Code[env.IP], env
@@ -5307,7 +5401,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5323,7 +5417,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] -= val
+ Ints[index] -= val
env.IP++
return env.Code[env.IP], env
@@ -5333,7 +5427,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5349,7 +5443,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] -= val
+ Ints[index] -= val
env.IP++
return env.Code[env.IP], env
@@ -5359,7 +5453,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5369,31 +5463,21 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] -= val
+ env.FileEnv.
+ Ints[index] -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5403,21 +5487,31 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5435,7 +5529,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5444,7 +5538,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5459,7 +5553,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5469,7 +5563,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5484,7 +5578,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5494,7 +5588,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5504,29 +5598,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5536,20 +5621,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(val,
),
)
@@ -5569,7 +5663,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5578,7 +5672,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5593,7 +5687,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5603,7 +5697,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5618,7 +5712,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5628,7 +5722,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5638,29 +5732,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5670,20 +5755,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5701,7 +5795,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5710,7 +5804,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5725,7 +5819,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5735,7 +5829,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5750,7 +5844,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5760,7 +5854,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5770,29 +5864,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5802,20 +5887,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(val,
),
)
@@ -5835,7 +5929,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) -= val
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5844,7 +5938,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(val,
),
)
@@ -5859,7 +5953,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= val
+ Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5869,7 +5963,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(val,
),
)
@@ -5884,7 +5978,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= val
+ Outer.Outer.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
@@ -5894,7 +5988,7 @@ func (c *Comp) varSubConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(val,
),
)
@@ -5904,29 +5998,20 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) -= val
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(val,
),
)
@@ -5936,20 +6021,29 @@ func (c *Comp) varSubConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) -= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(val,
),
)
@@ -5965,80 +6059,131 @@ func (c *Comp) varSubConst(va *Var, val I) {
switch upn {
case 0:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) -= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
case 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
case 2:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) -= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- default:
+ case c.Depth - 1:
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= val
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- val,
- )
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case c.Depth - 1:
+ default:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) -= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- env.IP++
- return env.Code[env.IP], env
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(val,
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
default:
@@ -6061,7 +6206,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6070,7 +6215,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6085,7 +6230,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6095,7 +6240,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6110,7 +6255,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6120,7 +6265,30 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() - int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6138,7 +6306,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6152,7 +6320,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6162,11 +6330,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6174,8 +6345,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6185,14 +6356,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6201,7 +6370,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6211,12 +6381,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6225,8 +6395,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6236,12 +6406,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6249,9 +6418,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6269,7 +6437,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6283,7 +6451,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6293,11 +6461,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6305,8 +6476,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6316,14 +6487,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6332,7 +6501,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6342,12 +6512,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6356,8 +6526,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6367,12 +6537,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6380,9 +6549,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6400,7 +6568,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6414,7 +6582,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6424,11 +6592,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6436,8 +6607,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6447,14 +6618,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6463,7 +6632,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6473,12 +6643,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6487,8 +6657,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6498,12 +6668,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6511,9 +6680,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6531,7 +6699,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6545,7 +6713,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6555,11 +6723,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6567,8 +6738,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6578,14 +6749,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6594,7 +6763,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6604,12 +6774,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6618,8 +6788,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6629,12 +6799,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6642,9 +6811,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6662,7 +6830,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6676,7 +6844,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() - int64(fun(env),
),
)
@@ -6686,11 +6854,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6698,9 +6869,9 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() - int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
}
@@ -6709,14 +6880,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6725,7 +6894,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6735,12 +6905,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6749,8 +6919,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6760,12 +6930,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6773,9 +6942,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6793,7 +6961,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6807,7 +6975,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6817,11 +6985,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6829,8 +7000,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6840,14 +7011,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6856,7 +7025,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6866,12 +7036,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6880,8 +7050,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6891,12 +7061,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6904,9 +7073,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6924,7 +7092,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6938,7 +7106,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6948,11 +7116,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6960,8 +7131,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6971,14 +7142,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -6987,7 +7156,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -6997,12 +7167,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7011,8 +7181,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7022,12 +7192,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7035,9 +7204,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7055,7 +7223,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7069,7 +7237,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7079,11 +7247,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7091,8 +7262,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7102,14 +7273,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7118,7 +7287,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7128,12 +7298,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7142,8 +7312,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7153,12 +7323,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7166,9 +7335,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7186,7 +7354,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7200,7 +7368,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7210,11 +7378,15 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ env.
+ Ints[index] -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7222,8 +7394,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7233,15 +7405,13 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] -= fun(env)
+ Outer.
+ Ints[index] -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7250,7 +7420,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7260,13 +7431,13 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] -= fun(env)
+ Outer.Outer.
+ Ints[index] -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7275,8 +7446,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7286,13 +7457,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] -= fun(env)
+ env.FileEnv.
+ Ints[index] -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7300,9 +7470,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7322,7 +7491,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
}
o.
- IntBinds[index] -= fun(env)
+ Ints[index] -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7336,7 +7505,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7346,12 +7515,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] -= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7359,8 +7530,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7370,14 +7541,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7386,7 +7555,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7396,12 +7566,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7410,8 +7580,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7421,12 +7591,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7434,9 +7603,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7454,7 +7622,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7468,7 +7636,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() - uint64(fun(env),
),
)
@@ -7478,11 +7646,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7490,9 +7661,9 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetUint(lhs.Uint() - uint64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
}
@@ -7501,14 +7672,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*float32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7517,7 +7686,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7527,12 +7697,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7541,8 +7711,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7552,12 +7722,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7565,9 +7734,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7585,7 +7753,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7599,7 +7767,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7609,11 +7777,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7621,8 +7792,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7632,14 +7803,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*float64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7648,7 +7817,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7658,12 +7828,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7672,8 +7842,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7683,12 +7853,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7696,9 +7865,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7716,7 +7884,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7730,7 +7898,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() - float64(fun(env),
),
)
@@ -7740,11 +7908,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7752,9 +7923,9 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetFloat(lhs.Float() - float64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(fun(env),
),
)
}
@@ -7763,14 +7934,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) complex64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) -= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7779,7 +7948,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(fun(env),
),
)
@@ -7789,12 +7959,12 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) -= fun(env)
+ Outer.Outer.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7803,8 +7973,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(fun(env),
),
)
@@ -7814,12 +7984,11 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) -= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7827,9 +7996,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(fun(env),
),
)
@@ -7847,7 +8015,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) -= fun(env)
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7861,7 +8029,7 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(fun(env),
),
)
@@ -7871,11 +8039,14 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex128:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) -= fun(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) -= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -7883,8 +8054,8 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetComplex(lhs.Complex() - complex128(fun(env),
),
)
@@ -7894,85 +8065,110 @@ func (c *Comp) varSubExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) complex128:
- switch upn {
- case 0:
-
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
case 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) -= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
case 2:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- fun(env),
- )
- }
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) -= fun(env)
- env.IP++
- return env.Code[env.IP], env
- }
- default:
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(fun(env),
+ ),
+ )
+ }
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
+ env.IP++
+ return env.Code[env.IP], env
}
+ }
+ case c.Depth - 1:
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) -= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case c.Depth - 1:
+ default:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() -
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) -= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- env.IP++
- return env.Code[env.IP], env
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() - complex128(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
default:
@@ -8004,7 +8200,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8013,7 +8209,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8028,7 +8224,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8038,7 +8234,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8053,7 +8249,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8063,7 +8259,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8073,29 +8269,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8105,20 +8292,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8136,7 +8332,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8145,7 +8341,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8160,7 +8356,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8170,7 +8366,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8185,7 +8381,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8195,7 +8391,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8205,29 +8401,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8237,20 +8424,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8268,7 +8464,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8277,7 +8473,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8292,7 +8488,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8302,7 +8498,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8317,7 +8513,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8327,7 +8523,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8337,29 +8533,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8369,20 +8556,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8400,7 +8596,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8409,7 +8605,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8424,7 +8620,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8434,7 +8630,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8449,7 +8645,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8459,7 +8655,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8469,29 +8665,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8501,20 +8688,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8532,7 +8728,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8541,7 +8737,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8556,7 +8752,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8566,7 +8762,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8581,7 +8777,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8591,7 +8787,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8601,29 +8797,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8633,20 +8820,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(val,
),
)
@@ -8664,7 +8860,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8673,7 +8869,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8688,7 +8884,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8698,7 +8894,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8713,7 +8909,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8723,7 +8919,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8733,29 +8929,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8765,20 +8952,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8796,7 +8992,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8805,7 +9001,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8820,7 +9016,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8830,7 +9026,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8845,7 +9041,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8855,7 +9051,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8865,29 +9061,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8897,20 +9084,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8928,7 +9124,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8937,7 +9133,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8952,7 +9148,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8962,7 +9158,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8977,7 +9173,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -8987,7 +9183,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -8997,29 +9193,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9029,20 +9216,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9060,7 +9256,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9069,7 +9265,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9084,7 +9280,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9094,7 +9290,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9109,7 +9305,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9119,7 +9315,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9129,29 +9325,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9161,20 +9348,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9193,7 +9389,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] *= val
+ Ints[index] *= val
env.IP++
return env.Code[env.IP], env
@@ -9202,7 +9398,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9218,7 +9414,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] *= val
+ Ints[index] *= val
env.IP++
return env.Code[env.IP], env
@@ -9228,7 +9424,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9244,7 +9440,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] *= val
+ Ints[index] *= val
env.IP++
return env.Code[env.IP], env
@@ -9254,7 +9450,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9264,31 +9460,21 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] *= val
+ env.FileEnv.
+ Ints[index] *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9298,21 +9484,31 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9330,7 +9526,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9339,7 +9535,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9354,7 +9550,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9364,7 +9560,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9379,7 +9575,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9389,7 +9585,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9399,29 +9595,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9431,20 +9618,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(val,
),
)
@@ -9464,7 +9660,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9473,7 +9669,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9488,7 +9684,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9498,7 +9694,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9513,7 +9709,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9523,7 +9719,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9533,29 +9729,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9565,20 +9752,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9596,7 +9792,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9605,7 +9801,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9620,7 +9816,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9630,7 +9826,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9645,7 +9841,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9655,7 +9851,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9665,29 +9861,20 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9697,20 +9884,29 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(val,
),
)
@@ -9730,7 +9926,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) *= val
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9739,7 +9935,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(val,
),
)
@@ -9754,7 +9950,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= val
+ Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9764,7 +9960,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(val,
),
)
@@ -9779,7 +9975,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= val
+ Outer.Outer.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9789,7 +9985,30 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(val,
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(val,
),
)
@@ -9807,7 +10026,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) *= val
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9821,7 +10040,7 @@ func (c *Comp) varMulConst(va *Var, val I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(val,
),
)
@@ -9831,11 +10050,15 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Complex128:
+ val := r.ValueOf(val).Complex()
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= val
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) *= val
env.IP++
return env.Code[env.IP], env
@@ -9843,8 +10066,8 @@ func (c *Comp) varMulConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(val,
),
)
@@ -9854,87 +10077,111 @@ func (c *Comp) varMulConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Complex128:
- val := r.ValueOf(val).Complex()
- switch upn {
- case 0:
-
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- val,
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
case 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
case 2:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- val,
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- default:
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) *= val
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(val,
+ ),
+ )
+ }
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- val,
- )
+ env.IP++
+ return env.Code[env.IP], env
}
-
- env.IP++
- return env.Code[env.IP], env
}
case c.Depth - 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- val,
- )
- }
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= val
- env.IP++
- return env.Code[env.IP], env
- }
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(val,
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ default:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) *= val
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(val,
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
}
default:
c.Errorf(`invalid operator %s= on <%v>`, token.MUL, t)
@@ -9956,7 +10203,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -9965,7 +10212,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -9980,7 +10227,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -9990,7 +10237,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10005,7 +10252,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10015,7 +10262,30 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() * int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10033,7 +10303,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10047,7 +10317,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10057,11 +10327,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10069,8 +10342,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10080,14 +10353,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10096,7 +10367,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10106,12 +10378,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10120,8 +10392,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10131,12 +10403,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10144,9 +10415,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10164,7 +10434,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10178,7 +10448,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10188,11 +10458,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10200,8 +10473,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10211,14 +10484,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10227,7 +10498,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10237,12 +10509,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10251,8 +10523,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10262,12 +10534,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10275,9 +10546,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10295,7 +10565,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10309,7 +10579,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10319,11 +10589,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10331,8 +10604,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10342,14 +10615,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10358,7 +10629,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10368,12 +10640,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10382,8 +10654,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10393,12 +10665,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10406,9 +10677,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10426,7 +10696,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10440,7 +10710,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10450,11 +10720,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10462,8 +10735,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10473,14 +10746,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10489,7 +10760,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10499,12 +10771,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10513,8 +10785,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10524,12 +10796,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10537,9 +10808,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10557,7 +10827,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10571,7 +10841,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() * int64(fun(env),
),
)
@@ -10581,11 +10851,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10593,9 +10866,9 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() * int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
}
@@ -10604,14 +10877,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10620,7 +10891,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10630,12 +10902,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10644,8 +10916,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10655,12 +10927,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10668,9 +10939,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10688,7 +10958,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10702,7 +10972,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10712,11 +10982,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10724,8 +10997,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10735,14 +11008,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10751,7 +11022,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10761,12 +11033,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10775,8 +11047,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10786,12 +11058,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10799,9 +11070,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10819,7 +11089,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10833,7 +11103,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10843,11 +11113,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10855,8 +11128,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10866,14 +11139,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10882,7 +11153,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10892,12 +11164,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10906,8 +11178,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10917,12 +11189,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10930,9 +11201,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10950,7 +11220,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10964,7 +11234,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10974,11 +11244,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -10986,8 +11259,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -10997,14 +11270,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11013,7 +11284,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11023,12 +11295,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11037,8 +11309,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11048,12 +11320,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11061,9 +11332,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11081,7 +11351,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11095,7 +11365,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11105,11 +11375,15 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ env.
+ Ints[index] *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11117,8 +11391,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11128,15 +11402,13 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] *= fun(env)
+ Outer.
+ Ints[index] *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11145,7 +11417,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11155,13 +11428,13 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] *= fun(env)
+ Outer.Outer.
+ Ints[index] *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11170,8 +11443,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11181,13 +11454,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] *= fun(env)
+ env.FileEnv.
+ Ints[index] *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11195,9 +11467,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11217,7 +11488,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
}
o.
- IntBinds[index] *= fun(env)
+ Ints[index] *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11231,7 +11502,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11241,12 +11512,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] *= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11254,8 +11527,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11265,14 +11538,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11281,7 +11552,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11291,12 +11563,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11305,8 +11577,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11316,12 +11588,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11329,9 +11600,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11349,7 +11619,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11363,7 +11633,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() * uint64(fun(env),
),
)
@@ -11373,11 +11643,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11385,9 +11658,9 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetUint(lhs.Uint() * uint64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
}
@@ -11396,14 +11669,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*float32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11412,7 +11683,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11422,12 +11694,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11436,8 +11708,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11447,12 +11719,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11460,9 +11731,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11480,7 +11750,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11494,7 +11764,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11504,11 +11774,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11516,8 +11789,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11527,14 +11800,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*float64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11543,7 +11814,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11553,12 +11825,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11567,8 +11839,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11578,12 +11850,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11591,9 +11862,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11611,7 +11881,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11625,7 +11895,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() * float64(fun(env),
),
)
@@ -11635,11 +11905,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11647,9 +11920,9 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetFloat(lhs.Float() * float64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(fun(env),
),
)
}
@@ -11658,14 +11931,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) complex64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) *= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11674,7 +11945,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(fun(env),
),
)
@@ -11684,12 +11956,12 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) *= fun(env)
+ Outer.Outer.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11698,8 +11970,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(fun(env),
),
)
@@ -11709,12 +11981,11 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) *= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11722,9 +11993,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(fun(env),
),
)
@@ -11742,7 +12012,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) *= fun(env)
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11756,7 +12026,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(fun(env),
),
)
@@ -11766,11 +12036,14 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex128:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) *= fun(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) *= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -11778,8 +12051,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetComplex(lhs.Complex() * complex128(fun(env),
),
)
@@ -11789,85 +12062,110 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) complex128:
- switch upn {
- case 0:
+ case 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) *= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case 1:
+ case 2:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) *= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case 2:
+ case c.Depth - 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) *= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(fun(env),
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
default:
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) *= fun(env)
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- fun(env),
- )
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() * complex128(fun(env),
+ ),
+ )
+ }
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() *
- fun(env),
- )
+ env.IP++
+ return env.Code[env.IP], env
}
-
- env.IP++
- return env.Code[env.IP], env
}
}
default:
@@ -11924,7 +12222,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -11938,7 +12236,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
} else {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -11962,7 +12260,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -11977,7 +12275,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12000,7 +12298,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12015,7 +12313,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12029,7 +12327,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- default:
+ case c.Depth - 1:
{
y_1 :=
@@ -12037,11 +12335,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12054,12 +12348,8 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12073,7 +12363,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- case c.Depth - 1:
+ default:
{
y_1 :=
@@ -12081,7 +12371,11 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ addr := (*int)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12094,8 +12388,12 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- addr := (*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ addr := (*int)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12122,7 +12420,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int8)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12136,7 +12434,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
} else {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int8)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int8)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12160,7 +12458,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12175,7 +12473,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12198,7 +12496,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12213,7 +12511,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12227,7 +12525,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- default:
+ case c.Depth - 1:
{
y_1 :=
@@ -12235,11 +12533,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int8)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int8)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12252,12 +12546,8 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int8)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int8)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12271,7 +12561,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- case c.Depth - 1:
+ default:
{
y_1 :=
@@ -12279,7 +12569,11 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ addr := (*int8)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12292,8 +12586,12 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- addr := (*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ addr := (*int8)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12320,7 +12618,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int16)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12334,7 +12632,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
} else {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int16)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int16)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12358,7 +12656,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12373,7 +12671,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12396,7 +12694,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12411,7 +12709,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12425,7 +12723,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- default:
+ case c.Depth - 1:
{
y_1 :=
@@ -12433,11 +12731,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int16)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int16)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12450,12 +12744,8 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int16)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int16)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12469,7 +12759,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- case c.Depth - 1:
+ default:
{
y_1 :=
@@ -12477,7 +12767,11 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ addr := (*int16)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12490,8 +12784,12 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- addr := (*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ addr := (*int16)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12518,7 +12816,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int32)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12532,7 +12830,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
} else {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int32)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int32)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12556,7 +12854,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12571,7 +12869,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12594,7 +12892,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12609,7 +12907,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12623,7 +12921,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- default:
+ case c.Depth - 1:
{
y_1 :=
@@ -12631,11 +12929,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int32)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int32)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12648,12 +12942,8 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int32)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int32)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12667,7 +12957,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- case c.Depth - 1:
+ default:
{
y_1 :=
@@ -12675,7 +12965,11 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ addr := (*int32)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12688,8 +12982,12 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- addr := (*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ addr := (*int32)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12716,7 +13014,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int64)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12730,7 +13028,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
} else {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int64)(unsafe.Pointer(&env.IntBinds[index]))
+ addr := (*int64)(unsafe.Pointer(&env.Ints[index]))
n := *addr
if n < 0 {
@@ -12754,7 +13052,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12769,7 +13067,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index]))
+ Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12792,7 +13090,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12807,7 +13105,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
addr := (*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index]))
+ Outer.Outer.Ints[index]))
n := *addr
if n < 0 {
@@ -12821,7 +13119,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- default:
+ case c.Depth - 1:
{
y_1 :=
@@ -12829,11 +13127,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int64)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int64)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12846,12 +13140,8 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- addr := (*int64)(unsafe.Pointer(&o.IntBinds[index]))
+ addr := (*int64)(unsafe.Pointer(&env.FileEnv.Ints[index]))
n := *addr
if n < 0 {
@@ -12865,7 +13155,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
}
- case c.Depth - 1:
+ default:
{
y_1 :=
@@ -12873,7 +13163,11 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
if ypositive {
ret = func(env *Env) (Stmt, *Env) {
- addr := (*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ addr := (*int64)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12886,8 +13180,12 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- addr := (*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index]))
+ addr := (*int64)(unsafe.Pointer(&o.Ints[index]))
n := *addr
if n < 0 {
@@ -12908,7 +13206,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
case 0:
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) >>= shift
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -12916,7 +13214,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= shift
+ Outer.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -12924,7 +13222,14 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= shift
+ Outer.Outer.Ints[index])) >>= shift
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ case c.Depth - 1:
+
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -12936,14 +13241,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) >>= shift
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
-
- ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= shift
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -12954,7 +13252,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
case 0:
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) >>= shift
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -12962,7 +13260,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= shift
+ Outer.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -12970,7 +13268,14 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= shift
+ Outer.Outer.Ints[index])) >>= shift
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ case c.Depth - 1:
+
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -12982,14 +13287,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) >>= shift
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
-
- ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= shift
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13000,7 +13298,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
case 0:
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) >>= shift
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13008,7 +13306,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= shift
+ Outer.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13016,7 +13314,14 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= shift
+ Outer.Outer.Ints[index])) >>= shift
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ case c.Depth - 1:
+
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13028,14 +13333,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) >>= shift
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
-
- ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= shift
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13046,7 +13344,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
case 0:
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) >>= shift
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13054,7 +13352,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= shift
+ Outer.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13062,7 +13360,14 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= shift
+ Outer.Outer.Ints[index])) >>= shift
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ case c.Depth - 1:
+
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13074,14 +13379,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) >>= shift
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
-
- ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= shift
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13092,7 +13390,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
case 0:
ret = func(env *Env) (Stmt, *Env) {
- env.IntBinds[index] >>= shift
+ env.Ints[index] >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13100,7 +13398,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.IntBinds[index] >>= shift
+ Outer.Ints[index] >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13108,28 +13406,28 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.Outer.IntBinds[index] >>= shift
+ Outer.Outer.Ints[index] >>= shift
env.IP++
return env.Code[env.IP], env
}
- default:
+ case c.Depth - 1:
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.IntBinds[index] >>= shift
+ env.FileEnv.Ints[index] >>= shift
env.IP++
return env.Code[env.IP], env
}
- case c.Depth - 1:
+ default:
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.IntBinds[index] >>= shift
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.Ints[index] >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13140,7 +13438,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
case 0:
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) >>= shift
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13148,7 +13446,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= shift
+ Outer.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13156,7 +13454,14 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= shift
+ Outer.Outer.Ints[index])) >>= shift
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ case c.Depth - 1:
+
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13168,14 +13473,7 @@ func (c *Comp) varQuoPow2(va *Var, val I) bool {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) >>= shift
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
-
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= shift
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) >>= shift
env.IP++
return env.Code[env.IP], env
}
@@ -13208,7 +13506,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13217,7 +13515,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13232,7 +13530,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13242,7 +13540,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13257,7 +13555,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13267,7 +13565,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13277,29 +13575,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13309,20 +13598,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13340,7 +13638,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13349,7 +13647,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13364,7 +13662,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13374,7 +13672,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13389,7 +13687,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13399,7 +13697,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13409,29 +13707,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13441,20 +13730,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13472,7 +13770,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13481,7 +13779,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13496,7 +13794,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13506,7 +13804,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13521,7 +13819,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13531,7 +13829,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13541,29 +13839,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13573,20 +13862,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13604,7 +13902,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13613,7 +13911,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13628,7 +13926,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13638,7 +13936,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13653,7 +13951,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13663,7 +13961,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13673,29 +13971,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13705,20 +13994,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13736,7 +14034,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13745,7 +14043,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13760,7 +14058,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13770,7 +14068,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13785,7 +14083,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13795,7 +14093,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13805,29 +14103,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13837,20 +14126,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(val,
),
)
@@ -13868,7 +14166,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13877,7 +14175,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -13892,7 +14190,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13902,7 +14200,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -13917,7 +14215,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -13927,7 +14225,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -13937,29 +14235,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -13969,20 +14258,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14000,7 +14298,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14009,7 +14307,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14024,7 +14322,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14034,7 +14332,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14049,7 +14347,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14059,7 +14357,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14069,29 +14367,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14101,20 +14390,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14132,7 +14430,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14141,7 +14439,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14156,7 +14454,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14166,7 +14464,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14181,7 +14479,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14191,7 +14489,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14201,29 +14499,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14233,20 +14522,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14264,7 +14562,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14273,7 +14571,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14288,7 +14586,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14298,7 +14596,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14313,7 +14611,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14323,7 +14621,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14333,29 +14631,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14365,20 +14654,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14397,7 +14695,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] /= val
+ Ints[index] /= val
env.IP++
return env.Code[env.IP], env
@@ -14406,7 +14704,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14422,7 +14720,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] /= val
+ Ints[index] /= val
env.IP++
return env.Code[env.IP], env
@@ -14432,7 +14730,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14448,7 +14746,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] /= val
+ Ints[index] /= val
env.IP++
return env.Code[env.IP], env
@@ -14458,7 +14756,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14468,31 +14766,21 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] /= val
+ env.FileEnv.
+ Ints[index] /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14502,21 +14790,31 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14534,7 +14832,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14543,7 +14841,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14558,7 +14856,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14568,7 +14866,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14583,7 +14881,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14593,7 +14891,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14603,29 +14901,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14635,20 +14924,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(val,
),
)
@@ -14668,7 +14966,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14677,7 +14975,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14692,7 +14990,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14702,7 +15000,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14717,7 +15015,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14727,7 +15025,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14737,29 +15035,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14769,20 +15058,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14800,7 +15098,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14809,7 +15107,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14824,7 +15122,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14834,7 +15132,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14849,7 +15147,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14859,7 +15157,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14869,29 +15167,20 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14901,20 +15190,29 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(val,
),
)
@@ -14934,7 +15232,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) /= val
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14943,7 +15241,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(val,
),
)
@@ -14958,7 +15256,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= val
+ Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14968,7 +15266,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(val,
),
)
@@ -14983,7 +15281,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= val
+ Outer.Outer.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -14993,7 +15291,30 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(val,
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(val,
),
)
@@ -15011,7 +15332,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) /= val
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -15025,7 +15346,7 @@ func (c *Comp) varQuoConst(va *Var, val I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(val,
),
)
@@ -15035,11 +15356,15 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Complex128:
+ val := r.ValueOf(val).Complex()
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= val
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) /= val
env.IP++
return env.Code[env.IP], env
@@ -15047,8 +15372,8 @@ func (c *Comp) varQuoConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(val,
),
)
@@ -15058,86 +15383,110 @@ func (c *Comp) varQuoConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Complex128:
- val := r.ValueOf(val).Complex()
- switch upn {
- case 0:
-
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- val,
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
case 1:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
case 2:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- default:
+ case c.Depth - 1:
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= val
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- val,
- )
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(val,
+ ),
+ )
+ }
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
- case c.Depth - 1:
+ default:
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) /= val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- env.IP++
- return env.Code[env.IP], env
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(val,
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
default:
@@ -15160,7 +15509,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15169,7 +15518,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15184,7 +15533,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15194,7 +15543,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15209,7 +15558,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15219,7 +15568,30 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() / int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15237,7 +15609,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15251,7 +15623,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15261,11 +15633,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15273,8 +15648,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15284,14 +15659,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15300,7 +15673,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15310,12 +15684,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15324,8 +15698,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15335,12 +15709,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15348,9 +15721,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15368,7 +15740,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15382,7 +15754,83 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
+ lhs.SetInt(lhs.Int() / int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Vals[index]
+ lhs.SetInt(lhs.Int() / int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.
+ Vals[index]
+ lhs.SetInt(lhs.Int() / int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case 2:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15396,7 +15844,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15404,8 +15852,40 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetInt(lhs.Int() / int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ default:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ {
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15416,13 +15896,13 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
}
}
}
- case func(*Env) int16:
+ case func(*Env) int32:
switch upn {
case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15431,7 +15911,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15445,8 +15925,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15456,7 +15936,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15470,8 +15950,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15481,7 +15961,30 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() / int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15499,7 +16002,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15513,7 +16016,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15523,11 +16026,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15535,8 +16041,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15546,14 +16052,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15562,7 +16066,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15572,12 +16077,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15586,8 +16091,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15597,12 +16102,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15610,9 +16114,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15630,7 +16133,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15644,7 +16147,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() / int64(fun(env),
),
)
@@ -15654,11 +16157,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15666,9 +16172,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() / int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
}
@@ -15677,14 +16183,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15693,8 +16197,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
- lhs.SetInt(lhs.Int() / int64(fun(env),
+ Outer.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
}
@@ -15703,12 +16208,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15717,9 +16222,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
- lhs.SetInt(lhs.Int() / int64(fun(env),
+ Outer.Outer.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
}
@@ -15728,12 +16233,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15741,10 +16245,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetInt(lhs.Int() / int64(fun(env),
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
}
@@ -15761,7 +16264,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15772,11 +16275,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- {
- lhs :=
- o.Binds[index]
- lhs.SetInt(lhs.Int() / int64(fun(env),
+ {
+ lhs := o.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
}
@@ -15785,11 +16288,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15797,9 +16303,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() / int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
}
@@ -15808,14 +16314,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15824,7 +16328,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -15834,12 +16339,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15848,8 +16353,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -15859,12 +16364,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15872,9 +16376,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -15892,7 +16395,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15906,7 +16409,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -15916,11 +16419,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15928,8 +16434,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -15939,14 +16445,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15955,7 +16459,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -15965,12 +16470,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -15979,8 +16484,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -15990,12 +16495,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16003,9 +16507,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16023,7 +16526,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16037,7 +16540,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16047,11 +16550,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16059,8 +16565,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16070,14 +16576,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16086,7 +16590,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16096,12 +16601,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16110,8 +16615,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16121,12 +16626,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16134,9 +16638,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16154,7 +16657,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16168,7 +16671,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16178,11 +16681,15 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ env.
+ Ints[index] /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16190,8 +16697,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16201,14 +16708,13 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ env.
+ Outer.
+ Ints[index] /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16217,7 +16723,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16227,12 +16734,13 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ env.
+ Outer.Outer.
+ Ints[index] /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16241,8 +16749,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16252,12 +16760,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ env.FileEnv.
+ Ints[index] /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16265,9 +16773,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16285,7 +16792,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+
+ o.
+ Ints[index] /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16299,7 +16808,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16309,11 +16818,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16321,8 +16833,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16332,15 +16844,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- IntBinds[index] /= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16349,7 +16858,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16359,13 +16869,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.
- IntBinds[index] /= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16374,8 +16883,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16385,13 +16894,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] /= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16399,9 +16906,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16419,9 +16925,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
-
- o.
- IntBinds[index] /= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16435,7 +16939,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() / uint64(fun(env),
),
)
@@ -16445,12 +16949,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] /= fun(env)
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16458,9 +16964,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetUint(lhs.Uint() / uint64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
}
@@ -16469,14 +16975,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*float32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16485,8 +16989,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
- lhs.SetUint(lhs.Uint() / uint64(fun(env),
+ Outer.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
}
@@ -16495,12 +17000,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*float32)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16509,9 +17014,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
- lhs.SetUint(lhs.Uint() / uint64(fun(env),
+ Outer.Outer.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
}
@@ -16520,12 +17025,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16533,10 +17037,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetUint(lhs.Uint() / uint64(fun(env),
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
}
@@ -16553,7 +17056,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*float32)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16567,8 +17070,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetUint(lhs.Uint() / uint64(fun(env),
+ Vals[index]
+ lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
}
@@ -16577,11 +17080,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) float64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16589,9 +17095,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetUint(lhs.Uint() / uint64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
}
@@ -16600,14 +17106,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*float64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16616,7 +17120,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
@@ -16626,12 +17131,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*float64)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16640,8 +17145,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
@@ -16651,12 +17156,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16664,9 +17168,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
@@ -16684,7 +17187,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float32)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*float64)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16698,7 +17201,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetFloat(lhs.Float() / float64(fun(env),
),
)
@@ -16708,11 +17211,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16720,9 +17226,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetFloat(lhs.Float() / float64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
}
@@ -16731,14 +17237,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) float64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16747,8 +17251,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
- lhs.SetFloat(lhs.Float() / float64(fun(env),
+ Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
}
@@ -16757,12 +17262,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16771,9 +17276,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
- lhs.SetFloat(lhs.Float() / float64(fun(env),
+ Outer.Outer.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
}
@@ -16782,12 +17287,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16795,10 +17299,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetFloat(lhs.Float() / float64(fun(env),
+ lhs := env.FileEnv.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
}
@@ -16815,7 +17318,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*float64)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*complex64)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16829,8 +17332,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetFloat(lhs.Float() / float64(fun(env),
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
}
@@ -16839,11 +17342,14 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) complex128:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16851,9 +17357,9 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetFloat(lhs.Float() / float64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
}
@@ -16862,14 +17368,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) complex64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) /= fun(env)
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16878,7 +17382,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
@@ -16888,12 +17393,12 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) /= fun(env)
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16902,8 +17407,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
@@ -16913,12 +17418,11 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) /= fun(env)
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16926,9 +17430,8 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
@@ -16946,7 +17449,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*complex64)(unsafe.Pointer(&o.IntBinds[index])) /= fun(env)
+ *(*complex128)(unsafe.Pointer(&o.Ints[index])) /= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -16960,30 +17463,7 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() / complex128(fun(env),
- ),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) /= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ Vals[index]
lhs.SetComplex(lhs.Complex() / complex128(fun(env),
),
)
@@ -16994,86 +17474,6 @@ func (c *Comp) varQuoExpr(va *Var, fun I) {
}
}
}
- case func(*Env) complex128:
- switch upn {
- case 0:
-
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- case 1:
-
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- case 2:
-
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.
- Outer.Outer.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- default:
-
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- {
- lhs := o.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- case c.Depth - 1:
-
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetComplex(lhs.Complex() /
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
default:
c.Errorf(`invalid operator %s= on <%v>`, token.QUO, t)
@@ -17107,7 +17507,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17116,7 +17516,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17131,7 +17531,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17141,7 +17541,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17156,7 +17556,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17166,7 +17566,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17176,29 +17576,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17208,20 +17599,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17239,7 +17639,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17248,7 +17648,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17263,7 +17663,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17273,7 +17673,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17288,7 +17688,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17298,7 +17698,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17308,29 +17708,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17340,20 +17731,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17371,7 +17771,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17380,7 +17780,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17395,7 +17795,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17405,7 +17805,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17420,7 +17820,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17430,7 +17830,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17440,29 +17840,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17472,20 +17863,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17503,7 +17903,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17512,7 +17912,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17527,7 +17927,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17537,7 +17937,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17552,7 +17952,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17562,7 +17962,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17572,29 +17972,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17604,20 +17995,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17635,7 +18035,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17644,7 +18044,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17659,7 +18059,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17669,7 +18069,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17684,7 +18084,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17694,7 +18094,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17704,29 +18104,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17736,20 +18127,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(val,
),
)
@@ -17767,7 +18167,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17776,7 +18176,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17791,7 +18191,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17801,7 +18201,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17816,7 +18216,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17826,7 +18226,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17836,29 +18236,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17868,20 +18259,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17899,7 +18299,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17908,7 +18308,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17923,7 +18323,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17933,7 +18333,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17948,7 +18348,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -17958,7 +18358,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -17968,29 +18368,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18000,20 +18391,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18031,7 +18431,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18040,7 +18440,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18055,7 +18455,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18065,7 +18465,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18080,7 +18480,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18090,7 +18490,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18100,29 +18500,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18132,20 +18523,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18163,7 +18563,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18172,7 +18572,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18187,7 +18587,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18197,7 +18597,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18212,7 +18612,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18222,7 +18622,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18232,29 +18632,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18264,20 +18655,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18296,7 +18696,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] %= val
+ Ints[index] %= val
env.IP++
return env.Code[env.IP], env
@@ -18305,7 +18705,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18321,7 +18721,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] %= val
+ Ints[index] %= val
env.IP++
return env.Code[env.IP], env
@@ -18331,7 +18731,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18347,7 +18747,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] %= val
+ Ints[index] %= val
env.IP++
return env.Code[env.IP], env
@@ -18357,7 +18757,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18367,31 +18767,21 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] %= val
+ env.FileEnv.
+ Ints[index] %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18401,21 +18791,31 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18433,7 +18833,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) %= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18442,7 +18842,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18457,7 +18857,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= val
+ Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18467,7 +18867,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18482,7 +18882,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= val
+ Outer.Outer.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
@@ -18492,7 +18892,7 @@ func (c *Comp) varRemConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18502,29 +18902,20 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) %= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18534,20 +18925,29 @@ func (c *Comp) varRemConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) %= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(val,
),
)
@@ -18578,7 +18978,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18587,7 +18987,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18602,7 +19002,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18612,7 +19012,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18627,7 +19027,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18637,7 +19037,30 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() % int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18655,7 +19078,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18669,7 +19092,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18679,11 +19102,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18691,8 +19117,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18702,14 +19128,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18718,7 +19142,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18728,12 +19153,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18742,8 +19167,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18753,12 +19178,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18766,9 +19190,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18786,7 +19209,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18800,7 +19223,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18810,11 +19233,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18822,8 +19248,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18833,14 +19259,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18849,7 +19273,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18859,12 +19284,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18873,8 +19298,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18884,12 +19309,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18897,9 +19321,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18917,7 +19340,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18931,7 +19354,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18941,11 +19364,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18953,8 +19379,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18964,14 +19390,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -18980,7 +19404,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -18990,12 +19415,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19004,8 +19429,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19015,12 +19440,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19028,9 +19452,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19048,7 +19471,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19062,7 +19485,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19072,11 +19495,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19084,8 +19510,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19095,14 +19521,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19111,7 +19535,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19121,12 +19546,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19135,8 +19560,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19146,12 +19571,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19159,9 +19583,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19179,7 +19602,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19193,7 +19616,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() % int64(fun(env),
),
)
@@ -19203,11 +19626,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19215,9 +19641,9 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() % int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
}
@@ -19226,14 +19652,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19242,7 +19666,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19252,12 +19677,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19266,8 +19691,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19277,12 +19702,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19290,9 +19714,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19310,7 +19733,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19324,7 +19747,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19334,11 +19757,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19346,8 +19772,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19357,14 +19783,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19373,7 +19797,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19383,12 +19808,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19397,8 +19822,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19408,12 +19833,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19421,9 +19845,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19441,7 +19864,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19455,7 +19878,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19465,11 +19888,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19477,8 +19903,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19488,14 +19914,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19504,7 +19928,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19514,12 +19939,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19528,8 +19953,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19539,12 +19964,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19552,9 +19976,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19572,7 +19995,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19586,7 +20009,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19596,11 +20019,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19608,8 +20034,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19619,14 +20045,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19635,7 +20059,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19645,12 +20070,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19659,8 +20084,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19670,12 +20095,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19683,9 +20107,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19703,7 +20126,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19717,7 +20140,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19727,11 +20150,15 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
+ env.
+ Ints[index] %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19739,8 +20166,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19750,15 +20177,13 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] %= fun(env)
+ Outer.
+ Ints[index] %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19767,7 +20192,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19777,13 +20203,13 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] %= fun(env)
+ Outer.Outer.
+ Ints[index] %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19792,8 +20218,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19803,13 +20229,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] %= fun(env)
+ env.FileEnv.
+ Ints[index] %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19817,9 +20242,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19839,7 +20263,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
}
o.
- IntBinds[index] %= fun(env)
+ Ints[index] %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19853,7 +20277,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19863,12 +20287,14 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] %= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19876,8 +20302,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19887,14 +20313,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) %= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19903,7 +20327,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19913,12 +20338,12 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) %= fun(env)
+ Outer.Outer.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19927,8 +20352,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19938,12 +20363,11 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) %= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19951,9 +20375,8 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -19971,7 +20394,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) %= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) %= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -19985,30 +20408,7 @@ func (c *Comp) varRemExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetUint(lhs.Uint() % uint64(fun(env),
- ),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) %= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() % uint64(fun(env),
),
)
@@ -20051,7 +20451,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20060,7 +20460,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20075,7 +20475,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20085,7 +20485,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20100,7 +20500,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20110,7 +20510,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20120,29 +20520,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20152,20 +20543,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20183,7 +20583,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20192,7 +20592,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20207,7 +20607,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20217,7 +20617,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20232,7 +20632,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20242,7 +20642,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20252,29 +20652,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20284,20 +20675,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20315,7 +20715,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20324,7 +20724,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20339,7 +20739,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20349,7 +20749,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20364,7 +20764,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20374,7 +20774,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20384,29 +20784,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20416,20 +20807,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20447,7 +20847,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20456,7 +20856,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20471,7 +20871,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20481,7 +20881,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20496,7 +20896,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20506,7 +20906,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20516,29 +20916,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20548,20 +20939,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20579,7 +20979,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20588,7 +20988,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20603,7 +21003,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20613,7 +21013,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20628,7 +21028,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20638,7 +21038,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20648,29 +21048,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20680,20 +21071,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(val,
),
)
@@ -20711,7 +21111,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20720,7 +21120,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20735,7 +21135,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20745,7 +21145,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20760,7 +21160,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20770,7 +21170,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20780,29 +21180,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20812,20 +21203,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20843,7 +21243,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20852,7 +21252,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20867,7 +21267,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20877,7 +21277,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20892,7 +21292,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20902,7 +21302,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20912,29 +21312,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20944,20 +21335,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20975,7 +21375,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -20984,7 +21384,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -20999,7 +21399,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21009,7 +21409,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21024,7 +21424,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21034,7 +21434,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21044,29 +21444,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21076,20 +21467,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21107,7 +21507,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21116,7 +21516,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21131,7 +21531,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21141,7 +21541,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21156,7 +21556,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21166,7 +21566,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21176,29 +21576,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21208,20 +21599,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21240,7 +21640,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] &= val
+ Ints[index] &= val
env.IP++
return env.Code[env.IP], env
@@ -21249,7 +21649,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21265,7 +21665,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] &= val
+ Ints[index] &= val
env.IP++
return env.Code[env.IP], env
@@ -21275,7 +21675,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21291,7 +21691,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] &= val
+ Ints[index] &= val
env.IP++
return env.Code[env.IP], env
@@ -21301,7 +21701,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21311,31 +21711,21 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] &= val
+ env.FileEnv.
+ Ints[index] &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21345,21 +21735,31 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21377,7 +21777,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) &= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21386,7 +21786,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21401,7 +21801,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= val
+ Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21411,7 +21811,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21426,7 +21826,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= val
+ Outer.Outer.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
@@ -21436,7 +21836,7 @@ func (c *Comp) varAndConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21446,29 +21846,20 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) &= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21478,20 +21869,29 @@ func (c *Comp) varAndConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) &= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(val,
),
)
@@ -21522,7 +21922,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21531,7 +21931,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21546,7 +21946,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21556,7 +21956,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21571,7 +21971,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21581,7 +21981,30 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() & int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21599,7 +22022,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21613,7 +22036,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21623,11 +22046,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21635,8 +22061,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21646,14 +22072,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21662,7 +22086,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21672,12 +22097,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21686,8 +22111,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21697,12 +22122,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21710,9 +22134,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21730,7 +22153,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21744,7 +22167,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21754,11 +22177,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21766,8 +22192,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21777,14 +22203,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21793,7 +22217,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21803,12 +22228,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21817,8 +22242,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21828,12 +22253,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21841,9 +22265,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21861,7 +22284,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21875,7 +22298,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21885,11 +22308,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21897,8 +22323,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21908,14 +22334,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21924,7 +22348,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21934,12 +22359,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21948,8 +22373,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21959,12 +22384,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -21972,9 +22396,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -21992,7 +22415,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22006,7 +22429,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -22016,11 +22439,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22028,8 +22454,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -22039,14 +22465,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22055,7 +22479,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -22065,12 +22490,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22079,8 +22504,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -22090,12 +22515,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22103,9 +22527,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -22123,7 +22546,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22137,7 +22560,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() & int64(fun(env),
),
)
@@ -22147,11 +22570,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22159,9 +22585,9 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() & int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
}
@@ -22170,14 +22596,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22186,7 +22610,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22196,12 +22621,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22210,8 +22635,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22221,12 +22646,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22234,9 +22658,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22254,7 +22677,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22268,7 +22691,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22278,11 +22701,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22290,8 +22716,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22301,14 +22727,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22317,7 +22741,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22327,12 +22752,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22341,8 +22766,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22352,12 +22777,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22365,9 +22789,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22385,7 +22808,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22399,7 +22822,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22409,11 +22832,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22421,8 +22847,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22432,14 +22858,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22448,7 +22872,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22458,12 +22883,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22472,8 +22897,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22483,12 +22908,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22496,9 +22920,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22516,7 +22939,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22530,7 +22953,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22540,11 +22963,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22552,8 +22978,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22563,14 +22989,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22579,7 +23003,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22589,12 +23014,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22603,8 +23028,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22614,12 +23039,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22627,9 +23051,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22647,7 +23070,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22661,7 +23084,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22671,11 +23094,15 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
+ env.
+ Ints[index] &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22683,8 +23110,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22694,15 +23121,13 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] &= fun(env)
+ Outer.
+ Ints[index] &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22711,7 +23136,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22721,13 +23147,13 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] &= fun(env)
+ Outer.Outer.
+ Ints[index] &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22736,8 +23162,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22747,13 +23173,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] &= fun(env)
+ env.FileEnv.
+ Ints[index] &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22761,9 +23186,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22783,7 +23207,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
}
o.
- IntBinds[index] &= fun(env)
+ Ints[index] &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22797,7 +23221,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22807,12 +23231,14 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] &= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22820,8 +23246,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22831,14 +23257,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) &= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22847,7 +23271,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22857,12 +23282,12 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &= fun(env)
+ Outer.Outer.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22871,8 +23296,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22882,12 +23307,11 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22895,9 +23319,8 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22915,7 +23338,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) &= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) &= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -22929,30 +23352,7 @@ func (c *Comp) varAndExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetUint(lhs.Uint() & uint64(fun(env),
- ),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() & uint64(fun(env),
),
)
@@ -22989,7 +23389,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -22998,7 +23398,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23013,7 +23413,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23023,7 +23423,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23038,7 +23438,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23048,7 +23448,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23058,29 +23458,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23090,20 +23481,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23121,7 +23521,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23130,7 +23530,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23145,7 +23545,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23155,7 +23555,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23170,7 +23570,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23180,7 +23580,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23190,29 +23590,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23222,20 +23613,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23253,7 +23653,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23262,7 +23662,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23277,7 +23677,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23287,7 +23687,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23302,7 +23702,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23312,7 +23712,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23322,29 +23722,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23354,20 +23745,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23385,7 +23785,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23394,7 +23794,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23409,7 +23809,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23419,7 +23819,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23434,7 +23834,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23444,7 +23844,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23454,29 +23854,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23486,20 +23877,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23517,7 +23917,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23526,7 +23926,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23541,7 +23941,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23551,7 +23951,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23566,7 +23966,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23576,7 +23976,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23586,29 +23986,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23618,20 +24009,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(val,
),
)
@@ -23649,7 +24049,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23658,7 +24058,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23673,7 +24073,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23683,7 +24083,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23698,7 +24098,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23708,7 +24108,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23718,29 +24118,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23750,20 +24141,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23781,7 +24181,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23790,7 +24190,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23805,7 +24205,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23815,7 +24215,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23830,7 +24230,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23840,7 +24240,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23850,29 +24250,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23882,20 +24273,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23913,7 +24313,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23922,7 +24322,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23937,7 +24337,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23947,7 +24347,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23962,7 +24362,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -23972,7 +24372,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -23982,29 +24382,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24014,20 +24405,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24045,7 +24445,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -24054,7 +24454,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24069,7 +24469,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -24079,7 +24479,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24094,7 +24494,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -24104,7 +24504,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24114,29 +24514,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24146,20 +24537,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24178,7 +24578,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] |= val
+ Ints[index] |= val
env.IP++
return env.Code[env.IP], env
@@ -24187,7 +24587,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24203,7 +24603,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] |= val
+ Ints[index] |= val
env.IP++
return env.Code[env.IP], env
@@ -24213,7 +24613,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24229,7 +24629,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] |= val
+ Ints[index] |= val
env.IP++
return env.Code[env.IP], env
@@ -24239,7 +24639,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24249,31 +24649,21 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] |= val
+ env.FileEnv.
+ Ints[index] |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24283,21 +24673,31 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24315,7 +24715,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) |= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -24324,7 +24724,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24339,7 +24739,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= val
+ Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -24349,7 +24749,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24364,7 +24764,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= val
+ Outer.Outer.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
@@ -24374,7 +24774,7 @@ func (c *Comp) varOrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24384,29 +24784,20 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) |= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24416,20 +24807,29 @@ func (c *Comp) varOrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) |= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(val,
),
)
@@ -24460,7 +24860,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24469,7 +24869,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24484,7 +24884,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24494,7 +24894,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24509,7 +24909,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24519,7 +24919,30 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() | int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24537,7 +24960,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24551,7 +24974,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24561,11 +24984,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24573,8 +24999,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24584,14 +25010,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24600,7 +25024,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24610,12 +25035,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24624,8 +25049,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24635,12 +25060,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24648,9 +25072,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24668,7 +25091,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24682,7 +25105,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24692,11 +25115,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24704,8 +25130,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24715,14 +25141,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24731,7 +25155,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24741,12 +25166,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24755,8 +25180,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24766,12 +25191,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24779,9 +25203,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24799,7 +25222,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24813,7 +25236,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24823,11 +25246,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24835,25 +25261,23 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
}
env.IP++
- return env.Code[env.IP], env
- }
- }
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ return env.Code[env.IP], env
+ }
+ }
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24862,7 +25286,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24872,12 +25297,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24886,8 +25311,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24897,12 +25322,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24910,9 +25334,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24930,7 +25353,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24944,7 +25367,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24954,11 +25377,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24966,8 +25392,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -24977,14 +25403,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -24993,7 +25417,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -25003,12 +25428,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25017,8 +25442,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -25028,12 +25453,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25041,9 +25465,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -25061,7 +25484,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25075,7 +25498,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() | int64(fun(env),
),
)
@@ -25085,11 +25508,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25097,9 +25523,9 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() | int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
}
@@ -25108,14 +25534,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25124,7 +25548,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25134,12 +25559,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25148,8 +25573,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25159,12 +25584,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25172,9 +25596,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25192,7 +25615,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25206,7 +25629,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25216,11 +25639,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25228,8 +25654,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25239,14 +25665,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25255,7 +25679,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25265,12 +25690,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25279,8 +25704,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25290,12 +25715,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25303,9 +25727,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25323,7 +25746,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25337,7 +25760,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25347,11 +25770,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25359,8 +25785,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25370,14 +25796,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25386,7 +25810,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25396,12 +25821,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25410,8 +25835,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25421,12 +25846,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25434,9 +25858,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25454,7 +25877,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25468,7 +25891,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25478,11 +25901,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25490,8 +25916,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25501,14 +25927,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25517,7 +25941,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25527,12 +25952,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25541,8 +25966,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25552,12 +25977,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25565,9 +25989,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25585,7 +26008,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25599,7 +26022,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25609,11 +26032,15 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
+ env.
+ Ints[index] |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25621,8 +26048,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25632,15 +26059,13 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] |= fun(env)
+ Outer.
+ Ints[index] |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25649,7 +26074,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25659,13 +26085,13 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] |= fun(env)
+ Outer.Outer.
+ Ints[index] |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25674,8 +26100,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25685,13 +26111,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] |= fun(env)
+ env.FileEnv.
+ Ints[index] |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25699,9 +26124,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25721,7 +26145,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
}
o.
- IntBinds[index] |= fun(env)
+ Ints[index] |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25735,7 +26159,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25745,12 +26169,14 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] |= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25758,8 +26184,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25769,14 +26195,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) |= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25785,7 +26209,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25795,12 +26220,12 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) |= fun(env)
+ Outer.Outer.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25809,8 +26234,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25820,12 +26245,11 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) |= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25833,9 +26257,8 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25853,7 +26276,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) |= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) |= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -25867,30 +26290,7 @@ func (c *Comp) varOrExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetUint(lhs.Uint() | uint64(fun(env),
- ),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) |= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() | uint64(fun(env),
),
)
@@ -25927,7 +26327,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -25936,7 +26336,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -25951,7 +26351,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -25961,7 +26361,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -25976,7 +26376,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -25986,7 +26386,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -25996,29 +26396,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26028,20 +26419,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26059,7 +26459,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26068,7 +26468,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26083,7 +26483,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26093,7 +26493,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26108,7 +26508,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26118,7 +26518,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26128,29 +26528,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26160,20 +26551,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26191,7 +26591,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26200,7 +26600,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26215,7 +26615,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26225,7 +26625,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26240,7 +26640,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26250,7 +26650,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26260,29 +26660,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- {
- lhs :=
-
- o.Binds[index]
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26292,20 +26683,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26323,7 +26723,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26332,7 +26732,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26347,7 +26747,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26357,7 +26757,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26372,7 +26772,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26382,7 +26782,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26392,29 +26792,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26424,20 +26815,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26455,7 +26855,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26464,7 +26864,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26479,7 +26879,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26489,7 +26889,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26504,7 +26904,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26514,7 +26914,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26524,29 +26924,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26556,20 +26947,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(val,
),
)
@@ -26587,7 +26987,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26596,7 +26996,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26611,7 +27011,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26621,7 +27021,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26636,7 +27036,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26646,7 +27046,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26656,29 +27056,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26688,20 +27079,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26719,7 +27119,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26728,7 +27128,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26743,7 +27143,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26753,7 +27153,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26768,7 +27168,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26778,7 +27178,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26788,29 +27188,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26820,20 +27211,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26851,7 +27251,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26860,7 +27260,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26875,7 +27275,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26885,7 +27285,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26900,7 +27300,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26910,7 +27310,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26920,29 +27320,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26952,20 +27343,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -26983,7 +27383,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -26992,7 +27392,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27007,7 +27407,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -27017,7 +27417,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27032,7 +27432,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -27042,7 +27442,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27052,29 +27452,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27084,20 +27475,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27116,7 +27516,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] ^= val
+ Ints[index] ^= val
env.IP++
return env.Code[env.IP], env
@@ -27125,7 +27525,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27141,7 +27541,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] ^= val
+ Ints[index] ^= val
env.IP++
return env.Code[env.IP], env
@@ -27151,7 +27551,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27167,7 +27567,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] ^= val
+ Ints[index] ^= val
env.IP++
return env.Code[env.IP], env
@@ -27177,7 +27577,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27187,31 +27587,21 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] ^= val
+ env.FileEnv.
+ Ints[index] ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27221,21 +27611,31 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27253,7 +27653,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) ^= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -27262,7 +27662,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27277,7 +27677,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= val
+ Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -27287,7 +27687,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27302,7 +27702,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= val
+ Outer.Outer.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
@@ -27312,7 +27712,7 @@ func (c *Comp) varXorConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27322,29 +27722,20 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) ^= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27354,20 +27745,29 @@ func (c *Comp) varXorConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) ^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(val,
),
)
@@ -27398,7 +27798,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27407,7 +27807,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27422,7 +27822,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27432,7 +27832,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27447,7 +27847,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27457,7 +27857,30 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() ^ int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27475,7 +27898,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27489,7 +27912,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27499,11 +27922,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27511,8 +27937,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27522,14 +27948,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27538,7 +27962,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27548,12 +27973,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27562,8 +27987,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27573,12 +27998,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27586,9 +28010,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27606,7 +28029,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27620,7 +28043,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27630,11 +28053,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27642,8 +28068,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27653,14 +28079,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27669,7 +28093,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27679,12 +28104,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27693,8 +28118,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27704,12 +28129,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27717,9 +28141,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27737,7 +28160,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27751,7 +28174,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27761,11 +28184,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27773,8 +28199,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27784,14 +28210,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27800,7 +28224,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27810,12 +28235,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27824,8 +28249,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27835,12 +28260,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27848,9 +28272,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27868,7 +28291,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27882,7 +28305,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27892,11 +28315,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27904,8 +28330,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27915,14 +28341,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27931,7 +28355,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27941,12 +28366,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27955,8 +28380,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27966,12 +28391,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -27979,9 +28403,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -27999,7 +28422,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28013,7 +28436,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() ^ int64(fun(env),
),
)
@@ -28023,11 +28446,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28035,9 +28461,9 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() ^ int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
}
@@ -28046,14 +28472,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28062,7 +28486,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28072,12 +28497,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28086,8 +28511,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28097,12 +28522,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28110,9 +28534,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28130,7 +28553,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28144,7 +28567,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28154,11 +28577,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28166,8 +28592,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28177,14 +28603,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28193,7 +28617,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28203,12 +28628,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28217,8 +28642,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28228,12 +28653,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28241,9 +28665,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28261,7 +28684,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28275,7 +28698,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28285,11 +28708,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28297,8 +28723,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28308,14 +28734,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28324,7 +28748,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28334,12 +28759,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28348,8 +28773,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28359,12 +28784,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28372,9 +28796,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28392,7 +28815,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28406,7 +28829,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28416,11 +28839,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28428,8 +28854,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28439,14 +28865,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28455,7 +28879,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28465,12 +28890,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28479,8 +28904,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28490,12 +28915,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28503,9 +28927,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28523,7 +28946,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28537,7 +28960,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28547,11 +28970,15 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
+ env.
+ Ints[index] ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28559,8 +28986,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28570,15 +28997,13 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] ^= fun(env)
+ Outer.
+ Ints[index] ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28587,7 +29012,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28597,13 +29023,13 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] ^= fun(env)
+ Outer.Outer.
+ Ints[index] ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28612,8 +29038,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28623,13 +29049,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] ^= fun(env)
+ env.FileEnv.
+ Ints[index] ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28637,9 +29062,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28659,7 +29083,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
}
o.
- IntBinds[index] ^= fun(env)
+ Ints[index] ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28673,7 +29097,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28683,12 +29107,14 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] ^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28696,8 +29122,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28707,14 +29133,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) ^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28723,7 +29147,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28733,12 +29158,12 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) ^= fun(env)
+ Outer.Outer.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28747,8 +29172,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28758,12 +29183,11 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) ^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28771,9 +29195,8 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28791,7 +29214,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) ^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) ^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -28805,30 +29228,7 @@ func (c *Comp) varXorExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
- ),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) ^= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() ^ uint64(fun(env),
),
)
@@ -28871,7 +29271,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -28880,7 +29280,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -28895,7 +29295,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -28905,7 +29305,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -28920,7 +29320,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -28930,7 +29330,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -28940,29 +29340,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -28972,20 +29363,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29003,7 +29403,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29012,7 +29412,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29027,7 +29427,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29037,7 +29437,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29052,7 +29452,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29062,7 +29462,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29072,29 +29472,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- {
- lhs :=
-
- o.Binds[index]
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29104,20 +29495,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29135,7 +29535,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29144,7 +29544,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29159,7 +29559,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29169,7 +29569,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29184,7 +29584,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29194,7 +29594,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29204,29 +29604,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29236,20 +29627,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29267,7 +29667,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29276,7 +29676,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29291,7 +29691,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29301,7 +29701,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29316,7 +29716,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29326,7 +29726,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29336,29 +29736,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29368,20 +29759,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29399,7 +29799,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29408,7 +29808,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29423,7 +29823,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29433,7 +29833,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29448,7 +29848,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29458,7 +29858,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29468,29 +29868,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29500,20 +29891,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(val,
),
)
@@ -29531,7 +29931,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29540,7 +29940,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29555,7 +29955,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29565,7 +29965,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29580,7 +29980,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29590,7 +29990,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29600,29 +30000,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29632,20 +30023,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29663,7 +30063,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29672,7 +30072,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29687,7 +30087,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29697,7 +30097,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29712,7 +30112,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29722,7 +30122,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29732,29 +30132,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29764,20 +30155,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29795,7 +30195,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29804,7 +30204,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29819,7 +30219,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29829,7 +30229,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29844,7 +30244,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29854,7 +30254,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29864,29 +30264,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29896,20 +30287,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29927,7 +30327,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29936,7 +30336,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29951,7 +30351,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29961,7 +30361,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29976,7 +30376,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -29986,7 +30386,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -29996,29 +30396,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30028,20 +30419,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30060,7 +30460,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] &^= val
+ Ints[index] &^= val
env.IP++
return env.Code[env.IP], env
@@ -30069,7 +30469,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30085,7 +30485,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] &^= val
+ Ints[index] &^= val
env.IP++
return env.Code[env.IP], env
@@ -30095,7 +30495,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30111,7 +30511,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] &^= val
+ Ints[index] &^= val
env.IP++
return env.Code[env.IP], env
@@ -30121,7 +30521,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30131,31 +30531,21 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.
- IntBinds[index] &^= val
+ env.FileEnv.
+ Ints[index] &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30165,21 +30555,31 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.
+ Ints[index] &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30197,7 +30597,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) &^= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -30206,7 +30606,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30221,7 +30621,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= val
+ Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -30231,7 +30631,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30246,7 +30646,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= val
+ Outer.Outer.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
@@ -30256,7 +30656,7 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30266,29 +30666,20 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) &^= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
{
- lhs := o.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30298,20 +30689,29 @@ func (c *Comp) varAndnotConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) &^= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := o.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(val,
),
)
@@ -30342,7 +30742,31 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Vals[index]
+ lhs.SetInt(lhs.Int() &^ int64(fun(env),
+ ),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30351,7 +30775,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30361,12 +30786,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30375,8 +30800,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30386,12 +30811,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30399,9 +30823,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30419,7 +30842,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30433,7 +30856,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30443,11 +30866,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30455,8 +30881,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30466,14 +30892,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30482,7 +30906,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30492,12 +30917,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30506,8 +30931,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30517,12 +30942,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30530,9 +30954,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30550,7 +30973,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30564,7 +30987,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30574,11 +30997,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30586,8 +31012,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30597,14 +31023,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30613,7 +31037,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30623,12 +31048,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30637,8 +31062,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30648,12 +31073,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30661,9 +31085,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30681,7 +31104,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30695,7 +31118,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30705,11 +31128,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30717,8 +31143,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30728,14 +31154,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30744,7 +31168,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30754,12 +31179,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30768,8 +31193,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30779,12 +31204,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30792,9 +31216,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30812,7 +31235,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30826,7 +31249,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30836,11 +31259,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30848,8 +31274,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30859,14 +31285,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30875,7 +31299,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30885,12 +31310,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30899,8 +31324,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30910,12 +31335,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30923,9 +31347,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30943,7 +31366,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30957,7 +31380,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() &^ int64(fun(env),
),
)
@@ -30967,11 +31390,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -30979,9 +31405,9 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() &^ int64(fun(env),
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
}
@@ -30990,14 +31416,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31006,7 +31430,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31016,12 +31441,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31030,8 +31455,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31041,12 +31466,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31054,9 +31478,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31074,7 +31497,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31088,7 +31511,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31098,11 +31521,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31110,8 +31536,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31121,14 +31547,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31137,7 +31561,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31147,12 +31572,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31161,8 +31586,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31172,12 +31597,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31185,9 +31609,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31205,7 +31628,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31219,7 +31642,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31229,11 +31652,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31241,8 +31667,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31252,14 +31678,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31268,7 +31692,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31278,12 +31703,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31292,8 +31717,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31303,12 +31728,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31316,9 +31740,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31336,7 +31759,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31350,7 +31773,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31360,11 +31783,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31372,8 +31798,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31383,14 +31809,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31399,7 +31823,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31409,12 +31834,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31423,8 +31848,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31434,12 +31859,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31447,9 +31871,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31467,7 +31890,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31481,7 +31904,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31491,11 +31914,15 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
+ env.
+ Ints[index] &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31503,8 +31930,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31514,15 +31941,13 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] &^= fun(env)
+ Outer.
+ Ints[index] &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31531,7 +31956,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31541,13 +31967,13 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] &^= fun(env)
+ Outer.Outer.
+ Ints[index] &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31556,8 +31982,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31567,13 +31993,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] &^= fun(env)
+ env.FileEnv.
+ Ints[index] &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31581,9 +32006,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31603,7 +32027,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
}
o.
- IntBinds[index] &^= fun(env)
+ Ints[index] &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31617,7 +32041,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31627,12 +32051,14 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case func(*Env) uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] &^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31640,8 +32066,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31651,14 +32077,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- }
- case func(*Env) uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) &^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31667,7 +32091,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31677,12 +32102,12 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) &^= fun(env)
+ Outer.Outer.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31691,8 +32116,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31702,12 +32127,11 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) &^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31715,9 +32139,8 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31735,7 +32158,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) &^= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) &^= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -31749,30 +32172,7 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
{
lhs := o.
- Binds[index]
- lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
- ),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) &^= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() &^ uint64(fun(env),
),
)
@@ -31791,30 +32191,39 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
}
func (c *Comp) SetVar(va *Var, op token.Token, init *Expr) {
t := va.Type
- var ok, shift bool
+ var shift bool
+ var err interface{} = ""
switch op {
case token.SHL, token.SHL_ASSIGN, token.SHR, token.SHR_ASSIGN:
shift = true
if init.Untyped() {
init.ConstTo(c.TypeOfUint64())
- ok = true
+ err = nil
+ } else if init.Type == nil || KindToCategory(init.Type.Kind()) != r.Uint {
+ err = fmt.Sprintf("\n\treason: type %v is %v, expecting unsigned integer", init.Type, init.Type.Kind())
} else {
- ok = init.Type != nil && KindToCategory(init.Type.Kind()) == r.Uint
+ err = nil
}
default:
if init.Const() {
init.ConstTo(t)
- ok = true
+ err = nil
} else if init.Type == nil {
- ok = op == token.ASSIGN && IsNillableKind(t.Kind())
+ if op != token.ASSIGN {
+ err = fmt.Sprintf("\n\treason: invalid operation %s nil", op)
+ } else if !IsNillableKind(t.Kind()) {
+ err = fmt.Sprintf("\n\treason: cannot assign nil to %v", t)
+ }
+ } else if !init.Type.AssignableTo(t) {
+ err = interfaceMissingMethod(init.Type, t)
} else {
- ok = init.Type.AssignableTo(t)
+ err = nil
}
}
- if !ok {
- c.Errorf("incompatible types in assignment: %v %s %v", t, op, init.Type)
+ if err != nil {
+ c.Errorf("incompatible types in assignment: %v %s %v%v", t, op, init.Type, err)
return
}
class := va.Desc.Class()
diff --git a/vendor/github.com/cosmos72/gomacro/fast/var_ops.gomacro b/vendor/github.com/cosmos72/gomacro/fast/var_ops.gomacro
index 595616c..d22b9db 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/var_ops.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/var_ops.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* var_setops.go
@@ -26,6 +17,7 @@
package fast
import (
+ "fmt"
"go/token"
r "reflect"
"unsafe"
@@ -137,9 +129,9 @@ import (
env = ~"{~,env . Outer}
}
} else if upn == -2 {
- env = ~'{env.ThreadGlobals.FileEnv}
+ env = ~'{env.FileEnv}
} else if upn == -3 {
- env = ~'{env.ThreadGlobals.TopEnv}
+ env = ~'{env.FileEnv.Outer}
} else {
loop = ~'{
o := env.Outer.Outer.Outer
@@ -160,7 +152,7 @@ import (
opset := op_to_assign(op)
var bind, cbind ast.Node
- var assign *ast.AssignStmt = ~"{*(*~,typ)(unsafe.Pointer(& ~,env .IntBinds[index])) += ~,expr}
+ var assign *ast.AssignStmt = ~"{*(*~,typ)(unsafe.Pointer(& ~,env .Ints[index])) += ~,expr}
assign.Tok = opset
bind = assign
@@ -168,36 +160,32 @@ import (
case r.Bool:
var result *ast.BinaryExpr = ~"{lhs.Bool() + ~,expr}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetBool(~,result)}
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetBool(~,result)}
case r.Int, r.Int8, r.Int16, r.Int32, r.Int64:
var result *ast.BinaryExpr = ~"{lhs.Int() + int64(~,expr)}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetInt(~,result)}
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetInt(~,result)}
case r.Uint, r.Uint8, r.Uint16, r.Uint32, r.Uint64, r.Uintptr:
var result *ast.BinaryExpr = ~"{lhs.Uint() + uint64(~,expr)}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetUint(~,result)}
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetUint(~,result)}
if t.Kind() == r.Uint64 {
- var assign *ast.AssignStmt = ~"{~,env . IntBinds[index] += ~,expr}
+ var assign *ast.AssignStmt = ~"{~,env . Ints[index] += ~,expr}
assign.Tok = opset
bind = assign
}
case r.Float32, r.Float64:
var result *ast.BinaryExpr = ~"{lhs.Float() + float64(~,expr)}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetFloat(~,result)}
- case r.Complex64:
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetFloat(~,result)}
+ case r.Complex64, r.Complex128:
var result *ast.BinaryExpr = ~"{lhs.Complex() + complex128(~,expr)}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetComplex(~,result)}
- case r.Complex128:
- var result *ast.BinaryExpr = ~"{lhs.Complex() + ~,expr}
- result.Op = op
- bind = ~"{lhs := ~,env . Binds[index]; lhs.SetComplex(~,result)}
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetComplex(~,result)}
case r.String:
var result *ast.BinaryExpr = ~"{lhs.String() + ~,expr}
result.Op = op
- bind = ~"{lhs := ~,env . Binds[index]; lhs.SetString(~,result)}
+ bind = ~"{lhs := ~,env . Vals[index]; lhs.SetString(~,result)}
}
if cbind == nil {
@@ -244,8 +232,8 @@ import (
case 0: setplace_const; ~,opnode; 0; ~,typ
case 1: setplace_const; ~,opnode; 1; ~,typ
case 2: setplace_const; ~,opnode; 2; ~,typ
- default: setplace_const; ~,opnode;-1; ~,typ
case c.Depth-1: setplace_const; ~,opnode;-2; ~,typ
+ default: setplace_const; ~,opnode;-1; ~,typ
}
}
}
@@ -256,8 +244,8 @@ import (
case 0: setplace_expr; ~,opnode; 0; ~,typ
case 1: setplace_expr; ~,opnode; 1; ~,typ
case 2: setplace_expr; ~,opnode; 2; ~,typ
- default: setplace_expr; ~,opnode;-1; ~,typ
case c.Depth-1: setplace_expr; ~,opnode;-2; ~,typ
+ default: setplace_expr; ~,opnode;-1; ~,typ
}
}
}
@@ -378,7 +366,7 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
var t r.Type = EvalType(typ)
loop, bind := fgetplace(depth, typ)
- addr := ~"{(*~,typ)(unsafe.Pointer(& ~,bind .IntBinds[index]))}
+ addr := ~"{(*~,typ)(unsafe.Pointer(& ~,bind .Ints[index]))}
return ~"{
y_1 := ~,typ(y - 1) // cannot overflow, y is the abs() value of a non-zero ~,typ
@@ -415,9 +403,9 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
loop, bind := fgetplace(depth, typ)
if t.Kind() == r.Uint64 {
- bind = ~"{~,bind . IntBinds[index]}
+ bind = ~"{~,bind . Ints[index]}
} else {
- bind = ~"{*(*~,typ)(unsafe.Pointer(& ~,bind .IntBinds[index]))}
+ bind = ~"{*(*~,typ)(unsafe.Pointer(& ~,bind .Ints[index]))}
}
return ~"{
ret = func(env *Env) (Stmt, *Env) {
@@ -435,8 +423,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
case 0: place_quopow2; 0; ~,typ
case 1: place_quopow2; 1; ~,typ
case 2: place_quopow2; 2; ~,typ
- default: place_quopow2;-1; ~,typ
case c.Depth-1: place_quopow2;-2; ~,typ
+ default: place_quopow2;-1; ~,typ
}
}
}
@@ -447,8 +435,8 @@ func (c *Comp) varMulExpr(va *Var, fun I) {
case 0: place_quopow2_u; 0; ~,typ
case 1: place_quopow2_u; 1; ~,typ
case 2: place_quopow2_u; 2; ~,typ
- default: place_quopow2_u;-1; ~,typ
case c.Depth-1: place_quopow2_u;-2; ~,typ
+ default: place_quopow2_u;-1; ~,typ
}
}
}
@@ -620,28 +608,37 @@ func (c *Comp) varAndnotExpr(va *Var, fun I) {
// 'variable op constant' and 'variable op expression'
func (c *Comp) SetVar(va *Var, op token.Token, init *Expr) {
t := va.Type
- var ok, shift bool
+ var shift bool
+ var err interface{} = ""
switch op {
case token.SHL, token.SHL_ASSIGN, token.SHR, token.SHR_ASSIGN:
shift = true
if init.Untyped() {
init.ConstTo(c.TypeOfUint64())
- ok = true
+ err = nil
+ } else if init.Type == nil || KindToCategory(init.Type.Kind()) != r.Uint {
+ err = fmt.Sprintf("\n\treason: type %v is %v, expecting unsigned integer", init.Type, init.Type.Kind())
} else {
- ok = init.Type != nil && KindToCategory(init.Type.Kind()) == r.Uint
+ err = nil
}
default:
if init.Const() {
init.ConstTo(t)
- ok = true
+ err = nil
} else if init.Type == nil {
- ok = op == token.ASSIGN && IsNillableKind(t.Kind())
+ if op != token.ASSIGN {
+ err = fmt.Sprintf("\n\treason: invalid operation %s nil", op)
+ } else if !IsNillableKind(t.Kind()) {
+ err = fmt.Sprintf("\n\treason: cannot assign nil to %v", t)
+ }
+ } else if !init.Type.AssignableTo(t) {
+ err = interfaceMissingMethod(init.Type, t)
} else {
- ok = init.Type.AssignableTo(t)
+ err = nil
}
}
- if !ok {
- c.Errorf("incompatible types in assignment: %v %s %v", t, op, init.Type)
+ if err != nil {
+ c.Errorf("incompatible types in assignment: %v %s %v%v", t, op, init.Type, err)
return
}
class := va.Desc.Class()
@@ -654,11 +651,11 @@ func (c *Comp) SetVar(va *Var, op token.Token, init *Expr) {
if op != token.ASSIGN {
c.Errorf("invalid operator %s on _", op)
}
+
if !init.Const() {
- // assigning an expression to _
- // only keep the expression side effects
c.append(init.AsStmt())
}
+
return
}
if init.Const() {
@@ -732,5 +729,3 @@ func (c *Comp) SetVar(va *Var, op token.Token, init *Expr) {
}
}
}
-
-
diff --git a/vendor/github.com/cosmos72/gomacro/fast/var_set.go b/vendor/github.com/cosmos72/gomacro/fast/var_set.go
index 63a9cdd..1a6ecdd 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/var_set.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/var_set.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* var_set.go
@@ -68,7 +59,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*bool)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -76,7 +67,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetBool(val,
+ Vals[index].SetBool(val,
)
env.IP++
@@ -92,7 +83,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -100,7 +91,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -115,7 +106,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -123,7 +114,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -138,7 +129,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -146,7 +137,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -161,7 +152,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -169,7 +160,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -184,7 +175,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -192,7 +183,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(val,
+ Vals[index].SetInt(val,
)
env.IP++
@@ -209,7 +200,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -217,7 +208,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -234,7 +225,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -242,7 +233,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -260,7 +251,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -268,7 +259,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -286,7 +277,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -294,7 +285,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -310,7 +301,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] = val
+ Ints[index] = val
env.IP++
return env.Code[env.IP], env
@@ -318,7 +309,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(val,
+ Vals[index].SetUint(val,
)
env.IP++
@@ -336,7 +327,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -344,7 +335,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -362,7 +353,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -370,7 +361,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetFloat(float64(val,
+ Vals[index].SetFloat(float64(val,
))
env.IP++
@@ -386,7 +377,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -394,7 +385,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetFloat(val,
+ Vals[index].SetFloat(val,
)
env.IP++
@@ -412,7 +403,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -420,7 +411,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetComplex(complex128(val,
+ Vals[index].SetComplex(complex128(val,
))
env.IP++
@@ -433,13 +424,23 @@ func (c *Comp) varSetConst(va *Var, val I) {
{
val := v.Complex()
- ret = func(env *Env) (Stmt, *Env) {
- env.
- Binds[index].SetComplex(val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Ints[index])) = val
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.
+ Vals[index].SetComplex(val,
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -449,7 +450,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetString(val,
+ Vals[index].SetString(val,
)
env.IP++
@@ -461,7 +462,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].Set(v,
+ Vals[index].Set(v,
)
env.IP++
@@ -479,7 +480,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*bool)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -488,7 +489,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetBool(val,
+ Vals[index].SetBool(val,
)
env.IP++
@@ -505,7 +506,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -514,7 +515,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -530,7 +531,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -539,7 +540,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -555,7 +556,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -564,7 +565,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -580,7 +581,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -589,7 +590,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -605,7 +606,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -614,7 +615,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(val,
+ Vals[index].SetInt(val,
)
env.IP++
@@ -632,7 +633,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -641,7 +642,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -659,7 +660,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -668,7 +669,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -687,7 +688,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -696,7 +697,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -715,7 +716,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -724,7 +725,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -741,7 +742,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] = val
+ Ints[index] = val
env.IP++
return env.Code[env.IP], env
@@ -750,7 +751,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(val,
+ Vals[index].SetUint(val,
)
env.IP++
@@ -769,7 +770,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -778,7 +779,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -797,7 +798,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -806,7 +807,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetFloat(float64(val,
+ Vals[index].SetFloat(float64(val,
))
env.IP++
@@ -823,7 +824,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -832,7 +833,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetFloat(val,
+ Vals[index].SetFloat(val,
)
env.IP++
@@ -851,7 +852,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -860,7 +861,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetComplex(complex128(val,
+ Vals[index].SetComplex(complex128(val,
))
env.IP++
@@ -873,14 +874,25 @@ func (c *Comp) varSetConst(va *Var, val I) {
{
val := v.Complex()
- ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.
- Binds[index].SetComplex(val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.
+ Ints[index])) = val
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.
+ Outer.
+ Vals[index].SetComplex(val,
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -891,7 +903,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetString(val,
+ Vals[index].SetString(val,
)
env.IP++
@@ -904,7 +916,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].Set(v,
+ Vals[index].Set(v,
)
env.IP++
@@ -922,7 +934,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*bool)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -931,7 +943,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetBool(val,
+ Vals[index].SetBool(val,
)
env.IP++
@@ -948,7 +960,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -957,7 +969,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -973,7 +985,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -982,7 +994,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -998,7 +1010,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1007,7 +1019,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -1023,7 +1035,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1032,7 +1044,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -1048,7 +1060,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1057,7 +1069,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(val,
+ Vals[index].SetInt(val,
)
env.IP++
@@ -1075,7 +1087,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1084,7 +1096,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1102,7 +1114,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1111,7 +1123,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1130,7 +1142,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1139,7 +1151,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1158,7 +1170,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1167,7 +1179,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1184,7 +1196,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] = val
+ Ints[index] = val
env.IP++
return env.Code[env.IP], env
@@ -1193,7 +1205,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(val,
+ Vals[index].SetUint(val,
)
env.IP++
@@ -1212,7 +1224,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1221,7 +1233,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1240,7 +1252,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1249,7 +1261,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetFloat(float64(val,
+ Vals[index].SetFloat(float64(val,
))
env.IP++
@@ -1266,7 +1278,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1275,7 +1287,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetFloat(val,
+ Vals[index].SetFloat(val,
)
env.IP++
@@ -1294,7 +1306,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1303,7 +1315,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetComplex(complex128(val,
+ Vals[index].SetComplex(complex128(val,
))
env.IP++
@@ -1316,14 +1328,25 @@ func (c *Comp) varSetConst(va *Var, val I) {
{
val := v.Complex()
- ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- Binds[index].SetComplex(val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.
+ Ints[index])) = val
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.
+ Outer.Outer.
+ Vals[index].SetComplex(val,
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -1334,7 +1357,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetString(val,
+ Vals[index].SetString(val,
)
env.IP++
@@ -1347,7 +1370,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].Set(v,
+ Vals[index].Set(v,
)
env.IP++
@@ -1369,7 +1392,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*bool)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1382,7 +1405,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetBool(val,
+ Vals[index].SetBool(val,
)
env.IP++
@@ -1403,7 +1426,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*int)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1416,7 +1439,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -1436,7 +1459,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*int8)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1449,7 +1472,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -1469,7 +1492,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*int16)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1482,7 +1505,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -1502,7 +1525,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*int32)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1515,7 +1538,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetInt(int64(val,
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -1535,7 +1558,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*int64)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1548,7 +1571,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetInt(val,
+ Vals[index].SetInt(val,
)
env.IP++
@@ -1570,7 +1593,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*uint)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1583,7 +1606,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1605,7 +1628,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*uint8)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1618,7 +1641,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1641,7 +1664,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*uint16)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1654,7 +1677,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1677,7 +1700,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*uint32)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1690,7 +1713,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1711,7 +1734,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- IntBinds[index] = val
+ Ints[index] = val
env.IP++
return env.Code[env.IP], env
@@ -1724,7 +1747,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetUint(val,
+ Vals[index].SetUint(val,
)
env.IP++
@@ -1747,7 +1770,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*uintptr)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1760,7 +1783,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetUint(uint64(val,
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -1783,7 +1806,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*float32)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1796,7 +1819,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetFloat(float64(val,
+ Vals[index].SetFloat(float64(val,
))
env.IP++
@@ -1817,7 +1840,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*float64)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1830,7 +1853,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetFloat(val,
+ Vals[index].SetFloat(val,
)
env.IP++
@@ -1853,7 +1876,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
*(*complex64)(unsafe.Pointer(&o.
- IntBinds[index])) = val
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
@@ -1866,7 +1889,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetComplex(complex128(val,
+ Vals[index].SetComplex(complex128(val,
))
env.IP++
@@ -1879,18 +1902,33 @@ func (c *Comp) varSetConst(va *Var, val I) {
{
val := v.Complex()
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ *(*complex128)(unsafe.Pointer(&o.
+ Ints[index])) = val
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- o.
- Binds[index].SetComplex(val,
- )
+ o.
+ Vals[index].SetComplex(val,
+ )
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -1905,7 +1943,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].SetString(val,
+ Vals[index].SetString(val,
)
env.IP++
@@ -1922,7 +1960,7 @@ func (c *Comp) varSetConst(va *Var, val I) {
}
o.
- Binds[index].Set(v,
+ Vals[index].Set(v,
)
env.IP++
@@ -1938,16 +1976,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*bool)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*bool)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetBool(val,
+ env.FileEnv.
+ Vals[index].SetBool(val,
)
env.IP++
@@ -1962,16 +2000,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*int)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(val,
+ env.FileEnv.
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -1985,16 +2023,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(val,
+ env.FileEnv.
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -2008,16 +2046,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(val,
+ env.FileEnv.
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -2031,16 +2069,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(val,
+ env.FileEnv.
+ Vals[index].SetInt(int64(val,
))
env.IP++
@@ -2054,16 +2092,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(val,
+ env.FileEnv.
+ Vals[index].SetInt(val,
)
env.IP++
@@ -2079,16 +2117,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(val,
+ env.FileEnv.
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -2104,16 +2142,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(val,
+ env.FileEnv.
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -2130,16 +2168,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(val,
+ env.FileEnv.
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -2156,16 +2194,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(val,
+ env.FileEnv.
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -2180,16 +2218,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] = val
+ env.FileEnv.
+ Ints[index] = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(val,
+ env.FileEnv.
+ Vals[index].SetUint(val,
)
env.IP++
@@ -2206,16 +2244,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(val,
+ env.FileEnv.
+ Vals[index].SetUint(uint64(val,
))
env.IP++
@@ -2232,16 +2270,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*float32)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetFloat(float64(val,
+ env.FileEnv.
+ Vals[index].SetFloat(float64(val,
))
env.IP++
@@ -2256,16 +2294,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*float64)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetFloat(val,
+ env.FileEnv.
+ Vals[index].SetFloat(val,
)
env.IP++
@@ -2282,16 +2320,16 @@ func (c *Comp) varSetConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = val
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetComplex(complex128(val,
+ env.FileEnv.
+ Vals[index].SetComplex(complex128(val,
))
env.IP++
@@ -2304,13 +2342,23 @@ func (c *Comp) varSetConst(va *Var, val I) {
{
val := v.Complex()
- ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetComplex(val,
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = val
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.FileEnv.
+ Vals[index].SetComplex(val,
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -2319,8 +2367,8 @@ func (c *Comp) varSetConst(va *Var, val I) {
val := v.String()
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetString(val,
+ env.FileEnv.
+ Vals[index].SetString(val,
)
env.IP++
@@ -2331,8 +2379,8 @@ func (c *Comp) varSetConst(va *Var, val I) {
default:
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].Set(v,
+ env.FileEnv.
+ Vals[index].Set(v,
)
env.IP++
@@ -2347,7 +2395,6 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
upn := va.Upn
index := va.Desc.Index()
- rt := t.ReflectType()
fun := e.Fun
var ret func(env *Env) (Stmt, *Env)
intbinds := va.Desc.Class() == IntBind
@@ -2362,7 +2409,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*bool)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2370,7 +2417,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetBool(fun(env),
+ Vals[index].SetBool(fun(env),
)
env.IP++
@@ -2386,7 +2433,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2394,7 +2441,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2410,7 +2457,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2418,7 +2465,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2434,7 +2481,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2442,7 +2489,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2458,7 +2505,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2466,7 +2513,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2482,7 +2529,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2490,7 +2537,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetInt(fun(env),
+ Vals[index].SetInt(fun(env),
)
env.IP++
@@ -2506,7 +2553,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2514,7 +2561,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -2530,7 +2577,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2538,7 +2585,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -2554,7 +2601,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2562,7 +2609,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -2578,7 +2625,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2586,7 +2633,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -2601,7 +2648,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] = fun(env)
+ Ints[index] = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2609,7 +2656,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(fun(env),
+ Vals[index].SetUint(fun(env),
)
env.IP++
@@ -2624,7 +2671,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2632,7 +2679,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -2647,7 +2694,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2655,7 +2702,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetFloat(float64(fun(env),
+ Vals[index].SetFloat(float64(fun(env),
))
env.IP++
@@ -2670,7 +2717,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2678,7 +2725,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetFloat(fun(env),
+ Vals[index].SetFloat(fun(env),
)
env.IP++
@@ -2693,7 +2740,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2701,7 +2748,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetComplex(complex128(fun(env),
+ Vals[index].SetComplex(complex128(fun(env),
))
env.IP++
@@ -2713,13 +2760,23 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
{
fun := fun.(func(*Env) complex128)
- ret = func(env *Env) (Stmt, *Env) {
- env.
- Binds[index].SetComplex(fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Ints[index])) = fun(env)
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.
+ Vals[index].SetComplex(fun(env),
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -2729,7 +2786,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].SetString(fun(env),
+ Vals[index].SetString(fun(env),
)
env.IP++
@@ -2743,7 +2800,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if conv := c.Converter(e.Type, t); conv == nil {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].Set(fun(env),
+ Vals[index].Set(fun(env),
)
env.IP++
@@ -2752,7 +2809,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
} else {
ret = func(env *Env) (Stmt, *Env) {
env.
- Binds[index].Set(conv(fun(env), rt),
+ Vals[index].Set(conv(fun(env)),
)
env.IP++
@@ -2773,7 +2830,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*bool)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2782,7 +2839,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetBool(fun(env),
+ Vals[index].SetBool(fun(env),
)
env.IP++
@@ -2799,7 +2856,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2808,7 +2865,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2825,7 +2882,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2834,7 +2891,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2851,7 +2908,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2860,7 +2917,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2877,7 +2934,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2886,7 +2943,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -2903,7 +2960,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2912,7 +2969,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetInt(fun(env),
+ Vals[index].SetInt(fun(env),
)
env.IP++
@@ -2929,7 +2986,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2938,7 +2995,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -2955,7 +3012,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2964,7 +3021,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -2981,7 +3038,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2990,7 +3047,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3007,7 +3064,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3016,7 +3073,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3032,7 +3089,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] = fun(env)
+ Ints[index] = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3041,7 +3098,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(fun(env),
+ Vals[index].SetUint(fun(env),
)
env.IP++
@@ -3057,7 +3114,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3066,7 +3123,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3082,7 +3139,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3091,7 +3148,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetFloat(float64(fun(env),
+ Vals[index].SetFloat(float64(fun(env),
))
env.IP++
@@ -3107,7 +3164,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3116,7 +3173,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetFloat(fun(env),
+ Vals[index].SetFloat(fun(env),
)
env.IP++
@@ -3132,7 +3189,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3141,7 +3198,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetComplex(complex128(fun(env),
+ Vals[index].SetComplex(complex128(fun(env),
))
env.IP++
@@ -3153,14 +3210,25 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
{
fun := fun.(func(*Env) complex128)
- ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.
- Binds[index].SetComplex(fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.
+ Ints[index])) = fun(env)
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.
+ Outer.
+ Vals[index].SetComplex(fun(env),
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -3171,7 +3239,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].SetString(fun(env),
+ Vals[index].SetString(fun(env),
)
env.IP++
@@ -3186,7 +3254,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].Set(fun(env),
+ Vals[index].Set(fun(env),
)
env.IP++
@@ -3196,7 +3264,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- Binds[index].Set(conv(fun(env), rt),
+ Vals[index].Set(conv(fun(env)),
)
env.IP++
@@ -3217,7 +3285,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*bool)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3226,7 +3294,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetBool(fun(env),
+ Vals[index].SetBool(fun(env),
)
env.IP++
@@ -3243,7 +3311,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3252,7 +3320,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3269,7 +3337,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3278,7 +3346,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3295,7 +3363,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3304,7 +3372,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3321,7 +3389,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3330,7 +3398,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3347,7 +3415,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3356,7 +3424,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetInt(fun(env),
+ Vals[index].SetInt(fun(env),
)
env.IP++
@@ -3373,7 +3441,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3382,7 +3450,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3399,7 +3467,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3408,7 +3476,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3425,7 +3493,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3434,7 +3502,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3451,7 +3519,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3460,7 +3528,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3476,7 +3544,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] = fun(env)
+ Ints[index] = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3485,7 +3553,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(fun(env),
+ Vals[index].SetUint(fun(env),
)
env.IP++
@@ -3501,7 +3569,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3510,7 +3578,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3526,7 +3594,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*float32)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3535,7 +3603,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetFloat(float64(fun(env),
+ Vals[index].SetFloat(float64(fun(env),
))
env.IP++
@@ -3551,7 +3619,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*float64)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3560,7 +3628,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetFloat(fun(env),
+ Vals[index].SetFloat(fun(env),
)
env.IP++
@@ -3576,7 +3644,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
*(*complex64)(unsafe.Pointer(&env.
Outer.Outer.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3585,7 +3653,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetComplex(complex128(fun(env),
+ Vals[index].SetComplex(complex128(fun(env),
))
env.IP++
@@ -3597,14 +3665,25 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
{
fun := fun.(func(*Env) complex128)
- ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- Binds[index].SetComplex(fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.
+ Outer.Outer.
+ Ints[index])) = fun(env)
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.
+ Outer.Outer.
+ Vals[index].SetComplex(fun(env),
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -3615,7 +3694,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].SetString(fun(env),
+ Vals[index].SetString(fun(env),
)
env.IP++
@@ -3630,7 +3709,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].Set(fun(env),
+ Vals[index].Set(fun(env),
)
env.IP++
@@ -3640,7 +3719,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- Binds[index].Set(conv(fun(env), rt),
+ Vals[index].Set(conv(fun(env)),
)
env.IP++
@@ -3665,7 +3744,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*bool)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3678,7 +3757,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetBool(fun(env),
+ Vals[index].SetBool(fun(env),
)
env.IP++
@@ -3699,7 +3778,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*int)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3712,7 +3791,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3733,7 +3812,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*int8)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3746,7 +3825,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3767,7 +3846,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*int16)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3780,7 +3859,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3801,7 +3880,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*int32)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3814,7 +3893,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetInt(int64(fun(env),
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -3835,7 +3914,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*int64)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3848,7 +3927,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetInt(fun(env),
+ Vals[index].SetInt(fun(env),
)
env.IP++
@@ -3869,7 +3948,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*uint)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3882,7 +3961,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3903,7 +3982,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*uint8)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3916,7 +3995,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3937,7 +4016,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*uint16)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3950,7 +4029,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -3971,7 +4050,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*uint32)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -3984,7 +4063,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -4004,7 +4083,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- IntBinds[index] = fun(env)
+ Ints[index] = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4017,7 +4096,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetUint(fun(env),
+ Vals[index].SetUint(fun(env),
)
env.IP++
@@ -4037,7 +4116,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*uintptr)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4050,7 +4129,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetUint(uint64(fun(env),
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -4070,7 +4149,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*float32)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4083,7 +4162,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetFloat(float64(fun(env),
+ Vals[index].SetFloat(float64(fun(env),
))
env.IP++
@@ -4103,7 +4182,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*float64)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4116,7 +4195,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetFloat(fun(env),
+ Vals[index].SetFloat(fun(env),
)
env.IP++
@@ -4136,7 +4215,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
*(*complex64)(unsafe.Pointer(&o.
- IntBinds[index])) = fun(env)
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4149,7 +4228,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetComplex(complex128(fun(env),
+ Vals[index].SetComplex(complex128(fun(env),
))
env.IP++
@@ -4161,18 +4240,33 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
{
fun := fun.(func(*Env) complex128)
- ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ *(*complex128)(unsafe.Pointer(&o.
+ Ints[index])) = fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
}
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
- o.
- Binds[index].SetComplex(fun(env),
- )
+ o.
+ Vals[index].SetComplex(fun(env),
+ )
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -4187,7 +4281,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].SetString(fun(env),
+ Vals[index].SetString(fun(env),
)
env.IP++
@@ -4206,7 +4300,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].Set(fun(env),
+ Vals[index].Set(fun(env),
)
env.IP++
@@ -4220,7 +4314,7 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
o.
- Binds[index].Set(conv(fun(env), rt),
+ Vals[index].Set(conv(fun(env)),
)
env.IP++
@@ -4239,16 +4333,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*bool)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*bool)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetBool(fun(env),
+ env.FileEnv.
+ Vals[index].SetBool(fun(env),
)
env.IP++
@@ -4263,16 +4357,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*int)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(fun(env),
+ env.FileEnv.
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -4287,16 +4381,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(fun(env),
+ env.FileEnv.
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -4311,16 +4405,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(fun(env),
+ env.FileEnv.
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -4335,16 +4429,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(int64(fun(env),
+ env.FileEnv.
+ Vals[index].SetInt(int64(fun(env),
))
env.IP++
@@ -4359,16 +4453,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetInt(fun(env),
+ env.FileEnv.
+ Vals[index].SetInt(fun(env),
)
env.IP++
@@ -4383,16 +4477,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(fun(env),
+ env.FileEnv.
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -4407,16 +4501,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(fun(env),
+ env.FileEnv.
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -4431,16 +4525,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(fun(env),
+ env.FileEnv.
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -4455,16 +4549,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(fun(env),
+ env.FileEnv.
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -4478,16 +4572,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] = fun(env)
+ env.FileEnv.
+ Ints[index] = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(fun(env),
+ env.FileEnv.
+ Vals[index].SetUint(fun(env),
)
env.IP++
@@ -4501,16 +4595,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetUint(uint64(fun(env),
+ env.FileEnv.
+ Vals[index].SetUint(uint64(fun(env),
))
env.IP++
@@ -4524,16 +4618,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*float32)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetFloat(float64(fun(env),
+ env.FileEnv.
+ Vals[index].SetFloat(float64(fun(env),
))
env.IP++
@@ -4547,16 +4641,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*float64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*float64)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetFloat(fun(env),
+ env.FileEnv.
+ Vals[index].SetFloat(fun(env),
)
env.IP++
@@ -4570,16 +4664,16 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*complex64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.
- IntBinds[index])) = fun(env)
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetComplex(complex128(fun(env),
+ env.FileEnv.
+ Vals[index].SetComplex(complex128(fun(env),
))
env.IP++
@@ -4591,13 +4685,23 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
{
fun := fun.(func(*Env) complex128)
- ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetComplex(fun(env),
- )
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.
+ Ints[index])) = fun(env)
- env.IP++
- return env.Code[env.IP], env
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ env.FileEnv.
+ Vals[index].SetComplex(fun(env),
+ )
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
}
}
@@ -4606,8 +4710,8 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
fun := fun.(func(*Env) string)
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].SetString(fun(env),
+ env.FileEnv.
+ Vals[index].SetString(fun(env),
)
env.IP++
@@ -4620,8 +4724,8 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
fun := e.AsX1()
if conv := c.Converter(e.Type, t); conv == nil {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].Set(fun(env),
+ env.FileEnv.
+ Vals[index].Set(fun(env),
)
env.IP++
@@ -4629,8 +4733,8 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- Binds[index].Set(conv(fun(env), rt),
+ env.FileEnv.
+ Vals[index].Set(conv(fun(env)),
)
env.IP++
diff --git a/vendor/github.com/cosmos72/gomacro/fast/var_set.gomacro b/vendor/github.com/cosmos72/gomacro/fast/var_set.gomacro
index c4bfdbe..a612479 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/var_set.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/var_set.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* var_set.go
@@ -51,9 +42,9 @@ import (
env = ~"{~,env . Outer}
}
} else if upn == -2 {
- env = ~'{env.ThreadGlobals.FileEnv}
+ env = ~'{env.FileEnv}
} else if upn == -3 {
- env = ~'{env.ThreadGlobals.TopEnv}
+ env = ~'{env.FileEnv.Outer}
} else {
loop = ~'{
o := env.Outer.Outer.Outer
@@ -65,32 +56,32 @@ import (
}
if t == nil {
- bind = ~"{~,env . Binds[index] .Set(~,exprv)}
+ bind = ~"{~,env . Vals[index] .Set(~,exprv)}
} else {
typename := &ast.Ident{Name: t.Name()}
- bind = ~"{*(*~,typename)(unsafe.Pointer(& ~,env .IntBinds[index])) = ~,expr}
+ bind = ~"{*(*~,typename)(unsafe.Pointer(& ~,env .Ints[index])) = ~,expr}
switch t.Kind() {
case r.Bool:
- cbind = ~"{~,env . Binds[index].SetBool(~,expr)}
+ cbind = ~"{~,env . Vals[index].SetBool(~,expr)}
case r.Int, r.Int8, r.Int16, r.Int32:
- cbind = ~"{~,env . Binds[index].SetInt(int64(~,expr))}
+ cbind = ~"{~,env . Vals[index].SetInt(int64(~,expr))}
case r.Int64:
- cbind = ~"{~,env . Binds[index].SetInt(~,expr)}
+ cbind = ~"{~,env . Vals[index].SetInt(~,expr)}
case r.Uint, r.Uint8, r.Uint16, r.Uint32, r.Uintptr:
- cbind = ~"{~,env . Binds[index].SetUint(uint64(~,expr))}
+ cbind = ~"{~,env . Vals[index].SetUint(uint64(~,expr))}
case r.Uint64:
- bind = ~"{~,env . IntBinds[index] = ~,expr}
- cbind = ~"{~,env . Binds[index].SetUint(~,expr)}
+ bind = ~"{~,env . Ints[index] = ~,expr}
+ cbind = ~"{~,env . Vals[index].SetUint(~,expr)}
case r.Float32:
- cbind = ~"{~,env . Binds[index].SetFloat(float64(~,expr))}
+ cbind = ~"{~,env . Vals[index].SetFloat(float64(~,expr))}
case r.Float64:
- cbind = ~"{~,env . Binds[index].SetFloat(~,expr)}
+ cbind = ~"{~,env . Vals[index].SetFloat(~,expr)}
case r.Complex64:
- cbind = ~"{~,env . Binds[index] .SetComplex(complex128(~,expr))}
+ cbind = ~"{~,env . Vals[index] .SetComplex(complex128(~,expr))}
case r.Complex128:
- bind = ~"{~,env . Binds[index] .SetComplex(~,expr)}
+ cbind = ~"{~,env . Vals[index] .SetComplex(~,expr)}
case r.String:
- bind = ~"{~,env . Binds[index] .SetString(~,expr)}
+ bind = ~"{~,env . Vals[index] .SetString(~,expr)}
}
}
@@ -182,7 +173,7 @@ import (
:macro setplace_expr(depth, typ ast.Node) ast.Node {
if EvalType(typ) == nil {
ret0 := fsetplace(depth, typ, ~'{fun(env)}, ~'{fun(env)})
- ret := fsetplace(depth, typ, ~'{fun(env)}, ~'{conv(fun(env), rt)})
+ ret := fsetplace(depth, typ, ~'{fun(env)}, ~'{conv(fun(env))})
return ~"{
fun := e.AsX1() // we need the exact type!
if conv := c.Converter(e.Type, t); conv == nil {
@@ -286,7 +277,6 @@ func (c *Comp) varSetExpr(va *Var, e *Expr) {
upn := va.Upn
index := va.Desc.Index()
- rt := t.ReflectType()
fun := e.Fun
var ret func(env *Env) (Stmt, *Env)
intbinds := va.Desc.Class() == IntBind
diff --git a/vendor/github.com/cosmos72/gomacro/fast/var_set_value.go b/vendor/github.com/cosmos72/gomacro/fast/var_set_value.go
index 821e29d..72b7b1b 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/var_set_value.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/var_set_value.go
@@ -1,23 +1,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * var_setter.go
+ * var_set_value.go
*
* Created on Apr 09, 2017
* Author Massimiliano Ghilardi
@@ -48,7 +39,8 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
c.Errorf("cannot assign to %v %s", desc.Class(), va.Name)
return nil
case VarBind:
- // if current package is compiled, also variables with kind = Bool, Int*, Uint*, Float*, Complex64 will have class == VarBind
+ // if current package is at least partially compiled, also variables
+ // with kind = Bool, Int*, Uint*, Float*, Complex* may have class == VarBind
index := desc.Index()
if index == NoIndex {
@@ -61,30 +53,30 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
switch t.Kind() {
case r.Bool:
ret = func(env *Env, v r.Value) {
- env.Binds[index].SetBool(v.Bool())
+ env.Vals[index].SetBool(v.Bool())
}
case r.Int, r.Int8, r.Int32, r.Int64:
ret = func(env *Env, v r.Value) {
- env.Binds[index].SetInt(v.Int())
+ env.Vals[index].SetInt(v.Int())
}
case r.Uint, r.Uint8, r.Uint32, r.Uint64, r.Uintptr:
ret = func(env *Env, v r.Value) {
- env.Binds[index].SetUint(v.Uint())
+ env.Vals[index].SetUint(v.Uint())
}
case r.Float32, r.Float64:
ret = func(env *Env, v r.Value) {
- env.Binds[index].SetFloat(v.Float())
+ env.Vals[index].SetFloat(v.Float())
}
case r.Complex64, r.Complex128:
ret = func(env *Env, v r.Value) {
- env.Binds[index].SetComplex(v.Complex())
+ env.Vals[index].SetComplex(v.Complex())
}
case r.String:
ret = func(env *Env, v r.Value) {
if v.Kind() != r.String {
v = v.Convert(TypeOfString)
}
- env.Binds[index].SetString(v.String())
+ env.Vals[index].SetString(v.String())
}
case r.Chan, r.Interface, r.Map, r.Ptr, r.Slice:
ret = func(env *Env, v r.Value) {
@@ -93,44 +85,44 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
} else if v.Type() != rt {
v = v.Convert(rt)
}
- env.Binds[index].Set(v)
+ env.Vals[index].Set(v)
}
default:
ret = func(env *Env, v r.Value) {
if v.Type() != rt {
v = v.Convert(rt)
}
- env.Binds[index].Set(v)
+ env.Vals[index].Set(v)
}
}
case 1:
switch t.Kind() {
case r.Bool:
ret = func(env *Env, v r.Value) {
- env.Outer.Binds[index].SetBool(v.Bool())
+ env.Outer.Vals[index].SetBool(v.Bool())
}
case r.Int, r.Int8, r.Int32, r.Int64:
ret = func(env *Env, v r.Value) {
- env.Outer.Binds[index].SetInt(v.Int())
+ env.Outer.Vals[index].SetInt(v.Int())
}
case r.Uint, r.Uint8, r.Uint32, r.Uint64, r.Uintptr:
ret = func(env *Env, v r.Value) {
- env.Outer.Binds[index].SetUint(v.Uint())
+ env.Outer.Vals[index].SetUint(v.Uint())
}
case r.Float32, r.Float64:
ret = func(env *Env, v r.Value) {
- env.Outer.Binds[index].SetFloat(v.Float())
+ env.Outer.Vals[index].SetFloat(v.Float())
}
case r.Complex64, r.Complex128:
ret = func(env *Env, v r.Value) {
- env.Outer.Binds[index].SetComplex(v.Complex())
+ env.Outer.Vals[index].SetComplex(v.Complex())
}
case r.String:
ret = func(env *Env, v r.Value) {
if v.Kind() != r.String {
v = v.Convert(TypeOfString)
}
- env.Outer.Binds[index].SetString(v.String())
+ env.Outer.Vals[index].SetString(v.String())
}
case r.Chan, r.Interface, r.Map, r.Ptr, r.Slice:
ret = func(env *Env, v r.Value) {
@@ -139,44 +131,44 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
} else if v.Type() != rt {
v = v.Convert(rt)
}
- env.Outer.Binds[index].Set(v)
+ env.Outer.Vals[index].Set(v)
}
default:
ret = func(env *Env, v r.Value) {
if v.Type() != rt {
v = v.Convert(rt)
}
- env.Outer.Binds[index].Set(v)
+ env.Outer.Vals[index].Set(v)
}
}
case 2:
switch t.Kind() {
case r.Bool:
ret = func(env *Env, v r.Value) {
- env.Outer.Outer.Binds[index].SetBool(v.Bool())
+ env.Outer.Outer.Vals[index].SetBool(v.Bool())
}
case r.Int, r.Int8, r.Int32, r.Int64:
ret = func(env *Env, v r.Value) {
- env.Outer.Outer.Binds[index].SetInt(v.Int())
+ env.Outer.Outer.Vals[index].SetInt(v.Int())
}
case r.Uint, r.Uint8, r.Uint32, r.Uint64, r.Uintptr:
ret = func(env *Env, v r.Value) {
- env.Outer.Outer.Binds[index].SetUint(v.Uint())
+ env.Outer.Outer.Vals[index].SetUint(v.Uint())
}
case r.Float32, r.Float64:
ret = func(env *Env, v r.Value) {
- env.Outer.Outer.Binds[index].SetFloat(v.Float())
+ env.Outer.Outer.Vals[index].SetFloat(v.Float())
}
case r.Complex64, r.Complex128:
ret = func(env *Env, v r.Value) {
- env.Outer.Outer.Binds[index].SetComplex(v.Complex())
+ env.Outer.Outer.Vals[index].SetComplex(v.Complex())
}
case r.String:
ret = func(env *Env, v r.Value) {
if v.Kind() != r.String {
v = v.Convert(TypeOfString)
}
- env.Outer.Outer.Binds[index].SetString(v.String())
+ env.Outer.Outer.Vals[index].SetString(v.String())
}
case r.Chan, r.Interface, r.Map, r.Ptr, r.Slice:
ret = func(env *Env, v r.Value) {
@@ -185,14 +177,60 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
} else if v.Type() != rt {
v = v.Convert(rt)
}
- env.Outer.Outer.Binds[index].Set(v)
+ env.Outer.Outer.Vals[index].Set(v)
}
default:
ret = func(env *Env, v r.Value) {
if v.Type() != rt {
v = v.Convert(rt)
}
- env.Outer.Outer.Binds[index].Set(v)
+ env.Outer.Outer.Vals[index].Set(v)
+ }
+ }
+ case c.Depth - 1:
+ switch t.Kind() {
+ case r.Bool:
+ ret = func(env *Env, v r.Value) {
+ env.FileEnv.Vals[index].SetBool(v.Bool())
+ }
+ case r.Int, r.Int8, r.Int32, r.Int64:
+ ret = func(env *Env, v r.Value) {
+ env.FileEnv.Vals[index].SetInt(v.Int())
+ }
+ case r.Uint, r.Uint8, r.Uint32, r.Uint64, r.Uintptr:
+ ret = func(env *Env, v r.Value) {
+ env.FileEnv.Vals[index].SetUint(v.Uint())
+ }
+ case r.Float32, r.Float64:
+ ret = func(env *Env, v r.Value) {
+ env.FileEnv.Vals[index].SetFloat(v.Float())
+ }
+ case r.Complex64, r.Complex128:
+ ret = func(env *Env, v r.Value) {
+ env.FileEnv.Vals[index].SetComplex(v.Complex())
+ }
+ case r.String:
+ ret = func(env *Env, v r.Value) {
+ if v.Kind() != r.String {
+ v = v.Convert(TypeOfString)
+ }
+ env.FileEnv.Vals[index].SetString(v.String())
+ }
+ case r.Chan, r.Interface, r.Map, r.Ptr, r.Slice:
+ ret = func(env *Env, v r.Value) {
+ if v == Nil || v == None {
+ v = zero
+ } else if v.Type() != rt {
+ v = v.Convert(rt)
+ }
+ env.FileEnv.Vals[index].Set(v)
+ }
+ default:
+ ret = func(env *Env, v r.Value) {
+ if v.Type() != rt {
+ v = v.Convert(rt)
+ }
+ env.FileEnv.Vals[index].Set(v)
}
}
default:
@@ -203,7 +241,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- o.Binds[index].SetBool(v.Bool())
+ o.Vals[index].SetBool(v.Bool())
}
case r.Int, r.Int8, r.Int32, r.Int64:
ret = func(env *Env, v r.Value) {
@@ -211,7 +249,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- o.Binds[index].SetInt(v.Int())
+ o.Vals[index].SetInt(v.Int())
}
case r.Uint, r.Uint8, r.Uint32, r.Uint64, r.Uintptr:
ret = func(env *Env, v r.Value) {
@@ -219,7 +257,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- o.Binds[index].SetUint(v.Uint())
+ o.Vals[index].SetUint(v.Uint())
}
case r.Float32, r.Float64:
ret = func(env *Env, v r.Value) {
@@ -227,7 +265,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- o.Binds[index].SetFloat(v.Float())
+ o.Vals[index].SetFloat(v.Float())
}
case r.Complex64, r.Complex128:
ret = func(env *Env, v r.Value) {
@@ -235,7 +273,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- o.Binds[index].SetComplex(v.Complex())
+ o.Vals[index].SetComplex(v.Complex())
}
case r.String:
ret = func(env *Env, v r.Value) {
@@ -246,7 +284,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
if v.Kind() != r.String {
v = v.Convert(TypeOfString)
}
- o.Binds[index].SetString(v.String())
+ o.Vals[index].SetString(v.String())
}
case r.Chan, r.Interface, r.Map, r.Ptr, r.Slice:
ret = func(env *Env, v r.Value) {
@@ -259,7 +297,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
} else if v.Type() != rt {
v = v.Convert(rt)
}
- o.Binds[index].Set(v)
+ o.Vals[index].Set(v)
}
default:
ret = func(env *Env, v r.Value) {
@@ -270,7 +308,7 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
if v.Type() != rt {
v = v.Convert(rt)
}
- o.Binds[index].Set(v)
+ o.Vals[index].Set(v)
}
}
}
@@ -285,63 +323,67 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
switch t.Kind() {
case r.Bool:
ret = func(env *Env, v r.Value) {
- *(*bool)(unsafe.Pointer(&env.IntBinds[index])) = v.Bool()
+ *(*bool)(unsafe.Pointer(&env.Ints[index])) = v.Bool()
}
case r.Int:
ret = func(env *Env, v r.Value) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) = int(v.Int())
+ *(*int)(unsafe.Pointer(&env.Ints[index])) = int(v.Int())
}
case r.Int8:
ret = func(env *Env, v r.Value) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) = int8(v.Int())
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) = int8(v.Int())
}
case r.Int16:
ret = func(env *Env, v r.Value) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) = int16(v.Int())
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) = int16(v.Int())
}
case r.Int32:
ret = func(env *Env, v r.Value) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) = int32(v.Int())
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) = int32(v.Int())
}
case r.Int64:
ret = func(env *Env, v r.Value) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) = v.Int()
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) = v.Int()
}
case r.Uint:
ret = func(env *Env, v r.Value) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) = uint(v.Uint())
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) = uint(v.Uint())
}
case r.Uint8:
ret = func(env *Env, v r.Value) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) = uint8(v.Uint())
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) = uint8(v.Uint())
}
case r.Uint16:
ret = func(env *Env, v r.Value) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) = uint16(v.Uint())
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) = uint16(v.Uint())
}
case r.Uint32:
ret = func(env *Env, v r.Value) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) = uint32(v.Uint())
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) = uint32(v.Uint())
}
case r.Uint64:
ret = func(env *Env, v r.Value) {
- env.IntBinds[index] = v.Uint()
+ env.Ints[index] = v.Uint()
}
case r.Uintptr:
ret = func(env *Env, v r.Value) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) = uintptr(v.Uint())
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) = uintptr(v.Uint())
}
case r.Float32:
ret = func(env *Env, v r.Value) {
- *(*float32)(unsafe.Pointer(&env.IntBinds[index])) = float32(v.Float())
+ *(*float32)(unsafe.Pointer(&env.Ints[index])) = float32(v.Float())
}
case r.Float64:
ret = func(env *Env, v r.Value) {
- *(*float64)(unsafe.Pointer(&env.IntBinds[index])) = v.Float()
+ *(*float64)(unsafe.Pointer(&env.Ints[index])) = v.Float()
}
case r.Complex64:
ret = func(env *Env, v r.Value) {
- *(*complex64)(unsafe.Pointer(&env.IntBinds[index])) = complex64(v.Complex())
+ *(*complex64)(unsafe.Pointer(&env.Ints[index])) = complex64(v.Complex())
+ }
+ case r.Complex128:
+ ret = func(env *Env, v r.Value) {
+ *(*complex128)(unsafe.Pointer(&env.Ints[index])) = v.Complex()
}
default:
c.Errorf("unsupported type, cannot use for optimized assignment: %s <%v>", va.Name, t)
@@ -351,63 +393,67 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
switch t.Kind() {
case r.Bool:
ret = func(env *Env, v r.Value) {
- *(*bool)(unsafe.Pointer(&env.Outer.IntBinds[index])) = v.Bool()
+ *(*bool)(unsafe.Pointer(&env.Outer.Ints[index])) = v.Bool()
}
case r.Int:
ret = func(env *Env, v r.Value) {
- *(*int)(unsafe.Pointer(&env.Outer.IntBinds[index])) = int(v.Int())
+ *(*int)(unsafe.Pointer(&env.Outer.Ints[index])) = int(v.Int())
}
case r.Int8:
ret = func(env *Env, v r.Value) {
- *(*int8)(unsafe.Pointer(&env.Outer.IntBinds[index])) = int8(v.Int())
+ *(*int8)(unsafe.Pointer(&env.Outer.Ints[index])) = int8(v.Int())
}
case r.Int16:
ret = func(env *Env, v r.Value) {
- *(*int16)(unsafe.Pointer(&env.Outer.IntBinds[index])) = int16(v.Int())
+ *(*int16)(unsafe.Pointer(&env.Outer.Ints[index])) = int16(v.Int())
}
case r.Int32:
ret = func(env *Env, v r.Value) {
- *(*int32)(unsafe.Pointer(&env.Outer.IntBinds[index])) = int32(v.Int())
+ *(*int32)(unsafe.Pointer(&env.Outer.Ints[index])) = int32(v.Int())
}
case r.Int64:
ret = func(env *Env, v r.Value) {
- *(*int64)(unsafe.Pointer(&env.Outer.IntBinds[index])) = v.Int()
+ *(*int64)(unsafe.Pointer(&env.Outer.Ints[index])) = v.Int()
}
case r.Uint:
ret = func(env *Env, v r.Value) {
- *(*uint)(unsafe.Pointer(&env.Outer.IntBinds[index])) = uint(v.Uint())
+ *(*uint)(unsafe.Pointer(&env.Outer.Ints[index])) = uint(v.Uint())
}
case r.Uint8:
ret = func(env *Env, v r.Value) {
- *(*uint8)(unsafe.Pointer(&env.Outer.IntBinds[index])) = uint8(v.Uint())
+ *(*uint8)(unsafe.Pointer(&env.Outer.Ints[index])) = uint8(v.Uint())
}
case r.Uint16:
ret = func(env *Env, v r.Value) {
- *(*uint16)(unsafe.Pointer(&env.Outer.IntBinds[index])) = uint16(v.Uint())
+ *(*uint16)(unsafe.Pointer(&env.Outer.Ints[index])) = uint16(v.Uint())
}
case r.Uint32:
ret = func(env *Env, v r.Value) {
- *(*uint32)(unsafe.Pointer(&env.Outer.IntBinds[index])) = uint32(v.Uint())
+ *(*uint32)(unsafe.Pointer(&env.Outer.Ints[index])) = uint32(v.Uint())
}
case r.Uint64:
ret = func(env *Env, v r.Value) {
- env.Outer.IntBinds[index] = v.Uint()
+ env.Outer.Ints[index] = v.Uint()
}
case r.Uintptr:
ret = func(env *Env, v r.Value) {
- *(*uintptr)(unsafe.Pointer(&env.Outer.IntBinds[index])) = uintptr(v.Uint())
+ *(*uintptr)(unsafe.Pointer(&env.Outer.Ints[index])) = uintptr(v.Uint())
}
case r.Float32:
ret = func(env *Env, v r.Value) {
- *(*float32)(unsafe.Pointer(&env.Outer.IntBinds[index])) = float32(v.Float())
+ *(*float32)(unsafe.Pointer(&env.Outer.Ints[index])) = float32(v.Float())
}
case r.Float64:
ret = func(env *Env, v r.Value) {
- *(*float64)(unsafe.Pointer(&env.Outer.IntBinds[index])) = v.Float()
+ *(*float64)(unsafe.Pointer(&env.Outer.Ints[index])) = v.Float()
}
case r.Complex64:
ret = func(env *Env, v r.Value) {
- *(*complex64)(unsafe.Pointer(&env.Outer.IntBinds[index])) = complex64(v.Complex())
+ *(*complex64)(unsafe.Pointer(&env.Outer.Ints[index])) = complex64(v.Complex())
+ }
+ case r.Complex128:
+ ret = func(env *Env, v r.Value) {
+ *(*complex128)(unsafe.Pointer(&env.Outer.Ints[index])) = v.Complex()
}
default:
c.Errorf("unsupported type, cannot use for optimized assignment: %s <%v>", va.Name, t)
@@ -417,63 +463,137 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
switch t.Kind() {
case r.Bool:
ret = func(env *Env, v r.Value) {
- *(*bool)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = v.Bool()
+ *(*bool)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = v.Bool()
+ }
+ case r.Int:
+ ret = func(env *Env, v r.Value) {
+ *(*int)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = int(v.Int())
+ }
+ case r.Int8:
+ ret = func(env *Env, v r.Value) {
+ *(*int8)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = int8(v.Int())
+ }
+ case r.Int16:
+ ret = func(env *Env, v r.Value) {
+ *(*int16)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = int16(v.Int())
+ }
+ case r.Int32:
+ ret = func(env *Env, v r.Value) {
+ *(*int32)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = int32(v.Int())
+ }
+ case r.Int64:
+ ret = func(env *Env, v r.Value) {
+ *(*int64)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = v.Int()
+ }
+ case r.Uint:
+ ret = func(env *Env, v r.Value) {
+ *(*uint)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = uint(v.Uint())
+ }
+ case r.Uint8:
+ ret = func(env *Env, v r.Value) {
+ *(*uint8)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = uint8(v.Uint())
+ }
+ case r.Uint16:
+ ret = func(env *Env, v r.Value) {
+ *(*uint16)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = uint16(v.Uint())
+ }
+ case r.Uint32:
+ ret = func(env *Env, v r.Value) {
+ *(*uint32)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = uint32(v.Uint())
+ }
+ case r.Uint64:
+ ret = func(env *Env, v r.Value) {
+ env.Outer.Outer.Ints[index] = v.Uint()
+ }
+ case r.Uintptr:
+ ret = func(env *Env, v r.Value) {
+ *(*uintptr)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = uintptr(v.Uint())
+ }
+ case r.Float32:
+ ret = func(env *Env, v r.Value) {
+ *(*float32)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = float32(v.Float())
+ }
+ case r.Float64:
+ ret = func(env *Env, v r.Value) {
+ *(*float64)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = v.Float()
+ }
+ case r.Complex64:
+ ret = func(env *Env, v r.Value) {
+ *(*complex64)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = complex64(v.Complex())
+ }
+ case r.Complex128:
+ ret = func(env *Env, v r.Value) {
+ *(*complex128)(unsafe.Pointer(&env.Outer.Outer.Ints[index])) = v.Complex()
+ }
+ default:
+ c.Errorf("unsupported type, cannot use for optimized assignment: %s <%v>", va.Name, t)
+ return nil
+ }
+ case c.Depth - 1:
+ switch t.Kind() {
+ case r.Bool:
+ ret = func(env *Env, v r.Value) {
+ *(*bool)(unsafe.Pointer(&env.FileEnv.Ints[index])) = v.Bool()
}
case r.Int:
ret = func(env *Env, v r.Value) {
- *(*int)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = int(v.Int())
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) = int(v.Int())
}
case r.Int8:
ret = func(env *Env, v r.Value) {
- *(*int8)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = int8(v.Int())
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) = int8(v.Int())
}
case r.Int16:
ret = func(env *Env, v r.Value) {
- *(*int16)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = int16(v.Int())
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) = int16(v.Int())
}
case r.Int32:
ret = func(env *Env, v r.Value) {
- *(*int32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = int32(v.Int())
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) = int32(v.Int())
}
case r.Int64:
ret = func(env *Env, v r.Value) {
- *(*int64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = v.Int()
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) = v.Int()
}
case r.Uint:
ret = func(env *Env, v r.Value) {
- *(*uint)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = uint(v.Uint())
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) = uint(v.Uint())
}
case r.Uint8:
ret = func(env *Env, v r.Value) {
- *(*uint8)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = uint8(v.Uint())
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) = uint8(v.Uint())
}
case r.Uint16:
ret = func(env *Env, v r.Value) {
- *(*uint16)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = uint16(v.Uint())
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) = uint16(v.Uint())
}
case r.Uint32:
ret = func(env *Env, v r.Value) {
- *(*uint32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = uint32(v.Uint())
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) = uint32(v.Uint())
}
case r.Uint64:
ret = func(env *Env, v r.Value) {
- env.Outer.Outer.IntBinds[index] = v.Uint()
+ env.FileEnv.Ints[index] = v.Uint()
}
case r.Uintptr:
ret = func(env *Env, v r.Value) {
- *(*uintptr)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = uintptr(v.Uint())
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) = uintptr(v.Uint())
}
case r.Float32:
ret = func(env *Env, v r.Value) {
- *(*float32)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = float32(v.Float())
+ *(*float32)(unsafe.Pointer(&env.FileEnv.Ints[index])) = float32(v.Float())
}
case r.Float64:
ret = func(env *Env, v r.Value) {
- *(*float64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = v.Float()
+ *(*float64)(unsafe.Pointer(&env.FileEnv.Ints[index])) = v.Float()
}
case r.Complex64:
ret = func(env *Env, v r.Value) {
- *(*complex64)(unsafe.Pointer(&env.Outer.Outer.IntBinds[index])) = complex64(v.Complex())
+ *(*complex64)(unsafe.Pointer(&env.FileEnv.Ints[index])) = complex64(v.Complex())
+ }
+ case r.Complex128:
+ ret = func(env *Env, v r.Value) {
+ *(*complex128)(unsafe.Pointer(&env.FileEnv.Ints[index])) = v.Complex()
}
default:
c.Errorf("unsupported type, cannot use for optimized assignment: %s <%v>", va.Name, t)
@@ -486,105 +606,112 @@ func (c *Comp) varSetValue(va *Var) func(*Env, r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*bool)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = v.Bool()
+ *(*bool)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = v.Bool()
}
case r.Int:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*int)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = int(v.Int())
+ *(*int)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = int(v.Int())
}
case r.Int8:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*int8)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = int8(v.Int())
+ *(*int8)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = int8(v.Int())
}
case r.Int16:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*int16)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = int16(v.Int())
+ *(*int16)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = int16(v.Int())
}
case r.Int32:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*int32)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = int32(v.Int())
+ *(*int32)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = int32(v.Int())
}
case r.Int64:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*int64)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = v.Int()
+ *(*int64)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = v.Int()
}
case r.Uint:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*uint)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = uint(v.Uint())
+ *(*uint)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = uint(v.Uint())
}
case r.Uint8:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*uint8)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = uint8(v.Uint())
+ *(*uint8)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = uint8(v.Uint())
}
case r.Uint16:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*uint16)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = uint16(v.Uint())
+ *(*uint16)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = uint16(v.Uint())
}
case r.Uint32:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*uint32)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = uint32(v.Uint())
+ *(*uint32)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = uint32(v.Uint())
}
case r.Uint64:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- env.Outer.Outer.Outer.IntBinds[index] = v.Uint()
+ env.Outer.Outer.Outer.Ints[index] = v.Uint()
}
case r.Uintptr:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*uintptr)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = uintptr(v.Uint())
+ *(*uintptr)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = uintptr(v.Uint())
}
case r.Float32:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*float32)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = float32(v.Float())
+ *(*float32)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = float32(v.Float())
}
case r.Float64:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*float64)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = v.Float()
+ *(*float64)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = v.Float()
}
case r.Complex64:
ret = func(env *Env, v r.Value) {
for i := 3; i < upn; i++ {
env = env.Outer
}
- *(*complex64)(unsafe.Pointer(&env.Outer.Outer.Outer.IntBinds[index])) = complex64(v.Complex())
+ *(*complex64)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = complex64(v.Complex())
+ }
+ case r.Complex128:
+ ret = func(env *Env, v r.Value) {
+ for i := 3; i < upn; i++ {
+ env = env.Outer
+ }
+ *(*complex128)(unsafe.Pointer(&env.Outer.Outer.Outer.Ints[index])) = v.Complex()
}
default:
c.Errorf("unsupported type, cannot use for optimized assignment: %s <%v>", va.Name, t)
diff --git a/vendor/github.com/cosmos72/gomacro/fast/var_shifts.go b/vendor/github.com/cosmos72/gomacro/fast/var_shifts.go
index e54d04b..6ddca25 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/var_shifts.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/var_shifts.go
@@ -6,20 +6,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* var_shifts.go
@@ -62,7 +53,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -71,7 +62,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -86,7 +77,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -96,7 +87,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -111,7 +102,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -121,7 +112,30 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() <<
+ val,
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -139,7 +153,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*int)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -153,7 +167,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -163,11 +177,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -175,8 +192,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -186,14 +203,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -202,7 +217,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -212,12 +228,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -226,8 +242,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -237,12 +253,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -250,9 +265,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -270,7 +284,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -284,7 +298,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -294,11 +308,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -306,8 +323,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -317,14 +334,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -333,7 +348,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -343,12 +359,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -357,8 +373,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -368,12 +384,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -381,9 +396,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -401,7 +415,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -415,7 +429,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -425,11 +439,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -437,8 +454,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -448,14 +465,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -464,7 +479,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -474,12 +490,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -488,8 +504,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -499,12 +515,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -512,9 +527,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -532,7 +546,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -546,7 +560,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -556,11 +570,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -568,8 +585,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -579,14 +596,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -595,7 +610,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -605,12 +621,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -619,8 +635,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -630,12 +646,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -643,9 +658,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -663,7 +677,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -677,7 +691,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
val,
)
@@ -687,11 +701,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -699,9 +716,9 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() <<
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() <<
val,
)
}
@@ -710,14 +727,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -726,7 +741,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -736,12 +752,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -750,8 +766,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -761,12 +777,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -774,9 +789,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -794,7 +808,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -808,7 +822,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -818,11 +832,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -830,8 +847,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -841,14 +858,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -857,7 +872,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -867,12 +883,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -881,8 +897,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -892,12 +908,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -905,9 +920,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -925,7 +939,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -939,7 +953,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -949,11 +963,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -961,8 +978,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -972,14 +989,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -988,7 +1003,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -998,12 +1014,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1012,8 +1028,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1023,12 +1039,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1036,9 +1051,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1056,7 +1070,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1070,7 +1084,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1080,11 +1094,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1092,8 +1109,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1103,14 +1120,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1119,7 +1134,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1129,12 +1145,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1143,8 +1159,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1154,12 +1170,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1167,9 +1182,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1187,7 +1201,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1201,7 +1215,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1211,11 +1225,15 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
+ env.
+ Ints[index] <<= val
env.IP++
return env.Code[env.IP], env
@@ -1223,8 +1241,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1234,15 +1252,13 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] <<= val
+ Outer.
+ Ints[index] <<= val
env.IP++
return env.Code[env.IP], env
@@ -1251,7 +1267,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1261,13 +1278,13 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] <<= val
+ Outer.Outer.
+ Ints[index] <<= val
env.IP++
return env.Code[env.IP], env
@@ -1276,8 +1293,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1287,13 +1304,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] <<= val
+ env.FileEnv.
+ Ints[index] <<= val
env.IP++
return env.Code[env.IP], env
@@ -1301,9 +1317,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1322,7 +1337,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
o = o.Outer
}
- o.IntBinds[index] <<= val
+ o.Ints[index] <<= val
env.IP++
return env.Code[env.IP], env
@@ -1336,7 +1351,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1346,12 +1361,14 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] <<= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1359,8 +1376,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1370,14 +1387,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) <<= val
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1386,7 +1401,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1396,12 +1412,12 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= val
+ Outer.Outer.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1410,8 +1426,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1421,12 +1437,11 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1434,9 +1449,8 @@ func (c *Comp) varShlConst(va *Var, val I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1454,7 +1468,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) <<= val
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) <<= val
env.IP++
return env.Code[env.IP], env
@@ -1468,7 +1482,7 @@ func (c *Comp) varShlConst(va *Var, val I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
val,
)
@@ -1478,32 +1492,9 @@ func (c *Comp) varShlConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= val
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetUint(lhs.Uint() <<
- val,
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- }
- default:
- c.Errorf(`invalid operator %s= between <%v> and <%v>`, token.SHL, t, t2)
+ }
+ default:
+ c.Errorf(`invalid operator %s= between <%v> and <%v>`, token.SHL, t, t2)
}
c.append(ret)
@@ -1530,7 +1521,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1539,7 +1530,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1554,7 +1545,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1564,7 +1555,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1579,7 +1570,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1589,7 +1580,30 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
+ lhs.SetInt(lhs.Int() <<
+ fun(env),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case c.Depth - 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1607,7 +1621,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1621,7 +1635,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1631,11 +1645,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1643,8 +1660,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1654,14 +1671,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1670,7 +1685,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1680,12 +1696,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1694,8 +1710,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1705,12 +1721,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1718,9 +1733,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1738,7 +1752,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1752,7 +1766,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1762,11 +1776,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1774,8 +1791,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1785,14 +1802,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1801,7 +1816,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1811,12 +1827,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1825,8 +1841,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1836,12 +1852,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1849,9 +1864,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1869,7 +1883,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1883,7 +1897,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1893,11 +1907,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1905,8 +1922,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1916,14 +1933,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1932,7 +1947,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1942,12 +1958,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1956,8 +1972,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -1967,12 +1983,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -1980,9 +1995,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -2000,7 +2014,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2014,7 +2028,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -2024,11 +2038,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2036,8 +2053,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -2047,14 +2064,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2063,7 +2078,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -2073,12 +2089,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2087,8 +2103,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -2098,12 +2114,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2111,9 +2126,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -2131,7 +2145,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2145,7 +2159,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() <<
fun(env),
)
@@ -2155,11 +2169,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2167,9 +2184,9 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() <<
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() <<
fun(env),
)
}
@@ -2178,14 +2195,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2194,7 +2209,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2204,12 +2220,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2218,8 +2234,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2229,12 +2245,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2242,9 +2257,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2262,7 +2276,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2276,7 +2290,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2286,11 +2300,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2298,8 +2315,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2309,14 +2326,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2325,7 +2340,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2335,12 +2351,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2349,8 +2365,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2360,12 +2376,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2373,9 +2388,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2393,7 +2407,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2407,7 +2421,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2417,11 +2431,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2429,8 +2446,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2440,14 +2457,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2456,7 +2471,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2466,12 +2482,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2480,8 +2496,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2491,12 +2507,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2504,9 +2519,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2524,7 +2538,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2538,7 +2552,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2548,11 +2562,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2560,8 +2577,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2571,14 +2588,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2587,7 +2602,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2597,12 +2613,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2611,8 +2627,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2622,12 +2638,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2635,9 +2650,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2655,7 +2669,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2669,7 +2683,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2679,11 +2693,15 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
+ env.
+ Ints[index] <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2691,8 +2709,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2702,15 +2720,13 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] <<= fun(env)
+ Outer.
+ Ints[index] <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2719,7 +2735,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2729,13 +2746,13 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] <<= fun(env)
+ Outer.Outer.
+ Ints[index] <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2744,8 +2761,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2755,13 +2772,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] <<= fun(env)
+ env.FileEnv.
+ Ints[index] <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2769,9 +2785,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2790,7 +2805,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
o = o.Outer
}
- o.IntBinds[index] <<= fun(env)
+ o.Ints[index] <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2804,7 +2819,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2814,12 +2829,14 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] <<= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2827,8 +2844,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2838,14 +2855,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) <<= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2854,7 +2869,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2864,12 +2880,12 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) <<= fun(env)
+ Outer.Outer.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2878,8 +2894,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2889,12 +2905,11 @@ func (c *Comp) varShlExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) <<= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2902,9 +2917,8 @@ func (c *Comp) varShlExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -2922,7 +2936,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) <<= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) <<= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -2936,30 +2950,7 @@ func (c *Comp) varShlExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
- lhs.SetUint(lhs.Uint() <<
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) <<= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() <<
fun(env),
)
@@ -3001,7 +2992,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*int)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3010,7 +3001,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3025,7 +3016,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3035,7 +3026,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3050,7 +3041,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3060,7 +3051,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3070,29 +3061,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3102,20 +3084,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3132,7 +3123,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3141,7 +3132,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3156,7 +3147,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3166,7 +3157,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3181,7 +3172,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3191,7 +3182,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3201,29 +3192,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3233,20 +3215,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3263,7 +3254,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3272,7 +3263,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3287,7 +3278,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3297,7 +3288,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3312,7 +3303,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3322,7 +3313,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3332,29 +3323,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3364,20 +3346,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3394,7 +3385,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3403,7 +3394,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3418,7 +3409,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3428,7 +3419,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3443,7 +3434,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3453,7 +3444,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3463,29 +3454,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3495,20 +3477,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3525,7 +3516,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3534,7 +3525,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3549,7 +3540,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3559,7 +3550,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3574,7 +3565,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3584,7 +3575,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3594,29 +3585,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3626,20 +3608,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
val,
)
@@ -3656,7 +3647,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3665,7 +3656,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3680,7 +3671,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3690,7 +3681,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3705,7 +3696,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3715,7 +3706,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3725,29 +3716,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3757,20 +3739,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3787,7 +3778,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3796,7 +3787,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3811,7 +3802,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3821,7 +3812,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3836,7 +3827,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3846,7 +3837,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3856,29 +3847,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3888,20 +3870,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3918,7 +3909,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3927,7 +3918,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3942,7 +3933,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3952,7 +3943,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3967,7 +3958,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -3977,7 +3968,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -3987,29 +3978,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4019,20 +4001,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4049,7 +4040,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -4058,7 +4049,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4073,7 +4064,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -4083,7 +4074,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4098,7 +4089,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -4108,7 +4099,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4118,29 +4109,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4150,20 +4132,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4181,7 +4172,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] >>= val
+ Ints[index] >>= val
env.IP++
return env.Code[env.IP], env
@@ -4190,7 +4181,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4206,7 +4197,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.
- IntBinds[index] >>= val
+ Ints[index] >>= val
env.IP++
return env.Code[env.IP], env
@@ -4216,7 +4207,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4232,7 +4223,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
env.
Outer.Outer.
- IntBinds[index] >>= val
+ Ints[index] >>= val
env.IP++
return env.Code[env.IP], env
@@ -4242,7 +4233,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4252,30 +4243,21 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
-
- o.IntBinds[index] >>= val
+ env.FileEnv.
+ Ints[index] >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4285,21 +4267,30 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+
+ o.Ints[index] >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4316,7 +4307,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) >>= val
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -4325,7 +4316,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4340,7 +4331,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= val
+ Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -4350,7 +4341,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4365,7 +4356,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= val
+ Outer.Outer.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
@@ -4375,7 +4366,7 @@ func (c *Comp) varShrConst(va *Var, val I) {
{
lhs := env.
Outer.Outer.
- Binds[index]
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4385,29 +4376,20 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- default:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) >>= val
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
- o := env.Outer.Outer.Outer
- for i := 3; i < upn; i++ {
- o = o.Outer
- }
{
- lhs :=
-
- o.Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4417,20 +4399,29 @@ func (c *Comp) varShrConst(va *Var, val I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ default:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= val
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) >>= val
env.IP++
return env.Code[env.IP], env
}
} else {
ret = func(env *Env) (Stmt, *Env) {
+ o := env.Outer.Outer.Outer
+ for i := 3; i < upn; i++ {
+ o = o.Outer
+ }
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs :=
+
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
val,
)
@@ -4469,7 +4460,31 @@ func (c *Comp) varShrExpr(va *Var, function I) {
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*int)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ } else {
+ ret = func(env *Env) (Stmt, *Env) {
+ {
+ lhs := env.
+ Vals[index]
+ lhs.SetInt(lhs.Int() >>
+ fun(env),
+ )
+ }
+
+ env.IP++
+ return env.Code[env.IP], env
+ }
+ }
+ case 1:
+
+ if intbinds {
+ ret = func(env *Env) (Stmt, *Env) {
+ *(*int)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4478,7 +4493,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4488,12 +4504,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4502,8 +4518,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4513,12 +4529,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*int)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4526,9 +4541,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4546,7 +4560,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*int)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4560,7 +4574,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4570,11 +4584,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*int8)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4582,8 +4599,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4593,14 +4610,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*int8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4609,7 +4624,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4619,12 +4635,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4633,8 +4649,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4644,12 +4660,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*int8)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4657,9 +4672,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4677,7 +4691,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int8)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*int8)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4691,7 +4705,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4701,11 +4715,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*int16)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4713,8 +4730,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4724,14 +4741,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*int16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4740,7 +4755,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4750,12 +4766,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4764,8 +4780,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4775,12 +4791,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*int16)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4788,9 +4803,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4808,7 +4822,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int16)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*int16)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4822,7 +4836,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4832,11 +4846,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*int32)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4844,8 +4861,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4855,14 +4872,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*int32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4871,7 +4886,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4881,12 +4897,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4895,8 +4911,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4906,12 +4922,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*int32)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4919,9 +4934,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4939,7 +4953,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int32)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*int32)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4953,7 +4967,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4963,11 +4977,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Int64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*int64)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -4975,8 +4992,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -4986,14 +5003,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Int64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*int64)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5002,7 +5017,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -5012,12 +5028,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*int64)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5026,8 +5042,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -5037,12 +5053,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*int64)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5050,9 +5065,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -5070,7 +5084,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*int64)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*int64)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5084,7 +5098,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetInt(lhs.Int() >>
fun(env),
)
@@ -5094,11 +5108,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*int64)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*uint)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5106,9 +5123,9 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
- lhs.SetInt(lhs.Int() >>
+ lhs := env.
+ Vals[index]
+ lhs.SetUint(lhs.Uint() >>
fun(env),
)
}
@@ -5117,14 +5134,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*uint)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5133,7 +5148,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5143,12 +5159,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5157,8 +5173,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5168,12 +5184,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*uint)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5181,9 +5196,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5201,7 +5215,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*uint)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5215,7 +5229,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5225,11 +5239,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint8:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5237,8 +5254,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5248,14 +5265,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint8:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5264,7 +5279,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5274,12 +5290,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint8)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5288,8 +5304,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5299,12 +5315,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*uint8)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5312,9 +5327,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5332,7 +5346,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint8)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*uint8)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5346,7 +5360,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5356,11 +5370,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint16:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint8)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5368,8 +5385,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5379,14 +5396,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint16:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5395,7 +5410,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5405,12 +5421,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint16)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5419,8 +5435,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5430,12 +5446,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*uint16)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5443,9 +5458,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5463,7 +5477,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint16)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*uint16)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5477,7 +5491,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5487,11 +5501,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint32:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint16)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5499,8 +5516,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5510,14 +5527,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint32:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5526,7 +5541,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5536,12 +5552,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uint32)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5550,8 +5566,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5561,12 +5577,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*uint32)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5574,9 +5589,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5594,7 +5608,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uint32)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*uint32)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5608,7 +5622,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5618,11 +5632,15 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uint64:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uint32)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
+ env.
+ Ints[index] >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5630,8 +5648,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5641,15 +5659,13 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uint64:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- IntBinds[index] >>= fun(env)
+ Outer.
+ Ints[index] >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5658,7 +5674,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5668,13 +5685,13 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
env.
- Outer.
- IntBinds[index] >>= fun(env)
+ Outer.Outer.
+ Ints[index] >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5683,8 +5700,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5694,13 +5711,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.
- Outer.Outer.
- IntBinds[index] >>= fun(env)
+ env.FileEnv.
+ Ints[index] >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5708,9 +5724,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5729,7 +5744,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
o = o.Outer
}
- o.IntBinds[index] >>= fun(env)
+ o.Ints[index] >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5743,7 +5758,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5753,12 +5768,14 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case c.Depth - 1:
+ }
+ case r.Uintptr:
+ switch upn {
+ case 0:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- env.ThreadGlobals.FileEnv.
- IntBinds[index] >>= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5766,8 +5783,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ lhs := env.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5777,14 +5794,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- }
- case r.Uintptr:
- switch upn {
- case 0:
+ case 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.IntBinds[index])) >>= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.
+ Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5793,7 +5808,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Binds[index]
+ Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5803,12 +5819,12 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 1:
+ case 2:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
*(*uintptr)(unsafe.Pointer(&env.
- Outer.IntBinds[index])) >>= fun(env)
+ Outer.Outer.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5817,8 +5833,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
ret = func(env *Env) (Stmt, *Env) {
{
lhs := env.
- Outer.
- Binds[index]
+ Outer.Outer.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5828,12 +5844,11 @@ func (c *Comp) varShrExpr(va *Var, function I) {
return env.Code[env.IP], env
}
}
- case 2:
+ case c.Depth - 1:
if intbinds {
ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.
- Outer.Outer.IntBinds[index])) >>= fun(env)
+ *(*uintptr)(unsafe.Pointer(&env.FileEnv.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5841,9 +5856,8 @@ func (c *Comp) varShrExpr(va *Var, function I) {
} else {
ret = func(env *Env) (Stmt, *Env) {
{
- lhs := env.
- Outer.Outer.
- Binds[index]
+ lhs := env.FileEnv.
+ Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
@@ -5861,7 +5875,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
for i := 3; i < upn; i++ {
o = o.Outer
}
- *(*uintptr)(unsafe.Pointer(&o.IntBinds[index])) >>= fun(env)
+ *(*uintptr)(unsafe.Pointer(&o.Ints[index])) >>= fun(env)
env.IP++
return env.Code[env.IP], env
@@ -5875,30 +5889,7 @@ func (c *Comp) varShrExpr(va *Var, function I) {
{
lhs :=
- o.Binds[index]
- lhs.SetUint(lhs.Uint() >>
- fun(env),
- )
- }
-
- env.IP++
- return env.Code[env.IP], env
- }
- }
- case c.Depth - 1:
-
- if intbinds {
- ret = func(env *Env) (Stmt, *Env) {
- *(*uintptr)(unsafe.Pointer(&env.ThreadGlobals.FileEnv.IntBinds[index])) >>= fun(env)
-
- env.IP++
- return env.Code[env.IP], env
- }
- } else {
- ret = func(env *Env) (Stmt, *Env) {
- {
- lhs := env.ThreadGlobals.FileEnv.
- Binds[index]
+ o.Vals[index]
lhs.SetUint(lhs.Uint() >>
fun(env),
)
diff --git a/vendor/github.com/cosmos72/gomacro/fast/var_shifts.gomacro b/vendor/github.com/cosmos72/gomacro/fast/var_shifts.gomacro
index 194c3a8..df5d495 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/var_shifts.gomacro
+++ b/vendor/github.com/cosmos72/gomacro/fast/var_shifts.gomacro
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* var_shifts.go
@@ -137,9 +128,9 @@ import (
env = ~"{~,env . Outer}
}
} else if upn == -2 {
- env = ~'{env.ThreadGlobals.FileEnv}
+ env = ~'{env.FileEnv}
} else if upn == -3 {
- env = ~'{env.ThreadGlobals.TopEnv}
+ env = ~'{env.FileEnv.Outer}
} else {
loop = ~'{
o := env.Outer.Outer.Outer
@@ -160,7 +151,7 @@ import (
opset := op_to_assign(op)
var bind, cbind ast.Node
- var assign *ast.AssignStmt = ~"{*(*~,typ)(unsafe.Pointer(& ~,env .IntBinds[index])) += ~,expr}
+ var assign *ast.AssignStmt = ~"{*(*~,typ)(unsafe.Pointer(& ~,env .Ints[index])) += ~,expr}
assign.Tok = opset
bind = assign
@@ -168,32 +159,28 @@ import (
case r.Int, r.Int8, r.Int16, r.Int32, r.Int64:
var result *ast.BinaryExpr = ~"{lhs.Int() + ~,expr}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetInt(~,result)}
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetInt(~,result)}
case r.Uint, r.Uint8, r.Uint16, r.Uint32, r.Uint64, r.Uintptr:
var result *ast.BinaryExpr = ~"{lhs.Uint() + ~,expr}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetUint(~,result)}
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetUint(~,result)}
if t.Kind() == r.Uint64 {
- var assign *ast.AssignStmt = ~"{~,env . IntBinds[index] += ~,expr}
+ var assign *ast.AssignStmt = ~"{~,env . Ints[index] += ~,expr}
assign.Tok = opset
bind = assign
}
case r.Float32, r.Float64:
var result *ast.BinaryExpr = ~"{lhs.Float() + ~,expr}
result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetFloat(~,result)}
- case r.Complex64:
- var result *ast.BinaryExpr = ~"{lhs.Complex() + ~,expr}
- result.Op = op
- cbind = ~"{lhs := ~,env . Binds[index]; lhs.SetComplex(~,result)}
- case r.Complex128:
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetFloat(~,result)}
+ case r.Complex64, r.Complex128:
var result *ast.BinaryExpr = ~"{lhs.Complex() + ~,expr}
result.Op = op
- bind = ~"{lhs := ~,env . Binds[index]; lhs.SetComplex(~,result)}
+ cbind = ~"{lhs := ~,env . Vals[index]; lhs.SetComplex(~,result)}
case r.String:
var result *ast.BinaryExpr = ~"{lhs.String() + ~,expr}
result.Op = op
- bind = ~"{lhs := ~,env . Binds[index]; lhs.SetString(~,result)}
+ bind = ~"{lhs := ~,env . Vals[index]; lhs.SetString(~,result)}
}
if cbind == nil {
@@ -240,8 +227,8 @@ import (
case 0: setplace_const; ~,opnode; 0; ~,typ
case 1: setplace_const; ~,opnode; 1; ~,typ
case 2: setplace_const; ~,opnode; 2; ~,typ
- default: setplace_const; ~,opnode;-1; ~,typ
case c.Depth-1: setplace_const; ~,opnode;-2; ~,typ
+ default: setplace_const; ~,opnode;-1; ~,typ
}
}
}
@@ -252,8 +239,8 @@ import (
case 0: setplace_expr; ~,opnode; 0; ~,typ
case 1: setplace_expr; ~,opnode; 1; ~,typ
case 2: setplace_expr; ~,opnode; 2; ~,typ
- default: setplace_expr; ~,opnode;-1; ~,typ
case c.Depth-1: setplace_expr; ~,opnode;-2; ~,typ
+ default: setplace_expr; ~,opnode;-1; ~,typ
}
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/fast/x_package.go b/vendor/github.com/cosmos72/gomacro/fast/x_package.go
index 5da87bb..5c5602e 100644
--- a/vendor/github.com/cosmos72/gomacro/fast/x_package.go
+++ b/vendor/github.com/cosmos72/gomacro/fast/x_package.go
@@ -13,32 +13,23 @@ import (
func init() {
imports.Packages["github.com/cosmos72/gomacro/fast"] = imports.Package{
Binds: map[string]r.Value{
- "AnyDepth": r.ValueOf(AnyDepth),
"ConstBind": r.ValueOf(ConstBind),
"ConstBindDescriptor": r.ValueOf(ConstBindDescriptor),
- "FileDepth": r.ValueOf(FileDepth),
+ "EFlag4Value": r.ValueOf(EFlag4Value),
+ "EIsNil": r.ValueOf(EIsNil),
+ "EIsTypeAssert": r.ValueOf(EIsTypeAssert),
"FuncBind": r.ValueOf(FuncBind),
"IntBind": r.ValueOf(IntBind),
- "Interrupt": r.ValueOf(&Interrupt).Elem(),
- "MakeBindDescriptor": r.ValueOf(MakeBindDescriptor),
+ "MakeEFlag": r.ValueOf(MakeEFlag),
"New": r.ValueOf(New),
"NewComp": r.ValueOf(NewComp),
- "NewCompEnv": r.ValueOf(NewCompEnv),
- "NewCompEnvTop": r.ValueOf(NewCompEnvTop),
"NewEnv": r.ValueOf(NewEnv),
- "NewEnv4Func": r.ValueOf(NewEnv4Func),
- "NewThreadGlobals": r.ValueOf(NewThreadGlobals),
+ "NewInnerInterp": r.ValueOf(NewInnerInterp),
"NoIndex": r.ValueOf(NoIndex),
- "OptDefaults": r.ValueOf(OptDefaults),
- "OptKeepUntyped": r.ValueOf(OptKeepUntyped),
- "OptIsCompiled": r.ValueOf(OptIsCompiled),
+ "OptDefaults": r.ValueOf(COptDefaults),
+ "OptKeepUntyped": r.ValueOf(COptKeepUntyped),
"PlaceAddress": r.ValueOf(PlaceAddress),
"PlaceSettable": r.ValueOf(PlaceSettable),
- "PoolCapacity": r.ValueOf(PoolCapacity),
- "SigDefer": r.ValueOf(SigDefer),
- "SigNone": r.ValueOf(SigNone),
- "SigReturn": r.ValueOf(SigReturn),
- "TopDepth": r.ValueOf(TopDepth),
"VarBind": r.ValueOf(VarBind),
}, Types: map[string]r.Type{
"Assign": r.TypeOf((*Assign)(nil)).Elem(),
@@ -49,8 +40,9 @@ func init() {
"Call": r.TypeOf((*Call)(nil)).Elem(),
"Code": r.TypeOf((*Code)(nil)).Elem(),
"Comp": r.TypeOf((*Comp)(nil)).Elem(),
- "CompThreadGlobals": r.TypeOf((*CompThreadGlobals)(nil)).Elem(),
+ "CompGlobals": r.TypeOf((*CompGlobals)(nil)).Elem(),
"CompileOptions": r.TypeOf((*CompileOptions)(nil)).Elem(),
+ "EFlags": r.TypeOf((*EFlags)(nil)).Elem(),
"Env": r.TypeOf((*Env)(nil)).Elem(),
"Expr": r.TypeOf((*Expr)(nil)).Elem(),
"FuncInfo": r.TypeOf((*FuncInfo)(nil)).Elem(),
@@ -61,36 +53,22 @@ func init() {
"Lit": r.TypeOf((*Lit)(nil)).Elem(),
"LoopInfo": r.TypeOf((*LoopInfo)(nil)).Elem(),
"Macro": r.TypeOf((*Macro)(nil)).Elem(),
- "NamedType": r.TypeOf((*NamedType)(nil)).Elem(),
"Place": r.TypeOf((*Place)(nil)).Elem(),
"PlaceOption": r.TypeOf((*PlaceOption)(nil)).Elem(),
- "Signal": r.TypeOf((*Signal)(nil)).Elem(),
"Stmt": r.TypeOf((*Stmt)(nil)).Elem(),
"Symbol": r.TypeOf((*Symbol)(nil)).Elem(),
- "ThreadGlobals": r.TypeOf((*ThreadGlobals)(nil)).Elem(),
+ "Run": r.TypeOf((*Run)(nil)).Elem(),
"TypeAssertionError": r.TypeOf((*TypeAssertionError)(nil)).Elem(),
"UntypedLit": r.TypeOf((*UntypedLit)(nil)).Elem(),
"Var": r.TypeOf((*Var)(nil)).Elem(),
- }, Proxies: map[string]r.Type{
- "I": r.TypeOf((*I_github_com_cosmos72_gomacro_fast)(nil)).Elem(),
- }, Untypeds: map[string]string{
- "AnyDepth": "int:-1",
- "FileDepth": "int:-2",
- "PoolCapacity": "int:32",
- "TopDepth": "int:-3",
- }, Wrappers: map[string][]string{
- "Bind": []string{"ConstTo", "DefaultType", "ReflectValue", "Untyped", "UntypedKind"},
- "Comp": []string{"CollectAst", "CollectNode", "CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymEmbedded", "GensymPrivate", "IncLine", "IncLineBytes", "Init", "LookupPackage", "ParseBytes", "Position", "Sprintf", "ToString", "TypeOfBool", "TypeOfBuiltin", "TypeOfComplex128", "TypeOfComplex64", "TypeOfError", "TypeOfFloat32", "TypeOfFloat64", "TypeOfFunction", "TypeOfImport", "TypeOfInt", "TypeOfInt16", "TypeOfInt32", "TypeOfInt64", "TypeOfInt8", "TypeOfInterface", "TypeOfMacro", "TypeOfString", "TypeOfUint", "TypeOfUint16", "TypeOfUint32", "TypeOfUint64", "TypeOfUint8", "TypeOfUintptr", "TypeOfUntypedLit", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
- "CompThreadGlobals": []string{"CollectAst", "CollectNode", "CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymEmbedded", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "LookupPackage", "ParseBytes", "Position", "Sprintf", "ToString", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
- "Expr": []string{"ReflectValue", "Untyped", "UntypedKind"},
- "Place": []string{"Address", "AsPlace", "AsSymbol"},
- "Symbol": []string{"AsSymbol", "Const", "ConstTo", "ConstValue", "DefaultType", "ReflectValue", "String", "Untyped", "UntypedKind"},
- "ThreadGlobals": []string{"CollectAst", "CollectNode", "CollectPackageImports", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymEmbedded", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "Init", "LookupPackage", "ParseBytes", "Position", "Sprintf", "ToString", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
+ }, Untypeds: map[string]string{}, Wrappers: map[string][]string{
+ "Bind": []string{"ConstTo", "DefaultType", "ReflectValue", "Untyped", "UntypedKind"},
+ "Comp": []string{"CollectAst", "CollectNode", "CollectPackageImportsWithRename", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymAnonymous", "GensymPrivate", "IncLine", "IncLineBytes", "LookupPackage", "ParseBytes", "Position", "Print", "ReadMultiline", "Sprintf", "ToString", "TypeOfBool", "TypeOfBuiltin", "TypeOfComplex128", "TypeOfComplex64", "TypeOfError", "TypeOfFloat32", "TypeOfFloat64", "TypeOfFunction", "TypeOfImport", "TypeOfInt", "TypeOfInt16", "TypeOfInt32", "TypeOfInt64", "TypeOfInt8", "TypeOfInterface", "TypeOfMacro", "TypeOfString", "TypeOfUint", "TypeOfUint16", "TypeOfUint32", "TypeOfUint64", "TypeOfUint8", "TypeOfUintptr", "TypeOfUntypedLit", "UnloadPackage", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
+ "CompGlobals": []string{"CollectAst", "CollectNode", "CollectPackageImportsWithRename", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymAnonymous", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "LookupPackage", "ParseBytes", "Position", "Print", "ReadMultiline", "Sprintf", "ToString", "UnloadPackage", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
+ "Expr": []string{"IsNil", "ReflectValue", "Untyped", "UntypedKind"},
+ "Place": []string{"Address", "AsPlace", "AsSymbol"},
+ "Run": []string{"CollectAst", "CollectNode", "CollectPackageImportsWithRename", "Copy", "Debugf", "Error", "Errorf", "Fprintf", "Gensym", "GensymAnonymous", "GensymPrivate", "ImportPackage", "IncLine", "IncLineBytes", "LookupPackage", "ParseBytes", "Position", "Print", "ReadMultiline", "Sprintf", "ToString", "UnloadPackage", "WarnExtraValues", "Warnf", "WriteDeclsToFile", "WriteDeclsToStream"},
+ "Symbol": []string{"AsSymbol", "Const", "ConstTo", "ConstValue", "DefaultType", "ReflectValue", "String", "Untyped", "UntypedKind"},
},
}
}
-
-// --------------- proxy for github.com/cosmos72/gomacro/fast.I ---------------
-type I_github_com_cosmos72_gomacro_fast struct {
- Object interface{}
-}
diff --git a/vendor/github.com/cosmos72/gomacro/gls/LICENSE b/vendor/github.com/cosmos72/gomacro/gls/LICENSE
new file mode 100644
index 0000000..a43097c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, Massimiliano Ghilardi
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/cosmos72/gomacro/gls/README.md b/vendor/github.com/cosmos72/gomacro/gls/README.md
new file mode 100644
index 0000000..0a49329
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/README.md
@@ -0,0 +1,75 @@
+gls
+===
+
+Fast goroutine local storage.
+
+This is a reduced library, extracted from [cosmos72/gls](https://github.com/cosmos72/gls).
+See the original for the full version.
+
+
+### WARNING ###
+
+There is extensive documentation and discussion on why implementing and using
+thread-local storage in Go - actually, goroutine-local storage - is a bad idea.
+
+See for example the [Go FAQ on goroutine id](https://golang.org/doc/faq#no_goroutine_id)
+and [context.Context](https://blog.golang.org/context), which is how you're encouraged
+to solve problems that would require a goroutine-local storage.
+
+The main obstacle in adopting `context.Context` is that *all* of your functions
+must have a new first argument. So, if that horrifies you or is simply not feasible
+for your use case, feel free to ignore this warning and read on.
+
+Just remember that, if some Go programmers frowns at your use of goroutine-local
+storage, there are good reasons.
+
+### Why? ###
+
+To retrieve per-goroutine data that some function did not - or could not -
+pass through the call chain, down to where you need it.
+
+Other goroutine-local libraries, as [jtolds/gls](https://github.com/jtolds/gls)
+and [tylerb/gls](https://github.com/tylerb/gls) explain the reasons
+and use cases for goroutine-local storage more in detail.
+
+### Status ###
+
+Beta.
+
+Lightly tested on 386, amd64, arm, arm64, mips, ppc64le with Go 1.10.1.
+Other architectures (mips64, mips64le, mipsle, ppc64, s390x) supported in theory but not tested.
+
+### How it works ###
+
+Go runtime has an internal, i.e. unexported, goroutine-local `runtime.g` struct.
+It is used for several purposes, including `defer()`, `recover()`,
+by the goroutine scheduler, and it even has an unexported `goid` field,
+i.e. a goroutine ID.
+
+Several other goroutine-local libraries extract this goroutine ID
+with various tricks, most notably from `runtime.Stack()` textual output.
+
+Instead, we use a tiny bit of assembler code to retrieve the address
+of the `runtime.g` struct and return it converted to an opaque `uintptr`.
+
+We use it as the key in a global variable containing per-goroutine data.
+
+This is also **fast**, probably orders of magnitude faster than most other solutions.
+
+#### Why not the same goroutine ID? ####
+
+To avoid fiddling with the internal layout of `runtime.g` struct,
+we only take its address.
+
+Accessing the `goid` field would require knowing its offset within the struct,
+which is both tedious and error-prone to retrieve, since it's an unexported
+field of an unexported struct type.
+
+### Documentation ###
+
+See the autogenerated API docs at http://godoc.org/github.com/cosmos72/gls
+
+### License ###
+
+BSD 3-Clause License
+
diff --git a/vendor/github.com/cosmos72/gomacro/gls/api_gc.go b/vendor/github.com/cosmos72/gomacro/gls/api_gc.go
new file mode 100644
index 0000000..75cb6e6
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/api_gc.go
@@ -0,0 +1,14 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+package gls
+
+// return the current goroutine ID.
+//
+// note that the returned value is DIFFERENT from most other goroutine libraries:
+// this GoID() returns the address, converted to uintptr, of the runtime.g struct.
+// NOT the runtime.g.goid field returned by most other libraries.
+func GoID() uintptr
diff --git a/vendor/github.com/cosmos72/gomacro/gls/api_gccgo.go b/vendor/github.com/cosmos72/gomacro/gls/api_gccgo.go
new file mode 100644
index 0000000..fb0d06d
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/api_gccgo.go
@@ -0,0 +1,23 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gccgo
+
+package gls
+
+// return the current goroutine ID.
+//
+// note that the returned value is DIFFERENT from most other goroutine libraries:
+// this GoID() returns the address, converted to uintptr, of the runtime.g struct.
+// NOT the runtime.g.goid field returned by most other libraries.
+//go:nosplit
+func GoID() uintptr {
+ return goid()
+}
+
+// cannot export this function directly: when compiling other packages,
+// gccgo forgets that its name is actually "runtime.getg"
+//
+//extern runtime.getg
+func goid() uintptr
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_386.s b/vendor/github.com/cosmos72/gomacro/gls/id_386.s
new file mode 100644
index 0000000..2f196c7
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_386.s
@@ -0,0 +1,15 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT,$0-4
+ get_tls(CX)
+ MOVL g(CX), AX
+ MOVL AX, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_amd64.s b/vendor/github.com/cosmos72/gomacro/gls/id_amd64.s
new file mode 100644
index 0000000..8c0a93c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_amd64.s
@@ -0,0 +1,15 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT,$0-8
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ AX, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_arm.s b/vendor/github.com/cosmos72/gomacro/gls/id_arm.s
new file mode 100644
index 0000000..91a8104
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_arm.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT,$0-4
+ MOVW g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_arm64.s b/vendor/github.com/cosmos72/gomacro/gls/id_arm64.s
new file mode 100644
index 0000000..cdf8262
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_arm64.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT,$0-8
+ MOVD g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_mips.s b/vendor/github.com/cosmos72/gomacro/gls/id_mips.s
new file mode 100644
index 0000000..dfca150
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_mips.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT|NOFRAME,$-4-4
+ MOVW g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_mips64.s b/vendor/github.com/cosmos72/gomacro/gls/id_mips64.s
new file mode 100644
index 0000000..aaba2f1
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_mips64.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT|NOFRAME,$-8-8
+ MOVV g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_mips64le.s b/vendor/github.com/cosmos72/gomacro/gls/id_mips64le.s
new file mode 100644
index 0000000..aaba2f1
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_mips64le.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT|NOFRAME,$-8-8
+ MOVV g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_mipsle.s b/vendor/github.com/cosmos72/gomacro/gls/id_mipsle.s
new file mode 100644
index 0000000..dfca150
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_mipsle.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT|NOFRAME,$-4-4
+ MOVW g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_ppc64.s b/vendor/github.com/cosmos72/gomacro/gls/id_ppc64.s
new file mode 100644
index 0000000..cdf8262
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_ppc64.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT,$0-8
+ MOVD g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_ppc64le.s b/vendor/github.com/cosmos72/gomacro/gls/id_ppc64le.s
new file mode 100644
index 0000000..cdf8262
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_ppc64le.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT,$0-8
+ MOVD g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/id_s390x.s b/vendor/github.com/cosmos72/gomacro/gls/id_s390x.s
new file mode 100644
index 0000000..c5c62ec
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/id_s390x.s
@@ -0,0 +1,13 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build gc
+
+#include "go_asm.h"
+#include "textflag.h" // for NOSPLIT
+#include "../../src/runtime/go_tls.h"
+
+TEXT ·GoID(SB),NOSPLIT|NOFRAME,$0-8
+ MOVD g, goid+0(FP)
+ RET
diff --git a/vendor/github.com/cosmos72/gomacro/gls/z_test.go b/vendor/github.com/cosmos72/gomacro/gls/z_test.go
new file mode 100644
index 0000000..2fdd7e4
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/gls/z_test.go
@@ -0,0 +1,58 @@
+// Copyright 2018 Massimiliano Ghilardi. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gls
+
+import (
+ "testing"
+)
+
+var verbose bool = false
+
+func AsyncGoID() <-chan uintptr {
+ ch := make(chan uintptr)
+ go func() {
+ ch <- GoID()
+ }()
+ return ch
+}
+
+func TestGoID(t *testing.T) {
+ id1 := GoID()
+ id2 := GoID()
+ if id1 == id2 {
+ if verbose {
+ t.Logf("TestGoID: 0x%x == 0x%x", id1, id2)
+ }
+ } else {
+ t.Errorf("TestGoID: 0x%x != 0x%x", id1, id2)
+ }
+}
+
+func TestAsyncGoID1(t *testing.T) {
+ id1 := GoID()
+ id2 := <-AsyncGoID()
+ if id1 != id2 {
+ if verbose {
+ t.Logf("TestAsyncGoID1: 0x%x != 0x%x", id1, id2)
+ }
+ } else {
+ t.Errorf("TestAsyncGoID1: 0x%x == 0x%x", id1, id2)
+ }
+}
+
+func TestAsyncGoID2(t *testing.T) {
+ ch1 := AsyncGoID()
+ ch2 := AsyncGoID()
+ id1 := <-ch1
+ id2 := <-ch2
+ if id1 != id2 {
+ if verbose {
+ t.Logf("TestAsyncGoID2: 0x%x != 0x%x", id1, id2)
+ }
+ } else {
+ t.Errorf("TestAsyncGoID2: 0x%x == 0x%x", id1, id2)
+ }
+}
+
diff --git a/vendor/github.com/cosmos72/gomacro/imports/a_package.go b/vendor/github.com/cosmos72/gomacro/imports/a_package.go
new file mode 100644
index 0000000..cbeb9e0
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/a_package.go
@@ -0,0 +1,113 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * a_package.go
+ *
+ * Created on: Feb 28, 2017
+ * Author: Massimiliano Ghilardi
+ */
+
+package imports
+
+import (
+ . "reflect"
+
+ "github.com/cosmos72/gomacro/imports/syscall"
+ "github.com/cosmos72/gomacro/imports/thirdparty"
+)
+
+type PackageUnderlying = struct { // unnamed
+ Binds map[string]Value
+ Types map[string]Type
+ Proxies map[string]Type
+ // Untypeds contains a string representation of untyped constants,
+ // stored without loss of precision
+ Untypeds map[string]string
+ // Wrappers is the list of wrapper methods for named types.
+ // Stored explicitly because reflect package cannot distinguish
+ // between explicit methods and wrapper methods for embedded fields
+ Wrappers map[string][]string
+}
+
+type Package PackageUnderlying // named, can have methods
+
+type PackageMap map[string]Package // named, can have methods
+
+var Packages = make(PackageMap)
+
+// reflection: allow interpreted code to import "github.com/cosmos72/gomacro/imports"
+func init() {
+ Packages["github.com/cosmos72/gomacro/imports"] = Package{
+ Binds: map[string]Value{
+ "Packages": ValueOf(&Packages).Elem(),
+ },
+ Types: map[string]Type{
+ "Package": TypeOf((*Package)(nil)).Elem(),
+ },
+ }
+ Packages.Merge(syscall.Packages)
+ Packages.Merge(thirdparty.Packages)
+}
+
+func (pkgs PackageMap) Merge(srcs map[string]PackageUnderlying) {
+ // exploit the fact that maps are actually handles
+ for path, src := range srcs {
+ pkgs.MergePackage(path, src)
+ }
+}
+
+func (pkgs PackageMap) MergePackage(path string, src PackageUnderlying) {
+ // exploit the fact that maps are actually handles
+ pkg, ok := pkgs[path]
+ if ok {
+ pkg.Merge(src)
+ } else {
+ pkg = Package(src)
+ pkg.LazyInit()
+ pkgs[path] = pkg
+ }
+}
+
+func (pkg *Package) LazyInit() {
+ if pkg.Binds == nil {
+ pkg.Binds = make(map[string]Value)
+ }
+ if pkg.Types == nil {
+ pkg.Types = make(map[string]Type)
+ }
+ if pkg.Proxies == nil {
+ pkg.Proxies = make(map[string]Type)
+ }
+ if pkg.Untypeds == nil {
+ pkg.Untypeds = make(map[string]string)
+ }
+ if pkg.Wrappers == nil {
+ pkg.Wrappers = make(map[string][]string)
+ }
+}
+
+func (dst Package) Merge(src PackageUnderlying) {
+ // exploit the fact that maps are actually handles
+ for k, v := range src.Binds {
+ dst.Binds[k] = v
+ }
+ for k, v := range src.Types {
+ dst.Types[k] = v
+ }
+ for k, v := range src.Proxies {
+ dst.Proxies[k] = v
+ }
+ for k, v := range src.Untypeds {
+ dst.Untypeds[k] = v
+ }
+ for k, v := range src.Wrappers {
+ dst.Wrappers[k] = v
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/archive_tar.go b/vendor/github.com/cosmos72/gomacro/imports/archive_tar.go
index c8b57e7..44c3e70 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/archive_tar.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/archive_tar.go
@@ -33,11 +33,11 @@ func init() {
"TypeSymlink": ValueOf(tar.TypeSymlink),
"TypeXGlobalHeader": ValueOf(tar.TypeXGlobalHeader),
"TypeXHeader": ValueOf(tar.TypeXHeader),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Header": TypeOf((*tar.Header)(nil)).Elem(),
"Reader": TypeOf((*tar.Reader)(nil)).Elem(),
"Writer": TypeOf((*tar.Writer)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"TypeBlock": "rune:52",
"TypeChar": "rune:51",
"TypeCont": "rune:55",
@@ -52,6 +52,6 @@ func init() {
"TypeSymlink": "rune:50",
"TypeXGlobalHeader": "rune:103",
"TypeXHeader": "rune:120",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/archive_zip.go b/vendor/github.com/cosmos72/gomacro/imports/archive_zip.go
index 10db346..9e7f276 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/archive_zip.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/archive_zip.go
@@ -23,7 +23,7 @@ func init() {
"RegisterCompressor": ValueOf(zip.RegisterCompressor),
"RegisterDecompressor": ValueOf(zip.RegisterDecompressor),
"Store": ValueOf(zip.Store),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Compressor": TypeOf((*zip.Compressor)(nil)).Elem(),
"Decompressor": TypeOf((*zip.Decompressor)(nil)).Elem(),
"File": TypeOf((*zip.File)(nil)).Elem(),
@@ -31,9 +31,9 @@ func init() {
"ReadCloser": TypeOf((*zip.ReadCloser)(nil)).Elem(),
"Reader": TypeOf((*zip.Reader)(nil)).Elem(),
"Writer": TypeOf((*zip.Writer)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"File": []string{"FileInfo","ModTime","Mode","SetModTime","SetMode",},
"ReadCloser": []string{"RegisterDecompressor",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/bufio.go b/vendor/github.com/cosmos72/gomacro/imports/bufio.go
index c35c44f..cce8ea7 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/bufio.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/bufio.go
@@ -31,16 +31,16 @@ func init() {
"ScanLines": ValueOf(bufio.ScanLines),
"ScanRunes": ValueOf(bufio.ScanRunes),
"ScanWords": ValueOf(bufio.ScanWords),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ReadWriter": TypeOf((*bufio.ReadWriter)(nil)).Elem(),
"Reader": TypeOf((*bufio.Reader)(nil)).Elem(),
"Scanner": TypeOf((*bufio.Scanner)(nil)).Elem(),
"SplitFunc": TypeOf((*bufio.SplitFunc)(nil)).Elem(),
"Writer": TypeOf((*bufio.Writer)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"MaxScanTokenSize": "int:65536",
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"ReadWriter": []string{"Available","Buffered","Discard","Flush","Peek","Read","ReadByte","ReadBytes","ReadFrom","ReadLine","ReadRune","ReadSlice","ReadString","Reset","UnreadByte","UnreadRune","Write","WriteByte","WriteRune","WriteString","WriteTo",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/bytes.go b/vendor/github.com/cosmos72/gomacro/imports/bytes.go
index 63cef80..443e537 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/bytes.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/bytes.go
@@ -62,11 +62,11 @@ func init() {
"TrimRightFunc": ValueOf(bytes.TrimRightFunc),
"TrimSpace": ValueOf(bytes.TrimSpace),
"TrimSuffix": ValueOf(bytes.TrimSuffix),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Buffer": TypeOf((*bytes.Buffer)(nil)).Elem(),
"Reader": TypeOf((*bytes.Reader)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"MinRead": "int:512",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/compress_bzip2.go b/vendor/github.com/cosmos72/gomacro/imports/compress_bzip2.go
index 2e5c3b3..0d726cf 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/compress_bzip2.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/compress_bzip2.go
@@ -13,8 +13,8 @@ func init() {
Packages["compress/bzip2"] = Package{
Binds: map[string]Value{
"NewReader": ValueOf(bzip2.NewReader),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"StructuralError": TypeOf((*bzip2.StructuralError)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/compress_flate.go b/vendor/github.com/cosmos72/gomacro/imports/compress_flate.go
index 94bbcb4..3b2296f 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/compress_flate.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/compress_flate.go
@@ -22,7 +22,7 @@ func init() {
"NewWriter": ValueOf(flate.NewWriter),
"NewWriterDict": ValueOf(flate.NewWriterDict),
"NoCompression": ValueOf(flate.NoCompression),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CorruptInputError": TypeOf((*flate.CorruptInputError)(nil)).Elem(),
"InternalError": TypeOf((*flate.InternalError)(nil)).Elem(),
"ReadError": TypeOf((*flate.ReadError)(nil)).Elem(),
@@ -30,37 +30,37 @@ func init() {
"Resetter": TypeOf((*flate.Resetter)(nil)).Elem(),
"WriteError": TypeOf((*flate.WriteError)(nil)).Elem(),
"Writer": TypeOf((*flate.Writer)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Reader": TypeOf((*Reader_compress_flate)(nil)).Elem(),
- "Resetter": TypeOf((*Resetter_compress_flate)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Reader": TypeOf((*P_compress_flate_Reader)(nil)).Elem(),
+ "Resetter": TypeOf((*P_compress_flate_Resetter)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"BestCompression": "int:9",
"BestSpeed": "int:1",
"DefaultCompression": "int:-1",
"HuffmanOnly": "int:-2",
"NoCompression": "int:0",
- },
+ },
}
}
// --------------- proxy for compress/flate.Reader ---------------
-type Reader_compress_flate struct {
+type P_compress_flate_Reader struct {
Object interface{}
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
ReadByte_ func(interface{}) (byte, error)
}
-func (Proxy *Reader_compress_flate) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_compress_flate_Reader) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *Reader_compress_flate) ReadByte() (byte, error) {
- return Proxy.ReadByte_(Proxy.Object)
+func (P *P_compress_flate_Reader) ReadByte() (byte, error) {
+ return P.ReadByte_(P.Object)
}
// --------------- proxy for compress/flate.Resetter ---------------
-type Resetter_compress_flate struct {
+type P_compress_flate_Resetter struct {
Object interface{}
Reset_ func(_proxy_obj_ interface{}, r io.Reader, dict []byte) error
}
-func (Proxy *Resetter_compress_flate) Reset(r io.Reader, dict []byte) error {
- return Proxy.Reset_(Proxy.Object, r, dict)
+func (P *P_compress_flate_Resetter) Reset(r io.Reader, dict []byte) error {
+ return P.Reset_(P.Object, r, dict)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/compress_gzip.go b/vendor/github.com/cosmos72/gomacro/imports/compress_gzip.go
index af1a1f8..c988af3 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/compress_gzip.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/compress_gzip.go
@@ -22,16 +22,16 @@ func init() {
"NewWriter": ValueOf(gzip.NewWriter),
"NewWriterLevel": ValueOf(gzip.NewWriterLevel),
"NoCompression": ValueOf(gzip.NoCompression),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Header": TypeOf((*gzip.Header)(nil)).Elem(),
"Reader": TypeOf((*gzip.Reader)(nil)).Elem(),
"Writer": TypeOf((*gzip.Writer)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"BestCompression": "int:9",
"BestSpeed": "int:1",
"DefaultCompression": "int:-1",
"HuffmanOnly": "int:-2",
"NoCompression": "int:0",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/compress_lzw.go b/vendor/github.com/cosmos72/gomacro/imports/compress_lzw.go
index 0876660..f492e56 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/compress_lzw.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/compress_lzw.go
@@ -16,8 +16,8 @@ func init() {
"MSB": ValueOf(lzw.MSB),
"NewReader": ValueOf(lzw.NewReader),
"NewWriter": ValueOf(lzw.NewWriter),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Order": TypeOf((*lzw.Order)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/compress_zlib.go b/vendor/github.com/cosmos72/gomacro/imports/compress_zlib.go
index 08def98..214c0b1 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/compress_zlib.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/compress_zlib.go
@@ -26,26 +26,26 @@ func init() {
"NewWriterLevel": ValueOf(zlib.NewWriterLevel),
"NewWriterLevelDict": ValueOf(zlib.NewWriterLevelDict),
"NoCompression": ValueOf(zlib.NoCompression),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Resetter": TypeOf((*zlib.Resetter)(nil)).Elem(),
"Writer": TypeOf((*zlib.Writer)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Resetter": TypeOf((*Resetter_compress_zlib)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Resetter": TypeOf((*P_compress_zlib_Resetter)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"BestCompression": "int:9",
"BestSpeed": "int:1",
"DefaultCompression": "int:-1",
"HuffmanOnly": "int:-2",
"NoCompression": "int:0",
- },
+ },
}
}
// --------------- proxy for compress/zlib.Resetter ---------------
-type Resetter_compress_zlib struct {
+type P_compress_zlib_Resetter struct {
Object interface{}
Reset_ func(_proxy_obj_ interface{}, r io.Reader, dict []byte) error
}
-func (Proxy *Resetter_compress_zlib) Reset(r io.Reader, dict []byte) error {
- return Proxy.Reset_(Proxy.Object, r, dict)
+func (P *P_compress_zlib_Resetter) Reset(r io.Reader, dict []byte) error {
+ return P.Reset_(P.Object, r, dict)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/container_heap.go b/vendor/github.com/cosmos72/gomacro/imports/container_heap.go
index c53f185..dd4d329 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/container_heap.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/container_heap.go
@@ -17,16 +17,16 @@ func init() {
"Pop": ValueOf(heap.Pop),
"Push": ValueOf(heap.Push),
"Remove": ValueOf(heap.Remove),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Interface": TypeOf((*heap.Interface)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Interface": TypeOf((*Interface_container_heap)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Interface": TypeOf((*P_container_heap_Interface)(nil)).Elem(),
+ },
}
}
// --------------- proxy for container/heap.Interface ---------------
-type Interface_container_heap struct {
+type P_container_heap_Interface struct {
Object interface{}
Len_ func(interface{}) int
Less_ func(_proxy_obj_ interface{}, i int, j int) bool
@@ -34,18 +34,18 @@ type Interface_container_heap struct {
Push_ func(_proxy_obj_ interface{}, x interface{})
Swap_ func(_proxy_obj_ interface{}, i int, j int)
}
-func (Proxy *Interface_container_heap) Len() int {
- return Proxy.Len_(Proxy.Object)
+func (P *P_container_heap_Interface) Len() int {
+ return P.Len_(P.Object)
}
-func (Proxy *Interface_container_heap) Less(i int, j int) bool {
- return Proxy.Less_(Proxy.Object, i, j)
+func (P *P_container_heap_Interface) Less(i int, j int) bool {
+ return P.Less_(P.Object, i, j)
}
-func (Proxy *Interface_container_heap) Pop() interface{} {
- return Proxy.Pop_(Proxy.Object)
+func (P *P_container_heap_Interface) Pop() interface{} {
+ return P.Pop_(P.Object)
}
-func (Proxy *Interface_container_heap) Push(x interface{}) {
- Proxy.Push_(Proxy.Object, x)
+func (P *P_container_heap_Interface) Push(x interface{}) {
+ P.Push_(P.Object, x)
}
-func (Proxy *Interface_container_heap) Swap(i int, j int) {
- Proxy.Swap_(Proxy.Object, i, j)
+func (P *P_container_heap_Interface) Swap(i int, j int) {
+ P.Swap_(P.Object, i, j)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/container_list.go b/vendor/github.com/cosmos72/gomacro/imports/container_list.go
index 55b0543..4403ae9 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/container_list.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/container_list.go
@@ -13,9 +13,9 @@ func init() {
Packages["container/list"] = Package{
Binds: map[string]Value{
"New": ValueOf(list.New),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Element": TypeOf((*list.Element)(nil)).Elem(),
"List": TypeOf((*list.List)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/container_ring.go b/vendor/github.com/cosmos72/gomacro/imports/container_ring.go
index f0197b9..3048c3d 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/container_ring.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/container_ring.go
@@ -13,8 +13,8 @@ func init() {
Packages["container/ring"] = Package{
Binds: map[string]Value{
"New": ValueOf(ring.New),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Ring": TypeOf((*ring.Ring)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/context.go b/vendor/github.com/cosmos72/gomacro/imports/context.go
index cab3213..2bc46a8 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/context.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/context.go
@@ -21,32 +21,32 @@ func init() {
"WithDeadline": ValueOf(context.WithDeadline),
"WithTimeout": ValueOf(context.WithTimeout),
"WithValue": ValueOf(context.WithValue),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CancelFunc": TypeOf((*context.CancelFunc)(nil)).Elem(),
"Context": TypeOf((*context.Context)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Context": TypeOf((*Context_context)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Context": TypeOf((*P_context_Context)(nil)).Elem(),
+ },
}
}
// --------------- proxy for context.Context ---------------
-type Context_context struct {
+type P_context_Context struct {
Object interface{}
Deadline_ func(interface{}) (deadline time.Time, ok bool)
Done_ func(interface{}) <-chan struct{}
Err_ func(interface{}) error
Value_ func(_proxy_obj_ interface{}, key interface{}) interface{}
}
-func (Proxy *Context_context) Deadline() (deadline time.Time, ok bool) {
- return Proxy.Deadline_(Proxy.Object)
+func (P *P_context_Context) Deadline() (deadline time.Time, ok bool) {
+ return P.Deadline_(P.Object)
}
-func (Proxy *Context_context) Done() <-chan struct{} {
- return Proxy.Done_(Proxy.Object)
+func (P *P_context_Context) Done() <-chan struct{} {
+ return P.Done_(P.Object)
}
-func (Proxy *Context_context) Err() error {
- return Proxy.Err_(Proxy.Object)
+func (P *P_context_Context) Err() error {
+ return P.Err_(P.Object)
}
-func (Proxy *Context_context) Value(key interface{}) interface{} {
- return Proxy.Value_(Proxy.Object, key)
+func (P *P_context_Context) Value(key interface{}) interface{} {
+ return P.Value_(P.Object, key)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto.go b/vendor/github.com/cosmos72/gomacro/imports/crypto.go
index 576dbd7..608f9ff 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto.go
@@ -13,6 +13,10 @@ import (
func init() {
Packages["crypto"] = Package{
Binds: map[string]Value{
+ "BLAKE2b_256": ValueOf(crypto.BLAKE2b_256),
+ "BLAKE2b_384": ValueOf(crypto.BLAKE2b_384),
+ "BLAKE2b_512": ValueOf(crypto.BLAKE2b_512),
+ "BLAKE2s_256": ValueOf(crypto.BLAKE2s_256),
"MD4": ValueOf(crypto.MD4),
"MD5": ValueOf(crypto.MD5),
"MD5SHA1": ValueOf(crypto.MD5SHA1),
@@ -29,7 +33,7 @@ func init() {
"SHA512": ValueOf(crypto.SHA512),
"SHA512_224": ValueOf(crypto.SHA512_224),
"SHA512_256": ValueOf(crypto.SHA512_256),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Decrypter": TypeOf((*crypto.Decrypter)(nil)).Elem(),
"DecrypterOpts": TypeOf((*crypto.DecrypterOpts)(nil)).Elem(),
"Hash": TypeOf((*crypto.Hash)(nil)).Elem(),
@@ -37,63 +41,45 @@ func init() {
"PublicKey": TypeOf((*crypto.PublicKey)(nil)).Elem(),
"Signer": TypeOf((*crypto.Signer)(nil)).Elem(),
"SignerOpts": TypeOf((*crypto.SignerOpts)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Decrypter": TypeOf((*Decrypter_crypto)(nil)).Elem(),
- "DecrypterOpts": TypeOf((*DecrypterOpts_crypto)(nil)).Elem(),
- "PrivateKey": TypeOf((*PrivateKey_crypto)(nil)).Elem(),
- "PublicKey": TypeOf((*PublicKey_crypto)(nil)).Elem(),
- "Signer": TypeOf((*Signer_crypto)(nil)).Elem(),
- "SignerOpts": TypeOf((*SignerOpts_crypto)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Decrypter": TypeOf((*P_crypto_Decrypter)(nil)).Elem(),
+ "Signer": TypeOf((*P_crypto_Signer)(nil)).Elem(),
+ "SignerOpts": TypeOf((*P_crypto_SignerOpts)(nil)).Elem(),
+ },
}
}
// --------------- proxy for crypto.Decrypter ---------------
-type Decrypter_crypto struct {
+type P_crypto_Decrypter struct {
Object interface{}
Decrypt_ func(_proxy_obj_ interface{}, rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error)
Public_ func(interface{}) crypto.PublicKey
}
-func (Proxy *Decrypter_crypto) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) {
- return Proxy.Decrypt_(Proxy.Object, rand, msg, opts)
+func (P *P_crypto_Decrypter) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) {
+ return P.Decrypt_(P.Object, rand, msg, opts)
}
-func (Proxy *Decrypter_crypto) Public() crypto.PublicKey {
- return Proxy.Public_(Proxy.Object)
-}
-
-// --------------- proxy for crypto.DecrypterOpts ---------------
-type DecrypterOpts_crypto struct {
- Object interface{}
-}
-
-// --------------- proxy for crypto.PrivateKey ---------------
-type PrivateKey_crypto struct {
- Object interface{}
-}
-
-// --------------- proxy for crypto.PublicKey ---------------
-type PublicKey_crypto struct {
- Object interface{}
+func (P *P_crypto_Decrypter) Public() crypto.PublicKey {
+ return P.Public_(P.Object)
}
// --------------- proxy for crypto.Signer ---------------
-type Signer_crypto struct {
+type P_crypto_Signer struct {
Object interface{}
Public_ func(interface{}) crypto.PublicKey
Sign_ func(_proxy_obj_ interface{}, rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
}
-func (Proxy *Signer_crypto) Public() crypto.PublicKey {
- return Proxy.Public_(Proxy.Object)
+func (P *P_crypto_Signer) Public() crypto.PublicKey {
+ return P.Public_(P.Object)
}
-func (Proxy *Signer_crypto) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) {
- return Proxy.Sign_(Proxy.Object, rand, digest, opts)
+func (P *P_crypto_Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) {
+ return P.Sign_(P.Object, rand, digest, opts)
}
// --------------- proxy for crypto.SignerOpts ---------------
-type SignerOpts_crypto struct {
+type P_crypto_SignerOpts struct {
Object interface{}
HashFunc_ func(interface{}) crypto.Hash
}
-func (Proxy *SignerOpts_crypto) HashFunc() crypto.Hash {
- return Proxy.HashFunc_(Proxy.Object)
+func (P *P_crypto_SignerOpts) HashFunc() crypto.Hash {
+ return P.HashFunc_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_aes.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_aes.go
index 826d9ad..06bb662 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_aes.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_aes.go
@@ -14,10 +14,10 @@ func init() {
Binds: map[string]Value{
"BlockSize": ValueOf(aes.BlockSize),
"NewCipher": ValueOf(aes.NewCipher),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"KeySizeError": TypeOf((*aes.KeySizeError)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"BlockSize": "int:16",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_cipher.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_cipher.go
index ad38f01..e4c7e79 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_cipher.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_cipher.go
@@ -20,78 +20,78 @@ func init() {
"NewGCM": ValueOf(cipher.NewGCM),
"NewGCMWithNonceSize": ValueOf(cipher.NewGCMWithNonceSize),
"NewOFB": ValueOf(cipher.NewOFB),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"AEAD": TypeOf((*cipher.AEAD)(nil)).Elem(),
"Block": TypeOf((*cipher.Block)(nil)).Elem(),
"BlockMode": TypeOf((*cipher.BlockMode)(nil)).Elem(),
"Stream": TypeOf((*cipher.Stream)(nil)).Elem(),
"StreamReader": TypeOf((*cipher.StreamReader)(nil)).Elem(),
"StreamWriter": TypeOf((*cipher.StreamWriter)(nil)).Elem(),
- },Proxies: map[string]Type{
- "AEAD": TypeOf((*AEAD_crypto_cipher)(nil)).Elem(),
- "Block": TypeOf((*Block_crypto_cipher)(nil)).Elem(),
- "BlockMode": TypeOf((*BlockMode_crypto_cipher)(nil)).Elem(),
- "Stream": TypeOf((*Stream_crypto_cipher)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "AEAD": TypeOf((*P_crypto_cipher_AEAD)(nil)).Elem(),
+ "Block": TypeOf((*P_crypto_cipher_Block)(nil)).Elem(),
+ "BlockMode": TypeOf((*P_crypto_cipher_BlockMode)(nil)).Elem(),
+ "Stream": TypeOf((*P_crypto_cipher_Stream)(nil)).Elem(),
+ },
}
}
// --------------- proxy for crypto/cipher.AEAD ---------------
-type AEAD_crypto_cipher struct {
+type P_crypto_cipher_AEAD struct {
Object interface{}
NonceSize_ func(interface{}) int
Open_ func(_proxy_obj_ interface{}, dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error)
Overhead_ func(interface{}) int
Seal_ func(_proxy_obj_ interface{}, dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte
}
-func (Proxy *AEAD_crypto_cipher) NonceSize() int {
- return Proxy.NonceSize_(Proxy.Object)
+func (P *P_crypto_cipher_AEAD) NonceSize() int {
+ return P.NonceSize_(P.Object)
}
-func (Proxy *AEAD_crypto_cipher) Open(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) {
- return Proxy.Open_(Proxy.Object, dst, nonce, ciphertext, additionalData)
+func (P *P_crypto_cipher_AEAD) Open(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) {
+ return P.Open_(P.Object, dst, nonce, ciphertext, additionalData)
}
-func (Proxy *AEAD_crypto_cipher) Overhead() int {
- return Proxy.Overhead_(Proxy.Object)
+func (P *P_crypto_cipher_AEAD) Overhead() int {
+ return P.Overhead_(P.Object)
}
-func (Proxy *AEAD_crypto_cipher) Seal(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte {
- return Proxy.Seal_(Proxy.Object, dst, nonce, plaintext, additionalData)
+func (P *P_crypto_cipher_AEAD) Seal(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte {
+ return P.Seal_(P.Object, dst, nonce, plaintext, additionalData)
}
// --------------- proxy for crypto/cipher.Block ---------------
-type Block_crypto_cipher struct {
+type P_crypto_cipher_Block struct {
Object interface{}
BlockSize_ func(interface{}) int
Decrypt_ func(_proxy_obj_ interface{}, dst []byte, src []byte)
Encrypt_ func(_proxy_obj_ interface{}, dst []byte, src []byte)
}
-func (Proxy *Block_crypto_cipher) BlockSize() int {
- return Proxy.BlockSize_(Proxy.Object)
+func (P *P_crypto_cipher_Block) BlockSize() int {
+ return P.BlockSize_(P.Object)
}
-func (Proxy *Block_crypto_cipher) Decrypt(dst []byte, src []byte) {
- Proxy.Decrypt_(Proxy.Object, dst, src)
+func (P *P_crypto_cipher_Block) Decrypt(dst []byte, src []byte) {
+ P.Decrypt_(P.Object, dst, src)
}
-func (Proxy *Block_crypto_cipher) Encrypt(dst []byte, src []byte) {
- Proxy.Encrypt_(Proxy.Object, dst, src)
+func (P *P_crypto_cipher_Block) Encrypt(dst []byte, src []byte) {
+ P.Encrypt_(P.Object, dst, src)
}
// --------------- proxy for crypto/cipher.BlockMode ---------------
-type BlockMode_crypto_cipher struct {
+type P_crypto_cipher_BlockMode struct {
Object interface{}
BlockSize_ func(interface{}) int
CryptBlocks_ func(_proxy_obj_ interface{}, dst []byte, src []byte)
}
-func (Proxy *BlockMode_crypto_cipher) BlockSize() int {
- return Proxy.BlockSize_(Proxy.Object)
+func (P *P_crypto_cipher_BlockMode) BlockSize() int {
+ return P.BlockSize_(P.Object)
}
-func (Proxy *BlockMode_crypto_cipher) CryptBlocks(dst []byte, src []byte) {
- Proxy.CryptBlocks_(Proxy.Object, dst, src)
+func (P *P_crypto_cipher_BlockMode) CryptBlocks(dst []byte, src []byte) {
+ P.CryptBlocks_(P.Object, dst, src)
}
// --------------- proxy for crypto/cipher.Stream ---------------
-type Stream_crypto_cipher struct {
+type P_crypto_cipher_Stream struct {
Object interface{}
XORKeyStream_ func(_proxy_obj_ interface{}, dst []byte, src []byte)
}
-func (Proxy *Stream_crypto_cipher) XORKeyStream(dst []byte, src []byte) {
- Proxy.XORKeyStream_(Proxy.Object, dst, src)
+func (P *P_crypto_cipher_Stream) XORKeyStream(dst []byte, src []byte) {
+ P.XORKeyStream_(P.Object, dst, src)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_des.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_des.go
index c2d4834..a773635 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_des.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_des.go
@@ -15,10 +15,10 @@ func init() {
"BlockSize": ValueOf(des.BlockSize),
"NewCipher": ValueOf(des.NewCipher),
"NewTripleDESCipher": ValueOf(des.NewTripleDESCipher),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"KeySizeError": TypeOf((*des.KeySizeError)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"BlockSize": "int:8",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_dsa.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_dsa.go
index 0fa22ad..f30f10f 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_dsa.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_dsa.go
@@ -21,11 +21,11 @@ func init() {
"L3072N256": ValueOf(dsa.L3072N256),
"Sign": ValueOf(dsa.Sign),
"Verify": ValueOf(dsa.Verify),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ParameterSizes": TypeOf((*dsa.ParameterSizes)(nil)).Elem(),
"Parameters": TypeOf((*dsa.Parameters)(nil)).Elem(),
"PrivateKey": TypeOf((*dsa.PrivateKey)(nil)).Elem(),
"PublicKey": TypeOf((*dsa.PublicKey)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_ecdsa.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_ecdsa.go
index feb6825..4ebf538 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_ecdsa.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_ecdsa.go
@@ -15,9 +15,9 @@ func init() {
"GenerateKey": ValueOf(ecdsa.GenerateKey),
"Sign": ValueOf(ecdsa.Sign),
"Verify": ValueOf(ecdsa.Verify),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"PrivateKey": TypeOf((*ecdsa.PrivateKey)(nil)).Elem(),
"PublicKey": TypeOf((*ecdsa.PublicKey)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_elliptic.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_elliptic.go
index 0b4e510..f8b610e 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_elliptic.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_elliptic.go
@@ -20,17 +20,17 @@ func init() {
"P384": ValueOf(elliptic.P384),
"P521": ValueOf(elliptic.P521),
"Unmarshal": ValueOf(elliptic.Unmarshal),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Curve": TypeOf((*elliptic.Curve)(nil)).Elem(),
"CurveParams": TypeOf((*elliptic.CurveParams)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Curve": TypeOf((*Curve_crypto_elliptic)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Curve": TypeOf((*P_crypto_elliptic_Curve)(nil)).Elem(),
+ },
}
}
// --------------- proxy for crypto/elliptic.Curve ---------------
-type Curve_crypto_elliptic struct {
+type P_crypto_elliptic_Curve struct {
Object interface{}
Add_ func(_proxy_obj_ interface{}, x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int)
Double_ func(_proxy_obj_ interface{}, x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int)
@@ -39,21 +39,21 @@ type Curve_crypto_elliptic struct {
ScalarBaseMult_ func(_proxy_obj_ interface{}, k []byte) (x *big.Int, y *big.Int)
ScalarMult_ func(_proxy_obj_ interface{}, x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int)
}
-func (Proxy *Curve_crypto_elliptic) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) {
- return Proxy.Add_(Proxy.Object, x1, y1, x2, y2)
+func (P *P_crypto_elliptic_Curve) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) {
+ return P.Add_(P.Object, x1, y1, x2, y2)
}
-func (Proxy *Curve_crypto_elliptic) Double(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) {
- return Proxy.Double_(Proxy.Object, x1, y1)
+func (P *P_crypto_elliptic_Curve) Double(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) {
+ return P.Double_(P.Object, x1, y1)
}
-func (Proxy *Curve_crypto_elliptic) IsOnCurve(x *big.Int, y *big.Int) bool {
- return Proxy.IsOnCurve_(Proxy.Object, x, y)
+func (P *P_crypto_elliptic_Curve) IsOnCurve(x *big.Int, y *big.Int) bool {
+ return P.IsOnCurve_(P.Object, x, y)
}
-func (Proxy *Curve_crypto_elliptic) Params() *elliptic.CurveParams {
- return Proxy.Params_(Proxy.Object)
+func (P *P_crypto_elliptic_Curve) Params() *elliptic.CurveParams {
+ return P.Params_(P.Object)
}
-func (Proxy *Curve_crypto_elliptic) ScalarBaseMult(k []byte) (x *big.Int, y *big.Int) {
- return Proxy.ScalarBaseMult_(Proxy.Object, k)
+func (P *P_crypto_elliptic_Curve) ScalarBaseMult(k []byte) (x *big.Int, y *big.Int) {
+ return P.ScalarBaseMult_(P.Object, k)
}
-func (Proxy *Curve_crypto_elliptic) ScalarMult(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) {
- return Proxy.ScalarMult_(Proxy.Object, x1, y1, k)
+func (P *P_crypto_elliptic_Curve) ScalarMult(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) {
+ return P.ScalarMult_(P.Object, x1, y1, k)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_hmac.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_hmac.go
index 750f9b9..5d2592a 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_hmac.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_hmac.go
@@ -14,6 +14,6 @@ func init() {
Binds: map[string]Value{
"Equal": ValueOf(hmac.Equal),
"New": ValueOf(hmac.New),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_md5.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_md5.go
index 51b5b5b..4031509 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_md5.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_md5.go
@@ -16,9 +16,9 @@ func init() {
"New": ValueOf(md5.New),
"Size": ValueOf(md5.Size),
"Sum": ValueOf(md5.Sum),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"BlockSize": "int:64",
"Size": "int:16",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_rand.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_rand.go
index 4540e92..357aeb6 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_rand.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_rand.go
@@ -16,6 +16,6 @@ func init() {
"Prime": ValueOf(rand.Prime),
"Read": ValueOf(rand.Read),
"Reader": ValueOf(&rand.Reader).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_rc4.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_rc4.go
index 6e11e6e..65645eb 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_rc4.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_rc4.go
@@ -13,9 +13,9 @@ func init() {
Packages["crypto/rc4"] = Package{
Binds: map[string]Value{
"NewCipher": ValueOf(rc4.NewCipher),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Cipher": TypeOf((*rc4.Cipher)(nil)).Elem(),
"KeySizeError": TypeOf((*rc4.KeySizeError)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_rsa.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_rsa.go
index d33285d..cd16691 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_rsa.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_rsa.go
@@ -28,7 +28,7 @@ func init() {
"SignPSS": ValueOf(rsa.SignPSS),
"VerifyPKCS1v15": ValueOf(rsa.VerifyPKCS1v15),
"VerifyPSS": ValueOf(rsa.VerifyPSS),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CRTValue": TypeOf((*rsa.CRTValue)(nil)).Elem(),
"OAEPOptions": TypeOf((*rsa.OAEPOptions)(nil)).Elem(),
"PKCS1v15DecryptOptions": TypeOf((*rsa.PKCS1v15DecryptOptions)(nil)).Elem(),
@@ -36,9 +36,9 @@ func init() {
"PrecomputedValues": TypeOf((*rsa.PrecomputedValues)(nil)).Elem(),
"PrivateKey": TypeOf((*rsa.PrivateKey)(nil)).Elem(),
"PublicKey": TypeOf((*rsa.PublicKey)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"PSSSaltLengthAuto": "int:0",
"PSSSaltLengthEqualsHash": "int:-1",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_sha1.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_sha1.go
index 1ca71f6..1f33d22 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_sha1.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_sha1.go
@@ -16,9 +16,9 @@ func init() {
"New": ValueOf(sha1.New),
"Size": ValueOf(sha1.Size),
"Sum": ValueOf(sha1.Sum),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"BlockSize": "int:64",
"Size": "int:20",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_sha256.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_sha256.go
index 617e570..41bef73 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_sha256.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_sha256.go
@@ -19,10 +19,10 @@ func init() {
"Size224": ValueOf(sha256.Size224),
"Sum224": ValueOf(sha256.Sum224),
"Sum256": ValueOf(sha256.Sum256),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"BlockSize": "int:64",
"Size": "int:32",
"Size224": "int:28",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_sha512.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_sha512.go
index ba2ef31..3cc28d5 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_sha512.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_sha512.go
@@ -25,12 +25,12 @@ func init() {
"Sum512": ValueOf(sha512.Sum512),
"Sum512_224": ValueOf(sha512.Sum512_224),
"Sum512_256": ValueOf(sha512.Sum512_256),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"BlockSize": "int:128",
"Size": "int:64",
"Size224": "int:28",
"Size256": "int:32",
"Size384": "int:48",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_subtle.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_subtle.go
index 037ad68..61e3f2f 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_subtle.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_subtle.go
@@ -18,6 +18,6 @@ func init() {
"ConstantTimeEq": ValueOf(subtle.ConstantTimeEq),
"ConstantTimeLessOrEq": ValueOf(subtle.ConstantTimeLessOrEq),
"ConstantTimeSelect": ValueOf(subtle.ConstantTimeSelect),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_tls.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_tls.go
index 32e0020..49f9bbd 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_tls.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_tls.go
@@ -70,7 +70,7 @@ func init() {
"VersionTLS12": ValueOf(tls.VersionTLS12),
"X25519": ValueOf(tls.X25519),
"X509KeyPair": ValueOf(tls.X509KeyPair),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Certificate": TypeOf((*tls.Certificate)(nil)).Elem(),
"CertificateRequestInfo": TypeOf((*tls.CertificateRequestInfo)(nil)).Elem(),
"ClientAuthType": TypeOf((*tls.ClientAuthType)(nil)).Elem(),
@@ -84,26 +84,26 @@ func init() {
"RecordHeaderError": TypeOf((*tls.RecordHeaderError)(nil)).Elem(),
"RenegotiationSupport": TypeOf((*tls.RenegotiationSupport)(nil)).Elem(),
"SignatureScheme": TypeOf((*tls.SignatureScheme)(nil)).Elem(),
- },Proxies: map[string]Type{
- "ClientSessionCache": TypeOf((*ClientSessionCache_crypto_tls)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "ClientSessionCache": TypeOf((*P_crypto_tls_ClientSessionCache)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"VersionSSL30": "int:768",
"VersionTLS10": "int:769",
"VersionTLS11": "int:770",
"VersionTLS12": "int:771",
- },
+ },
}
}
// --------------- proxy for crypto/tls.ClientSessionCache ---------------
-type ClientSessionCache_crypto_tls struct {
+type P_crypto_tls_ClientSessionCache struct {
Object interface{}
Get_ func(_proxy_obj_ interface{}, sessionKey string) (session *tls.ClientSessionState, ok bool)
Put_ func(_proxy_obj_ interface{}, sessionKey string, cs *tls.ClientSessionState)
}
-func (Proxy *ClientSessionCache_crypto_tls) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) {
- return Proxy.Get_(Proxy.Object, sessionKey)
+func (P *P_crypto_tls_ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) {
+ return P.Get_(P.Object, sessionKey)
}
-func (Proxy *ClientSessionCache_crypto_tls) Put(sessionKey string, cs *tls.ClientSessionState) {
- Proxy.Put_(Proxy.Object, sessionKey, cs)
+func (P *P_crypto_tls_ClientSessionCache) Put(sessionKey string, cs *tls.ClientSessionState) {
+ P.Put_(P.Object, sessionKey, cs)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_x509.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_x509.go
index 9bee467..29277f8 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_x509.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_x509.go
@@ -85,7 +85,7 @@ func init() {
"TooManyIntermediates": ValueOf(x509.TooManyIntermediates),
"UnknownPublicKeyAlgorithm": ValueOf(x509.UnknownPublicKeyAlgorithm),
"UnknownSignatureAlgorithm": ValueOf(x509.UnknownSignatureAlgorithm),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CertPool": TypeOf((*x509.CertPool)(nil)).Elem(),
"Certificate": TypeOf((*x509.Certificate)(nil)).Elem(),
"CertificateInvalidError": TypeOf((*x509.CertificateInvalidError)(nil)).Elem(),
@@ -103,6 +103,6 @@ func init() {
"UnhandledCriticalExtension": TypeOf((*x509.UnhandledCriticalExtension)(nil)).Elem(),
"UnknownAuthorityError": TypeOf((*x509.UnknownAuthorityError)(nil)).Elem(),
"VerifyOptions": TypeOf((*x509.VerifyOptions)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/crypto_x509_pkix.go b/vendor/github.com/cosmos72/gomacro/imports/crypto_x509_pkix.go
index 4c1fa75..49e14dd 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/crypto_x509_pkix.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/crypto_x509_pkix.go
@@ -22,6 +22,6 @@ func init() {
"RelativeDistinguishedNameSET": TypeOf((*pkix.RelativeDistinguishedNameSET)(nil)).Elem(),
"RevokedCertificate": TypeOf((*pkix.RevokedCertificate)(nil)).Elem(),
"TBSCertificateList": TypeOf((*pkix.TBSCertificateList)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/database_sql.go b/vendor/github.com/cosmos72/gomacro/imports/database_sql.go
index a996886..8facacb 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/database_sql.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/database_sql.go
@@ -13,6 +13,7 @@ func init() {
Packages["database/sql"] = Package{
Binds: map[string]Value{
"Drivers": ValueOf(sql.Drivers),
+ "ErrConnDone": ValueOf(&sql.ErrConnDone).Elem(),
"ErrNoRows": ValueOf(&sql.ErrNoRows).Elem(),
"ErrTxDone": ValueOf(&sql.ErrTxDone).Elem(),
"LevelDefault": ValueOf(sql.LevelDefault),
@@ -26,8 +27,9 @@ func init() {
"Named": ValueOf(sql.Named),
"Open": ValueOf(sql.Open),
"Register": ValueOf(sql.Register),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ColumnType": TypeOf((*sql.ColumnType)(nil)).Elem(),
+ "Conn": TypeOf((*sql.Conn)(nil)).Elem(),
"DB": TypeOf((*sql.DB)(nil)).Elem(),
"DBStats": TypeOf((*sql.DBStats)(nil)).Elem(),
"IsolationLevel": TypeOf((*sql.IsolationLevel)(nil)).Elem(),
@@ -36,6 +38,7 @@ func init() {
"NullFloat64": TypeOf((*sql.NullFloat64)(nil)).Elem(),
"NullInt64": TypeOf((*sql.NullInt64)(nil)).Elem(),
"NullString": TypeOf((*sql.NullString)(nil)).Elem(),
+ "Out": TypeOf((*sql.Out)(nil)).Elem(),
"RawBytes": TypeOf((*sql.RawBytes)(nil)).Elem(),
"Result": TypeOf((*sql.Result)(nil)).Elem(),
"Row": TypeOf((*sql.Row)(nil)).Elem(),
@@ -44,31 +47,31 @@ func init() {
"Stmt": TypeOf((*sql.Stmt)(nil)).Elem(),
"Tx": TypeOf((*sql.Tx)(nil)).Elem(),
"TxOptions": TypeOf((*sql.TxOptions)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Result": TypeOf((*Result_database_sql)(nil)).Elem(),
- "Scanner": TypeOf((*Scanner_database_sql)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Result": TypeOf((*P_database_sql_Result)(nil)).Elem(),
+ "Scanner": TypeOf((*P_database_sql_Scanner)(nil)).Elem(),
+ },
}
}
// --------------- proxy for database/sql.Result ---------------
-type Result_database_sql struct {
+type P_database_sql_Result struct {
Object interface{}
LastInsertId_ func(interface{}) (int64, error)
RowsAffected_ func(interface{}) (int64, error)
}
-func (Proxy *Result_database_sql) LastInsertId() (int64, error) {
- return Proxy.LastInsertId_(Proxy.Object)
+func (P *P_database_sql_Result) LastInsertId() (int64, error) {
+ return P.LastInsertId_(P.Object)
}
-func (Proxy *Result_database_sql) RowsAffected() (int64, error) {
- return Proxy.RowsAffected_(Proxy.Object)
+func (P *P_database_sql_Result) RowsAffected() (int64, error) {
+ return P.RowsAffected_(P.Object)
}
// --------------- proxy for database/sql.Scanner ---------------
-type Scanner_database_sql struct {
+type P_database_sql_Scanner struct {
Object interface{}
Scan_ func(_proxy_obj_ interface{}, src interface{}) error
}
-func (Proxy *Scanner_database_sql) Scan(src interface{}) error {
- return Proxy.Scan_(Proxy.Object, src)
+func (P *P_database_sql_Scanner) Scan(src interface{}) error {
+ return P.Scan_(P.Object, src)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/database_sql_driver.go b/vendor/github.com/cosmos72/gomacro/imports/database_sql_driver.go
index 788433f..22d9abe 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/database_sql_driver.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/database_sql_driver.go
@@ -17,13 +17,14 @@ func init() {
"Bool": ValueOf(&driver.Bool).Elem(),
"DefaultParameterConverter": ValueOf(&driver.DefaultParameterConverter).Elem(),
"ErrBadConn": ValueOf(&driver.ErrBadConn).Elem(),
+ "ErrRemoveArgument": ValueOf(&driver.ErrRemoveArgument).Elem(),
"ErrSkip": ValueOf(&driver.ErrSkip).Elem(),
"Int32": ValueOf(&driver.Int32).Elem(),
"IsScanValue": ValueOf(driver.IsScanValue),
"IsValue": ValueOf(driver.IsValue),
"ResultNoRows": ValueOf(&driver.ResultNoRows).Elem(),
"String": ValueOf(&driver.String).Elem(),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ColumnConverter": TypeOf((*driver.ColumnConverter)(nil)).Elem(),
"Conn": TypeOf((*driver.Conn)(nil)).Elem(),
"ConnBeginTx": TypeOf((*driver.ConnBeginTx)(nil)).Elem(),
@@ -33,6 +34,7 @@ func init() {
"ExecerContext": TypeOf((*driver.ExecerContext)(nil)).Elem(),
"IsolationLevel": TypeOf((*driver.IsolationLevel)(nil)).Elem(),
"NamedValue": TypeOf((*driver.NamedValue)(nil)).Elem(),
+ "NamedValueChecker": TypeOf((*driver.NamedValueChecker)(nil)).Elem(),
"NotNull": TypeOf((*driver.NotNull)(nil)).Elem(),
"Null": TypeOf((*driver.Null)(nil)).Elem(),
"Pinger": TypeOf((*driver.Pinger)(nil)).Elem(),
@@ -55,271 +57,280 @@ func init() {
"Value": TypeOf((*driver.Value)(nil)).Elem(),
"ValueConverter": TypeOf((*driver.ValueConverter)(nil)).Elem(),
"Valuer": TypeOf((*driver.Valuer)(nil)).Elem(),
- },Proxies: map[string]Type{
- "ColumnConverter": TypeOf((*ColumnConverter_database_sql_driver)(nil)).Elem(),
- "Conn": TypeOf((*Conn_database_sql_driver)(nil)).Elem(),
- "ConnBeginTx": TypeOf((*ConnBeginTx_database_sql_driver)(nil)).Elem(),
- "ConnPrepareContext": TypeOf((*ConnPrepareContext_database_sql_driver)(nil)).Elem(),
- "Driver": TypeOf((*Driver_database_sql_driver)(nil)).Elem(),
- "Execer": TypeOf((*Execer_database_sql_driver)(nil)).Elem(),
- "ExecerContext": TypeOf((*ExecerContext_database_sql_driver)(nil)).Elem(),
- "Pinger": TypeOf((*Pinger_database_sql_driver)(nil)).Elem(),
- "Queryer": TypeOf((*Queryer_database_sql_driver)(nil)).Elem(),
- "QueryerContext": TypeOf((*QueryerContext_database_sql_driver)(nil)).Elem(),
- "Result": TypeOf((*Result_database_sql_driver)(nil)).Elem(),
- "Rows": TypeOf((*Rows_database_sql_driver)(nil)).Elem(),
- "RowsColumnTypeDatabaseTypeName": TypeOf((*RowsColumnTypeDatabaseTypeName_database_sql_driver)(nil)).Elem(),
- "RowsColumnTypeLength": TypeOf((*RowsColumnTypeLength_database_sql_driver)(nil)).Elem(),
- "RowsColumnTypeNullable": TypeOf((*RowsColumnTypeNullable_database_sql_driver)(nil)).Elem(),
- "RowsColumnTypePrecisionScale": TypeOf((*RowsColumnTypePrecisionScale_database_sql_driver)(nil)).Elem(),
- "RowsColumnTypeScanType": TypeOf((*RowsColumnTypeScanType_database_sql_driver)(nil)).Elem(),
- "RowsNextResultSet": TypeOf((*RowsNextResultSet_database_sql_driver)(nil)).Elem(),
- "Stmt": TypeOf((*Stmt_database_sql_driver)(nil)).Elem(),
- "StmtExecContext": TypeOf((*StmtExecContext_database_sql_driver)(nil)).Elem(),
- "StmtQueryContext": TypeOf((*StmtQueryContext_database_sql_driver)(nil)).Elem(),
- "Tx": TypeOf((*Tx_database_sql_driver)(nil)).Elem(),
- "Value": TypeOf((*Value_database_sql_driver)(nil)).Elem(),
- "ValueConverter": TypeOf((*ValueConverter_database_sql_driver)(nil)).Elem(),
- "Valuer": TypeOf((*Valuer_database_sql_driver)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "ColumnConverter": TypeOf((*P_database_sql_driver_ColumnConverter)(nil)).Elem(),
+ "Conn": TypeOf((*P_database_sql_driver_Conn)(nil)).Elem(),
+ "ConnBeginTx": TypeOf((*P_database_sql_driver_ConnBeginTx)(nil)).Elem(),
+ "ConnPrepareContext": TypeOf((*P_database_sql_driver_ConnPrepareContext)(nil)).Elem(),
+ "Driver": TypeOf((*P_database_sql_driver_Driver)(nil)).Elem(),
+ "Execer": TypeOf((*P_database_sql_driver_Execer)(nil)).Elem(),
+ "ExecerContext": TypeOf((*P_database_sql_driver_ExecerContext)(nil)).Elem(),
+ "NamedValueChecker": TypeOf((*P_database_sql_driver_NamedValueChecker)(nil)).Elem(),
+ "Pinger": TypeOf((*P_database_sql_driver_Pinger)(nil)).Elem(),
+ "Queryer": TypeOf((*P_database_sql_driver_Queryer)(nil)).Elem(),
+ "QueryerContext": TypeOf((*P_database_sql_driver_QueryerContext)(nil)).Elem(),
+ "Result": TypeOf((*P_database_sql_driver_Result)(nil)).Elem(),
+ "Rows": TypeOf((*P_database_sql_driver_Rows)(nil)).Elem(),
+ "RowsColumnTypeDatabaseTypeName": TypeOf((*P_database_sql_driver_RowsColumnTypeDatabaseTypeName)(nil)).Elem(),
+ "RowsColumnTypeLength": TypeOf((*P_database_sql_driver_RowsColumnTypeLength)(nil)).Elem(),
+ "RowsColumnTypeNullable": TypeOf((*P_database_sql_driver_RowsColumnTypeNullable)(nil)).Elem(),
+ "RowsColumnTypePrecisionScale": TypeOf((*P_database_sql_driver_RowsColumnTypePrecisionScale)(nil)).Elem(),
+ "RowsColumnTypeScanType": TypeOf((*P_database_sql_driver_RowsColumnTypeScanType)(nil)).Elem(),
+ "RowsNextResultSet": TypeOf((*P_database_sql_driver_RowsNextResultSet)(nil)).Elem(),
+ "Stmt": TypeOf((*P_database_sql_driver_Stmt)(nil)).Elem(),
+ "StmtExecContext": TypeOf((*P_database_sql_driver_StmtExecContext)(nil)).Elem(),
+ "StmtQueryContext": TypeOf((*P_database_sql_driver_StmtQueryContext)(nil)).Elem(),
+ "Tx": TypeOf((*P_database_sql_driver_Tx)(nil)).Elem(),
+ "ValueConverter": TypeOf((*P_database_sql_driver_ValueConverter)(nil)).Elem(),
+ "Valuer": TypeOf((*P_database_sql_driver_Valuer)(nil)).Elem(),
+ },
}
}
// --------------- proxy for database/sql/driver.ColumnConverter ---------------
-type ColumnConverter_database_sql_driver struct {
+type P_database_sql_driver_ColumnConverter struct {
Object interface{}
ColumnConverter_ func(_proxy_obj_ interface{}, idx int) driver.ValueConverter
}
-func (Proxy *ColumnConverter_database_sql_driver) ColumnConverter(idx int) driver.ValueConverter {
- return Proxy.ColumnConverter_(Proxy.Object, idx)
+func (P *P_database_sql_driver_ColumnConverter) ColumnConverter(idx int) driver.ValueConverter {
+ return P.ColumnConverter_(P.Object, idx)
}
// --------------- proxy for database/sql/driver.Conn ---------------
-type Conn_database_sql_driver struct {
+type P_database_sql_driver_Conn struct {
Object interface{}
Begin_ func(interface{}) (driver.Tx, error)
Close_ func(interface{}) error
Prepare_ func(_proxy_obj_ interface{}, query string) (driver.Stmt, error)
}
-func (Proxy *Conn_database_sql_driver) Begin() (driver.Tx, error) {
- return Proxy.Begin_(Proxy.Object)
+func (P *P_database_sql_driver_Conn) Begin() (driver.Tx, error) {
+ return P.Begin_(P.Object)
}
-func (Proxy *Conn_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_Conn) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *Conn_database_sql_driver) Prepare(query string) (driver.Stmt, error) {
- return Proxy.Prepare_(Proxy.Object, query)
+func (P *P_database_sql_driver_Conn) Prepare(query string) (driver.Stmt, error) {
+ return P.Prepare_(P.Object, query)
}
// --------------- proxy for database/sql/driver.ConnBeginTx ---------------
-type ConnBeginTx_database_sql_driver struct {
+type P_database_sql_driver_ConnBeginTx struct {
Object interface{}
BeginTx_ func(_proxy_obj_ interface{}, ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
}
-func (Proxy *ConnBeginTx_database_sql_driver) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
- return Proxy.BeginTx_(Proxy.Object, ctx, opts)
+func (P *P_database_sql_driver_ConnBeginTx) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
+ return P.BeginTx_(P.Object, ctx, opts)
}
// --------------- proxy for database/sql/driver.ConnPrepareContext ---------------
-type ConnPrepareContext_database_sql_driver struct {
+type P_database_sql_driver_ConnPrepareContext struct {
Object interface{}
PrepareContext_ func(_proxy_obj_ interface{}, ctx context.Context, query string) (driver.Stmt, error)
}
-func (Proxy *ConnPrepareContext_database_sql_driver) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
- return Proxy.PrepareContext_(Proxy.Object, ctx, query)
+func (P *P_database_sql_driver_ConnPrepareContext) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
+ return P.PrepareContext_(P.Object, ctx, query)
}
// --------------- proxy for database/sql/driver.Driver ---------------
-type Driver_database_sql_driver struct {
+type P_database_sql_driver_Driver struct {
Object interface{}
Open_ func(_proxy_obj_ interface{}, name string) (driver.Conn, error)
}
-func (Proxy *Driver_database_sql_driver) Open(name string) (driver.Conn, error) {
- return Proxy.Open_(Proxy.Object, name)
+func (P *P_database_sql_driver_Driver) Open(name string) (driver.Conn, error) {
+ return P.Open_(P.Object, name)
}
// --------------- proxy for database/sql/driver.Execer ---------------
-type Execer_database_sql_driver struct {
+type P_database_sql_driver_Execer struct {
Object interface{}
Exec_ func(_proxy_obj_ interface{}, query string, args []driver.Value) (driver.Result, error)
}
-func (Proxy *Execer_database_sql_driver) Exec(query string, args []driver.Value) (driver.Result, error) {
- return Proxy.Exec_(Proxy.Object, query, args)
+func (P *P_database_sql_driver_Execer) Exec(query string, args []driver.Value) (driver.Result, error) {
+ return P.Exec_(P.Object, query, args)
}
// --------------- proxy for database/sql/driver.ExecerContext ---------------
-type ExecerContext_database_sql_driver struct {
+type P_database_sql_driver_ExecerContext struct {
Object interface{}
ExecContext_ func(_proxy_obj_ interface{}, ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
}
-func (Proxy *ExecerContext_database_sql_driver) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
- return Proxy.ExecContext_(Proxy.Object, ctx, query, args)
+func (P *P_database_sql_driver_ExecerContext) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
+ return P.ExecContext_(P.Object, ctx, query, args)
+}
+
+// --------------- proxy for database/sql/driver.NamedValueChecker ---------------
+type P_database_sql_driver_NamedValueChecker struct {
+ Object interface{}
+ CheckNamedValue_ func(interface{}, *driver.NamedValue) error
+}
+func (P *P_database_sql_driver_NamedValueChecker) CheckNamedValue(unnamed0 *driver.NamedValue) error {
+ return P.CheckNamedValue_(P.Object, unnamed0)
}
// --------------- proxy for database/sql/driver.Pinger ---------------
-type Pinger_database_sql_driver struct {
+type P_database_sql_driver_Pinger struct {
Object interface{}
Ping_ func(_proxy_obj_ interface{}, ctx context.Context) error
}
-func (Proxy *Pinger_database_sql_driver) Ping(ctx context.Context) error {
- return Proxy.Ping_(Proxy.Object, ctx)
+func (P *P_database_sql_driver_Pinger) Ping(ctx context.Context) error {
+ return P.Ping_(P.Object, ctx)
}
// --------------- proxy for database/sql/driver.Queryer ---------------
-type Queryer_database_sql_driver struct {
+type P_database_sql_driver_Queryer struct {
Object interface{}
Query_ func(_proxy_obj_ interface{}, query string, args []driver.Value) (driver.Rows, error)
}
-func (Proxy *Queryer_database_sql_driver) Query(query string, args []driver.Value) (driver.Rows, error) {
- return Proxy.Query_(Proxy.Object, query, args)
+func (P *P_database_sql_driver_Queryer) Query(query string, args []driver.Value) (driver.Rows, error) {
+ return P.Query_(P.Object, query, args)
}
// --------------- proxy for database/sql/driver.QueryerContext ---------------
-type QueryerContext_database_sql_driver struct {
+type P_database_sql_driver_QueryerContext struct {
Object interface{}
QueryContext_ func(_proxy_obj_ interface{}, ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
}
-func (Proxy *QueryerContext_database_sql_driver) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
- return Proxy.QueryContext_(Proxy.Object, ctx, query, args)
+func (P *P_database_sql_driver_QueryerContext) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
+ return P.QueryContext_(P.Object, ctx, query, args)
}
// --------------- proxy for database/sql/driver.Result ---------------
-type Result_database_sql_driver struct {
+type P_database_sql_driver_Result struct {
Object interface{}
LastInsertId_ func(interface{}) (int64, error)
RowsAffected_ func(interface{}) (int64, error)
}
-func (Proxy *Result_database_sql_driver) LastInsertId() (int64, error) {
- return Proxy.LastInsertId_(Proxy.Object)
+func (P *P_database_sql_driver_Result) LastInsertId() (int64, error) {
+ return P.LastInsertId_(P.Object)
}
-func (Proxy *Result_database_sql_driver) RowsAffected() (int64, error) {
- return Proxy.RowsAffected_(Proxy.Object)
+func (P *P_database_sql_driver_Result) RowsAffected() (int64, error) {
+ return P.RowsAffected_(P.Object)
}
// --------------- proxy for database/sql/driver.Rows ---------------
-type Rows_database_sql_driver struct {
+type P_database_sql_driver_Rows struct {
Object interface{}
Close_ func(interface{}) error
Columns_ func(interface{}) []string
Next_ func(_proxy_obj_ interface{}, dest []driver.Value) error
}
-func (Proxy *Rows_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_Rows) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *Rows_database_sql_driver) Columns() []string {
- return Proxy.Columns_(Proxy.Object)
+func (P *P_database_sql_driver_Rows) Columns() []string {
+ return P.Columns_(P.Object)
}
-func (Proxy *Rows_database_sql_driver) Next(dest []driver.Value) error {
- return Proxy.Next_(Proxy.Object, dest)
+func (P *P_database_sql_driver_Rows) Next(dest []driver.Value) error {
+ return P.Next_(P.Object, dest)
}
// --------------- proxy for database/sql/driver.RowsColumnTypeDatabaseTypeName ---------------
-type RowsColumnTypeDatabaseTypeName_database_sql_driver struct {
+type P_database_sql_driver_RowsColumnTypeDatabaseTypeName struct {
Object interface{}
Close_ func(interface{}) error
ColumnTypeDatabaseTypeName_ func(_proxy_obj_ interface{}, index int) string
Columns_ func(interface{}) []string
Next_ func(_proxy_obj_ interface{}, dest []driver.Value) error
}
-func (Proxy *RowsColumnTypeDatabaseTypeName_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeDatabaseTypeName) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *RowsColumnTypeDatabaseTypeName_database_sql_driver) ColumnTypeDatabaseTypeName(index int) string {
- return Proxy.ColumnTypeDatabaseTypeName_(Proxy.Object, index)
+func (P *P_database_sql_driver_RowsColumnTypeDatabaseTypeName) ColumnTypeDatabaseTypeName(index int) string {
+ return P.ColumnTypeDatabaseTypeName_(P.Object, index)
}
-func (Proxy *RowsColumnTypeDatabaseTypeName_database_sql_driver) Columns() []string {
- return Proxy.Columns_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeDatabaseTypeName) Columns() []string {
+ return P.Columns_(P.Object)
}
-func (Proxy *RowsColumnTypeDatabaseTypeName_database_sql_driver) Next(dest []driver.Value) error {
- return Proxy.Next_(Proxy.Object, dest)
+func (P *P_database_sql_driver_RowsColumnTypeDatabaseTypeName) Next(dest []driver.Value) error {
+ return P.Next_(P.Object, dest)
}
// --------------- proxy for database/sql/driver.RowsColumnTypeLength ---------------
-type RowsColumnTypeLength_database_sql_driver struct {
+type P_database_sql_driver_RowsColumnTypeLength struct {
Object interface{}
Close_ func(interface{}) error
ColumnTypeLength_ func(_proxy_obj_ interface{}, index int) (length int64, ok bool)
Columns_ func(interface{}) []string
Next_ func(_proxy_obj_ interface{}, dest []driver.Value) error
}
-func (Proxy *RowsColumnTypeLength_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeLength) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *RowsColumnTypeLength_database_sql_driver) ColumnTypeLength(index int) (length int64, ok bool) {
- return Proxy.ColumnTypeLength_(Proxy.Object, index)
+func (P *P_database_sql_driver_RowsColumnTypeLength) ColumnTypeLength(index int) (length int64, ok bool) {
+ return P.ColumnTypeLength_(P.Object, index)
}
-func (Proxy *RowsColumnTypeLength_database_sql_driver) Columns() []string {
- return Proxy.Columns_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeLength) Columns() []string {
+ return P.Columns_(P.Object)
}
-func (Proxy *RowsColumnTypeLength_database_sql_driver) Next(dest []driver.Value) error {
- return Proxy.Next_(Proxy.Object, dest)
+func (P *P_database_sql_driver_RowsColumnTypeLength) Next(dest []driver.Value) error {
+ return P.Next_(P.Object, dest)
}
// --------------- proxy for database/sql/driver.RowsColumnTypeNullable ---------------
-type RowsColumnTypeNullable_database_sql_driver struct {
+type P_database_sql_driver_RowsColumnTypeNullable struct {
Object interface{}
Close_ func(interface{}) error
ColumnTypeNullable_ func(_proxy_obj_ interface{}, index int) (nullable bool, ok bool)
Columns_ func(interface{}) []string
Next_ func(_proxy_obj_ interface{}, dest []driver.Value) error
}
-func (Proxy *RowsColumnTypeNullable_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeNullable) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *RowsColumnTypeNullable_database_sql_driver) ColumnTypeNullable(index int) (nullable bool, ok bool) {
- return Proxy.ColumnTypeNullable_(Proxy.Object, index)
+func (P *P_database_sql_driver_RowsColumnTypeNullable) ColumnTypeNullable(index int) (nullable bool, ok bool) {
+ return P.ColumnTypeNullable_(P.Object, index)
}
-func (Proxy *RowsColumnTypeNullable_database_sql_driver) Columns() []string {
- return Proxy.Columns_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeNullable) Columns() []string {
+ return P.Columns_(P.Object)
}
-func (Proxy *RowsColumnTypeNullable_database_sql_driver) Next(dest []driver.Value) error {
- return Proxy.Next_(Proxy.Object, dest)
+func (P *P_database_sql_driver_RowsColumnTypeNullable) Next(dest []driver.Value) error {
+ return P.Next_(P.Object, dest)
}
// --------------- proxy for database/sql/driver.RowsColumnTypePrecisionScale ---------------
-type RowsColumnTypePrecisionScale_database_sql_driver struct {
+type P_database_sql_driver_RowsColumnTypePrecisionScale struct {
Object interface{}
Close_ func(interface{}) error
ColumnTypePrecisionScale_ func(_proxy_obj_ interface{}, index int) (precision int64, scale int64, ok bool)
Columns_ func(interface{}) []string
Next_ func(_proxy_obj_ interface{}, dest []driver.Value) error
}
-func (Proxy *RowsColumnTypePrecisionScale_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypePrecisionScale) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *RowsColumnTypePrecisionScale_database_sql_driver) ColumnTypePrecisionScale(index int) (precision int64, scale int64, ok bool) {
- return Proxy.ColumnTypePrecisionScale_(Proxy.Object, index)
+func (P *P_database_sql_driver_RowsColumnTypePrecisionScale) ColumnTypePrecisionScale(index int) (precision int64, scale int64, ok bool) {
+ return P.ColumnTypePrecisionScale_(P.Object, index)
}
-func (Proxy *RowsColumnTypePrecisionScale_database_sql_driver) Columns() []string {
- return Proxy.Columns_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypePrecisionScale) Columns() []string {
+ return P.Columns_(P.Object)
}
-func (Proxy *RowsColumnTypePrecisionScale_database_sql_driver) Next(dest []driver.Value) error {
- return Proxy.Next_(Proxy.Object, dest)
+func (P *P_database_sql_driver_RowsColumnTypePrecisionScale) Next(dest []driver.Value) error {
+ return P.Next_(P.Object, dest)
}
// --------------- proxy for database/sql/driver.RowsColumnTypeScanType ---------------
-type RowsColumnTypeScanType_database_sql_driver struct {
+type P_database_sql_driver_RowsColumnTypeScanType struct {
Object interface{}
Close_ func(interface{}) error
ColumnTypeScanType_ func(_proxy_obj_ interface{}, index int) reflect.Type
Columns_ func(interface{}) []string
Next_ func(_proxy_obj_ interface{}, dest []driver.Value) error
}
-func (Proxy *RowsColumnTypeScanType_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeScanType) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *RowsColumnTypeScanType_database_sql_driver) ColumnTypeScanType(index int) reflect.Type {
- return Proxy.ColumnTypeScanType_(Proxy.Object, index)
+func (P *P_database_sql_driver_RowsColumnTypeScanType) ColumnTypeScanType(index int) reflect.Type {
+ return P.ColumnTypeScanType_(P.Object, index)
}
-func (Proxy *RowsColumnTypeScanType_database_sql_driver) Columns() []string {
- return Proxy.Columns_(Proxy.Object)
+func (P *P_database_sql_driver_RowsColumnTypeScanType) Columns() []string {
+ return P.Columns_(P.Object)
}
-func (Proxy *RowsColumnTypeScanType_database_sql_driver) Next(dest []driver.Value) error {
- return Proxy.Next_(Proxy.Object, dest)
+func (P *P_database_sql_driver_RowsColumnTypeScanType) Next(dest []driver.Value) error {
+ return P.Next_(P.Object, dest)
}
// --------------- proxy for database/sql/driver.RowsNextResultSet ---------------
-type RowsNextResultSet_database_sql_driver struct {
+type P_database_sql_driver_RowsNextResultSet struct {
Object interface{}
Close_ func(interface{}) error
Columns_ func(interface{}) []string
@@ -327,93 +338,88 @@ type RowsNextResultSet_database_sql_driver struct {
Next_ func(_proxy_obj_ interface{}, dest []driver.Value) error
NextResultSet_ func(interface{}) error
}
-func (Proxy *RowsNextResultSet_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_RowsNextResultSet) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *RowsNextResultSet_database_sql_driver) Columns() []string {
- return Proxy.Columns_(Proxy.Object)
+func (P *P_database_sql_driver_RowsNextResultSet) Columns() []string {
+ return P.Columns_(P.Object)
}
-func (Proxy *RowsNextResultSet_database_sql_driver) HasNextResultSet() bool {
- return Proxy.HasNextResultSet_(Proxy.Object)
+func (P *P_database_sql_driver_RowsNextResultSet) HasNextResultSet() bool {
+ return P.HasNextResultSet_(P.Object)
}
-func (Proxy *RowsNextResultSet_database_sql_driver) Next(dest []driver.Value) error {
- return Proxy.Next_(Proxy.Object, dest)
+func (P *P_database_sql_driver_RowsNextResultSet) Next(dest []driver.Value) error {
+ return P.Next_(P.Object, dest)
}
-func (Proxy *RowsNextResultSet_database_sql_driver) NextResultSet() error {
- return Proxy.NextResultSet_(Proxy.Object)
+func (P *P_database_sql_driver_RowsNextResultSet) NextResultSet() error {
+ return P.NextResultSet_(P.Object)
}
// --------------- proxy for database/sql/driver.Stmt ---------------
-type Stmt_database_sql_driver struct {
+type P_database_sql_driver_Stmt struct {
Object interface{}
Close_ func(interface{}) error
Exec_ func(_proxy_obj_ interface{}, args []driver.Value) (driver.Result, error)
NumInput_ func(interface{}) int
Query_ func(_proxy_obj_ interface{}, args []driver.Value) (driver.Rows, error)
}
-func (Proxy *Stmt_database_sql_driver) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_database_sql_driver_Stmt) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *Stmt_database_sql_driver) Exec(args []driver.Value) (driver.Result, error) {
- return Proxy.Exec_(Proxy.Object, args)
+func (P *P_database_sql_driver_Stmt) Exec(args []driver.Value) (driver.Result, error) {
+ return P.Exec_(P.Object, args)
}
-func (Proxy *Stmt_database_sql_driver) NumInput() int {
- return Proxy.NumInput_(Proxy.Object)
+func (P *P_database_sql_driver_Stmt) NumInput() int {
+ return P.NumInput_(P.Object)
}
-func (Proxy *Stmt_database_sql_driver) Query(args []driver.Value) (driver.Rows, error) {
- return Proxy.Query_(Proxy.Object, args)
+func (P *P_database_sql_driver_Stmt) Query(args []driver.Value) (driver.Rows, error) {
+ return P.Query_(P.Object, args)
}
// --------------- proxy for database/sql/driver.StmtExecContext ---------------
-type StmtExecContext_database_sql_driver struct {
+type P_database_sql_driver_StmtExecContext struct {
Object interface{}
ExecContext_ func(_proxy_obj_ interface{}, ctx context.Context, args []driver.NamedValue) (driver.Result, error)
}
-func (Proxy *StmtExecContext_database_sql_driver) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
- return Proxy.ExecContext_(Proxy.Object, ctx, args)
+func (P *P_database_sql_driver_StmtExecContext) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
+ return P.ExecContext_(P.Object, ctx, args)
}
// --------------- proxy for database/sql/driver.StmtQueryContext ---------------
-type StmtQueryContext_database_sql_driver struct {
+type P_database_sql_driver_StmtQueryContext struct {
Object interface{}
QueryContext_ func(_proxy_obj_ interface{}, ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
}
-func (Proxy *StmtQueryContext_database_sql_driver) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
- return Proxy.QueryContext_(Proxy.Object, ctx, args)
+func (P *P_database_sql_driver_StmtQueryContext) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
+ return P.QueryContext_(P.Object, ctx, args)
}
// --------------- proxy for database/sql/driver.Tx ---------------
-type Tx_database_sql_driver struct {
+type P_database_sql_driver_Tx struct {
Object interface{}
Commit_ func(interface{}) error
Rollback_ func(interface{}) error
}
-func (Proxy *Tx_database_sql_driver) Commit() error {
- return Proxy.Commit_(Proxy.Object)
+func (P *P_database_sql_driver_Tx) Commit() error {
+ return P.Commit_(P.Object)
}
-func (Proxy *Tx_database_sql_driver) Rollback() error {
- return Proxy.Rollback_(Proxy.Object)
-}
-
-// --------------- proxy for database/sql/driver.Value ---------------
-type Value_database_sql_driver struct {
- Object interface{}
+func (P *P_database_sql_driver_Tx) Rollback() error {
+ return P.Rollback_(P.Object)
}
// --------------- proxy for database/sql/driver.ValueConverter ---------------
-type ValueConverter_database_sql_driver struct {
+type P_database_sql_driver_ValueConverter struct {
Object interface{}
ConvertValue_ func(_proxy_obj_ interface{}, v interface{}) (driver.Value, error)
}
-func (Proxy *ValueConverter_database_sql_driver) ConvertValue(v interface{}) (driver.Value, error) {
- return Proxy.ConvertValue_(Proxy.Object, v)
+func (P *P_database_sql_driver_ValueConverter) ConvertValue(v interface{}) (driver.Value, error) {
+ return P.ConvertValue_(P.Object, v)
}
// --------------- proxy for database/sql/driver.Valuer ---------------
-type Valuer_database_sql_driver struct {
+type P_database_sql_driver_Valuer struct {
Object interface{}
Value_ func(interface{}) (driver.Value, error)
}
-func (Proxy *Valuer_database_sql_driver) Value() (driver.Value, error) {
- return Proxy.Value_(Proxy.Object)
+func (P *P_database_sql_driver_Valuer) Value() (driver.Value, error) {
+ return P.Value_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/debug_dwarf.go b/vendor/github.com/cosmos72/gomacro/imports/debug_dwarf.go
index 96c3ca9..7d9fdda 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/debug_dwarf.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/debug_dwarf.go
@@ -162,7 +162,7 @@ func init() {
"TagVariantPart": ValueOf(dwarf.TagVariantPart),
"TagVolatileType": ValueOf(dwarf.TagVolatileType),
"TagWithStmt": ValueOf(dwarf.TagWithStmt),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"AddrType": TypeOf((*dwarf.AddrType)(nil)).Elem(),
"ArrayType": TypeOf((*dwarf.ArrayType)(nil)).Elem(),
"Attr": TypeOf((*dwarf.Attr)(nil)).Elem(),
@@ -199,9 +199,9 @@ func init() {
"UintType": TypeOf((*dwarf.UintType)(nil)).Elem(),
"UnspecifiedType": TypeOf((*dwarf.UnspecifiedType)(nil)).Elem(),
"VoidType": TypeOf((*dwarf.VoidType)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Type": TypeOf((*Type_debug_dwarf)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Proxies: map[string]Type{
+ "Type": TypeOf((*P_debug_dwarf_Type)(nil)).Elem(),
+ }, Wrappers: map[string][]string{
"AddrType": []string{"Basic","Common","Size","String",},
"ArrayType": []string{"Common",},
"BasicType": []string{"Common","Size",},
@@ -221,23 +221,23 @@ func init() {
"UintType": []string{"Basic","Common","Size","String",},
"UnspecifiedType": []string{"Basic","Common","Size","String",},
"VoidType": []string{"Common","Size",},
- },
+ },
}
}
// --------------- proxy for debug/dwarf.Type ---------------
-type Type_debug_dwarf struct {
+type P_debug_dwarf_Type struct {
Object interface{}
Common_ func(interface{}) *dwarf.CommonType
Size_ func(interface{}) int64
String_ func(interface{}) string
}
-func (Proxy *Type_debug_dwarf) Common() *dwarf.CommonType {
- return Proxy.Common_(Proxy.Object)
+func (P *P_debug_dwarf_Type) Common() *dwarf.CommonType {
+ return P.Common_(P.Object)
}
-func (Proxy *Type_debug_dwarf) Size() int64 {
- return Proxy.Size_(Proxy.Object)
+func (P *P_debug_dwarf_Type) Size() int64 {
+ return P.Size_(P.Object)
}
-func (Proxy *Type_debug_dwarf) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_debug_dwarf_Type) String() string {
+ return P.String_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/debug_elf.go b/vendor/github.com/cosmos72/gomacro/imports/debug_elf.go
index 8319587..965597c 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/debug_elf.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/debug_elf.go
@@ -823,7 +823,7 @@ func init() {
"ST_VISIBILITY": ValueOf(elf.ST_VISIBILITY),
"Sym32Size": ValueOf(elf.Sym32Size),
"Sym64Size": ValueOf(elf.Sym64Size),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Chdr32": TypeOf((*elf.Chdr32)(nil)).Elem(),
"Chdr64": TypeOf((*elf.Chdr64)(nil)).Elem(),
"Class": TypeOf((*elf.Class)(nil)).Elem(),
@@ -877,7 +877,7 @@ func init() {
"Symbol": TypeOf((*elf.Symbol)(nil)).Elem(),
"Type": TypeOf((*elf.Type)(nil)).Elem(),
"Version": TypeOf((*elf.Version)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"ARM_MAGIC_TRAMP_NUMBER": "int:1543503875",
"EI_ABIVERSION": "int:8",
"EI_CLASS": "int:4",
@@ -889,6 +889,6 @@ func init() {
"ELFMAG": "string:\u007fELF",
"Sym32Size": "int:16",
"Sym64Size": "int:24",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/debug_gosym.go b/vendor/github.com/cosmos72/gomacro/imports/debug_gosym.go
index 7d9862d..beeb084 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/debug_gosym.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/debug_gosym.go
@@ -14,7 +14,7 @@ func init() {
Binds: map[string]Value{
"NewLineTable": ValueOf(gosym.NewLineTable),
"NewTable": ValueOf(gosym.NewTable),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"DecodingError": TypeOf((*gosym.DecodingError)(nil)).Elem(),
"Func": TypeOf((*gosym.Func)(nil)).Elem(),
"LineTable": TypeOf((*gosym.LineTable)(nil)).Elem(),
@@ -23,8 +23,8 @@ func init() {
"Table": TypeOf((*gosym.Table)(nil)).Elem(),
"UnknownFileError": TypeOf((*gosym.UnknownFileError)(nil)).Elem(),
"UnknownLineError": TypeOf((*gosym.UnknownLineError)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"Func": []string{"BaseName","PackageName","ReceiverName","Static",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/debug_macho.go b/vendor/github.com/cosmos72/gomacro/imports/debug_macho.go
index cfe4cb4..246206d 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/debug_macho.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/debug_macho.go
@@ -37,7 +37,7 @@ func init() {
"TypeDylib": ValueOf(macho.TypeDylib),
"TypeExec": ValueOf(macho.TypeExec),
"TypeObj": ValueOf(macho.TypeObj),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Cpu": TypeOf((*macho.Cpu)(nil)).Elem(),
"Dylib": TypeOf((*macho.Dylib)(nil)).Elem(),
"DylibCmd": TypeOf((*macho.DylibCmd)(nil)).Elem(),
@@ -69,23 +69,23 @@ func init() {
"SymtabCmd": TypeOf((*macho.SymtabCmd)(nil)).Elem(),
"Thread": TypeOf((*macho.Thread)(nil)).Elem(),
"Type": TypeOf((*macho.Type)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Load": TypeOf((*Load_debug_macho)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Proxies: map[string]Type{
+ "Load": TypeOf((*P_debug_macho_Load)(nil)).Elem(),
+ }, Wrappers: map[string][]string{
"Dylib": []string{"Raw",},
"Dysymtab": []string{"Raw",},
"FatArch": []string{"Close","DWARF","ImportedLibraries","ImportedSymbols","Section","Segment",},
"Segment": []string{"Raw",},
"Symtab": []string{"Raw",},
- },
+ },
}
}
// --------------- proxy for debug/macho.Load ---------------
-type Load_debug_macho struct {
+type P_debug_macho_Load struct {
Object interface{}
Raw_ func(interface{}) []byte
}
-func (Proxy *Load_debug_macho) Raw() []byte {
- return Proxy.Raw_(Proxy.Object)
+func (P *P_debug_macho_Load) Raw() []byte {
+ return P.Raw_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/debug_pe.go b/vendor/github.com/cosmos72/gomacro/imports/debug_pe.go
index 862e12b..b384d33 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/debug_pe.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/debug_pe.go
@@ -35,7 +35,7 @@ func init() {
"IMAGE_FILE_MACHINE_WCEMIPSV2": ValueOf(pe.IMAGE_FILE_MACHINE_WCEMIPSV2),
"NewFile": ValueOf(pe.NewFile),
"Open": ValueOf(pe.Open),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"COFFSymbol": TypeOf((*pe.COFFSymbol)(nil)).Elem(),
"DataDirectory": TypeOf((*pe.DataDirectory)(nil)).Elem(),
"File": TypeOf((*pe.File)(nil)).Elem(),
@@ -50,7 +50,7 @@ func init() {
"SectionHeader32": TypeOf((*pe.SectionHeader32)(nil)).Elem(),
"StringTable": TypeOf((*pe.StringTable)(nil)).Elem(),
"Symbol": TypeOf((*pe.Symbol)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"COFFSymbolSize": "int:18",
"IMAGE_FILE_MACHINE_AM33": "int:467",
"IMAGE_FILE_MACHINE_AMD64": "int:34404",
@@ -72,6 +72,6 @@ func init() {
"IMAGE_FILE_MACHINE_THUMB": "int:450",
"IMAGE_FILE_MACHINE_UNKNOWN": "int:0",
"IMAGE_FILE_MACHINE_WCEMIPSV2": "int:361",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/debug_plan9obj.go b/vendor/github.com/cosmos72/gomacro/imports/debug_plan9obj.go
index e102f2d..2035560 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/debug_plan9obj.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/debug_plan9obj.go
@@ -18,17 +18,17 @@ func init() {
"MagicARM": ValueOf(plan9obj.MagicARM),
"NewFile": ValueOf(plan9obj.NewFile),
"Open": ValueOf(plan9obj.Open),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"File": TypeOf((*plan9obj.File)(nil)).Elem(),
"FileHeader": TypeOf((*plan9obj.FileHeader)(nil)).Elem(),
"Section": TypeOf((*plan9obj.Section)(nil)).Elem(),
"SectionHeader": TypeOf((*plan9obj.SectionHeader)(nil)).Elem(),
"Sym": TypeOf((*plan9obj.Sym)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"Magic386": "int:491",
"Magic64": "int:32768",
"MagicAMD64": "int:35479",
"MagicARM": "int:1607",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding.go b/vendor/github.com/cosmos72/gomacro/imports/encoding.go
index 41f45f5..5404cb5 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding.go
@@ -16,47 +16,47 @@ func init() {
"BinaryUnmarshaler": TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem(),
"TextMarshaler": TypeOf((*encoding.TextMarshaler)(nil)).Elem(),
"TextUnmarshaler": TypeOf((*encoding.TextUnmarshaler)(nil)).Elem(),
- },Proxies: map[string]Type{
- "BinaryMarshaler": TypeOf((*BinaryMarshaler_encoding)(nil)).Elem(),
- "BinaryUnmarshaler": TypeOf((*BinaryUnmarshaler_encoding)(nil)).Elem(),
- "TextMarshaler": TypeOf((*TextMarshaler_encoding)(nil)).Elem(),
- "TextUnmarshaler": TypeOf((*TextUnmarshaler_encoding)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "BinaryMarshaler": TypeOf((*P_encoding_BinaryMarshaler)(nil)).Elem(),
+ "BinaryUnmarshaler": TypeOf((*P_encoding_BinaryUnmarshaler)(nil)).Elem(),
+ "TextMarshaler": TypeOf((*P_encoding_TextMarshaler)(nil)).Elem(),
+ "TextUnmarshaler": TypeOf((*P_encoding_TextUnmarshaler)(nil)).Elem(),
+ },
}
}
// --------------- proxy for encoding.BinaryMarshaler ---------------
-type BinaryMarshaler_encoding struct {
+type P_encoding_BinaryMarshaler struct {
Object interface{}
MarshalBinary_ func(interface{}) (data []byte, err error)
}
-func (Proxy *BinaryMarshaler_encoding) MarshalBinary() (data []byte, err error) {
- return Proxy.MarshalBinary_(Proxy.Object)
+func (P *P_encoding_BinaryMarshaler) MarshalBinary() (data []byte, err error) {
+ return P.MarshalBinary_(P.Object)
}
// --------------- proxy for encoding.BinaryUnmarshaler ---------------
-type BinaryUnmarshaler_encoding struct {
+type P_encoding_BinaryUnmarshaler struct {
Object interface{}
UnmarshalBinary_ func(_proxy_obj_ interface{}, data []byte) error
}
-func (Proxy *BinaryUnmarshaler_encoding) UnmarshalBinary(data []byte) error {
- return Proxy.UnmarshalBinary_(Proxy.Object, data)
+func (P *P_encoding_BinaryUnmarshaler) UnmarshalBinary(data []byte) error {
+ return P.UnmarshalBinary_(P.Object, data)
}
// --------------- proxy for encoding.TextMarshaler ---------------
-type TextMarshaler_encoding struct {
+type P_encoding_TextMarshaler struct {
Object interface{}
MarshalText_ func(interface{}) (text []byte, err error)
}
-func (Proxy *TextMarshaler_encoding) MarshalText() (text []byte, err error) {
- return Proxy.MarshalText_(Proxy.Object)
+func (P *P_encoding_TextMarshaler) MarshalText() (text []byte, err error) {
+ return P.MarshalText_(P.Object)
}
// --------------- proxy for encoding.TextUnmarshaler ---------------
-type TextUnmarshaler_encoding struct {
+type P_encoding_TextUnmarshaler struct {
Object interface{}
UnmarshalText_ func(_proxy_obj_ interface{}, text []byte) error
}
-func (Proxy *TextUnmarshaler_encoding) UnmarshalText(text []byte) error {
- return Proxy.UnmarshalText_(Proxy.Object, text)
+func (P *P_encoding_TextUnmarshaler) UnmarshalText(text []byte) error {
+ return P.UnmarshalText_(P.Object, text)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_ascii85.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_ascii85.go
index 82d80de..5c07604 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_ascii85.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_ascii85.go
@@ -17,8 +17,8 @@ func init() {
"MaxEncodedLen": ValueOf(ascii85.MaxEncodedLen),
"NewDecoder": ValueOf(ascii85.NewDecoder),
"NewEncoder": ValueOf(ascii85.NewEncoder),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CorruptInputError": TypeOf((*ascii85.CorruptInputError)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_asn1.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_asn1.go
index cd97c75..70a1e10 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_asn1.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_asn1.go
@@ -17,6 +17,8 @@ func init() {
"ClassPrivate": ValueOf(asn1.ClassPrivate),
"ClassUniversal": ValueOf(asn1.ClassUniversal),
"Marshal": ValueOf(asn1.Marshal),
+ "NullBytes": ValueOf(&asn1.NullBytes).Elem(),
+ "NullRawValue": ValueOf(&asn1.NullRawValue).Elem(),
"TagBitString": ValueOf(asn1.TagBitString),
"TagBoolean": ValueOf(asn1.TagBoolean),
"TagEnum": ValueOf(asn1.TagEnum),
@@ -24,6 +26,7 @@ func init() {
"TagGeneralizedTime": ValueOf(asn1.TagGeneralizedTime),
"TagIA5String": ValueOf(asn1.TagIA5String),
"TagInteger": ValueOf(asn1.TagInteger),
+ "TagNull": ValueOf(asn1.TagNull),
"TagOID": ValueOf(asn1.TagOID),
"TagOctetString": ValueOf(asn1.TagOctetString),
"TagPrintableString": ValueOf(asn1.TagPrintableString),
@@ -34,7 +37,7 @@ func init() {
"TagUTF8String": ValueOf(asn1.TagUTF8String),
"Unmarshal": ValueOf(asn1.Unmarshal),
"UnmarshalWithParams": ValueOf(asn1.UnmarshalWithParams),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"BitString": TypeOf((*asn1.BitString)(nil)).Elem(),
"Enumerated": TypeOf((*asn1.Enumerated)(nil)).Elem(),
"Flag": TypeOf((*asn1.Flag)(nil)).Elem(),
@@ -43,7 +46,7 @@ func init() {
"RawValue": TypeOf((*asn1.RawValue)(nil)).Elem(),
"StructuralError": TypeOf((*asn1.StructuralError)(nil)).Elem(),
"SyntaxError": TypeOf((*asn1.SyntaxError)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"ClassApplication": "int:1",
"ClassContextSpecific": "int:2",
"ClassPrivate": "int:3",
@@ -55,6 +58,7 @@ func init() {
"TagGeneralizedTime": "int:24",
"TagIA5String": "int:22",
"TagInteger": "int:2",
+ "TagNull": "int:5",
"TagOID": "int:6",
"TagOctetString": "int:4",
"TagPrintableString": "int:19",
@@ -63,6 +67,6 @@ func init() {
"TagT61String": "int:20",
"TagUTCTime": "int:23",
"TagUTF8String": "int:12",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_base32.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_base32.go
index 0855789..9b91860 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_base32.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_base32.go
@@ -16,10 +16,12 @@ func init() {
"NewDecoder": ValueOf(base32.NewDecoder),
"NewEncoder": ValueOf(base32.NewEncoder),
"NewEncoding": ValueOf(base32.NewEncoding),
+ "NoPadding": ValueOf(base32.NoPadding),
"StdEncoding": ValueOf(&base32.StdEncoding).Elem(),
- },Types: map[string]Type{
+ "StdPadding": ValueOf(base32.StdPadding),
+ }, Types: map[string]Type{
"CorruptInputError": TypeOf((*base32.CorruptInputError)(nil)).Elem(),
"Encoding": TypeOf((*base32.Encoding)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_base64.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_base64.go
index f241161..c70f4da 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_base64.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_base64.go
@@ -21,9 +21,9 @@ func init() {
"StdEncoding": ValueOf(&base64.StdEncoding).Elem(),
"StdPadding": ValueOf(base64.StdPadding),
"URLEncoding": ValueOf(&base64.URLEncoding).Elem(),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CorruptInputError": TypeOf((*base64.CorruptInputError)(nil)).Elem(),
"Encoding": TypeOf((*base64.Encoding)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_binary.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_binary.go
index de2368b..31595c2 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_binary.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_binary.go
@@ -26,20 +26,20 @@ func init() {
"Uvarint": ValueOf(binary.Uvarint),
"Varint": ValueOf(binary.Varint),
"Write": ValueOf(binary.Write),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ByteOrder": TypeOf((*binary.ByteOrder)(nil)).Elem(),
- },Proxies: map[string]Type{
- "ByteOrder": TypeOf((*ByteOrder_encoding_binary)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "ByteOrder": TypeOf((*P_encoding_binary_ByteOrder)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"MaxVarintLen16": "int:3",
"MaxVarintLen32": "int:5",
"MaxVarintLen64": "int:10",
- },
+ },
}
}
// --------------- proxy for encoding/binary.ByteOrder ---------------
-type ByteOrder_encoding_binary struct {
+type P_encoding_binary_ByteOrder struct {
Object interface{}
PutUint16_ func(interface{}, []byte, uint16)
PutUint32_ func(interface{}, []byte, uint32)
@@ -49,24 +49,24 @@ type ByteOrder_encoding_binary struct {
Uint32_ func(interface{}, []byte) uint32
Uint64_ func(interface{}, []byte) uint64
}
-func (Proxy *ByteOrder_encoding_binary) PutUint16(unnamed0 []byte, unnamed1 uint16) {
- Proxy.PutUint16_(Proxy.Object, unnamed0, unnamed1)
+func (P *P_encoding_binary_ByteOrder) PutUint16(unnamed0 []byte, unnamed1 uint16) {
+ P.PutUint16_(P.Object, unnamed0, unnamed1)
}
-func (Proxy *ByteOrder_encoding_binary) PutUint32(unnamed0 []byte, unnamed1 uint32) {
- Proxy.PutUint32_(Proxy.Object, unnamed0, unnamed1)
+func (P *P_encoding_binary_ByteOrder) PutUint32(unnamed0 []byte, unnamed1 uint32) {
+ P.PutUint32_(P.Object, unnamed0, unnamed1)
}
-func (Proxy *ByteOrder_encoding_binary) PutUint64(unnamed0 []byte, unnamed1 uint64) {
- Proxy.PutUint64_(Proxy.Object, unnamed0, unnamed1)
+func (P *P_encoding_binary_ByteOrder) PutUint64(unnamed0 []byte, unnamed1 uint64) {
+ P.PutUint64_(P.Object, unnamed0, unnamed1)
}
-func (Proxy *ByteOrder_encoding_binary) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_encoding_binary_ByteOrder) String() string {
+ return P.String_(P.Object)
}
-func (Proxy *ByteOrder_encoding_binary) Uint16(unnamed0 []byte) uint16 {
- return Proxy.Uint16_(Proxy.Object, unnamed0)
+func (P *P_encoding_binary_ByteOrder) Uint16(unnamed0 []byte) uint16 {
+ return P.Uint16_(P.Object, unnamed0)
}
-func (Proxy *ByteOrder_encoding_binary) Uint32(unnamed0 []byte) uint32 {
- return Proxy.Uint32_(Proxy.Object, unnamed0)
+func (P *P_encoding_binary_ByteOrder) Uint32(unnamed0 []byte) uint32 {
+ return P.Uint32_(P.Object, unnamed0)
}
-func (Proxy *ByteOrder_encoding_binary) Uint64(unnamed0 []byte) uint64 {
- return Proxy.Uint64_(Proxy.Object, unnamed0)
+func (P *P_encoding_binary_ByteOrder) Uint64(unnamed0 []byte) uint64 {
+ return P.Uint64_(P.Object, unnamed0)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_csv.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_csv.go
index 8ed0be1..31771e0 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_csv.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_csv.go
@@ -18,10 +18,10 @@ func init() {
"ErrTrailingComma": ValueOf(&csv.ErrTrailingComma).Elem(),
"NewReader": ValueOf(csv.NewReader),
"NewWriter": ValueOf(csv.NewWriter),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ParseError": TypeOf((*csv.ParseError)(nil)).Elem(),
"Reader": TypeOf((*csv.Reader)(nil)).Elem(),
"Writer": TypeOf((*csv.Writer)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_gob.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_gob.go
index cd3a04e..f49d206 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_gob.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_gob.go
@@ -16,33 +16,33 @@ func init() {
"NewEncoder": ValueOf(gob.NewEncoder),
"Register": ValueOf(gob.Register),
"RegisterName": ValueOf(gob.RegisterName),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CommonType": TypeOf((*gob.CommonType)(nil)).Elem(),
"Decoder": TypeOf((*gob.Decoder)(nil)).Elem(),
"Encoder": TypeOf((*gob.Encoder)(nil)).Elem(),
"GobDecoder": TypeOf((*gob.GobDecoder)(nil)).Elem(),
"GobEncoder": TypeOf((*gob.GobEncoder)(nil)).Elem(),
- },Proxies: map[string]Type{
- "GobDecoder": TypeOf((*GobDecoder_encoding_gob)(nil)).Elem(),
- "GobEncoder": TypeOf((*GobEncoder_encoding_gob)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "GobDecoder": TypeOf((*P_encoding_gob_GobDecoder)(nil)).Elem(),
+ "GobEncoder": TypeOf((*P_encoding_gob_GobEncoder)(nil)).Elem(),
+ },
}
}
// --------------- proxy for encoding/gob.GobDecoder ---------------
-type GobDecoder_encoding_gob struct {
+type P_encoding_gob_GobDecoder struct {
Object interface{}
GobDecode_ func(interface{}, []byte) error
}
-func (Proxy *GobDecoder_encoding_gob) GobDecode(unnamed0 []byte) error {
- return Proxy.GobDecode_(Proxy.Object, unnamed0)
+func (P *P_encoding_gob_GobDecoder) GobDecode(unnamed0 []byte) error {
+ return P.GobDecode_(P.Object, unnamed0)
}
// --------------- proxy for encoding/gob.GobEncoder ---------------
-type GobEncoder_encoding_gob struct {
+type P_encoding_gob_GobEncoder struct {
Object interface{}
GobEncode_ func(interface{}) ([]byte, error)
}
-func (Proxy *GobEncoder_encoding_gob) GobEncode() ([]byte, error) {
- return Proxy.GobEncode_(Proxy.Object)
+func (P *P_encoding_gob_GobEncoder) GobEncode() ([]byte, error) {
+ return P.GobEncode_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_hex.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_hex.go
index a268393..e98c17b 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_hex.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_hex.go
@@ -21,8 +21,8 @@ func init() {
"EncodeToString": ValueOf(hex.EncodeToString),
"EncodedLen": ValueOf(hex.EncodedLen),
"ErrLength": ValueOf(&hex.ErrLength).Elem(),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"InvalidByteError": TypeOf((*hex.InvalidByteError)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_json.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_json.go
index cef7391..3d638e4 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_json.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_json.go
@@ -20,7 +20,8 @@ func init() {
"NewDecoder": ValueOf(json.NewDecoder),
"NewEncoder": ValueOf(json.NewEncoder),
"Unmarshal": ValueOf(json.Unmarshal),
- },Types: map[string]Type{
+ "Valid": ValueOf(json.Valid),
+ }, Types: map[string]Type{
"Decoder": TypeOf((*json.Decoder)(nil)).Elem(),
"Delim": TypeOf((*json.Delim)(nil)).Elem(),
"Encoder": TypeOf((*json.Encoder)(nil)).Elem(),
@@ -37,33 +38,27 @@ func init() {
"Unmarshaler": TypeOf((*json.Unmarshaler)(nil)).Elem(),
"UnsupportedTypeError": TypeOf((*json.UnsupportedTypeError)(nil)).Elem(),
"UnsupportedValueError": TypeOf((*json.UnsupportedValueError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Marshaler": TypeOf((*Marshaler_encoding_json)(nil)).Elem(),
- "Token": TypeOf((*Token_encoding_json)(nil)).Elem(),
- "Unmarshaler": TypeOf((*Unmarshaler_encoding_json)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Marshaler": TypeOf((*P_encoding_json_Marshaler)(nil)).Elem(),
+ "Unmarshaler": TypeOf((*P_encoding_json_Unmarshaler)(nil)).Elem(),
+ },
}
}
// --------------- proxy for encoding/json.Marshaler ---------------
-type Marshaler_encoding_json struct {
+type P_encoding_json_Marshaler struct {
Object interface{}
MarshalJSON_ func(interface{}) ([]byte, error)
}
-func (Proxy *Marshaler_encoding_json) MarshalJSON() ([]byte, error) {
- return Proxy.MarshalJSON_(Proxy.Object)
-}
-
-// --------------- proxy for encoding/json.Token ---------------
-type Token_encoding_json struct {
- Object interface{}
+func (P *P_encoding_json_Marshaler) MarshalJSON() ([]byte, error) {
+ return P.MarshalJSON_(P.Object)
}
// --------------- proxy for encoding/json.Unmarshaler ---------------
-type Unmarshaler_encoding_json struct {
+type P_encoding_json_Unmarshaler struct {
Object interface{}
UnmarshalJSON_ func(interface{}, []byte) error
}
-func (Proxy *Unmarshaler_encoding_json) UnmarshalJSON(unnamed0 []byte) error {
- return Proxy.UnmarshalJSON_(Proxy.Object, unnamed0)
+func (P *P_encoding_json_Unmarshaler) UnmarshalJSON(unnamed0 []byte) error {
+ return P.UnmarshalJSON_(P.Object, unnamed0)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_pem.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_pem.go
index 762c2e7..20a09de 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_pem.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_pem.go
@@ -15,8 +15,8 @@ func init() {
"Decode": ValueOf(pem.Decode),
"Encode": ValueOf(pem.Encode),
"EncodeToMemory": ValueOf(pem.EncodeToMemory),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Block": TypeOf((*pem.Block)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/encoding_xml.go b/vendor/github.com/cosmos72/gomacro/imports/encoding_xml.go
index 3fe9156..9ac2a1d 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/encoding_xml.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/encoding_xml.go
@@ -23,7 +23,7 @@ func init() {
"NewDecoder": ValueOf(xml.NewDecoder),
"NewEncoder": ValueOf(xml.NewEncoder),
"Unmarshal": ValueOf(xml.Unmarshal),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Attr": TypeOf((*xml.Attr)(nil)).Elem(),
"CharData": TypeOf((*xml.CharData)(nil)).Elem(),
"Comment": TypeOf((*xml.Comment)(nil)).Elem(),
@@ -43,55 +43,49 @@ func init() {
"Unmarshaler": TypeOf((*xml.Unmarshaler)(nil)).Elem(),
"UnmarshalerAttr": TypeOf((*xml.UnmarshalerAttr)(nil)).Elem(),
"UnsupportedTypeError": TypeOf((*xml.UnsupportedTypeError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Marshaler": TypeOf((*Marshaler_encoding_xml)(nil)).Elem(),
- "MarshalerAttr": TypeOf((*MarshalerAttr_encoding_xml)(nil)).Elem(),
- "Token": TypeOf((*Token_encoding_xml)(nil)).Elem(),
- "Unmarshaler": TypeOf((*Unmarshaler_encoding_xml)(nil)).Elem(),
- "UnmarshalerAttr": TypeOf((*UnmarshalerAttr_encoding_xml)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Marshaler": TypeOf((*P_encoding_xml_Marshaler)(nil)).Elem(),
+ "MarshalerAttr": TypeOf((*P_encoding_xml_MarshalerAttr)(nil)).Elem(),
+ "Unmarshaler": TypeOf((*P_encoding_xml_Unmarshaler)(nil)).Elem(),
+ "UnmarshalerAttr": TypeOf((*P_encoding_xml_UnmarshalerAttr)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"Header": "string:\n",
- },
+ },
}
}
// --------------- proxy for encoding/xml.Marshaler ---------------
-type Marshaler_encoding_xml struct {
+type P_encoding_xml_Marshaler struct {
Object interface{}
MarshalXML_ func(_proxy_obj_ interface{}, e *xml.Encoder, start xml.StartElement) error
}
-func (Proxy *Marshaler_encoding_xml) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
- return Proxy.MarshalXML_(Proxy.Object, e, start)
+func (P *P_encoding_xml_Marshaler) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ return P.MarshalXML_(P.Object, e, start)
}
// --------------- proxy for encoding/xml.MarshalerAttr ---------------
-type MarshalerAttr_encoding_xml struct {
+type P_encoding_xml_MarshalerAttr struct {
Object interface{}
MarshalXMLAttr_ func(_proxy_obj_ interface{}, name xml.Name) (xml.Attr, error)
}
-func (Proxy *MarshalerAttr_encoding_xml) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
- return Proxy.MarshalXMLAttr_(Proxy.Object, name)
-}
-
-// --------------- proxy for encoding/xml.Token ---------------
-type Token_encoding_xml struct {
- Object interface{}
+func (P *P_encoding_xml_MarshalerAttr) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
+ return P.MarshalXMLAttr_(P.Object, name)
}
// --------------- proxy for encoding/xml.Unmarshaler ---------------
-type Unmarshaler_encoding_xml struct {
+type P_encoding_xml_Unmarshaler struct {
Object interface{}
UnmarshalXML_ func(_proxy_obj_ interface{}, d *xml.Decoder, start xml.StartElement) error
}
-func (Proxy *Unmarshaler_encoding_xml) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
- return Proxy.UnmarshalXML_(Proxy.Object, d, start)
+func (P *P_encoding_xml_Unmarshaler) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ return P.UnmarshalXML_(P.Object, d, start)
}
// --------------- proxy for encoding/xml.UnmarshalerAttr ---------------
-type UnmarshalerAttr_encoding_xml struct {
+type P_encoding_xml_UnmarshalerAttr struct {
Object interface{}
UnmarshalXMLAttr_ func(_proxy_obj_ interface{}, attr xml.Attr) error
}
-func (Proxy *UnmarshalerAttr_encoding_xml) UnmarshalXMLAttr(attr xml.Attr) error {
- return Proxy.UnmarshalXMLAttr_(Proxy.Object, attr)
+func (P *P_encoding_xml_UnmarshalerAttr) UnmarshalXMLAttr(attr xml.Attr) error {
+ return P.UnmarshalXMLAttr_(P.Object, attr)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/errors.go b/vendor/github.com/cosmos72/gomacro/imports/errors.go
index 822ef33..e10b543 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/errors.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/errors.go
@@ -13,6 +13,6 @@ func init() {
Packages["errors"] = Package{
Binds: map[string]Value{
"New": ValueOf(errors.New),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/expvar.go b/vendor/github.com/cosmos72/gomacro/imports/expvar.go
index a2f235c..9aec9e3 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/expvar.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/expvar.go
@@ -20,7 +20,7 @@ func init() {
"NewMap": ValueOf(expvar.NewMap),
"NewString": ValueOf(expvar.NewString),
"Publish": ValueOf(expvar.Publish),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Float": TypeOf((*expvar.Float)(nil)).Elem(),
"Func": TypeOf((*expvar.Func)(nil)).Elem(),
"Int": TypeOf((*expvar.Int)(nil)).Elem(),
@@ -28,17 +28,17 @@ func init() {
"Map": TypeOf((*expvar.Map)(nil)).Elem(),
"String": TypeOf((*expvar.String)(nil)).Elem(),
"Var": TypeOf((*expvar.Var)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Var": TypeOf((*Var_expvar)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Var": TypeOf((*P_expvar_Var)(nil)).Elem(),
+ },
}
}
// --------------- proxy for expvar.Var ---------------
-type Var_expvar struct {
+type P_expvar_Var struct {
Object interface{}
String_ func(interface{}) string
}
-func (Proxy *Var_expvar) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_expvar_Var) String() string {
+ return P.String_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/flag.go b/vendor/github.com/cosmos72/gomacro/imports/flag.go
index 18e6ba0..76664e1 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/flag.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/flag.go
@@ -48,45 +48,45 @@ func init() {
"Var": ValueOf(flag.Var),
"Visit": ValueOf(flag.Visit),
"VisitAll": ValueOf(flag.VisitAll),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ErrorHandling": TypeOf((*flag.ErrorHandling)(nil)).Elem(),
"Flag": TypeOf((*flag.Flag)(nil)).Elem(),
"FlagSet": TypeOf((*flag.FlagSet)(nil)).Elem(),
"Getter": TypeOf((*flag.Getter)(nil)).Elem(),
"Value": TypeOf((*flag.Value)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Getter": TypeOf((*Getter_flag)(nil)).Elem(),
- "Value": TypeOf((*Value_flag)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Getter": TypeOf((*P_flag_Getter)(nil)).Elem(),
+ "Value": TypeOf((*P_flag_Value)(nil)).Elem(),
+ },
}
}
// --------------- proxy for flag.Getter ---------------
-type Getter_flag struct {
+type P_flag_Getter struct {
Object interface{}
Get_ func(interface{}) interface{}
Set_ func(interface{}, string) error
String_ func(interface{}) string
}
-func (Proxy *Getter_flag) Get() interface{} {
- return Proxy.Get_(Proxy.Object)
+func (P *P_flag_Getter) Get() interface{} {
+ return P.Get_(P.Object)
}
-func (Proxy *Getter_flag) Set(unnamed0 string) error {
- return Proxy.Set_(Proxy.Object, unnamed0)
+func (P *P_flag_Getter) Set(unnamed0 string) error {
+ return P.Set_(P.Object, unnamed0)
}
-func (Proxy *Getter_flag) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_flag_Getter) String() string {
+ return P.String_(P.Object)
}
// --------------- proxy for flag.Value ---------------
-type Value_flag struct {
+type P_flag_Value struct {
Object interface{}
Set_ func(interface{}, string) error
String_ func(interface{}) string
}
-func (Proxy *Value_flag) Set(unnamed0 string) error {
- return Proxy.Set_(Proxy.Object, unnamed0)
+func (P *P_flag_Value) Set(unnamed0 string) error {
+ return P.Set_(P.Object, unnamed0)
}
-func (Proxy *Value_flag) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_flag_Value) String() string {
+ return P.String_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/fmt.go b/vendor/github.com/cosmos72/gomacro/imports/fmt.go
index 21a360d..52351b1 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/fmt.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/fmt.go
@@ -31,44 +31,44 @@ func init() {
"Sscan": ValueOf(fmt.Sscan),
"Sscanf": ValueOf(fmt.Sscanf),
"Sscanln": ValueOf(fmt.Sscanln),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Formatter": TypeOf((*fmt.Formatter)(nil)).Elem(),
"GoStringer": TypeOf((*fmt.GoStringer)(nil)).Elem(),
"ScanState": TypeOf((*fmt.ScanState)(nil)).Elem(),
"Scanner": TypeOf((*fmt.Scanner)(nil)).Elem(),
"State": TypeOf((*fmt.State)(nil)).Elem(),
"Stringer": TypeOf((*fmt.Stringer)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Formatter": TypeOf((*Formatter_fmt)(nil)).Elem(),
- "GoStringer": TypeOf((*GoStringer_fmt)(nil)).Elem(),
- "ScanState": TypeOf((*ScanState_fmt)(nil)).Elem(),
- "Scanner": TypeOf((*Scanner_fmt)(nil)).Elem(),
- "State": TypeOf((*State_fmt)(nil)).Elem(),
- "Stringer": TypeOf((*Stringer_fmt)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Formatter": TypeOf((*P_fmt_Formatter)(nil)).Elem(),
+ "GoStringer": TypeOf((*P_fmt_GoStringer)(nil)).Elem(),
+ "ScanState": TypeOf((*P_fmt_ScanState)(nil)).Elem(),
+ "Scanner": TypeOf((*P_fmt_Scanner)(nil)).Elem(),
+ "State": TypeOf((*P_fmt_State)(nil)).Elem(),
+ "Stringer": TypeOf((*P_fmt_Stringer)(nil)).Elem(),
+ },
}
}
// --------------- proxy for fmt.Formatter ---------------
-type Formatter_fmt struct {
+type P_fmt_Formatter struct {
Object interface{}
Format_ func(_proxy_obj_ interface{}, f fmt.State, c rune)
}
-func (Proxy *Formatter_fmt) Format(f fmt.State, c rune) {
- Proxy.Format_(Proxy.Object, f, c)
+func (P *P_fmt_Formatter) Format(f fmt.State, c rune) {
+ P.Format_(P.Object, f, c)
}
// --------------- proxy for fmt.GoStringer ---------------
-type GoStringer_fmt struct {
+type P_fmt_GoStringer struct {
Object interface{}
GoString_ func(interface{}) string
}
-func (Proxy *GoStringer_fmt) GoString() string {
- return Proxy.GoString_(Proxy.Object)
+func (P *P_fmt_GoStringer) GoString() string {
+ return P.GoString_(P.Object)
}
// --------------- proxy for fmt.ScanState ---------------
-type ScanState_fmt struct {
+type P_fmt_ScanState struct {
Object interface{}
Read_ func(_proxy_obj_ interface{}, buf []byte) (n int, err error)
ReadRune_ func(interface{}) (r rune, size int, err error)
@@ -77,60 +77,60 @@ type ScanState_fmt struct {
UnreadRune_ func(interface{}) error
Width_ func(interface{}) (wid int, ok bool)
}
-func (Proxy *ScanState_fmt) Read(buf []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, buf)
+func (P *P_fmt_ScanState) Read(buf []byte) (n int, err error) {
+ return P.Read_(P.Object, buf)
}
-func (Proxy *ScanState_fmt) ReadRune() (r rune, size int, err error) {
- return Proxy.ReadRune_(Proxy.Object)
+func (P *P_fmt_ScanState) ReadRune() (r rune, size int, err error) {
+ return P.ReadRune_(P.Object)
}
-func (Proxy *ScanState_fmt) SkipSpace() {
- Proxy.SkipSpace_(Proxy.Object)
+func (P *P_fmt_ScanState) SkipSpace() {
+ P.SkipSpace_(P.Object)
}
-func (Proxy *ScanState_fmt) Token(skipSpace bool, f func(rune) bool) (token []byte, err error) {
- return Proxy.Token_(Proxy.Object, skipSpace, f)
+func (P *P_fmt_ScanState) Token(skipSpace bool, f func(rune) bool) (token []byte, err error) {
+ return P.Token_(P.Object, skipSpace, f)
}
-func (Proxy *ScanState_fmt) UnreadRune() error {
- return Proxy.UnreadRune_(Proxy.Object)
+func (P *P_fmt_ScanState) UnreadRune() error {
+ return P.UnreadRune_(P.Object)
}
-func (Proxy *ScanState_fmt) Width() (wid int, ok bool) {
- return Proxy.Width_(Proxy.Object)
+func (P *P_fmt_ScanState) Width() (wid int, ok bool) {
+ return P.Width_(P.Object)
}
// --------------- proxy for fmt.Scanner ---------------
-type Scanner_fmt struct {
+type P_fmt_Scanner struct {
Object interface{}
Scan_ func(_proxy_obj_ interface{}, state fmt.ScanState, verb rune) error
}
-func (Proxy *Scanner_fmt) Scan(state fmt.ScanState, verb rune) error {
- return Proxy.Scan_(Proxy.Object, state, verb)
+func (P *P_fmt_Scanner) Scan(state fmt.ScanState, verb rune) error {
+ return P.Scan_(P.Object, state, verb)
}
// --------------- proxy for fmt.State ---------------
-type State_fmt struct {
+type P_fmt_State struct {
Object interface{}
Flag_ func(_proxy_obj_ interface{}, c int) bool
Precision_ func(interface{}) (prec int, ok bool)
Width_ func(interface{}) (wid int, ok bool)
Write_ func(_proxy_obj_ interface{}, b []byte) (n int, err error)
}
-func (Proxy *State_fmt) Flag(c int) bool {
- return Proxy.Flag_(Proxy.Object, c)
+func (P *P_fmt_State) Flag(c int) bool {
+ return P.Flag_(P.Object, c)
}
-func (Proxy *State_fmt) Precision() (prec int, ok bool) {
- return Proxy.Precision_(Proxy.Object)
+func (P *P_fmt_State) Precision() (prec int, ok bool) {
+ return P.Precision_(P.Object)
}
-func (Proxy *State_fmt) Width() (wid int, ok bool) {
- return Proxy.Width_(Proxy.Object)
+func (P *P_fmt_State) Width() (wid int, ok bool) {
+ return P.Width_(P.Object)
}
-func (Proxy *State_fmt) Write(b []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, b)
+func (P *P_fmt_State) Write(b []byte) (n int, err error) {
+ return P.Write_(P.Object, b)
}
// --------------- proxy for fmt.Stringer ---------------
-type Stringer_fmt struct {
+type P_fmt_Stringer struct {
Object interface{}
String_ func(interface{}) string
}
-func (Proxy *Stringer_fmt) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_fmt_Stringer) String() string {
+ return P.String_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/genimports.gomacro b/vendor/github.com/cosmos72/gomacro/imports/genimports.gomacro
new file mode 100644
index 0000000..3b38f64
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/genimports.gomacro
@@ -0,0 +1,155 @@
+#!/usr/bin/env gomacro
+
+import _b "archive"
+import _b "archive/tar"
+import _b "archive/zip"
+import _b "bufio"
+import _b "builtin"
+import _b "bytes"
+import _b "compress"
+import _b "compress/bzip2"
+import _b "compress/flate"
+import _b "compress/gzip"
+import _b "compress/lzw"
+import _b "compress/zlib"
+import _b "container"
+import _b "container/heap"
+import _b "container/list"
+import _b "container/ring"
+import _b "context"
+import _b "crypto"
+import _b "crypto/aes"
+import _b "crypto/cipher"
+import _b "crypto/des"
+import _b "crypto/dsa"
+import _b "crypto/ecdsa"
+import _b "crypto/elliptic"
+import _b "crypto/hmac"
+import _b "crypto/md5"
+import _b "crypto/rand"
+import _b "crypto/rc4"
+import _b "crypto/rsa"
+import _b "crypto/sha1"
+import _b "crypto/sha256"
+import _b "crypto/sha512"
+import _b "crypto/subtle"
+import _b "crypto/tls"
+import _b "crypto/x509"
+import _b "crypto/x509/pkix"
+import _b "database"
+import _b "database/sql"
+import _b "database/sql/driver"
+import _b "debug"
+import _b "debug/dwarf"
+import _b "debug/elf"
+import _b "debug/gosym"
+import _b "debug/macho"
+import _b "debug/pe"
+import _b "debug/plan9obj"
+import _b "encoding"
+import _b "encoding/ascii85"
+import _b "encoding/asn1"
+import _b "encoding/base32"
+import _b "encoding/base64"
+import _b "encoding/binary"
+import _b "encoding/csv"
+import _b "encoding/gob"
+import _b "encoding/hex"
+import _b "encoding/json"
+import _b "encoding/pem"
+import _b "encoding/xml"
+import _b "errors"
+import _b "expvar"
+import _b "flag"
+import _b "fmt"
+import _b "go"
+import _b "go/ast"
+import _b "go/build"
+import _b "go/constant"
+import _b "go/doc"
+import _b "go/format"
+import _b "go/importer"
+import _b "go/parser"
+import _b "go/printer"
+import _b "go/scanner"
+import _b "go/token"
+import _b "go/types"
+import _b "hash"
+import _b "hash/adler32"
+import _b "hash/crc32"
+import _b "hash/crc64"
+import _b "hash/fnv"
+import _b "html"
+import _b "html/template"
+import _b "image"
+import _b "image/color"
+import _b "image/color/palette"
+import _b "image/draw"
+import _b "image/gif"
+import _b "image/jpeg"
+import _b "image/png"
+import _b "index"
+import _b "index/suffixarray"
+import _b "io"
+import _b "io/ioutil"
+import _b "log"
+import _b "log/syslog"
+import _b "math"
+import _b "math/big"
+import _b "math/bits"
+import _b "math/cmplx"
+import _b "math/rand"
+import _b "mime"
+import _b "mime/multipart"
+import _b "mime/quotedprintable"
+import _b "net"
+import _b "net/http"
+import _b "net/http/cgi"
+import _b "net/http/cookiejar"
+import _b "net/http/fcgi"
+import _b "net/http/httptest"
+import _b "net/http/httptrace"
+import _b "net/http/httputil"
+import _b "net/http/pprof"
+import _b "net/mail"
+import _b "net/rpc"
+import _b "net/rpc/jsonrpc"
+import _b "net/smtp"
+import _b "net/textproto"
+import _b "net/url"
+import _b "os"
+import _b "os/exec"
+import _b "os/signal"
+import _b "os/user"
+import _b "path"
+import _b "path/filepath"
+import _b "plugin"
+import _b "reflect"
+import _b "regexp"
+import _b "regexp/syntax"
+import _b "runtime"
+import _b "runtime/cgo"
+import _b "runtime/debug"
+import _b "runtime/msan"
+import _b "runtime/pprof"
+import _b "runtime/race"
+import _b "runtime/trace"
+import _b "sort"
+import _b "strconv"
+import _b "strings"
+import _b "sync"
+import _b "sync/atomic"
+import _b "syscall"
+import _b "testing"
+import _b "testing/iotest"
+import _b "testing/quick"
+import _b "text"
+import _b "text/scanner"
+import _b "text/tabwriter"
+import _b "text/template"
+import _b "text/template/parse"
+import _b "time"
+import _b "unicode"
+import _b "unicode/utf16"
+import _b "unicode/utf8"
+import _b "unsafe"
diff --git a/vendor/github.com/cosmos72/gomacro/imports/genimports.sh b/vendor/github.com/cosmos72/gomacro/imports/genimports.sh
new file mode 100644
index 0000000..98c0d74
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/genimports.sh
@@ -0,0 +1,13 @@
+exec > genimports.gomacro
+
+echo "#!/usr/bin/env gomacro"
+echo
+
+find /usr/local/go/src -type d | \
+ sed -e 's,/usr/local/go/src/,,' -e 's,/usr/local/go/src,,' | \
+ grep "[a-z]" | grep -v 'cmd\|internal\|testdata\|vendor' | \
+ sort |
+while read i; do
+ echo "import _b \"$i\""
+done
+
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_ast.go b/vendor/github.com/cosmos72/gomacro/imports/go_ast.go
index 73efd04..2f0eb3e 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_ast.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_ast.go
@@ -43,7 +43,7 @@ func init() {
"Typ": ValueOf(ast.Typ),
"Var": ValueOf(ast.Var),
"Walk": ValueOf(ast.Walk),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ArrayType": TypeOf((*ast.ArrayType)(nil)).Elem(),
"AssignStmt": TypeOf((*ast.AssignStmt)(nil)).Elem(),
"BadDecl": TypeOf((*ast.BadDecl)(nil)).Elem(),
@@ -114,31 +114,31 @@ func init() {
"UnaryExpr": TypeOf((*ast.UnaryExpr)(nil)).Elem(),
"ValueSpec": TypeOf((*ast.ValueSpec)(nil)).Elem(),
"Visitor": TypeOf((*ast.Visitor)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Node": TypeOf((*Node_go_ast)(nil)).Elem(),
- "Visitor": TypeOf((*Visitor_go_ast)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Node": TypeOf((*P_go_ast_Node)(nil)).Elem(),
+ "Visitor": TypeOf((*P_go_ast_Visitor)(nil)).Elem(),
+ },
}
}
// --------------- proxy for go/ast.Node ---------------
-type Node_go_ast struct {
+type P_go_ast_Node struct {
Object interface{}
End_ func(interface{}) token.Pos
Pos_ func(interface{}) token.Pos
}
-func (Proxy *Node_go_ast) End() token.Pos {
- return Proxy.End_(Proxy.Object)
+func (P *P_go_ast_Node) End() token.Pos {
+ return P.End_(P.Object)
}
-func (Proxy *Node_go_ast) Pos() token.Pos {
- return Proxy.Pos_(Proxy.Object)
+func (P *P_go_ast_Node) Pos() token.Pos {
+ return P.Pos_(P.Object)
}
// --------------- proxy for go/ast.Visitor ---------------
-type Visitor_go_ast struct {
+type P_go_ast_Visitor struct {
Object interface{}
Visit_ func(_proxy_obj_ interface{}, node ast.Node) (w ast.Visitor)
}
-func (Proxy *Visitor_go_ast) Visit(node ast.Node) (w ast.Visitor) {
- return Proxy.Visit_(Proxy.Object, node)
+func (P *P_go_ast_Visitor) Visit(node ast.Node) (w ast.Visitor) {
+ return P.Visit_(P.Object, node)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_build.go b/vendor/github.com/cosmos72/gomacro/imports/go_build.go
index 031be9c..5f7a590 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_build.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_build.go
@@ -22,12 +22,12 @@ func init() {
"ImportDir": ValueOf(build.ImportDir),
"IsLocalImport": ValueOf(build.IsLocalImport),
"ToolDir": ValueOf(&build.ToolDir).Elem(),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Context": TypeOf((*build.Context)(nil)).Elem(),
"ImportMode": TypeOf((*build.ImportMode)(nil)).Elem(),
"MultiplePackageError": TypeOf((*build.MultiplePackageError)(nil)).Elem(),
"NoGoError": TypeOf((*build.NoGoError)(nil)).Elem(),
"Package": TypeOf((*build.Package)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_constant.go b/vendor/github.com/cosmos72/gomacro/imports/go_constant.go
index f2bf9a6..f47764f 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_constant.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_constant.go
@@ -47,9 +47,9 @@ func init() {
"Uint64Val": ValueOf(constant.Uint64Val),
"UnaryOp": ValueOf(constant.UnaryOp),
"Unknown": ValueOf(constant.Unknown),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Kind": TypeOf((*constant.Kind)(nil)).Elem(),
"Value": TypeOf((*constant.Value)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_doc.go b/vendor/github.com/cosmos72/gomacro/imports/go_doc.go
index 6536109..b75f839 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_doc.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_doc.go
@@ -21,7 +21,7 @@ func init() {
"Synopsis": ValueOf(doc.Synopsis),
"ToHTML": ValueOf(doc.ToHTML),
"ToText": ValueOf(doc.ToText),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Example": TypeOf((*doc.Example)(nil)).Elem(),
"Filter": TypeOf((*doc.Filter)(nil)).Elem(),
"Func": TypeOf((*doc.Func)(nil)).Elem(),
@@ -30,6 +30,6 @@ func init() {
"Package": TypeOf((*doc.Package)(nil)).Elem(),
"Type": TypeOf((*doc.Type)(nil)).Elem(),
"Value": TypeOf((*doc.Value)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_format.go b/vendor/github.com/cosmos72/gomacro/imports/go_format.go
index ca49068..8469355 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_format.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_format.go
@@ -14,6 +14,6 @@ func init() {
Binds: map[string]Value{
"Node": ValueOf(format.Node),
"Source": ValueOf(format.Source),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_importer.go b/vendor/github.com/cosmos72/gomacro/imports/go_importer.go
index 58b7d16..47c2e30 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_importer.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_importer.go
@@ -14,8 +14,8 @@ func init() {
Binds: map[string]Value{
"Default": ValueOf(importer.Default),
"For": ValueOf(importer.For),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Lookup": TypeOf((*importer.Lookup)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_parser.go b/vendor/github.com/cosmos72/gomacro/imports/go_parser.go
index 5dcd9ef..97c3cba 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_parser.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_parser.go
@@ -23,8 +23,8 @@ func init() {
"ParseFile": ValueOf(parser.ParseFile),
"SpuriousErrors": ValueOf(parser.SpuriousErrors),
"Trace": ValueOf(parser.Trace),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Mode": TypeOf((*parser.Mode)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_printer.go b/vendor/github.com/cosmos72/gomacro/imports/go_printer.go
index 514ee41..8c4cfd0 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_printer.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_printer.go
@@ -17,10 +17,10 @@ func init() {
"SourcePos": ValueOf(printer.SourcePos),
"TabIndent": ValueOf(printer.TabIndent),
"UseSpaces": ValueOf(printer.UseSpaces),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CommentedNode": TypeOf((*printer.CommentedNode)(nil)).Elem(),
"Config": TypeOf((*printer.Config)(nil)).Elem(),
"Mode": TypeOf((*printer.Mode)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_scanner.go b/vendor/github.com/cosmos72/gomacro/imports/go_scanner.go
index 102085a..0c2fe57 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_scanner.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_scanner.go
@@ -14,12 +14,12 @@ func init() {
Binds: map[string]Value{
"PrintError": ValueOf(scanner.PrintError),
"ScanComments": ValueOf(scanner.ScanComments),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Error": TypeOf((*scanner.Error)(nil)).Elem(),
"ErrorHandler": TypeOf((*scanner.ErrorHandler)(nil)).Elem(),
"ErrorList": TypeOf((*scanner.ErrorList)(nil)).Elem(),
"Mode": TypeOf((*scanner.Mode)(nil)).Elem(),
"Scanner": TypeOf((*scanner.Scanner)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_token.go b/vendor/github.com/cosmos72/gomacro/imports/go_token.go
index b91e4d7..d888bbd 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_token.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_token.go
@@ -99,16 +99,16 @@ func init() {
"VAR": ValueOf(token.VAR),
"XOR": ValueOf(token.XOR),
"XOR_ASSIGN": ValueOf(token.XOR_ASSIGN),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"File": TypeOf((*token.File)(nil)).Elem(),
"FileSet": TypeOf((*token.FileSet)(nil)).Elem(),
"Pos": TypeOf((*token.Pos)(nil)).Elem(),
"Position": TypeOf((*token.Position)(nil)).Elem(),
"Token": TypeOf((*token.Token)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"HighestPrec": "int:7",
"LowestPrec": "int:0",
"UnaryPrec": "int:6",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/go_types.go b/vendor/github.com/cosmos72/gomacro/imports/go_types.go
index f5c9e8b..7dc1591 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/go_types.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/go_types.go
@@ -81,6 +81,7 @@ func init() {
"SelectionString": ValueOf(types.SelectionString),
"SendOnly": ValueOf(types.SendOnly),
"SendRecv": ValueOf(types.SendRecv),
+ "SizesFor": ValueOf(types.SizesFor),
"String": ValueOf(types.String),
"Typ": ValueOf(&types.Typ).Elem(),
"TypeString": ValueOf(types.TypeString),
@@ -103,7 +104,7 @@ func init() {
"WriteExpr": ValueOf(types.WriteExpr),
"WriteSignature": ValueOf(types.WriteSignature),
"WriteType": ValueOf(types.WriteType),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Array": TypeOf((*types.Array)(nil)).Elem(),
"Basic": TypeOf((*types.Basic)(nil)).Elem(),
"BasicInfo": TypeOf((*types.BasicInfo)(nil)).Elem(),
@@ -145,12 +146,12 @@ func init() {
"TypeAndValue": TypeOf((*types.TypeAndValue)(nil)).Elem(),
"TypeName": TypeOf((*types.TypeName)(nil)).Elem(),
"Var": TypeOf((*types.Var)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Importer": TypeOf((*Importer_go_types)(nil)).Elem(),
- "ImporterFrom": TypeOf((*ImporterFrom_go_types)(nil)).Elem(),
- "Sizes": TypeOf((*Sizes_go_types)(nil)).Elem(),
- "Type": TypeOf((*Type_go_types)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Proxies: map[string]Type{
+ "Importer": TypeOf((*P_go_types_Importer)(nil)).Elem(),
+ "ImporterFrom": TypeOf((*P_go_types_ImporterFrom)(nil)).Elem(),
+ "Sizes": TypeOf((*P_go_types_Sizes)(nil)).Elem(),
+ "Type": TypeOf((*P_go_types_Type)(nil)).Elem(),
+ }, Wrappers: map[string][]string{
"Builtin": []string{"Exported","Id","Name","Parent","Pkg","Pos","Type",},
"Checker": []string{"ObjectOf","TypeOf",},
"Const": []string{"Exported","Id","Name","Parent","Pkg","Pos","Type",},
@@ -160,58 +161,58 @@ func init() {
"PkgName": []string{"Exported","Id","Name","Parent","Pkg","Pos","Type",},
"TypeName": []string{"Exported","Id","Name","Parent","Pkg","Pos","Type",},
"Var": []string{"Exported","Id","Name","Parent","Pkg","Pos","Type",},
- },
+ },
}
}
// --------------- proxy for go/types.Importer ---------------
-type Importer_go_types struct {
+type P_go_types_Importer struct {
Object interface{}
Import_ func(_proxy_obj_ interface{}, path string) (*types.Package, error)
}
-func (Proxy *Importer_go_types) Import(path string) (*types.Package, error) {
- return Proxy.Import_(Proxy.Object, path)
+func (P *P_go_types_Importer) Import(path string) (*types.Package, error) {
+ return P.Import_(P.Object, path)
}
// --------------- proxy for go/types.ImporterFrom ---------------
-type ImporterFrom_go_types struct {
+type P_go_types_ImporterFrom struct {
Object interface{}
Import_ func(_proxy_obj_ interface{}, path string) (*types.Package, error)
- ImportFrom_ func(_proxy_obj_ interface{}, path string, srcDir string, mode types.ImportMode) (*types.Package, error)
+ ImportFrom_ func(_proxy_obj_ interface{}, path string, dir string, mode types.ImportMode) (*types.Package, error)
}
-func (Proxy *ImporterFrom_go_types) Import(path string) (*types.Package, error) {
- return Proxy.Import_(Proxy.Object, path)
+func (P *P_go_types_ImporterFrom) Import(path string) (*types.Package, error) {
+ return P.Import_(P.Object, path)
}
-func (Proxy *ImporterFrom_go_types) ImportFrom(path string, srcDir string, mode types.ImportMode) (*types.Package, error) {
- return Proxy.ImportFrom_(Proxy.Object, path, srcDir, mode)
+func (P *P_go_types_ImporterFrom) ImportFrom(path string, dir string, mode types.ImportMode) (*types.Package, error) {
+ return P.ImportFrom_(P.Object, path, dir, mode)
}
// --------------- proxy for go/types.Sizes ---------------
-type Sizes_go_types struct {
+type P_go_types_Sizes struct {
Object interface{}
Alignof_ func(_proxy_obj_ interface{}, T types.Type) int64
Offsetsof_ func(_proxy_obj_ interface{}, fields []*types.Var) []int64
Sizeof_ func(_proxy_obj_ interface{}, T types.Type) int64
}
-func (Proxy *Sizes_go_types) Alignof(T types.Type) int64 {
- return Proxy.Alignof_(Proxy.Object, T)
+func (P *P_go_types_Sizes) Alignof(T types.Type) int64 {
+ return P.Alignof_(P.Object, T)
}
-func (Proxy *Sizes_go_types) Offsetsof(fields []*types.Var) []int64 {
- return Proxy.Offsetsof_(Proxy.Object, fields)
+func (P *P_go_types_Sizes) Offsetsof(fields []*types.Var) []int64 {
+ return P.Offsetsof_(P.Object, fields)
}
-func (Proxy *Sizes_go_types) Sizeof(T types.Type) int64 {
- return Proxy.Sizeof_(Proxy.Object, T)
+func (P *P_go_types_Sizes) Sizeof(T types.Type) int64 {
+ return P.Sizeof_(P.Object, T)
}
// --------------- proxy for go/types.Type ---------------
-type Type_go_types struct {
+type P_go_types_Type struct {
Object interface{}
String_ func(interface{}) string
Underlying_ func(interface{}) types.Type
}
-func (Proxy *Type_go_types) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_go_types_Type) String() string {
+ return P.String_(P.Object)
}
-func (Proxy *Type_go_types) Underlying() types.Type {
- return Proxy.Underlying_(Proxy.Object)
+func (P *P_go_types_Type) Underlying() types.Type {
+ return P.Underlying_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/hash.go b/vendor/github.com/cosmos72/gomacro/imports/hash.go
index 12cde0b..bc942be 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/hash.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/hash.go
@@ -15,16 +15,16 @@ func init() {
"Hash": TypeOf((*hash.Hash)(nil)).Elem(),
"Hash32": TypeOf((*hash.Hash32)(nil)).Elem(),
"Hash64": TypeOf((*hash.Hash64)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Hash": TypeOf((*Hash_hash)(nil)).Elem(),
- "Hash32": TypeOf((*Hash32_hash)(nil)).Elem(),
- "Hash64": TypeOf((*Hash64_hash)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Hash": TypeOf((*P_hash_Hash)(nil)).Elem(),
+ "Hash32": TypeOf((*P_hash_Hash32)(nil)).Elem(),
+ "Hash64": TypeOf((*P_hash_Hash64)(nil)).Elem(),
+ },
}
}
// --------------- proxy for hash.Hash ---------------
-type Hash_hash struct {
+type P_hash_Hash struct {
Object interface{}
BlockSize_ func(interface{}) int
Reset_ func(interface{})
@@ -32,24 +32,24 @@ type Hash_hash struct {
Sum_ func(_proxy_obj_ interface{}, b []byte) []byte
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *Hash_hash) BlockSize() int {
- return Proxy.BlockSize_(Proxy.Object)
+func (P *P_hash_Hash) BlockSize() int {
+ return P.BlockSize_(P.Object)
}
-func (Proxy *Hash_hash) Reset() {
- Proxy.Reset_(Proxy.Object)
+func (P *P_hash_Hash) Reset() {
+ P.Reset_(P.Object)
}
-func (Proxy *Hash_hash) Size() int {
- return Proxy.Size_(Proxy.Object)
+func (P *P_hash_Hash) Size() int {
+ return P.Size_(P.Object)
}
-func (Proxy *Hash_hash) Sum(b []byte) []byte {
- return Proxy.Sum_(Proxy.Object, b)
+func (P *P_hash_Hash) Sum(b []byte) []byte {
+ return P.Sum_(P.Object, b)
}
-func (Proxy *Hash_hash) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_hash_Hash) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for hash.Hash32 ---------------
-type Hash32_hash struct {
+type P_hash_Hash32 struct {
Object interface{}
BlockSize_ func(interface{}) int
Reset_ func(interface{})
@@ -58,27 +58,27 @@ type Hash32_hash struct {
Sum32_ func(interface{}) uint32
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *Hash32_hash) BlockSize() int {
- return Proxy.BlockSize_(Proxy.Object)
+func (P *P_hash_Hash32) BlockSize() int {
+ return P.BlockSize_(P.Object)
}
-func (Proxy *Hash32_hash) Reset() {
- Proxy.Reset_(Proxy.Object)
+func (P *P_hash_Hash32) Reset() {
+ P.Reset_(P.Object)
}
-func (Proxy *Hash32_hash) Size() int {
- return Proxy.Size_(Proxy.Object)
+func (P *P_hash_Hash32) Size() int {
+ return P.Size_(P.Object)
}
-func (Proxy *Hash32_hash) Sum(b []byte) []byte {
- return Proxy.Sum_(Proxy.Object, b)
+func (P *P_hash_Hash32) Sum(b []byte) []byte {
+ return P.Sum_(P.Object, b)
}
-func (Proxy *Hash32_hash) Sum32() uint32 {
- return Proxy.Sum32_(Proxy.Object)
+func (P *P_hash_Hash32) Sum32() uint32 {
+ return P.Sum32_(P.Object)
}
-func (Proxy *Hash32_hash) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_hash_Hash32) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for hash.Hash64 ---------------
-type Hash64_hash struct {
+type P_hash_Hash64 struct {
Object interface{}
BlockSize_ func(interface{}) int
Reset_ func(interface{})
@@ -87,21 +87,21 @@ type Hash64_hash struct {
Sum64_ func(interface{}) uint64
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *Hash64_hash) BlockSize() int {
- return Proxy.BlockSize_(Proxy.Object)
+func (P *P_hash_Hash64) BlockSize() int {
+ return P.BlockSize_(P.Object)
}
-func (Proxy *Hash64_hash) Reset() {
- Proxy.Reset_(Proxy.Object)
+func (P *P_hash_Hash64) Reset() {
+ P.Reset_(P.Object)
}
-func (Proxy *Hash64_hash) Size() int {
- return Proxy.Size_(Proxy.Object)
+func (P *P_hash_Hash64) Size() int {
+ return P.Size_(P.Object)
}
-func (Proxy *Hash64_hash) Sum(b []byte) []byte {
- return Proxy.Sum_(Proxy.Object, b)
+func (P *P_hash_Hash64) Sum(b []byte) []byte {
+ return P.Sum_(P.Object, b)
}
-func (Proxy *Hash64_hash) Sum64() uint64 {
- return Proxy.Sum64_(Proxy.Object)
+func (P *P_hash_Hash64) Sum64() uint64 {
+ return P.Sum64_(P.Object)
}
-func (Proxy *Hash64_hash) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_hash_Hash64) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/hash_adler32.go b/vendor/github.com/cosmos72/gomacro/imports/hash_adler32.go
index fc615c1..dea1e73 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/hash_adler32.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/hash_adler32.go
@@ -15,8 +15,8 @@ func init() {
"Checksum": ValueOf(adler32.Checksum),
"New": ValueOf(adler32.New),
"Size": ValueOf(adler32.Size),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"Size": "int:4",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/hash_crc32.go b/vendor/github.com/cosmos72/gomacro/imports/hash_crc32.go
index c0e0daa..710878c 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/hash_crc32.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/hash_crc32.go
@@ -23,13 +23,13 @@ func init() {
"NewIEEE": ValueOf(crc32.NewIEEE),
"Size": ValueOf(crc32.Size),
"Update": ValueOf(crc32.Update),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Table": TypeOf((*crc32.Table)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"Castagnoli": "int:2197175160",
"IEEE": "int:3988292384",
"Koopman": "int:3945912366",
"Size": "int:4",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/hash_crc64.go b/vendor/github.com/cosmos72/gomacro/imports/hash_crc64.go
index 84ef28f..5bfa64b 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/hash_crc64.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/hash_crc64.go
@@ -19,12 +19,12 @@ func init() {
"New": ValueOf(crc64.New),
"Size": ValueOf(crc64.Size),
"Update": ValueOf(crc64.Update),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Table": TypeOf((*crc64.Table)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"ECMA": "int:14514072000185962306",
"ISO": "int:15564440312192434176",
"Size": "int:8",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/hash_fnv.go b/vendor/github.com/cosmos72/gomacro/imports/hash_fnv.go
index 198f0cc..6ee6aea 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/hash_fnv.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/hash_fnv.go
@@ -12,10 +12,12 @@ import (
func init() {
Packages["hash/fnv"] = Package{
Binds: map[string]Value{
+ "New128": ValueOf(fnv.New128),
+ "New128a": ValueOf(fnv.New128a),
"New32": ValueOf(fnv.New32),
"New32a": ValueOf(fnv.New32a),
"New64": ValueOf(fnv.New64),
"New64a": ValueOf(fnv.New64a),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/html.go b/vendor/github.com/cosmos72/gomacro/imports/html.go
index 8806c48..3b29e53 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/html.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/html.go
@@ -14,6 +14,6 @@ func init() {
Binds: map[string]Value{
"EscapeString": ValueOf(html.EscapeString),
"UnescapeString": ValueOf(html.UnescapeString),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/html_template.go b/vendor/github.com/cosmos72/gomacro/imports/html_template.go
index 65a2bff..6b9e04e 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/html_template.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/html_template.go
@@ -20,6 +20,7 @@ func init() {
"ErrOutputContext": ValueOf(template.ErrOutputContext),
"ErrPartialCharset": ValueOf(template.ErrPartialCharset),
"ErrPartialEscape": ValueOf(template.ErrPartialEscape),
+ "ErrPredefinedEscaper": ValueOf(template.ErrPredefinedEscaper),
"ErrRangeLoopReentry": ValueOf(template.ErrRangeLoopReentry),
"ErrSlashAmbig": ValueOf(template.ErrSlashAmbig),
"HTMLEscape": ValueOf(template.HTMLEscape),
@@ -35,7 +36,7 @@ func init() {
"ParseFiles": ValueOf(template.ParseFiles),
"ParseGlob": ValueOf(template.ParseGlob),
"URLQueryEscaper": ValueOf(template.URLQueryEscaper),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CSS": TypeOf((*template.CSS)(nil)).Elem(),
"Error": TypeOf((*template.Error)(nil)).Elem(),
"ErrorCode": TypeOf((*template.ErrorCode)(nil)).Elem(),
@@ -46,6 +47,6 @@ func init() {
"JSStr": TypeOf((*template.JSStr)(nil)).Elem(),
"Template": TypeOf((*template.Template)(nil)).Elem(),
"URL": TypeOf((*template.URL)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/image.go b/vendor/github.com/cosmos72/gomacro/imports/image.go
index 9651536..f43a197 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/image.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/image.go
@@ -44,7 +44,7 @@ func init() {
"YCbCrSubsampleRatio444": ValueOf(image.YCbCrSubsampleRatio444),
"ZP": ValueOf(&image.ZP).Elem(),
"ZR": ValueOf(&image.ZR).Elem(),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Alpha": TypeOf((*image.Alpha)(nil)).Elem(),
"Alpha16": TypeOf((*image.Alpha16)(nil)).Elem(),
"CMYK": TypeOf((*image.CMYK)(nil)).Elem(),
@@ -64,49 +64,49 @@ func init() {
"Uniform": TypeOf((*image.Uniform)(nil)).Elem(),
"YCbCr": TypeOf((*image.YCbCr)(nil)).Elem(),
"YCbCrSubsampleRatio": TypeOf((*image.YCbCrSubsampleRatio)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Image": TypeOf((*Image_image)(nil)).Elem(),
- "PalettedImage": TypeOf((*PalettedImage_image)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Proxies: map[string]Type{
+ "Image": TypeOf((*P_image_Image)(nil)).Elem(),
+ "PalettedImage": TypeOf((*P_image_PalettedImage)(nil)).Elem(),
+ }, Wrappers: map[string][]string{
"NYCbCrA": []string{"Bounds","COffset","YCbCrAt","YOffset",},
- },
+ },
}
}
// --------------- proxy for image.Image ---------------
-type Image_image struct {
+type P_image_Image struct {
Object interface{}
At_ func(_proxy_obj_ interface{}, x int, y int) color.Color
Bounds_ func(interface{}) image.Rectangle
ColorModel_ func(interface{}) color.Model
}
-func (Proxy *Image_image) At(x int, y int) color.Color {
- return Proxy.At_(Proxy.Object, x, y)
+func (P *P_image_Image) At(x int, y int) color.Color {
+ return P.At_(P.Object, x, y)
}
-func (Proxy *Image_image) Bounds() image.Rectangle {
- return Proxy.Bounds_(Proxy.Object)
+func (P *P_image_Image) Bounds() image.Rectangle {
+ return P.Bounds_(P.Object)
}
-func (Proxy *Image_image) ColorModel() color.Model {
- return Proxy.ColorModel_(Proxy.Object)
+func (P *P_image_Image) ColorModel() color.Model {
+ return P.ColorModel_(P.Object)
}
// --------------- proxy for image.PalettedImage ---------------
-type PalettedImage_image struct {
+type P_image_PalettedImage struct {
Object interface{}
At_ func(_proxy_obj_ interface{}, x int, y int) color.Color
Bounds_ func(interface{}) image.Rectangle
ColorIndexAt_ func(_proxy_obj_ interface{}, x int, y int) uint8
ColorModel_ func(interface{}) color.Model
}
-func (Proxy *PalettedImage_image) At(x int, y int) color.Color {
- return Proxy.At_(Proxy.Object, x, y)
+func (P *P_image_PalettedImage) At(x int, y int) color.Color {
+ return P.At_(P.Object, x, y)
}
-func (Proxy *PalettedImage_image) Bounds() image.Rectangle {
- return Proxy.Bounds_(Proxy.Object)
+func (P *P_image_PalettedImage) Bounds() image.Rectangle {
+ return P.Bounds_(P.Object)
}
-func (Proxy *PalettedImage_image) ColorIndexAt(x int, y int) uint8 {
- return Proxy.ColorIndexAt_(Proxy.Object, x, y)
+func (P *P_image_PalettedImage) ColorIndexAt(x int, y int) uint8 {
+ return P.ColorIndexAt_(P.Object, x, y)
}
-func (Proxy *PalettedImage_image) ColorModel() color.Model {
- return Proxy.ColorModel_(Proxy.Object)
+func (P *P_image_PalettedImage) ColorModel() color.Model {
+ return P.ColorModel_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/image_color.go b/vendor/github.com/cosmos72/gomacro/imports/image_color.go
index 64820b0..c846b95 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/image_color.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/image_color.go
@@ -32,7 +32,7 @@ func init() {
"White": ValueOf(&color.White).Elem(),
"YCbCrModel": ValueOf(&color.YCbCrModel).Elem(),
"YCbCrToRGB": ValueOf(color.YCbCrToRGB),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Alpha": TypeOf((*color.Alpha)(nil)).Elem(),
"Alpha16": TypeOf((*color.Alpha16)(nil)).Elem(),
"CMYK": TypeOf((*color.CMYK)(nil)).Elem(),
@@ -47,27 +47,27 @@ func init() {
"RGBA": TypeOf((*color.RGBA)(nil)).Elem(),
"RGBA64": TypeOf((*color.RGBA64)(nil)).Elem(),
"YCbCr": TypeOf((*color.YCbCr)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Color": TypeOf((*Color_image_color)(nil)).Elem(),
- "Model": TypeOf((*Model_image_color)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Color": TypeOf((*P_image_color_Color)(nil)).Elem(),
+ "Model": TypeOf((*P_image_color_Model)(nil)).Elem(),
+ },
}
}
// --------------- proxy for image/color.Color ---------------
-type Color_image_color struct {
+type P_image_color_Color struct {
Object interface{}
RGBA_ func(interface{}) (r uint32, g uint32, b uint32, a uint32)
}
-func (Proxy *Color_image_color) RGBA() (r uint32, g uint32, b uint32, a uint32) {
- return Proxy.RGBA_(Proxy.Object)
+func (P *P_image_color_Color) RGBA() (r uint32, g uint32, b uint32, a uint32) {
+ return P.RGBA_(P.Object)
}
// --------------- proxy for image/color.Model ---------------
-type Model_image_color struct {
+type P_image_color_Model struct {
Object interface{}
Convert_ func(_proxy_obj_ interface{}, c color.Color) color.Color
}
-func (Proxy *Model_image_color) Convert(c color.Color) color.Color {
- return Proxy.Convert_(Proxy.Object, c)
+func (P *P_image_color_Model) Convert(c color.Color) color.Color {
+ return P.Convert_(P.Object, c)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/image_color_palette.go b/vendor/github.com/cosmos72/gomacro/imports/image_color_palette.go
index 2e1a749..47e765c 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/image_color_palette.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/image_color_palette.go
@@ -14,6 +14,6 @@ func init() {
Binds: map[string]Value{
"Plan9": ValueOf(&palette.Plan9).Elem(),
"WebSafe": ValueOf(&palette.WebSafe).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/image_draw.go b/vendor/github.com/cosmos72/gomacro/imports/image_draw.go
index ff0b71d..bc57e65 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/image_draw.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/image_draw.go
@@ -19,54 +19,54 @@ func init() {
"FloydSteinberg": ValueOf(&draw.FloydSteinberg).Elem(),
"Over": ValueOf(draw.Over),
"Src": ValueOf(draw.Src),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Drawer": TypeOf((*draw.Drawer)(nil)).Elem(),
"Image": TypeOf((*draw.Image)(nil)).Elem(),
"Op": TypeOf((*draw.Op)(nil)).Elem(),
"Quantizer": TypeOf((*draw.Quantizer)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Drawer": TypeOf((*Drawer_image_draw)(nil)).Elem(),
- "Image": TypeOf((*Image_image_draw)(nil)).Elem(),
- "Quantizer": TypeOf((*Quantizer_image_draw)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Drawer": TypeOf((*P_image_draw_Drawer)(nil)).Elem(),
+ "Image": TypeOf((*P_image_draw_Image)(nil)).Elem(),
+ "Quantizer": TypeOf((*P_image_draw_Quantizer)(nil)).Elem(),
+ },
}
}
// --------------- proxy for image/draw.Drawer ---------------
-type Drawer_image_draw struct {
+type P_image_draw_Drawer struct {
Object interface{}
Draw_ func(_proxy_obj_ interface{}, dst draw.Image, r image.Rectangle, src image.Image, sp image.Point)
}
-func (Proxy *Drawer_image_draw) Draw(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point) {
- Proxy.Draw_(Proxy.Object, dst, r, src, sp)
+func (P *P_image_draw_Drawer) Draw(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point) {
+ P.Draw_(P.Object, dst, r, src, sp)
}
// --------------- proxy for image/draw.Image ---------------
-type Image_image_draw struct {
+type P_image_draw_Image struct {
Object interface{}
At_ func(_proxy_obj_ interface{}, x int, y int) color.Color
Bounds_ func(interface{}) image.Rectangle
ColorModel_ func(interface{}) color.Model
Set_ func(_proxy_obj_ interface{}, x int, y int, c color.Color)
}
-func (Proxy *Image_image_draw) At(x int, y int) color.Color {
- return Proxy.At_(Proxy.Object, x, y)
+func (P *P_image_draw_Image) At(x int, y int) color.Color {
+ return P.At_(P.Object, x, y)
}
-func (Proxy *Image_image_draw) Bounds() image.Rectangle {
- return Proxy.Bounds_(Proxy.Object)
+func (P *P_image_draw_Image) Bounds() image.Rectangle {
+ return P.Bounds_(P.Object)
}
-func (Proxy *Image_image_draw) ColorModel() color.Model {
- return Proxy.ColorModel_(Proxy.Object)
+func (P *P_image_draw_Image) ColorModel() color.Model {
+ return P.ColorModel_(P.Object)
}
-func (Proxy *Image_image_draw) Set(x int, y int, c color.Color) {
- Proxy.Set_(Proxy.Object, x, y, c)
+func (P *P_image_draw_Image) Set(x int, y int, c color.Color) {
+ P.Set_(P.Object, x, y, c)
}
// --------------- proxy for image/draw.Quantizer ---------------
-type Quantizer_image_draw struct {
+type P_image_draw_Quantizer struct {
Object interface{}
Quantize_ func(_proxy_obj_ interface{}, p color.Palette, m image.Image) color.Palette
}
-func (Proxy *Quantizer_image_draw) Quantize(p color.Palette, m image.Image) color.Palette {
- return Proxy.Quantize_(Proxy.Object, p, m)
+func (P *P_image_draw_Quantizer) Quantize(p color.Palette, m image.Image) color.Palette {
+ return P.Quantize_(P.Object, p, m)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/image_gif.go b/vendor/github.com/cosmos72/gomacro/imports/image_gif.go
index a39aba3..a3a9a05 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/image_gif.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/image_gif.go
@@ -20,13 +20,13 @@ func init() {
"DisposalPrevious": ValueOf(gif.DisposalPrevious),
"Encode": ValueOf(gif.Encode),
"EncodeAll": ValueOf(gif.EncodeAll),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"GIF": TypeOf((*gif.GIF)(nil)).Elem(),
"Options": TypeOf((*gif.Options)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"DisposalBackground": "int:2",
"DisposalNone": "int:1",
"DisposalPrevious": "int:3",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/image_jpeg.go b/vendor/github.com/cosmos72/gomacro/imports/image_jpeg.go
index e7f5ed5..446a588 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/image_jpeg.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/image_jpeg.go
@@ -16,28 +16,28 @@ func init() {
"DecodeConfig": ValueOf(jpeg.DecodeConfig),
"DefaultQuality": ValueOf(jpeg.DefaultQuality),
"Encode": ValueOf(jpeg.Encode),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"FormatError": TypeOf((*jpeg.FormatError)(nil)).Elem(),
"Options": TypeOf((*jpeg.Options)(nil)).Elem(),
"Reader": TypeOf((*jpeg.Reader)(nil)).Elem(),
"UnsupportedError": TypeOf((*jpeg.UnsupportedError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Reader": TypeOf((*Reader_image_jpeg)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Reader": TypeOf((*P_image_jpeg_Reader)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"DefaultQuality": "int:75",
- },
+ },
}
}
// --------------- proxy for image/jpeg.Reader ---------------
-type Reader_image_jpeg struct {
+type P_image_jpeg_Reader struct {
Object interface{}
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
ReadByte_ func(interface{}) (byte, error)
}
-func (Proxy *Reader_image_jpeg) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_image_jpeg_Reader) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *Reader_image_jpeg) ReadByte() (byte, error) {
- return Proxy.ReadByte_(Proxy.Object)
+func (P *P_image_jpeg_Reader) ReadByte() (byte, error) {
+ return P.ReadByte_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/image_png.go b/vendor/github.com/cosmos72/gomacro/imports/image_png.go
index 8781c3a..1951e08 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/image_png.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/image_png.go
@@ -19,11 +19,28 @@ func init() {
"DefaultCompression": ValueOf(png.DefaultCompression),
"Encode": ValueOf(png.Encode),
"NoCompression": ValueOf(png.NoCompression),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CompressionLevel": TypeOf((*png.CompressionLevel)(nil)).Elem(),
"Encoder": TypeOf((*png.Encoder)(nil)).Elem(),
+ "EncoderBuffer": TypeOf((*png.EncoderBuffer)(nil)).Elem(),
+ "EncoderBufferPool": TypeOf((*png.EncoderBufferPool)(nil)).Elem(),
"FormatError": TypeOf((*png.FormatError)(nil)).Elem(),
"UnsupportedError": TypeOf((*png.UnsupportedError)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "EncoderBufferPool": TypeOf((*P_image_png_EncoderBufferPool)(nil)).Elem(),
+ },
}
}
+
+// --------------- proxy for image/png.EncoderBufferPool ---------------
+type P_image_png_EncoderBufferPool struct {
+ Object interface{}
+ Get_ func(interface{}) *png.EncoderBuffer
+ Put_ func(interface{}, *png.EncoderBuffer)
+}
+func (P *P_image_png_EncoderBufferPool) Get() *png.EncoderBuffer {
+ return P.Get_(P.Object)
+}
+func (P *P_image_png_EncoderBufferPool) Put(unnamed0 *png.EncoderBuffer) {
+ P.Put_(P.Object, unnamed0)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/index_suffixarray.go b/vendor/github.com/cosmos72/gomacro/imports/index_suffixarray.go
index d1a801a..2f3aab1 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/index_suffixarray.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/index_suffixarray.go
@@ -13,8 +13,8 @@ func init() {
Packages["index/suffixarray"] = Package{
Binds: map[string]Value{
"New": ValueOf(suffixarray.New),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Index": TypeOf((*suffixarray.Index)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/io.go b/vendor/github.com/cosmos72/gomacro/imports/io.go
index ed7d171..aaecefa 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/io.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/io.go
@@ -33,7 +33,7 @@ func init() {
"SeekStart": ValueOf(io.SeekStart),
"TeeReader": ValueOf(io.TeeReader),
"WriteString": ValueOf(io.WriteString),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ByteReader": TypeOf((*io.ByteReader)(nil)).Elem(),
"ByteScanner": TypeOf((*io.ByteScanner)(nil)).Elem(),
"ByteWriter": TypeOf((*io.ByteWriter)(nil)).Elem(),
@@ -58,255 +58,255 @@ func init() {
"Writer": TypeOf((*io.Writer)(nil)).Elem(),
"WriterAt": TypeOf((*io.WriterAt)(nil)).Elem(),
"WriterTo": TypeOf((*io.WriterTo)(nil)).Elem(),
- },Proxies: map[string]Type{
- "ByteReader": TypeOf((*ByteReader_io)(nil)).Elem(),
- "ByteScanner": TypeOf((*ByteScanner_io)(nil)).Elem(),
- "ByteWriter": TypeOf((*ByteWriter_io)(nil)).Elem(),
- "Closer": TypeOf((*Closer_io)(nil)).Elem(),
- "ReadCloser": TypeOf((*ReadCloser_io)(nil)).Elem(),
- "ReadSeeker": TypeOf((*ReadSeeker_io)(nil)).Elem(),
- "ReadWriteCloser": TypeOf((*ReadWriteCloser_io)(nil)).Elem(),
- "ReadWriteSeeker": TypeOf((*ReadWriteSeeker_io)(nil)).Elem(),
- "ReadWriter": TypeOf((*ReadWriter_io)(nil)).Elem(),
- "Reader": TypeOf((*Reader_io)(nil)).Elem(),
- "ReaderAt": TypeOf((*ReaderAt_io)(nil)).Elem(),
- "ReaderFrom": TypeOf((*ReaderFrom_io)(nil)).Elem(),
- "RuneReader": TypeOf((*RuneReader_io)(nil)).Elem(),
- "RuneScanner": TypeOf((*RuneScanner_io)(nil)).Elem(),
- "Seeker": TypeOf((*Seeker_io)(nil)).Elem(),
- "WriteCloser": TypeOf((*WriteCloser_io)(nil)).Elem(),
- "WriteSeeker": TypeOf((*WriteSeeker_io)(nil)).Elem(),
- "Writer": TypeOf((*Writer_io)(nil)).Elem(),
- "WriterAt": TypeOf((*WriterAt_io)(nil)).Elem(),
- "WriterTo": TypeOf((*WriterTo_io)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "ByteReader": TypeOf((*P_io_ByteReader)(nil)).Elem(),
+ "ByteScanner": TypeOf((*P_io_ByteScanner)(nil)).Elem(),
+ "ByteWriter": TypeOf((*P_io_ByteWriter)(nil)).Elem(),
+ "Closer": TypeOf((*P_io_Closer)(nil)).Elem(),
+ "ReadCloser": TypeOf((*P_io_ReadCloser)(nil)).Elem(),
+ "ReadSeeker": TypeOf((*P_io_ReadSeeker)(nil)).Elem(),
+ "ReadWriteCloser": TypeOf((*P_io_ReadWriteCloser)(nil)).Elem(),
+ "ReadWriteSeeker": TypeOf((*P_io_ReadWriteSeeker)(nil)).Elem(),
+ "ReadWriter": TypeOf((*P_io_ReadWriter)(nil)).Elem(),
+ "Reader": TypeOf((*P_io_Reader)(nil)).Elem(),
+ "ReaderAt": TypeOf((*P_io_ReaderAt)(nil)).Elem(),
+ "ReaderFrom": TypeOf((*P_io_ReaderFrom)(nil)).Elem(),
+ "RuneReader": TypeOf((*P_io_RuneReader)(nil)).Elem(),
+ "RuneScanner": TypeOf((*P_io_RuneScanner)(nil)).Elem(),
+ "Seeker": TypeOf((*P_io_Seeker)(nil)).Elem(),
+ "WriteCloser": TypeOf((*P_io_WriteCloser)(nil)).Elem(),
+ "WriteSeeker": TypeOf((*P_io_WriteSeeker)(nil)).Elem(),
+ "Writer": TypeOf((*P_io_Writer)(nil)).Elem(),
+ "WriterAt": TypeOf((*P_io_WriterAt)(nil)).Elem(),
+ "WriterTo": TypeOf((*P_io_WriterTo)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"SeekCurrent": "int:1",
"SeekEnd": "int:2",
"SeekStart": "int:0",
- },
+ },
}
}
// --------------- proxy for io.ByteReader ---------------
-type ByteReader_io struct {
+type P_io_ByteReader struct {
Object interface{}
ReadByte_ func(interface{}) (byte, error)
}
-func (Proxy *ByteReader_io) ReadByte() (byte, error) {
- return Proxy.ReadByte_(Proxy.Object)
+func (P *P_io_ByteReader) ReadByte() (byte, error) {
+ return P.ReadByte_(P.Object)
}
// --------------- proxy for io.ByteScanner ---------------
-type ByteScanner_io struct {
+type P_io_ByteScanner struct {
Object interface{}
ReadByte_ func(interface{}) (byte, error)
UnreadByte_ func(interface{}) error
}
-func (Proxy *ByteScanner_io) ReadByte() (byte, error) {
- return Proxy.ReadByte_(Proxy.Object)
+func (P *P_io_ByteScanner) ReadByte() (byte, error) {
+ return P.ReadByte_(P.Object)
}
-func (Proxy *ByteScanner_io) UnreadByte() error {
- return Proxy.UnreadByte_(Proxy.Object)
+func (P *P_io_ByteScanner) UnreadByte() error {
+ return P.UnreadByte_(P.Object)
}
// --------------- proxy for io.ByteWriter ---------------
-type ByteWriter_io struct {
+type P_io_ByteWriter struct {
Object interface{}
WriteByte_ func(_proxy_obj_ interface{}, c byte) error
}
-func (Proxy *ByteWriter_io) WriteByte(c byte) error {
- return Proxy.WriteByte_(Proxy.Object, c)
+func (P *P_io_ByteWriter) WriteByte(c byte) error {
+ return P.WriteByte_(P.Object, c)
}
// --------------- proxy for io.Closer ---------------
-type Closer_io struct {
+type P_io_Closer struct {
Object interface{}
Close_ func(interface{}) error
}
-func (Proxy *Closer_io) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_io_Closer) Close() error {
+ return P.Close_(P.Object)
}
// --------------- proxy for io.ReadCloser ---------------
-type ReadCloser_io struct {
+type P_io_ReadCloser struct {
Object interface{}
Close_ func(interface{}) error
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *ReadCloser_io) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_io_ReadCloser) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *ReadCloser_io) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_io_ReadCloser) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
// --------------- proxy for io.ReadSeeker ---------------
-type ReadSeeker_io struct {
+type P_io_ReadSeeker struct {
Object interface{}
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
Seek_ func(_proxy_obj_ interface{}, offset int64, whence int) (int64, error)
}
-func (Proxy *ReadSeeker_io) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_io_ReadSeeker) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *ReadSeeker_io) Seek(offset int64, whence int) (int64, error) {
- return Proxy.Seek_(Proxy.Object, offset, whence)
+func (P *P_io_ReadSeeker) Seek(offset int64, whence int) (int64, error) {
+ return P.Seek_(P.Object, offset, whence)
}
// --------------- proxy for io.ReadWriteCloser ---------------
-type ReadWriteCloser_io struct {
+type P_io_ReadWriteCloser struct {
Object interface{}
Close_ func(interface{}) error
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *ReadWriteCloser_io) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_io_ReadWriteCloser) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *ReadWriteCloser_io) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_io_ReadWriteCloser) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *ReadWriteCloser_io) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_io_ReadWriteCloser) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for io.ReadWriteSeeker ---------------
-type ReadWriteSeeker_io struct {
+type P_io_ReadWriteSeeker struct {
Object interface{}
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
Seek_ func(_proxy_obj_ interface{}, offset int64, whence int) (int64, error)
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *ReadWriteSeeker_io) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_io_ReadWriteSeeker) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *ReadWriteSeeker_io) Seek(offset int64, whence int) (int64, error) {
- return Proxy.Seek_(Proxy.Object, offset, whence)
+func (P *P_io_ReadWriteSeeker) Seek(offset int64, whence int) (int64, error) {
+ return P.Seek_(P.Object, offset, whence)
}
-func (Proxy *ReadWriteSeeker_io) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_io_ReadWriteSeeker) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for io.ReadWriter ---------------
-type ReadWriter_io struct {
+type P_io_ReadWriter struct {
Object interface{}
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *ReadWriter_io) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_io_ReadWriter) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *ReadWriter_io) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_io_ReadWriter) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for io.Reader ---------------
-type Reader_io struct {
+type P_io_Reader struct {
Object interface{}
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *Reader_io) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_io_Reader) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
// --------------- proxy for io.ReaderAt ---------------
-type ReaderAt_io struct {
+type P_io_ReaderAt struct {
Object interface{}
ReadAt_ func(_proxy_obj_ interface{}, p []byte, off int64) (n int, err error)
}
-func (Proxy *ReaderAt_io) ReadAt(p []byte, off int64) (n int, err error) {
- return Proxy.ReadAt_(Proxy.Object, p, off)
+func (P *P_io_ReaderAt) ReadAt(p []byte, off int64) (n int, err error) {
+ return P.ReadAt_(P.Object, p, off)
}
// --------------- proxy for io.ReaderFrom ---------------
-type ReaderFrom_io struct {
+type P_io_ReaderFrom struct {
Object interface{}
ReadFrom_ func(_proxy_obj_ interface{}, r io.Reader) (n int64, err error)
}
-func (Proxy *ReaderFrom_io) ReadFrom(r io.Reader) (n int64, err error) {
- return Proxy.ReadFrom_(Proxy.Object, r)
+func (P *P_io_ReaderFrom) ReadFrom(r io.Reader) (n int64, err error) {
+ return P.ReadFrom_(P.Object, r)
}
// --------------- proxy for io.RuneReader ---------------
-type RuneReader_io struct {
+type P_io_RuneReader struct {
Object interface{}
ReadRune_ func(interface{}) (r rune, size int, err error)
}
-func (Proxy *RuneReader_io) ReadRune() (r rune, size int, err error) {
- return Proxy.ReadRune_(Proxy.Object)
+func (P *P_io_RuneReader) ReadRune() (r rune, size int, err error) {
+ return P.ReadRune_(P.Object)
}
// --------------- proxy for io.RuneScanner ---------------
-type RuneScanner_io struct {
+type P_io_RuneScanner struct {
Object interface{}
ReadRune_ func(interface{}) (r rune, size int, err error)
UnreadRune_ func(interface{}) error
}
-func (Proxy *RuneScanner_io) ReadRune() (r rune, size int, err error) {
- return Proxy.ReadRune_(Proxy.Object)
+func (P *P_io_RuneScanner) ReadRune() (r rune, size int, err error) {
+ return P.ReadRune_(P.Object)
}
-func (Proxy *RuneScanner_io) UnreadRune() error {
- return Proxy.UnreadRune_(Proxy.Object)
+func (P *P_io_RuneScanner) UnreadRune() error {
+ return P.UnreadRune_(P.Object)
}
// --------------- proxy for io.Seeker ---------------
-type Seeker_io struct {
+type P_io_Seeker struct {
Object interface{}
Seek_ func(_proxy_obj_ interface{}, offset int64, whence int) (int64, error)
}
-func (Proxy *Seeker_io) Seek(offset int64, whence int) (int64, error) {
- return Proxy.Seek_(Proxy.Object, offset, whence)
+func (P *P_io_Seeker) Seek(offset int64, whence int) (int64, error) {
+ return P.Seek_(P.Object, offset, whence)
}
// --------------- proxy for io.WriteCloser ---------------
-type WriteCloser_io struct {
+type P_io_WriteCloser struct {
Object interface{}
Close_ func(interface{}) error
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *WriteCloser_io) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_io_WriteCloser) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *WriteCloser_io) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_io_WriteCloser) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for io.WriteSeeker ---------------
-type WriteSeeker_io struct {
+type P_io_WriteSeeker struct {
Object interface{}
Seek_ func(_proxy_obj_ interface{}, offset int64, whence int) (int64, error)
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *WriteSeeker_io) Seek(offset int64, whence int) (int64, error) {
- return Proxy.Seek_(Proxy.Object, offset, whence)
+func (P *P_io_WriteSeeker) Seek(offset int64, whence int) (int64, error) {
+ return P.Seek_(P.Object, offset, whence)
}
-func (Proxy *WriteSeeker_io) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_io_WriteSeeker) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for io.Writer ---------------
-type Writer_io struct {
+type P_io_Writer struct {
Object interface{}
Write_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
}
-func (Proxy *Writer_io) Write(p []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, p)
+func (P *P_io_Writer) Write(p []byte) (n int, err error) {
+ return P.Write_(P.Object, p)
}
// --------------- proxy for io.WriterAt ---------------
-type WriterAt_io struct {
+type P_io_WriterAt struct {
Object interface{}
WriteAt_ func(_proxy_obj_ interface{}, p []byte, off int64) (n int, err error)
}
-func (Proxy *WriterAt_io) WriteAt(p []byte, off int64) (n int, err error) {
- return Proxy.WriteAt_(Proxy.Object, p, off)
+func (P *P_io_WriterAt) WriteAt(p []byte, off int64) (n int, err error) {
+ return P.WriteAt_(P.Object, p, off)
}
// --------------- proxy for io.WriterTo ---------------
-type WriterTo_io struct {
+type P_io_WriterTo struct {
Object interface{}
WriteTo_ func(_proxy_obj_ interface{}, w io.Writer) (n int64, err error)
}
-func (Proxy *WriterTo_io) WriteTo(w io.Writer) (n int64, err error) {
- return Proxy.WriteTo_(Proxy.Object, w)
+func (P *P_io_WriterTo) WriteTo(w io.Writer) (n int64, err error) {
+ return P.WriteTo_(P.Object, w)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/io_ioutil.go b/vendor/github.com/cosmos72/gomacro/imports/io_ioutil.go
index d91a4a1..4d0cafe 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/io_ioutil.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/io_ioutil.go
@@ -20,6 +20,6 @@ func init() {
"TempDir": ValueOf(ioutil.TempDir),
"TempFile": ValueOf(ioutil.TempFile),
"WriteFile": ValueOf(ioutil.WriteFile),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/log.go b/vendor/github.com/cosmos72/gomacro/imports/log.go
index 3c5213e..8cdf45a 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/log.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/log.go
@@ -35,9 +35,9 @@ func init() {
"SetFlags": ValueOf(log.SetFlags),
"SetOutput": ValueOf(log.SetOutput),
"SetPrefix": ValueOf(log.SetPrefix),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Logger": TypeOf((*log.Logger)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"LUTC": "int:32",
"Ldate": "int:1",
"Llongfile": "int:8",
@@ -45,6 +45,6 @@ func init() {
"Lshortfile": "int:16",
"LstdFlags": "int:3",
"Ltime": "int:2",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/math.go b/vendor/github.com/cosmos72/gomacro/imports/math.go
index 1e616dc..826c0a5 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/math.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/math.go
@@ -101,7 +101,7 @@ func init() {
"Y0": ValueOf(math.Y0),
"Y1": ValueOf(math.Y1),
"Yn": ValueOf(math.Yn),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"E": "float:9111550163858012281440901732746538838772262590143654133938674751170893736363860704678356685906435473285900222617098459660313571825500424586151709661124231/3351951982485649274893506249551461531869841455148098344430890360930441007518386744200468574541725856922507964546621512713438470702986642486608412251521024",
"Ln10": "float:7718154667303294525535807123668701784088749544639269844330854713417502399132378792470215254015532173856280403153541607081951593465883977341501885089972609/3351951982485649274893506249551461531869841455148098344430890360930441007518386744200468574541725856922507964546621512713438470702986642486608412251521024",
"Ln2": "float:1161698033016123487673055082581635139703829175621884955134501220495379707050587855317621548207870502811545419056917762934492002063302542007440018497053197/1675975991242824637446753124775730765934920727574049172215445180465220503759193372100234287270862928461253982273310756356719235351493321243304206125760512",
@@ -129,6 +129,6 @@ func init() {
"SqrtE": "float:5526434531889553359100339527602551136535293759178014794854010166956579300433867493319128312730236202227030041787483535082815593803939658073242247126443667/3351951982485649274893506249551461531869841455148098344430890360930441007518386744200468574541725856922507964546621512713438470702986642486608412251521024",
"SqrtPhi": "float:4263748785949384222047394170590505028114438860640840609262555507082501186239921195173529474565705679454046425697050803084649101634749198923578942876946925/3351951982485649274893506249551461531869841455148098344430890360930441007518386744200468574541725856922507964546621512713438470702986642486608412251521024",
"SqrtPi": "float:5941180199407067869909325294831655792192555130773991214446196790352931403459697425080809383647149191660934688457292053536928055420572552259905515759885317/3351951982485649274893506249551461531869841455148098344430890360930441007518386744200468574541725856922507964546621512713438470702986642486608412251521024",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/math_big.go b/vendor/github.com/cosmos72/gomacro/imports/math_big.go
index 0bf0aed..c447cfd 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/math_big.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/math_big.go
@@ -30,7 +30,7 @@ func init() {
"ToNegativeInf": ValueOf(big.ToNegativeInf),
"ToPositiveInf": ValueOf(big.ToPositiveInf),
"ToZero": ValueOf(big.ToZero),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Accuracy": TypeOf((*big.Accuracy)(nil)).Elem(),
"ErrNaN": TypeOf((*big.ErrNaN)(nil)).Elem(),
"Float": TypeOf((*big.Float)(nil)).Elem(),
@@ -38,11 +38,11 @@ func init() {
"Rat": TypeOf((*big.Rat)(nil)).Elem(),
"RoundingMode": TypeOf((*big.RoundingMode)(nil)).Elem(),
"Word": TypeOf((*big.Word)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"MaxBase": "rune:36",
"MaxExp": "int:2147483647",
"MaxPrec": "int:4294967295",
"MinExp": "int:-2147483648",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/math_bits.go b/vendor/github.com/cosmos72/gomacro/imports/math_bits.go
new file mode 100644
index 0000000..e8a1537
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/math_bits.go
@@ -0,0 +1,54 @@
+// this file was generated by gomacro command: import _b "math/bits"
+// DO NOT EDIT! Any change will be lost when the file is re-generated
+
+package imports
+
+import (
+ . "reflect"
+ "math/bits"
+)
+
+// reflection: allow interpreted code to import "math/bits"
+func init() {
+ Packages["math/bits"] = Package{
+ Binds: map[string]Value{
+ "LeadingZeros": ValueOf(bits.LeadingZeros),
+ "LeadingZeros16": ValueOf(bits.LeadingZeros16),
+ "LeadingZeros32": ValueOf(bits.LeadingZeros32),
+ "LeadingZeros64": ValueOf(bits.LeadingZeros64),
+ "LeadingZeros8": ValueOf(bits.LeadingZeros8),
+ "Len": ValueOf(bits.Len),
+ "Len16": ValueOf(bits.Len16),
+ "Len32": ValueOf(bits.Len32),
+ "Len64": ValueOf(bits.Len64),
+ "Len8": ValueOf(bits.Len8),
+ "OnesCount": ValueOf(bits.OnesCount),
+ "OnesCount16": ValueOf(bits.OnesCount16),
+ "OnesCount32": ValueOf(bits.OnesCount32),
+ "OnesCount64": ValueOf(bits.OnesCount64),
+ "OnesCount8": ValueOf(bits.OnesCount8),
+ "Reverse": ValueOf(bits.Reverse),
+ "Reverse16": ValueOf(bits.Reverse16),
+ "Reverse32": ValueOf(bits.Reverse32),
+ "Reverse64": ValueOf(bits.Reverse64),
+ "Reverse8": ValueOf(bits.Reverse8),
+ "ReverseBytes": ValueOf(bits.ReverseBytes),
+ "ReverseBytes16": ValueOf(bits.ReverseBytes16),
+ "ReverseBytes32": ValueOf(bits.ReverseBytes32),
+ "ReverseBytes64": ValueOf(bits.ReverseBytes64),
+ "RotateLeft": ValueOf(bits.RotateLeft),
+ "RotateLeft16": ValueOf(bits.RotateLeft16),
+ "RotateLeft32": ValueOf(bits.RotateLeft32),
+ "RotateLeft64": ValueOf(bits.RotateLeft64),
+ "RotateLeft8": ValueOf(bits.RotateLeft8),
+ "TrailingZeros": ValueOf(bits.TrailingZeros),
+ "TrailingZeros16": ValueOf(bits.TrailingZeros16),
+ "TrailingZeros32": ValueOf(bits.TrailingZeros32),
+ "TrailingZeros64": ValueOf(bits.TrailingZeros64),
+ "TrailingZeros8": ValueOf(bits.TrailingZeros8),
+ "UintSize": ValueOf(bits.UintSize),
+ }, Untypeds: map[string]string{
+ "UintSize": "int:64",
+ },
+ }
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/math_cmplx.go b/vendor/github.com/cosmos72/gomacro/imports/math_cmplx.go
index b24939f..b5e2933 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/math_cmplx.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/math_cmplx.go
@@ -39,6 +39,6 @@ func init() {
"Sqrt": ValueOf(cmplx.Sqrt),
"Tan": ValueOf(cmplx.Tan),
"Tanh": ValueOf(cmplx.Tanh),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/math_rand.go b/vendor/github.com/cosmos72/gomacro/imports/math_rand.go
index 735c33b..097a30b 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/math_rand.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/math_rand.go
@@ -30,44 +30,44 @@ func init() {
"Seed": ValueOf(rand.Seed),
"Uint32": ValueOf(rand.Uint32),
"Uint64": ValueOf(rand.Uint64),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Rand": TypeOf((*rand.Rand)(nil)).Elem(),
"Source": TypeOf((*rand.Source)(nil)).Elem(),
"Source64": TypeOf((*rand.Source64)(nil)).Elem(),
"Zipf": TypeOf((*rand.Zipf)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Source": TypeOf((*Source_math_rand)(nil)).Elem(),
- "Source64": TypeOf((*Source64_math_rand)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Source": TypeOf((*P_math_rand_Source)(nil)).Elem(),
+ "Source64": TypeOf((*P_math_rand_Source64)(nil)).Elem(),
+ },
}
}
// --------------- proxy for math/rand.Source ---------------
-type Source_math_rand struct {
+type P_math_rand_Source struct {
Object interface{}
Int63_ func(interface{}) int64
Seed_ func(_proxy_obj_ interface{}, seed int64)
}
-func (Proxy *Source_math_rand) Int63() int64 {
- return Proxy.Int63_(Proxy.Object)
+func (P *P_math_rand_Source) Int63() int64 {
+ return P.Int63_(P.Object)
}
-func (Proxy *Source_math_rand) Seed(seed int64) {
- Proxy.Seed_(Proxy.Object, seed)
+func (P *P_math_rand_Source) Seed(seed int64) {
+ P.Seed_(P.Object, seed)
}
// --------------- proxy for math/rand.Source64 ---------------
-type Source64_math_rand struct {
+type P_math_rand_Source64 struct {
Object interface{}
Int63_ func(interface{}) int64
Seed_ func(_proxy_obj_ interface{}, seed int64)
Uint64_ func(interface{}) uint64
}
-func (Proxy *Source64_math_rand) Int63() int64 {
- return Proxy.Int63_(Proxy.Object)
+func (P *P_math_rand_Source64) Int63() int64 {
+ return P.Int63_(P.Object)
}
-func (Proxy *Source64_math_rand) Seed(seed int64) {
- Proxy.Seed_(Proxy.Object, seed)
+func (P *P_math_rand_Source64) Seed(seed int64) {
+ P.Seed_(P.Object, seed)
}
-func (Proxy *Source64_math_rand) Uint64() uint64 {
- return Proxy.Uint64_(Proxy.Object)
+func (P *P_math_rand_Source64) Uint64() uint64 {
+ return P.Uint64_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/mime.go b/vendor/github.com/cosmos72/gomacro/imports/mime.go
index 9fb683b..35d7b9e 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/mime.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/mime.go
@@ -14,14 +14,15 @@ func init() {
Binds: map[string]Value{
"AddExtensionType": ValueOf(mime.AddExtensionType),
"BEncoding": ValueOf(mime.BEncoding),
+ "ErrInvalidMediaParameter": ValueOf(&mime.ErrInvalidMediaParameter).Elem(),
"ExtensionsByType": ValueOf(mime.ExtensionsByType),
"FormatMediaType": ValueOf(mime.FormatMediaType),
"ParseMediaType": ValueOf(mime.ParseMediaType),
"QEncoding": ValueOf(mime.QEncoding),
"TypeByExtension": ValueOf(mime.TypeByExtension),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"WordDecoder": TypeOf((*mime.WordDecoder)(nil)).Elem(),
"WordEncoder": TypeOf((*mime.WordEncoder)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/mime_multipart.go b/vendor/github.com/cosmos72/gomacro/imports/mime_multipart.go
index 73bc4da..01daf25 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/mime_multipart.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/mime_multipart.go
@@ -12,38 +12,39 @@ import (
func init() {
Packages["mime/multipart"] = Package{
Binds: map[string]Value{
+ "ErrMessageTooLarge": ValueOf(&multipart.ErrMessageTooLarge).Elem(),
"NewReader": ValueOf(multipart.NewReader),
"NewWriter": ValueOf(multipart.NewWriter),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"File": TypeOf((*multipart.File)(nil)).Elem(),
"FileHeader": TypeOf((*multipart.FileHeader)(nil)).Elem(),
"Form": TypeOf((*multipart.Form)(nil)).Elem(),
"Part": TypeOf((*multipart.Part)(nil)).Elem(),
"Reader": TypeOf((*multipart.Reader)(nil)).Elem(),
"Writer": TypeOf((*multipart.Writer)(nil)).Elem(),
- },Proxies: map[string]Type{
- "File": TypeOf((*File_mime_multipart)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "File": TypeOf((*P_mime_multipart_File)(nil)).Elem(),
+ },
}
}
// --------------- proxy for mime/multipart.File ---------------
-type File_mime_multipart struct {
+type P_mime_multipart_File struct {
Object interface{}
Close_ func(interface{}) error
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
ReadAt_ func(_proxy_obj_ interface{}, p []byte, off int64) (n int, err error)
Seek_ func(_proxy_obj_ interface{}, offset int64, whence int) (int64, error)
}
-func (Proxy *File_mime_multipart) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_mime_multipart_File) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *File_mime_multipart) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_mime_multipart_File) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *File_mime_multipart) ReadAt(p []byte, off int64) (n int, err error) {
- return Proxy.ReadAt_(Proxy.Object, p, off)
+func (P *P_mime_multipart_File) ReadAt(p []byte, off int64) (n int, err error) {
+ return P.ReadAt_(P.Object, p, off)
}
-func (Proxy *File_mime_multipart) Seek(offset int64, whence int) (int64, error) {
- return Proxy.Seek_(Proxy.Object, offset, whence)
+func (P *P_mime_multipart_File) Seek(offset int64, whence int) (int64, error) {
+ return P.Seek_(P.Object, offset, whence)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/mime_quotedprintable.go b/vendor/github.com/cosmos72/gomacro/imports/mime_quotedprintable.go
index 3a46c3b..79e2176 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/mime_quotedprintable.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/mime_quotedprintable.go
@@ -14,9 +14,9 @@ func init() {
Binds: map[string]Value{
"NewReader": ValueOf(quotedprintable.NewReader),
"NewWriter": ValueOf(quotedprintable.NewWriter),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Reader": TypeOf((*quotedprintable.Reader)(nil)).Elem(),
"Writer": TypeOf((*quotedprintable.Writer)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net.go b/vendor/github.com/cosmos72/gomacro/imports/net.go
index 57273fa..4d73249 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net.go
@@ -5,8 +5,8 @@ package imports
import (
. "reflect"
- "net"
"time"
+ "net"
)
// reflection: allow interpreted code to import "net"
@@ -75,7 +75,7 @@ func init() {
"ResolveUDPAddr": ValueOf(net.ResolveUDPAddr),
"ResolveUnixAddr": ValueOf(net.ResolveUnixAddr),
"SplitHostPort": ValueOf(net.SplitHostPort),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Addr": TypeOf((*net.Addr)(nil)).Elem(),
"AddrError": TypeOf((*net.AddrError)(nil)).Elem(),
"Buffers": TypeOf((*net.Buffers)(nil)).Elem(),
@@ -110,39 +110,39 @@ func init() {
"UnixConn": TypeOf((*net.UnixConn)(nil)).Elem(),
"UnixListener": TypeOf((*net.UnixListener)(nil)).Elem(),
"UnknownNetworkError": TypeOf((*net.UnknownNetworkError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Addr": TypeOf((*Addr_net)(nil)).Elem(),
- "Conn": TypeOf((*Conn_net)(nil)).Elem(),
- "Error": TypeOf((*Error_net)(nil)).Elem(),
- "Listener": TypeOf((*Listener_net)(nil)).Elem(),
- "PacketConn": TypeOf((*PacketConn_net)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Addr": TypeOf((*P_net_Addr)(nil)).Elem(),
+ "Conn": TypeOf((*P_net_Conn)(nil)).Elem(),
+ "Error": TypeOf((*P_net_Error)(nil)).Elem(),
+ "Listener": TypeOf((*P_net_Listener)(nil)).Elem(),
+ "PacketConn": TypeOf((*P_net_PacketConn)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"IPv4len": "int:4",
"IPv6len": "int:16",
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"IPConn": []string{"Close","File","LocalAddr","Read","RemoteAddr","SetDeadline","SetReadBuffer","SetReadDeadline","SetWriteBuffer","SetWriteDeadline","Write",},
"TCPConn": []string{"Close","File","LocalAddr","Read","RemoteAddr","SetDeadline","SetReadBuffer","SetReadDeadline","SetWriteBuffer","SetWriteDeadline","Write",},
"UDPConn": []string{"Close","File","LocalAddr","Read","RemoteAddr","SetDeadline","SetReadBuffer","SetReadDeadline","SetWriteBuffer","SetWriteDeadline","Write",},
"UnixConn": []string{"Close","File","LocalAddr","Read","RemoteAddr","SetDeadline","SetReadBuffer","SetReadDeadline","SetWriteBuffer","SetWriteDeadline","Write",},
- },
+ },
}
}
// --------------- proxy for net.Addr ---------------
-type Addr_net struct {
+type P_net_Addr struct {
Object interface{}
Network_ func(interface{}) string
String_ func(interface{}) string
}
-func (Proxy *Addr_net) Network() string {
- return Proxy.Network_(Proxy.Object)
+func (P *P_net_Addr) Network() string {
+ return P.Network_(P.Object)
}
-func (Proxy *Addr_net) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_net_Addr) String() string {
+ return P.String_(P.Object)
}
// --------------- proxy for net.Conn ---------------
-type Conn_net struct {
+type P_net_Conn struct {
Object interface{}
Close_ func(interface{}) error
LocalAddr_ func(interface{}) net.Addr
@@ -153,67 +153,67 @@ type Conn_net struct {
SetWriteDeadline_ func(_proxy_obj_ interface{}, t time.Time) error
Write_ func(_proxy_obj_ interface{}, b []byte) (n int, err error)
}
-func (Proxy *Conn_net) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_net_Conn) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *Conn_net) LocalAddr() net.Addr {
- return Proxy.LocalAddr_(Proxy.Object)
+func (P *P_net_Conn) LocalAddr() net.Addr {
+ return P.LocalAddr_(P.Object)
}
-func (Proxy *Conn_net) Read(b []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, b)
+func (P *P_net_Conn) Read(b []byte) (n int, err error) {
+ return P.Read_(P.Object, b)
}
-func (Proxy *Conn_net) RemoteAddr() net.Addr {
- return Proxy.RemoteAddr_(Proxy.Object)
+func (P *P_net_Conn) RemoteAddr() net.Addr {
+ return P.RemoteAddr_(P.Object)
}
-func (Proxy *Conn_net) SetDeadline(t time.Time) error {
- return Proxy.SetDeadline_(Proxy.Object, t)
+func (P *P_net_Conn) SetDeadline(t time.Time) error {
+ return P.SetDeadline_(P.Object, t)
}
-func (Proxy *Conn_net) SetReadDeadline(t time.Time) error {
- return Proxy.SetReadDeadline_(Proxy.Object, t)
+func (P *P_net_Conn) SetReadDeadline(t time.Time) error {
+ return P.SetReadDeadline_(P.Object, t)
}
-func (Proxy *Conn_net) SetWriteDeadline(t time.Time) error {
- return Proxy.SetWriteDeadline_(Proxy.Object, t)
+func (P *P_net_Conn) SetWriteDeadline(t time.Time) error {
+ return P.SetWriteDeadline_(P.Object, t)
}
-func (Proxy *Conn_net) Write(b []byte) (n int, err error) {
- return Proxy.Write_(Proxy.Object, b)
+func (P *P_net_Conn) Write(b []byte) (n int, err error) {
+ return P.Write_(P.Object, b)
}
// --------------- proxy for net.Error ---------------
-type Error_net struct {
+type P_net_Error struct {
Object interface{}
Error_ func(interface{}) string
Temporary_ func(interface{}) bool
Timeout_ func(interface{}) bool
}
-func (Proxy *Error_net) Error() string {
- return Proxy.Error_(Proxy.Object)
+func (P *P_net_Error) Error() string {
+ return P.Error_(P.Object)
}
-func (Proxy *Error_net) Temporary() bool {
- return Proxy.Temporary_(Proxy.Object)
+func (P *P_net_Error) Temporary() bool {
+ return P.Temporary_(P.Object)
}
-func (Proxy *Error_net) Timeout() bool {
- return Proxy.Timeout_(Proxy.Object)
+func (P *P_net_Error) Timeout() bool {
+ return P.Timeout_(P.Object)
}
// --------------- proxy for net.Listener ---------------
-type Listener_net struct {
+type P_net_Listener struct {
Object interface{}
Accept_ func(interface{}) (net.Conn, error)
Addr_ func(interface{}) net.Addr
Close_ func(interface{}) error
}
-func (Proxy *Listener_net) Accept() (net.Conn, error) {
- return Proxy.Accept_(Proxy.Object)
+func (P *P_net_Listener) Accept() (net.Conn, error) {
+ return P.Accept_(P.Object)
}
-func (Proxy *Listener_net) Addr() net.Addr {
- return Proxy.Addr_(Proxy.Object)
+func (P *P_net_Listener) Addr() net.Addr {
+ return P.Addr_(P.Object)
}
-func (Proxy *Listener_net) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_net_Listener) Close() error {
+ return P.Close_(P.Object)
}
// --------------- proxy for net.PacketConn ---------------
-type PacketConn_net struct {
+type P_net_PacketConn struct {
Object interface{}
Close_ func(interface{}) error
LocalAddr_ func(interface{}) net.Addr
@@ -223,24 +223,24 @@ type PacketConn_net struct {
SetWriteDeadline_ func(_proxy_obj_ interface{}, t time.Time) error
WriteTo_ func(_proxy_obj_ interface{}, b []byte, addr net.Addr) (n int, err error)
}
-func (Proxy *PacketConn_net) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_net_PacketConn) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *PacketConn_net) LocalAddr() net.Addr {
- return Proxy.LocalAddr_(Proxy.Object)
+func (P *P_net_PacketConn) LocalAddr() net.Addr {
+ return P.LocalAddr_(P.Object)
}
-func (Proxy *PacketConn_net) ReadFrom(b []byte) (n int, addr net.Addr, err error) {
- return Proxy.ReadFrom_(Proxy.Object, b)
+func (P *P_net_PacketConn) ReadFrom(b []byte) (n int, addr net.Addr, err error) {
+ return P.ReadFrom_(P.Object, b)
}
-func (Proxy *PacketConn_net) SetDeadline(t time.Time) error {
- return Proxy.SetDeadline_(Proxy.Object, t)
+func (P *P_net_PacketConn) SetDeadline(t time.Time) error {
+ return P.SetDeadline_(P.Object, t)
}
-func (Proxy *PacketConn_net) SetReadDeadline(t time.Time) error {
- return Proxy.SetReadDeadline_(Proxy.Object, t)
+func (P *P_net_PacketConn) SetReadDeadline(t time.Time) error {
+ return P.SetReadDeadline_(P.Object, t)
}
-func (Proxy *PacketConn_net) SetWriteDeadline(t time.Time) error {
- return Proxy.SetWriteDeadline_(Proxy.Object, t)
+func (P *P_net_PacketConn) SetWriteDeadline(t time.Time) error {
+ return P.SetWriteDeadline_(P.Object, t)
}
-func (Proxy *PacketConn_net) WriteTo(b []byte, addr net.Addr) (n int, err error) {
- return Proxy.WriteTo_(Proxy.Object, b, addr)
+func (P *P_net_PacketConn) WriteTo(b []byte, addr net.Addr) (n int, err error) {
+ return P.WriteTo_(P.Object, b, addr)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http.go b/vendor/github.com/cosmos72/gomacro/imports/net_http.go
index 450c1e4..51789b8 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http.go
@@ -82,6 +82,7 @@ func init() {
"Serve": ValueOf(http.Serve),
"ServeContent": ValueOf(http.ServeContent),
"ServeFile": ValueOf(http.ServeFile),
+ "ServeTLS": ValueOf(http.ServeTLS),
"ServerContextKey": ValueOf(&http.ServerContextKey).Elem(),
"SetCookie": ValueOf(http.SetCookie),
"StateActive": ValueOf(http.StateActive),
@@ -153,7 +154,7 @@ func init() {
"TimeFormat": ValueOf(http.TimeFormat),
"TimeoutHandler": ValueOf(http.TimeoutHandler),
"TrailerPrefix": ValueOf(http.TrailerPrefix),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Client": TypeOf((*http.Client)(nil)).Elem(),
"CloseNotifier": TypeOf((*http.CloseNotifier)(nil)).Elem(),
"ConnState": TypeOf((*http.ConnState)(nil)).Elem(),
@@ -177,18 +178,18 @@ func init() {
"ServeMux": TypeOf((*http.ServeMux)(nil)).Elem(),
"Server": TypeOf((*http.Server)(nil)).Elem(),
"Transport": TypeOf((*http.Transport)(nil)).Elem(),
- },Proxies: map[string]Type{
- "CloseNotifier": TypeOf((*CloseNotifier_net_http)(nil)).Elem(),
- "CookieJar": TypeOf((*CookieJar_net_http)(nil)).Elem(),
- "File": TypeOf((*File_net_http)(nil)).Elem(),
- "FileSystem": TypeOf((*FileSystem_net_http)(nil)).Elem(),
- "Flusher": TypeOf((*Flusher_net_http)(nil)).Elem(),
- "Handler": TypeOf((*Handler_net_http)(nil)).Elem(),
- "Hijacker": TypeOf((*Hijacker_net_http)(nil)).Elem(),
- "Pusher": TypeOf((*Pusher_net_http)(nil)).Elem(),
- "ResponseWriter": TypeOf((*ResponseWriter_net_http)(nil)).Elem(),
- "RoundTripper": TypeOf((*RoundTripper_net_http)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "CloseNotifier": TypeOf((*P_net_http_CloseNotifier)(nil)).Elem(),
+ "CookieJar": TypeOf((*P_net_http_CookieJar)(nil)).Elem(),
+ "File": TypeOf((*P_net_http_File)(nil)).Elem(),
+ "FileSystem": TypeOf((*P_net_http_FileSystem)(nil)).Elem(),
+ "Flusher": TypeOf((*P_net_http_Flusher)(nil)).Elem(),
+ "Handler": TypeOf((*P_net_http_Handler)(nil)).Elem(),
+ "Hijacker": TypeOf((*P_net_http_Hijacker)(nil)).Elem(),
+ "Pusher": TypeOf((*P_net_http_Pusher)(nil)).Elem(),
+ "ResponseWriter": TypeOf((*P_net_http_ResponseWriter)(nil)).Elem(),
+ "RoundTripper": TypeOf((*P_net_http_RoundTripper)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"DefaultMaxHeaderBytes": "int:1048576",
"DefaultMaxIdleConnsPerHost": "int:2",
"MethodConnect": "string:CONNECT",
@@ -261,34 +262,34 @@ func init() {
"StatusVariantAlsoNegotiates": "int:506",
"TimeFormat": "string:Mon, 02 Jan 2006 15:04:05 GMT",
"TrailerPrefix": "string:Trailer:",
- },
+ },
}
}
// --------------- proxy for net/http.CloseNotifier ---------------
-type CloseNotifier_net_http struct {
+type P_net_http_CloseNotifier struct {
Object interface{}
CloseNotify_ func(interface{}) <-chan bool
}
-func (Proxy *CloseNotifier_net_http) CloseNotify() <-chan bool {
- return Proxy.CloseNotify_(Proxy.Object)
+func (P *P_net_http_CloseNotifier) CloseNotify() <-chan bool {
+ return P.CloseNotify_(P.Object)
}
// --------------- proxy for net/http.CookieJar ---------------
-type CookieJar_net_http struct {
+type P_net_http_CookieJar struct {
Object interface{}
Cookies_ func(_proxy_obj_ interface{}, u *url.URL) []*http.Cookie
SetCookies_ func(_proxy_obj_ interface{}, u *url.URL, cookies []*http.Cookie)
}
-func (Proxy *CookieJar_net_http) Cookies(u *url.URL) []*http.Cookie {
- return Proxy.Cookies_(Proxy.Object, u)
+func (P *P_net_http_CookieJar) Cookies(u *url.URL) []*http.Cookie {
+ return P.Cookies_(P.Object, u)
}
-func (Proxy *CookieJar_net_http) SetCookies(u *url.URL, cookies []*http.Cookie) {
- Proxy.SetCookies_(Proxy.Object, u, cookies)
+func (P *P_net_http_CookieJar) SetCookies(u *url.URL, cookies []*http.Cookie) {
+ P.SetCookies_(P.Object, u, cookies)
}
// --------------- proxy for net/http.File ---------------
-type File_net_http struct {
+type P_net_http_File struct {
Object interface{}
Close_ func(interface{}) error
Read_ func(_proxy_obj_ interface{}, p []byte) (n int, err error)
@@ -296,89 +297,89 @@ type File_net_http struct {
Seek_ func(_proxy_obj_ interface{}, offset int64, whence int) (int64, error)
Stat_ func(interface{}) (os.FileInfo, error)
}
-func (Proxy *File_net_http) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_net_http_File) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *File_net_http) Read(p []byte) (n int, err error) {
- return Proxy.Read_(Proxy.Object, p)
+func (P *P_net_http_File) Read(p []byte) (n int, err error) {
+ return P.Read_(P.Object, p)
}
-func (Proxy *File_net_http) Readdir(count int) ([]os.FileInfo, error) {
- return Proxy.Readdir_(Proxy.Object, count)
+func (P *P_net_http_File) Readdir(count int) ([]os.FileInfo, error) {
+ return P.Readdir_(P.Object, count)
}
-func (Proxy *File_net_http) Seek(offset int64, whence int) (int64, error) {
- return Proxy.Seek_(Proxy.Object, offset, whence)
+func (P *P_net_http_File) Seek(offset int64, whence int) (int64, error) {
+ return P.Seek_(P.Object, offset, whence)
}
-func (Proxy *File_net_http) Stat() (os.FileInfo, error) {
- return Proxy.Stat_(Proxy.Object)
+func (P *P_net_http_File) Stat() (os.FileInfo, error) {
+ return P.Stat_(P.Object)
}
// --------------- proxy for net/http.FileSystem ---------------
-type FileSystem_net_http struct {
+type P_net_http_FileSystem struct {
Object interface{}
Open_ func(_proxy_obj_ interface{}, name string) (http.File, error)
}
-func (Proxy *FileSystem_net_http) Open(name string) (http.File, error) {
- return Proxy.Open_(Proxy.Object, name)
+func (P *P_net_http_FileSystem) Open(name string) (http.File, error) {
+ return P.Open_(P.Object, name)
}
// --------------- proxy for net/http.Flusher ---------------
-type Flusher_net_http struct {
+type P_net_http_Flusher struct {
Object interface{}
Flush_ func(interface{})
}
-func (Proxy *Flusher_net_http) Flush() {
- Proxy.Flush_(Proxy.Object)
+func (P *P_net_http_Flusher) Flush() {
+ P.Flush_(P.Object)
}
// --------------- proxy for net/http.Handler ---------------
-type Handler_net_http struct {
+type P_net_http_Handler struct {
Object interface{}
ServeHTTP_ func(interface{}, http.ResponseWriter, *http.Request)
}
-func (Proxy *Handler_net_http) ServeHTTP(unnamed0 http.ResponseWriter, unnamed1 *http.Request) {
- Proxy.ServeHTTP_(Proxy.Object, unnamed0, unnamed1)
+func (P *P_net_http_Handler) ServeHTTP(unnamed0 http.ResponseWriter, unnamed1 *http.Request) {
+ P.ServeHTTP_(P.Object, unnamed0, unnamed1)
}
// --------------- proxy for net/http.Hijacker ---------------
-type Hijacker_net_http struct {
+type P_net_http_Hijacker struct {
Object interface{}
Hijack_ func(interface{}) (net.Conn, *bufio.ReadWriter, error)
}
-func (Proxy *Hijacker_net_http) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- return Proxy.Hijack_(Proxy.Object)
+func (P *P_net_http_Hijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return P.Hijack_(P.Object)
}
// --------------- proxy for net/http.Pusher ---------------
-type Pusher_net_http struct {
+type P_net_http_Pusher struct {
Object interface{}
Push_ func(_proxy_obj_ interface{}, target string, opts *http.PushOptions) error
}
-func (Proxy *Pusher_net_http) Push(target string, opts *http.PushOptions) error {
- return Proxy.Push_(Proxy.Object, target, opts)
+func (P *P_net_http_Pusher) Push(target string, opts *http.PushOptions) error {
+ return P.Push_(P.Object, target, opts)
}
// --------------- proxy for net/http.ResponseWriter ---------------
-type ResponseWriter_net_http struct {
+type P_net_http_ResponseWriter struct {
Object interface{}
Header_ func(interface{}) http.Header
Write_ func(interface{}, []byte) (int, error)
WriteHeader_ func(interface{}, int)
}
-func (Proxy *ResponseWriter_net_http) Header() http.Header {
- return Proxy.Header_(Proxy.Object)
+func (P *P_net_http_ResponseWriter) Header() http.Header {
+ return P.Header_(P.Object)
}
-func (Proxy *ResponseWriter_net_http) Write(unnamed0 []byte) (int, error) {
- return Proxy.Write_(Proxy.Object, unnamed0)
+func (P *P_net_http_ResponseWriter) Write(unnamed0 []byte) (int, error) {
+ return P.Write_(P.Object, unnamed0)
}
-func (Proxy *ResponseWriter_net_http) WriteHeader(unnamed0 int) {
- Proxy.WriteHeader_(Proxy.Object, unnamed0)
+func (P *P_net_http_ResponseWriter) WriteHeader(unnamed0 int) {
+ P.WriteHeader_(P.Object, unnamed0)
}
// --------------- proxy for net/http.RoundTripper ---------------
-type RoundTripper_net_http struct {
+type P_net_http_RoundTripper struct {
Object interface{}
RoundTrip_ func(interface{}, *http.Request) (*http.Response, error)
}
-func (Proxy *RoundTripper_net_http) RoundTrip(unnamed0 *http.Request) (*http.Response, error) {
- return Proxy.RoundTrip_(Proxy.Object, unnamed0)
+func (P *P_net_http_RoundTripper) RoundTrip(unnamed0 *http.Request) (*http.Response, error) {
+ return P.RoundTrip_(P.Object, unnamed0)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http_cgi.go b/vendor/github.com/cosmos72/gomacro/imports/net_http_cgi.go
index 038eed2..ab5618a 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http_cgi.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http_cgi.go
@@ -15,8 +15,8 @@ func init() {
"Request": ValueOf(cgi.Request),
"RequestFromMap": ValueOf(cgi.RequestFromMap),
"Serve": ValueOf(cgi.Serve),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Handler": TypeOf((*cgi.Handler)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http_cookiejar.go b/vendor/github.com/cosmos72/gomacro/imports/net_http_cookiejar.go
index c1d5329..09e7dbb 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http_cookiejar.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http_cookiejar.go
@@ -13,25 +13,25 @@ func init() {
Packages["net/http/cookiejar"] = Package{
Binds: map[string]Value{
"New": ValueOf(cookiejar.New),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Jar": TypeOf((*cookiejar.Jar)(nil)).Elem(),
"Options": TypeOf((*cookiejar.Options)(nil)).Elem(),
"PublicSuffixList": TypeOf((*cookiejar.PublicSuffixList)(nil)).Elem(),
- },Proxies: map[string]Type{
- "PublicSuffixList": TypeOf((*PublicSuffixList_net_http_cookiejar)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "PublicSuffixList": TypeOf((*P_net_http_cookiejar_PublicSuffixList)(nil)).Elem(),
+ },
}
}
// --------------- proxy for net/http/cookiejar.PublicSuffixList ---------------
-type PublicSuffixList_net_http_cookiejar struct {
+type P_net_http_cookiejar_PublicSuffixList struct {
Object interface{}
PublicSuffix_ func(_proxy_obj_ interface{}, domain string) string
String_ func(interface{}) string
}
-func (Proxy *PublicSuffixList_net_http_cookiejar) PublicSuffix(domain string) string {
- return Proxy.PublicSuffix_(Proxy.Object, domain)
+func (P *P_net_http_cookiejar_PublicSuffixList) PublicSuffix(domain string) string {
+ return P.PublicSuffix_(P.Object, domain)
}
-func (Proxy *PublicSuffixList_net_http_cookiejar) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_net_http_cookiejar_PublicSuffixList) String() string {
+ return P.String_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http_fcgi.go b/vendor/github.com/cosmos72/gomacro/imports/net_http_fcgi.go
index 0bf78e5..37a7004 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http_fcgi.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http_fcgi.go
@@ -14,7 +14,8 @@ func init() {
Binds: map[string]Value{
"ErrConnClosed": ValueOf(&fcgi.ErrConnClosed).Elem(),
"ErrRequestAborted": ValueOf(&fcgi.ErrRequestAborted).Elem(),
+ "ProcessEnv": ValueOf(fcgi.ProcessEnv),
"Serve": ValueOf(fcgi.Serve),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http_httptest.go b/vendor/github.com/cosmos72/gomacro/imports/net_http_httptest.go
index 61d2507..4c88d21 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http_httptest.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http_httptest.go
@@ -18,11 +18,11 @@ func init() {
"NewServer": ValueOf(httptest.NewServer),
"NewTLSServer": ValueOf(httptest.NewTLSServer),
"NewUnstartedServer": ValueOf(httptest.NewUnstartedServer),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ResponseRecorder": TypeOf((*httptest.ResponseRecorder)(nil)).Elem(),
"Server": TypeOf((*httptest.Server)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"DefaultRemoteAddr": "string:1.2.3.4",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http_httptrace.go b/vendor/github.com/cosmos72/gomacro/imports/net_http_httptrace.go
index 7f48d98..f6c8f56 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http_httptrace.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http_httptrace.go
@@ -14,12 +14,12 @@ func init() {
Binds: map[string]Value{
"ContextClientTrace": ValueOf(httptrace.ContextClientTrace),
"WithClientTrace": ValueOf(httptrace.WithClientTrace),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ClientTrace": TypeOf((*httptrace.ClientTrace)(nil)).Elem(),
"DNSDoneInfo": TypeOf((*httptrace.DNSDoneInfo)(nil)).Elem(),
"DNSStartInfo": TypeOf((*httptrace.DNSStartInfo)(nil)).Elem(),
"GotConnInfo": TypeOf((*httptrace.GotConnInfo)(nil)).Elem(),
"WroteRequestInfo": TypeOf((*httptrace.WroteRequestInfo)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http_httputil.go b/vendor/github.com/cosmos72/gomacro/imports/net_http_httputil.go
index 12df7b6..99f2743 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http_httputil.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http_httputil.go
@@ -25,26 +25,26 @@ func init() {
"NewProxyClientConn": ValueOf(httputil.NewProxyClientConn),
"NewServerConn": ValueOf(httputil.NewServerConn),
"NewSingleHostReverseProxy": ValueOf(httputil.NewSingleHostReverseProxy),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"BufferPool": TypeOf((*httputil.BufferPool)(nil)).Elem(),
"ClientConn": TypeOf((*httputil.ClientConn)(nil)).Elem(),
"ReverseProxy": TypeOf((*httputil.ReverseProxy)(nil)).Elem(),
"ServerConn": TypeOf((*httputil.ServerConn)(nil)).Elem(),
- },Proxies: map[string]Type{
- "BufferPool": TypeOf((*BufferPool_net_http_httputil)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "BufferPool": TypeOf((*P_net_http_httputil_BufferPool)(nil)).Elem(),
+ },
}
}
// --------------- proxy for net/http/httputil.BufferPool ---------------
-type BufferPool_net_http_httputil struct {
+type P_net_http_httputil_BufferPool struct {
Object interface{}
Get_ func(interface{}) []byte
Put_ func(interface{}, []byte)
}
-func (Proxy *BufferPool_net_http_httputil) Get() []byte {
- return Proxy.Get_(Proxy.Object)
+func (P *P_net_http_httputil_BufferPool) Get() []byte {
+ return P.Get_(P.Object)
}
-func (Proxy *BufferPool_net_http_httputil) Put(unnamed0 []byte) {
- Proxy.Put_(Proxy.Object, unnamed0)
+func (P *P_net_http_httputil_BufferPool) Put(unnamed0 []byte) {
+ P.Put_(P.Object, unnamed0)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_http_pprof.go b/vendor/github.com/cosmos72/gomacro/imports/net_http_pprof.go
index 03cd526..1c150ba 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_http_pprof.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_http_pprof.go
@@ -18,6 +18,6 @@ func init() {
"Profile": ValueOf(pprof.Profile),
"Symbol": ValueOf(pprof.Symbol),
"Trace": ValueOf(pprof.Trace),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_mail.go b/vendor/github.com/cosmos72/gomacro/imports/net_mail.go
index 96ad085..73d5e16 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_mail.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_mail.go
@@ -17,11 +17,11 @@ func init() {
"ParseAddressList": ValueOf(mail.ParseAddressList),
"ParseDate": ValueOf(mail.ParseDate),
"ReadMessage": ValueOf(mail.ReadMessage),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Address": TypeOf((*mail.Address)(nil)).Elem(),
"AddressParser": TypeOf((*mail.AddressParser)(nil)).Elem(),
"Header": TypeOf((*mail.Header)(nil)).Elem(),
"Message": TypeOf((*mail.Message)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_rpc.go b/vendor/github.com/cosmos72/gomacro/imports/net_rpc.go
index f1a30b5..e0e1c2d 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_rpc.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_rpc.go
@@ -29,7 +29,7 @@ func init() {
"ServeCodec": ValueOf(rpc.ServeCodec),
"ServeConn": ValueOf(rpc.ServeConn),
"ServeRequest": ValueOf(rpc.ServeRequest),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Call": TypeOf((*rpc.Call)(nil)).Elem(),
"Client": TypeOf((*rpc.Client)(nil)).Elem(),
"ClientCodec": TypeOf((*rpc.ClientCodec)(nil)).Elem(),
@@ -38,54 +38,54 @@ func init() {
"Server": TypeOf((*rpc.Server)(nil)).Elem(),
"ServerCodec": TypeOf((*rpc.ServerCodec)(nil)).Elem(),
"ServerError": TypeOf((*rpc.ServerError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "ClientCodec": TypeOf((*ClientCodec_net_rpc)(nil)).Elem(),
- "ServerCodec": TypeOf((*ServerCodec_net_rpc)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "ClientCodec": TypeOf((*P_net_rpc_ClientCodec)(nil)).Elem(),
+ "ServerCodec": TypeOf((*P_net_rpc_ServerCodec)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"DefaultDebugPath": "string:/debug/rpc",
"DefaultRPCPath": "string:/_goRPC_",
- },
+ },
}
}
// --------------- proxy for net/rpc.ClientCodec ---------------
-type ClientCodec_net_rpc struct {
+type P_net_rpc_ClientCodec struct {
Object interface{}
Close_ func(interface{}) error
ReadResponseBody_ func(interface{}, interface{}) error
ReadResponseHeader_ func(interface{}, *rpc.Response) error
WriteRequest_ func(interface{}, *rpc.Request, interface{}) error
}
-func (Proxy *ClientCodec_net_rpc) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_net_rpc_ClientCodec) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *ClientCodec_net_rpc) ReadResponseBody(unnamed0 interface{}) error {
- return Proxy.ReadResponseBody_(Proxy.Object, unnamed0)
+func (P *P_net_rpc_ClientCodec) ReadResponseBody(unnamed0 interface{}) error {
+ return P.ReadResponseBody_(P.Object, unnamed0)
}
-func (Proxy *ClientCodec_net_rpc) ReadResponseHeader(unnamed0 *rpc.Response) error {
- return Proxy.ReadResponseHeader_(Proxy.Object, unnamed0)
+func (P *P_net_rpc_ClientCodec) ReadResponseHeader(unnamed0 *rpc.Response) error {
+ return P.ReadResponseHeader_(P.Object, unnamed0)
}
-func (Proxy *ClientCodec_net_rpc) WriteRequest(unnamed0 *rpc.Request, unnamed1 interface{}) error {
- return Proxy.WriteRequest_(Proxy.Object, unnamed0, unnamed1)
+func (P *P_net_rpc_ClientCodec) WriteRequest(unnamed0 *rpc.Request, unnamed1 interface{}) error {
+ return P.WriteRequest_(P.Object, unnamed0, unnamed1)
}
// --------------- proxy for net/rpc.ServerCodec ---------------
-type ServerCodec_net_rpc struct {
+type P_net_rpc_ServerCodec struct {
Object interface{}
Close_ func(interface{}) error
ReadRequestBody_ func(interface{}, interface{}) error
ReadRequestHeader_ func(interface{}, *rpc.Request) error
WriteResponse_ func(interface{}, *rpc.Response, interface{}) error
}
-func (Proxy *ServerCodec_net_rpc) Close() error {
- return Proxy.Close_(Proxy.Object)
+func (P *P_net_rpc_ServerCodec) Close() error {
+ return P.Close_(P.Object)
}
-func (Proxy *ServerCodec_net_rpc) ReadRequestBody(unnamed0 interface{}) error {
- return Proxy.ReadRequestBody_(Proxy.Object, unnamed0)
+func (P *P_net_rpc_ServerCodec) ReadRequestBody(unnamed0 interface{}) error {
+ return P.ReadRequestBody_(P.Object, unnamed0)
}
-func (Proxy *ServerCodec_net_rpc) ReadRequestHeader(unnamed0 *rpc.Request) error {
- return Proxy.ReadRequestHeader_(Proxy.Object, unnamed0)
+func (P *P_net_rpc_ServerCodec) ReadRequestHeader(unnamed0 *rpc.Request) error {
+ return P.ReadRequestHeader_(P.Object, unnamed0)
}
-func (Proxy *ServerCodec_net_rpc) WriteResponse(unnamed0 *rpc.Response, unnamed1 interface{}) error {
- return Proxy.WriteResponse_(Proxy.Object, unnamed0, unnamed1)
+func (P *P_net_rpc_ServerCodec) WriteResponse(unnamed0 *rpc.Response, unnamed1 interface{}) error {
+ return P.WriteResponse_(P.Object, unnamed0, unnamed1)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_rpc_jsonrpc.go b/vendor/github.com/cosmos72/gomacro/imports/net_rpc_jsonrpc.go
index b5a6905..8db224c 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_rpc_jsonrpc.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_rpc_jsonrpc.go
@@ -17,6 +17,6 @@ func init() {
"NewClientCodec": ValueOf(jsonrpc.NewClientCodec),
"NewServerCodec": ValueOf(jsonrpc.NewServerCodec),
"ServeConn": ValueOf(jsonrpc.ServeConn),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_smtp.go b/vendor/github.com/cosmos72/gomacro/imports/net_smtp.go
index 889895c..e503cf0 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_smtp.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_smtp.go
@@ -17,25 +17,25 @@ func init() {
"NewClient": ValueOf(smtp.NewClient),
"PlainAuth": ValueOf(smtp.PlainAuth),
"SendMail": ValueOf(smtp.SendMail),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Auth": TypeOf((*smtp.Auth)(nil)).Elem(),
"Client": TypeOf((*smtp.Client)(nil)).Elem(),
"ServerInfo": TypeOf((*smtp.ServerInfo)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Auth": TypeOf((*Auth_net_smtp)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Auth": TypeOf((*P_net_smtp_Auth)(nil)).Elem(),
+ },
}
}
// --------------- proxy for net/smtp.Auth ---------------
-type Auth_net_smtp struct {
+type P_net_smtp_Auth struct {
Object interface{}
Next_ func(_proxy_obj_ interface{}, fromServer []byte, more bool) (toServer []byte, err error)
Start_ func(_proxy_obj_ interface{}, server *smtp.ServerInfo) (proto string, toServer []byte, err error)
}
-func (Proxy *Auth_net_smtp) Next(fromServer []byte, more bool) (toServer []byte, err error) {
- return Proxy.Next_(Proxy.Object, fromServer, more)
+func (P *P_net_smtp_Auth) Next(fromServer []byte, more bool) (toServer []byte, err error) {
+ return P.Next_(P.Object, fromServer, more)
}
-func (Proxy *Auth_net_smtp) Start(server *smtp.ServerInfo) (proto string, toServer []byte, err error) {
- return Proxy.Start_(Proxy.Object, server)
+func (P *P_net_smtp_Auth) Start(server *smtp.ServerInfo) (proto string, toServer []byte, err error) {
+ return P.Start_(P.Object, server)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_textproto.go b/vendor/github.com/cosmos72/gomacro/imports/net_textproto.go
index ed20e96..10604d3 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_textproto.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_textproto.go
@@ -19,7 +19,7 @@ func init() {
"NewWriter": ValueOf(textproto.NewWriter),
"TrimBytes": ValueOf(textproto.TrimBytes),
"TrimString": ValueOf(textproto.TrimString),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Conn": TypeOf((*textproto.Conn)(nil)).Elem(),
"Error": TypeOf((*textproto.Error)(nil)).Elem(),
"MIMEHeader": TypeOf((*textproto.MIMEHeader)(nil)).Elem(),
@@ -27,8 +27,8 @@ func init() {
"ProtocolError": TypeOf((*textproto.ProtocolError)(nil)).Elem(),
"Reader": TypeOf((*textproto.Reader)(nil)).Elem(),
"Writer": TypeOf((*textproto.Writer)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"Conn": []string{"DotReader","DotWriter","EndRequest","EndResponse","Next","PrintfLine","ReadCodeLine","ReadContinuedLine","ReadContinuedLineBytes","ReadDotBytes","ReadDotLines","ReadLine","ReadLineBytes","ReadMIMEHeader","ReadResponse","StartRequest","StartResponse",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/net_url.go b/vendor/github.com/cosmos72/gomacro/imports/net_url.go
index e0c1610..0d385ed 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/net_url.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/net_url.go
@@ -21,13 +21,13 @@ func init() {
"QueryUnescape": ValueOf(url.QueryUnescape),
"User": ValueOf(url.User),
"UserPassword": ValueOf(url.UserPassword),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Error": TypeOf((*url.Error)(nil)).Elem(),
"EscapeError": TypeOf((*url.EscapeError)(nil)).Elem(),
"InvalidHostError": TypeOf((*url.InvalidHostError)(nil)).Elem(),
"URL": TypeOf((*url.URL)(nil)).Elem(),
"Userinfo": TypeOf((*url.Userinfo)(nil)).Elem(),
"Values": TypeOf((*url.Values)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/os.go b/vendor/github.com/cosmos72/gomacro/imports/os.go
index 5a59dae..0b2f028 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/os.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/os.go
@@ -5,8 +5,8 @@ package imports
import (
. "reflect"
- "os"
"time"
+ "os"
)
// reflection: allow interpreted code to import "os"
@@ -102,7 +102,7 @@ func init() {
"TempDir": ValueOf(os.TempDir),
"Truncate": ValueOf(os.Truncate),
"Unsetenv": ValueOf(os.Unsetenv),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"File": TypeOf((*os.File)(nil)).Elem(),
"FileInfo": TypeOf((*os.FileInfo)(nil)).Elem(),
"FileMode": TypeOf((*os.FileMode)(nil)).Elem(),
@@ -113,19 +113,19 @@ func init() {
"ProcessState": TypeOf((*os.ProcessState)(nil)).Elem(),
"Signal": TypeOf((*os.Signal)(nil)).Elem(),
"SyscallError": TypeOf((*os.SyscallError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "FileInfo": TypeOf((*FileInfo_os)(nil)).Elem(),
- "Signal": TypeOf((*Signal_os)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "FileInfo": TypeOf((*P_os_FileInfo)(nil)).Elem(),
+ "Signal": TypeOf((*P_os_Signal)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"DevNull": "string:/dev/null",
"PathListSeparator": "rune:58",
"PathSeparator": "rune:47",
- },
+ },
}
}
// --------------- proxy for os.FileInfo ---------------
-type FileInfo_os struct {
+type P_os_FileInfo struct {
Object interface{}
IsDir_ func(interface{}) bool
ModTime_ func(interface{}) time.Time
@@ -134,34 +134,34 @@ type FileInfo_os struct {
Size_ func(interface{}) int64
Sys_ func(interface{}) interface{}
}
-func (Proxy *FileInfo_os) IsDir() bool {
- return Proxy.IsDir_(Proxy.Object)
+func (P *P_os_FileInfo) IsDir() bool {
+ return P.IsDir_(P.Object)
}
-func (Proxy *FileInfo_os) ModTime() time.Time {
- return Proxy.ModTime_(Proxy.Object)
+func (P *P_os_FileInfo) ModTime() time.Time {
+ return P.ModTime_(P.Object)
}
-func (Proxy *FileInfo_os) Mode() os.FileMode {
- return Proxy.Mode_(Proxy.Object)
+func (P *P_os_FileInfo) Mode() os.FileMode {
+ return P.Mode_(P.Object)
}
-func (Proxy *FileInfo_os) Name() string {
- return Proxy.Name_(Proxy.Object)
+func (P *P_os_FileInfo) Name() string {
+ return P.Name_(P.Object)
}
-func (Proxy *FileInfo_os) Size() int64 {
- return Proxy.Size_(Proxy.Object)
+func (P *P_os_FileInfo) Size() int64 {
+ return P.Size_(P.Object)
}
-func (Proxy *FileInfo_os) Sys() interface{} {
- return Proxy.Sys_(Proxy.Object)
+func (P *P_os_FileInfo) Sys() interface{} {
+ return P.Sys_(P.Object)
}
// --------------- proxy for os.Signal ---------------
-type Signal_os struct {
+type P_os_Signal struct {
Object interface{}
Signal_ func(interface{})
String_ func(interface{}) string
}
-func (Proxy *Signal_os) Signal() {
- Proxy.Signal_(Proxy.Object)
+func (P *P_os_Signal) Signal() {
+ P.Signal_(P.Object)
}
-func (Proxy *Signal_os) String() string {
- return Proxy.String_(Proxy.Object)
+func (P *P_os_Signal) String() string {
+ return P.String_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/os_exec.go b/vendor/github.com/cosmos72/gomacro/imports/os_exec.go
index 7273b5f..251935f 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/os_exec.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/os_exec.go
@@ -16,12 +16,12 @@ func init() {
"CommandContext": ValueOf(exec.CommandContext),
"ErrNotFound": ValueOf(&exec.ErrNotFound).Elem(),
"LookPath": ValueOf(exec.LookPath),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Cmd": TypeOf((*exec.Cmd)(nil)).Elem(),
"Error": TypeOf((*exec.Error)(nil)).Elem(),
"ExitError": TypeOf((*exec.ExitError)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"ExitError": []string{"Exited","Pid","String","Success","Sys","SysUsage","SystemTime","UserTime",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/os_signal.go b/vendor/github.com/cosmos72/gomacro/imports/os_signal.go
index c034382..d880a73 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/os_signal.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/os_signal.go
@@ -16,6 +16,6 @@ func init() {
"Notify": ValueOf(signal.Notify),
"Reset": ValueOf(signal.Reset),
"Stop": ValueOf(signal.Stop),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/os_user.go b/vendor/github.com/cosmos72/gomacro/imports/os_user.go
index 4767944..99c5ba9 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/os_user.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/os_user.go
@@ -17,13 +17,13 @@ func init() {
"LookupGroup": ValueOf(user.LookupGroup),
"LookupGroupId": ValueOf(user.LookupGroupId),
"LookupId": ValueOf(user.LookupId),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Group": TypeOf((*user.Group)(nil)).Elem(),
"UnknownGroupError": TypeOf((*user.UnknownGroupError)(nil)).Elem(),
"UnknownGroupIdError": TypeOf((*user.UnknownGroupIdError)(nil)).Elem(),
"UnknownUserError": TypeOf((*user.UnknownUserError)(nil)).Elem(),
"UnknownUserIdError": TypeOf((*user.UnknownUserIdError)(nil)).Elem(),
"User": TypeOf((*user.User)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/package.go b/vendor/github.com/cosmos72/gomacro/imports/package.go
deleted file mode 100644
index 49027cf..0000000
--- a/vendor/github.com/cosmos72/gomacro/imports/package.go
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * gomacro - A Go interpreter with Lisp-like macros
- *
- * Copyright (C) 2017 Massimiliano Ghilardi
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * import.go
- *
- * Created on: Feb 28, 2017
- * Author: Massimiliano Ghilardi
- */
-
-package imports
-
-import (
- . "reflect"
-)
-
-type Package struct {
- Binds map[string]Value
- Types map[string]Type
- Proxies map[string]Type
- // Untypeds contains a string representation of untyped constants,
- // stored without loss of precision
- Untypeds map[string]string
- // Wrappers is the list of wrapper methods for named types.
- // Stored explicitly because reflect package cannot distinguish
- // between explicit methods and wrapper methods for embedded fields
- Wrappers map[string][]string
-}
-
-var Packages = make(map[string]Package)
-
-// reflection: allow interpreted code to import "github.com/cosmos72/gomacro/imports"
-func init() {
- Packages["github.com/cosmos72/gomacro/imports"] = Package{
- Binds: map[string]Value{
- "Packages": ValueOf(&Packages).Elem(),
- },
- Types: map[string]Type{
- "Package": TypeOf((*Package)(nil)).Elem(),
- },
- Proxies: map[string]Type{},
- Untypeds: map[string]string{},
- Wrappers: map[string][]string{},
- }
-}
-
-func (pkg *Package) Init() {
- pkg.Binds = make(map[string]Value)
- pkg.Types = make(map[string]Type)
- pkg.Proxies = make(map[string]Type)
- pkg.Untypeds = make(map[string]string)
- pkg.Wrappers = make(map[string][]string)
-}
-
-func (pkg Package) SaveToPackages(path string) {
- // exploit the fact that maps are actually handles
- dst, ok := Packages[path]
- if !ok {
- dst = Package{}
- dst.Init()
- Packages[path] = dst
- }
- dst.Merge(pkg)
-}
-
-func (dst Package) Merge(src Package) {
- // exploit the fact that maps are actually handles
- for k, v := range src.Binds {
- dst.Binds[k] = v
- }
- for k, v := range src.Types {
- dst.Types[k] = v
- }
- for k, v := range src.Proxies {
- dst.Proxies[k] = v
- }
- for k, v := range src.Untypeds {
- dst.Untypeds[k] = v
- }
- for k, v := range src.Wrappers {
- dst.Wrappers[k] = v
- }
-}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/path.go b/vendor/github.com/cosmos72/gomacro/imports/path.go
index 0587c76..8dbd517 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/path.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/path.go
@@ -21,6 +21,6 @@ func init() {
"Join": ValueOf(path.Join),
"Match": ValueOf(path.Match),
"Split": ValueOf(path.Split),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/path_filepath.go b/vendor/github.com/cosmos72/gomacro/imports/path_filepath.go
index d2824a4..fa6ce0e 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/path_filepath.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/path_filepath.go
@@ -34,11 +34,11 @@ func init() {
"ToSlash": ValueOf(filepath.ToSlash),
"VolumeName": ValueOf(filepath.VolumeName),
"Walk": ValueOf(filepath.Walk),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"WalkFunc": TypeOf((*filepath.WalkFunc)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"ListSeparator": "rune:58",
"Separator": "rune:47",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/plugin.go b/vendor/github.com/cosmos72/gomacro/imports/plugin.go
index d1389f7..cef73cc 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/plugin.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/plugin.go
@@ -1,4 +1,4 @@
-// +build go1.8,!gccgo
+// +build go1.8,gc,!android,!windows
// this file was generated by gomacro command: import _b "plugin"
// DO NOT EDIT! Any change will be lost when the file is re-generated
@@ -15,16 +15,9 @@ func init() {
Packages["plugin"] = Package{
Binds: map[string]Value{
"Open": ValueOf(plugin.Open),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Plugin": TypeOf((*plugin.Plugin)(nil)).Elem(),
"Symbol": TypeOf((*plugin.Symbol)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Symbol": TypeOf((*Symbol_plugin)(nil)).Elem(),
- },
+ },
}
}
-
-// --------------- proxy for plugin.Symbol ---------------
-type Symbol_plugin struct {
- Object interface{}
-}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/reflect.go b/vendor/github.com/cosmos72/gomacro/imports/reflect.go
index edbe006..ff49c7b 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/reflect.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/reflect.go
@@ -39,6 +39,7 @@ func init() {
"MakeChan": ValueOf(reflect.MakeChan),
"MakeFunc": ValueOf(reflect.MakeFunc),
"MakeMap": ValueOf(reflect.MakeMap),
+ "MakeMapWithSize": ValueOf(reflect.MakeMapWithSize),
"MakeSlice": ValueOf(reflect.MakeSlice),
"Map": ValueOf(reflect.Map),
"MapOf": ValueOf(reflect.MapOf),
@@ -68,7 +69,7 @@ func init() {
"UnsafePointer": ValueOf(reflect.UnsafePointer),
"ValueOf": ValueOf(reflect.ValueOf),
"Zero": ValueOf(reflect.Zero),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ChanDir": TypeOf((*reflect.ChanDir)(nil)).Elem(),
"Kind": TypeOf((*reflect.Kind)(nil)).Elem(),
"Method": TypeOf((*reflect.Method)(nil)).Elem(),
@@ -81,6 +82,6 @@ func init() {
"Type": TypeOf((*reflect.Type)(nil)).Elem(),
"Value": TypeOf((*reflect.Value)(nil)).Elem(),
"ValueError": TypeOf((*reflect.ValueError)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/regexp.go b/vendor/github.com/cosmos72/gomacro/imports/regexp.go
index a0e929a..b7ada89 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/regexp.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/regexp.go
@@ -20,8 +20,8 @@ func init() {
"MustCompile": ValueOf(regexp.MustCompile),
"MustCompilePOSIX": ValueOf(regexp.MustCompilePOSIX),
"QuoteMeta": ValueOf(regexp.QuoteMeta),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Regexp": TypeOf((*regexp.Regexp)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/regexp_syntax.go b/vendor/github.com/cosmos72/gomacro/imports/regexp_syntax.go
index 7a6eb22..a99e647 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/regexp_syntax.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/regexp_syntax.go
@@ -79,7 +79,7 @@ func init() {
"Simple": ValueOf(syntax.Simple),
"UnicodeGroups": ValueOf(syntax.UnicodeGroups),
"WasDollar": ValueOf(syntax.WasDollar),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"EmptyOp": TypeOf((*syntax.EmptyOp)(nil)).Elem(),
"Error": TypeOf((*syntax.Error)(nil)).Elem(),
"ErrorCode": TypeOf((*syntax.ErrorCode)(nil)).Elem(),
@@ -89,6 +89,6 @@ func init() {
"Op": TypeOf((*syntax.Op)(nil)).Elem(),
"Prog": TypeOf((*syntax.Prog)(nil)).Elem(),
"Regexp": TypeOf((*syntax.Regexp)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/runtime.go b/vendor/github.com/cosmos72/gomacro/imports/runtime.go
index 44d880f..d69c123 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/runtime.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/runtime.go
@@ -1,5 +1,3 @@
-// +build !gccgo
-
// this file was generated by gomacro command: import _b "runtime"
// DO NOT EDIT! Any change will be lost when the file is re-generated
@@ -42,7 +40,7 @@ func init() {
"ReadTrace": ValueOf(runtime.ReadTrace),
"SetBlockProfileRate": ValueOf(runtime.SetBlockProfileRate),
"SetCPUProfileRate": ValueOf(runtime.SetCPUProfileRate),
- "SetCgoTraceback": ValueOf(runtime.SetCgoTraceback),
+ // "SetCgoTraceback": ValueOf(runtime.SetCgoTraceback), // missing in gccgo!
"SetFinalizer": ValueOf(runtime.SetFinalizer),
"SetMutexProfileFraction": ValueOf(runtime.SetMutexProfileFraction),
"Stack": ValueOf(runtime.Stack),
@@ -51,7 +49,7 @@ func init() {
"ThreadCreateProfile": ValueOf(runtime.ThreadCreateProfile),
"UnlockOSThread": ValueOf(runtime.UnlockOSThread),
"Version": ValueOf(runtime.Version),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"BlockProfileRecord": TypeOf((*runtime.BlockProfileRecord)(nil)).Elem(),
"Error": TypeOf((*runtime.Error)(nil)).Elem(),
"Frame": TypeOf((*runtime.Frame)(nil)).Elem(),
@@ -61,25 +59,25 @@ func init() {
"MemStats": TypeOf((*runtime.MemStats)(nil)).Elem(),
"StackRecord": TypeOf((*runtime.StackRecord)(nil)).Elem(),
"TypeAssertionError": TypeOf((*runtime.TypeAssertionError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Error": TypeOf((*Error_runtime)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Error": TypeOf((*P_runtime_Error)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"Compiler": "string:gc",
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"BlockProfileRecord": []string{"Stack",},
- },
+ },
}
}
// --------------- proxy for runtime.Error ---------------
-type Error_runtime struct {
+type P_runtime_Error struct {
Object interface{}
Error_ func(interface{}) string
RuntimeError_ func(interface{})
}
-func (Proxy *Error_runtime) Error() string {
- return Proxy.Error_(Proxy.Object)
+func (P *P_runtime_Error) Error() string {
+ return P.Error_(P.Object)
}
-func (Proxy *Error_runtime) RuntimeError() {
- Proxy.RuntimeError_(Proxy.Object)
+func (P *P_runtime_Error) RuntimeError() {
+ P.RuntimeError_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/runtime_debug.go b/vendor/github.com/cosmos72/gomacro/imports/runtime_debug.go
index 16af4cf..d4eccf6 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/runtime_debug.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/runtime_debug.go
@@ -22,8 +22,8 @@ func init() {
"SetTraceback": ValueOf(debug.SetTraceback),
"Stack": ValueOf(debug.Stack),
"WriteHeapDump": ValueOf(debug.WriteHeapDump),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"GCStats": TypeOf((*debug.GCStats)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/runtime_pprof.go b/vendor/github.com/cosmos72/gomacro/imports/runtime_pprof.go
index 42de895..a9ea850 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/runtime_pprof.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/runtime_pprof.go
@@ -12,14 +12,21 @@ import (
func init() {
Packages["runtime/pprof"] = Package{
Binds: map[string]Value{
+ "Do": ValueOf(pprof.Do),
+ "ForLabels": ValueOf(pprof.ForLabels),
+ "Label": ValueOf(pprof.Label),
+ "Labels": ValueOf(pprof.Labels),
"Lookup": ValueOf(pprof.Lookup),
"NewProfile": ValueOf(pprof.NewProfile),
"Profiles": ValueOf(pprof.Profiles),
+ "SetGoroutineLabels": ValueOf(pprof.SetGoroutineLabels),
"StartCPUProfile": ValueOf(pprof.StartCPUProfile),
"StopCPUProfile": ValueOf(pprof.StopCPUProfile),
+ "WithLabels": ValueOf(pprof.WithLabels),
"WriteHeapProfile": ValueOf(pprof.WriteHeapProfile),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
+ "LabelSet": TypeOf((*pprof.LabelSet)(nil)).Elem(),
"Profile": TypeOf((*pprof.Profile)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/runtime_trace.go b/vendor/github.com/cosmos72/gomacro/imports/runtime_trace.go
index 5af064d..bd4aec0 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/runtime_trace.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/runtime_trace.go
@@ -14,6 +14,6 @@ func init() {
Binds: map[string]Value{
"Start": ValueOf(trace.Start),
"Stop": ValueOf(trace.Stop),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/sort.go b/vendor/github.com/cosmos72/gomacro/imports/sort.go
index 719fb02..8ec6282 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/sort.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/sort.go
@@ -29,30 +29,30 @@ func init() {
"Stable": ValueOf(sort.Stable),
"Strings": ValueOf(sort.Strings),
"StringsAreSorted": ValueOf(sort.StringsAreSorted),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Float64Slice": TypeOf((*sort.Float64Slice)(nil)).Elem(),
"IntSlice": TypeOf((*sort.IntSlice)(nil)).Elem(),
"Interface": TypeOf((*sort.Interface)(nil)).Elem(),
"StringSlice": TypeOf((*sort.StringSlice)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Interface": TypeOf((*Interface_sort)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Interface": TypeOf((*P_sort_Interface)(nil)).Elem(),
+ },
}
}
// --------------- proxy for sort.Interface ---------------
-type Interface_sort struct {
+type P_sort_Interface struct {
Object interface{}
Len_ func(interface{}) int
Less_ func(_proxy_obj_ interface{}, i int, j int) bool
Swap_ func(_proxy_obj_ interface{}, i int, j int)
}
-func (Proxy *Interface_sort) Len() int {
- return Proxy.Len_(Proxy.Object)
+func (P *P_sort_Interface) Len() int {
+ return P.Len_(P.Object)
}
-func (Proxy *Interface_sort) Less(i int, j int) bool {
- return Proxy.Less_(Proxy.Object, i, j)
+func (P *P_sort_Interface) Less(i int, j int) bool {
+ return P.Less_(P.Object, i, j)
}
-func (Proxy *Interface_sort) Swap(i int, j int) {
- Proxy.Swap_(Proxy.Object, i, j)
+func (P *P_sort_Interface) Swap(i int, j int) {
+ P.Swap_(P.Object, i, j)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/strconv.go b/vendor/github.com/cosmos72/gomacro/imports/strconv.go
index 8f9f3df..c584462 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/strconv.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/strconv.go
@@ -46,10 +46,10 @@ func init() {
"QuoteToGraphic": ValueOf(strconv.QuoteToGraphic),
"Unquote": ValueOf(strconv.Unquote),
"UnquoteChar": ValueOf(strconv.UnquoteChar),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"NumError": TypeOf((*strconv.NumError)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"IntSize": "int:64",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/strings.go b/vendor/github.com/cosmos72/gomacro/imports/strings.go
index 0d98ec3..16a7a21 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/strings.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/strings.go
@@ -57,9 +57,9 @@ func init() {
"TrimRightFunc": ValueOf(strings.TrimRightFunc),
"TrimSpace": ValueOf(strings.TrimSpace),
"TrimSuffix": ValueOf(strings.TrimSuffix),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Reader": TypeOf((*strings.Reader)(nil)).Elem(),
"Replacer": TypeOf((*strings.Replacer)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/sync.go b/vendor/github.com/cosmos72/gomacro/imports/sync.go
index 395757e..14bc0fd 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/sync.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/sync.go
@@ -13,29 +13,30 @@ func init() {
Packages["sync"] = Package{
Binds: map[string]Value{
"NewCond": ValueOf(sync.NewCond),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Cond": TypeOf((*sync.Cond)(nil)).Elem(),
"Locker": TypeOf((*sync.Locker)(nil)).Elem(),
+ "Map": TypeOf((*sync.Map)(nil)).Elem(),
"Mutex": TypeOf((*sync.Mutex)(nil)).Elem(),
"Once": TypeOf((*sync.Once)(nil)).Elem(),
"Pool": TypeOf((*sync.Pool)(nil)).Elem(),
"RWMutex": TypeOf((*sync.RWMutex)(nil)).Elem(),
"WaitGroup": TypeOf((*sync.WaitGroup)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Locker": TypeOf((*Locker_sync)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Locker": TypeOf((*P_sync_Locker)(nil)).Elem(),
+ },
}
}
// --------------- proxy for sync.Locker ---------------
-type Locker_sync struct {
+type P_sync_Locker struct {
Object interface{}
Lock_ func(interface{})
Unlock_ func(interface{})
}
-func (Proxy *Locker_sync) Lock() {
- Proxy.Lock_(Proxy.Object)
+func (P *P_sync_Locker) Lock() {
+ P.Lock_(P.Object)
}
-func (Proxy *Locker_sync) Unlock() {
- Proxy.Unlock_(Proxy.Object)
+func (P *P_sync_Locker) Unlock() {
+ P.Unlock_(P.Object)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/sync_atomic.go b/vendor/github.com/cosmos72/gomacro/imports/sync_atomic.go
index df02d6a..9445087 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/sync_atomic.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/sync_atomic.go
@@ -41,8 +41,8 @@ func init() {
"SwapUint32": ValueOf(atomic.SwapUint32),
"SwapUint64": ValueOf(atomic.SwapUint64),
"SwapUintptr": ValueOf(atomic.SwapUintptr),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Value": TypeOf((*atomic.Value)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall/a_package.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/a_package.go
new file mode 100644
index 0000000..37f7806
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/a_package.go
@@ -0,0 +1,36 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * a_package.go
+ *
+ * Created on: Apr 09, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package syscall
+
+import (
+ . "reflect"
+)
+
+type Package = struct { // unnamed
+ Binds map[string]Value
+ Types map[string]Type
+ Proxies map[string]Type
+ // Untypeds contains a string representation of untyped constants,
+ // stored without loss of precision
+ Untypeds map[string]string
+ // Wrappers is the list of wrapper methods for named types.
+ // Stored explicitly because reflect package cannot distinguish
+ // between explicit methods and wrapper methods for embedded fields
+ Wrappers map[string][]string
+}
+
+var Packages = make(map[string]Package)
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_386.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_386.go
new file mode 100644
index 0000000..f0bdbd8
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_386.go
@@ -0,0 +1,6089 @@
+// +build gccgo
+
+// this file was generated by gomacro command: import _b "syscall"
+// DO NOT EDIT! Any change will be lost when the file is re-generated
+
+package syscall
+
+import (
+ . "reflect"
+ "syscall"
+)
+
+// reflection: allow interpreted code to import "syscall"
+func init() {
+ Packages["syscall"] = Package{
+ Binds: map[string]Value{
+ "AF_ALG": ValueOf(syscall.AF_ALG),
+ "AF_APPLETALK": ValueOf(syscall.AF_APPLETALK),
+ "AF_ASH": ValueOf(syscall.AF_ASH),
+ "AF_ATMPVC": ValueOf(syscall.AF_ATMPVC),
+ "AF_ATMSVC": ValueOf(syscall.AF_ATMSVC),
+ "AF_AX25": ValueOf(syscall.AF_AX25),
+ "AF_BLUETOOTH": ValueOf(syscall.AF_BLUETOOTH),
+ "AF_BRIDGE": ValueOf(syscall.AF_BRIDGE),
+ "AF_CAIF": ValueOf(syscall.AF_CAIF),
+ "AF_CAN": ValueOf(syscall.AF_CAN),
+ "AF_DECnet": ValueOf(syscall.AF_DECnet),
+ "AF_ECONET": ValueOf(syscall.AF_ECONET),
+ "AF_FILE": ValueOf(syscall.AF_FILE),
+ "AF_IB": ValueOf(syscall.AF_IB),
+ "AF_IEEE802154": ValueOf(syscall.AF_IEEE802154),
+ "AF_INET": ValueOf(syscall.AF_INET),
+ "AF_INET6": ValueOf(syscall.AF_INET6),
+ "AF_IPX": ValueOf(syscall.AF_IPX),
+ "AF_IRDA": ValueOf(syscall.AF_IRDA),
+ "AF_ISDN": ValueOf(syscall.AF_ISDN),
+ "AF_IUCV": ValueOf(syscall.AF_IUCV),
+ "AF_KCM": ValueOf(syscall.AF_KCM),
+ "AF_KEY": ValueOf(syscall.AF_KEY),
+ "AF_LLC": ValueOf(syscall.AF_LLC),
+ "AF_LOCAL": ValueOf(syscall.AF_LOCAL),
+ "AF_MAX": ValueOf(syscall.AF_MAX),
+ "AF_MPLS": ValueOf(syscall.AF_MPLS),
+ "AF_NETBEUI": ValueOf(syscall.AF_NETBEUI),
+ "AF_NETLINK": ValueOf(syscall.AF_NETLINK),
+ "AF_NETROM": ValueOf(syscall.AF_NETROM),
+ "AF_NFC": ValueOf(syscall.AF_NFC),
+ "AF_PACKET": ValueOf(syscall.AF_PACKET),
+ "AF_PHONET": ValueOf(syscall.AF_PHONET),
+ "AF_PPPOX": ValueOf(syscall.AF_PPPOX),
+ "AF_QIPCRTR": ValueOf(syscall.AF_QIPCRTR),
+ "AF_RDS": ValueOf(syscall.AF_RDS),
+ "AF_ROSE": ValueOf(syscall.AF_ROSE),
+ "AF_ROUTE": ValueOf(syscall.AF_ROUTE),
+ "AF_RXRPC": ValueOf(syscall.AF_RXRPC),
+ "AF_SECURITY": ValueOf(syscall.AF_SECURITY),
+ "AF_SMC": ValueOf(syscall.AF_SMC),
+ "AF_SNA": ValueOf(syscall.AF_SNA),
+ "AF_TIPC": ValueOf(syscall.AF_TIPC),
+ "AF_UNIX": ValueOf(syscall.AF_UNIX),
+ "AF_UNSPEC": ValueOf(syscall.AF_UNSPEC),
+ "AF_VSOCK": ValueOf(syscall.AF_VSOCK),
+ "AF_WANPIPE": ValueOf(syscall.AF_WANPIPE),
+ "AF_X25": ValueOf(syscall.AF_X25),
+ "AI_ADDRCONFIG": ValueOf(syscall.AI_ADDRCONFIG),
+ "AI_ALL": ValueOf(syscall.AI_ALL),
+ "AI_CANONIDN": ValueOf(syscall.AI_CANONIDN),
+ "AI_CANONNAME": ValueOf(syscall.AI_CANONNAME),
+ "AI_IDN": ValueOf(syscall.AI_IDN),
+ "AI_IDN_ALLOW_UNASSIGNED": ValueOf(syscall.AI_IDN_ALLOW_UNASSIGNED),
+ "AI_IDN_USE_STD3_ASCII_RULES": ValueOf(syscall.AI_IDN_USE_STD3_ASCII_RULES),
+ "AI_NUMERICHOST": ValueOf(syscall.AI_NUMERICHOST),
+ "AI_NUMERICSERV": ValueOf(syscall.AI_NUMERICSERV),
+ "AI_PASSIVE": ValueOf(syscall.AI_PASSIVE),
+ "AI_V4MAPPED": ValueOf(syscall.AI_V4MAPPED),
+ "ARCH": ValueOf(syscall.ARCH),
+ "ARPHRD_ADAPT": ValueOf(syscall.ARPHRD_ADAPT),
+ "ARPHRD_APPLETLK": ValueOf(syscall.ARPHRD_APPLETLK),
+ "ARPHRD_ARCNET": ValueOf(syscall.ARPHRD_ARCNET),
+ "ARPHRD_ASH": ValueOf(syscall.ARPHRD_ASH),
+ "ARPHRD_ATM": ValueOf(syscall.ARPHRD_ATM),
+ "ARPHRD_AX25": ValueOf(syscall.ARPHRD_AX25),
+ "ARPHRD_BIF": ValueOf(syscall.ARPHRD_BIF),
+ "ARPHRD_CHAOS": ValueOf(syscall.ARPHRD_CHAOS),
+ "ARPHRD_CISCO": ValueOf(syscall.ARPHRD_CISCO),
+ "ARPHRD_CSLIP": ValueOf(syscall.ARPHRD_CSLIP),
+ "ARPHRD_CSLIP6": ValueOf(syscall.ARPHRD_CSLIP6),
+ "ARPHRD_DDCMP": ValueOf(syscall.ARPHRD_DDCMP),
+ "ARPHRD_DLCI": ValueOf(syscall.ARPHRD_DLCI),
+ "ARPHRD_ECONET": ValueOf(syscall.ARPHRD_ECONET),
+ "ARPHRD_EETHER": ValueOf(syscall.ARPHRD_EETHER),
+ "ARPHRD_ETHER": ValueOf(syscall.ARPHRD_ETHER),
+ "ARPHRD_EUI64": ValueOf(syscall.ARPHRD_EUI64),
+ "ARPHRD_FCAL": ValueOf(syscall.ARPHRD_FCAL),
+ "ARPHRD_FCFABRIC": ValueOf(syscall.ARPHRD_FCFABRIC),
+ "ARPHRD_FCPL": ValueOf(syscall.ARPHRD_FCPL),
+ "ARPHRD_FCPP": ValueOf(syscall.ARPHRD_FCPP),
+ "ARPHRD_FDDI": ValueOf(syscall.ARPHRD_FDDI),
+ "ARPHRD_FRAD": ValueOf(syscall.ARPHRD_FRAD),
+ "ARPHRD_HDLC": ValueOf(syscall.ARPHRD_HDLC),
+ "ARPHRD_HIPPI": ValueOf(syscall.ARPHRD_HIPPI),
+ "ARPHRD_HWX25": ValueOf(syscall.ARPHRD_HWX25),
+ "ARPHRD_IEEE1394": ValueOf(syscall.ARPHRD_IEEE1394),
+ "ARPHRD_IEEE802": ValueOf(syscall.ARPHRD_IEEE802),
+ "ARPHRD_IEEE80211": ValueOf(syscall.ARPHRD_IEEE80211),
+ "ARPHRD_IEEE80211_PRISM": ValueOf(syscall.ARPHRD_IEEE80211_PRISM),
+ "ARPHRD_IEEE80211_RADIOTAP": ValueOf(syscall.ARPHRD_IEEE80211_RADIOTAP),
+ "ARPHRD_IEEE802154": ValueOf(syscall.ARPHRD_IEEE802154),
+ "ARPHRD_IEEE802154_PHY": ValueOf(syscall.ARPHRD_IEEE802154_PHY),
+ "ARPHRD_IEEE802_TR": ValueOf(syscall.ARPHRD_IEEE802_TR),
+ "ARPHRD_INFINIBAND": ValueOf(syscall.ARPHRD_INFINIBAND),
+ "ARPHRD_IPDDP": ValueOf(syscall.ARPHRD_IPDDP),
+ "ARPHRD_IPGRE": ValueOf(syscall.ARPHRD_IPGRE),
+ "ARPHRD_IRDA": ValueOf(syscall.ARPHRD_IRDA),
+ "ARPHRD_LAPB": ValueOf(syscall.ARPHRD_LAPB),
+ "ARPHRD_LOCALTLK": ValueOf(syscall.ARPHRD_LOCALTLK),
+ "ARPHRD_LOOPBACK": ValueOf(syscall.ARPHRD_LOOPBACK),
+ "ARPHRD_METRICOM": ValueOf(syscall.ARPHRD_METRICOM),
+ "ARPHRD_NETROM": ValueOf(syscall.ARPHRD_NETROM),
+ "ARPHRD_NONE": ValueOf(syscall.ARPHRD_NONE),
+ "ARPHRD_PIMREG": ValueOf(syscall.ARPHRD_PIMREG),
+ "ARPHRD_PPP": ValueOf(syscall.ARPHRD_PPP),
+ "ARPHRD_PRONET": ValueOf(syscall.ARPHRD_PRONET),
+ "ARPHRD_RAWHDLC": ValueOf(syscall.ARPHRD_RAWHDLC),
+ "ARPHRD_RAWIP": ValueOf(syscall.ARPHRD_RAWIP),
+ "ARPHRD_ROSE": ValueOf(syscall.ARPHRD_ROSE),
+ "ARPHRD_RSRVD": ValueOf(syscall.ARPHRD_RSRVD),
+ "ARPHRD_SIT": ValueOf(syscall.ARPHRD_SIT),
+ "ARPHRD_SKIP": ValueOf(syscall.ARPHRD_SKIP),
+ "ARPHRD_SLIP": ValueOf(syscall.ARPHRD_SLIP),
+ "ARPHRD_SLIP6": ValueOf(syscall.ARPHRD_SLIP6),
+ "ARPHRD_TUNNEL": ValueOf(syscall.ARPHRD_TUNNEL),
+ "ARPHRD_TUNNEL6": ValueOf(syscall.ARPHRD_TUNNEL6),
+ "ARPHRD_VOID": ValueOf(syscall.ARPHRD_VOID),
+ "ARPHRD_X25": ValueOf(syscall.ARPHRD_X25),
+ "Accept": ValueOf(syscall.Accept),
+ "Accept4": ValueOf(syscall.Accept4),
+ "Access": ValueOf(syscall.Access),
+ "Acct": ValueOf(syscall.Acct),
+ "Adjtimex": ValueOf(syscall.Adjtimex),
+ "AttachLsf": ValueOf(syscall.AttachLsf),
+ "B0": ValueOf(syscall.B0),
+ "B1000000": ValueOf(syscall.B1000000),
+ "B110": ValueOf(syscall.B110),
+ "B115200": ValueOf(syscall.B115200),
+ "B1152000": ValueOf(syscall.B1152000),
+ "B1200": ValueOf(syscall.B1200),
+ "B134": ValueOf(syscall.B134),
+ "B150": ValueOf(syscall.B150),
+ "B1500000": ValueOf(syscall.B1500000),
+ "B1800": ValueOf(syscall.B1800),
+ "B19200": ValueOf(syscall.B19200),
+ "B200": ValueOf(syscall.B200),
+ "B2000000": ValueOf(syscall.B2000000),
+ "B230400": ValueOf(syscall.B230400),
+ "B2400": ValueOf(syscall.B2400),
+ "B2500000": ValueOf(syscall.B2500000),
+ "B300": ValueOf(syscall.B300),
+ "B3000000": ValueOf(syscall.B3000000),
+ "B3500000": ValueOf(syscall.B3500000),
+ "B38400": ValueOf(syscall.B38400),
+ "B4000000": ValueOf(syscall.B4000000),
+ "B460800": ValueOf(syscall.B460800),
+ "B4800": ValueOf(syscall.B4800),
+ "B50": ValueOf(syscall.B50),
+ "B500000": ValueOf(syscall.B500000),
+ "B57600": ValueOf(syscall.B57600),
+ "B576000": ValueOf(syscall.B576000),
+ "B600": ValueOf(syscall.B600),
+ "B75": ValueOf(syscall.B75),
+ "B921600": ValueOf(syscall.B921600),
+ "B9600": ValueOf(syscall.B9600),
+ "BPF_A": ValueOf(syscall.BPF_A),
+ "BPF_ABS": ValueOf(syscall.BPF_ABS),
+ "BPF_ADD": ValueOf(syscall.BPF_ADD),
+ "BPF_ALU": ValueOf(syscall.BPF_ALU),
+ "BPF_AND": ValueOf(syscall.BPF_AND),
+ "BPF_B": ValueOf(syscall.BPF_B),
+ "BPF_DIV": ValueOf(syscall.BPF_DIV),
+ "BPF_H": ValueOf(syscall.BPF_H),
+ "BPF_IMM": ValueOf(syscall.BPF_IMM),
+ "BPF_IND": ValueOf(syscall.BPF_IND),
+ "BPF_JA": ValueOf(syscall.BPF_JA),
+ "BPF_JEQ": ValueOf(syscall.BPF_JEQ),
+ "BPF_JGE": ValueOf(syscall.BPF_JGE),
+ "BPF_JGT": ValueOf(syscall.BPF_JGT),
+ "BPF_JMP": ValueOf(syscall.BPF_JMP),
+ "BPF_JSET": ValueOf(syscall.BPF_JSET),
+ "BPF_K": ValueOf(syscall.BPF_K),
+ "BPF_LD": ValueOf(syscall.BPF_LD),
+ "BPF_LDX": ValueOf(syscall.BPF_LDX),
+ "BPF_LEN": ValueOf(syscall.BPF_LEN),
+ "BPF_LL_OFF": ValueOf(syscall.BPF_LL_OFF),
+ "BPF_LSH": ValueOf(syscall.BPF_LSH),
+ "BPF_MAJOR_VERSION": ValueOf(syscall.BPF_MAJOR_VERSION),
+ "BPF_MAXINSNS": ValueOf(syscall.BPF_MAXINSNS),
+ "BPF_MEM": ValueOf(syscall.BPF_MEM),
+ "BPF_MEMWORDS": ValueOf(syscall.BPF_MEMWORDS),
+ "BPF_MINOR_VERSION": ValueOf(syscall.BPF_MINOR_VERSION),
+ "BPF_MISC": ValueOf(syscall.BPF_MISC),
+ "BPF_MOD": ValueOf(syscall.BPF_MOD),
+ "BPF_MSH": ValueOf(syscall.BPF_MSH),
+ "BPF_MUL": ValueOf(syscall.BPF_MUL),
+ "BPF_NEG": ValueOf(syscall.BPF_NEG),
+ "BPF_NET_OFF": ValueOf(syscall.BPF_NET_OFF),
+ "BPF_OR": ValueOf(syscall.BPF_OR),
+ "BPF_RET": ValueOf(syscall.BPF_RET),
+ "BPF_RSH": ValueOf(syscall.BPF_RSH),
+ "BPF_ST": ValueOf(syscall.BPF_ST),
+ "BPF_STX": ValueOf(syscall.BPF_STX),
+ "BPF_SUB": ValueOf(syscall.BPF_SUB),
+ "BPF_TAX": ValueOf(syscall.BPF_TAX),
+ "BPF_TXA": ValueOf(syscall.BPF_TXA),
+ "BPF_W": ValueOf(syscall.BPF_W),
+ "BPF_X": ValueOf(syscall.BPF_X),
+ "BPF_XOR": ValueOf(syscall.BPF_XOR),
+ "BRKINT": ValueOf(syscall.BRKINT),
+ "BSDLY": ValueOf(syscall.BSDLY),
+ "Bind": ValueOf(syscall.Bind),
+ "BindToDevice": ValueOf(syscall.BindToDevice),
+ "BytePtrFromString": ValueOf(syscall.BytePtrFromString),
+ "ByteSliceFromString": ValueOf(syscall.ByteSliceFromString),
+ "CBAUD": ValueOf(syscall.CBAUD),
+ "CBAUDEX": ValueOf(syscall.CBAUDEX),
+ "CIBAUD": ValueOf(syscall.CIBAUD),
+ "CLOCAL": ValueOf(syscall.CLOCAL),
+ "CLONE_CHILD_CLEARTID": ValueOf(syscall.CLONE_CHILD_CLEARTID),
+ "CLONE_CHILD_SETTID": ValueOf(syscall.CLONE_CHILD_SETTID),
+ "CLONE_DETACHED": ValueOf(syscall.CLONE_DETACHED),
+ "CLONE_FILES": ValueOf(syscall.CLONE_FILES),
+ "CLONE_FS": ValueOf(syscall.CLONE_FS),
+ "CLONE_IO": ValueOf(uint32(syscall.CLONE_IO)),
+ "CLONE_NEWCGROUP": ValueOf(syscall.CLONE_NEWCGROUP),
+ "CLONE_NEWIPC": ValueOf(syscall.CLONE_NEWIPC),
+ "CLONE_NEWNET": ValueOf(syscall.CLONE_NEWNET),
+ "CLONE_NEWNS": ValueOf(syscall.CLONE_NEWNS),
+ "CLONE_NEWPID": ValueOf(syscall.CLONE_NEWPID),
+ "CLONE_NEWUSER": ValueOf(syscall.CLONE_NEWUSER),
+ "CLONE_NEWUTS": ValueOf(syscall.CLONE_NEWUTS),
+ "CLONE_PARENT": ValueOf(syscall.CLONE_PARENT),
+ "CLONE_PARENT_SETTID": ValueOf(syscall.CLONE_PARENT_SETTID),
+ "CLONE_PTRACE": ValueOf(syscall.CLONE_PTRACE),
+ "CLONE_SETTLS": ValueOf(syscall.CLONE_SETTLS),
+ "CLONE_SIGHAND": ValueOf(syscall.CLONE_SIGHAND),
+ "CLONE_SYSVSEM": ValueOf(syscall.CLONE_SYSVSEM),
+ "CLONE_THREAD": ValueOf(syscall.CLONE_THREAD),
+ "CLONE_UNTRACED": ValueOf(syscall.CLONE_UNTRACED),
+ "CLONE_VFORK": ValueOf(syscall.CLONE_VFORK),
+ "CLONE_VM": ValueOf(syscall.CLONE_VM),
+ "CMSPAR": ValueOf(syscall.CMSPAR),
+ "CR0": ValueOf(syscall.CR0),
+ "CR1": ValueOf(syscall.CR1),
+ "CR2": ValueOf(syscall.CR2),
+ "CR3": ValueOf(syscall.CR3),
+ "CRDLY": ValueOf(syscall.CRDLY),
+ "CREAD": ValueOf(syscall.CREAD),
+ "CRTSCTS": ValueOf(uint32(syscall.CRTSCTS)),
+ "CS5": ValueOf(syscall.CS5),
+ "CS6": ValueOf(syscall.CS6),
+ "CS7": ValueOf(syscall.CS7),
+ "CS8": ValueOf(syscall.CS8),
+ "CSIZE": ValueOf(syscall.CSIZE),
+ "CSTOPB": ValueOf(syscall.CSTOPB),
+ "Cgocall": ValueOf(syscall.Cgocall),
+ "CgocallBack": ValueOf(syscall.CgocallBack),
+ "CgocallBackDone": ValueOf(syscall.CgocallBackDone),
+ "CgocallDone": ValueOf(syscall.CgocallDone),
+ "Chdir": ValueOf(syscall.Chdir),
+ "Chmod": ValueOf(syscall.Chmod),
+ "Chown": ValueOf(syscall.Chown),
+ "Chroot": ValueOf(syscall.Chroot),
+ "Clearenv": ValueOf(syscall.Clearenv),
+ "Close": ValueOf(syscall.Close),
+ "CloseOnExec": ValueOf(syscall.CloseOnExec),
+ "CmsgLen": ValueOf(syscall.CmsgLen),
+ "CmsgSpace": ValueOf(syscall.CmsgSpace),
+ "Connect": ValueOf(syscall.Connect),
+ "Creat": ValueOf(syscall.Creat),
+ "DT_BLK": ValueOf(syscall.DT_BLK),
+ "DT_CHR": ValueOf(syscall.DT_CHR),
+ "DT_DIR": ValueOf(syscall.DT_DIR),
+ "DT_FIFO": ValueOf(syscall.DT_FIFO),
+ "DT_LNK": ValueOf(syscall.DT_LNK),
+ "DT_REG": ValueOf(syscall.DT_REG),
+ "DT_SOCK": ValueOf(syscall.DT_SOCK),
+ "DT_UNKNOWN": ValueOf(syscall.DT_UNKNOWN),
+ "DT_WHT": ValueOf(syscall.DT_WHT),
+ "DetachLsf": ValueOf(syscall.DetachLsf),
+ "Dup": ValueOf(syscall.Dup),
+ "Dup2": ValueOf(syscall.Dup2),
+ "Dup3": ValueOf(syscall.Dup3),
+ "E2BIG": ValueOf(syscall.E2BIG),
+ "EACCES": ValueOf(syscall.EACCES),
+ "EADDRINUSE": ValueOf(syscall.EADDRINUSE),
+ "EADDRNOTAVAIL": ValueOf(syscall.EADDRNOTAVAIL),
+ "EADV": ValueOf(syscall.EADV),
+ "EAFNOSUPPORT": ValueOf(syscall.EAFNOSUPPORT),
+ "EAGAIN": ValueOf(syscall.EAGAIN),
+ "EAI_ADDRFAMILY": ValueOf(syscall.EAI_ADDRFAMILY),
+ "EAI_AGAIN": ValueOf(syscall.EAI_AGAIN),
+ "EAI_ALLDONE": ValueOf(syscall.EAI_ALLDONE),
+ "EAI_BADFLAGS": ValueOf(syscall.EAI_BADFLAGS),
+ "EAI_CANCELED": ValueOf(syscall.EAI_CANCELED),
+ "EAI_FAIL": ValueOf(syscall.EAI_FAIL),
+ "EAI_FAMILY": ValueOf(syscall.EAI_FAMILY),
+ "EAI_IDN_ENCODE": ValueOf(syscall.EAI_IDN_ENCODE),
+ "EAI_INPROGRESS": ValueOf(syscall.EAI_INPROGRESS),
+ "EAI_INTR": ValueOf(syscall.EAI_INTR),
+ "EAI_MEMORY": ValueOf(syscall.EAI_MEMORY),
+ "EAI_NODATA": ValueOf(syscall.EAI_NODATA),
+ "EAI_NONAME": ValueOf(syscall.EAI_NONAME),
+ "EAI_NOTCANCELED": ValueOf(syscall.EAI_NOTCANCELED),
+ "EAI_OVERFLOW": ValueOf(syscall.EAI_OVERFLOW),
+ "EAI_SERVICE": ValueOf(syscall.EAI_SERVICE),
+ "EAI_SOCKTYPE": ValueOf(syscall.EAI_SOCKTYPE),
+ "EAI_SYSTEM": ValueOf(syscall.EAI_SYSTEM),
+ "EALREADY": ValueOf(syscall.EALREADY),
+ "EBADE": ValueOf(syscall.EBADE),
+ "EBADF": ValueOf(syscall.EBADF),
+ "EBADFD": ValueOf(syscall.EBADFD),
+ "EBADMSG": ValueOf(syscall.EBADMSG),
+ "EBADR": ValueOf(syscall.EBADR),
+ "EBADRQC": ValueOf(syscall.EBADRQC),
+ "EBADSLT": ValueOf(syscall.EBADSLT),
+ "EBFONT": ValueOf(syscall.EBFONT),
+ "EBUSY": ValueOf(syscall.EBUSY),
+ "ECANCELED": ValueOf(syscall.ECANCELED),
+ "ECHILD": ValueOf(syscall.ECHILD),
+ "ECHO": ValueOf(syscall.ECHO),
+ "ECHOCTL": ValueOf(syscall.ECHOCTL),
+ "ECHOE": ValueOf(syscall.ECHOE),
+ "ECHOK": ValueOf(syscall.ECHOK),
+ "ECHOKE": ValueOf(syscall.ECHOKE),
+ "ECHONL": ValueOf(syscall.ECHONL),
+ "ECHOPRT": ValueOf(syscall.ECHOPRT),
+ "ECHRNG": ValueOf(syscall.ECHRNG),
+ "ECOMM": ValueOf(syscall.ECOMM),
+ "ECONNABORTED": ValueOf(syscall.ECONNABORTED),
+ "ECONNREFUSED": ValueOf(syscall.ECONNREFUSED),
+ "ECONNRESET": ValueOf(syscall.ECONNRESET),
+ "EDEADLK": ValueOf(syscall.EDEADLK),
+ "EDEADLOCK": ValueOf(syscall.EDEADLOCK),
+ "EDESTADDRREQ": ValueOf(syscall.EDESTADDRREQ),
+ "EDOM": ValueOf(syscall.EDOM),
+ "EDOTDOT": ValueOf(syscall.EDOTDOT),
+ "EDQUOT": ValueOf(syscall.EDQUOT),
+ "EEXIST": ValueOf(syscall.EEXIST),
+ "EFAULT": ValueOf(syscall.EFAULT),
+ "EFBIG": ValueOf(syscall.EFBIG),
+ "EHOSTDOWN": ValueOf(syscall.EHOSTDOWN),
+ "EHOSTUNREACH": ValueOf(syscall.EHOSTUNREACH),
+ "EHWPOISON": ValueOf(syscall.EHWPOISON),
+ "EIDRM": ValueOf(syscall.EIDRM),
+ "EILSEQ": ValueOf(syscall.EILSEQ),
+ "EINPROGRESS": ValueOf(syscall.EINPROGRESS),
+ "EINTR": ValueOf(syscall.EINTR),
+ "EINVAL": ValueOf(syscall.EINVAL),
+ "EIO": ValueOf(syscall.EIO),
+ "EISCONN": ValueOf(syscall.EISCONN),
+ "EISDIR": ValueOf(syscall.EISDIR),
+ "EISNAM": ValueOf(syscall.EISNAM),
+ "EKEYEXPIRED": ValueOf(syscall.EKEYEXPIRED),
+ "EKEYREJECTED": ValueOf(syscall.EKEYREJECTED),
+ "EKEYREVOKED": ValueOf(syscall.EKEYREVOKED),
+ "EL2HLT": ValueOf(syscall.EL2HLT),
+ "EL2NSYNC": ValueOf(syscall.EL2NSYNC),
+ "EL3HLT": ValueOf(syscall.EL3HLT),
+ "EL3RST": ValueOf(syscall.EL3RST),
+ "ELIBACC": ValueOf(syscall.ELIBACC),
+ "ELIBBAD": ValueOf(syscall.ELIBBAD),
+ "ELIBEXEC": ValueOf(syscall.ELIBEXEC),
+ "ELIBMAX": ValueOf(syscall.ELIBMAX),
+ "ELIBSCN": ValueOf(syscall.ELIBSCN),
+ "ELNRNG": ValueOf(syscall.ELNRNG),
+ "ELOOP": ValueOf(syscall.ELOOP),
+ "EMEDIUMTYPE": ValueOf(syscall.EMEDIUMTYPE),
+ "EMFILE": ValueOf(syscall.EMFILE),
+ "EMLINK": ValueOf(syscall.EMLINK),
+ "EMSGSIZE": ValueOf(syscall.EMSGSIZE),
+ "EMULTIHOP": ValueOf(syscall.EMULTIHOP),
+ "ENAMETOOLONG": ValueOf(syscall.ENAMETOOLONG),
+ "ENAVAIL": ValueOf(syscall.ENAVAIL),
+ "ENETDOWN": ValueOf(syscall.ENETDOWN),
+ "ENETRESET": ValueOf(syscall.ENETRESET),
+ "ENETUNREACH": ValueOf(syscall.ENETUNREACH),
+ "ENFILE": ValueOf(syscall.ENFILE),
+ "ENOANO": ValueOf(syscall.ENOANO),
+ "ENOBUFS": ValueOf(syscall.ENOBUFS),
+ "ENOCSI": ValueOf(syscall.ENOCSI),
+ "ENODATA": ValueOf(syscall.ENODATA),
+ "ENODEV": ValueOf(syscall.ENODEV),
+ "ENOENT": ValueOf(syscall.ENOENT),
+ "ENOEXEC": ValueOf(syscall.ENOEXEC),
+ "ENOKEY": ValueOf(syscall.ENOKEY),
+ "ENOLCK": ValueOf(syscall.ENOLCK),
+ "ENOLINK": ValueOf(syscall.ENOLINK),
+ "ENOMEDIUM": ValueOf(syscall.ENOMEDIUM),
+ "ENOMEM": ValueOf(syscall.ENOMEM),
+ "ENOMSG": ValueOf(syscall.ENOMSG),
+ "ENONET": ValueOf(syscall.ENONET),
+ "ENOPKG": ValueOf(syscall.ENOPKG),
+ "ENOPROTOOPT": ValueOf(syscall.ENOPROTOOPT),
+ "ENOSPC": ValueOf(syscall.ENOSPC),
+ "ENOSR": ValueOf(syscall.ENOSR),
+ "ENOSTR": ValueOf(syscall.ENOSTR),
+ "ENOSYS": ValueOf(syscall.ENOSYS),
+ "ENOTBLK": ValueOf(syscall.ENOTBLK),
+ "ENOTCONN": ValueOf(syscall.ENOTCONN),
+ "ENOTDIR": ValueOf(syscall.ENOTDIR),
+ "ENOTEMPTY": ValueOf(syscall.ENOTEMPTY),
+ "ENOTNAM": ValueOf(syscall.ENOTNAM),
+ "ENOTRECOVERABLE": ValueOf(syscall.ENOTRECOVERABLE),
+ "ENOTSOCK": ValueOf(syscall.ENOTSOCK),
+ "ENOTSUP": ValueOf(syscall.ENOTSUP),
+ "ENOTTY": ValueOf(syscall.ENOTTY),
+ "ENOTUNIQ": ValueOf(syscall.ENOTUNIQ),
+ "ENXIO": ValueOf(syscall.ENXIO),
+ "EOPNOTSUPP": ValueOf(syscall.EOPNOTSUPP),
+ "EOVERFLOW": ValueOf(syscall.EOVERFLOW),
+ "EOWNERDEAD": ValueOf(syscall.EOWNERDEAD),
+ "EPERM": ValueOf(syscall.EPERM),
+ "EPFNOSUPPORT": ValueOf(syscall.EPFNOSUPPORT),
+ "EPIPE": ValueOf(syscall.EPIPE),
+ "EPOLLERR": ValueOf(syscall.EPOLLERR),
+ "EPOLLET": ValueOf(uint32(syscall.EPOLLET)),
+ "EPOLLEXCLUSIVE": ValueOf(syscall.EPOLLEXCLUSIVE),
+ "EPOLLHUP": ValueOf(syscall.EPOLLHUP),
+ "EPOLLIN": ValueOf(syscall.EPOLLIN),
+ "EPOLLMSG": ValueOf(syscall.EPOLLMSG),
+ "EPOLLONESHOT": ValueOf(syscall.EPOLLONESHOT),
+ "EPOLLOUT": ValueOf(syscall.EPOLLOUT),
+ "EPOLLPRI": ValueOf(syscall.EPOLLPRI),
+ "EPOLLRDBAND": ValueOf(syscall.EPOLLRDBAND),
+ "EPOLLRDHUP": ValueOf(syscall.EPOLLRDHUP),
+ "EPOLLRDNORM": ValueOf(syscall.EPOLLRDNORM),
+ "EPOLLWAKEUP": ValueOf(syscall.EPOLLWAKEUP),
+ "EPOLLWRBAND": ValueOf(syscall.EPOLLWRBAND),
+ "EPOLLWRNORM": ValueOf(syscall.EPOLLWRNORM),
+ "EPOLL_CLOEXEC": ValueOf(syscall.EPOLL_CLOEXEC),
+ "EPOLL_CTL_ADD": ValueOf(syscall.EPOLL_CTL_ADD),
+ "EPOLL_CTL_DEL": ValueOf(syscall.EPOLL_CTL_DEL),
+ "EPOLL_CTL_MOD": ValueOf(syscall.EPOLL_CTL_MOD),
+ "EPROTO": ValueOf(syscall.EPROTO),
+ "EPROTONOSUPPORT": ValueOf(syscall.EPROTONOSUPPORT),
+ "EPROTOTYPE": ValueOf(syscall.EPROTOTYPE),
+ "ERANGE": ValueOf(syscall.ERANGE),
+ "EREMCHG": ValueOf(syscall.EREMCHG),
+ "EREMOTE": ValueOf(syscall.EREMOTE),
+ "EREMOTEIO": ValueOf(syscall.EREMOTEIO),
+ "ERESTART": ValueOf(syscall.ERESTART),
+ "ERFKILL": ValueOf(syscall.ERFKILL),
+ "EROFS": ValueOf(syscall.EROFS),
+ "ESHUTDOWN": ValueOf(syscall.ESHUTDOWN),
+ "ESOCKTNOSUPPORT": ValueOf(syscall.ESOCKTNOSUPPORT),
+ "ESPIPE": ValueOf(syscall.ESPIPE),
+ "ESRCH": ValueOf(syscall.ESRCH),
+ "ESRMNT": ValueOf(syscall.ESRMNT),
+ "ESTALE": ValueOf(syscall.ESTALE),
+ "ESTRPIPE": ValueOf(syscall.ESTRPIPE),
+ "ETH_ALEN": ValueOf(syscall.ETH_ALEN),
+ "ETH_DATA_LEN": ValueOf(syscall.ETH_DATA_LEN),
+ "ETH_FCS_LEN": ValueOf(syscall.ETH_FCS_LEN),
+ "ETH_FRAME_LEN": ValueOf(syscall.ETH_FRAME_LEN),
+ "ETH_HLEN": ValueOf(syscall.ETH_HLEN),
+ "ETH_MAX_MTU": ValueOf(syscall.ETH_MAX_MTU),
+ "ETH_MIN_MTU": ValueOf(syscall.ETH_MIN_MTU),
+ "ETH_P_1588": ValueOf(syscall.ETH_P_1588),
+ "ETH_P_8021AD": ValueOf(syscall.ETH_P_8021AD),
+ "ETH_P_8021AH": ValueOf(syscall.ETH_P_8021AH),
+ "ETH_P_8021Q": ValueOf(syscall.ETH_P_8021Q),
+ "ETH_P_80221": ValueOf(syscall.ETH_P_80221),
+ "ETH_P_802_2": ValueOf(syscall.ETH_P_802_2),
+ "ETH_P_802_3": ValueOf(syscall.ETH_P_802_3),
+ "ETH_P_802_3_MIN": ValueOf(syscall.ETH_P_802_3_MIN),
+ "ETH_P_802_EX1": ValueOf(syscall.ETH_P_802_EX1),
+ "ETH_P_AARP": ValueOf(syscall.ETH_P_AARP),
+ "ETH_P_AF_IUCV": ValueOf(syscall.ETH_P_AF_IUCV),
+ "ETH_P_ALL": ValueOf(syscall.ETH_P_ALL),
+ "ETH_P_AOE": ValueOf(syscall.ETH_P_AOE),
+ "ETH_P_ARCNET": ValueOf(syscall.ETH_P_ARCNET),
+ "ETH_P_ARP": ValueOf(syscall.ETH_P_ARP),
+ "ETH_P_ATALK": ValueOf(syscall.ETH_P_ATALK),
+ "ETH_P_ATMFATE": ValueOf(syscall.ETH_P_ATMFATE),
+ "ETH_P_ATMMPOA": ValueOf(syscall.ETH_P_ATMMPOA),
+ "ETH_P_AX25": ValueOf(syscall.ETH_P_AX25),
+ "ETH_P_BATMAN": ValueOf(syscall.ETH_P_BATMAN),
+ "ETH_P_BPQ": ValueOf(syscall.ETH_P_BPQ),
+ "ETH_P_CAIF": ValueOf(syscall.ETH_P_CAIF),
+ "ETH_P_CAN": ValueOf(syscall.ETH_P_CAN),
+ "ETH_P_CANFD": ValueOf(syscall.ETH_P_CANFD),
+ "ETH_P_CONTROL": ValueOf(syscall.ETH_P_CONTROL),
+ "ETH_P_CUST": ValueOf(syscall.ETH_P_CUST),
+ "ETH_P_DDCMP": ValueOf(syscall.ETH_P_DDCMP),
+ "ETH_P_DEC": ValueOf(syscall.ETH_P_DEC),
+ "ETH_P_DIAG": ValueOf(syscall.ETH_P_DIAG),
+ "ETH_P_DNA_DL": ValueOf(syscall.ETH_P_DNA_DL),
+ "ETH_P_DNA_RC": ValueOf(syscall.ETH_P_DNA_RC),
+ "ETH_P_DNA_RT": ValueOf(syscall.ETH_P_DNA_RT),
+ "ETH_P_DSA": ValueOf(syscall.ETH_P_DSA),
+ "ETH_P_ECONET": ValueOf(syscall.ETH_P_ECONET),
+ "ETH_P_EDSA": ValueOf(syscall.ETH_P_EDSA),
+ "ETH_P_ERSPAN": ValueOf(syscall.ETH_P_ERSPAN),
+ "ETH_P_FCOE": ValueOf(syscall.ETH_P_FCOE),
+ "ETH_P_FIP": ValueOf(syscall.ETH_P_FIP),
+ "ETH_P_HDLC": ValueOf(syscall.ETH_P_HDLC),
+ "ETH_P_HSR": ValueOf(syscall.ETH_P_HSR),
+ "ETH_P_IBOE": ValueOf(syscall.ETH_P_IBOE),
+ "ETH_P_IEEE802154": ValueOf(syscall.ETH_P_IEEE802154),
+ "ETH_P_IEEEPUP": ValueOf(syscall.ETH_P_IEEEPUP),
+ "ETH_P_IEEEPUPAT": ValueOf(syscall.ETH_P_IEEEPUPAT),
+ "ETH_P_IFE": ValueOf(syscall.ETH_P_IFE),
+ "ETH_P_IP": ValueOf(syscall.ETH_P_IP),
+ "ETH_P_IPV6": ValueOf(syscall.ETH_P_IPV6),
+ "ETH_P_IPX": ValueOf(syscall.ETH_P_IPX),
+ "ETH_P_IRDA": ValueOf(syscall.ETH_P_IRDA),
+ "ETH_P_LAT": ValueOf(syscall.ETH_P_LAT),
+ "ETH_P_LINK_CTL": ValueOf(syscall.ETH_P_LINK_CTL),
+ "ETH_P_LOCALTALK": ValueOf(syscall.ETH_P_LOCALTALK),
+ "ETH_P_LOOP": ValueOf(syscall.ETH_P_LOOP),
+ "ETH_P_LOOPBACK": ValueOf(syscall.ETH_P_LOOPBACK),
+ "ETH_P_MACSEC": ValueOf(syscall.ETH_P_MACSEC),
+ "ETH_P_MAP": ValueOf(syscall.ETH_P_MAP),
+ "ETH_P_MOBITEX": ValueOf(syscall.ETH_P_MOBITEX),
+ "ETH_P_MPLS_MC": ValueOf(syscall.ETH_P_MPLS_MC),
+ "ETH_P_MPLS_UC": ValueOf(syscall.ETH_P_MPLS_UC),
+ "ETH_P_MVRP": ValueOf(syscall.ETH_P_MVRP),
+ "ETH_P_NCSI": ValueOf(syscall.ETH_P_NCSI),
+ "ETH_P_NSH": ValueOf(syscall.ETH_P_NSH),
+ "ETH_P_PAE": ValueOf(syscall.ETH_P_PAE),
+ "ETH_P_PAUSE": ValueOf(syscall.ETH_P_PAUSE),
+ "ETH_P_PHONET": ValueOf(syscall.ETH_P_PHONET),
+ "ETH_P_PPPTALK": ValueOf(syscall.ETH_P_PPPTALK),
+ "ETH_P_PPP_DISC": ValueOf(syscall.ETH_P_PPP_DISC),
+ "ETH_P_PPP_MP": ValueOf(syscall.ETH_P_PPP_MP),
+ "ETH_P_PPP_SES": ValueOf(syscall.ETH_P_PPP_SES),
+ "ETH_P_PRP": ValueOf(syscall.ETH_P_PRP),
+ "ETH_P_PUP": ValueOf(syscall.ETH_P_PUP),
+ "ETH_P_PUPAT": ValueOf(syscall.ETH_P_PUPAT),
+ "ETH_P_QINQ1": ValueOf(syscall.ETH_P_QINQ1),
+ "ETH_P_QINQ2": ValueOf(syscall.ETH_P_QINQ2),
+ "ETH_P_QINQ3": ValueOf(syscall.ETH_P_QINQ3),
+ "ETH_P_RARP": ValueOf(syscall.ETH_P_RARP),
+ "ETH_P_SCA": ValueOf(syscall.ETH_P_SCA),
+ "ETH_P_SLOW": ValueOf(syscall.ETH_P_SLOW),
+ "ETH_P_SNAP": ValueOf(syscall.ETH_P_SNAP),
+ "ETH_P_TDLS": ValueOf(syscall.ETH_P_TDLS),
+ "ETH_P_TEB": ValueOf(syscall.ETH_P_TEB),
+ "ETH_P_TIPC": ValueOf(syscall.ETH_P_TIPC),
+ "ETH_P_TRAILER": ValueOf(syscall.ETH_P_TRAILER),
+ "ETH_P_TR_802_2": ValueOf(syscall.ETH_P_TR_802_2),
+ "ETH_P_TSN": ValueOf(syscall.ETH_P_TSN),
+ "ETH_P_WAN_PPP": ValueOf(syscall.ETH_P_WAN_PPP),
+ "ETH_P_WCCP": ValueOf(syscall.ETH_P_WCCP),
+ "ETH_P_X25": ValueOf(syscall.ETH_P_X25),
+ "ETH_P_XDSA": ValueOf(syscall.ETH_P_XDSA),
+ "ETH_ZLEN": ValueOf(syscall.ETH_ZLEN),
+ "ETIME": ValueOf(syscall.ETIME),
+ "ETIMEDOUT": ValueOf(syscall.ETIMEDOUT),
+ "ETOOMANYREFS": ValueOf(syscall.ETOOMANYREFS),
+ "ETXTBSY": ValueOf(syscall.ETXTBSY),
+ "EUCLEAN": ValueOf(syscall.EUCLEAN),
+ "EUNATCH": ValueOf(syscall.EUNATCH),
+ "EUSERS": ValueOf(syscall.EUSERS),
+ "EWOULDBLOCK": ValueOf(syscall.EWOULDBLOCK),
+ "EXDEV": ValueOf(syscall.EXDEV),
+ "EXFULL": ValueOf(syscall.EXFULL),
+ "Entersyscall": ValueOf(syscall.Entersyscall),
+ "Environ": ValueOf(syscall.Environ),
+ "EpollCreate": ValueOf(syscall.EpollCreate),
+ "EpollCreate1": ValueOf(syscall.EpollCreate1),
+ "EpollCtl": ValueOf(syscall.EpollCtl),
+ "EpollWait": ValueOf(syscall.EpollWait),
+ "Errstr": ValueOf(syscall.Errstr),
+ "Exec": ValueOf(syscall.Exec),
+ "Exit": ValueOf(syscall.Exit),
+ "Exitsyscall": ValueOf(syscall.Exitsyscall),
+ "FALLOC_FL_COLLAPSE_RANGE": ValueOf(syscall.FALLOC_FL_COLLAPSE_RANGE),
+ "FALLOC_FL_INSERT_RANGE": ValueOf(syscall.FALLOC_FL_INSERT_RANGE),
+ "FALLOC_FL_KEEP_SIZE": ValueOf(syscall.FALLOC_FL_KEEP_SIZE),
+ "FALLOC_FL_NO_HIDE_STALE": ValueOf(syscall.FALLOC_FL_NO_HIDE_STALE),
+ "FALLOC_FL_PUNCH_HOLE": ValueOf(syscall.FALLOC_FL_PUNCH_HOLE),
+ "FALLOC_FL_UNSHARE_RANGE": ValueOf(syscall.FALLOC_FL_UNSHARE_RANGE),
+ "FALLOC_FL_ZERO_RANGE": ValueOf(syscall.FALLOC_FL_ZERO_RANGE),
+ "FDClr": ValueOf(syscall.FDClr),
+ "FDIsSet": ValueOf(syscall.FDIsSet),
+ "FDSet": ValueOf(syscall.FDSet),
+ "FDZero": ValueOf(syscall.FDZero),
+ "FD_CLOEXEC": ValueOf(syscall.FD_CLOEXEC),
+ "FD_SETSIZE": ValueOf(syscall.FD_SETSIZE),
+ "FFDLY": ValueOf(syscall.FFDLY),
+ "FLUSHO": ValueOf(syscall.FLUSHO),
+ "F_ADD_SEALS": ValueOf(syscall.F_ADD_SEALS),
+ "F_DUPFD": ValueOf(syscall.F_DUPFD),
+ "F_DUPFD_CLOEXEC": ValueOf(syscall.F_DUPFD_CLOEXEC),
+ "F_EXLCK": ValueOf(syscall.F_EXLCK),
+ "F_GETFD": ValueOf(syscall.F_GETFD),
+ "F_GETFL": ValueOf(syscall.F_GETFL),
+ "F_GETLEASE": ValueOf(syscall.F_GETLEASE),
+ "F_GETLK": ValueOf(syscall.F_GETLK),
+ "F_GETLK64": ValueOf(syscall.F_GETLK64),
+ "F_GETOWN": ValueOf(syscall.F_GETOWN),
+ "F_GETOWN_EX": ValueOf(syscall.F_GETOWN_EX),
+ "F_GETPIPE_SZ": ValueOf(syscall.F_GETPIPE_SZ),
+ "F_GETSIG": ValueOf(syscall.F_GETSIG),
+ "F_GET_FILE_RW_HINT": ValueOf(syscall.F_GET_FILE_RW_HINT),
+ "F_GET_RW_HINT": ValueOf(syscall.F_GET_RW_HINT),
+ "F_GET_SEALS": ValueOf(syscall.F_GET_SEALS),
+ "F_LOCK": ValueOf(syscall.F_LOCK),
+ "F_NOTIFY": ValueOf(syscall.F_NOTIFY),
+ "F_OFD_GETLK": ValueOf(syscall.F_OFD_GETLK),
+ "F_OFD_SETLK": ValueOf(syscall.F_OFD_SETLK),
+ "F_OFD_SETLKW": ValueOf(syscall.F_OFD_SETLKW),
+ "F_OK": ValueOf(syscall.F_OK),
+ "F_OWNER_GID": ValueOf(syscall.F_OWNER_GID),
+ "F_OWNER_PGRP": ValueOf(syscall.F_OWNER_PGRP),
+ "F_OWNER_PID": ValueOf(syscall.F_OWNER_PID),
+ "F_OWNER_TID": ValueOf(syscall.F_OWNER_TID),
+ "F_RDLCK": ValueOf(syscall.F_RDLCK),
+ "F_SEAL_GROW": ValueOf(syscall.F_SEAL_GROW),
+ "F_SEAL_SEAL": ValueOf(syscall.F_SEAL_SEAL),
+ "F_SEAL_SHRINK": ValueOf(syscall.F_SEAL_SHRINK),
+ "F_SEAL_WRITE": ValueOf(syscall.F_SEAL_WRITE),
+ "F_SETFD": ValueOf(syscall.F_SETFD),
+ "F_SETFL": ValueOf(syscall.F_SETFL),
+ "F_SETLEASE": ValueOf(syscall.F_SETLEASE),
+ "F_SETLK": ValueOf(syscall.F_SETLK),
+ "F_SETLK64": ValueOf(syscall.F_SETLK64),
+ "F_SETLKW": ValueOf(syscall.F_SETLKW),
+ "F_SETLKW64": ValueOf(syscall.F_SETLKW64),
+ "F_SETOWN": ValueOf(syscall.F_SETOWN),
+ "F_SETOWN_EX": ValueOf(syscall.F_SETOWN_EX),
+ "F_SETPIPE_SZ": ValueOf(syscall.F_SETPIPE_SZ),
+ "F_SETSIG": ValueOf(syscall.F_SETSIG),
+ "F_SET_FILE_RW_HINT": ValueOf(syscall.F_SET_FILE_RW_HINT),
+ "F_SET_RW_HINT": ValueOf(syscall.F_SET_RW_HINT),
+ "F_SHLCK": ValueOf(syscall.F_SHLCK),
+ "F_TEST": ValueOf(syscall.F_TEST),
+ "F_TLOCK": ValueOf(syscall.F_TLOCK),
+ "F_ULOCK": ValueOf(syscall.F_ULOCK),
+ "F_UNLCK": ValueOf(syscall.F_UNLCK),
+ "F_WRLCK": ValueOf(syscall.F_WRLCK),
+ "Faccessat": ValueOf(syscall.Faccessat),
+ "Fallocate": ValueOf(syscall.Fallocate),
+ "Fchdir": ValueOf(syscall.Fchdir),
+ "Fchmod": ValueOf(syscall.Fchmod),
+ "Fchmodat": ValueOf(syscall.Fchmodat),
+ "Fchown": ValueOf(syscall.Fchown),
+ "Fchownat": ValueOf(syscall.Fchownat),
+ "FcntlFlock": ValueOf(syscall.FcntlFlock),
+ "Fdatasync": ValueOf(syscall.Fdatasync),
+ "Flock": ValueOf(syscall.Flock),
+ "ForkExec": ValueOf(syscall.ForkExec),
+ "ForkLock": ValueOf(&syscall.ForkLock).Elem(),
+ "Fstat": ValueOf(syscall.Fstat),
+ "Fstatfs": ValueOf(syscall.Fstatfs),
+ "Fsync": ValueOf(syscall.Fsync),
+ "Ftruncate": ValueOf(syscall.Ftruncate),
+ "Futimes": ValueOf(syscall.Futimes),
+ "Futimesat": ValueOf(syscall.Futimesat),
+ "GetErrno": ValueOf(syscall.GetErrno),
+ "Getcwd": ValueOf(syscall.Getcwd),
+ "Getdents": ValueOf(syscall.Getdents),
+ "Getegid": ValueOf(syscall.Getegid),
+ "Getenv": ValueOf(syscall.Getenv),
+ "Geteuid": ValueOf(syscall.Geteuid),
+ "Getgid": ValueOf(syscall.Getgid),
+ "Getgroups": ValueOf(syscall.Getgroups),
+ "Getpagesize": ValueOf(syscall.Getpagesize),
+ "Getpeername": ValueOf(syscall.Getpeername),
+ "Getpgid": ValueOf(syscall.Getpgid),
+ "Getpgrp": ValueOf(syscall.Getpgrp),
+ "Getpid": ValueOf(syscall.Getpid),
+ "Getppid": ValueOf(syscall.Getppid),
+ "Getpriority": ValueOf(syscall.Getpriority),
+ "Getrlimit": ValueOf(syscall.Getrlimit),
+ "Getrusage": ValueOf(syscall.Getrusage),
+ "Getsockname": ValueOf(syscall.Getsockname),
+ "GetsockoptByte": ValueOf(syscall.GetsockoptByte),
+ "GetsockoptICMPv6Filter": ValueOf(syscall.GetsockoptICMPv6Filter),
+ "GetsockoptIPMreq": ValueOf(syscall.GetsockoptIPMreq),
+ "GetsockoptIPMreqn": ValueOf(syscall.GetsockoptIPMreqn),
+ "GetsockoptIPv6MTUInfo": ValueOf(syscall.GetsockoptIPv6MTUInfo),
+ "GetsockoptIPv6Mreq": ValueOf(syscall.GetsockoptIPv6Mreq),
+ "GetsockoptInet4Addr": ValueOf(syscall.GetsockoptInet4Addr),
+ "GetsockoptInt": ValueOf(syscall.GetsockoptInt),
+ "GetsockoptUcred": ValueOf(syscall.GetsockoptUcred),
+ "Gettid": ValueOf(syscall.Gettid),
+ "Gettimeofday": ValueOf(syscall.Gettimeofday),
+ "Getuid": ValueOf(syscall.Getuid),
+ "Getwd": ValueOf(syscall.Getwd),
+ "Getxattr": ValueOf(syscall.Getxattr),
+ "HUPCL": ValueOf(syscall.HUPCL),
+ "ICANON": ValueOf(syscall.ICANON),
+ "ICRNL": ValueOf(syscall.ICRNL),
+ "IEXTEN": ValueOf(syscall.IEXTEN),
+ "IFA_ADDRESS": ValueOf(syscall.IFA_ADDRESS),
+ "IFA_ANYCAST": ValueOf(syscall.IFA_ANYCAST),
+ "IFA_BROADCAST": ValueOf(syscall.IFA_BROADCAST),
+ "IFA_CACHEINFO": ValueOf(syscall.IFA_CACHEINFO),
+ "IFA_FLAGS": ValueOf(syscall.IFA_FLAGS),
+ "IFA_F_DADFAILED": ValueOf(syscall.IFA_F_DADFAILED),
+ "IFA_F_DEPRECATED": ValueOf(syscall.IFA_F_DEPRECATED),
+ "IFA_F_HOMEADDRESS": ValueOf(syscall.IFA_F_HOMEADDRESS),
+ "IFA_F_MANAGETEMPADDR": ValueOf(syscall.IFA_F_MANAGETEMPADDR),
+ "IFA_F_MCAUTOJOIN": ValueOf(syscall.IFA_F_MCAUTOJOIN),
+ "IFA_F_NODAD": ValueOf(syscall.IFA_F_NODAD),
+ "IFA_F_NOPREFIXROUTE": ValueOf(syscall.IFA_F_NOPREFIXROUTE),
+ "IFA_F_OPTIMISTIC": ValueOf(syscall.IFA_F_OPTIMISTIC),
+ "IFA_F_PERMANENT": ValueOf(syscall.IFA_F_PERMANENT),
+ "IFA_F_SECONDARY": ValueOf(syscall.IFA_F_SECONDARY),
+ "IFA_F_STABLE_PRIVACY": ValueOf(syscall.IFA_F_STABLE_PRIVACY),
+ "IFA_F_TEMPORARY": ValueOf(syscall.IFA_F_TEMPORARY),
+ "IFA_F_TENTATIVE": ValueOf(syscall.IFA_F_TENTATIVE),
+ "IFA_LABEL": ValueOf(syscall.IFA_LABEL),
+ "IFA_LOCAL": ValueOf(syscall.IFA_LOCAL),
+ "IFA_MULTICAST": ValueOf(syscall.IFA_MULTICAST),
+ "IFA_UNSPEC": ValueOf(syscall.IFA_UNSPEC),
+ "IFF_ALLMULTI": ValueOf(syscall.IFF_ALLMULTI),
+ "IFF_ATTACH_QUEUE": ValueOf(syscall.IFF_ATTACH_QUEUE),
+ "IFF_AUTOMEDIA": ValueOf(syscall.IFF_AUTOMEDIA),
+ "IFF_BROADCAST": ValueOf(syscall.IFF_BROADCAST),
+ "IFF_DEBUG": ValueOf(syscall.IFF_DEBUG),
+ "IFF_DETACH_QUEUE": ValueOf(syscall.IFF_DETACH_QUEUE),
+ "IFF_DYNAMIC": ValueOf(syscall.IFF_DYNAMIC),
+ "IFF_LOOPBACK": ValueOf(syscall.IFF_LOOPBACK),
+ "IFF_MASTER": ValueOf(syscall.IFF_MASTER),
+ "IFF_MULTICAST": ValueOf(syscall.IFF_MULTICAST),
+ "IFF_MULTI_QUEUE": ValueOf(syscall.IFF_MULTI_QUEUE),
+ "IFF_NAPI": ValueOf(syscall.IFF_NAPI),
+ "IFF_NAPI_FRAGS": ValueOf(syscall.IFF_NAPI_FRAGS),
+ "IFF_NOARP": ValueOf(syscall.IFF_NOARP),
+ "IFF_NOFILTER": ValueOf(syscall.IFF_NOFILTER),
+ "IFF_NOTRAILERS": ValueOf(syscall.IFF_NOTRAILERS),
+ "IFF_NO_PI": ValueOf(syscall.IFF_NO_PI),
+ "IFF_ONE_QUEUE": ValueOf(syscall.IFF_ONE_QUEUE),
+ "IFF_PERSIST": ValueOf(syscall.IFF_PERSIST),
+ "IFF_POINTOPOINT": ValueOf(syscall.IFF_POINTOPOINT),
+ "IFF_PORTSEL": ValueOf(syscall.IFF_PORTSEL),
+ "IFF_PROMISC": ValueOf(syscall.IFF_PROMISC),
+ "IFF_RUNNING": ValueOf(syscall.IFF_RUNNING),
+ "IFF_SLAVE": ValueOf(syscall.IFF_SLAVE),
+ "IFF_TAP": ValueOf(syscall.IFF_TAP),
+ "IFF_TUN": ValueOf(syscall.IFF_TUN),
+ "IFF_TUN_EXCL": ValueOf(syscall.IFF_TUN_EXCL),
+ "IFF_UP": ValueOf(syscall.IFF_UP),
+ "IFF_VNET_HDR": ValueOf(syscall.IFF_VNET_HDR),
+ "IFLA_ADDRESS": ValueOf(syscall.IFLA_ADDRESS),
+ "IFLA_AF_SPEC": ValueOf(syscall.IFLA_AF_SPEC),
+ "IFLA_BOND_ACTIVE_SLAVE": ValueOf(syscall.IFLA_BOND_ACTIVE_SLAVE),
+ "IFLA_BOND_AD_ACTOR_SYSTEM": ValueOf(syscall.IFLA_BOND_AD_ACTOR_SYSTEM),
+ "IFLA_BOND_AD_ACTOR_SYS_PRIO": ValueOf(syscall.IFLA_BOND_AD_ACTOR_SYS_PRIO),
+ "IFLA_BOND_AD_INFO": ValueOf(syscall.IFLA_BOND_AD_INFO),
+ "IFLA_BOND_AD_INFO_ACTOR_KEY": ValueOf(syscall.IFLA_BOND_AD_INFO_ACTOR_KEY),
+ "IFLA_BOND_AD_INFO_AGGREGATOR": ValueOf(syscall.IFLA_BOND_AD_INFO_AGGREGATOR),
+ "IFLA_BOND_AD_INFO_NUM_PORTS": ValueOf(syscall.IFLA_BOND_AD_INFO_NUM_PORTS),
+ "IFLA_BOND_AD_INFO_PARTNER_KEY": ValueOf(syscall.IFLA_BOND_AD_INFO_PARTNER_KEY),
+ "IFLA_BOND_AD_INFO_PARTNER_MAC": ValueOf(syscall.IFLA_BOND_AD_INFO_PARTNER_MAC),
+ "IFLA_BOND_AD_INFO_UNSPEC": ValueOf(syscall.IFLA_BOND_AD_INFO_UNSPEC),
+ "IFLA_BOND_AD_LACP_RATE": ValueOf(syscall.IFLA_BOND_AD_LACP_RATE),
+ "IFLA_BOND_AD_SELECT": ValueOf(syscall.IFLA_BOND_AD_SELECT),
+ "IFLA_BOND_AD_USER_PORT_KEY": ValueOf(syscall.IFLA_BOND_AD_USER_PORT_KEY),
+ "IFLA_BOND_ALL_SLAVES_ACTIVE": ValueOf(syscall.IFLA_BOND_ALL_SLAVES_ACTIVE),
+ "IFLA_BOND_ARP_ALL_TARGETS": ValueOf(syscall.IFLA_BOND_ARP_ALL_TARGETS),
+ "IFLA_BOND_ARP_INTERVAL": ValueOf(syscall.IFLA_BOND_ARP_INTERVAL),
+ "IFLA_BOND_ARP_IP_TARGET": ValueOf(syscall.IFLA_BOND_ARP_IP_TARGET),
+ "IFLA_BOND_ARP_VALIDATE": ValueOf(syscall.IFLA_BOND_ARP_VALIDATE),
+ "IFLA_BOND_DOWNDELAY": ValueOf(syscall.IFLA_BOND_DOWNDELAY),
+ "IFLA_BOND_FAIL_OVER_MAC": ValueOf(syscall.IFLA_BOND_FAIL_OVER_MAC),
+ "IFLA_BOND_LP_INTERVAL": ValueOf(syscall.IFLA_BOND_LP_INTERVAL),
+ "IFLA_BOND_MIIMON": ValueOf(syscall.IFLA_BOND_MIIMON),
+ "IFLA_BOND_MIN_LINKS": ValueOf(syscall.IFLA_BOND_MIN_LINKS),
+ "IFLA_BOND_MODE": ValueOf(syscall.IFLA_BOND_MODE),
+ "IFLA_BOND_NUM_PEER_NOTIF": ValueOf(syscall.IFLA_BOND_NUM_PEER_NOTIF),
+ "IFLA_BOND_PACKETS_PER_SLAVE": ValueOf(syscall.IFLA_BOND_PACKETS_PER_SLAVE),
+ "IFLA_BOND_PRIMARY": ValueOf(syscall.IFLA_BOND_PRIMARY),
+ "IFLA_BOND_PRIMARY_RESELECT": ValueOf(syscall.IFLA_BOND_PRIMARY_RESELECT),
+ "IFLA_BOND_RESEND_IGMP": ValueOf(syscall.IFLA_BOND_RESEND_IGMP),
+ "IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE),
+ "IFLA_BOND_SLAVE_AD_AGGREGATOR_ID": ValueOf(syscall.IFLA_BOND_SLAVE_AD_AGGREGATOR_ID),
+ "IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE),
+ "IFLA_BOND_SLAVE_LINK_FAILURE_COUNT": ValueOf(syscall.IFLA_BOND_SLAVE_LINK_FAILURE_COUNT),
+ "IFLA_BOND_SLAVE_MII_STATUS": ValueOf(syscall.IFLA_BOND_SLAVE_MII_STATUS),
+ "IFLA_BOND_SLAVE_PERM_HWADDR": ValueOf(syscall.IFLA_BOND_SLAVE_PERM_HWADDR),
+ "IFLA_BOND_SLAVE_QUEUE_ID": ValueOf(syscall.IFLA_BOND_SLAVE_QUEUE_ID),
+ "IFLA_BOND_SLAVE_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_STATE),
+ "IFLA_BOND_SLAVE_UNSPEC": ValueOf(syscall.IFLA_BOND_SLAVE_UNSPEC),
+ "IFLA_BOND_TLB_DYNAMIC_LB": ValueOf(syscall.IFLA_BOND_TLB_DYNAMIC_LB),
+ "IFLA_BOND_UNSPEC": ValueOf(syscall.IFLA_BOND_UNSPEC),
+ "IFLA_BOND_UPDELAY": ValueOf(syscall.IFLA_BOND_UPDELAY),
+ "IFLA_BOND_USE_CARRIER": ValueOf(syscall.IFLA_BOND_USE_CARRIER),
+ "IFLA_BOND_XMIT_HASH_POLICY": ValueOf(syscall.IFLA_BOND_XMIT_HASH_POLICY),
+ "IFLA_BROADCAST": ValueOf(syscall.IFLA_BROADCAST),
+ "IFLA_BRPORT_BCAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_BCAST_FLOOD),
+ "IFLA_BRPORT_BRIDGE_ID": ValueOf(syscall.IFLA_BRPORT_BRIDGE_ID),
+ "IFLA_BRPORT_CONFIG_PENDING": ValueOf(syscall.IFLA_BRPORT_CONFIG_PENDING),
+ "IFLA_BRPORT_COST": ValueOf(syscall.IFLA_BRPORT_COST),
+ "IFLA_BRPORT_DESIGNATED_COST": ValueOf(syscall.IFLA_BRPORT_DESIGNATED_COST),
+ "IFLA_BRPORT_DESIGNATED_PORT": ValueOf(syscall.IFLA_BRPORT_DESIGNATED_PORT),
+ "IFLA_BRPORT_FAST_LEAVE": ValueOf(syscall.IFLA_BRPORT_FAST_LEAVE),
+ "IFLA_BRPORT_FLUSH": ValueOf(syscall.IFLA_BRPORT_FLUSH),
+ "IFLA_BRPORT_FORWARD_DELAY_TIMER": ValueOf(syscall.IFLA_BRPORT_FORWARD_DELAY_TIMER),
+ "IFLA_BRPORT_GROUP_FWD_MASK": ValueOf(syscall.IFLA_BRPORT_GROUP_FWD_MASK),
+ "IFLA_BRPORT_GUARD": ValueOf(syscall.IFLA_BRPORT_GUARD),
+ "IFLA_BRPORT_HOLD_TIMER": ValueOf(syscall.IFLA_BRPORT_HOLD_TIMER),
+ "IFLA_BRPORT_ID": ValueOf(syscall.IFLA_BRPORT_ID),
+ "IFLA_BRPORT_LEARNING": ValueOf(syscall.IFLA_BRPORT_LEARNING),
+ "IFLA_BRPORT_LEARNING_SYNC": ValueOf(syscall.IFLA_BRPORT_LEARNING_SYNC),
+ "IFLA_BRPORT_MCAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_MCAST_FLOOD),
+ "IFLA_BRPORT_MCAST_TO_UCAST": ValueOf(syscall.IFLA_BRPORT_MCAST_TO_UCAST),
+ "IFLA_BRPORT_MESSAGE_AGE_TIMER": ValueOf(syscall.IFLA_BRPORT_MESSAGE_AGE_TIMER),
+ "IFLA_BRPORT_MODE": ValueOf(syscall.IFLA_BRPORT_MODE),
+ "IFLA_BRPORT_MULTICAST_ROUTER": ValueOf(syscall.IFLA_BRPORT_MULTICAST_ROUTER),
+ "IFLA_BRPORT_NEIGH_SUPPRESS": ValueOf(syscall.IFLA_BRPORT_NEIGH_SUPPRESS),
+ "IFLA_BRPORT_NO": ValueOf(syscall.IFLA_BRPORT_NO),
+ "IFLA_BRPORT_PAD": ValueOf(syscall.IFLA_BRPORT_PAD),
+ "IFLA_BRPORT_PRIORITY": ValueOf(syscall.IFLA_BRPORT_PRIORITY),
+ "IFLA_BRPORT_PROTECT": ValueOf(syscall.IFLA_BRPORT_PROTECT),
+ "IFLA_BRPORT_PROXYARP": ValueOf(syscall.IFLA_BRPORT_PROXYARP),
+ "IFLA_BRPORT_PROXYARP_WIFI": ValueOf(syscall.IFLA_BRPORT_PROXYARP_WIFI),
+ "IFLA_BRPORT_ROOT_ID": ValueOf(syscall.IFLA_BRPORT_ROOT_ID),
+ "IFLA_BRPORT_STATE": ValueOf(syscall.IFLA_BRPORT_STATE),
+ "IFLA_BRPORT_TOPOLOGY_CHANGE_ACK": ValueOf(syscall.IFLA_BRPORT_TOPOLOGY_CHANGE_ACK),
+ "IFLA_BRPORT_UNICAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_UNICAST_FLOOD),
+ "IFLA_BRPORT_UNSPEC": ValueOf(syscall.IFLA_BRPORT_UNSPEC),
+ "IFLA_BRPORT_VLAN_TUNNEL": ValueOf(syscall.IFLA_BRPORT_VLAN_TUNNEL),
+ "IFLA_BR_AGEING_TIME": ValueOf(syscall.IFLA_BR_AGEING_TIME),
+ "IFLA_BR_BRIDGE_ID": ValueOf(syscall.IFLA_BR_BRIDGE_ID),
+ "IFLA_BR_FDB_FLUSH": ValueOf(syscall.IFLA_BR_FDB_FLUSH),
+ "IFLA_BR_FORWARD_DELAY": ValueOf(syscall.IFLA_BR_FORWARD_DELAY),
+ "IFLA_BR_GC_TIMER": ValueOf(syscall.IFLA_BR_GC_TIMER),
+ "IFLA_BR_GROUP_ADDR": ValueOf(syscall.IFLA_BR_GROUP_ADDR),
+ "IFLA_BR_GROUP_FWD_MASK": ValueOf(syscall.IFLA_BR_GROUP_FWD_MASK),
+ "IFLA_BR_HELLO_TIME": ValueOf(syscall.IFLA_BR_HELLO_TIME),
+ "IFLA_BR_HELLO_TIMER": ValueOf(syscall.IFLA_BR_HELLO_TIMER),
+ "IFLA_BR_MAX_AGE": ValueOf(syscall.IFLA_BR_MAX_AGE),
+ "IFLA_BR_MCAST_HASH_ELASTICITY": ValueOf(syscall.IFLA_BR_MCAST_HASH_ELASTICITY),
+ "IFLA_BR_MCAST_HASH_MAX": ValueOf(syscall.IFLA_BR_MCAST_HASH_MAX),
+ "IFLA_BR_MCAST_IGMP_VERSION": ValueOf(syscall.IFLA_BR_MCAST_IGMP_VERSION),
+ "IFLA_BR_MCAST_LAST_MEMBER_CNT": ValueOf(syscall.IFLA_BR_MCAST_LAST_MEMBER_CNT),
+ "IFLA_BR_MCAST_LAST_MEMBER_INTVL": ValueOf(syscall.IFLA_BR_MCAST_LAST_MEMBER_INTVL),
+ "IFLA_BR_MCAST_MEMBERSHIP_INTVL": ValueOf(syscall.IFLA_BR_MCAST_MEMBERSHIP_INTVL),
+ "IFLA_BR_MCAST_MLD_VERSION": ValueOf(syscall.IFLA_BR_MCAST_MLD_VERSION),
+ "IFLA_BR_MCAST_QUERIER": ValueOf(syscall.IFLA_BR_MCAST_QUERIER),
+ "IFLA_BR_MCAST_QUERIER_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERIER_INTVL),
+ "IFLA_BR_MCAST_QUERY_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERY_INTVL),
+ "IFLA_BR_MCAST_QUERY_RESPONSE_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERY_RESPONSE_INTVL),
+ "IFLA_BR_MCAST_QUERY_USE_IFADDR": ValueOf(syscall.IFLA_BR_MCAST_QUERY_USE_IFADDR),
+ "IFLA_BR_MCAST_ROUTER": ValueOf(syscall.IFLA_BR_MCAST_ROUTER),
+ "IFLA_BR_MCAST_SNOOPING": ValueOf(syscall.IFLA_BR_MCAST_SNOOPING),
+ "IFLA_BR_MCAST_STARTUP_QUERY_CNT": ValueOf(syscall.IFLA_BR_MCAST_STARTUP_QUERY_CNT),
+ "IFLA_BR_MCAST_STARTUP_QUERY_INTVL": ValueOf(syscall.IFLA_BR_MCAST_STARTUP_QUERY_INTVL),
+ "IFLA_BR_MCAST_STATS_ENABLED": ValueOf(syscall.IFLA_BR_MCAST_STATS_ENABLED),
+ "IFLA_BR_NF_CALL_ARPTABLES": ValueOf(syscall.IFLA_BR_NF_CALL_ARPTABLES),
+ "IFLA_BR_NF_CALL_IP6TABLES": ValueOf(syscall.IFLA_BR_NF_CALL_IP6TABLES),
+ "IFLA_BR_NF_CALL_IPTABLES": ValueOf(syscall.IFLA_BR_NF_CALL_IPTABLES),
+ "IFLA_BR_PAD": ValueOf(syscall.IFLA_BR_PAD),
+ "IFLA_BR_PRIORITY": ValueOf(syscall.IFLA_BR_PRIORITY),
+ "IFLA_BR_ROOT_ID": ValueOf(syscall.IFLA_BR_ROOT_ID),
+ "IFLA_BR_ROOT_PATH_COST": ValueOf(syscall.IFLA_BR_ROOT_PATH_COST),
+ "IFLA_BR_ROOT_PORT": ValueOf(syscall.IFLA_BR_ROOT_PORT),
+ "IFLA_BR_STP_STATE": ValueOf(syscall.IFLA_BR_STP_STATE),
+ "IFLA_BR_TCN_TIMER": ValueOf(syscall.IFLA_BR_TCN_TIMER),
+ "IFLA_BR_TOPOLOGY_CHANGE": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE),
+ "IFLA_BR_TOPOLOGY_CHANGE_DETECTED": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE_DETECTED),
+ "IFLA_BR_TOPOLOGY_CHANGE_TIMER": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE_TIMER),
+ "IFLA_BR_UNSPEC": ValueOf(syscall.IFLA_BR_UNSPEC),
+ "IFLA_BR_VLAN_DEFAULT_PVID": ValueOf(syscall.IFLA_BR_VLAN_DEFAULT_PVID),
+ "IFLA_BR_VLAN_FILTERING": ValueOf(syscall.IFLA_BR_VLAN_FILTERING),
+ "IFLA_BR_VLAN_PROTOCOL": ValueOf(syscall.IFLA_BR_VLAN_PROTOCOL),
+ "IFLA_BR_VLAN_STATS_ENABLED": ValueOf(syscall.IFLA_BR_VLAN_STATS_ENABLED),
+ "IFLA_CARRIER": ValueOf(syscall.IFLA_CARRIER),
+ "IFLA_CARRIER_CHANGES": ValueOf(syscall.IFLA_CARRIER_CHANGES),
+ "IFLA_COST": ValueOf(syscall.IFLA_COST),
+ "IFLA_EVENT": ValueOf(syscall.IFLA_EVENT),
+ "IFLA_EVENT_BONDING_FAILOVER": ValueOf(syscall.IFLA_EVENT_BONDING_FAILOVER),
+ "IFLA_EVENT_BONDING_OPTIONS": ValueOf(syscall.IFLA_EVENT_BONDING_OPTIONS),
+ "IFLA_EVENT_FEATURES": ValueOf(syscall.IFLA_EVENT_FEATURES),
+ "IFLA_EVENT_IGMP_RESEND": ValueOf(syscall.IFLA_EVENT_IGMP_RESEND),
+ "IFLA_EVENT_NONE": ValueOf(syscall.IFLA_EVENT_NONE),
+ "IFLA_EVENT_NOTIFY_PEERS": ValueOf(syscall.IFLA_EVENT_NOTIFY_PEERS),
+ "IFLA_EVENT_REBOOT": ValueOf(syscall.IFLA_EVENT_REBOOT),
+ "IFLA_EXT_MASK": ValueOf(syscall.IFLA_EXT_MASK),
+ "IFLA_GENEVE_COLLECT_METADATA": ValueOf(syscall.IFLA_GENEVE_COLLECT_METADATA),
+ "IFLA_GENEVE_ID": ValueOf(syscall.IFLA_GENEVE_ID),
+ "IFLA_GENEVE_LABEL": ValueOf(syscall.IFLA_GENEVE_LABEL),
+ "IFLA_GENEVE_PORT": ValueOf(syscall.IFLA_GENEVE_PORT),
+ "IFLA_GENEVE_REMOTE": ValueOf(syscall.IFLA_GENEVE_REMOTE),
+ "IFLA_GENEVE_REMOTE6": ValueOf(syscall.IFLA_GENEVE_REMOTE6),
+ "IFLA_GENEVE_TOS": ValueOf(syscall.IFLA_GENEVE_TOS),
+ "IFLA_GENEVE_TTL": ValueOf(syscall.IFLA_GENEVE_TTL),
+ "IFLA_GENEVE_UDP_CSUM": ValueOf(syscall.IFLA_GENEVE_UDP_CSUM),
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_RX": ValueOf(syscall.IFLA_GENEVE_UDP_ZERO_CSUM6_RX),
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_TX": ValueOf(syscall.IFLA_GENEVE_UDP_ZERO_CSUM6_TX),
+ "IFLA_GENEVE_UNSPEC": ValueOf(syscall.IFLA_GENEVE_UNSPEC),
+ "IFLA_GROUP": ValueOf(syscall.IFLA_GROUP),
+ "IFLA_GSO_MAX_SEGS": ValueOf(syscall.IFLA_GSO_MAX_SEGS),
+ "IFLA_GSO_MAX_SIZE": ValueOf(syscall.IFLA_GSO_MAX_SIZE),
+ "IFLA_GTP_FD0": ValueOf(syscall.IFLA_GTP_FD0),
+ "IFLA_GTP_FD1": ValueOf(syscall.IFLA_GTP_FD1),
+ "IFLA_GTP_PDP_HASHSIZE": ValueOf(syscall.IFLA_GTP_PDP_HASHSIZE),
+ "IFLA_GTP_ROLE": ValueOf(syscall.IFLA_GTP_ROLE),
+ "IFLA_GTP_UNSPEC": ValueOf(syscall.IFLA_GTP_UNSPEC),
+ "IFLA_HSR_MULTICAST_SPEC": ValueOf(syscall.IFLA_HSR_MULTICAST_SPEC),
+ "IFLA_HSR_SEQ_NR": ValueOf(syscall.IFLA_HSR_SEQ_NR),
+ "IFLA_HSR_SLAVE1": ValueOf(syscall.IFLA_HSR_SLAVE1),
+ "IFLA_HSR_SLAVE2": ValueOf(syscall.IFLA_HSR_SLAVE2),
+ "IFLA_HSR_SUPERVISION_ADDR": ValueOf(syscall.IFLA_HSR_SUPERVISION_ADDR),
+ "IFLA_HSR_UNSPEC": ValueOf(syscall.IFLA_HSR_UNSPEC),
+ "IFLA_HSR_VERSION": ValueOf(syscall.IFLA_HSR_VERSION),
+ "IFLA_IFALIAS": ValueOf(syscall.IFLA_IFALIAS),
+ "IFLA_IFNAME": ValueOf(syscall.IFLA_IFNAME),
+ "IFLA_IF_NETNSID": ValueOf(syscall.IFLA_IF_NETNSID),
+ "IFLA_INET6_ADDR_GEN_MODE": ValueOf(syscall.IFLA_INET6_ADDR_GEN_MODE),
+ "IFLA_INET6_CACHEINFO": ValueOf(syscall.IFLA_INET6_CACHEINFO),
+ "IFLA_INET6_CONF": ValueOf(syscall.IFLA_INET6_CONF),
+ "IFLA_INET6_FLAGS": ValueOf(syscall.IFLA_INET6_FLAGS),
+ "IFLA_INET6_ICMP6STATS": ValueOf(syscall.IFLA_INET6_ICMP6STATS),
+ "IFLA_INET6_MCAST": ValueOf(syscall.IFLA_INET6_MCAST),
+ "IFLA_INET6_STATS": ValueOf(syscall.IFLA_INET6_STATS),
+ "IFLA_INET6_TOKEN": ValueOf(syscall.IFLA_INET6_TOKEN),
+ "IFLA_INET6_UNSPEC": ValueOf(syscall.IFLA_INET6_UNSPEC),
+ "IFLA_INET_CONF": ValueOf(syscall.IFLA_INET_CONF),
+ "IFLA_INET_UNSPEC": ValueOf(syscall.IFLA_INET_UNSPEC),
+ "IFLA_INFO_DATA": ValueOf(syscall.IFLA_INFO_DATA),
+ "IFLA_INFO_KIND": ValueOf(syscall.IFLA_INFO_KIND),
+ "IFLA_INFO_SLAVE_DATA": ValueOf(syscall.IFLA_INFO_SLAVE_DATA),
+ "IFLA_INFO_SLAVE_KIND": ValueOf(syscall.IFLA_INFO_SLAVE_KIND),
+ "IFLA_INFO_UNSPEC": ValueOf(syscall.IFLA_INFO_UNSPEC),
+ "IFLA_INFO_XSTATS": ValueOf(syscall.IFLA_INFO_XSTATS),
+ "IFLA_IPOIB_MODE": ValueOf(syscall.IFLA_IPOIB_MODE),
+ "IFLA_IPOIB_PKEY": ValueOf(syscall.IFLA_IPOIB_PKEY),
+ "IFLA_IPOIB_UMCAST": ValueOf(syscall.IFLA_IPOIB_UMCAST),
+ "IFLA_IPOIB_UNSPEC": ValueOf(syscall.IFLA_IPOIB_UNSPEC),
+ "IFLA_IPVLAN_FLAGS": ValueOf(syscall.IFLA_IPVLAN_FLAGS),
+ "IFLA_IPVLAN_MODE": ValueOf(syscall.IFLA_IPVLAN_MODE),
+ "IFLA_IPVLAN_UNSPEC": ValueOf(syscall.IFLA_IPVLAN_UNSPEC),
+ "IFLA_LINK": ValueOf(syscall.IFLA_LINK),
+ "IFLA_LINKINFO": ValueOf(syscall.IFLA_LINKINFO),
+ "IFLA_LINKMODE": ValueOf(syscall.IFLA_LINKMODE),
+ "IFLA_LINK_NETNSID": ValueOf(syscall.IFLA_LINK_NETNSID),
+ "IFLA_MACSEC_CIPHER_SUITE": ValueOf(syscall.IFLA_MACSEC_CIPHER_SUITE),
+ "IFLA_MACSEC_ENCODING_SA": ValueOf(syscall.IFLA_MACSEC_ENCODING_SA),
+ "IFLA_MACSEC_ENCRYPT": ValueOf(syscall.IFLA_MACSEC_ENCRYPT),
+ "IFLA_MACSEC_ES": ValueOf(syscall.IFLA_MACSEC_ES),
+ "IFLA_MACSEC_ICV_LEN": ValueOf(syscall.IFLA_MACSEC_ICV_LEN),
+ "IFLA_MACSEC_INC_SCI": ValueOf(syscall.IFLA_MACSEC_INC_SCI),
+ "IFLA_MACSEC_PAD": ValueOf(syscall.IFLA_MACSEC_PAD),
+ "IFLA_MACSEC_PORT": ValueOf(syscall.IFLA_MACSEC_PORT),
+ "IFLA_MACSEC_PROTECT": ValueOf(syscall.IFLA_MACSEC_PROTECT),
+ "IFLA_MACSEC_REPLAY_PROTECT": ValueOf(syscall.IFLA_MACSEC_REPLAY_PROTECT),
+ "IFLA_MACSEC_SCB": ValueOf(syscall.IFLA_MACSEC_SCB),
+ "IFLA_MACSEC_SCI": ValueOf(syscall.IFLA_MACSEC_SCI),
+ "IFLA_MACSEC_UNSPEC": ValueOf(syscall.IFLA_MACSEC_UNSPEC),
+ "IFLA_MACSEC_VALIDATION": ValueOf(syscall.IFLA_MACSEC_VALIDATION),
+ "IFLA_MACSEC_WINDOW": ValueOf(syscall.IFLA_MACSEC_WINDOW),
+ "IFLA_MACVLAN_FLAGS": ValueOf(syscall.IFLA_MACVLAN_FLAGS),
+ "IFLA_MACVLAN_MACADDR": ValueOf(syscall.IFLA_MACVLAN_MACADDR),
+ "IFLA_MACVLAN_MACADDR_COUNT": ValueOf(syscall.IFLA_MACVLAN_MACADDR_COUNT),
+ "IFLA_MACVLAN_MACADDR_DATA": ValueOf(syscall.IFLA_MACVLAN_MACADDR_DATA),
+ "IFLA_MACVLAN_MACADDR_MODE": ValueOf(syscall.IFLA_MACVLAN_MACADDR_MODE),
+ "IFLA_MACVLAN_MODE": ValueOf(syscall.IFLA_MACVLAN_MODE),
+ "IFLA_MACVLAN_UNSPEC": ValueOf(syscall.IFLA_MACVLAN_UNSPEC),
+ "IFLA_MAP": ValueOf(syscall.IFLA_MAP),
+ "IFLA_MASTER": ValueOf(syscall.IFLA_MASTER),
+ "IFLA_MTU": ValueOf(syscall.IFLA_MTU),
+ "IFLA_NET_NS_FD": ValueOf(syscall.IFLA_NET_NS_FD),
+ "IFLA_NET_NS_PID": ValueOf(syscall.IFLA_NET_NS_PID),
+ "IFLA_NEW_NETNSID": ValueOf(syscall.IFLA_NEW_NETNSID),
+ "IFLA_NUM_RX_QUEUES": ValueOf(syscall.IFLA_NUM_RX_QUEUES),
+ "IFLA_NUM_TX_QUEUES": ValueOf(syscall.IFLA_NUM_TX_QUEUES),
+ "IFLA_NUM_VF": ValueOf(syscall.IFLA_NUM_VF),
+ "IFLA_OFFLOAD_XSTATS_CPU_HIT": ValueOf(syscall.IFLA_OFFLOAD_XSTATS_CPU_HIT),
+ "IFLA_OFFLOAD_XSTATS_UNSPEC": ValueOf(syscall.IFLA_OFFLOAD_XSTATS_UNSPEC),
+ "IFLA_OPERSTATE": ValueOf(syscall.IFLA_OPERSTATE),
+ "IFLA_PAD": ValueOf(syscall.IFLA_PAD),
+ "IFLA_PHYS_PORT_ID": ValueOf(syscall.IFLA_PHYS_PORT_ID),
+ "IFLA_PHYS_PORT_NAME": ValueOf(syscall.IFLA_PHYS_PORT_NAME),
+ "IFLA_PHYS_SWITCH_ID": ValueOf(syscall.IFLA_PHYS_SWITCH_ID),
+ "IFLA_PORT_HOST_UUID": ValueOf(syscall.IFLA_PORT_HOST_UUID),
+ "IFLA_PORT_INSTANCE_UUID": ValueOf(syscall.IFLA_PORT_INSTANCE_UUID),
+ "IFLA_PORT_PROFILE": ValueOf(syscall.IFLA_PORT_PROFILE),
+ "IFLA_PORT_REQUEST": ValueOf(syscall.IFLA_PORT_REQUEST),
+ "IFLA_PORT_RESPONSE": ValueOf(syscall.IFLA_PORT_RESPONSE),
+ "IFLA_PORT_SELF": ValueOf(syscall.IFLA_PORT_SELF),
+ "IFLA_PORT_UNSPEC": ValueOf(syscall.IFLA_PORT_UNSPEC),
+ "IFLA_PORT_VF": ValueOf(syscall.IFLA_PORT_VF),
+ "IFLA_PORT_VSI_TYPE": ValueOf(syscall.IFLA_PORT_VSI_TYPE),
+ "IFLA_PPP_DEV_FD": ValueOf(syscall.IFLA_PPP_DEV_FD),
+ "IFLA_PPP_UNSPEC": ValueOf(syscall.IFLA_PPP_UNSPEC),
+ "IFLA_PRIORITY": ValueOf(syscall.IFLA_PRIORITY),
+ "IFLA_PROMISCUITY": ValueOf(syscall.IFLA_PROMISCUITY),
+ "IFLA_PROTINFO": ValueOf(syscall.IFLA_PROTINFO),
+ "IFLA_PROTO_DOWN": ValueOf(syscall.IFLA_PROTO_DOWN),
+ "IFLA_QDISC": ValueOf(syscall.IFLA_QDISC),
+ "IFLA_STATS": ValueOf(syscall.IFLA_STATS),
+ "IFLA_STATS64": ValueOf(syscall.IFLA_STATS64),
+ "IFLA_STATS_AF_SPEC": ValueOf(syscall.IFLA_STATS_AF_SPEC),
+ "IFLA_STATS_LINK_64": ValueOf(syscall.IFLA_STATS_LINK_64),
+ "IFLA_STATS_LINK_OFFLOAD_XSTATS": ValueOf(syscall.IFLA_STATS_LINK_OFFLOAD_XSTATS),
+ "IFLA_STATS_LINK_XSTATS": ValueOf(syscall.IFLA_STATS_LINK_XSTATS),
+ "IFLA_STATS_LINK_XSTATS_SLAVE": ValueOf(syscall.IFLA_STATS_LINK_XSTATS_SLAVE),
+ "IFLA_STATS_UNSPEC": ValueOf(syscall.IFLA_STATS_UNSPEC),
+ "IFLA_TXQLEN": ValueOf(syscall.IFLA_TXQLEN),
+ "IFLA_UNSPEC": ValueOf(syscall.IFLA_UNSPEC),
+ "IFLA_VFINFO_LIST": ValueOf(syscall.IFLA_VFINFO_LIST),
+ "IFLA_VF_IB_NODE_GUID": ValueOf(syscall.IFLA_VF_IB_NODE_GUID),
+ "IFLA_VF_IB_PORT_GUID": ValueOf(syscall.IFLA_VF_IB_PORT_GUID),
+ "IFLA_VF_INFO": ValueOf(syscall.IFLA_VF_INFO),
+ "IFLA_VF_INFO_UNSPEC": ValueOf(syscall.IFLA_VF_INFO_UNSPEC),
+ "IFLA_VF_LINK_STATE": ValueOf(syscall.IFLA_VF_LINK_STATE),
+ "IFLA_VF_LINK_STATE_AUTO": ValueOf(syscall.IFLA_VF_LINK_STATE_AUTO),
+ "IFLA_VF_LINK_STATE_DISABLE": ValueOf(syscall.IFLA_VF_LINK_STATE_DISABLE),
+ "IFLA_VF_LINK_STATE_ENABLE": ValueOf(syscall.IFLA_VF_LINK_STATE_ENABLE),
+ "IFLA_VF_MAC": ValueOf(syscall.IFLA_VF_MAC),
+ "IFLA_VF_PORT": ValueOf(syscall.IFLA_VF_PORT),
+ "IFLA_VF_PORTS": ValueOf(syscall.IFLA_VF_PORTS),
+ "IFLA_VF_PORT_UNSPEC": ValueOf(syscall.IFLA_VF_PORT_UNSPEC),
+ "IFLA_VF_RATE": ValueOf(syscall.IFLA_VF_RATE),
+ "IFLA_VF_RSS_QUERY_EN": ValueOf(syscall.IFLA_VF_RSS_QUERY_EN),
+ "IFLA_VF_SPOOFCHK": ValueOf(syscall.IFLA_VF_SPOOFCHK),
+ "IFLA_VF_STATS": ValueOf(syscall.IFLA_VF_STATS),
+ "IFLA_VF_STATS_BROADCAST": ValueOf(syscall.IFLA_VF_STATS_BROADCAST),
+ "IFLA_VF_STATS_MULTICAST": ValueOf(syscall.IFLA_VF_STATS_MULTICAST),
+ "IFLA_VF_STATS_PAD": ValueOf(syscall.IFLA_VF_STATS_PAD),
+ "IFLA_VF_STATS_RX_BYTES": ValueOf(syscall.IFLA_VF_STATS_RX_BYTES),
+ "IFLA_VF_STATS_RX_PACKETS": ValueOf(syscall.IFLA_VF_STATS_RX_PACKETS),
+ "IFLA_VF_STATS_TX_BYTES": ValueOf(syscall.IFLA_VF_STATS_TX_BYTES),
+ "IFLA_VF_STATS_TX_PACKETS": ValueOf(syscall.IFLA_VF_STATS_TX_PACKETS),
+ "IFLA_VF_TRUST": ValueOf(syscall.IFLA_VF_TRUST),
+ "IFLA_VF_TX_RATE": ValueOf(syscall.IFLA_VF_TX_RATE),
+ "IFLA_VF_UNSPEC": ValueOf(syscall.IFLA_VF_UNSPEC),
+ "IFLA_VF_VLAN": ValueOf(syscall.IFLA_VF_VLAN),
+ "IFLA_VF_VLAN_INFO": ValueOf(syscall.IFLA_VF_VLAN_INFO),
+ "IFLA_VF_VLAN_INFO_UNSPEC": ValueOf(syscall.IFLA_VF_VLAN_INFO_UNSPEC),
+ "IFLA_VF_VLAN_LIST": ValueOf(syscall.IFLA_VF_VLAN_LIST),
+ "IFLA_VLAN_EGRESS_QOS": ValueOf(syscall.IFLA_VLAN_EGRESS_QOS),
+ "IFLA_VLAN_FLAGS": ValueOf(syscall.IFLA_VLAN_FLAGS),
+ "IFLA_VLAN_ID": ValueOf(syscall.IFLA_VLAN_ID),
+ "IFLA_VLAN_INGRESS_QOS": ValueOf(syscall.IFLA_VLAN_INGRESS_QOS),
+ "IFLA_VLAN_PROTOCOL": ValueOf(syscall.IFLA_VLAN_PROTOCOL),
+ "IFLA_VLAN_QOS_MAPPING": ValueOf(syscall.IFLA_VLAN_QOS_MAPPING),
+ "IFLA_VLAN_QOS_UNSPEC": ValueOf(syscall.IFLA_VLAN_QOS_UNSPEC),
+ "IFLA_VLAN_UNSPEC": ValueOf(syscall.IFLA_VLAN_UNSPEC),
+ "IFLA_VRF_PORT_TABLE": ValueOf(syscall.IFLA_VRF_PORT_TABLE),
+ "IFLA_VRF_PORT_UNSPEC": ValueOf(syscall.IFLA_VRF_PORT_UNSPEC),
+ "IFLA_VRF_TABLE": ValueOf(syscall.IFLA_VRF_TABLE),
+ "IFLA_VRF_UNSPEC": ValueOf(syscall.IFLA_VRF_UNSPEC),
+ "IFLA_VXLAN_AGEING": ValueOf(syscall.IFLA_VXLAN_AGEING),
+ "IFLA_VXLAN_COLLECT_METADATA": ValueOf(syscall.IFLA_VXLAN_COLLECT_METADATA),
+ "IFLA_VXLAN_GBP": ValueOf(syscall.IFLA_VXLAN_GBP),
+ "IFLA_VXLAN_GPE": ValueOf(syscall.IFLA_VXLAN_GPE),
+ "IFLA_VXLAN_GROUP": ValueOf(syscall.IFLA_VXLAN_GROUP),
+ "IFLA_VXLAN_GROUP6": ValueOf(syscall.IFLA_VXLAN_GROUP6),
+ "IFLA_VXLAN_ID": ValueOf(syscall.IFLA_VXLAN_ID),
+ "IFLA_VXLAN_L2MISS": ValueOf(syscall.IFLA_VXLAN_L2MISS),
+ "IFLA_VXLAN_L3MISS": ValueOf(syscall.IFLA_VXLAN_L3MISS),
+ "IFLA_VXLAN_LABEL": ValueOf(syscall.IFLA_VXLAN_LABEL),
+ "IFLA_VXLAN_LEARNING": ValueOf(syscall.IFLA_VXLAN_LEARNING),
+ "IFLA_VXLAN_LIMIT": ValueOf(syscall.IFLA_VXLAN_LIMIT),
+ "IFLA_VXLAN_LINK": ValueOf(syscall.IFLA_VXLAN_LINK),
+ "IFLA_VXLAN_LOCAL": ValueOf(syscall.IFLA_VXLAN_LOCAL),
+ "IFLA_VXLAN_LOCAL6": ValueOf(syscall.IFLA_VXLAN_LOCAL6),
+ "IFLA_VXLAN_PORT": ValueOf(syscall.IFLA_VXLAN_PORT),
+ "IFLA_VXLAN_PORT_RANGE": ValueOf(syscall.IFLA_VXLAN_PORT_RANGE),
+ "IFLA_VXLAN_PROXY": ValueOf(syscall.IFLA_VXLAN_PROXY),
+ "IFLA_VXLAN_REMCSUM_NOPARTIAL": ValueOf(syscall.IFLA_VXLAN_REMCSUM_NOPARTIAL),
+ "IFLA_VXLAN_REMCSUM_RX": ValueOf(syscall.IFLA_VXLAN_REMCSUM_RX),
+ "IFLA_VXLAN_REMCSUM_TX": ValueOf(syscall.IFLA_VXLAN_REMCSUM_TX),
+ "IFLA_VXLAN_RSC": ValueOf(syscall.IFLA_VXLAN_RSC),
+ "IFLA_VXLAN_TOS": ValueOf(syscall.IFLA_VXLAN_TOS),
+ "IFLA_VXLAN_TTL": ValueOf(syscall.IFLA_VXLAN_TTL),
+ "IFLA_VXLAN_UDP_CSUM": ValueOf(syscall.IFLA_VXLAN_UDP_CSUM),
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_RX": ValueOf(syscall.IFLA_VXLAN_UDP_ZERO_CSUM6_RX),
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_TX": ValueOf(syscall.IFLA_VXLAN_UDP_ZERO_CSUM6_TX),
+ "IFLA_VXLAN_UNSPEC": ValueOf(syscall.IFLA_VXLAN_UNSPEC),
+ "IFLA_WEIGHT": ValueOf(syscall.IFLA_WEIGHT),
+ "IFLA_WIRELESS": ValueOf(syscall.IFLA_WIRELESS),
+ "IFLA_XDP": ValueOf(syscall.IFLA_XDP),
+ "IFLA_XDP_ATTACHED": ValueOf(syscall.IFLA_XDP_ATTACHED),
+ "IFLA_XDP_FD": ValueOf(syscall.IFLA_XDP_FD),
+ "IFLA_XDP_FLAGS": ValueOf(syscall.IFLA_XDP_FLAGS),
+ "IFLA_XDP_PROG_ID": ValueOf(syscall.IFLA_XDP_PROG_ID),
+ "IFLA_XDP_UNSPEC": ValueOf(syscall.IFLA_XDP_UNSPEC),
+ "IFNAMSIZ": ValueOf(syscall.IFNAMSIZ),
+ "IGNBRK": ValueOf(syscall.IGNBRK),
+ "IGNCR": ValueOf(syscall.IGNCR),
+ "IGNPAR": ValueOf(syscall.IGNPAR),
+ "IMAXBEL": ValueOf(syscall.IMAXBEL),
+ "INLCR": ValueOf(syscall.INLCR),
+ "INPCK": ValueOf(syscall.INPCK),
+ "IN_ACCESS": ValueOf(syscall.IN_ACCESS),
+ "IN_ALL_EVENTS": ValueOf(syscall.IN_ALL_EVENTS),
+ "IN_ATTRIB": ValueOf(syscall.IN_ATTRIB),
+ "IN_CLASSA_HOST": ValueOf(syscall.IN_CLASSA_HOST),
+ "IN_CLASSA_MAX": ValueOf(syscall.IN_CLASSA_MAX),
+ "IN_CLASSA_NET": ValueOf(uint32(syscall.IN_CLASSA_NET)),
+ "IN_CLASSA_NSHIFT": ValueOf(syscall.IN_CLASSA_NSHIFT),
+ "IN_CLASSB_HOST": ValueOf(syscall.IN_CLASSB_HOST),
+ "IN_CLASSB_MAX": ValueOf(syscall.IN_CLASSB_MAX),
+ "IN_CLASSB_NET": ValueOf(uint32(syscall.IN_CLASSB_NET)),
+ "IN_CLASSB_NSHIFT": ValueOf(syscall.IN_CLASSB_NSHIFT),
+ "IN_CLASSC_HOST": ValueOf(syscall.IN_CLASSC_HOST),
+ "IN_CLASSC_NET": ValueOf(uint32(syscall.IN_CLASSC_NET)),
+ "IN_CLASSC_NSHIFT": ValueOf(syscall.IN_CLASSC_NSHIFT),
+ "IN_CLOEXEC": ValueOf(syscall.IN_CLOEXEC),
+ "IN_CLOSE": ValueOf(syscall.IN_CLOSE),
+ "IN_CLOSE_NOWRITE": ValueOf(syscall.IN_CLOSE_NOWRITE),
+ "IN_CLOSE_WRITE": ValueOf(syscall.IN_CLOSE_WRITE),
+ "IN_CREATE": ValueOf(syscall.IN_CREATE),
+ "IN_DELETE": ValueOf(syscall.IN_DELETE),
+ "IN_DELETE_SELF": ValueOf(syscall.IN_DELETE_SELF),
+ "IN_DONT_FOLLOW": ValueOf(syscall.IN_DONT_FOLLOW),
+ "IN_EXCL_UNLINK": ValueOf(syscall.IN_EXCL_UNLINK),
+ "IN_IGNORED": ValueOf(syscall.IN_IGNORED),
+ "IN_ISDIR": ValueOf(syscall.IN_ISDIR),
+ "IN_LOOPBACKNET": ValueOf(syscall.IN_LOOPBACKNET),
+ "IN_MASK_ADD": ValueOf(syscall.IN_MASK_ADD),
+ "IN_MODIFY": ValueOf(syscall.IN_MODIFY),
+ "IN_MOVE": ValueOf(syscall.IN_MOVE),
+ "IN_MOVED_FROM": ValueOf(syscall.IN_MOVED_FROM),
+ "IN_MOVED_TO": ValueOf(syscall.IN_MOVED_TO),
+ "IN_MOVE_SELF": ValueOf(syscall.IN_MOVE_SELF),
+ "IN_NONBLOCK": ValueOf(syscall.IN_NONBLOCK),
+ "IN_ONESHOT": ValueOf(uint32(syscall.IN_ONESHOT)),
+ "IN_ONLYDIR": ValueOf(syscall.IN_ONLYDIR),
+ "IN_OPEN": ValueOf(syscall.IN_OPEN),
+ "IN_Q_OVERFLOW": ValueOf(syscall.IN_Q_OVERFLOW),
+ "IN_UNMOUNT": ValueOf(syscall.IN_UNMOUNT),
+ "IPPROTO_AH": ValueOf(syscall.IPPROTO_AH),
+ "IPPROTO_BEETPH": ValueOf(syscall.IPPROTO_BEETPH),
+ "IPPROTO_COMP": ValueOf(syscall.IPPROTO_COMP),
+ "IPPROTO_DCCP": ValueOf(syscall.IPPROTO_DCCP),
+ "IPPROTO_DSTOPTS": ValueOf(syscall.IPPROTO_DSTOPTS),
+ "IPPROTO_EGP": ValueOf(syscall.IPPROTO_EGP),
+ "IPPROTO_ENCAP": ValueOf(syscall.IPPROTO_ENCAP),
+ "IPPROTO_ESP": ValueOf(syscall.IPPROTO_ESP),
+ "IPPROTO_FRAGMENT": ValueOf(syscall.IPPROTO_FRAGMENT),
+ "IPPROTO_GRE": ValueOf(syscall.IPPROTO_GRE),
+ "IPPROTO_HOPOPTS": ValueOf(syscall.IPPROTO_HOPOPTS),
+ "IPPROTO_ICMP": ValueOf(syscall.IPPROTO_ICMP),
+ "IPPROTO_ICMPV6": ValueOf(syscall.IPPROTO_ICMPV6),
+ "IPPROTO_IDP": ValueOf(syscall.IPPROTO_IDP),
+ "IPPROTO_IGMP": ValueOf(syscall.IPPROTO_IGMP),
+ "IPPROTO_IP": ValueOf(syscall.IPPROTO_IP),
+ "IPPROTO_IPIP": ValueOf(syscall.IPPROTO_IPIP),
+ "IPPROTO_IPV6": ValueOf(syscall.IPPROTO_IPV6),
+ "IPPROTO_MAX": ValueOf(syscall.IPPROTO_MAX),
+ "IPPROTO_MH": ValueOf(syscall.IPPROTO_MH),
+ "IPPROTO_MPLS": ValueOf(syscall.IPPROTO_MPLS),
+ "IPPROTO_MTP": ValueOf(syscall.IPPROTO_MTP),
+ "IPPROTO_NONE": ValueOf(syscall.IPPROTO_NONE),
+ "IPPROTO_PIM": ValueOf(syscall.IPPROTO_PIM),
+ "IPPROTO_PUP": ValueOf(syscall.IPPROTO_PUP),
+ "IPPROTO_RAW": ValueOf(syscall.IPPROTO_RAW),
+ "IPPROTO_ROUTING": ValueOf(syscall.IPPROTO_ROUTING),
+ "IPPROTO_RSVP": ValueOf(syscall.IPPROTO_RSVP),
+ "IPPROTO_SCTP": ValueOf(syscall.IPPROTO_SCTP),
+ "IPPROTO_TCP": ValueOf(syscall.IPPROTO_TCP),
+ "IPPROTO_TP": ValueOf(syscall.IPPROTO_TP),
+ "IPPROTO_UDP": ValueOf(syscall.IPPROTO_UDP),
+ "IPPROTO_UDPLITE": ValueOf(syscall.IPPROTO_UDPLITE),
+ "IPV6_2292DSTOPTS": ValueOf(syscall.IPV6_2292DSTOPTS),
+ "IPV6_2292HOPLIMIT": ValueOf(syscall.IPV6_2292HOPLIMIT),
+ "IPV6_2292HOPOPTS": ValueOf(syscall.IPV6_2292HOPOPTS),
+ "IPV6_2292PKTINFO": ValueOf(syscall.IPV6_2292PKTINFO),
+ "IPV6_2292PKTOPTIONS": ValueOf(syscall.IPV6_2292PKTOPTIONS),
+ "IPV6_2292RTHDR": ValueOf(syscall.IPV6_2292RTHDR),
+ "IPV6_ADDRFORM": ValueOf(syscall.IPV6_ADDRFORM),
+ "IPV6_ADDR_PREFERENCES": ValueOf(syscall.IPV6_ADDR_PREFERENCES),
+ "IPV6_ADD_MEMBERSHIP": ValueOf(syscall.IPV6_ADD_MEMBERSHIP),
+ "IPV6_AUTHHDR": ValueOf(syscall.IPV6_AUTHHDR),
+ "IPV6_AUTOFLOWLABEL": ValueOf(syscall.IPV6_AUTOFLOWLABEL),
+ "IPV6_CHECKSUM": ValueOf(syscall.IPV6_CHECKSUM),
+ "IPV6_DONTFRAG": ValueOf(syscall.IPV6_DONTFRAG),
+ "IPV6_DROP_MEMBERSHIP": ValueOf(syscall.IPV6_DROP_MEMBERSHIP),
+ "IPV6_DSTOPTS": ValueOf(syscall.IPV6_DSTOPTS),
+ "IPV6_HDRINCL": ValueOf(syscall.IPV6_HDRINCL),
+ "IPV6_HOPLIMIT": ValueOf(syscall.IPV6_HOPLIMIT),
+ "IPV6_HOPOPTS": ValueOf(syscall.IPV6_HOPOPTS),
+ "IPV6_IPSEC_POLICY": ValueOf(syscall.IPV6_IPSEC_POLICY),
+ "IPV6_JOIN_ANYCAST": ValueOf(syscall.IPV6_JOIN_ANYCAST),
+ "IPV6_JOIN_GROUP": ValueOf(syscall.IPV6_JOIN_GROUP),
+ "IPV6_LEAVE_ANYCAST": ValueOf(syscall.IPV6_LEAVE_ANYCAST),
+ "IPV6_LEAVE_GROUP": ValueOf(syscall.IPV6_LEAVE_GROUP),
+ "IPV6_MINHOPCOUNT": ValueOf(syscall.IPV6_MINHOPCOUNT),
+ "IPV6_MTU": ValueOf(syscall.IPV6_MTU),
+ "IPV6_MTU_DISCOVER": ValueOf(syscall.IPV6_MTU_DISCOVER),
+ "IPV6_MULTICAST_HOPS": ValueOf(syscall.IPV6_MULTICAST_HOPS),
+ "IPV6_MULTICAST_IF": ValueOf(syscall.IPV6_MULTICAST_IF),
+ "IPV6_MULTICAST_LOOP": ValueOf(syscall.IPV6_MULTICAST_LOOP),
+ "IPV6_NEXTHOP": ValueOf(syscall.IPV6_NEXTHOP),
+ "IPV6_ORIGDSTADDR": ValueOf(syscall.IPV6_ORIGDSTADDR),
+ "IPV6_PATHMTU": ValueOf(syscall.IPV6_PATHMTU),
+ "IPV6_PKTINFO": ValueOf(syscall.IPV6_PKTINFO),
+ "IPV6_PMTUDISC_DO": ValueOf(syscall.IPV6_PMTUDISC_DO),
+ "IPV6_PMTUDISC_DONT": ValueOf(syscall.IPV6_PMTUDISC_DONT),
+ "IPV6_PMTUDISC_INTERFACE": ValueOf(syscall.IPV6_PMTUDISC_INTERFACE),
+ "IPV6_PMTUDISC_OMIT": ValueOf(syscall.IPV6_PMTUDISC_OMIT),
+ "IPV6_PMTUDISC_PROBE": ValueOf(syscall.IPV6_PMTUDISC_PROBE),
+ "IPV6_PMTUDISC_WANT": ValueOf(syscall.IPV6_PMTUDISC_WANT),
+ "IPV6_RECVDSTOPTS": ValueOf(syscall.IPV6_RECVDSTOPTS),
+ "IPV6_RECVERR": ValueOf(syscall.IPV6_RECVERR),
+ "IPV6_RECVFRAGSIZE": ValueOf(syscall.IPV6_RECVFRAGSIZE),
+ "IPV6_RECVHOPLIMIT": ValueOf(syscall.IPV6_RECVHOPLIMIT),
+ "IPV6_RECVHOPOPTS": ValueOf(syscall.IPV6_RECVHOPOPTS),
+ "IPV6_RECVORIGDSTADDR": ValueOf(syscall.IPV6_RECVORIGDSTADDR),
+ "IPV6_RECVPATHMTU": ValueOf(syscall.IPV6_RECVPATHMTU),
+ "IPV6_RECVPKTINFO": ValueOf(syscall.IPV6_RECVPKTINFO),
+ "IPV6_RECVRTHDR": ValueOf(syscall.IPV6_RECVRTHDR),
+ "IPV6_RECVTCLASS": ValueOf(syscall.IPV6_RECVTCLASS),
+ "IPV6_ROUTER_ALERT": ValueOf(syscall.IPV6_ROUTER_ALERT),
+ "IPV6_RTHDR": ValueOf(syscall.IPV6_RTHDR),
+ "IPV6_RTHDRDSTOPTS": ValueOf(syscall.IPV6_RTHDRDSTOPTS),
+ "IPV6_RTHDR_LOOSE": ValueOf(syscall.IPV6_RTHDR_LOOSE),
+ "IPV6_RTHDR_STRICT": ValueOf(syscall.IPV6_RTHDR_STRICT),
+ "IPV6_RTHDR_TYPE_0": ValueOf(syscall.IPV6_RTHDR_TYPE_0),
+ "IPV6_RXDSTOPTS": ValueOf(syscall.IPV6_RXDSTOPTS),
+ "IPV6_RXHOPOPTS": ValueOf(syscall.IPV6_RXHOPOPTS),
+ "IPV6_TCLASS": ValueOf(syscall.IPV6_TCLASS),
+ "IPV6_TRANSPARENT": ValueOf(syscall.IPV6_TRANSPARENT),
+ "IPV6_UNICAST_HOPS": ValueOf(syscall.IPV6_UNICAST_HOPS),
+ "IPV6_UNICAST_IF": ValueOf(syscall.IPV6_UNICAST_IF),
+ "IPV6_V6ONLY": ValueOf(syscall.IPV6_V6ONLY),
+ "IPV6_XFRM_POLICY": ValueOf(syscall.IPV6_XFRM_POLICY),
+ "IP_ADD_MEMBERSHIP": ValueOf(syscall.IP_ADD_MEMBERSHIP),
+ "IP_ADD_SOURCE_MEMBERSHIP": ValueOf(syscall.IP_ADD_SOURCE_MEMBERSHIP),
+ "IP_BIND_ADDRESS_NO_PORT": ValueOf(syscall.IP_BIND_ADDRESS_NO_PORT),
+ "IP_BLOCK_SOURCE": ValueOf(syscall.IP_BLOCK_SOURCE),
+ "IP_CHECKSUM": ValueOf(syscall.IP_CHECKSUM),
+ "IP_DEFAULT_MULTICAST_LOOP": ValueOf(syscall.IP_DEFAULT_MULTICAST_LOOP),
+ "IP_DEFAULT_MULTICAST_TTL": ValueOf(syscall.IP_DEFAULT_MULTICAST_TTL),
+ "IP_DF": ValueOf(syscall.IP_DF),
+ "IP_DROP_MEMBERSHIP": ValueOf(syscall.IP_DROP_MEMBERSHIP),
+ "IP_DROP_SOURCE_MEMBERSHIP": ValueOf(syscall.IP_DROP_SOURCE_MEMBERSHIP),
+ "IP_FREEBIND": ValueOf(syscall.IP_FREEBIND),
+ "IP_HDRINCL": ValueOf(syscall.IP_HDRINCL),
+ "IP_IPSEC_POLICY": ValueOf(syscall.IP_IPSEC_POLICY),
+ "IP_MAXPACKET": ValueOf(syscall.IP_MAXPACKET),
+ "IP_MAX_MEMBERSHIPS": ValueOf(syscall.IP_MAX_MEMBERSHIPS),
+ "IP_MF": ValueOf(syscall.IP_MF),
+ "IP_MINTTL": ValueOf(syscall.IP_MINTTL),
+ "IP_MSFILTER": ValueOf(syscall.IP_MSFILTER),
+ "IP_MSS": ValueOf(syscall.IP_MSS),
+ "IP_MTU": ValueOf(syscall.IP_MTU),
+ "IP_MTU_DISCOVER": ValueOf(syscall.IP_MTU_DISCOVER),
+ "IP_MULTICAST_ALL": ValueOf(syscall.IP_MULTICAST_ALL),
+ "IP_MULTICAST_IF": ValueOf(syscall.IP_MULTICAST_IF),
+ "IP_MULTICAST_LOOP": ValueOf(syscall.IP_MULTICAST_LOOP),
+ "IP_MULTICAST_TTL": ValueOf(syscall.IP_MULTICAST_TTL),
+ "IP_NODEFRAG": ValueOf(syscall.IP_NODEFRAG),
+ "IP_OFFMASK": ValueOf(syscall.IP_OFFMASK),
+ "IP_OPTIONS": ValueOf(syscall.IP_OPTIONS),
+ "IP_ORIGDSTADDR": ValueOf(syscall.IP_ORIGDSTADDR),
+ "IP_PASSSEC": ValueOf(syscall.IP_PASSSEC),
+ "IP_PKTINFO": ValueOf(syscall.IP_PKTINFO),
+ "IP_PKTOPTIONS": ValueOf(syscall.IP_PKTOPTIONS),
+ "IP_PMTUDISC": ValueOf(syscall.IP_PMTUDISC),
+ "IP_PMTUDISC_DO": ValueOf(syscall.IP_PMTUDISC_DO),
+ "IP_PMTUDISC_DONT": ValueOf(syscall.IP_PMTUDISC_DONT),
+ "IP_PMTUDISC_INTERFACE": ValueOf(syscall.IP_PMTUDISC_INTERFACE),
+ "IP_PMTUDISC_OMIT": ValueOf(syscall.IP_PMTUDISC_OMIT),
+ "IP_PMTUDISC_PROBE": ValueOf(syscall.IP_PMTUDISC_PROBE),
+ "IP_PMTUDISC_WANT": ValueOf(syscall.IP_PMTUDISC_WANT),
+ "IP_RECVERR": ValueOf(syscall.IP_RECVERR),
+ "IP_RECVFRAGSIZE": ValueOf(syscall.IP_RECVFRAGSIZE),
+ "IP_RECVOPTS": ValueOf(syscall.IP_RECVOPTS),
+ "IP_RECVORIGDSTADDR": ValueOf(syscall.IP_RECVORIGDSTADDR),
+ "IP_RECVTOS": ValueOf(syscall.IP_RECVTOS),
+ "IP_RECVTTL": ValueOf(syscall.IP_RECVTTL),
+ "IP_RETOPTS": ValueOf(syscall.IP_RETOPTS),
+ "IP_RF": ValueOf(syscall.IP_RF),
+ "IP_ROUTER_ALERT": ValueOf(syscall.IP_ROUTER_ALERT),
+ "IP_TOS": ValueOf(syscall.IP_TOS),
+ "IP_TRANSPARENT": ValueOf(syscall.IP_TRANSPARENT),
+ "IP_TTL": ValueOf(syscall.IP_TTL),
+ "IP_UNBLOCK_SOURCE": ValueOf(syscall.IP_UNBLOCK_SOURCE),
+ "IP_UNICAST_IF": ValueOf(syscall.IP_UNICAST_IF),
+ "IP_XFRM_POLICY": ValueOf(syscall.IP_XFRM_POLICY),
+ "ISIG": ValueOf(syscall.ISIG),
+ "ISTRIP": ValueOf(syscall.ISTRIP),
+ "IUCLC": ValueOf(syscall.IUCLC),
+ "IUTF8": ValueOf(syscall.IUTF8),
+ "IXANY": ValueOf(syscall.IXANY),
+ "IXOFF": ValueOf(syscall.IXOFF),
+ "IXON": ValueOf(syscall.IXON),
+ "ImplementsGetwd": ValueOf(syscall.ImplementsGetwd),
+ "InotifyAddWatch": ValueOf(syscall.InotifyAddWatch),
+ "InotifyInit": ValueOf(syscall.InotifyInit),
+ "InotifyInit1": ValueOf(syscall.InotifyInit1),
+ "InotifyRmWatch": ValueOf(syscall.InotifyRmWatch),
+ "Ioperm": ValueOf(syscall.Ioperm),
+ "Iopl": ValueOf(syscall.Iopl),
+ "Kill": ValueOf(syscall.Kill),
+ "Klogctl": ValueOf(syscall.Klogctl),
+ "LINUX_REBOOT_CMD_CAD_OFF": ValueOf(syscall.LINUX_REBOOT_CMD_CAD_OFF),
+ "LINUX_REBOOT_CMD_CAD_ON": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_CAD_ON)),
+ "LINUX_REBOOT_CMD_HALT": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_HALT)),
+ "LINUX_REBOOT_CMD_KEXEC": ValueOf(syscall.LINUX_REBOOT_CMD_KEXEC),
+ "LINUX_REBOOT_CMD_POWER_OFF": ValueOf(syscall.LINUX_REBOOT_CMD_POWER_OFF),
+ "LINUX_REBOOT_CMD_RESTART": ValueOf(syscall.LINUX_REBOOT_CMD_RESTART),
+ "LINUX_REBOOT_CMD_RESTART2": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_RESTART2)),
+ "LINUX_REBOOT_CMD_SW_SUSPEND": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_SW_SUSPEND)),
+ "LINUX_REBOOT_MAGIC1": ValueOf(uint32(syscall.LINUX_REBOOT_MAGIC1)),
+ "LINUX_REBOOT_MAGIC2": ValueOf(syscall.LINUX_REBOOT_MAGIC2),
+ "LINUX_REBOOT_MAGIC2A": ValueOf(syscall.LINUX_REBOOT_MAGIC2A),
+ "LINUX_REBOOT_MAGIC2B": ValueOf(syscall.LINUX_REBOOT_MAGIC2B),
+ "LINUX_REBOOT_MAGIC2C": ValueOf(syscall.LINUX_REBOOT_MAGIC2C),
+ "LOCK_EX": ValueOf(syscall.LOCK_EX),
+ "LOCK_MAND": ValueOf(syscall.LOCK_MAND),
+ "LOCK_NB": ValueOf(syscall.LOCK_NB),
+ "LOCK_READ": ValueOf(syscall.LOCK_READ),
+ "LOCK_RW": ValueOf(syscall.LOCK_RW),
+ "LOCK_SH": ValueOf(syscall.LOCK_SH),
+ "LOCK_UN": ValueOf(syscall.LOCK_UN),
+ "LOCK_WRITE": ValueOf(syscall.LOCK_WRITE),
+ "Lchown": ValueOf(syscall.Lchown),
+ "Link": ValueOf(syscall.Link),
+ "Listen": ValueOf(syscall.Listen),
+ "Listxattr": ValueOf(syscall.Listxattr),
+ "LsfJump": ValueOf(syscall.LsfJump),
+ "LsfSocket": ValueOf(syscall.LsfSocket),
+ "LsfStmt": ValueOf(syscall.LsfStmt),
+ "Lstat": ValueOf(syscall.Lstat),
+ "MADV_DODUMP": ValueOf(syscall.MADV_DODUMP),
+ "MADV_DOFORK": ValueOf(syscall.MADV_DOFORK),
+ "MADV_DONTDUMP": ValueOf(syscall.MADV_DONTDUMP),
+ "MADV_DONTFORK": ValueOf(syscall.MADV_DONTFORK),
+ "MADV_DONTNEED": ValueOf(syscall.MADV_DONTNEED),
+ "MADV_FREE": ValueOf(syscall.MADV_FREE),
+ "MADV_HUGEPAGE": ValueOf(syscall.MADV_HUGEPAGE),
+ "MADV_HWPOISON": ValueOf(syscall.MADV_HWPOISON),
+ "MADV_KEEPONFORK": ValueOf(syscall.MADV_KEEPONFORK),
+ "MADV_MERGEABLE": ValueOf(syscall.MADV_MERGEABLE),
+ "MADV_NOHUGEPAGE": ValueOf(syscall.MADV_NOHUGEPAGE),
+ "MADV_NORMAL": ValueOf(syscall.MADV_NORMAL),
+ "MADV_RANDOM": ValueOf(syscall.MADV_RANDOM),
+ "MADV_REMOVE": ValueOf(syscall.MADV_REMOVE),
+ "MADV_SEQUENTIAL": ValueOf(syscall.MADV_SEQUENTIAL),
+ "MADV_UNMERGEABLE": ValueOf(syscall.MADV_UNMERGEABLE),
+ "MADV_WILLNEED": ValueOf(syscall.MADV_WILLNEED),
+ "MADV_WIPEONFORK": ValueOf(syscall.MADV_WIPEONFORK),
+ "MAP_32BIT": ValueOf(syscall.MAP_32BIT),
+ "MAP_ANON": ValueOf(syscall.MAP_ANON),
+ "MAP_ANONYMOUS": ValueOf(syscall.MAP_ANONYMOUS),
+ "MAP_DENYWRITE": ValueOf(syscall.MAP_DENYWRITE),
+ "MAP_EXECUTABLE": ValueOf(syscall.MAP_EXECUTABLE),
+ "MAP_FILE": ValueOf(syscall.MAP_FILE),
+ "MAP_FIXED": ValueOf(syscall.MAP_FIXED),
+ "MAP_GROWSDOWN": ValueOf(syscall.MAP_GROWSDOWN),
+ "MAP_HUGETLB": ValueOf(syscall.MAP_HUGETLB),
+ "MAP_HUGE_MASK": ValueOf(syscall.MAP_HUGE_MASK),
+ "MAP_HUGE_SHIFT": ValueOf(syscall.MAP_HUGE_SHIFT),
+ "MAP_LOCKED": ValueOf(syscall.MAP_LOCKED),
+ "MAP_NONBLOCK": ValueOf(syscall.MAP_NONBLOCK),
+ "MAP_NORESERVE": ValueOf(syscall.MAP_NORESERVE),
+ "MAP_POPULATE": ValueOf(syscall.MAP_POPULATE),
+ "MAP_PRIVATE": ValueOf(syscall.MAP_PRIVATE),
+ "MAP_SHARED": ValueOf(syscall.MAP_SHARED),
+ "MAP_STACK": ValueOf(syscall.MAP_STACK),
+ "MAP_TYPE": ValueOf(syscall.MAP_TYPE),
+ "MCL_CURRENT": ValueOf(syscall.MCL_CURRENT),
+ "MCL_FUTURE": ValueOf(syscall.MCL_FUTURE),
+ "MCL_ONFAULT": ValueOf(syscall.MCL_ONFAULT),
+ "MNT_DETACH": ValueOf(syscall.MNT_DETACH),
+ "MNT_EXPIRE": ValueOf(syscall.MNT_EXPIRE),
+ "MNT_FORCE": ValueOf(syscall.MNT_FORCE),
+ "MSG_BATCH": ValueOf(syscall.MSG_BATCH),
+ "MSG_CMSG_CLOEXEC": ValueOf(syscall.MSG_CMSG_CLOEXEC),
+ "MSG_CONFIRM": ValueOf(syscall.MSG_CONFIRM),
+ "MSG_CTRUNC": ValueOf(syscall.MSG_CTRUNC),
+ "MSG_DONTROUTE": ValueOf(syscall.MSG_DONTROUTE),
+ "MSG_DONTWAIT": ValueOf(syscall.MSG_DONTWAIT),
+ "MSG_EOR": ValueOf(syscall.MSG_EOR),
+ "MSG_ERRQUEUE": ValueOf(syscall.MSG_ERRQUEUE),
+ "MSG_FASTOPEN": ValueOf(syscall.MSG_FASTOPEN),
+ "MSG_FIN": ValueOf(syscall.MSG_FIN),
+ "MSG_MORE": ValueOf(syscall.MSG_MORE),
+ "MSG_NOSIGNAL": ValueOf(syscall.MSG_NOSIGNAL),
+ "MSG_OOB": ValueOf(syscall.MSG_OOB),
+ "MSG_PEEK": ValueOf(syscall.MSG_PEEK),
+ "MSG_PROXY": ValueOf(syscall.MSG_PROXY),
+ "MSG_RST": ValueOf(syscall.MSG_RST),
+ "MSG_SYN": ValueOf(syscall.MSG_SYN),
+ "MSG_TRUNC": ValueOf(syscall.MSG_TRUNC),
+ "MSG_TRYHARD": ValueOf(syscall.MSG_TRYHARD),
+ "MSG_WAITALL": ValueOf(syscall.MSG_WAITALL),
+ "MSG_WAITFORONE": ValueOf(syscall.MSG_WAITFORONE),
+ "MSG_ZEROCOPY": ValueOf(syscall.MSG_ZEROCOPY),
+ "MS_ACTIVE": ValueOf(syscall.MS_ACTIVE),
+ "MS_ASYNC": ValueOf(syscall.MS_ASYNC),
+ "MS_BIND": ValueOf(syscall.MS_BIND),
+ "MS_BORN": ValueOf(syscall.MS_BORN),
+ "MS_DIRSYNC": ValueOf(syscall.MS_DIRSYNC),
+ "MS_INVALIDATE": ValueOf(syscall.MS_INVALIDATE),
+ "MS_I_VERSION": ValueOf(syscall.MS_I_VERSION),
+ "MS_KERNMOUNT": ValueOf(syscall.MS_KERNMOUNT),
+ "MS_LAZYTIME": ValueOf(syscall.MS_LAZYTIME),
+ "MS_MANDLOCK": ValueOf(syscall.MS_MANDLOCK),
+ "MS_MGC_MSK": ValueOf(uint32(syscall.MS_MGC_MSK)),
+ "MS_MGC_VAL": ValueOf(uint32(syscall.MS_MGC_VAL)),
+ "MS_MOVE": ValueOf(syscall.MS_MOVE),
+ "MS_NOATIME": ValueOf(syscall.MS_NOATIME),
+ "MS_NODEV": ValueOf(syscall.MS_NODEV),
+ "MS_NODIRATIME": ValueOf(syscall.MS_NODIRATIME),
+ "MS_NOEXEC": ValueOf(syscall.MS_NOEXEC),
+ "MS_NOREMOTELOCK": ValueOf(syscall.MS_NOREMOTELOCK),
+ "MS_NOSEC": ValueOf(syscall.MS_NOSEC),
+ "MS_NOSUID": ValueOf(syscall.MS_NOSUID),
+ "MS_NOUSER": ValueOf(syscall.MS_NOUSER),
+ "MS_POSIXACL": ValueOf(syscall.MS_POSIXACL),
+ "MS_PRIVATE": ValueOf(syscall.MS_PRIVATE),
+ "MS_RDONLY": ValueOf(syscall.MS_RDONLY),
+ "MS_REC": ValueOf(syscall.MS_REC),
+ "MS_RELATIME": ValueOf(syscall.MS_RELATIME),
+ "MS_REMOUNT": ValueOf(syscall.MS_REMOUNT),
+ "MS_RMT_MASK": ValueOf(syscall.MS_RMT_MASK),
+ "MS_SHARED": ValueOf(syscall.MS_SHARED),
+ "MS_SILENT": ValueOf(syscall.MS_SILENT),
+ "MS_SLAVE": ValueOf(syscall.MS_SLAVE),
+ "MS_STRICTATIME": ValueOf(syscall.MS_STRICTATIME),
+ "MS_SUBMOUNT": ValueOf(syscall.MS_SUBMOUNT),
+ "MS_SYNC": ValueOf(syscall.MS_SYNC),
+ "MS_SYNCHRONOUS": ValueOf(syscall.MS_SYNCHRONOUS),
+ "MS_UNBINDABLE": ValueOf(syscall.MS_UNBINDABLE),
+ "MS_VERBOSE": ValueOf(syscall.MS_VERBOSE),
+ "Madvise": ValueOf(syscall.Madvise),
+ "Mkdir": ValueOf(syscall.Mkdir),
+ "Mkdirat": ValueOf(syscall.Mkdirat),
+ "Mkfifo": ValueOf(syscall.Mkfifo),
+ "Mknod": ValueOf(syscall.Mknod),
+ "Mknodat": ValueOf(syscall.Mknodat),
+ "Mlock": ValueOf(syscall.Mlock),
+ "Mlockall": ValueOf(syscall.Mlockall),
+ "Mmap": ValueOf(syscall.Mmap),
+ "Mount": ValueOf(syscall.Mount),
+ "Mprotect": ValueOf(syscall.Mprotect),
+ "Munlock": ValueOf(syscall.Munlock),
+ "Munlockall": ValueOf(syscall.Munlockall),
+ "Munmap": ValueOf(syscall.Munmap),
+ "NETLINK_ADD_MEMBERSHIP": ValueOf(syscall.NETLINK_ADD_MEMBERSHIP),
+ "NETLINK_AUDIT": ValueOf(syscall.NETLINK_AUDIT),
+ "NETLINK_BROADCAST_ERROR": ValueOf(syscall.NETLINK_BROADCAST_ERROR),
+ "NETLINK_CAP_ACK": ValueOf(syscall.NETLINK_CAP_ACK),
+ "NETLINK_CONNECTED": ValueOf(syscall.NETLINK_CONNECTED),
+ "NETLINK_CONNECTOR": ValueOf(syscall.NETLINK_CONNECTOR),
+ "NETLINK_CRYPTO": ValueOf(syscall.NETLINK_CRYPTO),
+ "NETLINK_DNRTMSG": ValueOf(syscall.NETLINK_DNRTMSG),
+ "NETLINK_DROP_MEMBERSHIP": ValueOf(syscall.NETLINK_DROP_MEMBERSHIP),
+ "NETLINK_ECRYPTFS": ValueOf(syscall.NETLINK_ECRYPTFS),
+ "NETLINK_EXT_ACK": ValueOf(syscall.NETLINK_EXT_ACK),
+ "NETLINK_FIB_LOOKUP": ValueOf(syscall.NETLINK_FIB_LOOKUP),
+ "NETLINK_FIREWALL": ValueOf(syscall.NETLINK_FIREWALL),
+ "NETLINK_GENERIC": ValueOf(syscall.NETLINK_GENERIC),
+ "NETLINK_INET_DIAG": ValueOf(syscall.NETLINK_INET_DIAG),
+ "NETLINK_IP6_FW": ValueOf(syscall.NETLINK_IP6_FW),
+ "NETLINK_ISCSI": ValueOf(syscall.NETLINK_ISCSI),
+ "NETLINK_KOBJECT_UEVENT": ValueOf(syscall.NETLINK_KOBJECT_UEVENT),
+ "NETLINK_LISTEN_ALL_NSID": ValueOf(syscall.NETLINK_LISTEN_ALL_NSID),
+ "NETLINK_LIST_MEMBERSHIPS": ValueOf(syscall.NETLINK_LIST_MEMBERSHIPS),
+ "NETLINK_NETFILTER": ValueOf(syscall.NETLINK_NETFILTER),
+ "NETLINK_NFLOG": ValueOf(syscall.NETLINK_NFLOG),
+ "NETLINK_NO_ENOBUFS": ValueOf(syscall.NETLINK_NO_ENOBUFS),
+ "NETLINK_PKTINFO": ValueOf(syscall.NETLINK_PKTINFO),
+ "NETLINK_RDMA": ValueOf(syscall.NETLINK_RDMA),
+ "NETLINK_ROUTE": ValueOf(syscall.NETLINK_ROUTE),
+ "NETLINK_RX_RING": ValueOf(syscall.NETLINK_RX_RING),
+ "NETLINK_SCSITRANSPORT": ValueOf(syscall.NETLINK_SCSITRANSPORT),
+ "NETLINK_SELINUX": ValueOf(syscall.NETLINK_SELINUX),
+ "NETLINK_SMC": ValueOf(syscall.NETLINK_SMC),
+ "NETLINK_SOCK_DIAG": ValueOf(syscall.NETLINK_SOCK_DIAG),
+ "NETLINK_TX_RING": ValueOf(syscall.NETLINK_TX_RING),
+ "NETLINK_UNCONNECTED": ValueOf(syscall.NETLINK_UNCONNECTED),
+ "NETLINK_UNUSED": ValueOf(syscall.NETLINK_UNUSED),
+ "NETLINK_USERSOCK": ValueOf(syscall.NETLINK_USERSOCK),
+ "NETLINK_XFRM": ValueOf(syscall.NETLINK_XFRM),
+ "NI_DGRAM": ValueOf(syscall.NI_DGRAM),
+ "NI_IDN": ValueOf(syscall.NI_IDN),
+ "NI_IDN_ALLOW_UNASSIGNED": ValueOf(syscall.NI_IDN_ALLOW_UNASSIGNED),
+ "NI_IDN_USE_STD3_ASCII_RULES": ValueOf(syscall.NI_IDN_USE_STD3_ASCII_RULES),
+ "NI_MAXHOST": ValueOf(syscall.NI_MAXHOST),
+ "NI_MAXSERV": ValueOf(syscall.NI_MAXSERV),
+ "NI_NAMEREQD": ValueOf(syscall.NI_NAMEREQD),
+ "NI_NOFQDN": ValueOf(syscall.NI_NOFQDN),
+ "NI_NUMERICHOST": ValueOf(syscall.NI_NUMERICHOST),
+ "NI_NUMERICSERV": ValueOf(syscall.NI_NUMERICSERV),
+ "NL0": ValueOf(syscall.NL0),
+ "NL1": ValueOf(syscall.NL1),
+ "NLA_ALIGNTO": ValueOf(syscall.NLA_ALIGNTO),
+ "NLA_F_NESTED": ValueOf(syscall.NLA_F_NESTED),
+ "NLA_F_NET_BYTEORDER": ValueOf(syscall.NLA_F_NET_BYTEORDER),
+ "NLA_HDRLEN": ValueOf(syscall.NLA_HDRLEN),
+ "NLA_TYPE_MASK": ValueOf(syscall.NLA_TYPE_MASK),
+ "NLDLY": ValueOf(syscall.NLDLY),
+ "NLMSGERR_ATTR_COOKIE": ValueOf(syscall.NLMSGERR_ATTR_COOKIE),
+ "NLMSGERR_ATTR_MAX": ValueOf(syscall.NLMSGERR_ATTR_MAX),
+ "NLMSGERR_ATTR_MSG": ValueOf(syscall.NLMSGERR_ATTR_MSG),
+ "NLMSGERR_ATTR_OFFS": ValueOf(syscall.NLMSGERR_ATTR_OFFS),
+ "NLMSGERR_ATTR_UNUSED": ValueOf(syscall.NLMSGERR_ATTR_UNUSED),
+ "NLMSG_ALIGNTO": ValueOf(syscall.NLMSG_ALIGNTO),
+ "NLMSG_DONE": ValueOf(syscall.NLMSG_DONE),
+ "NLMSG_ERROR": ValueOf(syscall.NLMSG_ERROR),
+ "NLMSG_HDRLEN": ValueOf(syscall.NLMSG_HDRLEN),
+ "NLMSG_MIN_TYPE": ValueOf(syscall.NLMSG_MIN_TYPE),
+ "NLMSG_NOOP": ValueOf(syscall.NLMSG_NOOP),
+ "NLMSG_OVERRUN": ValueOf(syscall.NLMSG_OVERRUN),
+ "NLM_F_ACK": ValueOf(syscall.NLM_F_ACK),
+ "NLM_F_ACK_TLVS": ValueOf(syscall.NLM_F_ACK_TLVS),
+ "NLM_F_APPEND": ValueOf(syscall.NLM_F_APPEND),
+ "NLM_F_ATOMIC": ValueOf(syscall.NLM_F_ATOMIC),
+ "NLM_F_CAPPED": ValueOf(syscall.NLM_F_CAPPED),
+ "NLM_F_CREATE": ValueOf(syscall.NLM_F_CREATE),
+ "NLM_F_DUMP": ValueOf(syscall.NLM_F_DUMP),
+ "NLM_F_DUMP_FILTERED": ValueOf(syscall.NLM_F_DUMP_FILTERED),
+ "NLM_F_DUMP_INTR": ValueOf(syscall.NLM_F_DUMP_INTR),
+ "NLM_F_ECHO": ValueOf(syscall.NLM_F_ECHO),
+ "NLM_F_EXCL": ValueOf(syscall.NLM_F_EXCL),
+ "NLM_F_MATCH": ValueOf(syscall.NLM_F_MATCH),
+ "NLM_F_MULTI": ValueOf(syscall.NLM_F_MULTI),
+ "NLM_F_NONREC": ValueOf(syscall.NLM_F_NONREC),
+ "NLM_F_REPLACE": ValueOf(syscall.NLM_F_REPLACE),
+ "NLM_F_REQUEST": ValueOf(syscall.NLM_F_REQUEST),
+ "NLM_F_ROOT": ValueOf(syscall.NLM_F_ROOT),
+ "NOFLSH": ValueOf(syscall.NOFLSH),
+ "Nanosleep": ValueOf(syscall.Nanosleep),
+ "NetlinkRIB": ValueOf(syscall.NetlinkRIB),
+ "NsecToTimespec": ValueOf(syscall.NsecToTimespec),
+ "NsecToTimeval": ValueOf(syscall.NsecToTimeval),
+ "OCRNL": ValueOf(syscall.OCRNL),
+ "OFDEL": ValueOf(syscall.OFDEL),
+ "OFILL": ValueOf(syscall.OFILL),
+ "OLCUC": ValueOf(syscall.OLCUC),
+ "ONLCR": ValueOf(syscall.ONLCR),
+ "ONLRET": ValueOf(syscall.ONLRET),
+ "ONOCR": ValueOf(syscall.ONOCR),
+ "OPOST": ValueOf(syscall.OPOST),
+ "OS": ValueOf(syscall.OS),
+ "O_ACCMODE": ValueOf(syscall.O_ACCMODE),
+ "O_APPEND": ValueOf(syscall.O_APPEND),
+ "O_ASYNC": ValueOf(syscall.O_ASYNC),
+ "O_CLOEXEC": ValueOf(syscall.O_CLOEXEC),
+ "O_CREAT": ValueOf(syscall.O_CREAT),
+ "O_DIRECT": ValueOf(syscall.O_DIRECT),
+ "O_DIRECTORY": ValueOf(syscall.O_DIRECTORY),
+ "O_DSYNC": ValueOf(syscall.O_DSYNC),
+ "O_EXCL": ValueOf(syscall.O_EXCL),
+ "O_FSYNC": ValueOf(syscall.O_FSYNC),
+ "O_LARGEFILE": ValueOf(syscall.O_LARGEFILE),
+ "O_NDELAY": ValueOf(syscall.O_NDELAY),
+ "O_NOATIME": ValueOf(syscall.O_NOATIME),
+ "O_NOCTTY": ValueOf(syscall.O_NOCTTY),
+ "O_NOFOLLOW": ValueOf(syscall.O_NOFOLLOW),
+ "O_NONBLOCK": ValueOf(syscall.O_NONBLOCK),
+ "O_PATH": ValueOf(syscall.O_PATH),
+ "O_RDONLY": ValueOf(syscall.O_RDONLY),
+ "O_RDWR": ValueOf(syscall.O_RDWR),
+ "O_RSYNC": ValueOf(syscall.O_RSYNC),
+ "O_SYNC": ValueOf(syscall.O_SYNC),
+ "O_TMPFILE": ValueOf(syscall.O_TMPFILE),
+ "O_TRUNC": ValueOf(syscall.O_TRUNC),
+ "O_WRONLY": ValueOf(syscall.O_WRONLY),
+ "Open": ValueOf(syscall.Open),
+ "Openat": ValueOf(syscall.Openat),
+ "PACKET_ADD_MEMBERSHIP": ValueOf(syscall.PACKET_ADD_MEMBERSHIP),
+ "PACKET_AUXDATA": ValueOf(syscall.PACKET_AUXDATA),
+ "PACKET_BROADCAST": ValueOf(syscall.PACKET_BROADCAST),
+ "PACKET_COPY_THRESH": ValueOf(syscall.PACKET_COPY_THRESH),
+ "PACKET_DROP_MEMBERSHIP": ValueOf(syscall.PACKET_DROP_MEMBERSHIP),
+ "PACKET_FANOUT": ValueOf(syscall.PACKET_FANOUT),
+ "PACKET_FANOUT_DATA": ValueOf(syscall.PACKET_FANOUT_DATA),
+ "PACKET_FASTROUTE": ValueOf(syscall.PACKET_FASTROUTE),
+ "PACKET_HDRLEN": ValueOf(syscall.PACKET_HDRLEN),
+ "PACKET_HOST": ValueOf(syscall.PACKET_HOST),
+ "PACKET_LOOPBACK": ValueOf(syscall.PACKET_LOOPBACK),
+ "PACKET_LOSS": ValueOf(syscall.PACKET_LOSS),
+ "PACKET_MR_ALLMULTI": ValueOf(syscall.PACKET_MR_ALLMULTI),
+ "PACKET_MR_MULTICAST": ValueOf(syscall.PACKET_MR_MULTICAST),
+ "PACKET_MR_PROMISC": ValueOf(syscall.PACKET_MR_PROMISC),
+ "PACKET_MR_UNICAST": ValueOf(syscall.PACKET_MR_UNICAST),
+ "PACKET_MULTICAST": ValueOf(syscall.PACKET_MULTICAST),
+ "PACKET_ORIGDEV": ValueOf(syscall.PACKET_ORIGDEV),
+ "PACKET_OTHERHOST": ValueOf(syscall.PACKET_OTHERHOST),
+ "PACKET_OUTGOING": ValueOf(syscall.PACKET_OUTGOING),
+ "PACKET_QDISC_BYPASS": ValueOf(syscall.PACKET_QDISC_BYPASS),
+ "PACKET_RECV_OUTPUT": ValueOf(syscall.PACKET_RECV_OUTPUT),
+ "PACKET_RESERVE": ValueOf(syscall.PACKET_RESERVE),
+ "PACKET_ROLLOVER_STATS": ValueOf(syscall.PACKET_ROLLOVER_STATS),
+ "PACKET_RX_RING": ValueOf(syscall.PACKET_RX_RING),
+ "PACKET_STATISTICS": ValueOf(syscall.PACKET_STATISTICS),
+ "PACKET_TIMESTAMP": ValueOf(syscall.PACKET_TIMESTAMP),
+ "PACKET_TX_HAS_OFF": ValueOf(syscall.PACKET_TX_HAS_OFF),
+ "PACKET_TX_RING": ValueOf(syscall.PACKET_TX_RING),
+ "PACKET_TX_TIMESTAMP": ValueOf(syscall.PACKET_TX_TIMESTAMP),
+ "PACKET_VERSION": ValueOf(syscall.PACKET_VERSION),
+ "PACKET_VNET_HDR": ValueOf(syscall.PACKET_VNET_HDR),
+ "PARENB": ValueOf(syscall.PARENB),
+ "PARMRK": ValueOf(syscall.PARMRK),
+ "PARODD": ValueOf(syscall.PARODD),
+ "PC_2_SYMLINKS": ValueOf(syscall.PC_2_SYMLINKS),
+ "PC_ALLOC_SIZE_MIN": ValueOf(syscall.PC_ALLOC_SIZE_MIN),
+ "PC_ASYNC_IO": ValueOf(syscall.PC_ASYNC_IO),
+ "PC_CHOWN_RESTRICTED": ValueOf(syscall.PC_CHOWN_RESTRICTED),
+ "PC_FILESIZEBITS": ValueOf(syscall.PC_FILESIZEBITS),
+ "PC_LINK_MAX": ValueOf(syscall.PC_LINK_MAX),
+ "PC_MAX_CANON": ValueOf(syscall.PC_MAX_CANON),
+ "PC_MAX_INPUT": ValueOf(syscall.PC_MAX_INPUT),
+ "PC_NAME_MAX": ValueOf(syscall.PC_NAME_MAX),
+ "PC_NO_TRUNC": ValueOf(syscall.PC_NO_TRUNC),
+ "PC_PATH_MAX": ValueOf(syscall.PC_PATH_MAX),
+ "PC_PIPE_BUF": ValueOf(syscall.PC_PIPE_BUF),
+ "PC_PRIO_IO": ValueOf(syscall.PC_PRIO_IO),
+ "PC_REC_INCR_XFER_SIZE": ValueOf(syscall.PC_REC_INCR_XFER_SIZE),
+ "PC_REC_MAX_XFER_SIZE": ValueOf(syscall.PC_REC_MAX_XFER_SIZE),
+ "PC_REC_MIN_XFER_SIZE": ValueOf(syscall.PC_REC_MIN_XFER_SIZE),
+ "PC_REC_XFER_ALIGN": ValueOf(syscall.PC_REC_XFER_ALIGN),
+ "PC_SOCK_MAXBUF": ValueOf(syscall.PC_SOCK_MAXBUF),
+ "PC_SYMLINK_MAX": ValueOf(syscall.PC_SYMLINK_MAX),
+ "PC_SYNC_IO": ValueOf(syscall.PC_SYNC_IO),
+ "PC_VDISABLE": ValueOf(syscall.PC_VDISABLE),
+ "PENDIN": ValueOf(syscall.PENDIN),
+ "PRIO_MAX": ValueOf(syscall.PRIO_MAX),
+ "PRIO_MIN": ValueOf(syscall.PRIO_MIN),
+ "PRIO_PGRP": ValueOf(syscall.PRIO_PGRP),
+ "PRIO_PROCESS": ValueOf(syscall.PRIO_PROCESS),
+ "PRIO_USER": ValueOf(syscall.PRIO_USER),
+ "PROT_EXEC": ValueOf(syscall.PROT_EXEC),
+ "PROT_GROWSDOWN": ValueOf(syscall.PROT_GROWSDOWN),
+ "PROT_GROWSUP": ValueOf(syscall.PROT_GROWSUP),
+ "PROT_NONE": ValueOf(syscall.PROT_NONE),
+ "PROT_READ": ValueOf(syscall.PROT_READ),
+ "PROT_WRITE": ValueOf(syscall.PROT_WRITE),
+ "PR_CAPBSET_DROP": ValueOf(syscall.PR_CAPBSET_DROP),
+ "PR_CAPBSET_READ": ValueOf(syscall.PR_CAPBSET_READ),
+ "PR_CAP_AMBIENT": ValueOf(syscall.PR_CAP_AMBIENT),
+ "PR_CAP_AMBIENT_CLEAR_ALL": ValueOf(syscall.PR_CAP_AMBIENT_CLEAR_ALL),
+ "PR_CAP_AMBIENT_IS_SET": ValueOf(syscall.PR_CAP_AMBIENT_IS_SET),
+ "PR_CAP_AMBIENT_LOWER": ValueOf(syscall.PR_CAP_AMBIENT_LOWER),
+ "PR_CAP_AMBIENT_RAISE": ValueOf(syscall.PR_CAP_AMBIENT_RAISE),
+ "PR_ENDIAN_BIG": ValueOf(syscall.PR_ENDIAN_BIG),
+ "PR_ENDIAN_LITTLE": ValueOf(syscall.PR_ENDIAN_LITTLE),
+ "PR_ENDIAN_PPC_LITTLE": ValueOf(syscall.PR_ENDIAN_PPC_LITTLE),
+ "PR_FPEMU_NOPRINT": ValueOf(syscall.PR_FPEMU_NOPRINT),
+ "PR_FPEMU_SIGFPE": ValueOf(syscall.PR_FPEMU_SIGFPE),
+ "PR_FP_EXC_ASYNC": ValueOf(syscall.PR_FP_EXC_ASYNC),
+ "PR_FP_EXC_DISABLED": ValueOf(syscall.PR_FP_EXC_DISABLED),
+ "PR_FP_EXC_DIV": ValueOf(syscall.PR_FP_EXC_DIV),
+ "PR_FP_EXC_INV": ValueOf(syscall.PR_FP_EXC_INV),
+ "PR_FP_EXC_NONRECOV": ValueOf(syscall.PR_FP_EXC_NONRECOV),
+ "PR_FP_EXC_OVF": ValueOf(syscall.PR_FP_EXC_OVF),
+ "PR_FP_EXC_PRECISE": ValueOf(syscall.PR_FP_EXC_PRECISE),
+ "PR_FP_EXC_RES": ValueOf(syscall.PR_FP_EXC_RES),
+ "PR_FP_EXC_SW_ENABLE": ValueOf(syscall.PR_FP_EXC_SW_ENABLE),
+ "PR_FP_EXC_UND": ValueOf(syscall.PR_FP_EXC_UND),
+ "PR_FP_MODE_FR": ValueOf(syscall.PR_FP_MODE_FR),
+ "PR_FP_MODE_FRE": ValueOf(syscall.PR_FP_MODE_FRE),
+ "PR_GET_CHILD_SUBREAPER": ValueOf(syscall.PR_GET_CHILD_SUBREAPER),
+ "PR_GET_DUMPABLE": ValueOf(syscall.PR_GET_DUMPABLE),
+ "PR_GET_ENDIAN": ValueOf(syscall.PR_GET_ENDIAN),
+ "PR_GET_FPEMU": ValueOf(syscall.PR_GET_FPEMU),
+ "PR_GET_FPEXC": ValueOf(syscall.PR_GET_FPEXC),
+ "PR_GET_FP_MODE": ValueOf(syscall.PR_GET_FP_MODE),
+ "PR_GET_KEEPCAPS": ValueOf(syscall.PR_GET_KEEPCAPS),
+ "PR_GET_NAME": ValueOf(syscall.PR_GET_NAME),
+ "PR_GET_NO_NEW_PRIVS": ValueOf(syscall.PR_GET_NO_NEW_PRIVS),
+ "PR_GET_PDEATHSIG": ValueOf(syscall.PR_GET_PDEATHSIG),
+ "PR_GET_SECCOMP": ValueOf(syscall.PR_GET_SECCOMP),
+ "PR_GET_SECUREBITS": ValueOf(syscall.PR_GET_SECUREBITS),
+ "PR_GET_THP_DISABLE": ValueOf(syscall.PR_GET_THP_DISABLE),
+ "PR_GET_TID_ADDRESS": ValueOf(syscall.PR_GET_TID_ADDRESS),
+ "PR_GET_TIMERSLACK": ValueOf(syscall.PR_GET_TIMERSLACK),
+ "PR_GET_TIMING": ValueOf(syscall.PR_GET_TIMING),
+ "PR_GET_TSC": ValueOf(syscall.PR_GET_TSC),
+ "PR_GET_UNALIGN": ValueOf(syscall.PR_GET_UNALIGN),
+ "PR_MCE_KILL": ValueOf(syscall.PR_MCE_KILL),
+ "PR_MCE_KILL_CLEAR": ValueOf(syscall.PR_MCE_KILL_CLEAR),
+ "PR_MCE_KILL_DEFAULT": ValueOf(syscall.PR_MCE_KILL_DEFAULT),
+ "PR_MCE_KILL_EARLY": ValueOf(syscall.PR_MCE_KILL_EARLY),
+ "PR_MCE_KILL_GET": ValueOf(syscall.PR_MCE_KILL_GET),
+ "PR_MCE_KILL_LATE": ValueOf(syscall.PR_MCE_KILL_LATE),
+ "PR_MCE_KILL_SET": ValueOf(syscall.PR_MCE_KILL_SET),
+ "PR_MPX_DISABLE_MANAGEMENT": ValueOf(syscall.PR_MPX_DISABLE_MANAGEMENT),
+ "PR_MPX_ENABLE_MANAGEMENT": ValueOf(syscall.PR_MPX_ENABLE_MANAGEMENT),
+ "PR_SET_CHILD_SUBREAPER": ValueOf(syscall.PR_SET_CHILD_SUBREAPER),
+ "PR_SET_DUMPABLE": ValueOf(syscall.PR_SET_DUMPABLE),
+ "PR_SET_ENDIAN": ValueOf(syscall.PR_SET_ENDIAN),
+ "PR_SET_FPEMU": ValueOf(syscall.PR_SET_FPEMU),
+ "PR_SET_FPEXC": ValueOf(syscall.PR_SET_FPEXC),
+ "PR_SET_FP_MODE": ValueOf(syscall.PR_SET_FP_MODE),
+ "PR_SET_KEEPCAPS": ValueOf(syscall.PR_SET_KEEPCAPS),
+ "PR_SET_MM": ValueOf(syscall.PR_SET_MM),
+ "PR_SET_MM_ARG_END": ValueOf(syscall.PR_SET_MM_ARG_END),
+ "PR_SET_MM_ARG_START": ValueOf(syscall.PR_SET_MM_ARG_START),
+ "PR_SET_MM_AUXV": ValueOf(syscall.PR_SET_MM_AUXV),
+ "PR_SET_MM_BRK": ValueOf(syscall.PR_SET_MM_BRK),
+ "PR_SET_MM_END_CODE": ValueOf(syscall.PR_SET_MM_END_CODE),
+ "PR_SET_MM_END_DATA": ValueOf(syscall.PR_SET_MM_END_DATA),
+ "PR_SET_MM_ENV_END": ValueOf(syscall.PR_SET_MM_ENV_END),
+ "PR_SET_MM_ENV_START": ValueOf(syscall.PR_SET_MM_ENV_START),
+ "PR_SET_MM_EXE_FILE": ValueOf(syscall.PR_SET_MM_EXE_FILE),
+ "PR_SET_MM_MAP": ValueOf(syscall.PR_SET_MM_MAP),
+ "PR_SET_MM_MAP_SIZE": ValueOf(syscall.PR_SET_MM_MAP_SIZE),
+ "PR_SET_MM_START_BRK": ValueOf(syscall.PR_SET_MM_START_BRK),
+ "PR_SET_MM_START_CODE": ValueOf(syscall.PR_SET_MM_START_CODE),
+ "PR_SET_MM_START_DATA": ValueOf(syscall.PR_SET_MM_START_DATA),
+ "PR_SET_MM_START_STACK": ValueOf(syscall.PR_SET_MM_START_STACK),
+ "PR_SET_NAME": ValueOf(syscall.PR_SET_NAME),
+ "PR_SET_NO_NEW_PRIVS": ValueOf(syscall.PR_SET_NO_NEW_PRIVS),
+ "PR_SET_PDEATHSIG": ValueOf(syscall.PR_SET_PDEATHSIG),
+ "PR_SET_PTRACER": ValueOf(syscall.PR_SET_PTRACER),
+ "PR_SET_SECCOMP": ValueOf(syscall.PR_SET_SECCOMP),
+ "PR_SET_SECUREBITS": ValueOf(syscall.PR_SET_SECUREBITS),
+ "PR_SET_THP_DISABLE": ValueOf(syscall.PR_SET_THP_DISABLE),
+ "PR_SET_TIMERSLACK": ValueOf(syscall.PR_SET_TIMERSLACK),
+ "PR_SET_TIMING": ValueOf(syscall.PR_SET_TIMING),
+ "PR_SET_TSC": ValueOf(syscall.PR_SET_TSC),
+ "PR_SET_UNALIGN": ValueOf(syscall.PR_SET_UNALIGN),
+ "PR_SVE_GET_VL": ValueOf(syscall.PR_SVE_GET_VL),
+ "PR_SVE_SET_VL": ValueOf(syscall.PR_SVE_SET_VL),
+ "PR_SVE_SET_VL_ONEXEC": ValueOf(syscall.PR_SVE_SET_VL_ONEXEC),
+ "PR_SVE_VL_INHERIT": ValueOf(syscall.PR_SVE_VL_INHERIT),
+ "PR_SVE_VL_LEN_MASK": ValueOf(syscall.PR_SVE_VL_LEN_MASK),
+ "PR_TASK_PERF_EVENTS_DISABLE": ValueOf(syscall.PR_TASK_PERF_EVENTS_DISABLE),
+ "PR_TASK_PERF_EVENTS_ENABLE": ValueOf(syscall.PR_TASK_PERF_EVENTS_ENABLE),
+ "PR_TIMING_STATISTICAL": ValueOf(syscall.PR_TIMING_STATISTICAL),
+ "PR_TIMING_TIMESTAMP": ValueOf(syscall.PR_TIMING_TIMESTAMP),
+ "PR_TSC_ENABLE": ValueOf(syscall.PR_TSC_ENABLE),
+ "PR_TSC_SIGSEGV": ValueOf(syscall.PR_TSC_SIGSEGV),
+ "PR_UNALIGN_NOPRINT": ValueOf(syscall.PR_UNALIGN_NOPRINT),
+ "PR_UNALIGN_SIGBUS": ValueOf(syscall.PR_UNALIGN_SIGBUS),
+ "PTRACE_ARCH_PRCTL": ValueOf(syscall.PTRACE_ARCH_PRCTL),
+ "PTRACE_ATTACH": ValueOf(syscall.PTRACE_ATTACH),
+ "PTRACE_CONT": ValueOf(syscall.PTRACE_CONT),
+ "PTRACE_DETACH": ValueOf(syscall.PTRACE_DETACH),
+ "PTRACE_EVENT_CLONE": ValueOf(syscall.PTRACE_EVENT_CLONE),
+ "PTRACE_EVENT_EXEC": ValueOf(syscall.PTRACE_EVENT_EXEC),
+ "PTRACE_EVENT_EXIT": ValueOf(syscall.PTRACE_EVENT_EXIT),
+ "PTRACE_EVENT_FORK": ValueOf(syscall.PTRACE_EVENT_FORK),
+ "PTRACE_EVENT_SECCOMP": ValueOf(syscall.PTRACE_EVENT_SECCOMP),
+ "PTRACE_EVENT_STOP": ValueOf(syscall.PTRACE_EVENT_STOP),
+ "PTRACE_EVENT_VFORK": ValueOf(syscall.PTRACE_EVENT_VFORK),
+ "PTRACE_EVENT_VFORK_DONE": ValueOf(syscall.PTRACE_EVENT_VFORK_DONE),
+ "PTRACE_GETEVENTMSG": ValueOf(syscall.PTRACE_GETEVENTMSG),
+ "PTRACE_GETFPREGS": ValueOf(syscall.PTRACE_GETFPREGS),
+ "PTRACE_GETFPXREGS": ValueOf(syscall.PTRACE_GETFPXREGS),
+ "PTRACE_GETREGS": ValueOf(syscall.PTRACE_GETREGS),
+ "PTRACE_GETREGSET": ValueOf(syscall.PTRACE_GETREGSET),
+ "PTRACE_GETSIGINFO": ValueOf(syscall.PTRACE_GETSIGINFO),
+ "PTRACE_GETSIGMASK": ValueOf(syscall.PTRACE_GETSIGMASK),
+ "PTRACE_GET_THREAD_AREA": ValueOf(syscall.PTRACE_GET_THREAD_AREA),
+ "PTRACE_INTERRUPT": ValueOf(syscall.PTRACE_INTERRUPT),
+ "PTRACE_KILL": ValueOf(syscall.PTRACE_KILL),
+ "PTRACE_LISTEN": ValueOf(syscall.PTRACE_LISTEN),
+ "PTRACE_OLDSETOPTIONS": ValueOf(syscall.PTRACE_OLDSETOPTIONS),
+ "PTRACE_O_EXITKILL": ValueOf(syscall.PTRACE_O_EXITKILL),
+ "PTRACE_O_MASK": ValueOf(syscall.PTRACE_O_MASK),
+ "PTRACE_O_SUSPEND_SECCOMP": ValueOf(syscall.PTRACE_O_SUSPEND_SECCOMP),
+ "PTRACE_O_TRACECLONE": ValueOf(syscall.PTRACE_O_TRACECLONE),
+ "PTRACE_O_TRACEEXEC": ValueOf(syscall.PTRACE_O_TRACEEXEC),
+ "PTRACE_O_TRACEEXIT": ValueOf(syscall.PTRACE_O_TRACEEXIT),
+ "PTRACE_O_TRACEFORK": ValueOf(syscall.PTRACE_O_TRACEFORK),
+ "PTRACE_O_TRACESECCOMP": ValueOf(syscall.PTRACE_O_TRACESECCOMP),
+ "PTRACE_O_TRACESYSGOOD": ValueOf(syscall.PTRACE_O_TRACESYSGOOD),
+ "PTRACE_O_TRACEVFORK": ValueOf(syscall.PTRACE_O_TRACEVFORK),
+ "PTRACE_O_TRACEVFORKDONE": ValueOf(syscall.PTRACE_O_TRACEVFORKDONE),
+ "PTRACE_PEEKDATA": ValueOf(syscall.PTRACE_PEEKDATA),
+ "PTRACE_PEEKSIGINFO": ValueOf(syscall.PTRACE_PEEKSIGINFO),
+ "PTRACE_PEEKSIGINFO_SHARED": ValueOf(syscall.PTRACE_PEEKSIGINFO_SHARED),
+ "PTRACE_PEEKTEXT": ValueOf(syscall.PTRACE_PEEKTEXT),
+ "PTRACE_PEEKUSER": ValueOf(syscall.PTRACE_PEEKUSER),
+ "PTRACE_PEEKUSR": ValueOf(syscall.PTRACE_PEEKUSR),
+ "PTRACE_POKEDATA": ValueOf(syscall.PTRACE_POKEDATA),
+ "PTRACE_POKETEXT": ValueOf(syscall.PTRACE_POKETEXT),
+ "PTRACE_POKEUSER": ValueOf(syscall.PTRACE_POKEUSER),
+ "PTRACE_POKEUSR": ValueOf(syscall.PTRACE_POKEUSR),
+ "PTRACE_SECCOMP_GET_FILTER": ValueOf(syscall.PTRACE_SECCOMP_GET_FILTER),
+ "PTRACE_SEIZE": ValueOf(syscall.PTRACE_SEIZE),
+ "PTRACE_SETFPREGS": ValueOf(syscall.PTRACE_SETFPREGS),
+ "PTRACE_SETFPXREGS": ValueOf(syscall.PTRACE_SETFPXREGS),
+ "PTRACE_SETOPTIONS": ValueOf(syscall.PTRACE_SETOPTIONS),
+ "PTRACE_SETREGS": ValueOf(syscall.PTRACE_SETREGS),
+ "PTRACE_SETREGSET": ValueOf(syscall.PTRACE_SETREGSET),
+ "PTRACE_SETSIGINFO": ValueOf(syscall.PTRACE_SETSIGINFO),
+ "PTRACE_SETSIGMASK": ValueOf(syscall.PTRACE_SETSIGMASK),
+ "PTRACE_SET_THREAD_AREA": ValueOf(syscall.PTRACE_SET_THREAD_AREA),
+ "PTRACE_SINGLEBLOCK": ValueOf(syscall.PTRACE_SINGLEBLOCK),
+ "PTRACE_SINGLESTEP": ValueOf(syscall.PTRACE_SINGLESTEP),
+ "PTRACE_SYSCALL": ValueOf(syscall.PTRACE_SYSCALL),
+ "PTRACE_SYSEMU": ValueOf(syscall.PTRACE_SYSEMU),
+ "PTRACE_SYSEMU_SINGLESTEP": ValueOf(syscall.PTRACE_SYSEMU_SINGLESTEP),
+ "PTRACE_TRACEME": ValueOf(syscall.PTRACE_TRACEME),
+ "ParseDirent": ValueOf(syscall.ParseDirent),
+ "ParseNetlinkMessage": ValueOf(syscall.ParseNetlinkMessage),
+ "ParseNetlinkRouteAttr": ValueOf(syscall.ParseNetlinkRouteAttr),
+ "ParseSocketControlMessage": ValueOf(syscall.ParseSocketControlMessage),
+ "ParseUnixCredentials": ValueOf(syscall.ParseUnixCredentials),
+ "ParseUnixRights": ValueOf(syscall.ParseUnixRights),
+ "PathMax": ValueOf(syscall.PathMax),
+ "Pause": ValueOf(syscall.Pause),
+ "Pipe": ValueOf(syscall.Pipe),
+ "Pipe2": ValueOf(syscall.Pipe2),
+ "PivotRoot": ValueOf(syscall.PivotRoot),
+ "Pread": ValueOf(syscall.Pread),
+ "PtraceAttach": ValueOf(syscall.PtraceAttach),
+ "PtraceCont": ValueOf(syscall.PtraceCont),
+ "PtraceDetach": ValueOf(syscall.PtraceDetach),
+ "PtraceGetEventMsg": ValueOf(syscall.PtraceGetEventMsg),
+ "PtraceGetRegs": ValueOf(syscall.PtraceGetRegs),
+ "PtracePeekData": ValueOf(syscall.PtracePeekData),
+ "PtracePeekText": ValueOf(syscall.PtracePeekText),
+ "PtracePokeData": ValueOf(syscall.PtracePokeData),
+ "PtracePokeText": ValueOf(syscall.PtracePokeText),
+ "PtraceSetOptions": ValueOf(syscall.PtraceSetOptions),
+ "PtraceSetRegs": ValueOf(syscall.PtraceSetRegs),
+ "PtraceSingleStep": ValueOf(syscall.PtraceSingleStep),
+ "Pwrite": ValueOf(syscall.Pwrite),
+ "RLIMIT_AS": ValueOf(syscall.RLIMIT_AS),
+ "RLIMIT_CORE": ValueOf(syscall.RLIMIT_CORE),
+ "RLIMIT_CPU": ValueOf(syscall.RLIMIT_CPU),
+ "RLIMIT_DATA": ValueOf(syscall.RLIMIT_DATA),
+ "RLIMIT_FSIZE": ValueOf(syscall.RLIMIT_FSIZE),
+ "RLIMIT_NOFILE": ValueOf(syscall.RLIMIT_NOFILE),
+ "RLIMIT_STACK": ValueOf(syscall.RLIMIT_STACK),
+ "RLIM_INFINITY": ValueOf(uint64(syscall.RLIM_INFINITY)),
+ "RLIM_SAVED_CUR": ValueOf(uint64(syscall.RLIM_SAVED_CUR)),
+ "RLIM_SAVED_MAX": ValueOf(uint64(syscall.RLIM_SAVED_MAX)),
+ "RTAX_ADVMSS": ValueOf(syscall.RTAX_ADVMSS),
+ "RTAX_CC_ALGO": ValueOf(syscall.RTAX_CC_ALGO),
+ "RTAX_CWND": ValueOf(syscall.RTAX_CWND),
+ "RTAX_FASTOPEN_NO_COOKIE": ValueOf(syscall.RTAX_FASTOPEN_NO_COOKIE),
+ "RTAX_FEATURES": ValueOf(syscall.RTAX_FEATURES),
+ "RTAX_FEATURE_ALLFRAG": ValueOf(syscall.RTAX_FEATURE_ALLFRAG),
+ "RTAX_FEATURE_ECN": ValueOf(syscall.RTAX_FEATURE_ECN),
+ "RTAX_FEATURE_MASK": ValueOf(syscall.RTAX_FEATURE_MASK),
+ "RTAX_FEATURE_SACK": ValueOf(syscall.RTAX_FEATURE_SACK),
+ "RTAX_FEATURE_TIMESTAMP": ValueOf(syscall.RTAX_FEATURE_TIMESTAMP),
+ "RTAX_HOPLIMIT": ValueOf(syscall.RTAX_HOPLIMIT),
+ "RTAX_INITCWND": ValueOf(syscall.RTAX_INITCWND),
+ "RTAX_INITRWND": ValueOf(syscall.RTAX_INITRWND),
+ "RTAX_LOCK": ValueOf(syscall.RTAX_LOCK),
+ "RTAX_MTU": ValueOf(syscall.RTAX_MTU),
+ "RTAX_QUICKACK": ValueOf(syscall.RTAX_QUICKACK),
+ "RTAX_REORDERING": ValueOf(syscall.RTAX_REORDERING),
+ "RTAX_RTO_MIN": ValueOf(syscall.RTAX_RTO_MIN),
+ "RTAX_RTT": ValueOf(syscall.RTAX_RTT),
+ "RTAX_RTTVAR": ValueOf(syscall.RTAX_RTTVAR),
+ "RTAX_SSTHRESH": ValueOf(syscall.RTAX_SSTHRESH),
+ "RTAX_UNSPEC": ValueOf(syscall.RTAX_UNSPEC),
+ "RTAX_WINDOW": ValueOf(syscall.RTAX_WINDOW),
+ "RTA_ALIGNTO": ValueOf(syscall.RTA_ALIGNTO),
+ "RTA_CACHEINFO": ValueOf(syscall.RTA_CACHEINFO),
+ "RTA_DST": ValueOf(syscall.RTA_DST),
+ "RTA_ENCAP": ValueOf(syscall.RTA_ENCAP),
+ "RTA_ENCAP_TYPE": ValueOf(syscall.RTA_ENCAP_TYPE),
+ "RTA_EXPIRES": ValueOf(syscall.RTA_EXPIRES),
+ "RTA_FLOW": ValueOf(syscall.RTA_FLOW),
+ "RTA_GATEWAY": ValueOf(syscall.RTA_GATEWAY),
+ "RTA_IIF": ValueOf(syscall.RTA_IIF),
+ "RTA_MARK": ValueOf(syscall.RTA_MARK),
+ "RTA_METRICS": ValueOf(syscall.RTA_METRICS),
+ "RTA_MFC_STATS": ValueOf(syscall.RTA_MFC_STATS),
+ "RTA_MP_ALGO": ValueOf(syscall.RTA_MP_ALGO),
+ "RTA_MULTIPATH": ValueOf(syscall.RTA_MULTIPATH),
+ "RTA_NEWDST": ValueOf(syscall.RTA_NEWDST),
+ "RTA_OIF": ValueOf(syscall.RTA_OIF),
+ "RTA_PAD": ValueOf(syscall.RTA_PAD),
+ "RTA_PREF": ValueOf(syscall.RTA_PREF),
+ "RTA_PREFSRC": ValueOf(syscall.RTA_PREFSRC),
+ "RTA_PRIORITY": ValueOf(syscall.RTA_PRIORITY),
+ "RTA_PROTOINFO": ValueOf(syscall.RTA_PROTOINFO),
+ "RTA_SESSION": ValueOf(syscall.RTA_SESSION),
+ "RTA_SRC": ValueOf(syscall.RTA_SRC),
+ "RTA_TABLE": ValueOf(syscall.RTA_TABLE),
+ "RTA_TTL_PROPAGATE": ValueOf(syscall.RTA_TTL_PROPAGATE),
+ "RTA_UID": ValueOf(syscall.RTA_UID),
+ "RTA_UNSPEC": ValueOf(syscall.RTA_UNSPEC),
+ "RTA_VIA": ValueOf(syscall.RTA_VIA),
+ "RTCF_DIRECTSRC": ValueOf(syscall.RTCF_DIRECTSRC),
+ "RTCF_DOREDIRECT": ValueOf(syscall.RTCF_DOREDIRECT),
+ "RTCF_LOG": ValueOf(syscall.RTCF_LOG),
+ "RTCF_MASQ": ValueOf(syscall.RTCF_MASQ),
+ "RTCF_NAT": ValueOf(syscall.RTCF_NAT),
+ "RTCF_VALVE": ValueOf(syscall.RTCF_VALVE),
+ "RTF_ADDRCLASSMASK": ValueOf(uint32(syscall.RTF_ADDRCLASSMASK)),
+ "RTF_ADDRCONF": ValueOf(syscall.RTF_ADDRCONF),
+ "RTF_ALLONLINK": ValueOf(syscall.RTF_ALLONLINK),
+ "RTF_BROADCAST": ValueOf(syscall.RTF_BROADCAST),
+ "RTF_CACHE": ValueOf(syscall.RTF_CACHE),
+ "RTF_DEFAULT": ValueOf(syscall.RTF_DEFAULT),
+ "RTF_DYNAMIC": ValueOf(syscall.RTF_DYNAMIC),
+ "RTF_FLOW": ValueOf(syscall.RTF_FLOW),
+ "RTF_GATEWAY": ValueOf(syscall.RTF_GATEWAY),
+ "RTF_HOST": ValueOf(syscall.RTF_HOST),
+ "RTF_INTERFACE": ValueOf(syscall.RTF_INTERFACE),
+ "RTF_IRTT": ValueOf(syscall.RTF_IRTT),
+ "RTF_LINKRT": ValueOf(syscall.RTF_LINKRT),
+ "RTF_LOCAL": ValueOf(uint32(syscall.RTF_LOCAL)),
+ "RTF_MODIFIED": ValueOf(syscall.RTF_MODIFIED),
+ "RTF_MSS": ValueOf(syscall.RTF_MSS),
+ "RTF_MTU": ValueOf(syscall.RTF_MTU),
+ "RTF_MULTICAST": ValueOf(syscall.RTF_MULTICAST),
+ "RTF_NAT": ValueOf(syscall.RTF_NAT),
+ "RTF_NOFORWARD": ValueOf(syscall.RTF_NOFORWARD),
+ "RTF_NONEXTHOP": ValueOf(syscall.RTF_NONEXTHOP),
+ "RTF_NOPMTUDISC": ValueOf(syscall.RTF_NOPMTUDISC),
+ "RTF_POLICY": ValueOf(syscall.RTF_POLICY),
+ "RTF_REINSTATE": ValueOf(syscall.RTF_REINSTATE),
+ "RTF_REJECT": ValueOf(syscall.RTF_REJECT),
+ "RTF_STATIC": ValueOf(syscall.RTF_STATIC),
+ "RTF_THROW": ValueOf(syscall.RTF_THROW),
+ "RTF_UP": ValueOf(syscall.RTF_UP),
+ "RTF_WINDOW": ValueOf(syscall.RTF_WINDOW),
+ "RTF_XRESOLVE": ValueOf(syscall.RTF_XRESOLVE),
+ "RTMGRP_DECnet_IFADDR": ValueOf(syscall.RTMGRP_DECnet_IFADDR),
+ "RTMGRP_DECnet_ROUTE": ValueOf(syscall.RTMGRP_DECnet_ROUTE),
+ "RTMGRP_IPV4_IFADDR": ValueOf(syscall.RTMGRP_IPV4_IFADDR),
+ "RTMGRP_IPV4_MROUTE": ValueOf(syscall.RTMGRP_IPV4_MROUTE),
+ "RTMGRP_IPV4_ROUTE": ValueOf(syscall.RTMGRP_IPV4_ROUTE),
+ "RTMGRP_IPV4_RULE": ValueOf(syscall.RTMGRP_IPV4_RULE),
+ "RTMGRP_IPV6_IFADDR": ValueOf(syscall.RTMGRP_IPV6_IFADDR),
+ "RTMGRP_IPV6_IFINFO": ValueOf(syscall.RTMGRP_IPV6_IFINFO),
+ "RTMGRP_IPV6_MROUTE": ValueOf(syscall.RTMGRP_IPV6_MROUTE),
+ "RTMGRP_IPV6_PREFIX": ValueOf(syscall.RTMGRP_IPV6_PREFIX),
+ "RTMGRP_IPV6_ROUTE": ValueOf(syscall.RTMGRP_IPV6_ROUTE),
+ "RTMGRP_LINK": ValueOf(syscall.RTMGRP_LINK),
+ "RTMGRP_NEIGH": ValueOf(syscall.RTMGRP_NEIGH),
+ "RTMGRP_NOTIFY": ValueOf(syscall.RTMGRP_NOTIFY),
+ "RTMGRP_TC": ValueOf(syscall.RTMGRP_TC),
+ "RTMSG_AR_FAILED": ValueOf(syscall.RTMSG_AR_FAILED),
+ "RTMSG_CONTROL": ValueOf(syscall.RTMSG_CONTROL),
+ "RTMSG_DELDEVICE": ValueOf(syscall.RTMSG_DELDEVICE),
+ "RTMSG_DELROUTE": ValueOf(syscall.RTMSG_DELROUTE),
+ "RTMSG_DELRULE": ValueOf(syscall.RTMSG_DELRULE),
+ "RTMSG_NEWDEVICE": ValueOf(syscall.RTMSG_NEWDEVICE),
+ "RTMSG_NEWROUTE": ValueOf(syscall.RTMSG_NEWROUTE),
+ "RTMSG_NEWRULE": ValueOf(syscall.RTMSG_NEWRULE),
+ "RTMSG_OVERRUN": ValueOf(syscall.RTMSG_OVERRUN),
+ "RTM_BASE": ValueOf(syscall.RTM_BASE),
+ "RTM_DELACTION": ValueOf(syscall.RTM_DELACTION),
+ "RTM_DELADDR": ValueOf(syscall.RTM_DELADDR),
+ "RTM_DELADDRLABEL": ValueOf(syscall.RTM_DELADDRLABEL),
+ "RTM_DELLINK": ValueOf(syscall.RTM_DELLINK),
+ "RTM_DELMDB": ValueOf(syscall.RTM_DELMDB),
+ "RTM_DELNEIGH": ValueOf(syscall.RTM_DELNEIGH),
+ "RTM_DELNETCONF": ValueOf(syscall.RTM_DELNETCONF),
+ "RTM_DELNSID": ValueOf(syscall.RTM_DELNSID),
+ "RTM_DELQDISC": ValueOf(syscall.RTM_DELQDISC),
+ "RTM_DELROUTE": ValueOf(syscall.RTM_DELROUTE),
+ "RTM_DELRULE": ValueOf(syscall.RTM_DELRULE),
+ "RTM_DELTCLASS": ValueOf(syscall.RTM_DELTCLASS),
+ "RTM_DELTFILTER": ValueOf(syscall.RTM_DELTFILTER),
+ "RTM_F_CLONED": ValueOf(syscall.RTM_F_CLONED),
+ "RTM_F_EQUALIZE": ValueOf(syscall.RTM_F_EQUALIZE),
+ "RTM_F_FIB_MATCH": ValueOf(syscall.RTM_F_FIB_MATCH),
+ "RTM_F_LOOKUP_TABLE": ValueOf(syscall.RTM_F_LOOKUP_TABLE),
+ "RTM_F_NOTIFY": ValueOf(syscall.RTM_F_NOTIFY),
+ "RTM_F_PREFIX": ValueOf(syscall.RTM_F_PREFIX),
+ "RTM_GETACTION": ValueOf(syscall.RTM_GETACTION),
+ "RTM_GETADDR": ValueOf(syscall.RTM_GETADDR),
+ "RTM_GETADDRLABEL": ValueOf(syscall.RTM_GETADDRLABEL),
+ "RTM_GETANYCAST": ValueOf(syscall.RTM_GETANYCAST),
+ "RTM_GETDCB": ValueOf(syscall.RTM_GETDCB),
+ "RTM_GETLINK": ValueOf(syscall.RTM_GETLINK),
+ "RTM_GETMDB": ValueOf(syscall.RTM_GETMDB),
+ "RTM_GETMULTICAST": ValueOf(syscall.RTM_GETMULTICAST),
+ "RTM_GETNEIGH": ValueOf(syscall.RTM_GETNEIGH),
+ "RTM_GETNEIGHTBL": ValueOf(syscall.RTM_GETNEIGHTBL),
+ "RTM_GETNETCONF": ValueOf(syscall.RTM_GETNETCONF),
+ "RTM_GETNSID": ValueOf(syscall.RTM_GETNSID),
+ "RTM_GETQDISC": ValueOf(syscall.RTM_GETQDISC),
+ "RTM_GETROUTE": ValueOf(syscall.RTM_GETROUTE),
+ "RTM_GETRULE": ValueOf(syscall.RTM_GETRULE),
+ "RTM_GETSTATS": ValueOf(syscall.RTM_GETSTATS),
+ "RTM_GETTCLASS": ValueOf(syscall.RTM_GETTCLASS),
+ "RTM_GETTFILTER": ValueOf(syscall.RTM_GETTFILTER),
+ "RTM_NEWACTION": ValueOf(syscall.RTM_NEWACTION),
+ "RTM_NEWADDR": ValueOf(syscall.RTM_NEWADDR),
+ "RTM_NEWADDRLABEL": ValueOf(syscall.RTM_NEWADDRLABEL),
+ "RTM_NEWCACHEREPORT": ValueOf(syscall.RTM_NEWCACHEREPORT),
+ "RTM_NEWLINK": ValueOf(syscall.RTM_NEWLINK),
+ "RTM_NEWMDB": ValueOf(syscall.RTM_NEWMDB),
+ "RTM_NEWNDUSEROPT": ValueOf(syscall.RTM_NEWNDUSEROPT),
+ "RTM_NEWNEIGH": ValueOf(syscall.RTM_NEWNEIGH),
+ "RTM_NEWNEIGHTBL": ValueOf(syscall.RTM_NEWNEIGHTBL),
+ "RTM_NEWNETCONF": ValueOf(syscall.RTM_NEWNETCONF),
+ "RTM_NEWNSID": ValueOf(syscall.RTM_NEWNSID),
+ "RTM_NEWPREFIX": ValueOf(syscall.RTM_NEWPREFIX),
+ "RTM_NEWQDISC": ValueOf(syscall.RTM_NEWQDISC),
+ "RTM_NEWROUTE": ValueOf(syscall.RTM_NEWROUTE),
+ "RTM_NEWRULE": ValueOf(syscall.RTM_NEWRULE),
+ "RTM_NEWSTATS": ValueOf(syscall.RTM_NEWSTATS),
+ "RTM_NEWTCLASS": ValueOf(syscall.RTM_NEWTCLASS),
+ "RTM_NEWTFILTER": ValueOf(syscall.RTM_NEWTFILTER),
+ "RTM_SETDCB": ValueOf(syscall.RTM_SETDCB),
+ "RTM_SETLINK": ValueOf(syscall.RTM_SETLINK),
+ "RTM_SETNEIGHTBL": ValueOf(syscall.RTM_SETNEIGHTBL),
+ "RTNETLINK_HAVE_PEERINFO": ValueOf(syscall.RTNETLINK_HAVE_PEERINFO),
+ "RTNH_ALIGNTO": ValueOf(syscall.RTNH_ALIGNTO),
+ "RTNH_COMPARE_MASK": ValueOf(syscall.RTNH_COMPARE_MASK),
+ "RTNH_F_DEAD": ValueOf(syscall.RTNH_F_DEAD),
+ "RTNH_F_LINKDOWN": ValueOf(syscall.RTNH_F_LINKDOWN),
+ "RTNH_F_OFFLOAD": ValueOf(syscall.RTNH_F_OFFLOAD),
+ "RTNH_F_ONLINK": ValueOf(syscall.RTNH_F_ONLINK),
+ "RTNH_F_PERVASIVE": ValueOf(syscall.RTNH_F_PERVASIVE),
+ "RTNH_F_UNRESOLVED": ValueOf(syscall.RTNH_F_UNRESOLVED),
+ "RTNLGRP_DCB": ValueOf(syscall.RTNLGRP_DCB),
+ "RTNLGRP_DECnet_IFADDR": ValueOf(syscall.RTNLGRP_DECnet_IFADDR),
+ "RTNLGRP_DECnet_ROUTE": ValueOf(syscall.RTNLGRP_DECnet_ROUTE),
+ "RTNLGRP_DECnet_RULE": ValueOf(syscall.RTNLGRP_DECnet_RULE),
+ "RTNLGRP_IPV4_IFADDR": ValueOf(syscall.RTNLGRP_IPV4_IFADDR),
+ "RTNLGRP_IPV4_MROUTE": ValueOf(syscall.RTNLGRP_IPV4_MROUTE),
+ "RTNLGRP_IPV4_MROUTE_R": ValueOf(syscall.RTNLGRP_IPV4_MROUTE_R),
+ "RTNLGRP_IPV4_NETCONF": ValueOf(syscall.RTNLGRP_IPV4_NETCONF),
+ "RTNLGRP_IPV4_ROUTE": ValueOf(syscall.RTNLGRP_IPV4_ROUTE),
+ "RTNLGRP_IPV4_RULE": ValueOf(syscall.RTNLGRP_IPV4_RULE),
+ "RTNLGRP_IPV6_IFADDR": ValueOf(syscall.RTNLGRP_IPV6_IFADDR),
+ "RTNLGRP_IPV6_IFINFO": ValueOf(syscall.RTNLGRP_IPV6_IFINFO),
+ "RTNLGRP_IPV6_MROUTE": ValueOf(syscall.RTNLGRP_IPV6_MROUTE),
+ "RTNLGRP_IPV6_MROUTE_R": ValueOf(syscall.RTNLGRP_IPV6_MROUTE_R),
+ "RTNLGRP_IPV6_NETCONF": ValueOf(syscall.RTNLGRP_IPV6_NETCONF),
+ "RTNLGRP_IPV6_PREFIX": ValueOf(syscall.RTNLGRP_IPV6_PREFIX),
+ "RTNLGRP_IPV6_ROUTE": ValueOf(syscall.RTNLGRP_IPV6_ROUTE),
+ "RTNLGRP_IPV6_RULE": ValueOf(syscall.RTNLGRP_IPV6_RULE),
+ "RTNLGRP_LINK": ValueOf(syscall.RTNLGRP_LINK),
+ "RTNLGRP_MDB": ValueOf(syscall.RTNLGRP_MDB),
+ "RTNLGRP_MPLS_NETCONF": ValueOf(syscall.RTNLGRP_MPLS_NETCONF),
+ "RTNLGRP_MPLS_ROUTE": ValueOf(syscall.RTNLGRP_MPLS_ROUTE),
+ "RTNLGRP_ND_USEROPT": ValueOf(syscall.RTNLGRP_ND_USEROPT),
+ "RTNLGRP_NEIGH": ValueOf(syscall.RTNLGRP_NEIGH),
+ "RTNLGRP_NONE": ValueOf(syscall.RTNLGRP_NONE),
+ "RTNLGRP_NOP2": ValueOf(syscall.RTNLGRP_NOP2),
+ "RTNLGRP_NOP4": ValueOf(syscall.RTNLGRP_NOP4),
+ "RTNLGRP_NOTIFY": ValueOf(syscall.RTNLGRP_NOTIFY),
+ "RTNLGRP_NSID": ValueOf(syscall.RTNLGRP_NSID),
+ "RTNLGRP_PHONET_IFADDR": ValueOf(syscall.RTNLGRP_PHONET_IFADDR),
+ "RTNLGRP_PHONET_ROUTE": ValueOf(syscall.RTNLGRP_PHONET_ROUTE),
+ "RTNLGRP_TC": ValueOf(syscall.RTNLGRP_TC),
+ "RTNL_FAMILY_IP6MR": ValueOf(syscall.RTNL_FAMILY_IP6MR),
+ "RTNL_FAMILY_IPMR": ValueOf(syscall.RTNL_FAMILY_IPMR),
+ "RTNL_FAMILY_MAX": ValueOf(syscall.RTNL_FAMILY_MAX),
+ "RTN_ANYCAST": ValueOf(syscall.RTN_ANYCAST),
+ "RTN_BLACKHOLE": ValueOf(syscall.RTN_BLACKHOLE),
+ "RTN_BROADCAST": ValueOf(syscall.RTN_BROADCAST),
+ "RTN_LOCAL": ValueOf(syscall.RTN_LOCAL),
+ "RTN_MULTICAST": ValueOf(syscall.RTN_MULTICAST),
+ "RTN_NAT": ValueOf(syscall.RTN_NAT),
+ "RTN_PROHIBIT": ValueOf(syscall.RTN_PROHIBIT),
+ "RTN_THROW": ValueOf(syscall.RTN_THROW),
+ "RTN_UNICAST": ValueOf(syscall.RTN_UNICAST),
+ "RTN_UNREACHABLE": ValueOf(syscall.RTN_UNREACHABLE),
+ "RTN_UNSPEC": ValueOf(syscall.RTN_UNSPEC),
+ "RTN_XRESOLVE": ValueOf(syscall.RTN_XRESOLVE),
+ "RTPROT_BABEL": ValueOf(syscall.RTPROT_BABEL),
+ "RTPROT_BIRD": ValueOf(syscall.RTPROT_BIRD),
+ "RTPROT_BOOT": ValueOf(syscall.RTPROT_BOOT),
+ "RTPROT_DHCP": ValueOf(syscall.RTPROT_DHCP),
+ "RTPROT_DNROUTED": ValueOf(syscall.RTPROT_DNROUTED),
+ "RTPROT_GATED": ValueOf(syscall.RTPROT_GATED),
+ "RTPROT_KERNEL": ValueOf(syscall.RTPROT_KERNEL),
+ "RTPROT_MROUTED": ValueOf(syscall.RTPROT_MROUTED),
+ "RTPROT_MRT": ValueOf(syscall.RTPROT_MRT),
+ "RTPROT_NTK": ValueOf(syscall.RTPROT_NTK),
+ "RTPROT_RA": ValueOf(syscall.RTPROT_RA),
+ "RTPROT_REDIRECT": ValueOf(syscall.RTPROT_REDIRECT),
+ "RTPROT_STATIC": ValueOf(syscall.RTPROT_STATIC),
+ "RTPROT_UNSPEC": ValueOf(syscall.RTPROT_UNSPEC),
+ "RTPROT_XORP": ValueOf(syscall.RTPROT_XORP),
+ "RTPROT_ZEBRA": ValueOf(syscall.RTPROT_ZEBRA),
+ "RT_CLASS_DEFAULT": ValueOf(syscall.RT_CLASS_DEFAULT),
+ "RT_CLASS_LOCAL": ValueOf(syscall.RT_CLASS_LOCAL),
+ "RT_CLASS_MAIN": ValueOf(syscall.RT_CLASS_MAIN),
+ "RT_CLASS_MAX": ValueOf(syscall.RT_CLASS_MAX),
+ "RT_CLASS_UNSPEC": ValueOf(syscall.RT_CLASS_UNSPEC),
+ "RT_SCOPE_HOST": ValueOf(syscall.RT_SCOPE_HOST),
+ "RT_SCOPE_LINK": ValueOf(syscall.RT_SCOPE_LINK),
+ "RT_SCOPE_NOWHERE": ValueOf(syscall.RT_SCOPE_NOWHERE),
+ "RT_SCOPE_SITE": ValueOf(syscall.RT_SCOPE_SITE),
+ "RT_SCOPE_UNIVERSE": ValueOf(syscall.RT_SCOPE_UNIVERSE),
+ "RT_TABLE_COMPAT": ValueOf(syscall.RT_TABLE_COMPAT),
+ "RT_TABLE_DEFAULT": ValueOf(syscall.RT_TABLE_DEFAULT),
+ "RT_TABLE_LOCAL": ValueOf(syscall.RT_TABLE_LOCAL),
+ "RT_TABLE_MAIN": ValueOf(syscall.RT_TABLE_MAIN),
+ "RT_TABLE_MAX": ValueOf(uint32(syscall.RT_TABLE_MAX)),
+ "RT_TABLE_UNSPEC": ValueOf(syscall.RT_TABLE_UNSPEC),
+ "RUSAGE_CHILDREN": ValueOf(syscall.RUSAGE_CHILDREN),
+ "RUSAGE_SELF": ValueOf(syscall.RUSAGE_SELF),
+ "RUSAGE_THREAD": ValueOf(syscall.RUSAGE_THREAD),
+ "RawSyscall": ValueOf(syscall.RawSyscall),
+ "RawSyscall6": ValueOf(syscall.RawSyscall6),
+ "Read": ValueOf(syscall.Read),
+ "ReadDirent": ValueOf(syscall.ReadDirent),
+ "Readlink": ValueOf(syscall.Readlink),
+ "Reboot": ValueOf(syscall.Reboot),
+ "Recvfrom": ValueOf(syscall.Recvfrom),
+ "Recvmsg": ValueOf(syscall.Recvmsg),
+ "Removexattr": ValueOf(syscall.Removexattr),
+ "Rename": ValueOf(syscall.Rename),
+ "Renameat": ValueOf(syscall.Renameat),
+ "Rmdir": ValueOf(syscall.Rmdir),
+ "SCHED_H": ValueOf(syscall.SCHED_H),
+ "SCM_CREDENTIALS": ValueOf(syscall.SCM_CREDENTIALS),
+ "SCM_RIGHTS": ValueOf(syscall.SCM_RIGHTS),
+ "SCM_TIMESTAMP": ValueOf(syscall.SCM_TIMESTAMP),
+ "SCM_TIMESTAMPING": ValueOf(syscall.SCM_TIMESTAMPING),
+ "SCM_TIMESTAMPING_OPT_STATS": ValueOf(syscall.SCM_TIMESTAMPING_OPT_STATS),
+ "SCM_TIMESTAMPING_PKTINFO": ValueOf(syscall.SCM_TIMESTAMPING_PKTINFO),
+ "SCM_TIMESTAMPNS": ValueOf(syscall.SCM_TIMESTAMPNS),
+ "SCM_WIFI_STATUS": ValueOf(syscall.SCM_WIFI_STATUS),
+ "SC_2_CHAR_TERM": ValueOf(syscall.SC_2_CHAR_TERM),
+ "SC_2_C_BIND": ValueOf(syscall.SC_2_C_BIND),
+ "SC_2_C_DEV": ValueOf(syscall.SC_2_C_DEV),
+ "SC_2_C_VERSION": ValueOf(syscall.SC_2_C_VERSION),
+ "SC_2_FORT_DEV": ValueOf(syscall.SC_2_FORT_DEV),
+ "SC_2_FORT_RUN": ValueOf(syscall.SC_2_FORT_RUN),
+ "SC_2_LOCALEDEF": ValueOf(syscall.SC_2_LOCALEDEF),
+ "SC_2_PBS": ValueOf(syscall.SC_2_PBS),
+ "SC_2_PBS_ACCOUNTING": ValueOf(syscall.SC_2_PBS_ACCOUNTING),
+ "SC_2_PBS_CHECKPOINT": ValueOf(syscall.SC_2_PBS_CHECKPOINT),
+ "SC_2_PBS_LOCATE": ValueOf(syscall.SC_2_PBS_LOCATE),
+ "SC_2_PBS_MESSAGE": ValueOf(syscall.SC_2_PBS_MESSAGE),
+ "SC_2_PBS_TRACK": ValueOf(syscall.SC_2_PBS_TRACK),
+ "SC_2_SW_DEV": ValueOf(syscall.SC_2_SW_DEV),
+ "SC_2_UPE": ValueOf(syscall.SC_2_UPE),
+ "SC_2_VERSION": ValueOf(syscall.SC_2_VERSION),
+ "SC_ADVISORY_INFO": ValueOf(syscall.SC_ADVISORY_INFO),
+ "SC_AIO_LISTIO_MAX": ValueOf(syscall.SC_AIO_LISTIO_MAX),
+ "SC_AIO_MAX": ValueOf(syscall.SC_AIO_MAX),
+ "SC_AIO_PRIO_DELTA_MAX": ValueOf(syscall.SC_AIO_PRIO_DELTA_MAX),
+ "SC_ARG_MAX": ValueOf(syscall.SC_ARG_MAX),
+ "SC_ASYNCHRONOUS_IO": ValueOf(syscall.SC_ASYNCHRONOUS_IO),
+ "SC_ATEXIT_MAX": ValueOf(syscall.SC_ATEXIT_MAX),
+ "SC_AVPHYS_PAGES": ValueOf(syscall.SC_AVPHYS_PAGES),
+ "SC_BARRIERS": ValueOf(syscall.SC_BARRIERS),
+ "SC_BASE": ValueOf(syscall.SC_BASE),
+ "SC_BC_BASE_MAX": ValueOf(syscall.SC_BC_BASE_MAX),
+ "SC_BC_DIM_MAX": ValueOf(syscall.SC_BC_DIM_MAX),
+ "SC_BC_SCALE_MAX": ValueOf(syscall.SC_BC_SCALE_MAX),
+ "SC_BC_STRING_MAX": ValueOf(syscall.SC_BC_STRING_MAX),
+ "SC_CHARCLASS_NAME_MAX": ValueOf(syscall.SC_CHARCLASS_NAME_MAX),
+ "SC_CHAR_BIT": ValueOf(syscall.SC_CHAR_BIT),
+ "SC_CHAR_MAX": ValueOf(syscall.SC_CHAR_MAX),
+ "SC_CHAR_MIN": ValueOf(syscall.SC_CHAR_MIN),
+ "SC_CHILD_MAX": ValueOf(syscall.SC_CHILD_MAX),
+ "SC_CLK_TCK": ValueOf(syscall.SC_CLK_TCK),
+ "SC_CLOCK_SELECTION": ValueOf(syscall.SC_CLOCK_SELECTION),
+ "SC_COLL_WEIGHTS_MAX": ValueOf(syscall.SC_COLL_WEIGHTS_MAX),
+ "SC_CPUTIME": ValueOf(syscall.SC_CPUTIME),
+ "SC_C_LANG_SUPPORT": ValueOf(syscall.SC_C_LANG_SUPPORT),
+ "SC_C_LANG_SUPPORT_R": ValueOf(syscall.SC_C_LANG_SUPPORT_R),
+ "SC_DELAYTIMER_MAX": ValueOf(syscall.SC_DELAYTIMER_MAX),
+ "SC_DEVICE_IO": ValueOf(syscall.SC_DEVICE_IO),
+ "SC_DEVICE_SPECIFIC": ValueOf(syscall.SC_DEVICE_SPECIFIC),
+ "SC_DEVICE_SPECIFIC_R": ValueOf(syscall.SC_DEVICE_SPECIFIC_R),
+ "SC_EQUIV_CLASS_MAX": ValueOf(syscall.SC_EQUIV_CLASS_MAX),
+ "SC_EXPR_NEST_MAX": ValueOf(syscall.SC_EXPR_NEST_MAX),
+ "SC_FD_MGMT": ValueOf(syscall.SC_FD_MGMT),
+ "SC_FIFO": ValueOf(syscall.SC_FIFO),
+ "SC_FILE_ATTRIBUTES": ValueOf(syscall.SC_FILE_ATTRIBUTES),
+ "SC_FILE_LOCKING": ValueOf(syscall.SC_FILE_LOCKING),
+ "SC_FILE_SYSTEM": ValueOf(syscall.SC_FILE_SYSTEM),
+ "SC_FSYNC": ValueOf(syscall.SC_FSYNC),
+ "SC_GETGR_R_SIZE_MAX": ValueOf(syscall.SC_GETGR_R_SIZE_MAX),
+ "SC_GETPW_R_SIZE_MAX": ValueOf(syscall.SC_GETPW_R_SIZE_MAX),
+ "SC_HOST_NAME_MAX": ValueOf(syscall.SC_HOST_NAME_MAX),
+ "SC_INT_MAX": ValueOf(syscall.SC_INT_MAX),
+ "SC_INT_MIN": ValueOf(syscall.SC_INT_MIN),
+ "SC_IOV_MAX": ValueOf(syscall.SC_IOV_MAX),
+ "SC_IPV6": ValueOf(syscall.SC_IPV6),
+ "SC_JOB_CONTROL": ValueOf(syscall.SC_JOB_CONTROL),
+ "SC_LEVEL1_DCACHE_ASSOC": ValueOf(syscall.SC_LEVEL1_DCACHE_ASSOC),
+ "SC_LEVEL1_DCACHE_LINESIZE": ValueOf(syscall.SC_LEVEL1_DCACHE_LINESIZE),
+ "SC_LEVEL1_DCACHE_SIZE": ValueOf(syscall.SC_LEVEL1_DCACHE_SIZE),
+ "SC_LEVEL1_ICACHE_ASSOC": ValueOf(syscall.SC_LEVEL1_ICACHE_ASSOC),
+ "SC_LEVEL1_ICACHE_LINESIZE": ValueOf(syscall.SC_LEVEL1_ICACHE_LINESIZE),
+ "SC_LEVEL1_ICACHE_SIZE": ValueOf(syscall.SC_LEVEL1_ICACHE_SIZE),
+ "SC_LEVEL2_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL2_CACHE_ASSOC),
+ "SC_LEVEL2_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL2_CACHE_LINESIZE),
+ "SC_LEVEL2_CACHE_SIZE": ValueOf(syscall.SC_LEVEL2_CACHE_SIZE),
+ "SC_LEVEL3_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL3_CACHE_ASSOC),
+ "SC_LEVEL3_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL3_CACHE_LINESIZE),
+ "SC_LEVEL3_CACHE_SIZE": ValueOf(syscall.SC_LEVEL3_CACHE_SIZE),
+ "SC_LEVEL4_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL4_CACHE_ASSOC),
+ "SC_LEVEL4_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL4_CACHE_LINESIZE),
+ "SC_LEVEL4_CACHE_SIZE": ValueOf(syscall.SC_LEVEL4_CACHE_SIZE),
+ "SC_LINE_MAX": ValueOf(syscall.SC_LINE_MAX),
+ "SC_LOGIN_NAME_MAX": ValueOf(syscall.SC_LOGIN_NAME_MAX),
+ "SC_LONG_BIT": ValueOf(syscall.SC_LONG_BIT),
+ "SC_MAPPED_FILES": ValueOf(syscall.SC_MAPPED_FILES),
+ "SC_MB_LEN_MAX": ValueOf(syscall.SC_MB_LEN_MAX),
+ "SC_MEMLOCK": ValueOf(syscall.SC_MEMLOCK),
+ "SC_MEMLOCK_RANGE": ValueOf(syscall.SC_MEMLOCK_RANGE),
+ "SC_MEMORY_PROTECTION": ValueOf(syscall.SC_MEMORY_PROTECTION),
+ "SC_MESSAGE_PASSING": ValueOf(syscall.SC_MESSAGE_PASSING),
+ "SC_MONOTONIC_CLOCK": ValueOf(syscall.SC_MONOTONIC_CLOCK),
+ "SC_MQ_OPEN_MAX": ValueOf(syscall.SC_MQ_OPEN_MAX),
+ "SC_MQ_PRIO_MAX": ValueOf(syscall.SC_MQ_PRIO_MAX),
+ "SC_MULTI_PROCESS": ValueOf(syscall.SC_MULTI_PROCESS),
+ "SC_NETWORKING": ValueOf(syscall.SC_NETWORKING),
+ "SC_NGROUPS_MAX": ValueOf(syscall.SC_NGROUPS_MAX),
+ "SC_NL_ARGMAX": ValueOf(syscall.SC_NL_ARGMAX),
+ "SC_NL_LANGMAX": ValueOf(syscall.SC_NL_LANGMAX),
+ "SC_NL_MSGMAX": ValueOf(syscall.SC_NL_MSGMAX),
+ "SC_NL_NMAX": ValueOf(syscall.SC_NL_NMAX),
+ "SC_NL_SETMAX": ValueOf(syscall.SC_NL_SETMAX),
+ "SC_NL_TEXTMAX": ValueOf(syscall.SC_NL_TEXTMAX),
+ "SC_NPROCESSORS_CONF": ValueOf(syscall.SC_NPROCESSORS_CONF),
+ "SC_NPROCESSORS_ONLN": ValueOf(syscall.SC_NPROCESSORS_ONLN),
+ "SC_NZERO": ValueOf(syscall.SC_NZERO),
+ "SC_OPEN_MAX": ValueOf(syscall.SC_OPEN_MAX),
+ "SC_PAGESIZE": ValueOf(syscall.SC_PAGESIZE),
+ "SC_PASS_MAX": ValueOf(syscall.SC_PASS_MAX),
+ "SC_PHYS_PAGES": ValueOf(syscall.SC_PHYS_PAGES),
+ "SC_PII": ValueOf(syscall.SC_PII),
+ "SC_PII_INTERNET": ValueOf(syscall.SC_PII_INTERNET),
+ "SC_PII_INTERNET_DGRAM": ValueOf(syscall.SC_PII_INTERNET_DGRAM),
+ "SC_PII_INTERNET_STREAM": ValueOf(syscall.SC_PII_INTERNET_STREAM),
+ "SC_PII_OSI": ValueOf(syscall.SC_PII_OSI),
+ "SC_PII_OSI_CLTS": ValueOf(syscall.SC_PII_OSI_CLTS),
+ "SC_PII_OSI_COTS": ValueOf(syscall.SC_PII_OSI_COTS),
+ "SC_PII_OSI_M": ValueOf(syscall.SC_PII_OSI_M),
+ "SC_PII_SOCKET": ValueOf(syscall.SC_PII_SOCKET),
+ "SC_PII_XTI": ValueOf(syscall.SC_PII_XTI),
+ "SC_PIPE": ValueOf(syscall.SC_PIPE),
+ "SC_POLL": ValueOf(syscall.SC_POLL),
+ "SC_PRIORITIZED_IO": ValueOf(syscall.SC_PRIORITIZED_IO),
+ "SC_PRIORITY_SCHEDULING": ValueOf(syscall.SC_PRIORITY_SCHEDULING),
+ "SC_RAW_SOCKETS": ValueOf(syscall.SC_RAW_SOCKETS),
+ "SC_READER_WRITER_LOCKS": ValueOf(syscall.SC_READER_WRITER_LOCKS),
+ "SC_REALTIME_SIGNALS": ValueOf(syscall.SC_REALTIME_SIGNALS),
+ "SC_REGEXP": ValueOf(syscall.SC_REGEXP),
+ "SC_REGEX_VERSION": ValueOf(syscall.SC_REGEX_VERSION),
+ "SC_RE_DUP_MAX": ValueOf(syscall.SC_RE_DUP_MAX),
+ "SC_RTSIG_MAX": ValueOf(syscall.SC_RTSIG_MAX),
+ "SC_SAVED_IDS": ValueOf(syscall.SC_SAVED_IDS),
+ "SC_SCHAR_MAX": ValueOf(syscall.SC_SCHAR_MAX),
+ "SC_SCHAR_MIN": ValueOf(syscall.SC_SCHAR_MIN),
+ "SC_SELECT": ValueOf(syscall.SC_SELECT),
+ "SC_SEMAPHORES": ValueOf(syscall.SC_SEMAPHORES),
+ "SC_SEM_NSEMS_MAX": ValueOf(syscall.SC_SEM_NSEMS_MAX),
+ "SC_SEM_VALUE_MAX": ValueOf(syscall.SC_SEM_VALUE_MAX),
+ "SC_SHARED_MEMORY_OBJECTS": ValueOf(syscall.SC_SHARED_MEMORY_OBJECTS),
+ "SC_SHELL": ValueOf(syscall.SC_SHELL),
+ "SC_SHRT_MAX": ValueOf(syscall.SC_SHRT_MAX),
+ "SC_SHRT_MIN": ValueOf(syscall.SC_SHRT_MIN),
+ "SC_SIGNALS": ValueOf(syscall.SC_SIGNALS),
+ "SC_SIGQUEUE_MAX": ValueOf(syscall.SC_SIGQUEUE_MAX),
+ "SC_SINGLE_PROCESS": ValueOf(syscall.SC_SINGLE_PROCESS),
+ "SC_SPAWN": ValueOf(syscall.SC_SPAWN),
+ "SC_SPIN_LOCKS": ValueOf(syscall.SC_SPIN_LOCKS),
+ "SC_SPORADIC_SERVER": ValueOf(syscall.SC_SPORADIC_SERVER),
+ "SC_SSIZE_MAX": ValueOf(syscall.SC_SSIZE_MAX),
+ "SC_SS_REPL_MAX": ValueOf(syscall.SC_SS_REPL_MAX),
+ "SC_STREAMS": ValueOf(syscall.SC_STREAMS),
+ "SC_STREAM_MAX": ValueOf(syscall.SC_STREAM_MAX),
+ "SC_SYMLOOP_MAX": ValueOf(syscall.SC_SYMLOOP_MAX),
+ "SC_SYNCHRONIZED_IO": ValueOf(syscall.SC_SYNCHRONIZED_IO),
+ "SC_SYSTEM_DATABASE": ValueOf(syscall.SC_SYSTEM_DATABASE),
+ "SC_SYSTEM_DATABASE_R": ValueOf(syscall.SC_SYSTEM_DATABASE_R),
+ "SC_THREADS": ValueOf(syscall.SC_THREADS),
+ "SC_THREAD_ATTR_STACKADDR": ValueOf(syscall.SC_THREAD_ATTR_STACKADDR),
+ "SC_THREAD_ATTR_STACKSIZE": ValueOf(syscall.SC_THREAD_ATTR_STACKSIZE),
+ "SC_THREAD_CPUTIME": ValueOf(syscall.SC_THREAD_CPUTIME),
+ "SC_THREAD_DESTRUCTOR_ITERATIONS": ValueOf(syscall.SC_THREAD_DESTRUCTOR_ITERATIONS),
+ "SC_THREAD_KEYS_MAX": ValueOf(syscall.SC_THREAD_KEYS_MAX),
+ "SC_THREAD_PRIORITY_SCHEDULING": ValueOf(syscall.SC_THREAD_PRIORITY_SCHEDULING),
+ "SC_THREAD_PRIO_INHERIT": ValueOf(syscall.SC_THREAD_PRIO_INHERIT),
+ "SC_THREAD_PRIO_PROTECT": ValueOf(syscall.SC_THREAD_PRIO_PROTECT),
+ "SC_THREAD_PROCESS_SHARED": ValueOf(syscall.SC_THREAD_PROCESS_SHARED),
+ "SC_THREAD_ROBUST_PRIO_INHERIT": ValueOf(syscall.SC_THREAD_ROBUST_PRIO_INHERIT),
+ "SC_THREAD_ROBUST_PRIO_PROTECT": ValueOf(syscall.SC_THREAD_ROBUST_PRIO_PROTECT),
+ "SC_THREAD_SAFE_FUNCTIONS": ValueOf(syscall.SC_THREAD_SAFE_FUNCTIONS),
+ "SC_THREAD_SPORADIC_SERVER": ValueOf(syscall.SC_THREAD_SPORADIC_SERVER),
+ "SC_THREAD_STACK_MIN": ValueOf(syscall.SC_THREAD_STACK_MIN),
+ "SC_THREAD_THREADS_MAX": ValueOf(syscall.SC_THREAD_THREADS_MAX),
+ "SC_TIMEOUTS": ValueOf(syscall.SC_TIMEOUTS),
+ "SC_TIMERS": ValueOf(syscall.SC_TIMERS),
+ "SC_TIMER_MAX": ValueOf(syscall.SC_TIMER_MAX),
+ "SC_TRACE": ValueOf(syscall.SC_TRACE),
+ "SC_TRACE_EVENT_FILTER": ValueOf(syscall.SC_TRACE_EVENT_FILTER),
+ "SC_TRACE_EVENT_NAME_MAX": ValueOf(syscall.SC_TRACE_EVENT_NAME_MAX),
+ "SC_TRACE_INHERIT": ValueOf(syscall.SC_TRACE_INHERIT),
+ "SC_TRACE_LOG": ValueOf(syscall.SC_TRACE_LOG),
+ "SC_TRACE_NAME_MAX": ValueOf(syscall.SC_TRACE_NAME_MAX),
+ "SC_TRACE_SYS_MAX": ValueOf(syscall.SC_TRACE_SYS_MAX),
+ "SC_TRACE_USER_EVENT_MAX": ValueOf(syscall.SC_TRACE_USER_EVENT_MAX),
+ "SC_TTY_NAME_MAX": ValueOf(syscall.SC_TTY_NAME_MAX),
+ "SC_TYPED_MEMORY_OBJECTS": ValueOf(syscall.SC_TYPED_MEMORY_OBJECTS),
+ "SC_TZNAME_MAX": ValueOf(syscall.SC_TZNAME_MAX),
+ "SC_T_IOV_MAX": ValueOf(syscall.SC_T_IOV_MAX),
+ "SC_UCHAR_MAX": ValueOf(syscall.SC_UCHAR_MAX),
+ "SC_UINT_MAX": ValueOf(syscall.SC_UINT_MAX),
+ "SC_UIO_MAXIOV": ValueOf(syscall.SC_UIO_MAXIOV),
+ "SC_ULONG_MAX": ValueOf(syscall.SC_ULONG_MAX),
+ "SC_USER_GROUPS": ValueOf(syscall.SC_USER_GROUPS),
+ "SC_USER_GROUPS_R": ValueOf(syscall.SC_USER_GROUPS_R),
+ "SC_USHRT_MAX": ValueOf(syscall.SC_USHRT_MAX),
+ "SC_V6_ILP32_OFF32": ValueOf(syscall.SC_V6_ILP32_OFF32),
+ "SC_V6_ILP32_OFFBIG": ValueOf(syscall.SC_V6_ILP32_OFFBIG),
+ "SC_V6_LP64_OFF64": ValueOf(syscall.SC_V6_LP64_OFF64),
+ "SC_V6_LPBIG_OFFBIG": ValueOf(syscall.SC_V6_LPBIG_OFFBIG),
+ "SC_V7_ILP32_OFF32": ValueOf(syscall.SC_V7_ILP32_OFF32),
+ "SC_V7_ILP32_OFFBIG": ValueOf(syscall.SC_V7_ILP32_OFFBIG),
+ "SC_V7_LP64_OFF64": ValueOf(syscall.SC_V7_LP64_OFF64),
+ "SC_V7_LPBIG_OFFBIG": ValueOf(syscall.SC_V7_LPBIG_OFFBIG),
+ "SC_VERSION": ValueOf(syscall.SC_VERSION),
+ "SC_WORD_BIT": ValueOf(syscall.SC_WORD_BIT),
+ "SC_XBS5_ILP32_OFF32": ValueOf(syscall.SC_XBS5_ILP32_OFF32),
+ "SC_XBS5_ILP32_OFFBIG": ValueOf(syscall.SC_XBS5_ILP32_OFFBIG),
+ "SC_XBS5_LP64_OFF64": ValueOf(syscall.SC_XBS5_LP64_OFF64),
+ "SC_XBS5_LPBIG_OFFBIG": ValueOf(syscall.SC_XBS5_LPBIG_OFFBIG),
+ "SC_XOPEN_CRYPT": ValueOf(syscall.SC_XOPEN_CRYPT),
+ "SC_XOPEN_ENH_I18N": ValueOf(syscall.SC_XOPEN_ENH_I18N),
+ "SC_XOPEN_LEGACY": ValueOf(syscall.SC_XOPEN_LEGACY),
+ "SC_XOPEN_REALTIME": ValueOf(syscall.SC_XOPEN_REALTIME),
+ "SC_XOPEN_REALTIME_THREADS": ValueOf(syscall.SC_XOPEN_REALTIME_THREADS),
+ "SC_XOPEN_SHM": ValueOf(syscall.SC_XOPEN_SHM),
+ "SC_XOPEN_STREAMS": ValueOf(syscall.SC_XOPEN_STREAMS),
+ "SC_XOPEN_UNIX": ValueOf(syscall.SC_XOPEN_UNIX),
+ "SC_XOPEN_VERSION": ValueOf(syscall.SC_XOPEN_VERSION),
+ "SC_XOPEN_XCU_VERSION": ValueOf(syscall.SC_XOPEN_XCU_VERSION),
+ "SC_XOPEN_XPG2": ValueOf(syscall.SC_XOPEN_XPG2),
+ "SC_XOPEN_XPG3": ValueOf(syscall.SC_XOPEN_XPG3),
+ "SC_XOPEN_XPG4": ValueOf(syscall.SC_XOPEN_XPG4),
+ "SHUT_RD": ValueOf(syscall.SHUT_RD),
+ "SHUT_RDWR": ValueOf(syscall.SHUT_RDWR),
+ "SHUT_WR": ValueOf(syscall.SHUT_WR),
+ "SIGABRT": ValueOf(syscall.SIGABRT),
+ "SIGALRM": ValueOf(syscall.SIGALRM),
+ "SIGBUS": ValueOf(syscall.SIGBUS),
+ "SIGCHLD": ValueOf(syscall.SIGCHLD),
+ "SIGCLD": ValueOf(syscall.SIGCLD),
+ "SIGCONT": ValueOf(syscall.SIGCONT),
+ "SIGFPE": ValueOf(syscall.SIGFPE),
+ "SIGHUP": ValueOf(syscall.SIGHUP),
+ "SIGILL": ValueOf(syscall.SIGILL),
+ "SIGINT": ValueOf(syscall.SIGINT),
+ "SIGIO": ValueOf(syscall.SIGIO),
+ "SIGIOT": ValueOf(syscall.SIGIOT),
+ "SIGKILL": ValueOf(syscall.SIGKILL),
+ "SIGPIPE": ValueOf(syscall.SIGPIPE),
+ "SIGPOLL": ValueOf(syscall.SIGPOLL),
+ "SIGPROF": ValueOf(syscall.SIGPROF),
+ "SIGPWR": ValueOf(syscall.SIGPWR),
+ "SIGQUIT": ValueOf(syscall.SIGQUIT),
+ "SIGSEGV": ValueOf(syscall.SIGSEGV),
+ "SIGSTKFLT": ValueOf(syscall.SIGSTKFLT),
+ "SIGSTKSZ": ValueOf(syscall.SIGSTKSZ),
+ "SIGSTOP": ValueOf(syscall.SIGSTOP),
+ "SIGSYS": ValueOf(syscall.SIGSYS),
+ "SIGTERM": ValueOf(syscall.SIGTERM),
+ "SIGTRAP": ValueOf(syscall.SIGTRAP),
+ "SIGTSTP": ValueOf(syscall.SIGTSTP),
+ "SIGTTIN": ValueOf(syscall.SIGTTIN),
+ "SIGTTOU": ValueOf(syscall.SIGTTOU),
+ "SIGURG": ValueOf(syscall.SIGURG),
+ "SIGUSR1": ValueOf(syscall.SIGUSR1),
+ "SIGUSR2": ValueOf(syscall.SIGUSR2),
+ "SIGVTALRM": ValueOf(syscall.SIGVTALRM),
+ "SIGWINCH": ValueOf(syscall.SIGWINCH),
+ "SIGXCPU": ValueOf(syscall.SIGXCPU),
+ "SIGXFSZ": ValueOf(syscall.SIGXFSZ),
+ "SIOCADDDLCI": ValueOf(syscall.SIOCADDDLCI),
+ "SIOCADDMULTI": ValueOf(syscall.SIOCADDMULTI),
+ "SIOCADDRT": ValueOf(syscall.SIOCADDRT),
+ "SIOCATMARK": ValueOf(syscall.SIOCATMARK),
+ "SIOCDARP": ValueOf(syscall.SIOCDARP),
+ "SIOCDELDLCI": ValueOf(syscall.SIOCDELDLCI),
+ "SIOCDELMULTI": ValueOf(syscall.SIOCDELMULTI),
+ "SIOCDELRT": ValueOf(syscall.SIOCDELRT),
+ "SIOCDEVPRIVATE": ValueOf(syscall.SIOCDEVPRIVATE),
+ "SIOCDIFADDR": ValueOf(syscall.SIOCDIFADDR),
+ "SIOCDRARP": ValueOf(syscall.SIOCDRARP),
+ "SIOCGARP": ValueOf(syscall.SIOCGARP),
+ "SIOCGIFADDR": ValueOf(syscall.SIOCGIFADDR),
+ "SIOCGIFBR": ValueOf(syscall.SIOCGIFBR),
+ "SIOCGIFBRDADDR": ValueOf(syscall.SIOCGIFBRDADDR),
+ "SIOCGIFCONF": ValueOf(syscall.SIOCGIFCONF),
+ "SIOCGIFCOUNT": ValueOf(syscall.SIOCGIFCOUNT),
+ "SIOCGIFDSTADDR": ValueOf(syscall.SIOCGIFDSTADDR),
+ "SIOCGIFENCAP": ValueOf(syscall.SIOCGIFENCAP),
+ "SIOCGIFFLAGS": ValueOf(syscall.SIOCGIFFLAGS),
+ "SIOCGIFHWADDR": ValueOf(syscall.SIOCGIFHWADDR),
+ "SIOCGIFINDEX": ValueOf(syscall.SIOCGIFINDEX),
+ "SIOCGIFMAP": ValueOf(syscall.SIOCGIFMAP),
+ "SIOCGIFMEM": ValueOf(syscall.SIOCGIFMEM),
+ "SIOCGIFMETRIC": ValueOf(syscall.SIOCGIFMETRIC),
+ "SIOCGIFMTU": ValueOf(syscall.SIOCGIFMTU),
+ "SIOCGIFNAME": ValueOf(syscall.SIOCGIFNAME),
+ "SIOCGIFNETMASK": ValueOf(syscall.SIOCGIFNETMASK),
+ "SIOCGIFPFLAGS": ValueOf(syscall.SIOCGIFPFLAGS),
+ "SIOCGIFSLAVE": ValueOf(syscall.SIOCGIFSLAVE),
+ "SIOCGIFTXQLEN": ValueOf(syscall.SIOCGIFTXQLEN),
+ "SIOCGPGRP": ValueOf(syscall.SIOCGPGRP),
+ "SIOCGRARP": ValueOf(syscall.SIOCGRARP),
+ "SIOCGSTAMP": ValueOf(syscall.SIOCGSTAMP),
+ "SIOCGSTAMPNS": ValueOf(syscall.SIOCGSTAMPNS),
+ "SIOCPROTOPRIVATE": ValueOf(syscall.SIOCPROTOPRIVATE),
+ "SIOCRTMSG": ValueOf(syscall.SIOCRTMSG),
+ "SIOCSARP": ValueOf(syscall.SIOCSARP),
+ "SIOCSIFADDR": ValueOf(syscall.SIOCSIFADDR),
+ "SIOCSIFBR": ValueOf(syscall.SIOCSIFBR),
+ "SIOCSIFBRDADDR": ValueOf(syscall.SIOCSIFBRDADDR),
+ "SIOCSIFDSTADDR": ValueOf(syscall.SIOCSIFDSTADDR),
+ "SIOCSIFENCAP": ValueOf(syscall.SIOCSIFENCAP),
+ "SIOCSIFFLAGS": ValueOf(syscall.SIOCSIFFLAGS),
+ "SIOCSIFHWADDR": ValueOf(syscall.SIOCSIFHWADDR),
+ "SIOCSIFHWBROADCAST": ValueOf(syscall.SIOCSIFHWBROADCAST),
+ "SIOCSIFLINK": ValueOf(syscall.SIOCSIFLINK),
+ "SIOCSIFMAP": ValueOf(syscall.SIOCSIFMAP),
+ "SIOCSIFMEM": ValueOf(syscall.SIOCSIFMEM),
+ "SIOCSIFMETRIC": ValueOf(syscall.SIOCSIFMETRIC),
+ "SIOCSIFMTU": ValueOf(syscall.SIOCSIFMTU),
+ "SIOCSIFNAME": ValueOf(syscall.SIOCSIFNAME),
+ "SIOCSIFNETMASK": ValueOf(syscall.SIOCSIFNETMASK),
+ "SIOCSIFPFLAGS": ValueOf(syscall.SIOCSIFPFLAGS),
+ "SIOCSIFSLAVE": ValueOf(syscall.SIOCSIFSLAVE),
+ "SIOCSIFTXQLEN": ValueOf(syscall.SIOCSIFTXQLEN),
+ "SIOCSPGRP": ValueOf(syscall.SIOCSPGRP),
+ "SIOCSRARP": ValueOf(syscall.SIOCSRARP),
+ "SOCK_CLOEXEC": ValueOf(syscall.SOCK_CLOEXEC),
+ "SOCK_DCCP": ValueOf(syscall.SOCK_DCCP),
+ "SOCK_DGRAM": ValueOf(syscall.SOCK_DGRAM),
+ "SOCK_NONBLOCK": ValueOf(syscall.SOCK_NONBLOCK),
+ "SOCK_PACKET": ValueOf(syscall.SOCK_PACKET),
+ "SOCK_RAW": ValueOf(syscall.SOCK_RAW),
+ "SOCK_RDM": ValueOf(syscall.SOCK_RDM),
+ "SOCK_SEQPACKET": ValueOf(syscall.SOCK_SEQPACKET),
+ "SOCK_STREAM": ValueOf(syscall.SOCK_STREAM),
+ "SOL_AAL": ValueOf(syscall.SOL_AAL),
+ "SOL_ALG": ValueOf(syscall.SOL_ALG),
+ "SOL_ATM": ValueOf(syscall.SOL_ATM),
+ "SOL_BLUETOOTH": ValueOf(syscall.SOL_BLUETOOTH),
+ "SOL_CAIF": ValueOf(syscall.SOL_CAIF),
+ "SOL_DCCP": ValueOf(syscall.SOL_DCCP),
+ "SOL_DECNET": ValueOf(syscall.SOL_DECNET),
+ "SOL_ICMPV6": ValueOf(syscall.SOL_ICMPV6),
+ "SOL_IP": ValueOf(syscall.SOL_IP),
+ "SOL_IPV6": ValueOf(syscall.SOL_IPV6),
+ "SOL_IRDA": ValueOf(syscall.SOL_IRDA),
+ "SOL_IUCV": ValueOf(syscall.SOL_IUCV),
+ "SOL_KCM": ValueOf(syscall.SOL_KCM),
+ "SOL_LLC": ValueOf(syscall.SOL_LLC),
+ "SOL_NETBEUI": ValueOf(syscall.SOL_NETBEUI),
+ "SOL_NETLINK": ValueOf(syscall.SOL_NETLINK),
+ "SOL_NFC": ValueOf(syscall.SOL_NFC),
+ "SOL_PACKET": ValueOf(syscall.SOL_PACKET),
+ "SOL_PNPIPE": ValueOf(syscall.SOL_PNPIPE),
+ "SOL_PPPOL2TP": ValueOf(syscall.SOL_PPPOL2TP),
+ "SOL_RAW": ValueOf(syscall.SOL_RAW),
+ "SOL_RDS": ValueOf(syscall.SOL_RDS),
+ "SOL_RXRPC": ValueOf(syscall.SOL_RXRPC),
+ "SOL_SOCKET": ValueOf(syscall.SOL_SOCKET),
+ "SOL_TCP": ValueOf(syscall.SOL_TCP),
+ "SOL_TIPC": ValueOf(syscall.SOL_TIPC),
+ "SOL_TLS": ValueOf(syscall.SOL_TLS),
+ "SOL_X25": ValueOf(syscall.SOL_X25),
+ "SOMAXCONN": ValueOf(syscall.SOMAXCONN),
+ "SO_ACCEPTCONN": ValueOf(syscall.SO_ACCEPTCONN),
+ "SO_ATTACH_BPF": ValueOf(syscall.SO_ATTACH_BPF),
+ "SO_ATTACH_FILTER": ValueOf(syscall.SO_ATTACH_FILTER),
+ "SO_ATTACH_REUSEPORT_CBPF": ValueOf(syscall.SO_ATTACH_REUSEPORT_CBPF),
+ "SO_ATTACH_REUSEPORT_EBPF": ValueOf(syscall.SO_ATTACH_REUSEPORT_EBPF),
+ "SO_BINDTODEVICE": ValueOf(syscall.SO_BINDTODEVICE),
+ "SO_BPF_EXTENSIONS": ValueOf(syscall.SO_BPF_EXTENSIONS),
+ "SO_BROADCAST": ValueOf(syscall.SO_BROADCAST),
+ "SO_BSDCOMPAT": ValueOf(syscall.SO_BSDCOMPAT),
+ "SO_BUSY_POLL": ValueOf(syscall.SO_BUSY_POLL),
+ "SO_CNX_ADVICE": ValueOf(syscall.SO_CNX_ADVICE),
+ "SO_COOKIE": ValueOf(syscall.SO_COOKIE),
+ "SO_DEBUG": ValueOf(syscall.SO_DEBUG),
+ "SO_DETACH_BPF": ValueOf(syscall.SO_DETACH_BPF),
+ "SO_DETACH_FILTER": ValueOf(syscall.SO_DETACH_FILTER),
+ "SO_DOMAIN": ValueOf(syscall.SO_DOMAIN),
+ "SO_DONTROUTE": ValueOf(syscall.SO_DONTROUTE),
+ "SO_ERROR": ValueOf(syscall.SO_ERROR),
+ "SO_GET_FILTER": ValueOf(syscall.SO_GET_FILTER),
+ "SO_INCOMING_CPU": ValueOf(syscall.SO_INCOMING_CPU),
+ "SO_INCOMING_NAPI_ID": ValueOf(syscall.SO_INCOMING_NAPI_ID),
+ "SO_KEEPALIVE": ValueOf(syscall.SO_KEEPALIVE),
+ "SO_LINGER": ValueOf(syscall.SO_LINGER),
+ "SO_LOCK_FILTER": ValueOf(syscall.SO_LOCK_FILTER),
+ "SO_MARK": ValueOf(syscall.SO_MARK),
+ "SO_MAX_PACING_RATE": ValueOf(syscall.SO_MAX_PACING_RATE),
+ "SO_MEMINFO": ValueOf(syscall.SO_MEMINFO),
+ "SO_NOFCS": ValueOf(syscall.SO_NOFCS),
+ "SO_NO_CHECK": ValueOf(syscall.SO_NO_CHECK),
+ "SO_OOBINLINE": ValueOf(syscall.SO_OOBINLINE),
+ "SO_PASSCRED": ValueOf(syscall.SO_PASSCRED),
+ "SO_PASSSEC": ValueOf(syscall.SO_PASSSEC),
+ "SO_PEEK_OFF": ValueOf(syscall.SO_PEEK_OFF),
+ "SO_PEERCRED": ValueOf(syscall.SO_PEERCRED),
+ "SO_PEERGROUPS": ValueOf(syscall.SO_PEERGROUPS),
+ "SO_PEERNAME": ValueOf(syscall.SO_PEERNAME),
+ "SO_PEERSEC": ValueOf(syscall.SO_PEERSEC),
+ "SO_PRIORITY": ValueOf(syscall.SO_PRIORITY),
+ "SO_PROTOCOL": ValueOf(syscall.SO_PROTOCOL),
+ "SO_RCVBUF": ValueOf(syscall.SO_RCVBUF),
+ "SO_RCVBUFFORCE": ValueOf(syscall.SO_RCVBUFFORCE),
+ "SO_RCVLOWAT": ValueOf(syscall.SO_RCVLOWAT),
+ "SO_RCVTIMEO": ValueOf(syscall.SO_RCVTIMEO),
+ "SO_REUSEADDR": ValueOf(syscall.SO_REUSEADDR),
+ "SO_REUSEPORT": ValueOf(syscall.SO_REUSEPORT),
+ "SO_RXQ_OVFL": ValueOf(syscall.SO_RXQ_OVFL),
+ "SO_SECURITY_AUTHENTICATION": ValueOf(syscall.SO_SECURITY_AUTHENTICATION),
+ "SO_SECURITY_ENCRYPTION_NETWORK": ValueOf(syscall.SO_SECURITY_ENCRYPTION_NETWORK),
+ "SO_SECURITY_ENCRYPTION_TRANSPORT": ValueOf(syscall.SO_SECURITY_ENCRYPTION_TRANSPORT),
+ "SO_SELECT_ERR_QUEUE": ValueOf(syscall.SO_SELECT_ERR_QUEUE),
+ "SO_SNDBUF": ValueOf(syscall.SO_SNDBUF),
+ "SO_SNDBUFFORCE": ValueOf(syscall.SO_SNDBUFFORCE),
+ "SO_SNDLOWAT": ValueOf(syscall.SO_SNDLOWAT),
+ "SO_SNDTIMEO": ValueOf(syscall.SO_SNDTIMEO),
+ "SO_TIMESTAMP": ValueOf(syscall.SO_TIMESTAMP),
+ "SO_TIMESTAMPING": ValueOf(syscall.SO_TIMESTAMPING),
+ "SO_TIMESTAMPNS": ValueOf(syscall.SO_TIMESTAMPNS),
+ "SO_TYPE": ValueOf(syscall.SO_TYPE),
+ "SO_WIFI_STATUS": ValueOf(syscall.SO_WIFI_STATUS),
+ "SO_ZEROCOPY": ValueOf(syscall.SO_ZEROCOPY),
+ "SYS_ACCEPT": ValueOf(syscall.SYS_ACCEPT),
+ "SYS_ACCEPT4": ValueOf(syscall.SYS_ACCEPT4),
+ "SYS_ACCESS": ValueOf(syscall.SYS_ACCESS),
+ "SYS_ACCT": ValueOf(syscall.SYS_ACCT),
+ "SYS_ADD_KEY": ValueOf(syscall.SYS_ADD_KEY),
+ "SYS_ADJTIMEX": ValueOf(syscall.SYS_ADJTIMEX),
+ "SYS_AFS_SYSCALL": ValueOf(syscall.SYS_AFS_SYSCALL),
+ "SYS_ALARM": ValueOf(syscall.SYS_ALARM),
+ "SYS_ARCH_PRCTL": ValueOf(syscall.SYS_ARCH_PRCTL),
+ "SYS_BIND": ValueOf(syscall.SYS_BIND),
+ "SYS_BPF": ValueOf(syscall.SYS_BPF),
+ "SYS_BRK": ValueOf(syscall.SYS_BRK),
+ "SYS_CAPGET": ValueOf(syscall.SYS_CAPGET),
+ "SYS_CAPSET": ValueOf(syscall.SYS_CAPSET),
+ "SYS_CHDIR": ValueOf(syscall.SYS_CHDIR),
+ "SYS_CHMOD": ValueOf(syscall.SYS_CHMOD),
+ "SYS_CHOWN": ValueOf(syscall.SYS_CHOWN),
+ "SYS_CHROOT": ValueOf(syscall.SYS_CHROOT),
+ "SYS_CLOCK_ADJTIME": ValueOf(syscall.SYS_CLOCK_ADJTIME),
+ "SYS_CLOCK_GETRES": ValueOf(syscall.SYS_CLOCK_GETRES),
+ "SYS_CLOCK_GETTIME": ValueOf(syscall.SYS_CLOCK_GETTIME),
+ "SYS_CLOCK_NANOSLEEP": ValueOf(syscall.SYS_CLOCK_NANOSLEEP),
+ "SYS_CLOCK_SETTIME": ValueOf(syscall.SYS_CLOCK_SETTIME),
+ "SYS_CLONE": ValueOf(syscall.SYS_CLONE),
+ "SYS_CLOSE": ValueOf(syscall.SYS_CLOSE),
+ "SYS_CONNECT": ValueOf(syscall.SYS_CONNECT),
+ "SYS_COPY_FILE_RANGE": ValueOf(syscall.SYS_COPY_FILE_RANGE),
+ "SYS_CREAT": ValueOf(syscall.SYS_CREAT),
+ "SYS_CREATE_MODULE": ValueOf(syscall.SYS_CREATE_MODULE),
+ "SYS_DELETE_MODULE": ValueOf(syscall.SYS_DELETE_MODULE),
+ "SYS_DUP": ValueOf(syscall.SYS_DUP),
+ "SYS_DUP2": ValueOf(syscall.SYS_DUP2),
+ "SYS_DUP3": ValueOf(syscall.SYS_DUP3),
+ "SYS_EPOLL_CREATE": ValueOf(syscall.SYS_EPOLL_CREATE),
+ "SYS_EPOLL_CREATE1": ValueOf(syscall.SYS_EPOLL_CREATE1),
+ "SYS_EPOLL_CTL": ValueOf(syscall.SYS_EPOLL_CTL),
+ "SYS_EPOLL_CTL_OLD": ValueOf(syscall.SYS_EPOLL_CTL_OLD),
+ "SYS_EPOLL_PWAIT": ValueOf(syscall.SYS_EPOLL_PWAIT),
+ "SYS_EPOLL_WAIT": ValueOf(syscall.SYS_EPOLL_WAIT),
+ "SYS_EPOLL_WAIT_OLD": ValueOf(syscall.SYS_EPOLL_WAIT_OLD),
+ "SYS_EVENTFD": ValueOf(syscall.SYS_EVENTFD),
+ "SYS_EVENTFD2": ValueOf(syscall.SYS_EVENTFD2),
+ "SYS_EXECVE": ValueOf(syscall.SYS_EXECVE),
+ "SYS_EXECVEAT": ValueOf(syscall.SYS_EXECVEAT),
+ "SYS_EXIT": ValueOf(syscall.SYS_EXIT),
+ "SYS_EXIT_GROUP": ValueOf(syscall.SYS_EXIT_GROUP),
+ "SYS_FACCESSAT": ValueOf(syscall.SYS_FACCESSAT),
+ "SYS_FADVISE64": ValueOf(syscall.SYS_FADVISE64),
+ "SYS_FALLOCATE": ValueOf(syscall.SYS_FALLOCATE),
+ "SYS_FANOTIFY_INIT": ValueOf(syscall.SYS_FANOTIFY_INIT),
+ "SYS_FANOTIFY_MARK": ValueOf(syscall.SYS_FANOTIFY_MARK),
+ "SYS_FCHDIR": ValueOf(syscall.SYS_FCHDIR),
+ "SYS_FCHMOD": ValueOf(syscall.SYS_FCHMOD),
+ "SYS_FCHMODAT": ValueOf(syscall.SYS_FCHMODAT),
+ "SYS_FCHOWN": ValueOf(syscall.SYS_FCHOWN),
+ "SYS_FCHOWNAT": ValueOf(syscall.SYS_FCHOWNAT),
+ "SYS_FCNTL": ValueOf(syscall.SYS_FCNTL),
+ "SYS_FDATASYNC": ValueOf(syscall.SYS_FDATASYNC),
+ "SYS_FGETXATTR": ValueOf(syscall.SYS_FGETXATTR),
+ "SYS_FINIT_MODULE": ValueOf(syscall.SYS_FINIT_MODULE),
+ "SYS_FLISTXATTR": ValueOf(syscall.SYS_FLISTXATTR),
+ "SYS_FLOCK": ValueOf(syscall.SYS_FLOCK),
+ "SYS_FORK": ValueOf(syscall.SYS_FORK),
+ "SYS_FREMOVEXATTR": ValueOf(syscall.SYS_FREMOVEXATTR),
+ "SYS_FSETXATTR": ValueOf(syscall.SYS_FSETXATTR),
+ "SYS_FSTAT": ValueOf(syscall.SYS_FSTAT),
+ "SYS_FSTATFS": ValueOf(syscall.SYS_FSTATFS),
+ "SYS_FSYNC": ValueOf(syscall.SYS_FSYNC),
+ "SYS_FTRUNCATE": ValueOf(syscall.SYS_FTRUNCATE),
+ "SYS_FUTEX": ValueOf(syscall.SYS_FUTEX),
+ "SYS_FUTIMESAT": ValueOf(syscall.SYS_FUTIMESAT),
+ "SYS_GETCPU": ValueOf(syscall.SYS_GETCPU),
+ "SYS_GETCWD": ValueOf(syscall.SYS_GETCWD),
+ "SYS_GETDENTS": ValueOf(syscall.SYS_GETDENTS),
+ "SYS_GETDENTS64": ValueOf(syscall.SYS_GETDENTS64),
+ "SYS_GETEGID": ValueOf(syscall.SYS_GETEGID),
+ "SYS_GETEUID": ValueOf(syscall.SYS_GETEUID),
+ "SYS_GETGID": ValueOf(syscall.SYS_GETGID),
+ "SYS_GETGROUPS": ValueOf(syscall.SYS_GETGROUPS),
+ "SYS_GETITIMER": ValueOf(syscall.SYS_GETITIMER),
+ "SYS_GETPEERNAME": ValueOf(syscall.SYS_GETPEERNAME),
+ "SYS_GETPGID": ValueOf(syscall.SYS_GETPGID),
+ "SYS_GETPGRP": ValueOf(syscall.SYS_GETPGRP),
+ "SYS_GETPID": ValueOf(syscall.SYS_GETPID),
+ "SYS_GETPMSG": ValueOf(syscall.SYS_GETPMSG),
+ "SYS_GETPPID": ValueOf(syscall.SYS_GETPPID),
+ "SYS_GETPRIORITY": ValueOf(syscall.SYS_GETPRIORITY),
+ "SYS_GETRANDOM": ValueOf(syscall.SYS_GETRANDOM),
+ "SYS_GETRESGID": ValueOf(syscall.SYS_GETRESGID),
+ "SYS_GETRESUID": ValueOf(syscall.SYS_GETRESUID),
+ "SYS_GETRLIMIT": ValueOf(syscall.SYS_GETRLIMIT),
+ "SYS_GETRUSAGE": ValueOf(syscall.SYS_GETRUSAGE),
+ "SYS_GETSID": ValueOf(syscall.SYS_GETSID),
+ "SYS_GETSOCKNAME": ValueOf(syscall.SYS_GETSOCKNAME),
+ "SYS_GETSOCKOPT": ValueOf(syscall.SYS_GETSOCKOPT),
+ "SYS_GETTID": ValueOf(syscall.SYS_GETTID),
+ "SYS_GETTIMEOFDAY": ValueOf(syscall.SYS_GETTIMEOFDAY),
+ "SYS_GETUID": ValueOf(syscall.SYS_GETUID),
+ "SYS_GETXATTR": ValueOf(syscall.SYS_GETXATTR),
+ "SYS_GET_KERNEL_SYMS": ValueOf(syscall.SYS_GET_KERNEL_SYMS),
+ "SYS_GET_MEMPOLICY": ValueOf(syscall.SYS_GET_MEMPOLICY),
+ "SYS_GET_ROBUST_LIST": ValueOf(syscall.SYS_GET_ROBUST_LIST),
+ "SYS_GET_THREAD_AREA": ValueOf(syscall.SYS_GET_THREAD_AREA),
+ "SYS_INIT_MODULE": ValueOf(syscall.SYS_INIT_MODULE),
+ "SYS_INOTIFY_ADD_WATCH": ValueOf(syscall.SYS_INOTIFY_ADD_WATCH),
+ "SYS_INOTIFY_INIT": ValueOf(syscall.SYS_INOTIFY_INIT),
+ "SYS_INOTIFY_INIT1": ValueOf(syscall.SYS_INOTIFY_INIT1),
+ "SYS_INOTIFY_RM_WATCH": ValueOf(syscall.SYS_INOTIFY_RM_WATCH),
+ "SYS_IOCTL": ValueOf(syscall.SYS_IOCTL),
+ "SYS_IOPERM": ValueOf(syscall.SYS_IOPERM),
+ "SYS_IOPL": ValueOf(syscall.SYS_IOPL),
+ "SYS_IOPRIO_GET": ValueOf(syscall.SYS_IOPRIO_GET),
+ "SYS_IOPRIO_SET": ValueOf(syscall.SYS_IOPRIO_SET),
+ "SYS_IO_CANCEL": ValueOf(syscall.SYS_IO_CANCEL),
+ "SYS_IO_DESTROY": ValueOf(syscall.SYS_IO_DESTROY),
+ "SYS_IO_GETEVENTS": ValueOf(syscall.SYS_IO_GETEVENTS),
+ "SYS_IO_SETUP": ValueOf(syscall.SYS_IO_SETUP),
+ "SYS_IO_SUBMIT": ValueOf(syscall.SYS_IO_SUBMIT),
+ "SYS_KCMP": ValueOf(syscall.SYS_KCMP),
+ "SYS_KEXEC_FILE_LOAD": ValueOf(syscall.SYS_KEXEC_FILE_LOAD),
+ "SYS_KEXEC_LOAD": ValueOf(syscall.SYS_KEXEC_LOAD),
+ "SYS_KEYCTL": ValueOf(syscall.SYS_KEYCTL),
+ "SYS_KILL": ValueOf(syscall.SYS_KILL),
+ "SYS_LCHOWN": ValueOf(syscall.SYS_LCHOWN),
+ "SYS_LGETXATTR": ValueOf(syscall.SYS_LGETXATTR),
+ "SYS_LINK": ValueOf(syscall.SYS_LINK),
+ "SYS_LINKAT": ValueOf(syscall.SYS_LINKAT),
+ "SYS_LISTEN": ValueOf(syscall.SYS_LISTEN),
+ "SYS_LISTXATTR": ValueOf(syscall.SYS_LISTXATTR),
+ "SYS_LLISTXATTR": ValueOf(syscall.SYS_LLISTXATTR),
+ "SYS_LOOKUP_DCOOKIE": ValueOf(syscall.SYS_LOOKUP_DCOOKIE),
+ "SYS_LREMOVEXATTR": ValueOf(syscall.SYS_LREMOVEXATTR),
+ "SYS_LSEEK": ValueOf(syscall.SYS_LSEEK),
+ "SYS_LSETXATTR": ValueOf(syscall.SYS_LSETXATTR),
+ "SYS_LSTAT": ValueOf(syscall.SYS_LSTAT),
+ "SYS_MADVISE": ValueOf(syscall.SYS_MADVISE),
+ "SYS_MBIND": ValueOf(syscall.SYS_MBIND),
+ "SYS_MEMBARRIER": ValueOf(syscall.SYS_MEMBARRIER),
+ "SYS_MEMFD_CREATE": ValueOf(syscall.SYS_MEMFD_CREATE),
+ "SYS_MIGRATE_PAGES": ValueOf(syscall.SYS_MIGRATE_PAGES),
+ "SYS_MINCORE": ValueOf(syscall.SYS_MINCORE),
+ "SYS_MKDIR": ValueOf(syscall.SYS_MKDIR),
+ "SYS_MKDIRAT": ValueOf(syscall.SYS_MKDIRAT),
+ "SYS_MKNOD": ValueOf(syscall.SYS_MKNOD),
+ "SYS_MKNODAT": ValueOf(syscall.SYS_MKNODAT),
+ "SYS_MLOCK": ValueOf(syscall.SYS_MLOCK),
+ "SYS_MLOCK2": ValueOf(syscall.SYS_MLOCK2),
+ "SYS_MLOCKALL": ValueOf(syscall.SYS_MLOCKALL),
+ "SYS_MMAP": ValueOf(syscall.SYS_MMAP),
+ "SYS_MODIFY_LDT": ValueOf(syscall.SYS_MODIFY_LDT),
+ "SYS_MOUNT": ValueOf(syscall.SYS_MOUNT),
+ "SYS_MOVE_PAGES": ValueOf(syscall.SYS_MOVE_PAGES),
+ "SYS_MPROTECT": ValueOf(syscall.SYS_MPROTECT),
+ "SYS_MQ_GETSETATTR": ValueOf(syscall.SYS_MQ_GETSETATTR),
+ "SYS_MQ_NOTIFY": ValueOf(syscall.SYS_MQ_NOTIFY),
+ "SYS_MQ_OPEN": ValueOf(syscall.SYS_MQ_OPEN),
+ "SYS_MQ_TIMEDRECEIVE": ValueOf(syscall.SYS_MQ_TIMEDRECEIVE),
+ "SYS_MQ_TIMEDSEND": ValueOf(syscall.SYS_MQ_TIMEDSEND),
+ "SYS_MQ_UNLINK": ValueOf(syscall.SYS_MQ_UNLINK),
+ "SYS_MREMAP": ValueOf(syscall.SYS_MREMAP),
+ "SYS_MSGCTL": ValueOf(syscall.SYS_MSGCTL),
+ "SYS_MSGGET": ValueOf(syscall.SYS_MSGGET),
+ "SYS_MSGRCV": ValueOf(syscall.SYS_MSGRCV),
+ "SYS_MSGSND": ValueOf(syscall.SYS_MSGSND),
+ "SYS_MSYNC": ValueOf(syscall.SYS_MSYNC),
+ "SYS_MUNLOCK": ValueOf(syscall.SYS_MUNLOCK),
+ "SYS_MUNLOCKALL": ValueOf(syscall.SYS_MUNLOCKALL),
+ "SYS_MUNMAP": ValueOf(syscall.SYS_MUNMAP),
+ "SYS_NAME_TO_HANDLE_AT": ValueOf(syscall.SYS_NAME_TO_HANDLE_AT),
+ "SYS_NANOSLEEP": ValueOf(syscall.SYS_NANOSLEEP),
+ "SYS_NEWFSTATAT": ValueOf(syscall.SYS_NEWFSTATAT),
+ "SYS_NFSSERVCTL": ValueOf(syscall.SYS_NFSSERVCTL),
+ "SYS_NMLN": ValueOf(syscall.SYS_NMLN),
+ "SYS_OPEN": ValueOf(syscall.SYS_OPEN),
+ "SYS_OPENAT": ValueOf(syscall.SYS_OPENAT),
+ "SYS_OPEN_BY_HANDLE_AT": ValueOf(syscall.SYS_OPEN_BY_HANDLE_AT),
+ "SYS_PAUSE": ValueOf(syscall.SYS_PAUSE),
+ "SYS_PERF_EVENT_OPEN": ValueOf(syscall.SYS_PERF_EVENT_OPEN),
+ "SYS_PERSONALITY": ValueOf(syscall.SYS_PERSONALITY),
+ "SYS_PIPE": ValueOf(syscall.SYS_PIPE),
+ "SYS_PIPE2": ValueOf(syscall.SYS_PIPE2),
+ "SYS_PIVOT_ROOT": ValueOf(syscall.SYS_PIVOT_ROOT),
+ "SYS_PKEY_ALLOC": ValueOf(syscall.SYS_PKEY_ALLOC),
+ "SYS_PKEY_FREE": ValueOf(syscall.SYS_PKEY_FREE),
+ "SYS_PKEY_MPROTECT": ValueOf(syscall.SYS_PKEY_MPROTECT),
+ "SYS_POLL": ValueOf(syscall.SYS_POLL),
+ "SYS_PPOLL": ValueOf(syscall.SYS_PPOLL),
+ "SYS_PRCTL": ValueOf(syscall.SYS_PRCTL),
+ "SYS_PREAD64": ValueOf(syscall.SYS_PREAD64),
+ "SYS_PREADV": ValueOf(syscall.SYS_PREADV),
+ "SYS_PREADV2": ValueOf(syscall.SYS_PREADV2),
+ "SYS_PRLIMIT64": ValueOf(syscall.SYS_PRLIMIT64),
+ "SYS_PROCESS_VM_READV": ValueOf(syscall.SYS_PROCESS_VM_READV),
+ "SYS_PROCESS_VM_WRITEV": ValueOf(syscall.SYS_PROCESS_VM_WRITEV),
+ "SYS_PSELECT6": ValueOf(syscall.SYS_PSELECT6),
+ "SYS_PTRACE": ValueOf(syscall.SYS_PTRACE),
+ "SYS_PUTPMSG": ValueOf(syscall.SYS_PUTPMSG),
+ "SYS_PWRITE64": ValueOf(syscall.SYS_PWRITE64),
+ "SYS_PWRITEV": ValueOf(syscall.SYS_PWRITEV),
+ "SYS_PWRITEV2": ValueOf(syscall.SYS_PWRITEV2),
+ "SYS_QUERY_MODULE": ValueOf(syscall.SYS_QUERY_MODULE),
+ "SYS_QUOTACTL": ValueOf(syscall.SYS_QUOTACTL),
+ "SYS_READ": ValueOf(syscall.SYS_READ),
+ "SYS_READAHEAD": ValueOf(syscall.SYS_READAHEAD),
+ "SYS_READLINK": ValueOf(syscall.SYS_READLINK),
+ "SYS_READLINKAT": ValueOf(syscall.SYS_READLINKAT),
+ "SYS_READV": ValueOf(syscall.SYS_READV),
+ "SYS_REBOOT": ValueOf(syscall.SYS_REBOOT),
+ "SYS_RECVFROM": ValueOf(syscall.SYS_RECVFROM),
+ "SYS_RECVMMSG": ValueOf(syscall.SYS_RECVMMSG),
+ "SYS_RECVMSG": ValueOf(syscall.SYS_RECVMSG),
+ "SYS_REMAP_FILE_PAGES": ValueOf(syscall.SYS_REMAP_FILE_PAGES),
+ "SYS_REMOVEXATTR": ValueOf(syscall.SYS_REMOVEXATTR),
+ "SYS_RENAME": ValueOf(syscall.SYS_RENAME),
+ "SYS_RENAMEAT": ValueOf(syscall.SYS_RENAMEAT),
+ "SYS_RENAMEAT2": ValueOf(syscall.SYS_RENAMEAT2),
+ "SYS_REQUEST_KEY": ValueOf(syscall.SYS_REQUEST_KEY),
+ "SYS_RESTART_SYSCALL": ValueOf(syscall.SYS_RESTART_SYSCALL),
+ "SYS_RMDIR": ValueOf(syscall.SYS_RMDIR),
+ "SYS_RT_SIGACTION": ValueOf(syscall.SYS_RT_SIGACTION),
+ "SYS_RT_SIGPENDING": ValueOf(syscall.SYS_RT_SIGPENDING),
+ "SYS_RT_SIGPROCMASK": ValueOf(syscall.SYS_RT_SIGPROCMASK),
+ "SYS_RT_SIGQUEUEINFO": ValueOf(syscall.SYS_RT_SIGQUEUEINFO),
+ "SYS_RT_SIGRETURN": ValueOf(syscall.SYS_RT_SIGRETURN),
+ "SYS_RT_SIGSUSPEND": ValueOf(syscall.SYS_RT_SIGSUSPEND),
+ "SYS_RT_SIGTIMEDWAIT": ValueOf(syscall.SYS_RT_SIGTIMEDWAIT),
+ "SYS_RT_TGSIGQUEUEINFO": ValueOf(syscall.SYS_RT_TGSIGQUEUEINFO),
+ "SYS_SCHED_GETAFFINITY": ValueOf(syscall.SYS_SCHED_GETAFFINITY),
+ "SYS_SCHED_GETATTR": ValueOf(syscall.SYS_SCHED_GETATTR),
+ "SYS_SCHED_GETPARAM": ValueOf(syscall.SYS_SCHED_GETPARAM),
+ "SYS_SCHED_GETSCHEDULER": ValueOf(syscall.SYS_SCHED_GETSCHEDULER),
+ "SYS_SCHED_GET_PRIORITY_MAX": ValueOf(syscall.SYS_SCHED_GET_PRIORITY_MAX),
+ "SYS_SCHED_GET_PRIORITY_MIN": ValueOf(syscall.SYS_SCHED_GET_PRIORITY_MIN),
+ "SYS_SCHED_RR_GET_INTERVAL": ValueOf(syscall.SYS_SCHED_RR_GET_INTERVAL),
+ "SYS_SCHED_SETAFFINITY": ValueOf(syscall.SYS_SCHED_SETAFFINITY),
+ "SYS_SCHED_SETATTR": ValueOf(syscall.SYS_SCHED_SETATTR),
+ "SYS_SCHED_SETPARAM": ValueOf(syscall.SYS_SCHED_SETPARAM),
+ "SYS_SCHED_SETSCHEDULER": ValueOf(syscall.SYS_SCHED_SETSCHEDULER),
+ "SYS_SCHED_YIELD": ValueOf(syscall.SYS_SCHED_YIELD),
+ "SYS_SECCOMP": ValueOf(syscall.SYS_SECCOMP),
+ "SYS_SECURITY": ValueOf(syscall.SYS_SECURITY),
+ "SYS_SELECT": ValueOf(syscall.SYS_SELECT),
+ "SYS_SEMCTL": ValueOf(syscall.SYS_SEMCTL),
+ "SYS_SEMGET": ValueOf(syscall.SYS_SEMGET),
+ "SYS_SEMOP": ValueOf(syscall.SYS_SEMOP),
+ "SYS_SEMTIMEDOP": ValueOf(syscall.SYS_SEMTIMEDOP),
+ "SYS_SENDFILE": ValueOf(syscall.SYS_SENDFILE),
+ "SYS_SENDMMSG": ValueOf(syscall.SYS_SENDMMSG),
+ "SYS_SENDMSG": ValueOf(syscall.SYS_SENDMSG),
+ "SYS_SENDTO": ValueOf(syscall.SYS_SENDTO),
+ "SYS_SETDOMAINNAME": ValueOf(syscall.SYS_SETDOMAINNAME),
+ "SYS_SETFSGID": ValueOf(syscall.SYS_SETFSGID),
+ "SYS_SETFSUID": ValueOf(syscall.SYS_SETFSUID),
+ "SYS_SETGID": ValueOf(syscall.SYS_SETGID),
+ "SYS_SETGROUPS": ValueOf(syscall.SYS_SETGROUPS),
+ "SYS_SETHOSTNAME": ValueOf(syscall.SYS_SETHOSTNAME),
+ "SYS_SETITIMER": ValueOf(syscall.SYS_SETITIMER),
+ "SYS_SETNS": ValueOf(syscall.SYS_SETNS),
+ "SYS_SETPGID": ValueOf(syscall.SYS_SETPGID),
+ "SYS_SETPRIORITY": ValueOf(syscall.SYS_SETPRIORITY),
+ "SYS_SETREGID": ValueOf(syscall.SYS_SETREGID),
+ "SYS_SETRESGID": ValueOf(syscall.SYS_SETRESGID),
+ "SYS_SETRESUID": ValueOf(syscall.SYS_SETRESUID),
+ "SYS_SETREUID": ValueOf(syscall.SYS_SETREUID),
+ "SYS_SETRLIMIT": ValueOf(syscall.SYS_SETRLIMIT),
+ "SYS_SETSID": ValueOf(syscall.SYS_SETSID),
+ "SYS_SETSOCKOPT": ValueOf(syscall.SYS_SETSOCKOPT),
+ "SYS_SETTIMEOFDAY": ValueOf(syscall.SYS_SETTIMEOFDAY),
+ "SYS_SETUID": ValueOf(syscall.SYS_SETUID),
+ "SYS_SETXATTR": ValueOf(syscall.SYS_SETXATTR),
+ "SYS_SET_MEMPOLICY": ValueOf(syscall.SYS_SET_MEMPOLICY),
+ "SYS_SET_ROBUST_LIST": ValueOf(syscall.SYS_SET_ROBUST_LIST),
+ "SYS_SET_THREAD_AREA": ValueOf(syscall.SYS_SET_THREAD_AREA),
+ "SYS_SET_TID_ADDRESS": ValueOf(syscall.SYS_SET_TID_ADDRESS),
+ "SYS_SHMAT": ValueOf(syscall.SYS_SHMAT),
+ "SYS_SHMCTL": ValueOf(syscall.SYS_SHMCTL),
+ "SYS_SHMDT": ValueOf(syscall.SYS_SHMDT),
+ "SYS_SHMGET": ValueOf(syscall.SYS_SHMGET),
+ "SYS_SHUTDOWN": ValueOf(syscall.SYS_SHUTDOWN),
+ "SYS_SIGALTSTACK": ValueOf(syscall.SYS_SIGALTSTACK),
+ "SYS_SIGNALFD": ValueOf(syscall.SYS_SIGNALFD),
+ "SYS_SIGNALFD4": ValueOf(syscall.SYS_SIGNALFD4),
+ "SYS_SOCKET": ValueOf(syscall.SYS_SOCKET),
+ "SYS_SOCKETPAIR": ValueOf(syscall.SYS_SOCKETPAIR),
+ "SYS_SPLICE": ValueOf(syscall.SYS_SPLICE),
+ "SYS_STAT": ValueOf(syscall.SYS_STAT),
+ "SYS_STATFS": ValueOf(syscall.SYS_STATFS),
+ "SYS_STATX": ValueOf(syscall.SYS_STATX),
+ "SYS_SWAPOFF": ValueOf(syscall.SYS_SWAPOFF),
+ "SYS_SWAPON": ValueOf(syscall.SYS_SWAPON),
+ "SYS_SYMLINK": ValueOf(syscall.SYS_SYMLINK),
+ "SYS_SYMLINKAT": ValueOf(syscall.SYS_SYMLINKAT),
+ "SYS_SYNC": ValueOf(syscall.SYS_SYNC),
+ "SYS_SYNCFS": ValueOf(syscall.SYS_SYNCFS),
+ "SYS_SYNC_FILE_RANGE": ValueOf(syscall.SYS_SYNC_FILE_RANGE),
+ "SYS_SYSFS": ValueOf(syscall.SYS_SYSFS),
+ "SYS_SYSINFO": ValueOf(syscall.SYS_SYSINFO),
+ "SYS_SYSLOG": ValueOf(syscall.SYS_SYSLOG),
+ "SYS_TEE": ValueOf(syscall.SYS_TEE),
+ "SYS_TGKILL": ValueOf(syscall.SYS_TGKILL),
+ "SYS_TIME": ValueOf(syscall.SYS_TIME),
+ "SYS_TIMERFD_CREATE": ValueOf(syscall.SYS_TIMERFD_CREATE),
+ "SYS_TIMERFD_GETTIME": ValueOf(syscall.SYS_TIMERFD_GETTIME),
+ "SYS_TIMERFD_SETTIME": ValueOf(syscall.SYS_TIMERFD_SETTIME),
+ "SYS_TIMER_CREATE": ValueOf(syscall.SYS_TIMER_CREATE),
+ "SYS_TIMER_DELETE": ValueOf(syscall.SYS_TIMER_DELETE),
+ "SYS_TIMER_GETOVERRUN": ValueOf(syscall.SYS_TIMER_GETOVERRUN),
+ "SYS_TIMER_GETTIME": ValueOf(syscall.SYS_TIMER_GETTIME),
+ "SYS_TIMER_SETTIME": ValueOf(syscall.SYS_TIMER_SETTIME),
+ "SYS_TIMES": ValueOf(syscall.SYS_TIMES),
+ "SYS_TKILL": ValueOf(syscall.SYS_TKILL),
+ "SYS_TRUNCATE": ValueOf(syscall.SYS_TRUNCATE),
+ "SYS_TUXCALL": ValueOf(syscall.SYS_TUXCALL),
+ "SYS_UMASK": ValueOf(syscall.SYS_UMASK),
+ "SYS_UMOUNT2": ValueOf(syscall.SYS_UMOUNT2),
+ "SYS_UNAME": ValueOf(syscall.SYS_UNAME),
+ "SYS_UNLINK": ValueOf(syscall.SYS_UNLINK),
+ "SYS_UNLINKAT": ValueOf(syscall.SYS_UNLINKAT),
+ "SYS_UNSHARE": ValueOf(syscall.SYS_UNSHARE),
+ "SYS_USELIB": ValueOf(syscall.SYS_USELIB),
+ "SYS_USERFAULTFD": ValueOf(syscall.SYS_USERFAULTFD),
+ "SYS_USTAT": ValueOf(syscall.SYS_USTAT),
+ "SYS_UTIME": ValueOf(syscall.SYS_UTIME),
+ "SYS_UTIMENSAT": ValueOf(syscall.SYS_UTIMENSAT),
+ "SYS_UTIMES": ValueOf(syscall.SYS_UTIMES),
+ "SYS_VFORK": ValueOf(syscall.SYS_VFORK),
+ "SYS_VHANGUP": ValueOf(syscall.SYS_VHANGUP),
+ "SYS_VMSPLICE": ValueOf(syscall.SYS_VMSPLICE),
+ "SYS_VSERVER": ValueOf(syscall.SYS_VSERVER),
+ "SYS_WAIT4": ValueOf(syscall.SYS_WAIT4),
+ "SYS_WAITID": ValueOf(syscall.SYS_WAITID),
+ "SYS_WRITE": ValueOf(syscall.SYS_WRITE),
+ "SYS_WRITEV": ValueOf(syscall.SYS_WRITEV),
+ "SYS__SYSCTL": ValueOf(syscall.SYS__SYSCTL),
+ "S_BLKSIZE": ValueOf(syscall.S_BLKSIZE),
+ "S_IEXEC": ValueOf(syscall.S_IEXEC),
+ "S_IFBLK": ValueOf(syscall.S_IFBLK),
+ "S_IFCHR": ValueOf(syscall.S_IFCHR),
+ "S_IFDIR": ValueOf(syscall.S_IFDIR),
+ "S_IFIFO": ValueOf(syscall.S_IFIFO),
+ "S_IFLNK": ValueOf(syscall.S_IFLNK),
+ "S_IFMT": ValueOf(syscall.S_IFMT),
+ "S_IFREG": ValueOf(syscall.S_IFREG),
+ "S_IFSOCK": ValueOf(syscall.S_IFSOCK),
+ "S_IREAD": ValueOf(syscall.S_IREAD),
+ "S_IRGRP": ValueOf(syscall.S_IRGRP),
+ "S_IROTH": ValueOf(syscall.S_IROTH),
+ "S_IRUSR": ValueOf(syscall.S_IRUSR),
+ "S_IRWXG": ValueOf(syscall.S_IRWXG),
+ "S_IRWXO": ValueOf(syscall.S_IRWXO),
+ "S_IRWXU": ValueOf(syscall.S_IRWXU),
+ "S_ISGID": ValueOf(syscall.S_ISGID),
+ "S_ISUID": ValueOf(syscall.S_ISUID),
+ "S_ISVTX": ValueOf(syscall.S_ISVTX),
+ "S_IWGRP": ValueOf(syscall.S_IWGRP),
+ "S_IWOTH": ValueOf(syscall.S_IWOTH),
+ "S_IWRITE": ValueOf(syscall.S_IWRITE),
+ "S_IWUSR": ValueOf(syscall.S_IWUSR),
+ "S_IXGRP": ValueOf(syscall.S_IXGRP),
+ "S_IXOTH": ValueOf(syscall.S_IXOTH),
+ "S_IXUSR": ValueOf(syscall.S_IXUSR),
+ "Seek": ValueOf(syscall.Seek),
+ "Select": ValueOf(syscall.Select),
+ "Sendfile": ValueOf(syscall.Sendfile),
+ "Sendmsg": ValueOf(syscall.Sendmsg),
+ "SendmsgN": ValueOf(syscall.SendmsgN),
+ "Sendto": ValueOf(syscall.Sendto),
+ "SetErrno": ValueOf(syscall.SetErrno),
+ "SetLsfPromisc": ValueOf(syscall.SetLsfPromisc),
+ "SetNonblock": ValueOf(syscall.SetNonblock),
+ "Setdomainname": ValueOf(syscall.Setdomainname),
+ "Setenv": ValueOf(syscall.Setenv),
+ "Setfsgid": ValueOf(syscall.Setfsgid),
+ "Setfsuid": ValueOf(syscall.Setfsuid),
+ "Setgid": ValueOf(syscall.Setgid),
+ "Setgroups": ValueOf(syscall.Setgroups),
+ "Sethostname": ValueOf(syscall.Sethostname),
+ "Setpgid": ValueOf(syscall.Setpgid),
+ "Setpriority": ValueOf(syscall.Setpriority),
+ "Setregid": ValueOf(syscall.Setregid),
+ "Setresgid": ValueOf(syscall.Setresgid),
+ "Setresuid": ValueOf(syscall.Setresuid),
+ "Setreuid": ValueOf(syscall.Setreuid),
+ "Setrlimit": ValueOf(syscall.Setrlimit),
+ "Setsid": ValueOf(syscall.Setsid),
+ "SetsockoptByte": ValueOf(syscall.SetsockoptByte),
+ "SetsockoptICMPv6Filter": ValueOf(syscall.SetsockoptICMPv6Filter),
+ "SetsockoptIPMreq": ValueOf(syscall.SetsockoptIPMreq),
+ "SetsockoptIPMreqn": ValueOf(syscall.SetsockoptIPMreqn),
+ "SetsockoptIPv6Mreq": ValueOf(syscall.SetsockoptIPv6Mreq),
+ "SetsockoptInet4Addr": ValueOf(syscall.SetsockoptInet4Addr),
+ "SetsockoptInt": ValueOf(syscall.SetsockoptInt),
+ "SetsockoptLinger": ValueOf(syscall.SetsockoptLinger),
+ "SetsockoptString": ValueOf(syscall.SetsockoptString),
+ "SetsockoptTimeval": ValueOf(syscall.SetsockoptTimeval),
+ "Settimeofday": ValueOf(syscall.Settimeofday),
+ "Setuid": ValueOf(syscall.Setuid),
+ "Setxattr": ValueOf(syscall.Setxattr),
+ "Shutdown": ValueOf(syscall.Shutdown),
+ "Signame": ValueOf(syscall.Signame),
+ "SizeofCmsghdr": ValueOf(syscall.SizeofCmsghdr),
+ "SizeofICMPv6Filter": ValueOf(syscall.SizeofICMPv6Filter),
+ "SizeofIPMreq": ValueOf(syscall.SizeofIPMreq),
+ "SizeofIPMreqn": ValueOf(syscall.SizeofIPMreqn),
+ "SizeofIPv6MTUInfo": ValueOf(syscall.SizeofIPv6MTUInfo),
+ "SizeofIPv6Mreq": ValueOf(syscall.SizeofIPv6Mreq),
+ "SizeofIfAddrmsg": ValueOf(syscall.SizeofIfAddrmsg),
+ "SizeofIfInfomsg": ValueOf(syscall.SizeofIfInfomsg),
+ "SizeofInet4Pktinfo": ValueOf(syscall.SizeofInet4Pktinfo),
+ "SizeofInet6Pktinfo": ValueOf(syscall.SizeofInet6Pktinfo),
+ "SizeofInotifyEvent": ValueOf(syscall.SizeofInotifyEvent),
+ "SizeofLinger": ValueOf(syscall.SizeofLinger),
+ "SizeofMsghdr": ValueOf(syscall.SizeofMsghdr),
+ "SizeofNlAttr": ValueOf(syscall.SizeofNlAttr),
+ "SizeofNlMsgerr": ValueOf(syscall.SizeofNlMsgerr),
+ "SizeofNlMsghdr": ValueOf(syscall.SizeofNlMsghdr),
+ "SizeofRtAttr": ValueOf(syscall.SizeofRtAttr),
+ "SizeofRtGenmsg": ValueOf(syscall.SizeofRtGenmsg),
+ "SizeofRtMsg": ValueOf(syscall.SizeofRtMsg),
+ "SizeofRtNexthop": ValueOf(syscall.SizeofRtNexthop),
+ "SizeofSockFilter": ValueOf(syscall.SizeofSockFilter),
+ "SizeofSockFprog": ValueOf(syscall.SizeofSockFprog),
+ "SizeofSockaddrAny": ValueOf(syscall.SizeofSockaddrAny),
+ "SizeofSockaddrInet4": ValueOf(syscall.SizeofSockaddrInet4),
+ "SizeofSockaddrInet6": ValueOf(syscall.SizeofSockaddrInet6),
+ "SizeofSockaddrLinklayer": ValueOf(syscall.SizeofSockaddrLinklayer),
+ "SizeofSockaddrNetlink": ValueOf(syscall.SizeofSockaddrNetlink),
+ "SizeofSockaddrUnix": ValueOf(syscall.SizeofSockaddrUnix),
+ "SizeofUcred": ValueOf(syscall.SizeofUcred),
+ "Sleep": ValueOf(syscall.Sleep),
+ "SlicePtrFromStrings": ValueOf(syscall.SlicePtrFromStrings),
+ "Socket": ValueOf(syscall.Socket),
+ "SocketDisableIPv6": ValueOf(&syscall.SocketDisableIPv6).Elem(),
+ "Socketpair": ValueOf(syscall.Socketpair),
+ "Splice": ValueOf(syscall.Splice),
+ "StartProcess": ValueOf(syscall.StartProcess),
+ "Stat": ValueOf(syscall.Stat),
+ "Statfs": ValueOf(syscall.Statfs),
+ "Stderr": ValueOf(&syscall.Stderr).Elem(),
+ "Stdin": ValueOf(&syscall.Stdin).Elem(),
+ "Stdout": ValueOf(&syscall.Stdout).Elem(),
+ "StringBytePtr": ValueOf(syscall.StringBytePtr),
+ "StringByteSlice": ValueOf(syscall.StringByteSlice),
+ "StringSlicePtr": ValueOf(syscall.StringSlicePtr),
+ "Symlink": ValueOf(syscall.Symlink),
+ "Sync": ValueOf(syscall.Sync),
+ "SyncFileRange": ValueOf(syscall.SyncFileRange),
+ "Syscall": ValueOf(syscall.Syscall),
+ "Syscall6": ValueOf(syscall.Syscall6),
+ "Sysconf": ValueOf(syscall.Sysconf),
+ "Sysinfo": ValueOf(syscall.Sysinfo),
+ "TABDLY": ValueOf(syscall.TABDLY),
+ "TCGETA": ValueOf(syscall.TCGETA),
+ "TCGETS": ValueOf(syscall.TCGETS),
+ "TCGETX": ValueOf(syscall.TCGETX),
+ "TCIFLUSH": ValueOf(syscall.TCIFLUSH),
+ "TCIOFF": ValueOf(syscall.TCIOFF),
+ "TCIOFLUSH": ValueOf(syscall.TCIOFLUSH),
+ "TCION": ValueOf(syscall.TCION),
+ "TCOFLUSH": ValueOf(syscall.TCOFLUSH),
+ "TCOOFF": ValueOf(syscall.TCOOFF),
+ "TCOON": ValueOf(syscall.TCOON),
+ "TCP_CA_CWR": ValueOf(syscall.TCP_CA_CWR),
+ "TCP_CA_Disorder": ValueOf(syscall.TCP_CA_Disorder),
+ "TCP_CA_Loss": ValueOf(syscall.TCP_CA_Loss),
+ "TCP_CA_Open": ValueOf(syscall.TCP_CA_Open),
+ "TCP_CA_Recovery": ValueOf(syscall.TCP_CA_Recovery),
+ "TCP_CC_INFO": ValueOf(syscall.TCP_CC_INFO),
+ "TCP_CLOSE": ValueOf(syscall.TCP_CLOSE),
+ "TCP_CLOSE_WAIT": ValueOf(syscall.TCP_CLOSE_WAIT),
+ "TCP_CLOSING": ValueOf(syscall.TCP_CLOSING),
+ "TCP_CONGESTION": ValueOf(syscall.TCP_CONGESTION),
+ "TCP_COOKIE_IN_ALWAYS": ValueOf(syscall.TCP_COOKIE_IN_ALWAYS),
+ "TCP_COOKIE_MAX": ValueOf(syscall.TCP_COOKIE_MAX),
+ "TCP_COOKIE_MIN": ValueOf(syscall.TCP_COOKIE_MIN),
+ "TCP_COOKIE_OUT_NEVER": ValueOf(syscall.TCP_COOKIE_OUT_NEVER),
+ "TCP_COOKIE_PAIR_SIZE": ValueOf(syscall.TCP_COOKIE_PAIR_SIZE),
+ "TCP_COOKIE_TRANSACTIONS": ValueOf(syscall.TCP_COOKIE_TRANSACTIONS),
+ "TCP_CORK": ValueOf(syscall.TCP_CORK),
+ "TCP_DEFER_ACCEPT": ValueOf(syscall.TCP_DEFER_ACCEPT),
+ "TCP_ESTABLISHED": ValueOf(syscall.TCP_ESTABLISHED),
+ "TCP_FASTOPEN": ValueOf(syscall.TCP_FASTOPEN),
+ "TCP_FASTOPEN_CONNECT": ValueOf(syscall.TCP_FASTOPEN_CONNECT),
+ "TCP_FIN_WAIT1": ValueOf(syscall.TCP_FIN_WAIT1),
+ "TCP_FIN_WAIT2": ValueOf(syscall.TCP_FIN_WAIT2),
+ "TCP_INFO": ValueOf(syscall.TCP_INFO),
+ "TCP_KEEPCNT": ValueOf(syscall.TCP_KEEPCNT),
+ "TCP_KEEPIDLE": ValueOf(syscall.TCP_KEEPIDLE),
+ "TCP_KEEPINTVL": ValueOf(syscall.TCP_KEEPINTVL),
+ "TCP_LAST_ACK": ValueOf(syscall.TCP_LAST_ACK),
+ "TCP_LINGER2": ValueOf(syscall.TCP_LINGER2),
+ "TCP_LISTEN": ValueOf(syscall.TCP_LISTEN),
+ "TCP_MAXSEG": ValueOf(syscall.TCP_MAXSEG),
+ "TCP_MAXWIN": ValueOf(syscall.TCP_MAXWIN),
+ "TCP_MAX_WINSHIFT": ValueOf(syscall.TCP_MAX_WINSHIFT),
+ "TCP_MD5SIG": ValueOf(syscall.TCP_MD5SIG),
+ "TCP_MD5SIG_EXT": ValueOf(syscall.TCP_MD5SIG_EXT),
+ "TCP_MD5SIG_FLAG_PREFIX": ValueOf(syscall.TCP_MD5SIG_FLAG_PREFIX),
+ "TCP_MD5SIG_MAXKEYLEN": ValueOf(syscall.TCP_MD5SIG_MAXKEYLEN),
+ "TCP_MSS": ValueOf(syscall.TCP_MSS),
+ "TCP_MSS_DEFAULT": ValueOf(syscall.TCP_MSS_DEFAULT),
+ "TCP_MSS_DESIRED": ValueOf(syscall.TCP_MSS_DESIRED),
+ "TCP_NODELAY": ValueOf(syscall.TCP_NODELAY),
+ "TCP_NOTSENT_LOWAT": ValueOf(syscall.TCP_NOTSENT_LOWAT),
+ "TCP_NO_QUEUE": ValueOf(syscall.TCP_NO_QUEUE),
+ "TCP_QUEUES_NR": ValueOf(syscall.TCP_QUEUES_NR),
+ "TCP_QUEUE_SEQ": ValueOf(syscall.TCP_QUEUE_SEQ),
+ "TCP_QUICKACK": ValueOf(syscall.TCP_QUICKACK),
+ "TCP_RECV_QUEUE": ValueOf(syscall.TCP_RECV_QUEUE),
+ "TCP_REPAIR": ValueOf(syscall.TCP_REPAIR),
+ "TCP_REPAIR_OPTIONS": ValueOf(syscall.TCP_REPAIR_OPTIONS),
+ "TCP_REPAIR_QUEUE": ValueOf(syscall.TCP_REPAIR_QUEUE),
+ "TCP_REPAIR_WINDOW": ValueOf(syscall.TCP_REPAIR_WINDOW),
+ "TCP_SAVED_SYN": ValueOf(syscall.TCP_SAVED_SYN),
+ "TCP_SAVE_SYN": ValueOf(syscall.TCP_SAVE_SYN),
+ "TCP_SEND_QUEUE": ValueOf(syscall.TCP_SEND_QUEUE),
+ "TCP_SYNCNT": ValueOf(syscall.TCP_SYNCNT),
+ "TCP_SYN_RECV": ValueOf(syscall.TCP_SYN_RECV),
+ "TCP_SYN_SENT": ValueOf(syscall.TCP_SYN_SENT),
+ "TCP_S_DATA_IN": ValueOf(syscall.TCP_S_DATA_IN),
+ "TCP_S_DATA_OUT": ValueOf(syscall.TCP_S_DATA_OUT),
+ "TCP_THIN_DUPACK": ValueOf(syscall.TCP_THIN_DUPACK),
+ "TCP_THIN_LINEAR_TIMEOUTS": ValueOf(syscall.TCP_THIN_LINEAR_TIMEOUTS),
+ "TCP_TIMESTAMP": ValueOf(syscall.TCP_TIMESTAMP),
+ "TCP_TIME_WAIT": ValueOf(syscall.TCP_TIME_WAIT),
+ "TCP_ULP": ValueOf(syscall.TCP_ULP),
+ "TCP_USER_TIMEOUT": ValueOf(syscall.TCP_USER_TIMEOUT),
+ "TCP_WINDOW_CLAMP": ValueOf(syscall.TCP_WINDOW_CLAMP),
+ "TCSADRAIN": ValueOf(syscall.TCSADRAIN),
+ "TCSAFLUSH": ValueOf(syscall.TCSAFLUSH),
+ "TCSANOW": ValueOf(syscall.TCSANOW),
+ "TCSETA": ValueOf(syscall.TCSETA),
+ "TCSETAF": ValueOf(syscall.TCSETAF),
+ "TCSETAW": ValueOf(syscall.TCSETAW),
+ "TCSETS": ValueOf(syscall.TCSETS),
+ "TCSETSF": ValueOf(syscall.TCSETSF),
+ "TCSETSW": ValueOf(syscall.TCSETSW),
+ "TCSETX": ValueOf(syscall.TCSETX),
+ "TCSETXF": ValueOf(syscall.TCSETXF),
+ "TCSETXW": ValueOf(syscall.TCSETXW),
+ "TIOCCBRK": ValueOf(syscall.TIOCCBRK),
+ "TIOCCONS": ValueOf(syscall.TIOCCONS),
+ "TIOCEXCL": ValueOf(syscall.TIOCEXCL),
+ "TIOCGDEV": ValueOf(uint32(syscall.TIOCGDEV)),
+ "TIOCGETD": ValueOf(syscall.TIOCGETD),
+ "TIOCGICOUNT": ValueOf(syscall.TIOCGICOUNT),
+ "TIOCGLCKTRMIOS": ValueOf(syscall.TIOCGLCKTRMIOS),
+ "TIOCGPGRP": ValueOf(syscall.TIOCGPGRP),
+ "TIOCGPTN": ValueOf(uint32(syscall.TIOCGPTN)),
+ "TIOCGRS485": ValueOf(syscall.TIOCGRS485),
+ "TIOCGSERIAL": ValueOf(syscall.TIOCGSERIAL),
+ "TIOCGSID": ValueOf(syscall.TIOCGSID),
+ "TIOCGSOFTCAR": ValueOf(syscall.TIOCGSOFTCAR),
+ "TIOCGWINSZ": ValueOf(syscall.TIOCGWINSZ),
+ "TIOCINQ": ValueOf(syscall.TIOCINQ),
+ "TIOCLINUX": ValueOf(syscall.TIOCLINUX),
+ "TIOCMBIC": ValueOf(syscall.TIOCMBIC),
+ "TIOCMBIS": ValueOf(syscall.TIOCMBIS),
+ "TIOCMGET": ValueOf(syscall.TIOCMGET),
+ "TIOCMIWAIT": ValueOf(syscall.TIOCMIWAIT),
+ "TIOCMSET": ValueOf(syscall.TIOCMSET),
+ "TIOCM_CAR": ValueOf(syscall.TIOCM_CAR),
+ "TIOCM_CD": ValueOf(syscall.TIOCM_CD),
+ "TIOCM_CTS": ValueOf(syscall.TIOCM_CTS),
+ "TIOCM_DSR": ValueOf(syscall.TIOCM_DSR),
+ "TIOCM_DTR": ValueOf(syscall.TIOCM_DTR),
+ "TIOCM_LE": ValueOf(syscall.TIOCM_LE),
+ "TIOCM_RI": ValueOf(syscall.TIOCM_RI),
+ "TIOCM_RNG": ValueOf(syscall.TIOCM_RNG),
+ "TIOCM_RTS": ValueOf(syscall.TIOCM_RTS),
+ "TIOCM_SR": ValueOf(syscall.TIOCM_SR),
+ "TIOCM_ST": ValueOf(syscall.TIOCM_ST),
+ "TIOCNOTTY": ValueOf(syscall.TIOCNOTTY),
+ "TIOCNXCL": ValueOf(syscall.TIOCNXCL),
+ "TIOCOUTQ": ValueOf(syscall.TIOCOUTQ),
+ "TIOCPKT": ValueOf(syscall.TIOCPKT),
+ "TIOCPKT_DATA": ValueOf(syscall.TIOCPKT_DATA),
+ "TIOCPKT_DOSTOP": ValueOf(syscall.TIOCPKT_DOSTOP),
+ "TIOCPKT_FLUSHREAD": ValueOf(syscall.TIOCPKT_FLUSHREAD),
+ "TIOCPKT_FLUSHWRITE": ValueOf(syscall.TIOCPKT_FLUSHWRITE),
+ "TIOCPKT_IOCTL": ValueOf(syscall.TIOCPKT_IOCTL),
+ "TIOCPKT_NOSTOP": ValueOf(syscall.TIOCPKT_NOSTOP),
+ "TIOCPKT_START": ValueOf(syscall.TIOCPKT_START),
+ "TIOCPKT_STOP": ValueOf(syscall.TIOCPKT_STOP),
+ "TIOCSBRK": ValueOf(syscall.TIOCSBRK),
+ "TIOCSCTTY": ValueOf(syscall.TIOCSCTTY),
+ "TIOCSERCONFIG": ValueOf(syscall.TIOCSERCONFIG),
+ "TIOCSERGETLSR": ValueOf(syscall.TIOCSERGETLSR),
+ "TIOCSERGETMULTI": ValueOf(syscall.TIOCSERGETMULTI),
+ "TIOCSERGSTRUCT": ValueOf(syscall.TIOCSERGSTRUCT),
+ "TIOCSERGWILD": ValueOf(syscall.TIOCSERGWILD),
+ "TIOCSERSETMULTI": ValueOf(syscall.TIOCSERSETMULTI),
+ "TIOCSERSWILD": ValueOf(syscall.TIOCSERSWILD),
+ "TIOCSER_TEMT": ValueOf(syscall.TIOCSER_TEMT),
+ "TIOCSETD": ValueOf(syscall.TIOCSETD),
+ "TIOCSIG": ValueOf(syscall.TIOCSIG),
+ "TIOCSLCKTRMIOS": ValueOf(syscall.TIOCSLCKTRMIOS),
+ "TIOCSPGRP": ValueOf(syscall.TIOCSPGRP),
+ "TIOCSPTLCK": ValueOf(syscall.TIOCSPTLCK),
+ "TIOCSRS485": ValueOf(syscall.TIOCSRS485),
+ "TIOCSSERIAL": ValueOf(syscall.TIOCSSERIAL),
+ "TIOCSSOFTCAR": ValueOf(syscall.TIOCSSOFTCAR),
+ "TIOCSTI": ValueOf(syscall.TIOCSTI),
+ "TIOCSWINSZ": ValueOf(syscall.TIOCSWINSZ),
+ "TIOCVHANGUP": ValueOf(syscall.TIOCVHANGUP),
+ "TOSTOP": ValueOf(syscall.TOSTOP),
+ "TUNATTACHFILTER": ValueOf(syscall.TUNATTACHFILTER),
+ "TUNDETACHFILTER": ValueOf(syscall.TUNDETACHFILTER),
+ "TUNGETFEATURES": ValueOf(uint32(syscall.TUNGETFEATURES)),
+ "TUNGETFILTER": ValueOf(uint32(syscall.TUNGETFILTER)),
+ "TUNGETIFF": ValueOf(uint32(syscall.TUNGETIFF)),
+ "TUNGETSNDBUF": ValueOf(uint32(syscall.TUNGETSNDBUF)),
+ "TUNGETVNETHDRSZ": ValueOf(uint32(syscall.TUNGETVNETHDRSZ)),
+ "TUNSETDEBUG": ValueOf(syscall.TUNSETDEBUG),
+ "TUNSETGROUP": ValueOf(syscall.TUNSETGROUP),
+ "TUNSETIFF": ValueOf(syscall.TUNSETIFF),
+ "TUNSETIFINDEX": ValueOf(syscall.TUNSETIFINDEX),
+ "TUNSETLINK": ValueOf(syscall.TUNSETLINK),
+ "TUNSETNOCSUM": ValueOf(syscall.TUNSETNOCSUM),
+ "TUNSETOFFLOAD": ValueOf(syscall.TUNSETOFFLOAD),
+ "TUNSETOWNER": ValueOf(syscall.TUNSETOWNER),
+ "TUNSETPERSIST": ValueOf(syscall.TUNSETPERSIST),
+ "TUNSETQUEUE": ValueOf(syscall.TUNSETQUEUE),
+ "TUNSETSNDBUF": ValueOf(syscall.TUNSETSNDBUF),
+ "TUNSETTXFILTER": ValueOf(syscall.TUNSETTXFILTER),
+ "TUNSETVNETHDRSZ": ValueOf(syscall.TUNSETVNETHDRSZ),
+ "Tcgetattr": ValueOf(syscall.Tcgetattr),
+ "Tcsetattr": ValueOf(syscall.Tcsetattr),
+ "Tee": ValueOf(syscall.Tee),
+ "Tgkill": ValueOf(syscall.Tgkill),
+ "Time": ValueOf(syscall.Time),
+ "Times": ValueOf(syscall.Times),
+ "TimespecToNsec": ValueOf(syscall.TimespecToNsec),
+ "TimevalToNsec": ValueOf(syscall.TimevalToNsec),
+ "Truncate": ValueOf(syscall.Truncate),
+ "Umask": ValueOf(syscall.Umask),
+ "Uname": ValueOf(syscall.Uname),
+ "UnixCredentials": ValueOf(syscall.UnixCredentials),
+ "UnixRights": ValueOf(syscall.UnixRights),
+ "Unlink": ValueOf(syscall.Unlink),
+ "Unlinkat": ValueOf(syscall.Unlinkat),
+ "Unmount": ValueOf(syscall.Unmount),
+ "Unsetenv": ValueOf(syscall.Unsetenv),
+ "Unshare": ValueOf(syscall.Unshare),
+ "Ustat": ValueOf(syscall.Ustat),
+ "Utime": ValueOf(syscall.Utime),
+ "Utimes": ValueOf(syscall.Utimes),
+ "UtimesNano": ValueOf(syscall.UtimesNano),
+ "VDISCARD": ValueOf(syscall.VDISCARD),
+ "VEOF": ValueOf(syscall.VEOF),
+ "VEOL": ValueOf(syscall.VEOL),
+ "VEOL2": ValueOf(syscall.VEOL2),
+ "VERASE": ValueOf(syscall.VERASE),
+ "VINTR": ValueOf(syscall.VINTR),
+ "VKILL": ValueOf(syscall.VKILL),
+ "VLNEXT": ValueOf(syscall.VLNEXT),
+ "VMIN": ValueOf(syscall.VMIN),
+ "VQUIT": ValueOf(syscall.VQUIT),
+ "VREPRINT": ValueOf(syscall.VREPRINT),
+ "VSTART": ValueOf(syscall.VSTART),
+ "VSTOP": ValueOf(syscall.VSTOP),
+ "VSUSP": ValueOf(syscall.VSUSP),
+ "VTDLY": ValueOf(syscall.VTDLY),
+ "VTIME": ValueOf(syscall.VTIME),
+ "VWERASE": ValueOf(syscall.VWERASE),
+ "WAIT_ANY": ValueOf(syscall.WAIT_ANY),
+ "WAIT_MYPGRP": ValueOf(syscall.WAIT_MYPGRP),
+ "WALL": ValueOf(syscall.WALL),
+ "WCHAR_MAX": ValueOf(syscall.WCHAR_MAX),
+ "WCHAR_MIN": ValueOf(syscall.WCHAR_MIN),
+ "WCHAR_WIDTH": ValueOf(syscall.WCHAR_WIDTH),
+ "WCONTINUED": ValueOf(syscall.WCONTINUED),
+ "WCOREFLAG": ValueOf(syscall.WCOREFLAG),
+ "WEXITED": ValueOf(syscall.WEXITED),
+ "WINT_MAX": ValueOf(uint32(syscall.WINT_MAX)),
+ "WINT_MIN": ValueOf(syscall.WINT_MIN),
+ "WINT_WIDTH": ValueOf(syscall.WINT_WIDTH),
+ "WNOHANG": ValueOf(syscall.WNOHANG),
+ "WNOWAIT": ValueOf(syscall.WNOWAIT),
+ "WORD_BIT": ValueOf(syscall.WORD_BIT),
+ "WSTOPPED": ValueOf(syscall.WSTOPPED),
+ "WUNTRACED": ValueOf(syscall.WUNTRACED),
+ "W_OK": ValueOf(syscall.W_OK),
+ "Wait4": ValueOf(syscall.Wait4),
+ "Write": ValueOf(syscall.Write),
+ "XCASE": ValueOf(syscall.XCASE),
+ }, Types: map[string]Type{
+ "Addrinfo": TypeOf((*syscall.Addrinfo)(nil)).Elem(),
+ "Cmsghdr": TypeOf((*syscall.Cmsghdr)(nil)).Elem(),
+ "Cmsghdr_len_t": TypeOf((*syscall.Cmsghdr_len_t)(nil)).Elem(),
+ "Conn": TypeOf((*syscall.Conn)(nil)).Elem(),
+ "Credential": TypeOf((*syscall.Credential)(nil)).Elem(),
+ "DIR": TypeOf((*syscall.DIR)(nil)).Elem(),
+ "Dirent": TypeOf((*syscall.Dirent)(nil)).Elem(),
+ "EpollEvent": TypeOf((*syscall.EpollEvent)(nil)).Elem(),
+ "Errno": TypeOf((*syscall.Errno)(nil)).Elem(),
+ "FdSet": TypeOf((*syscall.FdSet)(nil)).Elem(),
+ "Flock_t": TypeOf((*syscall.Flock_t)(nil)).Elem(),
+ "Gid_t": TypeOf((*syscall.Gid_t)(nil)).Elem(),
+ "Group": TypeOf((*syscall.Group)(nil)).Elem(),
+ "ICMPv6Filter": TypeOf((*syscall.ICMPv6Filter)(nil)).Elem(),
+ "IPMreq": TypeOf((*syscall.IPMreq)(nil)).Elem(),
+ "IPMreqn": TypeOf((*syscall.IPMreqn)(nil)).Elem(),
+ "IPv6MTUInfo": TypeOf((*syscall.IPv6MTUInfo)(nil)).Elem(),
+ "IPv6Mreq": TypeOf((*syscall.IPv6Mreq)(nil)).Elem(),
+ "IfAddrmsg": TypeOf((*syscall.IfAddrmsg)(nil)).Elem(),
+ "IfInfomsg": TypeOf((*syscall.IfInfomsg)(nil)).Elem(),
+ "Inet4Pktinfo": TypeOf((*syscall.Inet4Pktinfo)(nil)).Elem(),
+ "Inet6Pktinfo": TypeOf((*syscall.Inet6Pktinfo)(nil)).Elem(),
+ "InotifyEvent": TypeOf((*syscall.InotifyEvent)(nil)).Elem(),
+ "Iovec": TypeOf((*syscall.Iovec)(nil)).Elem(),
+ "Iovec_len_t": TypeOf((*syscall.Iovec_len_t)(nil)).Elem(),
+ "Linger": TypeOf((*syscall.Linger)(nil)).Elem(),
+ "Mode_t": TypeOf((*syscall.Mode_t)(nil)).Elem(),
+ "Msghdr": TypeOf((*syscall.Msghdr)(nil)).Elem(),
+ "Msghdr_controllen_t": TypeOf((*syscall.Msghdr_controllen_t)(nil)).Elem(),
+ "NetlinkMessage": TypeOf((*syscall.NetlinkMessage)(nil)).Elem(),
+ "NetlinkRouteAttr": TypeOf((*syscall.NetlinkRouteAttr)(nil)).Elem(),
+ "NetlinkRouteRequest": TypeOf((*syscall.NetlinkRouteRequest)(nil)).Elem(),
+ "NlAttr": TypeOf((*syscall.NlAttr)(nil)).Elem(),
+ "NlMsgerr": TypeOf((*syscall.NlMsgerr)(nil)).Elem(),
+ "NlMsghdr": TypeOf((*syscall.NlMsghdr)(nil)).Elem(),
+ "Offset_t": TypeOf((*syscall.Offset_t)(nil)).Elem(),
+ "Passwd": TypeOf((*syscall.Passwd)(nil)).Elem(),
+ "Pid_t": TypeOf((*syscall.Pid_t)(nil)).Elem(),
+ "ProcAttr": TypeOf((*syscall.ProcAttr)(nil)).Elem(),
+ "PtraceRegs": TypeOf((*syscall.PtraceRegs)(nil)).Elem(),
+ "RawConn": TypeOf((*syscall.RawConn)(nil)).Elem(),
+ "RawSockaddr": TypeOf((*syscall.RawSockaddr)(nil)).Elem(),
+ "RawSockaddrAny": TypeOf((*syscall.RawSockaddrAny)(nil)).Elem(),
+ "RawSockaddrInet4": TypeOf((*syscall.RawSockaddrInet4)(nil)).Elem(),
+ "RawSockaddrInet6": TypeOf((*syscall.RawSockaddrInet6)(nil)).Elem(),
+ "RawSockaddrLinklayer": TypeOf((*syscall.RawSockaddrLinklayer)(nil)).Elem(),
+ "RawSockaddrNetlink": TypeOf((*syscall.RawSockaddrNetlink)(nil)).Elem(),
+ "RawSockaddrUnix": TypeOf((*syscall.RawSockaddrUnix)(nil)).Elem(),
+ "Rlimit": TypeOf((*syscall.Rlimit)(nil)).Elem(),
+ "RtAttr": TypeOf((*syscall.RtAttr)(nil)).Elem(),
+ "RtGenmsg": TypeOf((*syscall.RtGenmsg)(nil)).Elem(),
+ "RtMsg": TypeOf((*syscall.RtMsg)(nil)).Elem(),
+ "RtNexthop": TypeOf((*syscall.RtNexthop)(nil)).Elem(),
+ "Rusage": TypeOf((*syscall.Rusage)(nil)).Elem(),
+ "Signal": TypeOf((*syscall.Signal)(nil)).Elem(),
+ "Size_t": TypeOf((*syscall.Size_t)(nil)).Elem(),
+ "SockFilter": TypeOf((*syscall.SockFilter)(nil)).Elem(),
+ "SockFprog": TypeOf((*syscall.SockFprog)(nil)).Elem(),
+ "Sockaddr": TypeOf((*syscall.Sockaddr)(nil)).Elem(),
+ "SockaddrInet4": TypeOf((*syscall.SockaddrInet4)(nil)).Elem(),
+ "SockaddrInet6": TypeOf((*syscall.SockaddrInet6)(nil)).Elem(),
+ "SockaddrLinklayer": TypeOf((*syscall.SockaddrLinklayer)(nil)).Elem(),
+ "SockaddrNetlink": TypeOf((*syscall.SockaddrNetlink)(nil)).Elem(),
+ "SockaddrUnix": TypeOf((*syscall.SockaddrUnix)(nil)).Elem(),
+ "SocketControlMessage": TypeOf((*syscall.SocketControlMessage)(nil)).Elem(),
+ "Socklen_t": TypeOf((*syscall.Socklen_t)(nil)).Elem(),
+ "Ssize_t": TypeOf((*syscall.Ssize_t)(nil)).Elem(),
+ "Stat_t": TypeOf((*syscall.Stat_t)(nil)).Elem(),
+ "Statfs_t": TypeOf((*syscall.Statfs_t)(nil)).Elem(),
+ "SysProcAttr": TypeOf((*syscall.SysProcAttr)(nil)).Elem(),
+ "SysProcIDMap": TypeOf((*syscall.SysProcIDMap)(nil)).Elem(),
+ "Sysinfo_t": TypeOf((*syscall.Sysinfo_t)(nil)).Elem(),
+ "Termios": TypeOf((*syscall.Termios)(nil)).Elem(),
+ "Time_t": TypeOf((*syscall.Time_t)(nil)).Elem(),
+ "Timespec": TypeOf((*syscall.Timespec)(nil)).Elem(),
+ "Timespec_nsec_t": TypeOf((*syscall.Timespec_nsec_t)(nil)).Elem(),
+ "Timespec_sec_t": TypeOf((*syscall.Timespec_sec_t)(nil)).Elem(),
+ "Timeval": TypeOf((*syscall.Timeval)(nil)).Elem(),
+ "Timeval_sec_t": TypeOf((*syscall.Timeval_sec_t)(nil)).Elem(),
+ "Timeval_usec_t": TypeOf((*syscall.Timeval_usec_t)(nil)).Elem(),
+ "Timex": TypeOf((*syscall.Timex)(nil)).Elem(),
+ "Tms": TypeOf((*syscall.Tms)(nil)).Elem(),
+ "Ucred": TypeOf((*syscall.Ucred)(nil)).Elem(),
+ "Uid_t": TypeOf((*syscall.Uid_t)(nil)).Elem(),
+ "Ustat_t": TypeOf((*syscall.Ustat_t)(nil)).Elem(),
+ "Utimbuf": TypeOf((*syscall.Utimbuf)(nil)).Elem(),
+ "Utsname": TypeOf((*syscall.Utsname)(nil)).Elem(),
+ "WaitStatus": TypeOf((*syscall.WaitStatus)(nil)).Elem(),
+ }, Proxies: map[string]Type{
+ "Conn": TypeOf((*P_syscall_Conn)(nil)).Elem(),
+ "RawConn": TypeOf((*P_syscall_RawConn)(nil)).Elem(),
+ }, Untypeds: map[string]string{
+ "AF_ALG": "int:38",
+ "AF_APPLETALK": "int:5",
+ "AF_ASH": "int:18",
+ "AF_ATMPVC": "int:8",
+ "AF_ATMSVC": "int:20",
+ "AF_AX25": "int:3",
+ "AF_BLUETOOTH": "int:31",
+ "AF_BRIDGE": "int:7",
+ "AF_CAIF": "int:37",
+ "AF_CAN": "int:29",
+ "AF_DECnet": "int:12",
+ "AF_ECONET": "int:19",
+ "AF_FILE": "int:1",
+ "AF_IB": "int:27",
+ "AF_IEEE802154": "int:36",
+ "AF_INET": "int:2",
+ "AF_INET6": "int:10",
+ "AF_IPX": "int:4",
+ "AF_IRDA": "int:23",
+ "AF_ISDN": "int:34",
+ "AF_IUCV": "int:32",
+ "AF_KCM": "int:41",
+ "AF_KEY": "int:15",
+ "AF_LLC": "int:26",
+ "AF_LOCAL": "int:1",
+ "AF_MAX": "int:44",
+ "AF_MPLS": "int:28",
+ "AF_NETBEUI": "int:13",
+ "AF_NETLINK": "int:16",
+ "AF_NETROM": "int:6",
+ "AF_NFC": "int:39",
+ "AF_PACKET": "int:17",
+ "AF_PHONET": "int:35",
+ "AF_PPPOX": "int:24",
+ "AF_QIPCRTR": "int:42",
+ "AF_RDS": "int:21",
+ "AF_ROSE": "int:11",
+ "AF_ROUTE": "int:16",
+ "AF_RXRPC": "int:33",
+ "AF_SECURITY": "int:14",
+ "AF_SMC": "int:43",
+ "AF_SNA": "int:22",
+ "AF_TIPC": "int:30",
+ "AF_UNIX": "int:1",
+ "AF_UNSPEC": "int:0",
+ "AF_VSOCK": "int:40",
+ "AF_WANPIPE": "int:25",
+ "AF_X25": "int:9",
+ "AI_ADDRCONFIG": "int:32",
+ "AI_ALL": "int:16",
+ "AI_CANONIDN": "int:128",
+ "AI_CANONNAME": "int:2",
+ "AI_IDN": "int:64",
+ "AI_IDN_ALLOW_UNASSIGNED": "int:256",
+ "AI_IDN_USE_STD3_ASCII_RULES": "int:512",
+ "AI_NUMERICHOST": "int:4",
+ "AI_NUMERICSERV": "int:1024",
+ "AI_PASSIVE": "int:1",
+ "AI_V4MAPPED": "int:8",
+ "ARCH": "string:amd64",
+ "ARPHRD_ADAPT": "int:264",
+ "ARPHRD_APPLETLK": "int:8",
+ "ARPHRD_ARCNET": "int:7",
+ "ARPHRD_ASH": "int:781",
+ "ARPHRD_ATM": "int:19",
+ "ARPHRD_AX25": "int:3",
+ "ARPHRD_BIF": "int:775",
+ "ARPHRD_CHAOS": "int:5",
+ "ARPHRD_CISCO": "int:513",
+ "ARPHRD_CSLIP": "int:257",
+ "ARPHRD_CSLIP6": "int:259",
+ "ARPHRD_DDCMP": "int:517",
+ "ARPHRD_DLCI": "int:15",
+ "ARPHRD_ECONET": "int:782",
+ "ARPHRD_EETHER": "int:2",
+ "ARPHRD_ETHER": "int:1",
+ "ARPHRD_EUI64": "int:27",
+ "ARPHRD_FCAL": "int:785",
+ "ARPHRD_FCFABRIC": "int:787",
+ "ARPHRD_FCPL": "int:786",
+ "ARPHRD_FCPP": "int:784",
+ "ARPHRD_FDDI": "int:774",
+ "ARPHRD_FRAD": "int:770",
+ "ARPHRD_HDLC": "int:513",
+ "ARPHRD_HIPPI": "int:780",
+ "ARPHRD_HWX25": "int:272",
+ "ARPHRD_IEEE1394": "int:24",
+ "ARPHRD_IEEE802": "int:6",
+ "ARPHRD_IEEE80211": "int:801",
+ "ARPHRD_IEEE80211_PRISM": "int:802",
+ "ARPHRD_IEEE80211_RADIOTAP": "int:803",
+ "ARPHRD_IEEE802154": "int:804",
+ "ARPHRD_IEEE802154_PHY": "int:805",
+ "ARPHRD_IEEE802_TR": "int:800",
+ "ARPHRD_INFINIBAND": "int:32",
+ "ARPHRD_IPDDP": "int:777",
+ "ARPHRD_IPGRE": "int:778",
+ "ARPHRD_IRDA": "int:783",
+ "ARPHRD_LAPB": "int:516",
+ "ARPHRD_LOCALTLK": "int:773",
+ "ARPHRD_LOOPBACK": "int:772",
+ "ARPHRD_METRICOM": "int:23",
+ "ARPHRD_NETROM": "int:0",
+ "ARPHRD_NONE": "int:65534",
+ "ARPHRD_PIMREG": "int:779",
+ "ARPHRD_PPP": "int:512",
+ "ARPHRD_PRONET": "int:4",
+ "ARPHRD_RAWHDLC": "int:518",
+ "ARPHRD_RAWIP": "int:519",
+ "ARPHRD_ROSE": "int:270",
+ "ARPHRD_RSRVD": "int:260",
+ "ARPHRD_SIT": "int:776",
+ "ARPHRD_SKIP": "int:771",
+ "ARPHRD_SLIP": "int:256",
+ "ARPHRD_SLIP6": "int:258",
+ "ARPHRD_TUNNEL": "int:768",
+ "ARPHRD_TUNNEL6": "int:769",
+ "ARPHRD_VOID": "int:65535",
+ "ARPHRD_X25": "int:271",
+ "B0": "int:0",
+ "B1000000": "int:4104",
+ "B110": "int:3",
+ "B115200": "int:4098",
+ "B1152000": "int:4105",
+ "B1200": "int:9",
+ "B134": "int:4",
+ "B150": "int:5",
+ "B1500000": "int:4106",
+ "B1800": "int:10",
+ "B19200": "int:14",
+ "B200": "int:6",
+ "B2000000": "int:4107",
+ "B230400": "int:4099",
+ "B2400": "int:11",
+ "B2500000": "int:4108",
+ "B300": "int:7",
+ "B3000000": "int:4109",
+ "B3500000": "int:4110",
+ "B38400": "int:15",
+ "B4000000": "int:4111",
+ "B460800": "int:4100",
+ "B4800": "int:12",
+ "B50": "int:1",
+ "B500000": "int:4101",
+ "B57600": "int:4097",
+ "B576000": "int:4102",
+ "B600": "int:8",
+ "B75": "int:2",
+ "B921600": "int:4103",
+ "B9600": "int:13",
+ "BPF_A": "int:16",
+ "BPF_ABS": "int:32",
+ "BPF_ADD": "int:0",
+ "BPF_ALU": "int:4",
+ "BPF_AND": "int:80",
+ "BPF_B": "int:16",
+ "BPF_DIV": "int:48",
+ "BPF_H": "int:8",
+ "BPF_IMM": "int:0",
+ "BPF_IND": "int:64",
+ "BPF_JA": "int:0",
+ "BPF_JEQ": "int:16",
+ "BPF_JGE": "int:48",
+ "BPF_JGT": "int:32",
+ "BPF_JMP": "int:5",
+ "BPF_JSET": "int:64",
+ "BPF_K": "int:0",
+ "BPF_LD": "int:0",
+ "BPF_LDX": "int:1",
+ "BPF_LEN": "int:128",
+ "BPF_LL_OFF": "int:-2097152",
+ "BPF_LSH": "int:96",
+ "BPF_MAJOR_VERSION": "int:1",
+ "BPF_MAXINSNS": "int:4096",
+ "BPF_MEM": "int:96",
+ "BPF_MEMWORDS": "int:16",
+ "BPF_MINOR_VERSION": "int:1",
+ "BPF_MISC": "int:7",
+ "BPF_MOD": "int:144",
+ "BPF_MSH": "int:160",
+ "BPF_MUL": "int:32",
+ "BPF_NEG": "int:128",
+ "BPF_NET_OFF": "int:-1048576",
+ "BPF_OR": "int:64",
+ "BPF_RET": "int:6",
+ "BPF_RSH": "int:112",
+ "BPF_ST": "int:2",
+ "BPF_STX": "int:3",
+ "BPF_SUB": "int:16",
+ "BPF_TAX": "int:0",
+ "BPF_TXA": "int:128",
+ "BPF_W": "int:0",
+ "BPF_X": "int:8",
+ "BPF_XOR": "int:160",
+ "BRKINT": "int:2",
+ "BSDLY": "int:8192",
+ "CBAUD": "int:4111",
+ "CBAUDEX": "int:4096",
+ "CIBAUD": "int:269418496",
+ "CLOCAL": "int:2048",
+ "CLONE_CHILD_CLEARTID": "int:2097152",
+ "CLONE_CHILD_SETTID": "int:16777216",
+ "CLONE_DETACHED": "int:4194304",
+ "CLONE_FILES": "int:1024",
+ "CLONE_FS": "int:512",
+ "CLONE_IO": "int:2147483648",
+ "CLONE_NEWCGROUP": "int:33554432",
+ "CLONE_NEWIPC": "int:134217728",
+ "CLONE_NEWNET": "int:1073741824",
+ "CLONE_NEWNS": "int:131072",
+ "CLONE_NEWPID": "int:536870912",
+ "CLONE_NEWUSER": "int:268435456",
+ "CLONE_NEWUTS": "int:67108864",
+ "CLONE_PARENT": "int:32768",
+ "CLONE_PARENT_SETTID": "int:1048576",
+ "CLONE_PTRACE": "int:8192",
+ "CLONE_SETTLS": "int:524288",
+ "CLONE_SIGHAND": "int:2048",
+ "CLONE_SYSVSEM": "int:262144",
+ "CLONE_THREAD": "int:65536",
+ "CLONE_UNTRACED": "int:8388608",
+ "CLONE_VFORK": "int:16384",
+ "CLONE_VM": "int:256",
+ "CMSPAR": "int:1073741824",
+ "CR0": "int:0",
+ "CR1": "int:512",
+ "CR2": "int:1024",
+ "CR3": "int:1536",
+ "CRDLY": "int:1536",
+ "CREAD": "int:128",
+ "CRTSCTS": "int:2147483648",
+ "CS5": "int:0",
+ "CS6": "int:16",
+ "CS7": "int:32",
+ "CS8": "int:48",
+ "CSIZE": "int:48",
+ "CSTOPB": "int:64",
+ "DT_BLK": "int:6",
+ "DT_CHR": "int:2",
+ "DT_DIR": "int:4",
+ "DT_FIFO": "int:1",
+ "DT_LNK": "int:10",
+ "DT_REG": "int:8",
+ "DT_SOCK": "int:12",
+ "DT_UNKNOWN": "int:0",
+ "DT_WHT": "int:14",
+ "EAI_ADDRFAMILY": "int:-9",
+ "EAI_AGAIN": "int:-3",
+ "EAI_ALLDONE": "int:-103",
+ "EAI_BADFLAGS": "int:-1",
+ "EAI_CANCELED": "int:-101",
+ "EAI_FAIL": "int:-4",
+ "EAI_FAMILY": "int:-6",
+ "EAI_IDN_ENCODE": "int:-105",
+ "EAI_INPROGRESS": "int:-100",
+ "EAI_INTR": "int:-104",
+ "EAI_MEMORY": "int:-10",
+ "EAI_NODATA": "int:-5",
+ "EAI_NONAME": "int:-2",
+ "EAI_NOTCANCELED": "int:-102",
+ "EAI_OVERFLOW": "int:-12",
+ "EAI_SERVICE": "int:-8",
+ "EAI_SOCKTYPE": "int:-7",
+ "EAI_SYSTEM": "int:-11",
+ "ECHO": "int:8",
+ "ECHOCTL": "int:512",
+ "ECHOE": "int:16",
+ "ECHOK": "int:32",
+ "ECHOKE": "int:2048",
+ "ECHONL": "int:64",
+ "ECHOPRT": "int:1024",
+ "EPOLLERR": "int:8",
+ "EPOLLET": "int:2147483648",
+ "EPOLLEXCLUSIVE": "int:268435456",
+ "EPOLLHUP": "int:16",
+ "EPOLLIN": "int:1",
+ "EPOLLMSG": "int:1024",
+ "EPOLLONESHOT": "int:1073741824",
+ "EPOLLOUT": "int:4",
+ "EPOLLPRI": "int:2",
+ "EPOLLRDBAND": "int:128",
+ "EPOLLRDHUP": "int:8192",
+ "EPOLLRDNORM": "int:64",
+ "EPOLLWAKEUP": "int:536870912",
+ "EPOLLWRBAND": "int:512",
+ "EPOLLWRNORM": "int:256",
+ "EPOLL_CLOEXEC": "int:524288",
+ "EPOLL_CTL_ADD": "int:1",
+ "EPOLL_CTL_DEL": "int:2",
+ "EPOLL_CTL_MOD": "int:3",
+ "ETH_ALEN": "int:6",
+ "ETH_DATA_LEN": "int:1500",
+ "ETH_FCS_LEN": "int:4",
+ "ETH_FRAME_LEN": "int:1514",
+ "ETH_HLEN": "int:14",
+ "ETH_MAX_MTU": "int:65535",
+ "ETH_MIN_MTU": "int:68",
+ "ETH_P_1588": "int:35063",
+ "ETH_P_8021AD": "int:34984",
+ "ETH_P_8021AH": "int:35047",
+ "ETH_P_8021Q": "int:33024",
+ "ETH_P_80221": "int:35095",
+ "ETH_P_802_2": "int:4",
+ "ETH_P_802_3": "int:1",
+ "ETH_P_802_3_MIN": "int:1536",
+ "ETH_P_802_EX1": "int:34997",
+ "ETH_P_AARP": "int:33011",
+ "ETH_P_AF_IUCV": "int:64507",
+ "ETH_P_ALL": "int:3",
+ "ETH_P_AOE": "int:34978",
+ "ETH_P_ARCNET": "int:26",
+ "ETH_P_ARP": "int:2054",
+ "ETH_P_ATALK": "int:32923",
+ "ETH_P_ATMFATE": "int:34948",
+ "ETH_P_ATMMPOA": "int:34892",
+ "ETH_P_AX25": "int:2",
+ "ETH_P_BATMAN": "int:17157",
+ "ETH_P_BPQ": "int:2303",
+ "ETH_P_CAIF": "int:247",
+ "ETH_P_CAN": "int:12",
+ "ETH_P_CANFD": "int:13",
+ "ETH_P_CONTROL": "int:22",
+ "ETH_P_CUST": "int:24582",
+ "ETH_P_DDCMP": "int:6",
+ "ETH_P_DEC": "int:24576",
+ "ETH_P_DIAG": "int:24581",
+ "ETH_P_DNA_DL": "int:24577",
+ "ETH_P_DNA_RC": "int:24578",
+ "ETH_P_DNA_RT": "int:24579",
+ "ETH_P_DSA": "int:27",
+ "ETH_P_ECONET": "int:24",
+ "ETH_P_EDSA": "int:56026",
+ "ETH_P_ERSPAN": "int:35006",
+ "ETH_P_FCOE": "int:35078",
+ "ETH_P_FIP": "int:35092",
+ "ETH_P_HDLC": "int:25",
+ "ETH_P_HSR": "int:35119",
+ "ETH_P_IBOE": "int:35093",
+ "ETH_P_IEEE802154": "int:246",
+ "ETH_P_IEEEPUP": "int:2560",
+ "ETH_P_IEEEPUPAT": "int:2561",
+ "ETH_P_IFE": "int:60734",
+ "ETH_P_IP": "int:2048",
+ "ETH_P_IPV6": "int:34525",
+ "ETH_P_IPX": "int:33079",
+ "ETH_P_IRDA": "int:23",
+ "ETH_P_LAT": "int:24580",
+ "ETH_P_LINK_CTL": "int:34924",
+ "ETH_P_LOCALTALK": "int:9",
+ "ETH_P_LOOP": "int:96",
+ "ETH_P_LOOPBACK": "int:36864",
+ "ETH_P_MACSEC": "int:35045",
+ "ETH_P_MAP": "int:249",
+ "ETH_P_MOBITEX": "int:21",
+ "ETH_P_MPLS_MC": "int:34888",
+ "ETH_P_MPLS_UC": "int:34887",
+ "ETH_P_MVRP": "int:35061",
+ "ETH_P_NCSI": "int:35064",
+ "ETH_P_NSH": "int:35151",
+ "ETH_P_PAE": "int:34958",
+ "ETH_P_PAUSE": "int:34824",
+ "ETH_P_PHONET": "int:245",
+ "ETH_P_PPPTALK": "int:16",
+ "ETH_P_PPP_DISC": "int:34915",
+ "ETH_P_PPP_MP": "int:8",
+ "ETH_P_PPP_SES": "int:34916",
+ "ETH_P_PRP": "int:35067",
+ "ETH_P_PUP": "int:512",
+ "ETH_P_PUPAT": "int:513",
+ "ETH_P_QINQ1": "int:37120",
+ "ETH_P_QINQ2": "int:37376",
+ "ETH_P_QINQ3": "int:37632",
+ "ETH_P_RARP": "int:32821",
+ "ETH_P_SCA": "int:24583",
+ "ETH_P_SLOW": "int:34825",
+ "ETH_P_SNAP": "int:5",
+ "ETH_P_TDLS": "int:35085",
+ "ETH_P_TEB": "int:25944",
+ "ETH_P_TIPC": "int:35018",
+ "ETH_P_TRAILER": "int:28",
+ "ETH_P_TR_802_2": "int:17",
+ "ETH_P_TSN": "int:8944",
+ "ETH_P_WAN_PPP": "int:7",
+ "ETH_P_WCCP": "int:34878",
+ "ETH_P_X25": "int:2053",
+ "ETH_P_XDSA": "int:248",
+ "ETH_ZLEN": "int:60",
+ "FALLOC_FL_COLLAPSE_RANGE": "int:8",
+ "FALLOC_FL_INSERT_RANGE": "int:32",
+ "FALLOC_FL_KEEP_SIZE": "int:1",
+ "FALLOC_FL_NO_HIDE_STALE": "int:4",
+ "FALLOC_FL_PUNCH_HOLE": "int:2",
+ "FALLOC_FL_UNSHARE_RANGE": "int:64",
+ "FALLOC_FL_ZERO_RANGE": "int:16",
+ "FD_CLOEXEC": "int:1",
+ "FD_SETSIZE": "int:1024",
+ "FFDLY": "int:32768",
+ "FLUSHO": "int:4096",
+ "F_ADD_SEALS": "int:1033",
+ "F_DUPFD": "int:0",
+ "F_DUPFD_CLOEXEC": "int:1030",
+ "F_EXLCK": "int:4",
+ "F_GETFD": "int:1",
+ "F_GETFL": "int:3",
+ "F_GETLEASE": "int:1025",
+ "F_GETLK": "int:5",
+ "F_GETLK64": "int:5",
+ "F_GETOWN": "int:9",
+ "F_GETOWN_EX": "int:16",
+ "F_GETPIPE_SZ": "int:1032",
+ "F_GETSIG": "int:11",
+ "F_GET_FILE_RW_HINT": "int:1037",
+ "F_GET_RW_HINT": "int:1035",
+ "F_GET_SEALS": "int:1034",
+ "F_LOCK": "int:1",
+ "F_NOTIFY": "int:1026",
+ "F_OFD_GETLK": "int:36",
+ "F_OFD_SETLK": "int:37",
+ "F_OFD_SETLKW": "int:38",
+ "F_OK": "int:0",
+ "F_OWNER_GID": "int:2",
+ "F_OWNER_PGRP": "int:2",
+ "F_OWNER_PID": "int:1",
+ "F_OWNER_TID": "int:0",
+ "F_RDLCK": "int:0",
+ "F_SEAL_GROW": "int:4",
+ "F_SEAL_SEAL": "int:1",
+ "F_SEAL_SHRINK": "int:2",
+ "F_SEAL_WRITE": "int:8",
+ "F_SETFD": "int:2",
+ "F_SETFL": "int:4",
+ "F_SETLEASE": "int:1024",
+ "F_SETLK": "int:6",
+ "F_SETLK64": "int:6",
+ "F_SETLKW": "int:7",
+ "F_SETLKW64": "int:7",
+ "F_SETOWN": "int:8",
+ "F_SETOWN_EX": "int:15",
+ "F_SETPIPE_SZ": "int:1031",
+ "F_SETSIG": "int:10",
+ "F_SET_FILE_RW_HINT": "int:1038",
+ "F_SET_RW_HINT": "int:1036",
+ "F_SHLCK": "int:8",
+ "F_TEST": "int:3",
+ "F_TLOCK": "int:2",
+ "F_ULOCK": "int:0",
+ "F_UNLCK": "int:2",
+ "F_WRLCK": "int:1",
+ "HUPCL": "int:1024",
+ "ICANON": "int:2",
+ "ICRNL": "int:256",
+ "IEXTEN": "int:32768",
+ "IFA_ADDRESS": "int:1",
+ "IFA_ANYCAST": "int:5",
+ "IFA_BROADCAST": "int:4",
+ "IFA_CACHEINFO": "int:6",
+ "IFA_FLAGS": "int:8",
+ "IFA_F_DADFAILED": "int:8",
+ "IFA_F_DEPRECATED": "int:32",
+ "IFA_F_HOMEADDRESS": "int:16",
+ "IFA_F_MANAGETEMPADDR": "int:256",
+ "IFA_F_MCAUTOJOIN": "int:1024",
+ "IFA_F_NODAD": "int:2",
+ "IFA_F_NOPREFIXROUTE": "int:512",
+ "IFA_F_OPTIMISTIC": "int:4",
+ "IFA_F_PERMANENT": "int:128",
+ "IFA_F_SECONDARY": "int:1",
+ "IFA_F_STABLE_PRIVACY": "int:2048",
+ "IFA_F_TEMPORARY": "int:1",
+ "IFA_F_TENTATIVE": "int:64",
+ "IFA_LABEL": "int:3",
+ "IFA_LOCAL": "int:2",
+ "IFA_MULTICAST": "int:7",
+ "IFA_UNSPEC": "int:0",
+ "IFF_ALLMULTI": "int:512",
+ "IFF_ATTACH_QUEUE": "int:512",
+ "IFF_AUTOMEDIA": "int:16384",
+ "IFF_BROADCAST": "int:2",
+ "IFF_DEBUG": "int:4",
+ "IFF_DETACH_QUEUE": "int:1024",
+ "IFF_DYNAMIC": "int:32768",
+ "IFF_LOOPBACK": "int:8",
+ "IFF_MASTER": "int:1024",
+ "IFF_MULTICAST": "int:4096",
+ "IFF_MULTI_QUEUE": "int:256",
+ "IFF_NAPI": "int:16",
+ "IFF_NAPI_FRAGS": "int:32",
+ "IFF_NOARP": "int:128",
+ "IFF_NOFILTER": "int:4096",
+ "IFF_NOTRAILERS": "int:32",
+ "IFF_NO_PI": "int:4096",
+ "IFF_ONE_QUEUE": "int:8192",
+ "IFF_PERSIST": "int:2048",
+ "IFF_POINTOPOINT": "int:16",
+ "IFF_PORTSEL": "int:8192",
+ "IFF_PROMISC": "int:256",
+ "IFF_RUNNING": "int:64",
+ "IFF_SLAVE": "int:2048",
+ "IFF_TAP": "int:2",
+ "IFF_TUN": "int:1",
+ "IFF_TUN_EXCL": "int:32768",
+ "IFF_UP": "int:1",
+ "IFF_VNET_HDR": "int:16384",
+ "IFLA_ADDRESS": "int:1",
+ "IFLA_AF_SPEC": "int:26",
+ "IFLA_BOND_ACTIVE_SLAVE": "int:2",
+ "IFLA_BOND_AD_ACTOR_SYSTEM": "int:26",
+ "IFLA_BOND_AD_ACTOR_SYS_PRIO": "int:24",
+ "IFLA_BOND_AD_INFO": "int:23",
+ "IFLA_BOND_AD_INFO_ACTOR_KEY": "int:3",
+ "IFLA_BOND_AD_INFO_AGGREGATOR": "int:1",
+ "IFLA_BOND_AD_INFO_NUM_PORTS": "int:2",
+ "IFLA_BOND_AD_INFO_PARTNER_KEY": "int:4",
+ "IFLA_BOND_AD_INFO_PARTNER_MAC": "int:5",
+ "IFLA_BOND_AD_INFO_UNSPEC": "int:0",
+ "IFLA_BOND_AD_LACP_RATE": "int:21",
+ "IFLA_BOND_AD_SELECT": "int:22",
+ "IFLA_BOND_AD_USER_PORT_KEY": "int:25",
+ "IFLA_BOND_ALL_SLAVES_ACTIVE": "int:17",
+ "IFLA_BOND_ARP_ALL_TARGETS": "int:10",
+ "IFLA_BOND_ARP_INTERVAL": "int:7",
+ "IFLA_BOND_ARP_IP_TARGET": "int:8",
+ "IFLA_BOND_ARP_VALIDATE": "int:9",
+ "IFLA_BOND_DOWNDELAY": "int:5",
+ "IFLA_BOND_FAIL_OVER_MAC": "int:13",
+ "IFLA_BOND_LP_INTERVAL": "int:19",
+ "IFLA_BOND_MIIMON": "int:3",
+ "IFLA_BOND_MIN_LINKS": "int:18",
+ "IFLA_BOND_MODE": "int:1",
+ "IFLA_BOND_NUM_PEER_NOTIF": "int:16",
+ "IFLA_BOND_PACKETS_PER_SLAVE": "int:20",
+ "IFLA_BOND_PRIMARY": "int:11",
+ "IFLA_BOND_PRIMARY_RESELECT": "int:12",
+ "IFLA_BOND_RESEND_IGMP": "int:15",
+ "IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE": "int:7",
+ "IFLA_BOND_SLAVE_AD_AGGREGATOR_ID": "int:6",
+ "IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE": "int:8",
+ "IFLA_BOND_SLAVE_LINK_FAILURE_COUNT": "int:3",
+ "IFLA_BOND_SLAVE_MII_STATUS": "int:2",
+ "IFLA_BOND_SLAVE_PERM_HWADDR": "int:4",
+ "IFLA_BOND_SLAVE_QUEUE_ID": "int:5",
+ "IFLA_BOND_SLAVE_STATE": "int:1",
+ "IFLA_BOND_SLAVE_UNSPEC": "int:0",
+ "IFLA_BOND_TLB_DYNAMIC_LB": "int:27",
+ "IFLA_BOND_UNSPEC": "int:0",
+ "IFLA_BOND_UPDELAY": "int:4",
+ "IFLA_BOND_USE_CARRIER": "int:6",
+ "IFLA_BOND_XMIT_HASH_POLICY": "int:14",
+ "IFLA_BROADCAST": "int:2",
+ "IFLA_BRPORT_BCAST_FLOOD": "int:30",
+ "IFLA_BRPORT_BRIDGE_ID": "int:14",
+ "IFLA_BRPORT_CONFIG_PENDING": "int:20",
+ "IFLA_BRPORT_COST": "int:3",
+ "IFLA_BRPORT_DESIGNATED_COST": "int:16",
+ "IFLA_BRPORT_DESIGNATED_PORT": "int:15",
+ "IFLA_BRPORT_FAST_LEAVE": "int:7",
+ "IFLA_BRPORT_FLUSH": "int:24",
+ "IFLA_BRPORT_FORWARD_DELAY_TIMER": "int:22",
+ "IFLA_BRPORT_GROUP_FWD_MASK": "int:31",
+ "IFLA_BRPORT_GUARD": "int:5",
+ "IFLA_BRPORT_HOLD_TIMER": "int:23",
+ "IFLA_BRPORT_ID": "int:17",
+ "IFLA_BRPORT_LEARNING": "int:8",
+ "IFLA_BRPORT_LEARNING_SYNC": "int:11",
+ "IFLA_BRPORT_MCAST_FLOOD": "int:27",
+ "IFLA_BRPORT_MCAST_TO_UCAST": "int:28",
+ "IFLA_BRPORT_MESSAGE_AGE_TIMER": "int:21",
+ "IFLA_BRPORT_MODE": "int:4",
+ "IFLA_BRPORT_MULTICAST_ROUTER": "int:25",
+ "IFLA_BRPORT_NEIGH_SUPPRESS": "int:32",
+ "IFLA_BRPORT_NO": "int:18",
+ "IFLA_BRPORT_PAD": "int:26",
+ "IFLA_BRPORT_PRIORITY": "int:2",
+ "IFLA_BRPORT_PROTECT": "int:6",
+ "IFLA_BRPORT_PROXYARP": "int:10",
+ "IFLA_BRPORT_PROXYARP_WIFI": "int:12",
+ "IFLA_BRPORT_ROOT_ID": "int:13",
+ "IFLA_BRPORT_STATE": "int:1",
+ "IFLA_BRPORT_TOPOLOGY_CHANGE_ACK": "int:19",
+ "IFLA_BRPORT_UNICAST_FLOOD": "int:9",
+ "IFLA_BRPORT_UNSPEC": "int:0",
+ "IFLA_BRPORT_VLAN_TUNNEL": "int:29",
+ "IFLA_BR_AGEING_TIME": "int:4",
+ "IFLA_BR_BRIDGE_ID": "int:11",
+ "IFLA_BR_FDB_FLUSH": "int:21",
+ "IFLA_BR_FORWARD_DELAY": "int:1",
+ "IFLA_BR_GC_TIMER": "int:19",
+ "IFLA_BR_GROUP_ADDR": "int:20",
+ "IFLA_BR_GROUP_FWD_MASK": "int:9",
+ "IFLA_BR_HELLO_TIME": "int:2",
+ "IFLA_BR_HELLO_TIMER": "int:16",
+ "IFLA_BR_MAX_AGE": "int:3",
+ "IFLA_BR_MCAST_HASH_ELASTICITY": "int:26",
+ "IFLA_BR_MCAST_HASH_MAX": "int:27",
+ "IFLA_BR_MCAST_IGMP_VERSION": "int:43",
+ "IFLA_BR_MCAST_LAST_MEMBER_CNT": "int:28",
+ "IFLA_BR_MCAST_LAST_MEMBER_INTVL": "int:30",
+ "IFLA_BR_MCAST_MEMBERSHIP_INTVL": "int:31",
+ "IFLA_BR_MCAST_MLD_VERSION": "int:44",
+ "IFLA_BR_MCAST_QUERIER": "int:25",
+ "IFLA_BR_MCAST_QUERIER_INTVL": "int:32",
+ "IFLA_BR_MCAST_QUERY_INTVL": "int:33",
+ "IFLA_BR_MCAST_QUERY_RESPONSE_INTVL": "int:34",
+ "IFLA_BR_MCAST_QUERY_USE_IFADDR": "int:24",
+ "IFLA_BR_MCAST_ROUTER": "int:22",
+ "IFLA_BR_MCAST_SNOOPING": "int:23",
+ "IFLA_BR_MCAST_STARTUP_QUERY_CNT": "int:29",
+ "IFLA_BR_MCAST_STARTUP_QUERY_INTVL": "int:35",
+ "IFLA_BR_MCAST_STATS_ENABLED": "int:42",
+ "IFLA_BR_NF_CALL_ARPTABLES": "int:38",
+ "IFLA_BR_NF_CALL_IP6TABLES": "int:37",
+ "IFLA_BR_NF_CALL_IPTABLES": "int:36",
+ "IFLA_BR_PAD": "int:40",
+ "IFLA_BR_PRIORITY": "int:6",
+ "IFLA_BR_ROOT_ID": "int:10",
+ "IFLA_BR_ROOT_PATH_COST": "int:13",
+ "IFLA_BR_ROOT_PORT": "int:12",
+ "IFLA_BR_STP_STATE": "int:5",
+ "IFLA_BR_TCN_TIMER": "int:17",
+ "IFLA_BR_TOPOLOGY_CHANGE": "int:14",
+ "IFLA_BR_TOPOLOGY_CHANGE_DETECTED": "int:15",
+ "IFLA_BR_TOPOLOGY_CHANGE_TIMER": "int:18",
+ "IFLA_BR_UNSPEC": "int:0",
+ "IFLA_BR_VLAN_DEFAULT_PVID": "int:39",
+ "IFLA_BR_VLAN_FILTERING": "int:7",
+ "IFLA_BR_VLAN_PROTOCOL": "int:8",
+ "IFLA_BR_VLAN_STATS_ENABLED": "int:41",
+ "IFLA_CARRIER": "int:33",
+ "IFLA_CARRIER_CHANGES": "int:35",
+ "IFLA_COST": "int:8",
+ "IFLA_EVENT": "int:44",
+ "IFLA_EVENT_BONDING_FAILOVER": "int:3",
+ "IFLA_EVENT_BONDING_OPTIONS": "int:6",
+ "IFLA_EVENT_FEATURES": "int:2",
+ "IFLA_EVENT_IGMP_RESEND": "int:5",
+ "IFLA_EVENT_NONE": "int:0",
+ "IFLA_EVENT_NOTIFY_PEERS": "int:4",
+ "IFLA_EVENT_REBOOT": "int:1",
+ "IFLA_EXT_MASK": "int:29",
+ "IFLA_GENEVE_COLLECT_METADATA": "int:6",
+ "IFLA_GENEVE_ID": "int:1",
+ "IFLA_GENEVE_LABEL": "int:11",
+ "IFLA_GENEVE_PORT": "int:5",
+ "IFLA_GENEVE_REMOTE": "int:2",
+ "IFLA_GENEVE_REMOTE6": "int:7",
+ "IFLA_GENEVE_TOS": "int:4",
+ "IFLA_GENEVE_TTL": "int:3",
+ "IFLA_GENEVE_UDP_CSUM": "int:8",
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_RX": "int:10",
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_TX": "int:9",
+ "IFLA_GENEVE_UNSPEC": "int:0",
+ "IFLA_GROUP": "int:27",
+ "IFLA_GSO_MAX_SEGS": "int:40",
+ "IFLA_GSO_MAX_SIZE": "int:41",
+ "IFLA_GTP_FD0": "int:1",
+ "IFLA_GTP_FD1": "int:2",
+ "IFLA_GTP_PDP_HASHSIZE": "int:3",
+ "IFLA_GTP_ROLE": "int:4",
+ "IFLA_GTP_UNSPEC": "int:0",
+ "IFLA_HSR_MULTICAST_SPEC": "int:3",
+ "IFLA_HSR_SEQ_NR": "int:5",
+ "IFLA_HSR_SLAVE1": "int:1",
+ "IFLA_HSR_SLAVE2": "int:2",
+ "IFLA_HSR_SUPERVISION_ADDR": "int:4",
+ "IFLA_HSR_UNSPEC": "int:0",
+ "IFLA_HSR_VERSION": "int:6",
+ "IFLA_IFALIAS": "int:20",
+ "IFLA_IFNAME": "int:3",
+ "IFLA_IF_NETNSID": "int:46",
+ "IFLA_INET6_ADDR_GEN_MODE": "int:8",
+ "IFLA_INET6_CACHEINFO": "int:5",
+ "IFLA_INET6_CONF": "int:2",
+ "IFLA_INET6_FLAGS": "int:1",
+ "IFLA_INET6_ICMP6STATS": "int:6",
+ "IFLA_INET6_MCAST": "int:4",
+ "IFLA_INET6_STATS": "int:3",
+ "IFLA_INET6_TOKEN": "int:7",
+ "IFLA_INET6_UNSPEC": "int:0",
+ "IFLA_INET_CONF": "int:1",
+ "IFLA_INET_UNSPEC": "int:0",
+ "IFLA_INFO_DATA": "int:2",
+ "IFLA_INFO_KIND": "int:1",
+ "IFLA_INFO_SLAVE_DATA": "int:5",
+ "IFLA_INFO_SLAVE_KIND": "int:4",
+ "IFLA_INFO_UNSPEC": "int:0",
+ "IFLA_INFO_XSTATS": "int:3",
+ "IFLA_IPOIB_MODE": "int:2",
+ "IFLA_IPOIB_PKEY": "int:1",
+ "IFLA_IPOIB_UMCAST": "int:3",
+ "IFLA_IPOIB_UNSPEC": "int:0",
+ "IFLA_IPVLAN_FLAGS": "int:2",
+ "IFLA_IPVLAN_MODE": "int:1",
+ "IFLA_IPVLAN_UNSPEC": "int:0",
+ "IFLA_LINK": "int:5",
+ "IFLA_LINKINFO": "int:18",
+ "IFLA_LINKMODE": "int:17",
+ "IFLA_LINK_NETNSID": "int:37",
+ "IFLA_MACSEC_CIPHER_SUITE": "int:4",
+ "IFLA_MACSEC_ENCODING_SA": "int:6",
+ "IFLA_MACSEC_ENCRYPT": "int:7",
+ "IFLA_MACSEC_ES": "int:10",
+ "IFLA_MACSEC_ICV_LEN": "int:3",
+ "IFLA_MACSEC_INC_SCI": "int:9",
+ "IFLA_MACSEC_PAD": "int:14",
+ "IFLA_MACSEC_PORT": "int:2",
+ "IFLA_MACSEC_PROTECT": "int:8",
+ "IFLA_MACSEC_REPLAY_PROTECT": "int:12",
+ "IFLA_MACSEC_SCB": "int:11",
+ "IFLA_MACSEC_SCI": "int:1",
+ "IFLA_MACSEC_UNSPEC": "int:0",
+ "IFLA_MACSEC_VALIDATION": "int:13",
+ "IFLA_MACSEC_WINDOW": "int:5",
+ "IFLA_MACVLAN_FLAGS": "int:2",
+ "IFLA_MACVLAN_MACADDR": "int:4",
+ "IFLA_MACVLAN_MACADDR_COUNT": "int:6",
+ "IFLA_MACVLAN_MACADDR_DATA": "int:5",
+ "IFLA_MACVLAN_MACADDR_MODE": "int:3",
+ "IFLA_MACVLAN_MODE": "int:1",
+ "IFLA_MACVLAN_UNSPEC": "int:0",
+ "IFLA_MAP": "int:14",
+ "IFLA_MASTER": "int:10",
+ "IFLA_MTU": "int:4",
+ "IFLA_NET_NS_FD": "int:28",
+ "IFLA_NET_NS_PID": "int:19",
+ "IFLA_NEW_NETNSID": "int:45",
+ "IFLA_NUM_RX_QUEUES": "int:32",
+ "IFLA_NUM_TX_QUEUES": "int:31",
+ "IFLA_NUM_VF": "int:21",
+ "IFLA_OFFLOAD_XSTATS_CPU_HIT": "int:1",
+ "IFLA_OFFLOAD_XSTATS_UNSPEC": "int:0",
+ "IFLA_OPERSTATE": "int:16",
+ "IFLA_PAD": "int:42",
+ "IFLA_PHYS_PORT_ID": "int:34",
+ "IFLA_PHYS_PORT_NAME": "int:38",
+ "IFLA_PHYS_SWITCH_ID": "int:36",
+ "IFLA_PORT_HOST_UUID": "int:5",
+ "IFLA_PORT_INSTANCE_UUID": "int:4",
+ "IFLA_PORT_PROFILE": "int:2",
+ "IFLA_PORT_REQUEST": "int:6",
+ "IFLA_PORT_RESPONSE": "int:7",
+ "IFLA_PORT_SELF": "int:25",
+ "IFLA_PORT_UNSPEC": "int:0",
+ "IFLA_PORT_VF": "int:1",
+ "IFLA_PORT_VSI_TYPE": "int:3",
+ "IFLA_PPP_DEV_FD": "int:1",
+ "IFLA_PPP_UNSPEC": "int:0",
+ "IFLA_PRIORITY": "int:9",
+ "IFLA_PROMISCUITY": "int:30",
+ "IFLA_PROTINFO": "int:12",
+ "IFLA_PROTO_DOWN": "int:39",
+ "IFLA_QDISC": "int:6",
+ "IFLA_STATS": "int:7",
+ "IFLA_STATS64": "int:23",
+ "IFLA_STATS_AF_SPEC": "int:5",
+ "IFLA_STATS_LINK_64": "int:1",
+ "IFLA_STATS_LINK_OFFLOAD_XSTATS": "int:4",
+ "IFLA_STATS_LINK_XSTATS": "int:2",
+ "IFLA_STATS_LINK_XSTATS_SLAVE": "int:3",
+ "IFLA_STATS_UNSPEC": "int:0",
+ "IFLA_TXQLEN": "int:13",
+ "IFLA_UNSPEC": "int:0",
+ "IFLA_VFINFO_LIST": "int:22",
+ "IFLA_VF_IB_NODE_GUID": "int:10",
+ "IFLA_VF_IB_PORT_GUID": "int:11",
+ "IFLA_VF_INFO": "int:1",
+ "IFLA_VF_INFO_UNSPEC": "int:0",
+ "IFLA_VF_LINK_STATE": "int:5",
+ "IFLA_VF_LINK_STATE_AUTO": "int:0",
+ "IFLA_VF_LINK_STATE_DISABLE": "int:2",
+ "IFLA_VF_LINK_STATE_ENABLE": "int:1",
+ "IFLA_VF_MAC": "int:1",
+ "IFLA_VF_PORT": "int:1",
+ "IFLA_VF_PORTS": "int:24",
+ "IFLA_VF_PORT_UNSPEC": "int:0",
+ "IFLA_VF_RATE": "int:6",
+ "IFLA_VF_RSS_QUERY_EN": "int:7",
+ "IFLA_VF_SPOOFCHK": "int:4",
+ "IFLA_VF_STATS": "int:8",
+ "IFLA_VF_STATS_BROADCAST": "int:4",
+ "IFLA_VF_STATS_MULTICAST": "int:5",
+ "IFLA_VF_STATS_PAD": "int:6",
+ "IFLA_VF_STATS_RX_BYTES": "int:2",
+ "IFLA_VF_STATS_RX_PACKETS": "int:0",
+ "IFLA_VF_STATS_TX_BYTES": "int:3",
+ "IFLA_VF_STATS_TX_PACKETS": "int:1",
+ "IFLA_VF_TRUST": "int:9",
+ "IFLA_VF_TX_RATE": "int:3",
+ "IFLA_VF_UNSPEC": "int:0",
+ "IFLA_VF_VLAN": "int:2",
+ "IFLA_VF_VLAN_INFO": "int:1",
+ "IFLA_VF_VLAN_INFO_UNSPEC": "int:0",
+ "IFLA_VF_VLAN_LIST": "int:12",
+ "IFLA_VLAN_EGRESS_QOS": "int:3",
+ "IFLA_VLAN_FLAGS": "int:2",
+ "IFLA_VLAN_ID": "int:1",
+ "IFLA_VLAN_INGRESS_QOS": "int:4",
+ "IFLA_VLAN_PROTOCOL": "int:5",
+ "IFLA_VLAN_QOS_MAPPING": "int:1",
+ "IFLA_VLAN_QOS_UNSPEC": "int:0",
+ "IFLA_VLAN_UNSPEC": "int:0",
+ "IFLA_VRF_PORT_TABLE": "int:1",
+ "IFLA_VRF_PORT_UNSPEC": "int:0",
+ "IFLA_VRF_TABLE": "int:1",
+ "IFLA_VRF_UNSPEC": "int:0",
+ "IFLA_VXLAN_AGEING": "int:8",
+ "IFLA_VXLAN_COLLECT_METADATA": "int:25",
+ "IFLA_VXLAN_GBP": "int:23",
+ "IFLA_VXLAN_GPE": "int:27",
+ "IFLA_VXLAN_GROUP": "int:2",
+ "IFLA_VXLAN_GROUP6": "int:16",
+ "IFLA_VXLAN_ID": "int:1",
+ "IFLA_VXLAN_L2MISS": "int:13",
+ "IFLA_VXLAN_L3MISS": "int:14",
+ "IFLA_VXLAN_LABEL": "int:26",
+ "IFLA_VXLAN_LEARNING": "int:7",
+ "IFLA_VXLAN_LIMIT": "int:9",
+ "IFLA_VXLAN_LINK": "int:3",
+ "IFLA_VXLAN_LOCAL": "int:4",
+ "IFLA_VXLAN_LOCAL6": "int:17",
+ "IFLA_VXLAN_PORT": "int:15",
+ "IFLA_VXLAN_PORT_RANGE": "int:10",
+ "IFLA_VXLAN_PROXY": "int:11",
+ "IFLA_VXLAN_REMCSUM_NOPARTIAL": "int:24",
+ "IFLA_VXLAN_REMCSUM_RX": "int:22",
+ "IFLA_VXLAN_REMCSUM_TX": "int:21",
+ "IFLA_VXLAN_RSC": "int:12",
+ "IFLA_VXLAN_TOS": "int:6",
+ "IFLA_VXLAN_TTL": "int:5",
+ "IFLA_VXLAN_UDP_CSUM": "int:18",
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_RX": "int:20",
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_TX": "int:19",
+ "IFLA_VXLAN_UNSPEC": "int:0",
+ "IFLA_WEIGHT": "int:15",
+ "IFLA_WIRELESS": "int:11",
+ "IFLA_XDP": "int:43",
+ "IFLA_XDP_ATTACHED": "int:2",
+ "IFLA_XDP_FD": "int:1",
+ "IFLA_XDP_FLAGS": "int:3",
+ "IFLA_XDP_PROG_ID": "int:4",
+ "IFLA_XDP_UNSPEC": "int:0",
+ "IFNAMSIZ": "int:16",
+ "IGNBRK": "int:1",
+ "IGNCR": "int:128",
+ "IGNPAR": "int:4",
+ "IMAXBEL": "int:8192",
+ "INLCR": "int:64",
+ "INPCK": "int:16",
+ "IN_ACCESS": "int:1",
+ "IN_ALL_EVENTS": "int:4095",
+ "IN_ATTRIB": "int:4",
+ "IN_CLASSA_HOST": "int:16777215",
+ "IN_CLASSA_MAX": "int:128",
+ "IN_CLASSA_NET": "int:4278190080",
+ "IN_CLASSA_NSHIFT": "int:24",
+ "IN_CLASSB_HOST": "int:65535",
+ "IN_CLASSB_MAX": "int:65536",
+ "IN_CLASSB_NET": "int:4294901760",
+ "IN_CLASSB_NSHIFT": "int:16",
+ "IN_CLASSC_HOST": "int:255",
+ "IN_CLASSC_NET": "int:4294967040",
+ "IN_CLASSC_NSHIFT": "int:8",
+ "IN_CLOEXEC": "int:524288",
+ "IN_CLOSE": "int:24",
+ "IN_CLOSE_NOWRITE": "int:16",
+ "IN_CLOSE_WRITE": "int:8",
+ "IN_CREATE": "int:256",
+ "IN_DELETE": "int:512",
+ "IN_DELETE_SELF": "int:1024",
+ "IN_DONT_FOLLOW": "int:33554432",
+ "IN_EXCL_UNLINK": "int:67108864",
+ "IN_IGNORED": "int:32768",
+ "IN_ISDIR": "int:1073741824",
+ "IN_LOOPBACKNET": "int:127",
+ "IN_MASK_ADD": "int:536870912",
+ "IN_MODIFY": "int:2",
+ "IN_MOVE": "int:192",
+ "IN_MOVED_FROM": "int:64",
+ "IN_MOVED_TO": "int:128",
+ "IN_MOVE_SELF": "int:2048",
+ "IN_NONBLOCK": "int:2048",
+ "IN_ONESHOT": "int:2147483648",
+ "IN_ONLYDIR": "int:16777216",
+ "IN_OPEN": "int:32",
+ "IN_Q_OVERFLOW": "int:16384",
+ "IN_UNMOUNT": "int:8192",
+ "IPPROTO_AH": "int:51",
+ "IPPROTO_BEETPH": "int:94",
+ "IPPROTO_COMP": "int:108",
+ "IPPROTO_DCCP": "int:33",
+ "IPPROTO_DSTOPTS": "int:60",
+ "IPPROTO_EGP": "int:8",
+ "IPPROTO_ENCAP": "int:98",
+ "IPPROTO_ESP": "int:50",
+ "IPPROTO_FRAGMENT": "int:44",
+ "IPPROTO_GRE": "int:47",
+ "IPPROTO_HOPOPTS": "int:0",
+ "IPPROTO_ICMP": "int:1",
+ "IPPROTO_ICMPV6": "int:58",
+ "IPPROTO_IDP": "int:22",
+ "IPPROTO_IGMP": "int:2",
+ "IPPROTO_IP": "int:0",
+ "IPPROTO_IPIP": "int:4",
+ "IPPROTO_IPV6": "int:41",
+ "IPPROTO_MAX": "int:256",
+ "IPPROTO_MH": "int:135",
+ "IPPROTO_MPLS": "int:137",
+ "IPPROTO_MTP": "int:92",
+ "IPPROTO_NONE": "int:59",
+ "IPPROTO_PIM": "int:103",
+ "IPPROTO_PUP": "int:12",
+ "IPPROTO_RAW": "int:255",
+ "IPPROTO_ROUTING": "int:43",
+ "IPPROTO_RSVP": "int:46",
+ "IPPROTO_SCTP": "int:132",
+ "IPPROTO_TCP": "int:6",
+ "IPPROTO_TP": "int:29",
+ "IPPROTO_UDP": "int:17",
+ "IPPROTO_UDPLITE": "int:136",
+ "IPV6_2292DSTOPTS": "int:4",
+ "IPV6_2292HOPLIMIT": "int:8",
+ "IPV6_2292HOPOPTS": "int:3",
+ "IPV6_2292PKTINFO": "int:2",
+ "IPV6_2292PKTOPTIONS": "int:6",
+ "IPV6_2292RTHDR": "int:5",
+ "IPV6_ADDRFORM": "int:1",
+ "IPV6_ADDR_PREFERENCES": "int:72",
+ "IPV6_ADD_MEMBERSHIP": "int:20",
+ "IPV6_AUTHHDR": "int:10",
+ "IPV6_AUTOFLOWLABEL": "int:70",
+ "IPV6_CHECKSUM": "int:7",
+ "IPV6_DONTFRAG": "int:62",
+ "IPV6_DROP_MEMBERSHIP": "int:21",
+ "IPV6_DSTOPTS": "int:59",
+ "IPV6_HDRINCL": "int:36",
+ "IPV6_HOPLIMIT": "int:52",
+ "IPV6_HOPOPTS": "int:54",
+ "IPV6_IPSEC_POLICY": "int:34",
+ "IPV6_JOIN_ANYCAST": "int:27",
+ "IPV6_JOIN_GROUP": "int:20",
+ "IPV6_LEAVE_ANYCAST": "int:28",
+ "IPV6_LEAVE_GROUP": "int:21",
+ "IPV6_MINHOPCOUNT": "int:73",
+ "IPV6_MTU": "int:24",
+ "IPV6_MTU_DISCOVER": "int:23",
+ "IPV6_MULTICAST_HOPS": "int:18",
+ "IPV6_MULTICAST_IF": "int:17",
+ "IPV6_MULTICAST_LOOP": "int:19",
+ "IPV6_NEXTHOP": "int:9",
+ "IPV6_ORIGDSTADDR": "int:74",
+ "IPV6_PATHMTU": "int:61",
+ "IPV6_PKTINFO": "int:50",
+ "IPV6_PMTUDISC_DO": "int:2",
+ "IPV6_PMTUDISC_DONT": "int:0",
+ "IPV6_PMTUDISC_INTERFACE": "int:4",
+ "IPV6_PMTUDISC_OMIT": "int:5",
+ "IPV6_PMTUDISC_PROBE": "int:3",
+ "IPV6_PMTUDISC_WANT": "int:1",
+ "IPV6_RECVDSTOPTS": "int:58",
+ "IPV6_RECVERR": "int:25",
+ "IPV6_RECVFRAGSIZE": "int:77",
+ "IPV6_RECVHOPLIMIT": "int:51",
+ "IPV6_RECVHOPOPTS": "int:53",
+ "IPV6_RECVORIGDSTADDR": "int:74",
+ "IPV6_RECVPATHMTU": "int:60",
+ "IPV6_RECVPKTINFO": "int:49",
+ "IPV6_RECVRTHDR": "int:56",
+ "IPV6_RECVTCLASS": "int:66",
+ "IPV6_ROUTER_ALERT": "int:22",
+ "IPV6_RTHDR": "int:57",
+ "IPV6_RTHDRDSTOPTS": "int:55",
+ "IPV6_RTHDR_LOOSE": "int:0",
+ "IPV6_RTHDR_STRICT": "int:1",
+ "IPV6_RTHDR_TYPE_0": "int:0",
+ "IPV6_RXDSTOPTS": "int:59",
+ "IPV6_RXHOPOPTS": "int:54",
+ "IPV6_TCLASS": "int:67",
+ "IPV6_TRANSPARENT": "int:75",
+ "IPV6_UNICAST_HOPS": "int:16",
+ "IPV6_UNICAST_IF": "int:76",
+ "IPV6_V6ONLY": "int:26",
+ "IPV6_XFRM_POLICY": "int:35",
+ "IP_ADD_MEMBERSHIP": "int:35",
+ "IP_ADD_SOURCE_MEMBERSHIP": "int:39",
+ "IP_BIND_ADDRESS_NO_PORT": "int:24",
+ "IP_BLOCK_SOURCE": "int:38",
+ "IP_CHECKSUM": "int:23",
+ "IP_DEFAULT_MULTICAST_LOOP": "int:1",
+ "IP_DEFAULT_MULTICAST_TTL": "int:1",
+ "IP_DF": "int:16384",
+ "IP_DROP_MEMBERSHIP": "int:36",
+ "IP_DROP_SOURCE_MEMBERSHIP": "int:40",
+ "IP_FREEBIND": "int:15",
+ "IP_HDRINCL": "int:3",
+ "IP_IPSEC_POLICY": "int:16",
+ "IP_MAXPACKET": "int:65535",
+ "IP_MAX_MEMBERSHIPS": "int:20",
+ "IP_MF": "int:8192",
+ "IP_MINTTL": "int:21",
+ "IP_MSFILTER": "int:41",
+ "IP_MSS": "int:576",
+ "IP_MTU": "int:14",
+ "IP_MTU_DISCOVER": "int:10",
+ "IP_MULTICAST_ALL": "int:49",
+ "IP_MULTICAST_IF": "int:32",
+ "IP_MULTICAST_LOOP": "int:34",
+ "IP_MULTICAST_TTL": "int:33",
+ "IP_NODEFRAG": "int:22",
+ "IP_OFFMASK": "int:8191",
+ "IP_OPTIONS": "int:4",
+ "IP_ORIGDSTADDR": "int:20",
+ "IP_PASSSEC": "int:18",
+ "IP_PKTINFO": "int:8",
+ "IP_PKTOPTIONS": "int:9",
+ "IP_PMTUDISC": "int:10",
+ "IP_PMTUDISC_DO": "int:2",
+ "IP_PMTUDISC_DONT": "int:0",
+ "IP_PMTUDISC_INTERFACE": "int:4",
+ "IP_PMTUDISC_OMIT": "int:5",
+ "IP_PMTUDISC_PROBE": "int:3",
+ "IP_PMTUDISC_WANT": "int:1",
+ "IP_RECVERR": "int:11",
+ "IP_RECVFRAGSIZE": "int:25",
+ "IP_RECVOPTS": "int:6",
+ "IP_RECVORIGDSTADDR": "int:20",
+ "IP_RECVTOS": "int:13",
+ "IP_RECVTTL": "int:12",
+ "IP_RETOPTS": "int:7",
+ "IP_RF": "int:32768",
+ "IP_ROUTER_ALERT": "int:5",
+ "IP_TOS": "int:1",
+ "IP_TRANSPARENT": "int:19",
+ "IP_TTL": "int:2",
+ "IP_UNBLOCK_SOURCE": "int:37",
+ "IP_UNICAST_IF": "int:50",
+ "IP_XFRM_POLICY": "int:17",
+ "ISIG": "int:1",
+ "ISTRIP": "int:32",
+ "IUCLC": "int:512",
+ "IUTF8": "int:16384",
+ "IXANY": "int:2048",
+ "IXOFF": "int:4096",
+ "IXON": "int:1024",
+ "ImplementsGetwd": "bool:true",
+ "LINUX_REBOOT_CMD_CAD_OFF": "int:0",
+ "LINUX_REBOOT_CMD_CAD_ON": "int:2309737967",
+ "LINUX_REBOOT_CMD_HALT": "int:3454992675",
+ "LINUX_REBOOT_CMD_KEXEC": "int:1163412803",
+ "LINUX_REBOOT_CMD_POWER_OFF": "int:1126301404",
+ "LINUX_REBOOT_CMD_RESTART": "int:19088743",
+ "LINUX_REBOOT_CMD_RESTART2": "int:2712847316",
+ "LINUX_REBOOT_CMD_SW_SUSPEND": "int:3489725666",
+ "LINUX_REBOOT_MAGIC1": "int:4276215469",
+ "LINUX_REBOOT_MAGIC2": "int:672274793",
+ "LINUX_REBOOT_MAGIC2A": "int:85072278",
+ "LINUX_REBOOT_MAGIC2B": "int:369367448",
+ "LINUX_REBOOT_MAGIC2C": "int:537993216",
+ "LOCK_EX": "int:2",
+ "LOCK_MAND": "int:32",
+ "LOCK_NB": "int:4",
+ "LOCK_READ": "int:64",
+ "LOCK_RW": "int:192",
+ "LOCK_SH": "int:1",
+ "LOCK_UN": "int:8",
+ "LOCK_WRITE": "int:128",
+ "MADV_DODUMP": "int:17",
+ "MADV_DOFORK": "int:11",
+ "MADV_DONTDUMP": "int:16",
+ "MADV_DONTFORK": "int:10",
+ "MADV_DONTNEED": "int:4",
+ "MADV_FREE": "int:8",
+ "MADV_HUGEPAGE": "int:14",
+ "MADV_HWPOISON": "int:100",
+ "MADV_KEEPONFORK": "int:19",
+ "MADV_MERGEABLE": "int:12",
+ "MADV_NOHUGEPAGE": "int:15",
+ "MADV_NORMAL": "int:0",
+ "MADV_RANDOM": "int:1",
+ "MADV_REMOVE": "int:9",
+ "MADV_SEQUENTIAL": "int:2",
+ "MADV_UNMERGEABLE": "int:13",
+ "MADV_WILLNEED": "int:3",
+ "MADV_WIPEONFORK": "int:18",
+ "MAP_32BIT": "int:64",
+ "MAP_ANON": "int:32",
+ "MAP_ANONYMOUS": "int:32",
+ "MAP_DENYWRITE": "int:2048",
+ "MAP_EXECUTABLE": "int:4096",
+ "MAP_FILE": "int:0",
+ "MAP_FIXED": "int:16",
+ "MAP_GROWSDOWN": "int:256",
+ "MAP_HUGETLB": "int:262144",
+ "MAP_HUGE_MASK": "int:63",
+ "MAP_HUGE_SHIFT": "int:26",
+ "MAP_LOCKED": "int:8192",
+ "MAP_NONBLOCK": "int:65536",
+ "MAP_NORESERVE": "int:16384",
+ "MAP_POPULATE": "int:32768",
+ "MAP_PRIVATE": "int:2",
+ "MAP_SHARED": "int:1",
+ "MAP_STACK": "int:131072",
+ "MAP_TYPE": "int:15",
+ "MCL_CURRENT": "int:1",
+ "MCL_FUTURE": "int:2",
+ "MCL_ONFAULT": "int:4",
+ "MNT_DETACH": "int:2",
+ "MNT_EXPIRE": "int:4",
+ "MNT_FORCE": "int:1",
+ "MSG_BATCH": "int:262144",
+ "MSG_CMSG_CLOEXEC": "int:1073741824",
+ "MSG_CONFIRM": "int:2048",
+ "MSG_CTRUNC": "int:8",
+ "MSG_DONTROUTE": "int:4",
+ "MSG_DONTWAIT": "int:64",
+ "MSG_EOR": "int:128",
+ "MSG_ERRQUEUE": "int:8192",
+ "MSG_FASTOPEN": "int:536870912",
+ "MSG_FIN": "int:512",
+ "MSG_MORE": "int:32768",
+ "MSG_NOSIGNAL": "int:16384",
+ "MSG_OOB": "int:1",
+ "MSG_PEEK": "int:2",
+ "MSG_PROXY": "int:16",
+ "MSG_RST": "int:4096",
+ "MSG_SYN": "int:1024",
+ "MSG_TRUNC": "int:32",
+ "MSG_TRYHARD": "int:4",
+ "MSG_WAITALL": "int:256",
+ "MSG_WAITFORONE": "int:65536",
+ "MSG_ZEROCOPY": "int:67108864",
+ "MS_ACTIVE": "int:1073741824",
+ "MS_ASYNC": "int:1",
+ "MS_BIND": "int:4096",
+ "MS_BORN": "int:536870912",
+ "MS_DIRSYNC": "int:128",
+ "MS_INVALIDATE": "int:2",
+ "MS_I_VERSION": "int:8388608",
+ "MS_KERNMOUNT": "int:4194304",
+ "MS_LAZYTIME": "int:33554432",
+ "MS_MANDLOCK": "int:64",
+ "MS_MGC_MSK": "int:4294901760",
+ "MS_MGC_VAL": "int:3236757504",
+ "MS_MOVE": "int:8192",
+ "MS_NOATIME": "int:1024",
+ "MS_NODEV": "int:4",
+ "MS_NODIRATIME": "int:2048",
+ "MS_NOEXEC": "int:8",
+ "MS_NOREMOTELOCK": "int:134217728",
+ "MS_NOSEC": "int:268435456",
+ "MS_NOSUID": "int:2",
+ "MS_NOUSER": "int:-2147483648",
+ "MS_POSIXACL": "int:65536",
+ "MS_PRIVATE": "int:262144",
+ "MS_RDONLY": "int:1",
+ "MS_REC": "int:16384",
+ "MS_RELATIME": "int:2097152",
+ "MS_REMOUNT": "int:32",
+ "MS_RMT_MASK": "int:41943121",
+ "MS_SHARED": "int:1048576",
+ "MS_SILENT": "int:32768",
+ "MS_SLAVE": "int:524288",
+ "MS_STRICTATIME": "int:16777216",
+ "MS_SUBMOUNT": "int:67108864",
+ "MS_SYNC": "int:4",
+ "MS_SYNCHRONOUS": "int:16",
+ "MS_UNBINDABLE": "int:131072",
+ "MS_VERBOSE": "int:32768",
+ "NETLINK_ADD_MEMBERSHIP": "int:1",
+ "NETLINK_AUDIT": "int:9",
+ "NETLINK_BROADCAST_ERROR": "int:4",
+ "NETLINK_CAP_ACK": "int:10",
+ "NETLINK_CONNECTED": "int:1",
+ "NETLINK_CONNECTOR": "int:11",
+ "NETLINK_CRYPTO": "int:21",
+ "NETLINK_DNRTMSG": "int:14",
+ "NETLINK_DROP_MEMBERSHIP": "int:2",
+ "NETLINK_ECRYPTFS": "int:19",
+ "NETLINK_EXT_ACK": "int:11",
+ "NETLINK_FIB_LOOKUP": "int:10",
+ "NETLINK_FIREWALL": "int:3",
+ "NETLINK_GENERIC": "int:16",
+ "NETLINK_INET_DIAG": "int:4",
+ "NETLINK_IP6_FW": "int:13",
+ "NETLINK_ISCSI": "int:8",
+ "NETLINK_KOBJECT_UEVENT": "int:15",
+ "NETLINK_LISTEN_ALL_NSID": "int:8",
+ "NETLINK_LIST_MEMBERSHIPS": "int:9",
+ "NETLINK_NETFILTER": "int:12",
+ "NETLINK_NFLOG": "int:5",
+ "NETLINK_NO_ENOBUFS": "int:5",
+ "NETLINK_PKTINFO": "int:3",
+ "NETLINK_RDMA": "int:20",
+ "NETLINK_ROUTE": "int:0",
+ "NETLINK_RX_RING": "int:6",
+ "NETLINK_SCSITRANSPORT": "int:18",
+ "NETLINK_SELINUX": "int:7",
+ "NETLINK_SMC": "int:22",
+ "NETLINK_SOCK_DIAG": "int:4",
+ "NETLINK_TX_RING": "int:7",
+ "NETLINK_UNCONNECTED": "int:0",
+ "NETLINK_UNUSED": "int:1",
+ "NETLINK_USERSOCK": "int:2",
+ "NETLINK_XFRM": "int:6",
+ "NI_DGRAM": "int:16",
+ "NI_IDN": "int:32",
+ "NI_IDN_ALLOW_UNASSIGNED": "int:64",
+ "NI_IDN_USE_STD3_ASCII_RULES": "int:128",
+ "NI_MAXHOST": "int:1025",
+ "NI_MAXSERV": "int:32",
+ "NI_NAMEREQD": "int:8",
+ "NI_NOFQDN": "int:4",
+ "NI_NUMERICHOST": "int:1",
+ "NI_NUMERICSERV": "int:2",
+ "NL0": "int:0",
+ "NL1": "int:256",
+ "NLA_ALIGNTO": "int:4",
+ "NLA_F_NESTED": "int:32768",
+ "NLA_F_NET_BYTEORDER": "int:16384",
+ "NLA_HDRLEN": "int:4",
+ "NLA_TYPE_MASK": "int:-49153",
+ "NLDLY": "int:256",
+ "NLMSGERR_ATTR_COOKIE": "int:3",
+ "NLMSGERR_ATTR_MAX": "int:3",
+ "NLMSGERR_ATTR_MSG": "int:1",
+ "NLMSGERR_ATTR_OFFS": "int:2",
+ "NLMSGERR_ATTR_UNUSED": "int:0",
+ "NLMSG_ALIGNTO": "int:4",
+ "NLMSG_DONE": "int:3",
+ "NLMSG_ERROR": "int:2",
+ "NLMSG_HDRLEN": "int:16",
+ "NLMSG_MIN_TYPE": "int:16",
+ "NLMSG_NOOP": "int:1",
+ "NLMSG_OVERRUN": "int:4",
+ "NLM_F_ACK": "int:4",
+ "NLM_F_ACK_TLVS": "int:512",
+ "NLM_F_APPEND": "int:2048",
+ "NLM_F_ATOMIC": "int:1024",
+ "NLM_F_CAPPED": "int:256",
+ "NLM_F_CREATE": "int:1024",
+ "NLM_F_DUMP": "int:768",
+ "NLM_F_DUMP_FILTERED": "int:32",
+ "NLM_F_DUMP_INTR": "int:16",
+ "NLM_F_ECHO": "int:8",
+ "NLM_F_EXCL": "int:512",
+ "NLM_F_MATCH": "int:512",
+ "NLM_F_MULTI": "int:2",
+ "NLM_F_NONREC": "int:256",
+ "NLM_F_REPLACE": "int:256",
+ "NLM_F_REQUEST": "int:1",
+ "NLM_F_ROOT": "int:256",
+ "NOFLSH": "int:128",
+ "OCRNL": "int:8",
+ "OFDEL": "int:128",
+ "OFILL": "int:64",
+ "OLCUC": "int:2",
+ "ONLCR": "int:4",
+ "ONLRET": "int:32",
+ "ONOCR": "int:16",
+ "OPOST": "int:1",
+ "OS": "string:linux",
+ "O_ACCMODE": "int:3",
+ "O_APPEND": "int:1024",
+ "O_ASYNC": "int:8192",
+ "O_CLOEXEC": "int:524288",
+ "O_CREAT": "int:64",
+ "O_DIRECT": "int:16384",
+ "O_DIRECTORY": "int:65536",
+ "O_DSYNC": "int:4096",
+ "O_EXCL": "int:128",
+ "O_FSYNC": "int:1052672",
+ "O_LARGEFILE": "int:0",
+ "O_NDELAY": "int:2048",
+ "O_NOATIME": "int:262144",
+ "O_NOCTTY": "int:256",
+ "O_NOFOLLOW": "int:131072",
+ "O_NONBLOCK": "int:2048",
+ "O_PATH": "int:2097152",
+ "O_RDONLY": "int:0",
+ "O_RDWR": "int:2",
+ "O_RSYNC": "int:1052672",
+ "O_SYNC": "int:1052672",
+ "O_TMPFILE": "int:4259840",
+ "O_TRUNC": "int:512",
+ "O_WRONLY": "int:1",
+ "PACKET_ADD_MEMBERSHIP": "int:1",
+ "PACKET_AUXDATA": "int:8",
+ "PACKET_BROADCAST": "int:1",
+ "PACKET_COPY_THRESH": "int:7",
+ "PACKET_DROP_MEMBERSHIP": "int:2",
+ "PACKET_FANOUT": "int:18",
+ "PACKET_FANOUT_DATA": "int:22",
+ "PACKET_FASTROUTE": "int:6",
+ "PACKET_HDRLEN": "int:11",
+ "PACKET_HOST": "int:0",
+ "PACKET_LOOPBACK": "int:5",
+ "PACKET_LOSS": "int:14",
+ "PACKET_MR_ALLMULTI": "int:2",
+ "PACKET_MR_MULTICAST": "int:0",
+ "PACKET_MR_PROMISC": "int:1",
+ "PACKET_MR_UNICAST": "int:3",
+ "PACKET_MULTICAST": "int:2",
+ "PACKET_ORIGDEV": "int:9",
+ "PACKET_OTHERHOST": "int:3",
+ "PACKET_OUTGOING": "int:4",
+ "PACKET_QDISC_BYPASS": "int:20",
+ "PACKET_RECV_OUTPUT": "int:3",
+ "PACKET_RESERVE": "int:12",
+ "PACKET_ROLLOVER_STATS": "int:21",
+ "PACKET_RX_RING": "int:5",
+ "PACKET_STATISTICS": "int:6",
+ "PACKET_TIMESTAMP": "int:17",
+ "PACKET_TX_HAS_OFF": "int:19",
+ "PACKET_TX_RING": "int:13",
+ "PACKET_TX_TIMESTAMP": "int:16",
+ "PACKET_VERSION": "int:10",
+ "PACKET_VNET_HDR": "int:15",
+ "PARENB": "int:256",
+ "PARMRK": "int:8",
+ "PARODD": "int:512",
+ "PC_2_SYMLINKS": "int:20",
+ "PC_ALLOC_SIZE_MIN": "int:18",
+ "PC_ASYNC_IO": "int:10",
+ "PC_CHOWN_RESTRICTED": "int:6",
+ "PC_FILESIZEBITS": "int:13",
+ "PC_LINK_MAX": "int:0",
+ "PC_MAX_CANON": "int:1",
+ "PC_MAX_INPUT": "int:2",
+ "PC_NAME_MAX": "int:3",
+ "PC_NO_TRUNC": "int:7",
+ "PC_PATH_MAX": "int:4",
+ "PC_PIPE_BUF": "int:5",
+ "PC_PRIO_IO": "int:11",
+ "PC_REC_INCR_XFER_SIZE": "int:14",
+ "PC_REC_MAX_XFER_SIZE": "int:15",
+ "PC_REC_MIN_XFER_SIZE": "int:16",
+ "PC_REC_XFER_ALIGN": "int:17",
+ "PC_SOCK_MAXBUF": "int:12",
+ "PC_SYMLINK_MAX": "int:19",
+ "PC_SYNC_IO": "int:9",
+ "PC_VDISABLE": "int:8",
+ "PENDIN": "int:16384",
+ "PRIO_MAX": "int:20",
+ "PRIO_MIN": "int:-20",
+ "PRIO_PGRP": "int:1",
+ "PRIO_PROCESS": "int:0",
+ "PRIO_USER": "int:2",
+ "PROT_EXEC": "int:4",
+ "PROT_GROWSDOWN": "int:16777216",
+ "PROT_GROWSUP": "int:33554432",
+ "PROT_NONE": "int:0",
+ "PROT_READ": "int:1",
+ "PROT_WRITE": "int:2",
+ "PR_CAPBSET_DROP": "int:24",
+ "PR_CAPBSET_READ": "int:23",
+ "PR_CAP_AMBIENT": "int:47",
+ "PR_CAP_AMBIENT_CLEAR_ALL": "int:4",
+ "PR_CAP_AMBIENT_IS_SET": "int:1",
+ "PR_CAP_AMBIENT_LOWER": "int:3",
+ "PR_CAP_AMBIENT_RAISE": "int:2",
+ "PR_ENDIAN_BIG": "int:0",
+ "PR_ENDIAN_LITTLE": "int:1",
+ "PR_ENDIAN_PPC_LITTLE": "int:2",
+ "PR_FPEMU_NOPRINT": "int:1",
+ "PR_FPEMU_SIGFPE": "int:2",
+ "PR_FP_EXC_ASYNC": "int:2",
+ "PR_FP_EXC_DISABLED": "int:0",
+ "PR_FP_EXC_DIV": "int:65536",
+ "PR_FP_EXC_INV": "int:1048576",
+ "PR_FP_EXC_NONRECOV": "int:1",
+ "PR_FP_EXC_OVF": "int:131072",
+ "PR_FP_EXC_PRECISE": "int:3",
+ "PR_FP_EXC_RES": "int:524288",
+ "PR_FP_EXC_SW_ENABLE": "int:128",
+ "PR_FP_EXC_UND": "int:262144",
+ "PR_FP_MODE_FR": "int:1",
+ "PR_FP_MODE_FRE": "int:2",
+ "PR_GET_CHILD_SUBREAPER": "int:37",
+ "PR_GET_DUMPABLE": "int:3",
+ "PR_GET_ENDIAN": "int:19",
+ "PR_GET_FPEMU": "int:9",
+ "PR_GET_FPEXC": "int:11",
+ "PR_GET_FP_MODE": "int:46",
+ "PR_GET_KEEPCAPS": "int:7",
+ "PR_GET_NAME": "int:16",
+ "PR_GET_NO_NEW_PRIVS": "int:39",
+ "PR_GET_PDEATHSIG": "int:2",
+ "PR_GET_SECCOMP": "int:21",
+ "PR_GET_SECUREBITS": "int:27",
+ "PR_GET_THP_DISABLE": "int:42",
+ "PR_GET_TID_ADDRESS": "int:40",
+ "PR_GET_TIMERSLACK": "int:30",
+ "PR_GET_TIMING": "int:13",
+ "PR_GET_TSC": "int:25",
+ "PR_GET_UNALIGN": "int:5",
+ "PR_MCE_KILL": "int:33",
+ "PR_MCE_KILL_CLEAR": "int:0",
+ "PR_MCE_KILL_DEFAULT": "int:2",
+ "PR_MCE_KILL_EARLY": "int:1",
+ "PR_MCE_KILL_GET": "int:34",
+ "PR_MCE_KILL_LATE": "int:0",
+ "PR_MCE_KILL_SET": "int:1",
+ "PR_MPX_DISABLE_MANAGEMENT": "int:44",
+ "PR_MPX_ENABLE_MANAGEMENT": "int:43",
+ "PR_SET_CHILD_SUBREAPER": "int:36",
+ "PR_SET_DUMPABLE": "int:4",
+ "PR_SET_ENDIAN": "int:20",
+ "PR_SET_FPEMU": "int:10",
+ "PR_SET_FPEXC": "int:12",
+ "PR_SET_FP_MODE": "int:45",
+ "PR_SET_KEEPCAPS": "int:8",
+ "PR_SET_MM": "int:35",
+ "PR_SET_MM_ARG_END": "int:9",
+ "PR_SET_MM_ARG_START": "int:8",
+ "PR_SET_MM_AUXV": "int:12",
+ "PR_SET_MM_BRK": "int:7",
+ "PR_SET_MM_END_CODE": "int:2",
+ "PR_SET_MM_END_DATA": "int:4",
+ "PR_SET_MM_ENV_END": "int:11",
+ "PR_SET_MM_ENV_START": "int:10",
+ "PR_SET_MM_EXE_FILE": "int:13",
+ "PR_SET_MM_MAP": "int:14",
+ "PR_SET_MM_MAP_SIZE": "int:15",
+ "PR_SET_MM_START_BRK": "int:6",
+ "PR_SET_MM_START_CODE": "int:1",
+ "PR_SET_MM_START_DATA": "int:3",
+ "PR_SET_MM_START_STACK": "int:5",
+ "PR_SET_NAME": "int:15",
+ "PR_SET_NO_NEW_PRIVS": "int:38",
+ "PR_SET_PDEATHSIG": "int:1",
+ "PR_SET_PTRACER": "int:1499557217",
+ "PR_SET_SECCOMP": "int:22",
+ "PR_SET_SECUREBITS": "int:28",
+ "PR_SET_THP_DISABLE": "int:41",
+ "PR_SET_TIMERSLACK": "int:29",
+ "PR_SET_TIMING": "int:14",
+ "PR_SET_TSC": "int:26",
+ "PR_SET_UNALIGN": "int:6",
+ "PR_SVE_GET_VL": "int:51",
+ "PR_SVE_SET_VL": "int:50",
+ "PR_SVE_SET_VL_ONEXEC": "int:262144",
+ "PR_SVE_VL_INHERIT": "int:131072",
+ "PR_SVE_VL_LEN_MASK": "int:65535",
+ "PR_TASK_PERF_EVENTS_DISABLE": "int:31",
+ "PR_TASK_PERF_EVENTS_ENABLE": "int:32",
+ "PR_TIMING_STATISTICAL": "int:0",
+ "PR_TIMING_TIMESTAMP": "int:1",
+ "PR_TSC_ENABLE": "int:1",
+ "PR_TSC_SIGSEGV": "int:2",
+ "PR_UNALIGN_NOPRINT": "int:1",
+ "PR_UNALIGN_SIGBUS": "int:2",
+ "PTRACE_ARCH_PRCTL": "int:30",
+ "PTRACE_ATTACH": "int:16",
+ "PTRACE_CONT": "int:7",
+ "PTRACE_DETACH": "int:17",
+ "PTRACE_EVENT_CLONE": "int:3",
+ "PTRACE_EVENT_EXEC": "int:4",
+ "PTRACE_EVENT_EXIT": "int:6",
+ "PTRACE_EVENT_FORK": "int:1",
+ "PTRACE_EVENT_SECCOMP": "int:7",
+ "PTRACE_EVENT_STOP": "int:128",
+ "PTRACE_EVENT_VFORK": "int:2",
+ "PTRACE_EVENT_VFORK_DONE": "int:5",
+ "PTRACE_GETEVENTMSG": "int:16897",
+ "PTRACE_GETFPREGS": "int:14",
+ "PTRACE_GETFPXREGS": "int:18",
+ "PTRACE_GETREGS": "int:12",
+ "PTRACE_GETREGSET": "int:16900",
+ "PTRACE_GETSIGINFO": "int:16898",
+ "PTRACE_GETSIGMASK": "int:16906",
+ "PTRACE_GET_THREAD_AREA": "int:25",
+ "PTRACE_INTERRUPT": "int:16903",
+ "PTRACE_KILL": "int:8",
+ "PTRACE_LISTEN": "int:16904",
+ "PTRACE_OLDSETOPTIONS": "int:21",
+ "PTRACE_O_EXITKILL": "int:1048576",
+ "PTRACE_O_MASK": "int:3145983",
+ "PTRACE_O_SUSPEND_SECCOMP": "int:2097152",
+ "PTRACE_O_TRACECLONE": "int:8",
+ "PTRACE_O_TRACEEXEC": "int:16",
+ "PTRACE_O_TRACEEXIT": "int:64",
+ "PTRACE_O_TRACEFORK": "int:2",
+ "PTRACE_O_TRACESECCOMP": "int:128",
+ "PTRACE_O_TRACESYSGOOD": "int:1",
+ "PTRACE_O_TRACEVFORK": "int:4",
+ "PTRACE_O_TRACEVFORKDONE": "int:32",
+ "PTRACE_PEEKDATA": "int:2",
+ "PTRACE_PEEKSIGINFO": "int:16905",
+ "PTRACE_PEEKSIGINFO_SHARED": "int:1",
+ "PTRACE_PEEKTEXT": "int:1",
+ "PTRACE_PEEKUSER": "int:3",
+ "PTRACE_PEEKUSR": "int:3",
+ "PTRACE_POKEDATA": "int:5",
+ "PTRACE_POKETEXT": "int:4",
+ "PTRACE_POKEUSER": "int:6",
+ "PTRACE_POKEUSR": "int:6",
+ "PTRACE_SECCOMP_GET_FILTER": "int:16908",
+ "PTRACE_SEIZE": "int:16902",
+ "PTRACE_SETFPREGS": "int:15",
+ "PTRACE_SETFPXREGS": "int:19",
+ "PTRACE_SETOPTIONS": "int:16896",
+ "PTRACE_SETREGS": "int:13",
+ "PTRACE_SETREGSET": "int:16901",
+ "PTRACE_SETSIGINFO": "int:16899",
+ "PTRACE_SETSIGMASK": "int:16907",
+ "PTRACE_SET_THREAD_AREA": "int:26",
+ "PTRACE_SINGLEBLOCK": "int:33",
+ "PTRACE_SINGLESTEP": "int:9",
+ "PTRACE_SYSCALL": "int:24",
+ "PTRACE_SYSEMU": "int:31",
+ "PTRACE_SYSEMU_SINGLESTEP": "int:32",
+ "PTRACE_TRACEME": "int:0",
+ "PathMax": "int:4096",
+ "RLIMIT_AS": "int:9",
+ "RLIMIT_CORE": "int:4",
+ "RLIMIT_CPU": "int:0",
+ "RLIMIT_DATA": "int:2",
+ "RLIMIT_FSIZE": "int:1",
+ "RLIMIT_NOFILE": "int:7",
+ "RLIMIT_STACK": "int:3",
+ "RLIM_INFINITY": "int:18446744073709551615",
+ "RLIM_SAVED_CUR": "int:18446744073709551615",
+ "RLIM_SAVED_MAX": "int:18446744073709551615",
+ "RTAX_ADVMSS": "int:8",
+ "RTAX_CC_ALGO": "int:16",
+ "RTAX_CWND": "int:7",
+ "RTAX_FASTOPEN_NO_COOKIE": "int:17",
+ "RTAX_FEATURES": "int:12",
+ "RTAX_FEATURE_ALLFRAG": "int:8",
+ "RTAX_FEATURE_ECN": "int:1",
+ "RTAX_FEATURE_MASK": "int:15",
+ "RTAX_FEATURE_SACK": "int:2",
+ "RTAX_FEATURE_TIMESTAMP": "int:4",
+ "RTAX_HOPLIMIT": "int:10",
+ "RTAX_INITCWND": "int:11",
+ "RTAX_INITRWND": "int:14",
+ "RTAX_LOCK": "int:1",
+ "RTAX_MTU": "int:2",
+ "RTAX_QUICKACK": "int:15",
+ "RTAX_REORDERING": "int:9",
+ "RTAX_RTO_MIN": "int:13",
+ "RTAX_RTT": "int:4",
+ "RTAX_RTTVAR": "int:5",
+ "RTAX_SSTHRESH": "int:6",
+ "RTAX_UNSPEC": "int:0",
+ "RTAX_WINDOW": "int:3",
+ "RTA_ALIGNTO": "int:4",
+ "RTA_CACHEINFO": "int:12",
+ "RTA_DST": "int:1",
+ "RTA_ENCAP": "int:22",
+ "RTA_ENCAP_TYPE": "int:21",
+ "RTA_EXPIRES": "int:23",
+ "RTA_FLOW": "int:11",
+ "RTA_GATEWAY": "int:5",
+ "RTA_IIF": "int:3",
+ "RTA_MARK": "int:16",
+ "RTA_METRICS": "int:8",
+ "RTA_MFC_STATS": "int:17",
+ "RTA_MP_ALGO": "int:14",
+ "RTA_MULTIPATH": "int:9",
+ "RTA_NEWDST": "int:19",
+ "RTA_OIF": "int:4",
+ "RTA_PAD": "int:24",
+ "RTA_PREF": "int:20",
+ "RTA_PREFSRC": "int:7",
+ "RTA_PRIORITY": "int:6",
+ "RTA_PROTOINFO": "int:10",
+ "RTA_SESSION": "int:13",
+ "RTA_SRC": "int:2",
+ "RTA_TABLE": "int:15",
+ "RTA_TTL_PROPAGATE": "int:26",
+ "RTA_UID": "int:25",
+ "RTA_UNSPEC": "int:0",
+ "RTA_VIA": "int:18",
+ "RTCF_DIRECTSRC": "int:67108864",
+ "RTCF_DOREDIRECT": "int:16777216",
+ "RTCF_LOG": "int:33554432",
+ "RTCF_MASQ": "int:4194304",
+ "RTCF_NAT": "int:8388608",
+ "RTCF_VALVE": "int:2097152",
+ "RTF_ADDRCLASSMASK": "int:4160749568",
+ "RTF_ADDRCONF": "int:262144",
+ "RTF_ALLONLINK": "int:131072",
+ "RTF_BROADCAST": "int:268435456",
+ "RTF_CACHE": "int:16777216",
+ "RTF_DEFAULT": "int:65536",
+ "RTF_DYNAMIC": "int:16",
+ "RTF_FLOW": "int:33554432",
+ "RTF_GATEWAY": "int:2",
+ "RTF_HOST": "int:4",
+ "RTF_INTERFACE": "int:1073741824",
+ "RTF_IRTT": "int:256",
+ "RTF_LINKRT": "int:1048576",
+ "RTF_LOCAL": "int:2147483648",
+ "RTF_MODIFIED": "int:32",
+ "RTF_MSS": "int:64",
+ "RTF_MTU": "int:64",
+ "RTF_MULTICAST": "int:536870912",
+ "RTF_NAT": "int:134217728",
+ "RTF_NOFORWARD": "int:4096",
+ "RTF_NONEXTHOP": "int:2097152",
+ "RTF_NOPMTUDISC": "int:16384",
+ "RTF_POLICY": "int:67108864",
+ "RTF_REINSTATE": "int:8",
+ "RTF_REJECT": "int:512",
+ "RTF_STATIC": "int:1024",
+ "RTF_THROW": "int:8192",
+ "RTF_UP": "int:1",
+ "RTF_WINDOW": "int:128",
+ "RTF_XRESOLVE": "int:2048",
+ "RTMGRP_DECnet_IFADDR": "int:4096",
+ "RTMGRP_DECnet_ROUTE": "int:16384",
+ "RTMGRP_IPV4_IFADDR": "int:16",
+ "RTMGRP_IPV4_MROUTE": "int:32",
+ "RTMGRP_IPV4_ROUTE": "int:64",
+ "RTMGRP_IPV4_RULE": "int:128",
+ "RTMGRP_IPV6_IFADDR": "int:256",
+ "RTMGRP_IPV6_IFINFO": "int:2048",
+ "RTMGRP_IPV6_MROUTE": "int:512",
+ "RTMGRP_IPV6_PREFIX": "int:131072",
+ "RTMGRP_IPV6_ROUTE": "int:1024",
+ "RTMGRP_LINK": "int:1",
+ "RTMGRP_NEIGH": "int:4",
+ "RTMGRP_NOTIFY": "int:2",
+ "RTMGRP_TC": "int:8",
+ "RTMSG_AR_FAILED": "int:81",
+ "RTMSG_CONTROL": "int:64",
+ "RTMSG_DELDEVICE": "int:18",
+ "RTMSG_DELROUTE": "int:34",
+ "RTMSG_DELRULE": "int:50",
+ "RTMSG_NEWDEVICE": "int:17",
+ "RTMSG_NEWROUTE": "int:33",
+ "RTMSG_NEWRULE": "int:49",
+ "RTMSG_OVERRUN": "int:4",
+ "RTM_BASE": "int:16",
+ "RTM_DELACTION": "int:49",
+ "RTM_DELADDR": "int:21",
+ "RTM_DELADDRLABEL": "int:73",
+ "RTM_DELLINK": "int:17",
+ "RTM_DELMDB": "int:85",
+ "RTM_DELNEIGH": "int:29",
+ "RTM_DELNETCONF": "int:81",
+ "RTM_DELNSID": "int:89",
+ "RTM_DELQDISC": "int:37",
+ "RTM_DELROUTE": "int:25",
+ "RTM_DELRULE": "int:33",
+ "RTM_DELTCLASS": "int:41",
+ "RTM_DELTFILTER": "int:45",
+ "RTM_F_CLONED": "int:512",
+ "RTM_F_EQUALIZE": "int:1024",
+ "RTM_F_FIB_MATCH": "int:8192",
+ "RTM_F_LOOKUP_TABLE": "int:4096",
+ "RTM_F_NOTIFY": "int:256",
+ "RTM_F_PREFIX": "int:2048",
+ "RTM_GETACTION": "int:50",
+ "RTM_GETADDR": "int:22",
+ "RTM_GETADDRLABEL": "int:74",
+ "RTM_GETANYCAST": "int:62",
+ "RTM_GETDCB": "int:78",
+ "RTM_GETLINK": "int:18",
+ "RTM_GETMDB": "int:86",
+ "RTM_GETMULTICAST": "int:58",
+ "RTM_GETNEIGH": "int:30",
+ "RTM_GETNEIGHTBL": "int:66",
+ "RTM_GETNETCONF": "int:82",
+ "RTM_GETNSID": "int:90",
+ "RTM_GETQDISC": "int:38",
+ "RTM_GETROUTE": "int:26",
+ "RTM_GETRULE": "int:34",
+ "RTM_GETSTATS": "int:94",
+ "RTM_GETTCLASS": "int:42",
+ "RTM_GETTFILTER": "int:46",
+ "RTM_NEWACTION": "int:48",
+ "RTM_NEWADDR": "int:20",
+ "RTM_NEWADDRLABEL": "int:72",
+ "RTM_NEWCACHEREPORT": "int:96",
+ "RTM_NEWLINK": "int:16",
+ "RTM_NEWMDB": "int:84",
+ "RTM_NEWNDUSEROPT": "int:68",
+ "RTM_NEWNEIGH": "int:28",
+ "RTM_NEWNEIGHTBL": "int:64",
+ "RTM_NEWNETCONF": "int:80",
+ "RTM_NEWNSID": "int:88",
+ "RTM_NEWPREFIX": "int:52",
+ "RTM_NEWQDISC": "int:36",
+ "RTM_NEWROUTE": "int:24",
+ "RTM_NEWRULE": "int:32",
+ "RTM_NEWSTATS": "int:92",
+ "RTM_NEWTCLASS": "int:40",
+ "RTM_NEWTFILTER": "int:44",
+ "RTM_SETDCB": "int:79",
+ "RTM_SETLINK": "int:19",
+ "RTM_SETNEIGHTBL": "int:67",
+ "RTNETLINK_HAVE_PEERINFO": "int:1",
+ "RTNH_ALIGNTO": "int:4",
+ "RTNH_COMPARE_MASK": "int:25",
+ "RTNH_F_DEAD": "int:1",
+ "RTNH_F_LINKDOWN": "int:16",
+ "RTNH_F_OFFLOAD": "int:8",
+ "RTNH_F_ONLINK": "int:4",
+ "RTNH_F_PERVASIVE": "int:2",
+ "RTNH_F_UNRESOLVED": "int:32",
+ "RTNLGRP_DCB": "int:23",
+ "RTNLGRP_DECnet_IFADDR": "int:13",
+ "RTNLGRP_DECnet_ROUTE": "int:15",
+ "RTNLGRP_DECnet_RULE": "int:16",
+ "RTNLGRP_IPV4_IFADDR": "int:5",
+ "RTNLGRP_IPV4_MROUTE": "int:6",
+ "RTNLGRP_IPV4_MROUTE_R": "int:30",
+ "RTNLGRP_IPV4_NETCONF": "int:24",
+ "RTNLGRP_IPV4_ROUTE": "int:7",
+ "RTNLGRP_IPV4_RULE": "int:8",
+ "RTNLGRP_IPV6_IFADDR": "int:9",
+ "RTNLGRP_IPV6_IFINFO": "int:12",
+ "RTNLGRP_IPV6_MROUTE": "int:10",
+ "RTNLGRP_IPV6_MROUTE_R": "int:31",
+ "RTNLGRP_IPV6_NETCONF": "int:25",
+ "RTNLGRP_IPV6_PREFIX": "int:18",
+ "RTNLGRP_IPV6_ROUTE": "int:11",
+ "RTNLGRP_IPV6_RULE": "int:19",
+ "RTNLGRP_LINK": "int:1",
+ "RTNLGRP_MDB": "int:26",
+ "RTNLGRP_MPLS_NETCONF": "int:29",
+ "RTNLGRP_MPLS_ROUTE": "int:27",
+ "RTNLGRP_ND_USEROPT": "int:20",
+ "RTNLGRP_NEIGH": "int:3",
+ "RTNLGRP_NONE": "int:0",
+ "RTNLGRP_NOP2": "int:14",
+ "RTNLGRP_NOP4": "int:17",
+ "RTNLGRP_NOTIFY": "int:2",
+ "RTNLGRP_NSID": "int:28",
+ "RTNLGRP_PHONET_IFADDR": "int:21",
+ "RTNLGRP_PHONET_ROUTE": "int:22",
+ "RTNLGRP_TC": "int:4",
+ "RTNL_FAMILY_IP6MR": "int:129",
+ "RTNL_FAMILY_IPMR": "int:128",
+ "RTNL_FAMILY_MAX": "int:129",
+ "RTN_ANYCAST": "int:4",
+ "RTN_BLACKHOLE": "int:6",
+ "RTN_BROADCAST": "int:3",
+ "RTN_LOCAL": "int:2",
+ "RTN_MULTICAST": "int:5",
+ "RTN_NAT": "int:10",
+ "RTN_PROHIBIT": "int:8",
+ "RTN_THROW": "int:9",
+ "RTN_UNICAST": "int:1",
+ "RTN_UNREACHABLE": "int:7",
+ "RTN_UNSPEC": "int:0",
+ "RTN_XRESOLVE": "int:11",
+ "RTPROT_BABEL": "int:42",
+ "RTPROT_BIRD": "int:12",
+ "RTPROT_BOOT": "int:3",
+ "RTPROT_DHCP": "int:16",
+ "RTPROT_DNROUTED": "int:13",
+ "RTPROT_GATED": "int:8",
+ "RTPROT_KERNEL": "int:2",
+ "RTPROT_MROUTED": "int:17",
+ "RTPROT_MRT": "int:10",
+ "RTPROT_NTK": "int:15",
+ "RTPROT_RA": "int:9",
+ "RTPROT_REDIRECT": "int:1",
+ "RTPROT_STATIC": "int:4",
+ "RTPROT_UNSPEC": "int:0",
+ "RTPROT_XORP": "int:14",
+ "RTPROT_ZEBRA": "int:11",
+ "RT_CLASS_DEFAULT": "int:253",
+ "RT_CLASS_LOCAL": "int:255",
+ "RT_CLASS_MAIN": "int:254",
+ "RT_CLASS_MAX": "int:255",
+ "RT_CLASS_UNSPEC": "int:0",
+ "RT_SCOPE_HOST": "int:254",
+ "RT_SCOPE_LINK": "int:253",
+ "RT_SCOPE_NOWHERE": "int:255",
+ "RT_SCOPE_SITE": "int:200",
+ "RT_SCOPE_UNIVERSE": "int:0",
+ "RT_TABLE_COMPAT": "int:252",
+ "RT_TABLE_DEFAULT": "int:253",
+ "RT_TABLE_LOCAL": "int:255",
+ "RT_TABLE_MAIN": "int:254",
+ "RT_TABLE_MAX": "int:4294967295",
+ "RT_TABLE_UNSPEC": "int:0",
+ "RUSAGE_CHILDREN": "int:-1",
+ "RUSAGE_SELF": "int:0",
+ "RUSAGE_THREAD": "int:1",
+ "SCHED_H": "int:1",
+ "SCM_CREDENTIALS": "int:2",
+ "SCM_RIGHTS": "int:1",
+ "SCM_TIMESTAMP": "int:29",
+ "SCM_TIMESTAMPING": "int:37",
+ "SCM_TIMESTAMPING_OPT_STATS": "int:54",
+ "SCM_TIMESTAMPING_PKTINFO": "int:58",
+ "SCM_TIMESTAMPNS": "int:35",
+ "SCM_WIFI_STATUS": "int:41",
+ "SC_2_CHAR_TERM": "int:95",
+ "SC_2_C_BIND": "int:47",
+ "SC_2_C_DEV": "int:48",
+ "SC_2_C_VERSION": "int:96",
+ "SC_2_FORT_DEV": "int:49",
+ "SC_2_FORT_RUN": "int:50",
+ "SC_2_LOCALEDEF": "int:52",
+ "SC_2_PBS": "int:168",
+ "SC_2_PBS_ACCOUNTING": "int:169",
+ "SC_2_PBS_CHECKPOINT": "int:175",
+ "SC_2_PBS_LOCATE": "int:170",
+ "SC_2_PBS_MESSAGE": "int:171",
+ "SC_2_PBS_TRACK": "int:172",
+ "SC_2_SW_DEV": "int:51",
+ "SC_2_UPE": "int:97",
+ "SC_2_VERSION": "int:46",
+ "SC_ADVISORY_INFO": "int:132",
+ "SC_AIO_LISTIO_MAX": "int:23",
+ "SC_AIO_MAX": "int:24",
+ "SC_AIO_PRIO_DELTA_MAX": "int:25",
+ "SC_ARG_MAX": "int:0",
+ "SC_ASYNCHRONOUS_IO": "int:12",
+ "SC_ATEXIT_MAX": "int:87",
+ "SC_AVPHYS_PAGES": "int:86",
+ "SC_BARRIERS": "int:133",
+ "SC_BASE": "int:134",
+ "SC_BC_BASE_MAX": "int:36",
+ "SC_BC_DIM_MAX": "int:37",
+ "SC_BC_SCALE_MAX": "int:38",
+ "SC_BC_STRING_MAX": "int:39",
+ "SC_CHARCLASS_NAME_MAX": "int:45",
+ "SC_CHAR_BIT": "int:101",
+ "SC_CHAR_MAX": "int:102",
+ "SC_CHAR_MIN": "int:103",
+ "SC_CHILD_MAX": "int:1",
+ "SC_CLK_TCK": "int:2",
+ "SC_CLOCK_SELECTION": "int:137",
+ "SC_COLL_WEIGHTS_MAX": "int:40",
+ "SC_CPUTIME": "int:138",
+ "SC_C_LANG_SUPPORT": "int:135",
+ "SC_C_LANG_SUPPORT_R": "int:136",
+ "SC_DELAYTIMER_MAX": "int:26",
+ "SC_DEVICE_IO": "int:140",
+ "SC_DEVICE_SPECIFIC": "int:141",
+ "SC_DEVICE_SPECIFIC_R": "int:142",
+ "SC_EQUIV_CLASS_MAX": "int:41",
+ "SC_EXPR_NEST_MAX": "int:42",
+ "SC_FD_MGMT": "int:143",
+ "SC_FIFO": "int:144",
+ "SC_FILE_ATTRIBUTES": "int:146",
+ "SC_FILE_LOCKING": "int:147",
+ "SC_FILE_SYSTEM": "int:148",
+ "SC_FSYNC": "int:15",
+ "SC_GETGR_R_SIZE_MAX": "int:69",
+ "SC_GETPW_R_SIZE_MAX": "int:70",
+ "SC_HOST_NAME_MAX": "int:180",
+ "SC_INT_MAX": "int:104",
+ "SC_INT_MIN": "int:105",
+ "SC_IOV_MAX": "int:60",
+ "SC_IPV6": "int:235",
+ "SC_JOB_CONTROL": "int:7",
+ "SC_LEVEL1_DCACHE_ASSOC": "int:189",
+ "SC_LEVEL1_DCACHE_LINESIZE": "int:190",
+ "SC_LEVEL1_DCACHE_SIZE": "int:188",
+ "SC_LEVEL1_ICACHE_ASSOC": "int:186",
+ "SC_LEVEL1_ICACHE_LINESIZE": "int:187",
+ "SC_LEVEL1_ICACHE_SIZE": "int:185",
+ "SC_LEVEL2_CACHE_ASSOC": "int:192",
+ "SC_LEVEL2_CACHE_LINESIZE": "int:193",
+ "SC_LEVEL2_CACHE_SIZE": "int:191",
+ "SC_LEVEL3_CACHE_ASSOC": "int:195",
+ "SC_LEVEL3_CACHE_LINESIZE": "int:196",
+ "SC_LEVEL3_CACHE_SIZE": "int:194",
+ "SC_LEVEL4_CACHE_ASSOC": "int:198",
+ "SC_LEVEL4_CACHE_LINESIZE": "int:199",
+ "SC_LEVEL4_CACHE_SIZE": "int:197",
+ "SC_LINE_MAX": "int:43",
+ "SC_LOGIN_NAME_MAX": "int:71",
+ "SC_LONG_BIT": "int:106",
+ "SC_MAPPED_FILES": "int:16",
+ "SC_MB_LEN_MAX": "int:108",
+ "SC_MEMLOCK": "int:17",
+ "SC_MEMLOCK_RANGE": "int:18",
+ "SC_MEMORY_PROTECTION": "int:19",
+ "SC_MESSAGE_PASSING": "int:20",
+ "SC_MONOTONIC_CLOCK": "int:149",
+ "SC_MQ_OPEN_MAX": "int:27",
+ "SC_MQ_PRIO_MAX": "int:28",
+ "SC_MULTI_PROCESS": "int:150",
+ "SC_NETWORKING": "int:152",
+ "SC_NGROUPS_MAX": "int:3",
+ "SC_NL_ARGMAX": "int:119",
+ "SC_NL_LANGMAX": "int:120",
+ "SC_NL_MSGMAX": "int:121",
+ "SC_NL_NMAX": "int:122",
+ "SC_NL_SETMAX": "int:123",
+ "SC_NL_TEXTMAX": "int:124",
+ "SC_NPROCESSORS_CONF": "int:83",
+ "SC_NPROCESSORS_ONLN": "int:84",
+ "SC_NZERO": "int:109",
+ "SC_OPEN_MAX": "int:4",
+ "SC_PAGESIZE": "int:30",
+ "SC_PASS_MAX": "int:88",
+ "SC_PHYS_PAGES": "int:85",
+ "SC_PII": "int:53",
+ "SC_PII_INTERNET": "int:56",
+ "SC_PII_INTERNET_DGRAM": "int:62",
+ "SC_PII_INTERNET_STREAM": "int:61",
+ "SC_PII_OSI": "int:57",
+ "SC_PII_OSI_CLTS": "int:64",
+ "SC_PII_OSI_COTS": "int:63",
+ "SC_PII_OSI_M": "int:65",
+ "SC_PII_SOCKET": "int:55",
+ "SC_PII_XTI": "int:54",
+ "SC_PIPE": "int:145",
+ "SC_POLL": "int:58",
+ "SC_PRIORITIZED_IO": "int:13",
+ "SC_PRIORITY_SCHEDULING": "int:10",
+ "SC_RAW_SOCKETS": "int:236",
+ "SC_READER_WRITER_LOCKS": "int:153",
+ "SC_REALTIME_SIGNALS": "int:9",
+ "SC_REGEXP": "int:155",
+ "SC_REGEX_VERSION": "int:156",
+ "SC_RE_DUP_MAX": "int:44",
+ "SC_RTSIG_MAX": "int:31",
+ "SC_SAVED_IDS": "int:8",
+ "SC_SCHAR_MAX": "int:111",
+ "SC_SCHAR_MIN": "int:112",
+ "SC_SELECT": "int:59",
+ "SC_SEMAPHORES": "int:21",
+ "SC_SEM_NSEMS_MAX": "int:32",
+ "SC_SEM_VALUE_MAX": "int:33",
+ "SC_SHARED_MEMORY_OBJECTS": "int:22",
+ "SC_SHELL": "int:157",
+ "SC_SHRT_MAX": "int:113",
+ "SC_SHRT_MIN": "int:114",
+ "SC_SIGNALS": "int:158",
+ "SC_SIGQUEUE_MAX": "int:34",
+ "SC_SINGLE_PROCESS": "int:151",
+ "SC_SPAWN": "int:159",
+ "SC_SPIN_LOCKS": "int:154",
+ "SC_SPORADIC_SERVER": "int:160",
+ "SC_SSIZE_MAX": "int:110",
+ "SC_SS_REPL_MAX": "int:241",
+ "SC_STREAMS": "int:174",
+ "SC_STREAM_MAX": "int:5",
+ "SC_SYMLOOP_MAX": "int:173",
+ "SC_SYNCHRONIZED_IO": "int:14",
+ "SC_SYSTEM_DATABASE": "int:162",
+ "SC_SYSTEM_DATABASE_R": "int:163",
+ "SC_THREADS": "int:67",
+ "SC_THREAD_ATTR_STACKADDR": "int:77",
+ "SC_THREAD_ATTR_STACKSIZE": "int:78",
+ "SC_THREAD_CPUTIME": "int:139",
+ "SC_THREAD_DESTRUCTOR_ITERATIONS": "int:73",
+ "SC_THREAD_KEYS_MAX": "int:74",
+ "SC_THREAD_PRIORITY_SCHEDULING": "int:79",
+ "SC_THREAD_PRIO_INHERIT": "int:80",
+ "SC_THREAD_PRIO_PROTECT": "int:81",
+ "SC_THREAD_PROCESS_SHARED": "int:82",
+ "SC_THREAD_ROBUST_PRIO_INHERIT": "int:247",
+ "SC_THREAD_ROBUST_PRIO_PROTECT": "int:248",
+ "SC_THREAD_SAFE_FUNCTIONS": "int:68",
+ "SC_THREAD_SPORADIC_SERVER": "int:161",
+ "SC_THREAD_STACK_MIN": "int:75",
+ "SC_THREAD_THREADS_MAX": "int:76",
+ "SC_TIMEOUTS": "int:164",
+ "SC_TIMERS": "int:11",
+ "SC_TIMER_MAX": "int:35",
+ "SC_TRACE": "int:181",
+ "SC_TRACE_EVENT_FILTER": "int:182",
+ "SC_TRACE_EVENT_NAME_MAX": "int:242",
+ "SC_TRACE_INHERIT": "int:183",
+ "SC_TRACE_LOG": "int:184",
+ "SC_TRACE_NAME_MAX": "int:243",
+ "SC_TRACE_SYS_MAX": "int:244",
+ "SC_TRACE_USER_EVENT_MAX": "int:245",
+ "SC_TTY_NAME_MAX": "int:72",
+ "SC_TYPED_MEMORY_OBJECTS": "int:165",
+ "SC_TZNAME_MAX": "int:6",
+ "SC_T_IOV_MAX": "int:66",
+ "SC_UCHAR_MAX": "int:115",
+ "SC_UINT_MAX": "int:116",
+ "SC_UIO_MAXIOV": "int:60",
+ "SC_ULONG_MAX": "int:117",
+ "SC_USER_GROUPS": "int:166",
+ "SC_USER_GROUPS_R": "int:167",
+ "SC_USHRT_MAX": "int:118",
+ "SC_V6_ILP32_OFF32": "int:176",
+ "SC_V6_ILP32_OFFBIG": "int:177",
+ "SC_V6_LP64_OFF64": "int:178",
+ "SC_V6_LPBIG_OFFBIG": "int:179",
+ "SC_V7_ILP32_OFF32": "int:237",
+ "SC_V7_ILP32_OFFBIG": "int:238",
+ "SC_V7_LP64_OFF64": "int:239",
+ "SC_V7_LPBIG_OFFBIG": "int:240",
+ "SC_VERSION": "int:29",
+ "SC_WORD_BIT": "int:107",
+ "SC_XBS5_ILP32_OFF32": "int:125",
+ "SC_XBS5_ILP32_OFFBIG": "int:126",
+ "SC_XBS5_LP64_OFF64": "int:127",
+ "SC_XBS5_LPBIG_OFFBIG": "int:128",
+ "SC_XOPEN_CRYPT": "int:92",
+ "SC_XOPEN_ENH_I18N": "int:93",
+ "SC_XOPEN_LEGACY": "int:129",
+ "SC_XOPEN_REALTIME": "int:130",
+ "SC_XOPEN_REALTIME_THREADS": "int:131",
+ "SC_XOPEN_SHM": "int:94",
+ "SC_XOPEN_STREAMS": "int:246",
+ "SC_XOPEN_UNIX": "int:91",
+ "SC_XOPEN_VERSION": "int:89",
+ "SC_XOPEN_XCU_VERSION": "int:90",
+ "SC_XOPEN_XPG2": "int:98",
+ "SC_XOPEN_XPG3": "int:99",
+ "SC_XOPEN_XPG4": "int:100",
+ "SHUT_RD": "int:0",
+ "SHUT_RDWR": "int:2",
+ "SHUT_WR": "int:1",
+ "SIOCADDDLCI": "int:35200",
+ "SIOCADDMULTI": "int:35121",
+ "SIOCADDRT": "int:35083",
+ "SIOCATMARK": "int:35077",
+ "SIOCDARP": "int:35155",
+ "SIOCDELDLCI": "int:35201",
+ "SIOCDELMULTI": "int:35122",
+ "SIOCDELRT": "int:35084",
+ "SIOCDEVPRIVATE": "int:35312",
+ "SIOCDIFADDR": "int:35126",
+ "SIOCDRARP": "int:35168",
+ "SIOCGARP": "int:35156",
+ "SIOCGIFADDR": "int:35093",
+ "SIOCGIFBR": "int:35136",
+ "SIOCGIFBRDADDR": "int:35097",
+ "SIOCGIFCONF": "int:35090",
+ "SIOCGIFCOUNT": "int:35128",
+ "SIOCGIFDSTADDR": "int:35095",
+ "SIOCGIFENCAP": "int:35109",
+ "SIOCGIFFLAGS": "int:35091",
+ "SIOCGIFHWADDR": "int:35111",
+ "SIOCGIFINDEX": "int:35123",
+ "SIOCGIFMAP": "int:35184",
+ "SIOCGIFMEM": "int:35103",
+ "SIOCGIFMETRIC": "int:35101",
+ "SIOCGIFMTU": "int:35105",
+ "SIOCGIFNAME": "int:35088",
+ "SIOCGIFNETMASK": "int:35099",
+ "SIOCGIFPFLAGS": "int:35125",
+ "SIOCGIFSLAVE": "int:35113",
+ "SIOCGIFTXQLEN": "int:35138",
+ "SIOCGPGRP": "int:35076",
+ "SIOCGRARP": "int:35169",
+ "SIOCGSTAMP": "int:35078",
+ "SIOCGSTAMPNS": "int:35079",
+ "SIOCPROTOPRIVATE": "int:35296",
+ "SIOCRTMSG": "int:35085",
+ "SIOCSARP": "int:35157",
+ "SIOCSIFADDR": "int:35094",
+ "SIOCSIFBR": "int:35137",
+ "SIOCSIFBRDADDR": "int:35098",
+ "SIOCSIFDSTADDR": "int:35096",
+ "SIOCSIFENCAP": "int:35110",
+ "SIOCSIFFLAGS": "int:35092",
+ "SIOCSIFHWADDR": "int:35108",
+ "SIOCSIFHWBROADCAST": "int:35127",
+ "SIOCSIFLINK": "int:35089",
+ "SIOCSIFMAP": "int:35185",
+ "SIOCSIFMEM": "int:35104",
+ "SIOCSIFMETRIC": "int:35102",
+ "SIOCSIFMTU": "int:35106",
+ "SIOCSIFNAME": "int:35107",
+ "SIOCSIFNETMASK": "int:35100",
+ "SIOCSIFPFLAGS": "int:35124",
+ "SIOCSIFSLAVE": "int:35120",
+ "SIOCSIFTXQLEN": "int:35139",
+ "SIOCSPGRP": "int:35074",
+ "SIOCSRARP": "int:35170",
+ "SOCK_CLOEXEC": "int:524288",
+ "SOCK_DCCP": "int:6",
+ "SOCK_DGRAM": "int:2",
+ "SOCK_NONBLOCK": "int:2048",
+ "SOCK_PACKET": "int:10",
+ "SOCK_RAW": "int:3",
+ "SOCK_RDM": "int:4",
+ "SOCK_SEQPACKET": "int:5",
+ "SOCK_STREAM": "int:1",
+ "SOL_AAL": "int:265",
+ "SOL_ALG": "int:279",
+ "SOL_ATM": "int:264",
+ "SOL_BLUETOOTH": "int:274",
+ "SOL_CAIF": "int:278",
+ "SOL_DCCP": "int:269",
+ "SOL_DECNET": "int:261",
+ "SOL_ICMPV6": "int:58",
+ "SOL_IP": "int:0",
+ "SOL_IPV6": "int:41",
+ "SOL_IRDA": "int:266",
+ "SOL_IUCV": "int:277",
+ "SOL_KCM": "int:281",
+ "SOL_LLC": "int:268",
+ "SOL_NETBEUI": "int:267",
+ "SOL_NETLINK": "int:270",
+ "SOL_NFC": "int:280",
+ "SOL_PACKET": "int:263",
+ "SOL_PNPIPE": "int:275",
+ "SOL_PPPOL2TP": "int:273",
+ "SOL_RAW": "int:255",
+ "SOL_RDS": "int:276",
+ "SOL_RXRPC": "int:272",
+ "SOL_SOCKET": "int:1",
+ "SOL_TCP": "int:6",
+ "SOL_TIPC": "int:271",
+ "SOL_TLS": "int:282",
+ "SOL_X25": "int:262",
+ "SOMAXCONN": "int:128",
+ "SO_ACCEPTCONN": "int:30",
+ "SO_ATTACH_BPF": "int:50",
+ "SO_ATTACH_FILTER": "int:26",
+ "SO_ATTACH_REUSEPORT_CBPF": "int:51",
+ "SO_ATTACH_REUSEPORT_EBPF": "int:52",
+ "SO_BINDTODEVICE": "int:25",
+ "SO_BPF_EXTENSIONS": "int:48",
+ "SO_BROADCAST": "int:6",
+ "SO_BSDCOMPAT": "int:14",
+ "SO_BUSY_POLL": "int:46",
+ "SO_CNX_ADVICE": "int:53",
+ "SO_COOKIE": "int:57",
+ "SO_DEBUG": "int:1",
+ "SO_DETACH_BPF": "int:27",
+ "SO_DETACH_FILTER": "int:27",
+ "SO_DOMAIN": "int:39",
+ "SO_DONTROUTE": "int:5",
+ "SO_ERROR": "int:4",
+ "SO_GET_FILTER": "int:26",
+ "SO_INCOMING_CPU": "int:49",
+ "SO_INCOMING_NAPI_ID": "int:56",
+ "SO_KEEPALIVE": "int:9",
+ "SO_LINGER": "int:13",
+ "SO_LOCK_FILTER": "int:44",
+ "SO_MARK": "int:36",
+ "SO_MAX_PACING_RATE": "int:47",
+ "SO_MEMINFO": "int:55",
+ "SO_NOFCS": "int:43",
+ "SO_NO_CHECK": "int:11",
+ "SO_OOBINLINE": "int:10",
+ "SO_PASSCRED": "int:16",
+ "SO_PASSSEC": "int:34",
+ "SO_PEEK_OFF": "int:42",
+ "SO_PEERCRED": "int:17",
+ "SO_PEERGROUPS": "int:59",
+ "SO_PEERNAME": "int:28",
+ "SO_PEERSEC": "int:31",
+ "SO_PRIORITY": "int:12",
+ "SO_PROTOCOL": "int:38",
+ "SO_RCVBUF": "int:8",
+ "SO_RCVBUFFORCE": "int:33",
+ "SO_RCVLOWAT": "int:18",
+ "SO_RCVTIMEO": "int:20",
+ "SO_REUSEADDR": "int:2",
+ "SO_REUSEPORT": "int:15",
+ "SO_RXQ_OVFL": "int:40",
+ "SO_SECURITY_AUTHENTICATION": "int:22",
+ "SO_SECURITY_ENCRYPTION_NETWORK": "int:24",
+ "SO_SECURITY_ENCRYPTION_TRANSPORT": "int:23",
+ "SO_SELECT_ERR_QUEUE": "int:45",
+ "SO_SNDBUF": "int:7",
+ "SO_SNDBUFFORCE": "int:32",
+ "SO_SNDLOWAT": "int:19",
+ "SO_SNDTIMEO": "int:21",
+ "SO_TIMESTAMP": "int:29",
+ "SO_TIMESTAMPING": "int:37",
+ "SO_TIMESTAMPNS": "int:35",
+ "SO_TYPE": "int:3",
+ "SO_WIFI_STATUS": "int:41",
+ "SO_ZEROCOPY": "int:60",
+ "SYS_ACCEPT": "int:43",
+ "SYS_ACCEPT4": "int:288",
+ "SYS_ACCESS": "int:21",
+ "SYS_ACCT": "int:163",
+ "SYS_ADD_KEY": "int:248",
+ "SYS_ADJTIMEX": "int:159",
+ "SYS_AFS_SYSCALL": "int:183",
+ "SYS_ALARM": "int:37",
+ "SYS_ARCH_PRCTL": "int:158",
+ "SYS_BIND": "int:49",
+ "SYS_BPF": "int:321",
+ "SYS_BRK": "int:12",
+ "SYS_CAPGET": "int:125",
+ "SYS_CAPSET": "int:126",
+ "SYS_CHDIR": "int:80",
+ "SYS_CHMOD": "int:90",
+ "SYS_CHOWN": "int:92",
+ "SYS_CHROOT": "int:161",
+ "SYS_CLOCK_ADJTIME": "int:305",
+ "SYS_CLOCK_GETRES": "int:229",
+ "SYS_CLOCK_GETTIME": "int:228",
+ "SYS_CLOCK_NANOSLEEP": "int:230",
+ "SYS_CLOCK_SETTIME": "int:227",
+ "SYS_CLONE": "int:56",
+ "SYS_CLOSE": "int:3",
+ "SYS_CONNECT": "int:42",
+ "SYS_COPY_FILE_RANGE": "int:326",
+ "SYS_CREAT": "int:85",
+ "SYS_CREATE_MODULE": "int:174",
+ "SYS_DELETE_MODULE": "int:176",
+ "SYS_DUP": "int:32",
+ "SYS_DUP2": "int:33",
+ "SYS_DUP3": "int:292",
+ "SYS_EPOLL_CREATE": "int:213",
+ "SYS_EPOLL_CREATE1": "int:291",
+ "SYS_EPOLL_CTL": "int:233",
+ "SYS_EPOLL_CTL_OLD": "int:214",
+ "SYS_EPOLL_PWAIT": "int:281",
+ "SYS_EPOLL_WAIT": "int:232",
+ "SYS_EPOLL_WAIT_OLD": "int:215",
+ "SYS_EVENTFD": "int:284",
+ "SYS_EVENTFD2": "int:290",
+ "SYS_EXECVE": "int:59",
+ "SYS_EXECVEAT": "int:322",
+ "SYS_EXIT": "int:60",
+ "SYS_EXIT_GROUP": "int:231",
+ "SYS_FACCESSAT": "int:269",
+ "SYS_FADVISE64": "int:221",
+ "SYS_FALLOCATE": "int:285",
+ "SYS_FANOTIFY_INIT": "int:300",
+ "SYS_FANOTIFY_MARK": "int:301",
+ "SYS_FCHDIR": "int:81",
+ "SYS_FCHMOD": "int:91",
+ "SYS_FCHMODAT": "int:268",
+ "SYS_FCHOWN": "int:93",
+ "SYS_FCHOWNAT": "int:260",
+ "SYS_FCNTL": "int:72",
+ "SYS_FDATASYNC": "int:75",
+ "SYS_FGETXATTR": "int:193",
+ "SYS_FINIT_MODULE": "int:313",
+ "SYS_FLISTXATTR": "int:196",
+ "SYS_FLOCK": "int:73",
+ "SYS_FORK": "int:57",
+ "SYS_FREMOVEXATTR": "int:199",
+ "SYS_FSETXATTR": "int:190",
+ "SYS_FSTAT": "int:5",
+ "SYS_FSTATFS": "int:138",
+ "SYS_FSYNC": "int:74",
+ "SYS_FTRUNCATE": "int:77",
+ "SYS_FUTEX": "int:202",
+ "SYS_FUTIMESAT": "int:261",
+ "SYS_GETCPU": "int:309",
+ "SYS_GETCWD": "int:79",
+ "SYS_GETDENTS": "int:78",
+ "SYS_GETDENTS64": "int:217",
+ "SYS_GETEGID": "int:108",
+ "SYS_GETEUID": "int:107",
+ "SYS_GETGID": "int:104",
+ "SYS_GETGROUPS": "int:115",
+ "SYS_GETITIMER": "int:36",
+ "SYS_GETPEERNAME": "int:52",
+ "SYS_GETPGID": "int:121",
+ "SYS_GETPGRP": "int:111",
+ "SYS_GETPID": "int:39",
+ "SYS_GETPMSG": "int:181",
+ "SYS_GETPPID": "int:110",
+ "SYS_GETPRIORITY": "int:140",
+ "SYS_GETRANDOM": "int:318",
+ "SYS_GETRESGID": "int:120",
+ "SYS_GETRESUID": "int:118",
+ "SYS_GETRLIMIT": "int:97",
+ "SYS_GETRUSAGE": "int:98",
+ "SYS_GETSID": "int:124",
+ "SYS_GETSOCKNAME": "int:51",
+ "SYS_GETSOCKOPT": "int:55",
+ "SYS_GETTID": "int:186",
+ "SYS_GETTIMEOFDAY": "int:96",
+ "SYS_GETUID": "int:102",
+ "SYS_GETXATTR": "int:191",
+ "SYS_GET_KERNEL_SYMS": "int:177",
+ "SYS_GET_MEMPOLICY": "int:239",
+ "SYS_GET_ROBUST_LIST": "int:274",
+ "SYS_GET_THREAD_AREA": "int:211",
+ "SYS_INIT_MODULE": "int:175",
+ "SYS_INOTIFY_ADD_WATCH": "int:254",
+ "SYS_INOTIFY_INIT": "int:253",
+ "SYS_INOTIFY_INIT1": "int:294",
+ "SYS_INOTIFY_RM_WATCH": "int:255",
+ "SYS_IOCTL": "int:16",
+ "SYS_IOPERM": "int:173",
+ "SYS_IOPL": "int:172",
+ "SYS_IOPRIO_GET": "int:252",
+ "SYS_IOPRIO_SET": "int:251",
+ "SYS_IO_CANCEL": "int:210",
+ "SYS_IO_DESTROY": "int:207",
+ "SYS_IO_GETEVENTS": "int:208",
+ "SYS_IO_SETUP": "int:206",
+ "SYS_IO_SUBMIT": "int:209",
+ "SYS_KCMP": "int:312",
+ "SYS_KEXEC_FILE_LOAD": "int:320",
+ "SYS_KEXEC_LOAD": "int:246",
+ "SYS_KEYCTL": "int:250",
+ "SYS_KILL": "int:62",
+ "SYS_LCHOWN": "int:94",
+ "SYS_LGETXATTR": "int:192",
+ "SYS_LINK": "int:86",
+ "SYS_LINKAT": "int:265",
+ "SYS_LISTEN": "int:50",
+ "SYS_LISTXATTR": "int:194",
+ "SYS_LLISTXATTR": "int:195",
+ "SYS_LOOKUP_DCOOKIE": "int:212",
+ "SYS_LREMOVEXATTR": "int:198",
+ "SYS_LSEEK": "int:8",
+ "SYS_LSETXATTR": "int:189",
+ "SYS_LSTAT": "int:6",
+ "SYS_MADVISE": "int:28",
+ "SYS_MBIND": "int:237",
+ "SYS_MEMBARRIER": "int:324",
+ "SYS_MEMFD_CREATE": "int:319",
+ "SYS_MIGRATE_PAGES": "int:256",
+ "SYS_MINCORE": "int:27",
+ "SYS_MKDIR": "int:83",
+ "SYS_MKDIRAT": "int:258",
+ "SYS_MKNOD": "int:133",
+ "SYS_MKNODAT": "int:259",
+ "SYS_MLOCK": "int:149",
+ "SYS_MLOCK2": "int:325",
+ "SYS_MLOCKALL": "int:151",
+ "SYS_MMAP": "int:9",
+ "SYS_MODIFY_LDT": "int:154",
+ "SYS_MOUNT": "int:165",
+ "SYS_MOVE_PAGES": "int:279",
+ "SYS_MPROTECT": "int:10",
+ "SYS_MQ_GETSETATTR": "int:245",
+ "SYS_MQ_NOTIFY": "int:244",
+ "SYS_MQ_OPEN": "int:240",
+ "SYS_MQ_TIMEDRECEIVE": "int:243",
+ "SYS_MQ_TIMEDSEND": "int:242",
+ "SYS_MQ_UNLINK": "int:241",
+ "SYS_MREMAP": "int:25",
+ "SYS_MSGCTL": "int:71",
+ "SYS_MSGGET": "int:68",
+ "SYS_MSGRCV": "int:70",
+ "SYS_MSGSND": "int:69",
+ "SYS_MSYNC": "int:26",
+ "SYS_MUNLOCK": "int:150",
+ "SYS_MUNLOCKALL": "int:152",
+ "SYS_MUNMAP": "int:11",
+ "SYS_NAME_TO_HANDLE_AT": "int:303",
+ "SYS_NANOSLEEP": "int:35",
+ "SYS_NEWFSTATAT": "int:262",
+ "SYS_NFSSERVCTL": "int:180",
+ "SYS_NMLN": "int:65",
+ "SYS_OPEN": "int:2",
+ "SYS_OPENAT": "int:257",
+ "SYS_OPEN_BY_HANDLE_AT": "int:304",
+ "SYS_PAUSE": "int:34",
+ "SYS_PERF_EVENT_OPEN": "int:298",
+ "SYS_PERSONALITY": "int:135",
+ "SYS_PIPE": "int:22",
+ "SYS_PIPE2": "int:293",
+ "SYS_PIVOT_ROOT": "int:155",
+ "SYS_PKEY_ALLOC": "int:330",
+ "SYS_PKEY_FREE": "int:331",
+ "SYS_PKEY_MPROTECT": "int:329",
+ "SYS_POLL": "int:7",
+ "SYS_PPOLL": "int:271",
+ "SYS_PRCTL": "int:157",
+ "SYS_PREAD64": "int:17",
+ "SYS_PREADV": "int:295",
+ "SYS_PREADV2": "int:327",
+ "SYS_PRLIMIT64": "int:302",
+ "SYS_PROCESS_VM_READV": "int:310",
+ "SYS_PROCESS_VM_WRITEV": "int:311",
+ "SYS_PSELECT6": "int:270",
+ "SYS_PTRACE": "int:101",
+ "SYS_PUTPMSG": "int:182",
+ "SYS_PWRITE64": "int:18",
+ "SYS_PWRITEV": "int:296",
+ "SYS_PWRITEV2": "int:328",
+ "SYS_QUERY_MODULE": "int:178",
+ "SYS_QUOTACTL": "int:179",
+ "SYS_READ": "int:0",
+ "SYS_READAHEAD": "int:187",
+ "SYS_READLINK": "int:89",
+ "SYS_READLINKAT": "int:267",
+ "SYS_READV": "int:19",
+ "SYS_REBOOT": "int:169",
+ "SYS_RECVFROM": "int:45",
+ "SYS_RECVMMSG": "int:299",
+ "SYS_RECVMSG": "int:47",
+ "SYS_REMAP_FILE_PAGES": "int:216",
+ "SYS_REMOVEXATTR": "int:197",
+ "SYS_RENAME": "int:82",
+ "SYS_RENAMEAT": "int:264",
+ "SYS_RENAMEAT2": "int:316",
+ "SYS_REQUEST_KEY": "int:249",
+ "SYS_RESTART_SYSCALL": "int:219",
+ "SYS_RMDIR": "int:84",
+ "SYS_RT_SIGACTION": "int:13",
+ "SYS_RT_SIGPENDING": "int:127",
+ "SYS_RT_SIGPROCMASK": "int:14",
+ "SYS_RT_SIGQUEUEINFO": "int:129",
+ "SYS_RT_SIGRETURN": "int:15",
+ "SYS_RT_SIGSUSPEND": "int:130",
+ "SYS_RT_SIGTIMEDWAIT": "int:128",
+ "SYS_RT_TGSIGQUEUEINFO": "int:297",
+ "SYS_SCHED_GETAFFINITY": "int:204",
+ "SYS_SCHED_GETATTR": "int:315",
+ "SYS_SCHED_GETPARAM": "int:143",
+ "SYS_SCHED_GETSCHEDULER": "int:145",
+ "SYS_SCHED_GET_PRIORITY_MAX": "int:146",
+ "SYS_SCHED_GET_PRIORITY_MIN": "int:147",
+ "SYS_SCHED_RR_GET_INTERVAL": "int:148",
+ "SYS_SCHED_SETAFFINITY": "int:203",
+ "SYS_SCHED_SETATTR": "int:314",
+ "SYS_SCHED_SETPARAM": "int:142",
+ "SYS_SCHED_SETSCHEDULER": "int:144",
+ "SYS_SCHED_YIELD": "int:24",
+ "SYS_SECCOMP": "int:317",
+ "SYS_SECURITY": "int:185",
+ "SYS_SELECT": "int:23",
+ "SYS_SEMCTL": "int:66",
+ "SYS_SEMGET": "int:64",
+ "SYS_SEMOP": "int:65",
+ "SYS_SEMTIMEDOP": "int:220",
+ "SYS_SENDFILE": "int:40",
+ "SYS_SENDMMSG": "int:307",
+ "SYS_SENDMSG": "int:46",
+ "SYS_SENDTO": "int:44",
+ "SYS_SETDOMAINNAME": "int:171",
+ "SYS_SETFSGID": "int:123",
+ "SYS_SETFSUID": "int:122",
+ "SYS_SETGID": "int:106",
+ "SYS_SETGROUPS": "int:116",
+ "SYS_SETHOSTNAME": "int:170",
+ "SYS_SETITIMER": "int:38",
+ "SYS_SETNS": "int:308",
+ "SYS_SETPGID": "int:109",
+ "SYS_SETPRIORITY": "int:141",
+ "SYS_SETREGID": "int:114",
+ "SYS_SETRESGID": "int:119",
+ "SYS_SETRESUID": "int:117",
+ "SYS_SETREUID": "int:113",
+ "SYS_SETRLIMIT": "int:160",
+ "SYS_SETSID": "int:112",
+ "SYS_SETSOCKOPT": "int:54",
+ "SYS_SETTIMEOFDAY": "int:164",
+ "SYS_SETUID": "int:105",
+ "SYS_SETXATTR": "int:188",
+ "SYS_SET_MEMPOLICY": "int:238",
+ "SYS_SET_ROBUST_LIST": "int:273",
+ "SYS_SET_THREAD_AREA": "int:205",
+ "SYS_SET_TID_ADDRESS": "int:218",
+ "SYS_SHMAT": "int:30",
+ "SYS_SHMCTL": "int:31",
+ "SYS_SHMDT": "int:67",
+ "SYS_SHMGET": "int:29",
+ "SYS_SHUTDOWN": "int:48",
+ "SYS_SIGALTSTACK": "int:131",
+ "SYS_SIGNALFD": "int:282",
+ "SYS_SIGNALFD4": "int:289",
+ "SYS_SOCKET": "int:41",
+ "SYS_SOCKETPAIR": "int:53",
+ "SYS_SPLICE": "int:275",
+ "SYS_STAT": "int:4",
+ "SYS_STATFS": "int:137",
+ "SYS_STATX": "int:332",
+ "SYS_SWAPOFF": "int:168",
+ "SYS_SWAPON": "int:167",
+ "SYS_SYMLINK": "int:88",
+ "SYS_SYMLINKAT": "int:266",
+ "SYS_SYNC": "int:162",
+ "SYS_SYNCFS": "int:306",
+ "SYS_SYNC_FILE_RANGE": "int:277",
+ "SYS_SYSFS": "int:139",
+ "SYS_SYSINFO": "int:99",
+ "SYS_SYSLOG": "int:103",
+ "SYS_TEE": "int:276",
+ "SYS_TGKILL": "int:234",
+ "SYS_TIME": "int:201",
+ "SYS_TIMERFD_CREATE": "int:283",
+ "SYS_TIMERFD_GETTIME": "int:287",
+ "SYS_TIMERFD_SETTIME": "int:286",
+ "SYS_TIMER_CREATE": "int:222",
+ "SYS_TIMER_DELETE": "int:226",
+ "SYS_TIMER_GETOVERRUN": "int:225",
+ "SYS_TIMER_GETTIME": "int:224",
+ "SYS_TIMER_SETTIME": "int:223",
+ "SYS_TIMES": "int:100",
+ "SYS_TKILL": "int:200",
+ "SYS_TRUNCATE": "int:76",
+ "SYS_TUXCALL": "int:184",
+ "SYS_UMASK": "int:95",
+ "SYS_UMOUNT2": "int:166",
+ "SYS_UNAME": "int:63",
+ "SYS_UNLINK": "int:87",
+ "SYS_UNLINKAT": "int:263",
+ "SYS_UNSHARE": "int:272",
+ "SYS_USELIB": "int:134",
+ "SYS_USERFAULTFD": "int:323",
+ "SYS_USTAT": "int:136",
+ "SYS_UTIME": "int:132",
+ "SYS_UTIMENSAT": "int:280",
+ "SYS_UTIMES": "int:235",
+ "SYS_VFORK": "int:58",
+ "SYS_VHANGUP": "int:153",
+ "SYS_VMSPLICE": "int:278",
+ "SYS_VSERVER": "int:236",
+ "SYS_WAIT4": "int:61",
+ "SYS_WAITID": "int:247",
+ "SYS_WRITE": "int:1",
+ "SYS_WRITEV": "int:20",
+ "SYS__SYSCTL": "int:156",
+ "S_BLKSIZE": "int:512",
+ "S_IEXEC": "int:64",
+ "S_IFBLK": "int:24576",
+ "S_IFCHR": "int:8192",
+ "S_IFDIR": "int:16384",
+ "S_IFIFO": "int:4096",
+ "S_IFLNK": "int:40960",
+ "S_IFMT": "int:61440",
+ "S_IFREG": "int:32768",
+ "S_IFSOCK": "int:49152",
+ "S_IREAD": "int:256",
+ "S_IRGRP": "int:32",
+ "S_IROTH": "int:4",
+ "S_IRUSR": "int:256",
+ "S_IRWXG": "int:56",
+ "S_IRWXO": "int:7",
+ "S_IRWXU": "int:448",
+ "S_ISGID": "int:1024",
+ "S_ISUID": "int:2048",
+ "S_ISVTX": "int:512",
+ "S_IWGRP": "int:16",
+ "S_IWOTH": "int:2",
+ "S_IWRITE": "int:128",
+ "S_IWUSR": "int:128",
+ "S_IXGRP": "int:8",
+ "S_IXOTH": "int:1",
+ "S_IXUSR": "int:64",
+ "SizeofCmsghdr": "int:16",
+ "SizeofICMPv6Filter": "int:32",
+ "SizeofIPMreq": "int:8",
+ "SizeofIPMreqn": "int:12",
+ "SizeofIPv6MTUInfo": "int:32",
+ "SizeofIPv6Mreq": "int:20",
+ "SizeofIfAddrmsg": "int:8",
+ "SizeofIfInfomsg": "int:16",
+ "SizeofInet4Pktinfo": "int:12",
+ "SizeofInet6Pktinfo": "int:20",
+ "SizeofInotifyEvent": "int:16",
+ "SizeofLinger": "int:8",
+ "SizeofMsghdr": "int:56",
+ "SizeofNlAttr": "int:4",
+ "SizeofNlMsgerr": "int:20",
+ "SizeofNlMsghdr": "int:16",
+ "SizeofRtAttr": "int:4",
+ "SizeofRtGenmsg": "int:1",
+ "SizeofRtMsg": "int:12",
+ "SizeofRtNexthop": "int:8",
+ "SizeofSockFilter": "int:8",
+ "SizeofSockFprog": "int:16",
+ "SizeofSockaddrAny": "int:108",
+ "SizeofSockaddrInet4": "int:16",
+ "SizeofSockaddrInet6": "int:28",
+ "SizeofSockaddrLinklayer": "int:20",
+ "SizeofSockaddrNetlink": "int:12",
+ "SizeofSockaddrUnix": "int:110",
+ "SizeofUcred": "int:12",
+ "TABDLY": "int:6144",
+ "TCGETA": "int:21509",
+ "TCGETS": "int:21505",
+ "TCGETX": "int:21554",
+ "TCIFLUSH": "int:0",
+ "TCIOFF": "int:2",
+ "TCIOFLUSH": "int:2",
+ "TCION": "int:3",
+ "TCOFLUSH": "int:1",
+ "TCOOFF": "int:0",
+ "TCOON": "int:1",
+ "TCP_CA_CWR": "int:2",
+ "TCP_CA_Disorder": "int:1",
+ "TCP_CA_Loss": "int:4",
+ "TCP_CA_Open": "int:0",
+ "TCP_CA_Recovery": "int:3",
+ "TCP_CC_INFO": "int:26",
+ "TCP_CLOSE": "int:7",
+ "TCP_CLOSE_WAIT": "int:8",
+ "TCP_CLOSING": "int:11",
+ "TCP_CONGESTION": "int:13",
+ "TCP_COOKIE_IN_ALWAYS": "int:1",
+ "TCP_COOKIE_MAX": "int:16",
+ "TCP_COOKIE_MIN": "int:8",
+ "TCP_COOKIE_OUT_NEVER": "int:2",
+ "TCP_COOKIE_PAIR_SIZE": "int:32",
+ "TCP_COOKIE_TRANSACTIONS": "int:15",
+ "TCP_CORK": "int:3",
+ "TCP_DEFER_ACCEPT": "int:9",
+ "TCP_ESTABLISHED": "int:1",
+ "TCP_FASTOPEN": "int:23",
+ "TCP_FASTOPEN_CONNECT": "int:30",
+ "TCP_FIN_WAIT1": "int:4",
+ "TCP_FIN_WAIT2": "int:5",
+ "TCP_INFO": "int:11",
+ "TCP_KEEPCNT": "int:6",
+ "TCP_KEEPIDLE": "int:4",
+ "TCP_KEEPINTVL": "int:5",
+ "TCP_LAST_ACK": "int:9",
+ "TCP_LINGER2": "int:8",
+ "TCP_LISTEN": "int:10",
+ "TCP_MAXSEG": "int:2",
+ "TCP_MAXWIN": "int:65535",
+ "TCP_MAX_WINSHIFT": "int:14",
+ "TCP_MD5SIG": "int:14",
+ "TCP_MD5SIG_EXT": "int:32",
+ "TCP_MD5SIG_FLAG_PREFIX": "int:1",
+ "TCP_MD5SIG_MAXKEYLEN": "int:80",
+ "TCP_MSS": "int:512",
+ "TCP_MSS_DEFAULT": "int:536",
+ "TCP_MSS_DESIRED": "int:1220",
+ "TCP_NODELAY": "int:1",
+ "TCP_NOTSENT_LOWAT": "int:25",
+ "TCP_NO_QUEUE": "int:0",
+ "TCP_QUEUES_NR": "int:3",
+ "TCP_QUEUE_SEQ": "int:21",
+ "TCP_QUICKACK": "int:12",
+ "TCP_RECV_QUEUE": "int:1",
+ "TCP_REPAIR": "int:19",
+ "TCP_REPAIR_OPTIONS": "int:22",
+ "TCP_REPAIR_QUEUE": "int:20",
+ "TCP_REPAIR_WINDOW": "int:29",
+ "TCP_SAVED_SYN": "int:28",
+ "TCP_SAVE_SYN": "int:27",
+ "TCP_SEND_QUEUE": "int:2",
+ "TCP_SYNCNT": "int:7",
+ "TCP_SYN_RECV": "int:3",
+ "TCP_SYN_SENT": "int:2",
+ "TCP_S_DATA_IN": "int:4",
+ "TCP_S_DATA_OUT": "int:8",
+ "TCP_THIN_DUPACK": "int:17",
+ "TCP_THIN_LINEAR_TIMEOUTS": "int:16",
+ "TCP_TIMESTAMP": "int:24",
+ "TCP_TIME_WAIT": "int:6",
+ "TCP_ULP": "int:31",
+ "TCP_USER_TIMEOUT": "int:18",
+ "TCP_WINDOW_CLAMP": "int:10",
+ "TCSADRAIN": "int:1",
+ "TCSAFLUSH": "int:2",
+ "TCSANOW": "int:0",
+ "TCSETA": "int:21510",
+ "TCSETAF": "int:21512",
+ "TCSETAW": "int:21511",
+ "TCSETS": "int:21506",
+ "TCSETSF": "int:21508",
+ "TCSETSW": "int:21507",
+ "TCSETX": "int:21555",
+ "TCSETXF": "int:21556",
+ "TCSETXW": "int:21557",
+ "TIOCCBRK": "int:21544",
+ "TIOCCONS": "int:21533",
+ "TIOCEXCL": "int:21516",
+ "TIOCGDEV": "int:2147767346",
+ "TIOCGETD": "int:21540",
+ "TIOCGICOUNT": "int:21597",
+ "TIOCGLCKTRMIOS": "int:21590",
+ "TIOCGPGRP": "int:21519",
+ "TIOCGPTN": "int:2147767344",
+ "TIOCGRS485": "int:21550",
+ "TIOCGSERIAL": "int:21534",
+ "TIOCGSID": "int:21545",
+ "TIOCGSOFTCAR": "int:21529",
+ "TIOCGWINSZ": "int:21523",
+ "TIOCINQ": "int:21531",
+ "TIOCLINUX": "int:21532",
+ "TIOCMBIC": "int:21527",
+ "TIOCMBIS": "int:21526",
+ "TIOCMGET": "int:21525",
+ "TIOCMIWAIT": "int:21596",
+ "TIOCMSET": "int:21528",
+ "TIOCM_CAR": "int:64",
+ "TIOCM_CD": "int:64",
+ "TIOCM_CTS": "int:32",
+ "TIOCM_DSR": "int:256",
+ "TIOCM_DTR": "int:2",
+ "TIOCM_LE": "int:1",
+ "TIOCM_RI": "int:128",
+ "TIOCM_RNG": "int:128",
+ "TIOCM_RTS": "int:4",
+ "TIOCM_SR": "int:16",
+ "TIOCM_ST": "int:8",
+ "TIOCNOTTY": "int:21538",
+ "TIOCNXCL": "int:21517",
+ "TIOCOUTQ": "int:21521",
+ "TIOCPKT": "int:21536",
+ "TIOCPKT_DATA": "int:0",
+ "TIOCPKT_DOSTOP": "int:32",
+ "TIOCPKT_FLUSHREAD": "int:1",
+ "TIOCPKT_FLUSHWRITE": "int:2",
+ "TIOCPKT_IOCTL": "int:64",
+ "TIOCPKT_NOSTOP": "int:16",
+ "TIOCPKT_START": "int:8",
+ "TIOCPKT_STOP": "int:4",
+ "TIOCSBRK": "int:21543",
+ "TIOCSCTTY": "int:21518",
+ "TIOCSERCONFIG": "int:21587",
+ "TIOCSERGETLSR": "int:21593",
+ "TIOCSERGETMULTI": "int:21594",
+ "TIOCSERGSTRUCT": "int:21592",
+ "TIOCSERGWILD": "int:21588",
+ "TIOCSERSETMULTI": "int:21595",
+ "TIOCSERSWILD": "int:21589",
+ "TIOCSER_TEMT": "int:1",
+ "TIOCSETD": "int:21539",
+ "TIOCSIG": "int:1074025526",
+ "TIOCSLCKTRMIOS": "int:21591",
+ "TIOCSPGRP": "int:21520",
+ "TIOCSPTLCK": "int:1074025521",
+ "TIOCSRS485": "int:21551",
+ "TIOCSSERIAL": "int:21535",
+ "TIOCSSOFTCAR": "int:21530",
+ "TIOCSTI": "int:21522",
+ "TIOCSWINSZ": "int:21524",
+ "TIOCVHANGUP": "int:21559",
+ "TOSTOP": "int:256",
+ "TUNATTACHFILTER": "int:1074812117",
+ "TUNDETACHFILTER": "int:1074812118",
+ "TUNGETFEATURES": "int:2147767503",
+ "TUNGETFILTER": "int:2148553947",
+ "TUNGETIFF": "int:2147767506",
+ "TUNGETSNDBUF": "int:2147767507",
+ "TUNGETVNETHDRSZ": "int:2147767511",
+ "TUNSETDEBUG": "int:1074025673",
+ "TUNSETGROUP": "int:1074025678",
+ "TUNSETIFF": "int:1074025674",
+ "TUNSETIFINDEX": "int:1074025690",
+ "TUNSETLINK": "int:1074025677",
+ "TUNSETNOCSUM": "int:1074025672",
+ "TUNSETOFFLOAD": "int:1074025680",
+ "TUNSETOWNER": "int:1074025676",
+ "TUNSETPERSIST": "int:1074025675",
+ "TUNSETQUEUE": "int:1074025689",
+ "TUNSETSNDBUF": "int:1074025684",
+ "TUNSETTXFILTER": "int:1074025681",
+ "TUNSETVNETHDRSZ": "int:1074025688",
+ "VDISCARD": "int:13",
+ "VEOF": "int:4",
+ "VEOL": "int:11",
+ "VEOL2": "int:16",
+ "VERASE": "int:2",
+ "VINTR": "int:0",
+ "VKILL": "int:3",
+ "VLNEXT": "int:15",
+ "VMIN": "int:6",
+ "VQUIT": "int:1",
+ "VREPRINT": "int:12",
+ "VSTART": "int:8",
+ "VSTOP": "int:9",
+ "VSUSP": "int:10",
+ "VTDLY": "int:16384",
+ "VTIME": "int:5",
+ "VWERASE": "int:14",
+ "WAIT_ANY": "int:-1",
+ "WAIT_MYPGRP": "int:0",
+ "WALL": "int:1073741824",
+ "WCHAR_MAX": "int:2147483647",
+ "WCHAR_MIN": "int:-2147483648",
+ "WCHAR_WIDTH": "int:32",
+ "WCONTINUED": "int:8",
+ "WCOREFLAG": "int:128",
+ "WEXITED": "int:4",
+ "WINT_MAX": "int:4294967295",
+ "WINT_MIN": "int:0",
+ "WINT_WIDTH": "int:32",
+ "WNOHANG": "int:1",
+ "WNOWAIT": "int:16777216",
+ "WORD_BIT": "int:32",
+ "WSTOPPED": "int:2",
+ "WUNTRACED": "int:2",
+ "W_OK": "int:2",
+ "XCASE": "int:4",
+ },
+ }
+}
+
+// --------------- proxy for syscall.Conn ---------------
+type P_syscall_Conn struct {
+ Object interface{}
+ SyscallConn_ func(interface{}) (syscall.RawConn, error)
+}
+func (P *P_syscall_Conn) SyscallConn() (syscall.RawConn, error) {
+ return P.SyscallConn_(P.Object)
+}
+
+// --------------- proxy for syscall.RawConn ---------------
+type P_syscall_RawConn struct {
+ Object interface{}
+ Control_ func(_proxy_obj_ interface{}, f func(fd uintptr)) error
+ Read_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+ Write_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+}
+func (P *P_syscall_RawConn) Control(f func(fd uintptr)) error {
+ return P.Control_(P.Object, f)
+}
+func (P *P_syscall_RawConn) Read(f func(fd uintptr) (done bool)) error {
+ return P.Read_(P.Object, f)
+}
+func (P *P_syscall_RawConn) Write(f func(fd uintptr) (done bool)) error {
+ return P.Write_(P.Object, f)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_amd64.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_amd64.go
new file mode 100644
index 0000000..f0bdbd8
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_amd64.go
@@ -0,0 +1,6089 @@
+// +build gccgo
+
+// this file was generated by gomacro command: import _b "syscall"
+// DO NOT EDIT! Any change will be lost when the file is re-generated
+
+package syscall
+
+import (
+ . "reflect"
+ "syscall"
+)
+
+// reflection: allow interpreted code to import "syscall"
+func init() {
+ Packages["syscall"] = Package{
+ Binds: map[string]Value{
+ "AF_ALG": ValueOf(syscall.AF_ALG),
+ "AF_APPLETALK": ValueOf(syscall.AF_APPLETALK),
+ "AF_ASH": ValueOf(syscall.AF_ASH),
+ "AF_ATMPVC": ValueOf(syscall.AF_ATMPVC),
+ "AF_ATMSVC": ValueOf(syscall.AF_ATMSVC),
+ "AF_AX25": ValueOf(syscall.AF_AX25),
+ "AF_BLUETOOTH": ValueOf(syscall.AF_BLUETOOTH),
+ "AF_BRIDGE": ValueOf(syscall.AF_BRIDGE),
+ "AF_CAIF": ValueOf(syscall.AF_CAIF),
+ "AF_CAN": ValueOf(syscall.AF_CAN),
+ "AF_DECnet": ValueOf(syscall.AF_DECnet),
+ "AF_ECONET": ValueOf(syscall.AF_ECONET),
+ "AF_FILE": ValueOf(syscall.AF_FILE),
+ "AF_IB": ValueOf(syscall.AF_IB),
+ "AF_IEEE802154": ValueOf(syscall.AF_IEEE802154),
+ "AF_INET": ValueOf(syscall.AF_INET),
+ "AF_INET6": ValueOf(syscall.AF_INET6),
+ "AF_IPX": ValueOf(syscall.AF_IPX),
+ "AF_IRDA": ValueOf(syscall.AF_IRDA),
+ "AF_ISDN": ValueOf(syscall.AF_ISDN),
+ "AF_IUCV": ValueOf(syscall.AF_IUCV),
+ "AF_KCM": ValueOf(syscall.AF_KCM),
+ "AF_KEY": ValueOf(syscall.AF_KEY),
+ "AF_LLC": ValueOf(syscall.AF_LLC),
+ "AF_LOCAL": ValueOf(syscall.AF_LOCAL),
+ "AF_MAX": ValueOf(syscall.AF_MAX),
+ "AF_MPLS": ValueOf(syscall.AF_MPLS),
+ "AF_NETBEUI": ValueOf(syscall.AF_NETBEUI),
+ "AF_NETLINK": ValueOf(syscall.AF_NETLINK),
+ "AF_NETROM": ValueOf(syscall.AF_NETROM),
+ "AF_NFC": ValueOf(syscall.AF_NFC),
+ "AF_PACKET": ValueOf(syscall.AF_PACKET),
+ "AF_PHONET": ValueOf(syscall.AF_PHONET),
+ "AF_PPPOX": ValueOf(syscall.AF_PPPOX),
+ "AF_QIPCRTR": ValueOf(syscall.AF_QIPCRTR),
+ "AF_RDS": ValueOf(syscall.AF_RDS),
+ "AF_ROSE": ValueOf(syscall.AF_ROSE),
+ "AF_ROUTE": ValueOf(syscall.AF_ROUTE),
+ "AF_RXRPC": ValueOf(syscall.AF_RXRPC),
+ "AF_SECURITY": ValueOf(syscall.AF_SECURITY),
+ "AF_SMC": ValueOf(syscall.AF_SMC),
+ "AF_SNA": ValueOf(syscall.AF_SNA),
+ "AF_TIPC": ValueOf(syscall.AF_TIPC),
+ "AF_UNIX": ValueOf(syscall.AF_UNIX),
+ "AF_UNSPEC": ValueOf(syscall.AF_UNSPEC),
+ "AF_VSOCK": ValueOf(syscall.AF_VSOCK),
+ "AF_WANPIPE": ValueOf(syscall.AF_WANPIPE),
+ "AF_X25": ValueOf(syscall.AF_X25),
+ "AI_ADDRCONFIG": ValueOf(syscall.AI_ADDRCONFIG),
+ "AI_ALL": ValueOf(syscall.AI_ALL),
+ "AI_CANONIDN": ValueOf(syscall.AI_CANONIDN),
+ "AI_CANONNAME": ValueOf(syscall.AI_CANONNAME),
+ "AI_IDN": ValueOf(syscall.AI_IDN),
+ "AI_IDN_ALLOW_UNASSIGNED": ValueOf(syscall.AI_IDN_ALLOW_UNASSIGNED),
+ "AI_IDN_USE_STD3_ASCII_RULES": ValueOf(syscall.AI_IDN_USE_STD3_ASCII_RULES),
+ "AI_NUMERICHOST": ValueOf(syscall.AI_NUMERICHOST),
+ "AI_NUMERICSERV": ValueOf(syscall.AI_NUMERICSERV),
+ "AI_PASSIVE": ValueOf(syscall.AI_PASSIVE),
+ "AI_V4MAPPED": ValueOf(syscall.AI_V4MAPPED),
+ "ARCH": ValueOf(syscall.ARCH),
+ "ARPHRD_ADAPT": ValueOf(syscall.ARPHRD_ADAPT),
+ "ARPHRD_APPLETLK": ValueOf(syscall.ARPHRD_APPLETLK),
+ "ARPHRD_ARCNET": ValueOf(syscall.ARPHRD_ARCNET),
+ "ARPHRD_ASH": ValueOf(syscall.ARPHRD_ASH),
+ "ARPHRD_ATM": ValueOf(syscall.ARPHRD_ATM),
+ "ARPHRD_AX25": ValueOf(syscall.ARPHRD_AX25),
+ "ARPHRD_BIF": ValueOf(syscall.ARPHRD_BIF),
+ "ARPHRD_CHAOS": ValueOf(syscall.ARPHRD_CHAOS),
+ "ARPHRD_CISCO": ValueOf(syscall.ARPHRD_CISCO),
+ "ARPHRD_CSLIP": ValueOf(syscall.ARPHRD_CSLIP),
+ "ARPHRD_CSLIP6": ValueOf(syscall.ARPHRD_CSLIP6),
+ "ARPHRD_DDCMP": ValueOf(syscall.ARPHRD_DDCMP),
+ "ARPHRD_DLCI": ValueOf(syscall.ARPHRD_DLCI),
+ "ARPHRD_ECONET": ValueOf(syscall.ARPHRD_ECONET),
+ "ARPHRD_EETHER": ValueOf(syscall.ARPHRD_EETHER),
+ "ARPHRD_ETHER": ValueOf(syscall.ARPHRD_ETHER),
+ "ARPHRD_EUI64": ValueOf(syscall.ARPHRD_EUI64),
+ "ARPHRD_FCAL": ValueOf(syscall.ARPHRD_FCAL),
+ "ARPHRD_FCFABRIC": ValueOf(syscall.ARPHRD_FCFABRIC),
+ "ARPHRD_FCPL": ValueOf(syscall.ARPHRD_FCPL),
+ "ARPHRD_FCPP": ValueOf(syscall.ARPHRD_FCPP),
+ "ARPHRD_FDDI": ValueOf(syscall.ARPHRD_FDDI),
+ "ARPHRD_FRAD": ValueOf(syscall.ARPHRD_FRAD),
+ "ARPHRD_HDLC": ValueOf(syscall.ARPHRD_HDLC),
+ "ARPHRD_HIPPI": ValueOf(syscall.ARPHRD_HIPPI),
+ "ARPHRD_HWX25": ValueOf(syscall.ARPHRD_HWX25),
+ "ARPHRD_IEEE1394": ValueOf(syscall.ARPHRD_IEEE1394),
+ "ARPHRD_IEEE802": ValueOf(syscall.ARPHRD_IEEE802),
+ "ARPHRD_IEEE80211": ValueOf(syscall.ARPHRD_IEEE80211),
+ "ARPHRD_IEEE80211_PRISM": ValueOf(syscall.ARPHRD_IEEE80211_PRISM),
+ "ARPHRD_IEEE80211_RADIOTAP": ValueOf(syscall.ARPHRD_IEEE80211_RADIOTAP),
+ "ARPHRD_IEEE802154": ValueOf(syscall.ARPHRD_IEEE802154),
+ "ARPHRD_IEEE802154_PHY": ValueOf(syscall.ARPHRD_IEEE802154_PHY),
+ "ARPHRD_IEEE802_TR": ValueOf(syscall.ARPHRD_IEEE802_TR),
+ "ARPHRD_INFINIBAND": ValueOf(syscall.ARPHRD_INFINIBAND),
+ "ARPHRD_IPDDP": ValueOf(syscall.ARPHRD_IPDDP),
+ "ARPHRD_IPGRE": ValueOf(syscall.ARPHRD_IPGRE),
+ "ARPHRD_IRDA": ValueOf(syscall.ARPHRD_IRDA),
+ "ARPHRD_LAPB": ValueOf(syscall.ARPHRD_LAPB),
+ "ARPHRD_LOCALTLK": ValueOf(syscall.ARPHRD_LOCALTLK),
+ "ARPHRD_LOOPBACK": ValueOf(syscall.ARPHRD_LOOPBACK),
+ "ARPHRD_METRICOM": ValueOf(syscall.ARPHRD_METRICOM),
+ "ARPHRD_NETROM": ValueOf(syscall.ARPHRD_NETROM),
+ "ARPHRD_NONE": ValueOf(syscall.ARPHRD_NONE),
+ "ARPHRD_PIMREG": ValueOf(syscall.ARPHRD_PIMREG),
+ "ARPHRD_PPP": ValueOf(syscall.ARPHRD_PPP),
+ "ARPHRD_PRONET": ValueOf(syscall.ARPHRD_PRONET),
+ "ARPHRD_RAWHDLC": ValueOf(syscall.ARPHRD_RAWHDLC),
+ "ARPHRD_RAWIP": ValueOf(syscall.ARPHRD_RAWIP),
+ "ARPHRD_ROSE": ValueOf(syscall.ARPHRD_ROSE),
+ "ARPHRD_RSRVD": ValueOf(syscall.ARPHRD_RSRVD),
+ "ARPHRD_SIT": ValueOf(syscall.ARPHRD_SIT),
+ "ARPHRD_SKIP": ValueOf(syscall.ARPHRD_SKIP),
+ "ARPHRD_SLIP": ValueOf(syscall.ARPHRD_SLIP),
+ "ARPHRD_SLIP6": ValueOf(syscall.ARPHRD_SLIP6),
+ "ARPHRD_TUNNEL": ValueOf(syscall.ARPHRD_TUNNEL),
+ "ARPHRD_TUNNEL6": ValueOf(syscall.ARPHRD_TUNNEL6),
+ "ARPHRD_VOID": ValueOf(syscall.ARPHRD_VOID),
+ "ARPHRD_X25": ValueOf(syscall.ARPHRD_X25),
+ "Accept": ValueOf(syscall.Accept),
+ "Accept4": ValueOf(syscall.Accept4),
+ "Access": ValueOf(syscall.Access),
+ "Acct": ValueOf(syscall.Acct),
+ "Adjtimex": ValueOf(syscall.Adjtimex),
+ "AttachLsf": ValueOf(syscall.AttachLsf),
+ "B0": ValueOf(syscall.B0),
+ "B1000000": ValueOf(syscall.B1000000),
+ "B110": ValueOf(syscall.B110),
+ "B115200": ValueOf(syscall.B115200),
+ "B1152000": ValueOf(syscall.B1152000),
+ "B1200": ValueOf(syscall.B1200),
+ "B134": ValueOf(syscall.B134),
+ "B150": ValueOf(syscall.B150),
+ "B1500000": ValueOf(syscall.B1500000),
+ "B1800": ValueOf(syscall.B1800),
+ "B19200": ValueOf(syscall.B19200),
+ "B200": ValueOf(syscall.B200),
+ "B2000000": ValueOf(syscall.B2000000),
+ "B230400": ValueOf(syscall.B230400),
+ "B2400": ValueOf(syscall.B2400),
+ "B2500000": ValueOf(syscall.B2500000),
+ "B300": ValueOf(syscall.B300),
+ "B3000000": ValueOf(syscall.B3000000),
+ "B3500000": ValueOf(syscall.B3500000),
+ "B38400": ValueOf(syscall.B38400),
+ "B4000000": ValueOf(syscall.B4000000),
+ "B460800": ValueOf(syscall.B460800),
+ "B4800": ValueOf(syscall.B4800),
+ "B50": ValueOf(syscall.B50),
+ "B500000": ValueOf(syscall.B500000),
+ "B57600": ValueOf(syscall.B57600),
+ "B576000": ValueOf(syscall.B576000),
+ "B600": ValueOf(syscall.B600),
+ "B75": ValueOf(syscall.B75),
+ "B921600": ValueOf(syscall.B921600),
+ "B9600": ValueOf(syscall.B9600),
+ "BPF_A": ValueOf(syscall.BPF_A),
+ "BPF_ABS": ValueOf(syscall.BPF_ABS),
+ "BPF_ADD": ValueOf(syscall.BPF_ADD),
+ "BPF_ALU": ValueOf(syscall.BPF_ALU),
+ "BPF_AND": ValueOf(syscall.BPF_AND),
+ "BPF_B": ValueOf(syscall.BPF_B),
+ "BPF_DIV": ValueOf(syscall.BPF_DIV),
+ "BPF_H": ValueOf(syscall.BPF_H),
+ "BPF_IMM": ValueOf(syscall.BPF_IMM),
+ "BPF_IND": ValueOf(syscall.BPF_IND),
+ "BPF_JA": ValueOf(syscall.BPF_JA),
+ "BPF_JEQ": ValueOf(syscall.BPF_JEQ),
+ "BPF_JGE": ValueOf(syscall.BPF_JGE),
+ "BPF_JGT": ValueOf(syscall.BPF_JGT),
+ "BPF_JMP": ValueOf(syscall.BPF_JMP),
+ "BPF_JSET": ValueOf(syscall.BPF_JSET),
+ "BPF_K": ValueOf(syscall.BPF_K),
+ "BPF_LD": ValueOf(syscall.BPF_LD),
+ "BPF_LDX": ValueOf(syscall.BPF_LDX),
+ "BPF_LEN": ValueOf(syscall.BPF_LEN),
+ "BPF_LL_OFF": ValueOf(syscall.BPF_LL_OFF),
+ "BPF_LSH": ValueOf(syscall.BPF_LSH),
+ "BPF_MAJOR_VERSION": ValueOf(syscall.BPF_MAJOR_VERSION),
+ "BPF_MAXINSNS": ValueOf(syscall.BPF_MAXINSNS),
+ "BPF_MEM": ValueOf(syscall.BPF_MEM),
+ "BPF_MEMWORDS": ValueOf(syscall.BPF_MEMWORDS),
+ "BPF_MINOR_VERSION": ValueOf(syscall.BPF_MINOR_VERSION),
+ "BPF_MISC": ValueOf(syscall.BPF_MISC),
+ "BPF_MOD": ValueOf(syscall.BPF_MOD),
+ "BPF_MSH": ValueOf(syscall.BPF_MSH),
+ "BPF_MUL": ValueOf(syscall.BPF_MUL),
+ "BPF_NEG": ValueOf(syscall.BPF_NEG),
+ "BPF_NET_OFF": ValueOf(syscall.BPF_NET_OFF),
+ "BPF_OR": ValueOf(syscall.BPF_OR),
+ "BPF_RET": ValueOf(syscall.BPF_RET),
+ "BPF_RSH": ValueOf(syscall.BPF_RSH),
+ "BPF_ST": ValueOf(syscall.BPF_ST),
+ "BPF_STX": ValueOf(syscall.BPF_STX),
+ "BPF_SUB": ValueOf(syscall.BPF_SUB),
+ "BPF_TAX": ValueOf(syscall.BPF_TAX),
+ "BPF_TXA": ValueOf(syscall.BPF_TXA),
+ "BPF_W": ValueOf(syscall.BPF_W),
+ "BPF_X": ValueOf(syscall.BPF_X),
+ "BPF_XOR": ValueOf(syscall.BPF_XOR),
+ "BRKINT": ValueOf(syscall.BRKINT),
+ "BSDLY": ValueOf(syscall.BSDLY),
+ "Bind": ValueOf(syscall.Bind),
+ "BindToDevice": ValueOf(syscall.BindToDevice),
+ "BytePtrFromString": ValueOf(syscall.BytePtrFromString),
+ "ByteSliceFromString": ValueOf(syscall.ByteSliceFromString),
+ "CBAUD": ValueOf(syscall.CBAUD),
+ "CBAUDEX": ValueOf(syscall.CBAUDEX),
+ "CIBAUD": ValueOf(syscall.CIBAUD),
+ "CLOCAL": ValueOf(syscall.CLOCAL),
+ "CLONE_CHILD_CLEARTID": ValueOf(syscall.CLONE_CHILD_CLEARTID),
+ "CLONE_CHILD_SETTID": ValueOf(syscall.CLONE_CHILD_SETTID),
+ "CLONE_DETACHED": ValueOf(syscall.CLONE_DETACHED),
+ "CLONE_FILES": ValueOf(syscall.CLONE_FILES),
+ "CLONE_FS": ValueOf(syscall.CLONE_FS),
+ "CLONE_IO": ValueOf(uint32(syscall.CLONE_IO)),
+ "CLONE_NEWCGROUP": ValueOf(syscall.CLONE_NEWCGROUP),
+ "CLONE_NEWIPC": ValueOf(syscall.CLONE_NEWIPC),
+ "CLONE_NEWNET": ValueOf(syscall.CLONE_NEWNET),
+ "CLONE_NEWNS": ValueOf(syscall.CLONE_NEWNS),
+ "CLONE_NEWPID": ValueOf(syscall.CLONE_NEWPID),
+ "CLONE_NEWUSER": ValueOf(syscall.CLONE_NEWUSER),
+ "CLONE_NEWUTS": ValueOf(syscall.CLONE_NEWUTS),
+ "CLONE_PARENT": ValueOf(syscall.CLONE_PARENT),
+ "CLONE_PARENT_SETTID": ValueOf(syscall.CLONE_PARENT_SETTID),
+ "CLONE_PTRACE": ValueOf(syscall.CLONE_PTRACE),
+ "CLONE_SETTLS": ValueOf(syscall.CLONE_SETTLS),
+ "CLONE_SIGHAND": ValueOf(syscall.CLONE_SIGHAND),
+ "CLONE_SYSVSEM": ValueOf(syscall.CLONE_SYSVSEM),
+ "CLONE_THREAD": ValueOf(syscall.CLONE_THREAD),
+ "CLONE_UNTRACED": ValueOf(syscall.CLONE_UNTRACED),
+ "CLONE_VFORK": ValueOf(syscall.CLONE_VFORK),
+ "CLONE_VM": ValueOf(syscall.CLONE_VM),
+ "CMSPAR": ValueOf(syscall.CMSPAR),
+ "CR0": ValueOf(syscall.CR0),
+ "CR1": ValueOf(syscall.CR1),
+ "CR2": ValueOf(syscall.CR2),
+ "CR3": ValueOf(syscall.CR3),
+ "CRDLY": ValueOf(syscall.CRDLY),
+ "CREAD": ValueOf(syscall.CREAD),
+ "CRTSCTS": ValueOf(uint32(syscall.CRTSCTS)),
+ "CS5": ValueOf(syscall.CS5),
+ "CS6": ValueOf(syscall.CS6),
+ "CS7": ValueOf(syscall.CS7),
+ "CS8": ValueOf(syscall.CS8),
+ "CSIZE": ValueOf(syscall.CSIZE),
+ "CSTOPB": ValueOf(syscall.CSTOPB),
+ "Cgocall": ValueOf(syscall.Cgocall),
+ "CgocallBack": ValueOf(syscall.CgocallBack),
+ "CgocallBackDone": ValueOf(syscall.CgocallBackDone),
+ "CgocallDone": ValueOf(syscall.CgocallDone),
+ "Chdir": ValueOf(syscall.Chdir),
+ "Chmod": ValueOf(syscall.Chmod),
+ "Chown": ValueOf(syscall.Chown),
+ "Chroot": ValueOf(syscall.Chroot),
+ "Clearenv": ValueOf(syscall.Clearenv),
+ "Close": ValueOf(syscall.Close),
+ "CloseOnExec": ValueOf(syscall.CloseOnExec),
+ "CmsgLen": ValueOf(syscall.CmsgLen),
+ "CmsgSpace": ValueOf(syscall.CmsgSpace),
+ "Connect": ValueOf(syscall.Connect),
+ "Creat": ValueOf(syscall.Creat),
+ "DT_BLK": ValueOf(syscall.DT_BLK),
+ "DT_CHR": ValueOf(syscall.DT_CHR),
+ "DT_DIR": ValueOf(syscall.DT_DIR),
+ "DT_FIFO": ValueOf(syscall.DT_FIFO),
+ "DT_LNK": ValueOf(syscall.DT_LNK),
+ "DT_REG": ValueOf(syscall.DT_REG),
+ "DT_SOCK": ValueOf(syscall.DT_SOCK),
+ "DT_UNKNOWN": ValueOf(syscall.DT_UNKNOWN),
+ "DT_WHT": ValueOf(syscall.DT_WHT),
+ "DetachLsf": ValueOf(syscall.DetachLsf),
+ "Dup": ValueOf(syscall.Dup),
+ "Dup2": ValueOf(syscall.Dup2),
+ "Dup3": ValueOf(syscall.Dup3),
+ "E2BIG": ValueOf(syscall.E2BIG),
+ "EACCES": ValueOf(syscall.EACCES),
+ "EADDRINUSE": ValueOf(syscall.EADDRINUSE),
+ "EADDRNOTAVAIL": ValueOf(syscall.EADDRNOTAVAIL),
+ "EADV": ValueOf(syscall.EADV),
+ "EAFNOSUPPORT": ValueOf(syscall.EAFNOSUPPORT),
+ "EAGAIN": ValueOf(syscall.EAGAIN),
+ "EAI_ADDRFAMILY": ValueOf(syscall.EAI_ADDRFAMILY),
+ "EAI_AGAIN": ValueOf(syscall.EAI_AGAIN),
+ "EAI_ALLDONE": ValueOf(syscall.EAI_ALLDONE),
+ "EAI_BADFLAGS": ValueOf(syscall.EAI_BADFLAGS),
+ "EAI_CANCELED": ValueOf(syscall.EAI_CANCELED),
+ "EAI_FAIL": ValueOf(syscall.EAI_FAIL),
+ "EAI_FAMILY": ValueOf(syscall.EAI_FAMILY),
+ "EAI_IDN_ENCODE": ValueOf(syscall.EAI_IDN_ENCODE),
+ "EAI_INPROGRESS": ValueOf(syscall.EAI_INPROGRESS),
+ "EAI_INTR": ValueOf(syscall.EAI_INTR),
+ "EAI_MEMORY": ValueOf(syscall.EAI_MEMORY),
+ "EAI_NODATA": ValueOf(syscall.EAI_NODATA),
+ "EAI_NONAME": ValueOf(syscall.EAI_NONAME),
+ "EAI_NOTCANCELED": ValueOf(syscall.EAI_NOTCANCELED),
+ "EAI_OVERFLOW": ValueOf(syscall.EAI_OVERFLOW),
+ "EAI_SERVICE": ValueOf(syscall.EAI_SERVICE),
+ "EAI_SOCKTYPE": ValueOf(syscall.EAI_SOCKTYPE),
+ "EAI_SYSTEM": ValueOf(syscall.EAI_SYSTEM),
+ "EALREADY": ValueOf(syscall.EALREADY),
+ "EBADE": ValueOf(syscall.EBADE),
+ "EBADF": ValueOf(syscall.EBADF),
+ "EBADFD": ValueOf(syscall.EBADFD),
+ "EBADMSG": ValueOf(syscall.EBADMSG),
+ "EBADR": ValueOf(syscall.EBADR),
+ "EBADRQC": ValueOf(syscall.EBADRQC),
+ "EBADSLT": ValueOf(syscall.EBADSLT),
+ "EBFONT": ValueOf(syscall.EBFONT),
+ "EBUSY": ValueOf(syscall.EBUSY),
+ "ECANCELED": ValueOf(syscall.ECANCELED),
+ "ECHILD": ValueOf(syscall.ECHILD),
+ "ECHO": ValueOf(syscall.ECHO),
+ "ECHOCTL": ValueOf(syscall.ECHOCTL),
+ "ECHOE": ValueOf(syscall.ECHOE),
+ "ECHOK": ValueOf(syscall.ECHOK),
+ "ECHOKE": ValueOf(syscall.ECHOKE),
+ "ECHONL": ValueOf(syscall.ECHONL),
+ "ECHOPRT": ValueOf(syscall.ECHOPRT),
+ "ECHRNG": ValueOf(syscall.ECHRNG),
+ "ECOMM": ValueOf(syscall.ECOMM),
+ "ECONNABORTED": ValueOf(syscall.ECONNABORTED),
+ "ECONNREFUSED": ValueOf(syscall.ECONNREFUSED),
+ "ECONNRESET": ValueOf(syscall.ECONNRESET),
+ "EDEADLK": ValueOf(syscall.EDEADLK),
+ "EDEADLOCK": ValueOf(syscall.EDEADLOCK),
+ "EDESTADDRREQ": ValueOf(syscall.EDESTADDRREQ),
+ "EDOM": ValueOf(syscall.EDOM),
+ "EDOTDOT": ValueOf(syscall.EDOTDOT),
+ "EDQUOT": ValueOf(syscall.EDQUOT),
+ "EEXIST": ValueOf(syscall.EEXIST),
+ "EFAULT": ValueOf(syscall.EFAULT),
+ "EFBIG": ValueOf(syscall.EFBIG),
+ "EHOSTDOWN": ValueOf(syscall.EHOSTDOWN),
+ "EHOSTUNREACH": ValueOf(syscall.EHOSTUNREACH),
+ "EHWPOISON": ValueOf(syscall.EHWPOISON),
+ "EIDRM": ValueOf(syscall.EIDRM),
+ "EILSEQ": ValueOf(syscall.EILSEQ),
+ "EINPROGRESS": ValueOf(syscall.EINPROGRESS),
+ "EINTR": ValueOf(syscall.EINTR),
+ "EINVAL": ValueOf(syscall.EINVAL),
+ "EIO": ValueOf(syscall.EIO),
+ "EISCONN": ValueOf(syscall.EISCONN),
+ "EISDIR": ValueOf(syscall.EISDIR),
+ "EISNAM": ValueOf(syscall.EISNAM),
+ "EKEYEXPIRED": ValueOf(syscall.EKEYEXPIRED),
+ "EKEYREJECTED": ValueOf(syscall.EKEYREJECTED),
+ "EKEYREVOKED": ValueOf(syscall.EKEYREVOKED),
+ "EL2HLT": ValueOf(syscall.EL2HLT),
+ "EL2NSYNC": ValueOf(syscall.EL2NSYNC),
+ "EL3HLT": ValueOf(syscall.EL3HLT),
+ "EL3RST": ValueOf(syscall.EL3RST),
+ "ELIBACC": ValueOf(syscall.ELIBACC),
+ "ELIBBAD": ValueOf(syscall.ELIBBAD),
+ "ELIBEXEC": ValueOf(syscall.ELIBEXEC),
+ "ELIBMAX": ValueOf(syscall.ELIBMAX),
+ "ELIBSCN": ValueOf(syscall.ELIBSCN),
+ "ELNRNG": ValueOf(syscall.ELNRNG),
+ "ELOOP": ValueOf(syscall.ELOOP),
+ "EMEDIUMTYPE": ValueOf(syscall.EMEDIUMTYPE),
+ "EMFILE": ValueOf(syscall.EMFILE),
+ "EMLINK": ValueOf(syscall.EMLINK),
+ "EMSGSIZE": ValueOf(syscall.EMSGSIZE),
+ "EMULTIHOP": ValueOf(syscall.EMULTIHOP),
+ "ENAMETOOLONG": ValueOf(syscall.ENAMETOOLONG),
+ "ENAVAIL": ValueOf(syscall.ENAVAIL),
+ "ENETDOWN": ValueOf(syscall.ENETDOWN),
+ "ENETRESET": ValueOf(syscall.ENETRESET),
+ "ENETUNREACH": ValueOf(syscall.ENETUNREACH),
+ "ENFILE": ValueOf(syscall.ENFILE),
+ "ENOANO": ValueOf(syscall.ENOANO),
+ "ENOBUFS": ValueOf(syscall.ENOBUFS),
+ "ENOCSI": ValueOf(syscall.ENOCSI),
+ "ENODATA": ValueOf(syscall.ENODATA),
+ "ENODEV": ValueOf(syscall.ENODEV),
+ "ENOENT": ValueOf(syscall.ENOENT),
+ "ENOEXEC": ValueOf(syscall.ENOEXEC),
+ "ENOKEY": ValueOf(syscall.ENOKEY),
+ "ENOLCK": ValueOf(syscall.ENOLCK),
+ "ENOLINK": ValueOf(syscall.ENOLINK),
+ "ENOMEDIUM": ValueOf(syscall.ENOMEDIUM),
+ "ENOMEM": ValueOf(syscall.ENOMEM),
+ "ENOMSG": ValueOf(syscall.ENOMSG),
+ "ENONET": ValueOf(syscall.ENONET),
+ "ENOPKG": ValueOf(syscall.ENOPKG),
+ "ENOPROTOOPT": ValueOf(syscall.ENOPROTOOPT),
+ "ENOSPC": ValueOf(syscall.ENOSPC),
+ "ENOSR": ValueOf(syscall.ENOSR),
+ "ENOSTR": ValueOf(syscall.ENOSTR),
+ "ENOSYS": ValueOf(syscall.ENOSYS),
+ "ENOTBLK": ValueOf(syscall.ENOTBLK),
+ "ENOTCONN": ValueOf(syscall.ENOTCONN),
+ "ENOTDIR": ValueOf(syscall.ENOTDIR),
+ "ENOTEMPTY": ValueOf(syscall.ENOTEMPTY),
+ "ENOTNAM": ValueOf(syscall.ENOTNAM),
+ "ENOTRECOVERABLE": ValueOf(syscall.ENOTRECOVERABLE),
+ "ENOTSOCK": ValueOf(syscall.ENOTSOCK),
+ "ENOTSUP": ValueOf(syscall.ENOTSUP),
+ "ENOTTY": ValueOf(syscall.ENOTTY),
+ "ENOTUNIQ": ValueOf(syscall.ENOTUNIQ),
+ "ENXIO": ValueOf(syscall.ENXIO),
+ "EOPNOTSUPP": ValueOf(syscall.EOPNOTSUPP),
+ "EOVERFLOW": ValueOf(syscall.EOVERFLOW),
+ "EOWNERDEAD": ValueOf(syscall.EOWNERDEAD),
+ "EPERM": ValueOf(syscall.EPERM),
+ "EPFNOSUPPORT": ValueOf(syscall.EPFNOSUPPORT),
+ "EPIPE": ValueOf(syscall.EPIPE),
+ "EPOLLERR": ValueOf(syscall.EPOLLERR),
+ "EPOLLET": ValueOf(uint32(syscall.EPOLLET)),
+ "EPOLLEXCLUSIVE": ValueOf(syscall.EPOLLEXCLUSIVE),
+ "EPOLLHUP": ValueOf(syscall.EPOLLHUP),
+ "EPOLLIN": ValueOf(syscall.EPOLLIN),
+ "EPOLLMSG": ValueOf(syscall.EPOLLMSG),
+ "EPOLLONESHOT": ValueOf(syscall.EPOLLONESHOT),
+ "EPOLLOUT": ValueOf(syscall.EPOLLOUT),
+ "EPOLLPRI": ValueOf(syscall.EPOLLPRI),
+ "EPOLLRDBAND": ValueOf(syscall.EPOLLRDBAND),
+ "EPOLLRDHUP": ValueOf(syscall.EPOLLRDHUP),
+ "EPOLLRDNORM": ValueOf(syscall.EPOLLRDNORM),
+ "EPOLLWAKEUP": ValueOf(syscall.EPOLLWAKEUP),
+ "EPOLLWRBAND": ValueOf(syscall.EPOLLWRBAND),
+ "EPOLLWRNORM": ValueOf(syscall.EPOLLWRNORM),
+ "EPOLL_CLOEXEC": ValueOf(syscall.EPOLL_CLOEXEC),
+ "EPOLL_CTL_ADD": ValueOf(syscall.EPOLL_CTL_ADD),
+ "EPOLL_CTL_DEL": ValueOf(syscall.EPOLL_CTL_DEL),
+ "EPOLL_CTL_MOD": ValueOf(syscall.EPOLL_CTL_MOD),
+ "EPROTO": ValueOf(syscall.EPROTO),
+ "EPROTONOSUPPORT": ValueOf(syscall.EPROTONOSUPPORT),
+ "EPROTOTYPE": ValueOf(syscall.EPROTOTYPE),
+ "ERANGE": ValueOf(syscall.ERANGE),
+ "EREMCHG": ValueOf(syscall.EREMCHG),
+ "EREMOTE": ValueOf(syscall.EREMOTE),
+ "EREMOTEIO": ValueOf(syscall.EREMOTEIO),
+ "ERESTART": ValueOf(syscall.ERESTART),
+ "ERFKILL": ValueOf(syscall.ERFKILL),
+ "EROFS": ValueOf(syscall.EROFS),
+ "ESHUTDOWN": ValueOf(syscall.ESHUTDOWN),
+ "ESOCKTNOSUPPORT": ValueOf(syscall.ESOCKTNOSUPPORT),
+ "ESPIPE": ValueOf(syscall.ESPIPE),
+ "ESRCH": ValueOf(syscall.ESRCH),
+ "ESRMNT": ValueOf(syscall.ESRMNT),
+ "ESTALE": ValueOf(syscall.ESTALE),
+ "ESTRPIPE": ValueOf(syscall.ESTRPIPE),
+ "ETH_ALEN": ValueOf(syscall.ETH_ALEN),
+ "ETH_DATA_LEN": ValueOf(syscall.ETH_DATA_LEN),
+ "ETH_FCS_LEN": ValueOf(syscall.ETH_FCS_LEN),
+ "ETH_FRAME_LEN": ValueOf(syscall.ETH_FRAME_LEN),
+ "ETH_HLEN": ValueOf(syscall.ETH_HLEN),
+ "ETH_MAX_MTU": ValueOf(syscall.ETH_MAX_MTU),
+ "ETH_MIN_MTU": ValueOf(syscall.ETH_MIN_MTU),
+ "ETH_P_1588": ValueOf(syscall.ETH_P_1588),
+ "ETH_P_8021AD": ValueOf(syscall.ETH_P_8021AD),
+ "ETH_P_8021AH": ValueOf(syscall.ETH_P_8021AH),
+ "ETH_P_8021Q": ValueOf(syscall.ETH_P_8021Q),
+ "ETH_P_80221": ValueOf(syscall.ETH_P_80221),
+ "ETH_P_802_2": ValueOf(syscall.ETH_P_802_2),
+ "ETH_P_802_3": ValueOf(syscall.ETH_P_802_3),
+ "ETH_P_802_3_MIN": ValueOf(syscall.ETH_P_802_3_MIN),
+ "ETH_P_802_EX1": ValueOf(syscall.ETH_P_802_EX1),
+ "ETH_P_AARP": ValueOf(syscall.ETH_P_AARP),
+ "ETH_P_AF_IUCV": ValueOf(syscall.ETH_P_AF_IUCV),
+ "ETH_P_ALL": ValueOf(syscall.ETH_P_ALL),
+ "ETH_P_AOE": ValueOf(syscall.ETH_P_AOE),
+ "ETH_P_ARCNET": ValueOf(syscall.ETH_P_ARCNET),
+ "ETH_P_ARP": ValueOf(syscall.ETH_P_ARP),
+ "ETH_P_ATALK": ValueOf(syscall.ETH_P_ATALK),
+ "ETH_P_ATMFATE": ValueOf(syscall.ETH_P_ATMFATE),
+ "ETH_P_ATMMPOA": ValueOf(syscall.ETH_P_ATMMPOA),
+ "ETH_P_AX25": ValueOf(syscall.ETH_P_AX25),
+ "ETH_P_BATMAN": ValueOf(syscall.ETH_P_BATMAN),
+ "ETH_P_BPQ": ValueOf(syscall.ETH_P_BPQ),
+ "ETH_P_CAIF": ValueOf(syscall.ETH_P_CAIF),
+ "ETH_P_CAN": ValueOf(syscall.ETH_P_CAN),
+ "ETH_P_CANFD": ValueOf(syscall.ETH_P_CANFD),
+ "ETH_P_CONTROL": ValueOf(syscall.ETH_P_CONTROL),
+ "ETH_P_CUST": ValueOf(syscall.ETH_P_CUST),
+ "ETH_P_DDCMP": ValueOf(syscall.ETH_P_DDCMP),
+ "ETH_P_DEC": ValueOf(syscall.ETH_P_DEC),
+ "ETH_P_DIAG": ValueOf(syscall.ETH_P_DIAG),
+ "ETH_P_DNA_DL": ValueOf(syscall.ETH_P_DNA_DL),
+ "ETH_P_DNA_RC": ValueOf(syscall.ETH_P_DNA_RC),
+ "ETH_P_DNA_RT": ValueOf(syscall.ETH_P_DNA_RT),
+ "ETH_P_DSA": ValueOf(syscall.ETH_P_DSA),
+ "ETH_P_ECONET": ValueOf(syscall.ETH_P_ECONET),
+ "ETH_P_EDSA": ValueOf(syscall.ETH_P_EDSA),
+ "ETH_P_ERSPAN": ValueOf(syscall.ETH_P_ERSPAN),
+ "ETH_P_FCOE": ValueOf(syscall.ETH_P_FCOE),
+ "ETH_P_FIP": ValueOf(syscall.ETH_P_FIP),
+ "ETH_P_HDLC": ValueOf(syscall.ETH_P_HDLC),
+ "ETH_P_HSR": ValueOf(syscall.ETH_P_HSR),
+ "ETH_P_IBOE": ValueOf(syscall.ETH_P_IBOE),
+ "ETH_P_IEEE802154": ValueOf(syscall.ETH_P_IEEE802154),
+ "ETH_P_IEEEPUP": ValueOf(syscall.ETH_P_IEEEPUP),
+ "ETH_P_IEEEPUPAT": ValueOf(syscall.ETH_P_IEEEPUPAT),
+ "ETH_P_IFE": ValueOf(syscall.ETH_P_IFE),
+ "ETH_P_IP": ValueOf(syscall.ETH_P_IP),
+ "ETH_P_IPV6": ValueOf(syscall.ETH_P_IPV6),
+ "ETH_P_IPX": ValueOf(syscall.ETH_P_IPX),
+ "ETH_P_IRDA": ValueOf(syscall.ETH_P_IRDA),
+ "ETH_P_LAT": ValueOf(syscall.ETH_P_LAT),
+ "ETH_P_LINK_CTL": ValueOf(syscall.ETH_P_LINK_CTL),
+ "ETH_P_LOCALTALK": ValueOf(syscall.ETH_P_LOCALTALK),
+ "ETH_P_LOOP": ValueOf(syscall.ETH_P_LOOP),
+ "ETH_P_LOOPBACK": ValueOf(syscall.ETH_P_LOOPBACK),
+ "ETH_P_MACSEC": ValueOf(syscall.ETH_P_MACSEC),
+ "ETH_P_MAP": ValueOf(syscall.ETH_P_MAP),
+ "ETH_P_MOBITEX": ValueOf(syscall.ETH_P_MOBITEX),
+ "ETH_P_MPLS_MC": ValueOf(syscall.ETH_P_MPLS_MC),
+ "ETH_P_MPLS_UC": ValueOf(syscall.ETH_P_MPLS_UC),
+ "ETH_P_MVRP": ValueOf(syscall.ETH_P_MVRP),
+ "ETH_P_NCSI": ValueOf(syscall.ETH_P_NCSI),
+ "ETH_P_NSH": ValueOf(syscall.ETH_P_NSH),
+ "ETH_P_PAE": ValueOf(syscall.ETH_P_PAE),
+ "ETH_P_PAUSE": ValueOf(syscall.ETH_P_PAUSE),
+ "ETH_P_PHONET": ValueOf(syscall.ETH_P_PHONET),
+ "ETH_P_PPPTALK": ValueOf(syscall.ETH_P_PPPTALK),
+ "ETH_P_PPP_DISC": ValueOf(syscall.ETH_P_PPP_DISC),
+ "ETH_P_PPP_MP": ValueOf(syscall.ETH_P_PPP_MP),
+ "ETH_P_PPP_SES": ValueOf(syscall.ETH_P_PPP_SES),
+ "ETH_P_PRP": ValueOf(syscall.ETH_P_PRP),
+ "ETH_P_PUP": ValueOf(syscall.ETH_P_PUP),
+ "ETH_P_PUPAT": ValueOf(syscall.ETH_P_PUPAT),
+ "ETH_P_QINQ1": ValueOf(syscall.ETH_P_QINQ1),
+ "ETH_P_QINQ2": ValueOf(syscall.ETH_P_QINQ2),
+ "ETH_P_QINQ3": ValueOf(syscall.ETH_P_QINQ3),
+ "ETH_P_RARP": ValueOf(syscall.ETH_P_RARP),
+ "ETH_P_SCA": ValueOf(syscall.ETH_P_SCA),
+ "ETH_P_SLOW": ValueOf(syscall.ETH_P_SLOW),
+ "ETH_P_SNAP": ValueOf(syscall.ETH_P_SNAP),
+ "ETH_P_TDLS": ValueOf(syscall.ETH_P_TDLS),
+ "ETH_P_TEB": ValueOf(syscall.ETH_P_TEB),
+ "ETH_P_TIPC": ValueOf(syscall.ETH_P_TIPC),
+ "ETH_P_TRAILER": ValueOf(syscall.ETH_P_TRAILER),
+ "ETH_P_TR_802_2": ValueOf(syscall.ETH_P_TR_802_2),
+ "ETH_P_TSN": ValueOf(syscall.ETH_P_TSN),
+ "ETH_P_WAN_PPP": ValueOf(syscall.ETH_P_WAN_PPP),
+ "ETH_P_WCCP": ValueOf(syscall.ETH_P_WCCP),
+ "ETH_P_X25": ValueOf(syscall.ETH_P_X25),
+ "ETH_P_XDSA": ValueOf(syscall.ETH_P_XDSA),
+ "ETH_ZLEN": ValueOf(syscall.ETH_ZLEN),
+ "ETIME": ValueOf(syscall.ETIME),
+ "ETIMEDOUT": ValueOf(syscall.ETIMEDOUT),
+ "ETOOMANYREFS": ValueOf(syscall.ETOOMANYREFS),
+ "ETXTBSY": ValueOf(syscall.ETXTBSY),
+ "EUCLEAN": ValueOf(syscall.EUCLEAN),
+ "EUNATCH": ValueOf(syscall.EUNATCH),
+ "EUSERS": ValueOf(syscall.EUSERS),
+ "EWOULDBLOCK": ValueOf(syscall.EWOULDBLOCK),
+ "EXDEV": ValueOf(syscall.EXDEV),
+ "EXFULL": ValueOf(syscall.EXFULL),
+ "Entersyscall": ValueOf(syscall.Entersyscall),
+ "Environ": ValueOf(syscall.Environ),
+ "EpollCreate": ValueOf(syscall.EpollCreate),
+ "EpollCreate1": ValueOf(syscall.EpollCreate1),
+ "EpollCtl": ValueOf(syscall.EpollCtl),
+ "EpollWait": ValueOf(syscall.EpollWait),
+ "Errstr": ValueOf(syscall.Errstr),
+ "Exec": ValueOf(syscall.Exec),
+ "Exit": ValueOf(syscall.Exit),
+ "Exitsyscall": ValueOf(syscall.Exitsyscall),
+ "FALLOC_FL_COLLAPSE_RANGE": ValueOf(syscall.FALLOC_FL_COLLAPSE_RANGE),
+ "FALLOC_FL_INSERT_RANGE": ValueOf(syscall.FALLOC_FL_INSERT_RANGE),
+ "FALLOC_FL_KEEP_SIZE": ValueOf(syscall.FALLOC_FL_KEEP_SIZE),
+ "FALLOC_FL_NO_HIDE_STALE": ValueOf(syscall.FALLOC_FL_NO_HIDE_STALE),
+ "FALLOC_FL_PUNCH_HOLE": ValueOf(syscall.FALLOC_FL_PUNCH_HOLE),
+ "FALLOC_FL_UNSHARE_RANGE": ValueOf(syscall.FALLOC_FL_UNSHARE_RANGE),
+ "FALLOC_FL_ZERO_RANGE": ValueOf(syscall.FALLOC_FL_ZERO_RANGE),
+ "FDClr": ValueOf(syscall.FDClr),
+ "FDIsSet": ValueOf(syscall.FDIsSet),
+ "FDSet": ValueOf(syscall.FDSet),
+ "FDZero": ValueOf(syscall.FDZero),
+ "FD_CLOEXEC": ValueOf(syscall.FD_CLOEXEC),
+ "FD_SETSIZE": ValueOf(syscall.FD_SETSIZE),
+ "FFDLY": ValueOf(syscall.FFDLY),
+ "FLUSHO": ValueOf(syscall.FLUSHO),
+ "F_ADD_SEALS": ValueOf(syscall.F_ADD_SEALS),
+ "F_DUPFD": ValueOf(syscall.F_DUPFD),
+ "F_DUPFD_CLOEXEC": ValueOf(syscall.F_DUPFD_CLOEXEC),
+ "F_EXLCK": ValueOf(syscall.F_EXLCK),
+ "F_GETFD": ValueOf(syscall.F_GETFD),
+ "F_GETFL": ValueOf(syscall.F_GETFL),
+ "F_GETLEASE": ValueOf(syscall.F_GETLEASE),
+ "F_GETLK": ValueOf(syscall.F_GETLK),
+ "F_GETLK64": ValueOf(syscall.F_GETLK64),
+ "F_GETOWN": ValueOf(syscall.F_GETOWN),
+ "F_GETOWN_EX": ValueOf(syscall.F_GETOWN_EX),
+ "F_GETPIPE_SZ": ValueOf(syscall.F_GETPIPE_SZ),
+ "F_GETSIG": ValueOf(syscall.F_GETSIG),
+ "F_GET_FILE_RW_HINT": ValueOf(syscall.F_GET_FILE_RW_HINT),
+ "F_GET_RW_HINT": ValueOf(syscall.F_GET_RW_HINT),
+ "F_GET_SEALS": ValueOf(syscall.F_GET_SEALS),
+ "F_LOCK": ValueOf(syscall.F_LOCK),
+ "F_NOTIFY": ValueOf(syscall.F_NOTIFY),
+ "F_OFD_GETLK": ValueOf(syscall.F_OFD_GETLK),
+ "F_OFD_SETLK": ValueOf(syscall.F_OFD_SETLK),
+ "F_OFD_SETLKW": ValueOf(syscall.F_OFD_SETLKW),
+ "F_OK": ValueOf(syscall.F_OK),
+ "F_OWNER_GID": ValueOf(syscall.F_OWNER_GID),
+ "F_OWNER_PGRP": ValueOf(syscall.F_OWNER_PGRP),
+ "F_OWNER_PID": ValueOf(syscall.F_OWNER_PID),
+ "F_OWNER_TID": ValueOf(syscall.F_OWNER_TID),
+ "F_RDLCK": ValueOf(syscall.F_RDLCK),
+ "F_SEAL_GROW": ValueOf(syscall.F_SEAL_GROW),
+ "F_SEAL_SEAL": ValueOf(syscall.F_SEAL_SEAL),
+ "F_SEAL_SHRINK": ValueOf(syscall.F_SEAL_SHRINK),
+ "F_SEAL_WRITE": ValueOf(syscall.F_SEAL_WRITE),
+ "F_SETFD": ValueOf(syscall.F_SETFD),
+ "F_SETFL": ValueOf(syscall.F_SETFL),
+ "F_SETLEASE": ValueOf(syscall.F_SETLEASE),
+ "F_SETLK": ValueOf(syscall.F_SETLK),
+ "F_SETLK64": ValueOf(syscall.F_SETLK64),
+ "F_SETLKW": ValueOf(syscall.F_SETLKW),
+ "F_SETLKW64": ValueOf(syscall.F_SETLKW64),
+ "F_SETOWN": ValueOf(syscall.F_SETOWN),
+ "F_SETOWN_EX": ValueOf(syscall.F_SETOWN_EX),
+ "F_SETPIPE_SZ": ValueOf(syscall.F_SETPIPE_SZ),
+ "F_SETSIG": ValueOf(syscall.F_SETSIG),
+ "F_SET_FILE_RW_HINT": ValueOf(syscall.F_SET_FILE_RW_HINT),
+ "F_SET_RW_HINT": ValueOf(syscall.F_SET_RW_HINT),
+ "F_SHLCK": ValueOf(syscall.F_SHLCK),
+ "F_TEST": ValueOf(syscall.F_TEST),
+ "F_TLOCK": ValueOf(syscall.F_TLOCK),
+ "F_ULOCK": ValueOf(syscall.F_ULOCK),
+ "F_UNLCK": ValueOf(syscall.F_UNLCK),
+ "F_WRLCK": ValueOf(syscall.F_WRLCK),
+ "Faccessat": ValueOf(syscall.Faccessat),
+ "Fallocate": ValueOf(syscall.Fallocate),
+ "Fchdir": ValueOf(syscall.Fchdir),
+ "Fchmod": ValueOf(syscall.Fchmod),
+ "Fchmodat": ValueOf(syscall.Fchmodat),
+ "Fchown": ValueOf(syscall.Fchown),
+ "Fchownat": ValueOf(syscall.Fchownat),
+ "FcntlFlock": ValueOf(syscall.FcntlFlock),
+ "Fdatasync": ValueOf(syscall.Fdatasync),
+ "Flock": ValueOf(syscall.Flock),
+ "ForkExec": ValueOf(syscall.ForkExec),
+ "ForkLock": ValueOf(&syscall.ForkLock).Elem(),
+ "Fstat": ValueOf(syscall.Fstat),
+ "Fstatfs": ValueOf(syscall.Fstatfs),
+ "Fsync": ValueOf(syscall.Fsync),
+ "Ftruncate": ValueOf(syscall.Ftruncate),
+ "Futimes": ValueOf(syscall.Futimes),
+ "Futimesat": ValueOf(syscall.Futimesat),
+ "GetErrno": ValueOf(syscall.GetErrno),
+ "Getcwd": ValueOf(syscall.Getcwd),
+ "Getdents": ValueOf(syscall.Getdents),
+ "Getegid": ValueOf(syscall.Getegid),
+ "Getenv": ValueOf(syscall.Getenv),
+ "Geteuid": ValueOf(syscall.Geteuid),
+ "Getgid": ValueOf(syscall.Getgid),
+ "Getgroups": ValueOf(syscall.Getgroups),
+ "Getpagesize": ValueOf(syscall.Getpagesize),
+ "Getpeername": ValueOf(syscall.Getpeername),
+ "Getpgid": ValueOf(syscall.Getpgid),
+ "Getpgrp": ValueOf(syscall.Getpgrp),
+ "Getpid": ValueOf(syscall.Getpid),
+ "Getppid": ValueOf(syscall.Getppid),
+ "Getpriority": ValueOf(syscall.Getpriority),
+ "Getrlimit": ValueOf(syscall.Getrlimit),
+ "Getrusage": ValueOf(syscall.Getrusage),
+ "Getsockname": ValueOf(syscall.Getsockname),
+ "GetsockoptByte": ValueOf(syscall.GetsockoptByte),
+ "GetsockoptICMPv6Filter": ValueOf(syscall.GetsockoptICMPv6Filter),
+ "GetsockoptIPMreq": ValueOf(syscall.GetsockoptIPMreq),
+ "GetsockoptIPMreqn": ValueOf(syscall.GetsockoptIPMreqn),
+ "GetsockoptIPv6MTUInfo": ValueOf(syscall.GetsockoptIPv6MTUInfo),
+ "GetsockoptIPv6Mreq": ValueOf(syscall.GetsockoptIPv6Mreq),
+ "GetsockoptInet4Addr": ValueOf(syscall.GetsockoptInet4Addr),
+ "GetsockoptInt": ValueOf(syscall.GetsockoptInt),
+ "GetsockoptUcred": ValueOf(syscall.GetsockoptUcred),
+ "Gettid": ValueOf(syscall.Gettid),
+ "Gettimeofday": ValueOf(syscall.Gettimeofday),
+ "Getuid": ValueOf(syscall.Getuid),
+ "Getwd": ValueOf(syscall.Getwd),
+ "Getxattr": ValueOf(syscall.Getxattr),
+ "HUPCL": ValueOf(syscall.HUPCL),
+ "ICANON": ValueOf(syscall.ICANON),
+ "ICRNL": ValueOf(syscall.ICRNL),
+ "IEXTEN": ValueOf(syscall.IEXTEN),
+ "IFA_ADDRESS": ValueOf(syscall.IFA_ADDRESS),
+ "IFA_ANYCAST": ValueOf(syscall.IFA_ANYCAST),
+ "IFA_BROADCAST": ValueOf(syscall.IFA_BROADCAST),
+ "IFA_CACHEINFO": ValueOf(syscall.IFA_CACHEINFO),
+ "IFA_FLAGS": ValueOf(syscall.IFA_FLAGS),
+ "IFA_F_DADFAILED": ValueOf(syscall.IFA_F_DADFAILED),
+ "IFA_F_DEPRECATED": ValueOf(syscall.IFA_F_DEPRECATED),
+ "IFA_F_HOMEADDRESS": ValueOf(syscall.IFA_F_HOMEADDRESS),
+ "IFA_F_MANAGETEMPADDR": ValueOf(syscall.IFA_F_MANAGETEMPADDR),
+ "IFA_F_MCAUTOJOIN": ValueOf(syscall.IFA_F_MCAUTOJOIN),
+ "IFA_F_NODAD": ValueOf(syscall.IFA_F_NODAD),
+ "IFA_F_NOPREFIXROUTE": ValueOf(syscall.IFA_F_NOPREFIXROUTE),
+ "IFA_F_OPTIMISTIC": ValueOf(syscall.IFA_F_OPTIMISTIC),
+ "IFA_F_PERMANENT": ValueOf(syscall.IFA_F_PERMANENT),
+ "IFA_F_SECONDARY": ValueOf(syscall.IFA_F_SECONDARY),
+ "IFA_F_STABLE_PRIVACY": ValueOf(syscall.IFA_F_STABLE_PRIVACY),
+ "IFA_F_TEMPORARY": ValueOf(syscall.IFA_F_TEMPORARY),
+ "IFA_F_TENTATIVE": ValueOf(syscall.IFA_F_TENTATIVE),
+ "IFA_LABEL": ValueOf(syscall.IFA_LABEL),
+ "IFA_LOCAL": ValueOf(syscall.IFA_LOCAL),
+ "IFA_MULTICAST": ValueOf(syscall.IFA_MULTICAST),
+ "IFA_UNSPEC": ValueOf(syscall.IFA_UNSPEC),
+ "IFF_ALLMULTI": ValueOf(syscall.IFF_ALLMULTI),
+ "IFF_ATTACH_QUEUE": ValueOf(syscall.IFF_ATTACH_QUEUE),
+ "IFF_AUTOMEDIA": ValueOf(syscall.IFF_AUTOMEDIA),
+ "IFF_BROADCAST": ValueOf(syscall.IFF_BROADCAST),
+ "IFF_DEBUG": ValueOf(syscall.IFF_DEBUG),
+ "IFF_DETACH_QUEUE": ValueOf(syscall.IFF_DETACH_QUEUE),
+ "IFF_DYNAMIC": ValueOf(syscall.IFF_DYNAMIC),
+ "IFF_LOOPBACK": ValueOf(syscall.IFF_LOOPBACK),
+ "IFF_MASTER": ValueOf(syscall.IFF_MASTER),
+ "IFF_MULTICAST": ValueOf(syscall.IFF_MULTICAST),
+ "IFF_MULTI_QUEUE": ValueOf(syscall.IFF_MULTI_QUEUE),
+ "IFF_NAPI": ValueOf(syscall.IFF_NAPI),
+ "IFF_NAPI_FRAGS": ValueOf(syscall.IFF_NAPI_FRAGS),
+ "IFF_NOARP": ValueOf(syscall.IFF_NOARP),
+ "IFF_NOFILTER": ValueOf(syscall.IFF_NOFILTER),
+ "IFF_NOTRAILERS": ValueOf(syscall.IFF_NOTRAILERS),
+ "IFF_NO_PI": ValueOf(syscall.IFF_NO_PI),
+ "IFF_ONE_QUEUE": ValueOf(syscall.IFF_ONE_QUEUE),
+ "IFF_PERSIST": ValueOf(syscall.IFF_PERSIST),
+ "IFF_POINTOPOINT": ValueOf(syscall.IFF_POINTOPOINT),
+ "IFF_PORTSEL": ValueOf(syscall.IFF_PORTSEL),
+ "IFF_PROMISC": ValueOf(syscall.IFF_PROMISC),
+ "IFF_RUNNING": ValueOf(syscall.IFF_RUNNING),
+ "IFF_SLAVE": ValueOf(syscall.IFF_SLAVE),
+ "IFF_TAP": ValueOf(syscall.IFF_TAP),
+ "IFF_TUN": ValueOf(syscall.IFF_TUN),
+ "IFF_TUN_EXCL": ValueOf(syscall.IFF_TUN_EXCL),
+ "IFF_UP": ValueOf(syscall.IFF_UP),
+ "IFF_VNET_HDR": ValueOf(syscall.IFF_VNET_HDR),
+ "IFLA_ADDRESS": ValueOf(syscall.IFLA_ADDRESS),
+ "IFLA_AF_SPEC": ValueOf(syscall.IFLA_AF_SPEC),
+ "IFLA_BOND_ACTIVE_SLAVE": ValueOf(syscall.IFLA_BOND_ACTIVE_SLAVE),
+ "IFLA_BOND_AD_ACTOR_SYSTEM": ValueOf(syscall.IFLA_BOND_AD_ACTOR_SYSTEM),
+ "IFLA_BOND_AD_ACTOR_SYS_PRIO": ValueOf(syscall.IFLA_BOND_AD_ACTOR_SYS_PRIO),
+ "IFLA_BOND_AD_INFO": ValueOf(syscall.IFLA_BOND_AD_INFO),
+ "IFLA_BOND_AD_INFO_ACTOR_KEY": ValueOf(syscall.IFLA_BOND_AD_INFO_ACTOR_KEY),
+ "IFLA_BOND_AD_INFO_AGGREGATOR": ValueOf(syscall.IFLA_BOND_AD_INFO_AGGREGATOR),
+ "IFLA_BOND_AD_INFO_NUM_PORTS": ValueOf(syscall.IFLA_BOND_AD_INFO_NUM_PORTS),
+ "IFLA_BOND_AD_INFO_PARTNER_KEY": ValueOf(syscall.IFLA_BOND_AD_INFO_PARTNER_KEY),
+ "IFLA_BOND_AD_INFO_PARTNER_MAC": ValueOf(syscall.IFLA_BOND_AD_INFO_PARTNER_MAC),
+ "IFLA_BOND_AD_INFO_UNSPEC": ValueOf(syscall.IFLA_BOND_AD_INFO_UNSPEC),
+ "IFLA_BOND_AD_LACP_RATE": ValueOf(syscall.IFLA_BOND_AD_LACP_RATE),
+ "IFLA_BOND_AD_SELECT": ValueOf(syscall.IFLA_BOND_AD_SELECT),
+ "IFLA_BOND_AD_USER_PORT_KEY": ValueOf(syscall.IFLA_BOND_AD_USER_PORT_KEY),
+ "IFLA_BOND_ALL_SLAVES_ACTIVE": ValueOf(syscall.IFLA_BOND_ALL_SLAVES_ACTIVE),
+ "IFLA_BOND_ARP_ALL_TARGETS": ValueOf(syscall.IFLA_BOND_ARP_ALL_TARGETS),
+ "IFLA_BOND_ARP_INTERVAL": ValueOf(syscall.IFLA_BOND_ARP_INTERVAL),
+ "IFLA_BOND_ARP_IP_TARGET": ValueOf(syscall.IFLA_BOND_ARP_IP_TARGET),
+ "IFLA_BOND_ARP_VALIDATE": ValueOf(syscall.IFLA_BOND_ARP_VALIDATE),
+ "IFLA_BOND_DOWNDELAY": ValueOf(syscall.IFLA_BOND_DOWNDELAY),
+ "IFLA_BOND_FAIL_OVER_MAC": ValueOf(syscall.IFLA_BOND_FAIL_OVER_MAC),
+ "IFLA_BOND_LP_INTERVAL": ValueOf(syscall.IFLA_BOND_LP_INTERVAL),
+ "IFLA_BOND_MIIMON": ValueOf(syscall.IFLA_BOND_MIIMON),
+ "IFLA_BOND_MIN_LINKS": ValueOf(syscall.IFLA_BOND_MIN_LINKS),
+ "IFLA_BOND_MODE": ValueOf(syscall.IFLA_BOND_MODE),
+ "IFLA_BOND_NUM_PEER_NOTIF": ValueOf(syscall.IFLA_BOND_NUM_PEER_NOTIF),
+ "IFLA_BOND_PACKETS_PER_SLAVE": ValueOf(syscall.IFLA_BOND_PACKETS_PER_SLAVE),
+ "IFLA_BOND_PRIMARY": ValueOf(syscall.IFLA_BOND_PRIMARY),
+ "IFLA_BOND_PRIMARY_RESELECT": ValueOf(syscall.IFLA_BOND_PRIMARY_RESELECT),
+ "IFLA_BOND_RESEND_IGMP": ValueOf(syscall.IFLA_BOND_RESEND_IGMP),
+ "IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE),
+ "IFLA_BOND_SLAVE_AD_AGGREGATOR_ID": ValueOf(syscall.IFLA_BOND_SLAVE_AD_AGGREGATOR_ID),
+ "IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE),
+ "IFLA_BOND_SLAVE_LINK_FAILURE_COUNT": ValueOf(syscall.IFLA_BOND_SLAVE_LINK_FAILURE_COUNT),
+ "IFLA_BOND_SLAVE_MII_STATUS": ValueOf(syscall.IFLA_BOND_SLAVE_MII_STATUS),
+ "IFLA_BOND_SLAVE_PERM_HWADDR": ValueOf(syscall.IFLA_BOND_SLAVE_PERM_HWADDR),
+ "IFLA_BOND_SLAVE_QUEUE_ID": ValueOf(syscall.IFLA_BOND_SLAVE_QUEUE_ID),
+ "IFLA_BOND_SLAVE_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_STATE),
+ "IFLA_BOND_SLAVE_UNSPEC": ValueOf(syscall.IFLA_BOND_SLAVE_UNSPEC),
+ "IFLA_BOND_TLB_DYNAMIC_LB": ValueOf(syscall.IFLA_BOND_TLB_DYNAMIC_LB),
+ "IFLA_BOND_UNSPEC": ValueOf(syscall.IFLA_BOND_UNSPEC),
+ "IFLA_BOND_UPDELAY": ValueOf(syscall.IFLA_BOND_UPDELAY),
+ "IFLA_BOND_USE_CARRIER": ValueOf(syscall.IFLA_BOND_USE_CARRIER),
+ "IFLA_BOND_XMIT_HASH_POLICY": ValueOf(syscall.IFLA_BOND_XMIT_HASH_POLICY),
+ "IFLA_BROADCAST": ValueOf(syscall.IFLA_BROADCAST),
+ "IFLA_BRPORT_BCAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_BCAST_FLOOD),
+ "IFLA_BRPORT_BRIDGE_ID": ValueOf(syscall.IFLA_BRPORT_BRIDGE_ID),
+ "IFLA_BRPORT_CONFIG_PENDING": ValueOf(syscall.IFLA_BRPORT_CONFIG_PENDING),
+ "IFLA_BRPORT_COST": ValueOf(syscall.IFLA_BRPORT_COST),
+ "IFLA_BRPORT_DESIGNATED_COST": ValueOf(syscall.IFLA_BRPORT_DESIGNATED_COST),
+ "IFLA_BRPORT_DESIGNATED_PORT": ValueOf(syscall.IFLA_BRPORT_DESIGNATED_PORT),
+ "IFLA_BRPORT_FAST_LEAVE": ValueOf(syscall.IFLA_BRPORT_FAST_LEAVE),
+ "IFLA_BRPORT_FLUSH": ValueOf(syscall.IFLA_BRPORT_FLUSH),
+ "IFLA_BRPORT_FORWARD_DELAY_TIMER": ValueOf(syscall.IFLA_BRPORT_FORWARD_DELAY_TIMER),
+ "IFLA_BRPORT_GROUP_FWD_MASK": ValueOf(syscall.IFLA_BRPORT_GROUP_FWD_MASK),
+ "IFLA_BRPORT_GUARD": ValueOf(syscall.IFLA_BRPORT_GUARD),
+ "IFLA_BRPORT_HOLD_TIMER": ValueOf(syscall.IFLA_BRPORT_HOLD_TIMER),
+ "IFLA_BRPORT_ID": ValueOf(syscall.IFLA_BRPORT_ID),
+ "IFLA_BRPORT_LEARNING": ValueOf(syscall.IFLA_BRPORT_LEARNING),
+ "IFLA_BRPORT_LEARNING_SYNC": ValueOf(syscall.IFLA_BRPORT_LEARNING_SYNC),
+ "IFLA_BRPORT_MCAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_MCAST_FLOOD),
+ "IFLA_BRPORT_MCAST_TO_UCAST": ValueOf(syscall.IFLA_BRPORT_MCAST_TO_UCAST),
+ "IFLA_BRPORT_MESSAGE_AGE_TIMER": ValueOf(syscall.IFLA_BRPORT_MESSAGE_AGE_TIMER),
+ "IFLA_BRPORT_MODE": ValueOf(syscall.IFLA_BRPORT_MODE),
+ "IFLA_BRPORT_MULTICAST_ROUTER": ValueOf(syscall.IFLA_BRPORT_MULTICAST_ROUTER),
+ "IFLA_BRPORT_NEIGH_SUPPRESS": ValueOf(syscall.IFLA_BRPORT_NEIGH_SUPPRESS),
+ "IFLA_BRPORT_NO": ValueOf(syscall.IFLA_BRPORT_NO),
+ "IFLA_BRPORT_PAD": ValueOf(syscall.IFLA_BRPORT_PAD),
+ "IFLA_BRPORT_PRIORITY": ValueOf(syscall.IFLA_BRPORT_PRIORITY),
+ "IFLA_BRPORT_PROTECT": ValueOf(syscall.IFLA_BRPORT_PROTECT),
+ "IFLA_BRPORT_PROXYARP": ValueOf(syscall.IFLA_BRPORT_PROXYARP),
+ "IFLA_BRPORT_PROXYARP_WIFI": ValueOf(syscall.IFLA_BRPORT_PROXYARP_WIFI),
+ "IFLA_BRPORT_ROOT_ID": ValueOf(syscall.IFLA_BRPORT_ROOT_ID),
+ "IFLA_BRPORT_STATE": ValueOf(syscall.IFLA_BRPORT_STATE),
+ "IFLA_BRPORT_TOPOLOGY_CHANGE_ACK": ValueOf(syscall.IFLA_BRPORT_TOPOLOGY_CHANGE_ACK),
+ "IFLA_BRPORT_UNICAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_UNICAST_FLOOD),
+ "IFLA_BRPORT_UNSPEC": ValueOf(syscall.IFLA_BRPORT_UNSPEC),
+ "IFLA_BRPORT_VLAN_TUNNEL": ValueOf(syscall.IFLA_BRPORT_VLAN_TUNNEL),
+ "IFLA_BR_AGEING_TIME": ValueOf(syscall.IFLA_BR_AGEING_TIME),
+ "IFLA_BR_BRIDGE_ID": ValueOf(syscall.IFLA_BR_BRIDGE_ID),
+ "IFLA_BR_FDB_FLUSH": ValueOf(syscall.IFLA_BR_FDB_FLUSH),
+ "IFLA_BR_FORWARD_DELAY": ValueOf(syscall.IFLA_BR_FORWARD_DELAY),
+ "IFLA_BR_GC_TIMER": ValueOf(syscall.IFLA_BR_GC_TIMER),
+ "IFLA_BR_GROUP_ADDR": ValueOf(syscall.IFLA_BR_GROUP_ADDR),
+ "IFLA_BR_GROUP_FWD_MASK": ValueOf(syscall.IFLA_BR_GROUP_FWD_MASK),
+ "IFLA_BR_HELLO_TIME": ValueOf(syscall.IFLA_BR_HELLO_TIME),
+ "IFLA_BR_HELLO_TIMER": ValueOf(syscall.IFLA_BR_HELLO_TIMER),
+ "IFLA_BR_MAX_AGE": ValueOf(syscall.IFLA_BR_MAX_AGE),
+ "IFLA_BR_MCAST_HASH_ELASTICITY": ValueOf(syscall.IFLA_BR_MCAST_HASH_ELASTICITY),
+ "IFLA_BR_MCAST_HASH_MAX": ValueOf(syscall.IFLA_BR_MCAST_HASH_MAX),
+ "IFLA_BR_MCAST_IGMP_VERSION": ValueOf(syscall.IFLA_BR_MCAST_IGMP_VERSION),
+ "IFLA_BR_MCAST_LAST_MEMBER_CNT": ValueOf(syscall.IFLA_BR_MCAST_LAST_MEMBER_CNT),
+ "IFLA_BR_MCAST_LAST_MEMBER_INTVL": ValueOf(syscall.IFLA_BR_MCAST_LAST_MEMBER_INTVL),
+ "IFLA_BR_MCAST_MEMBERSHIP_INTVL": ValueOf(syscall.IFLA_BR_MCAST_MEMBERSHIP_INTVL),
+ "IFLA_BR_MCAST_MLD_VERSION": ValueOf(syscall.IFLA_BR_MCAST_MLD_VERSION),
+ "IFLA_BR_MCAST_QUERIER": ValueOf(syscall.IFLA_BR_MCAST_QUERIER),
+ "IFLA_BR_MCAST_QUERIER_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERIER_INTVL),
+ "IFLA_BR_MCAST_QUERY_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERY_INTVL),
+ "IFLA_BR_MCAST_QUERY_RESPONSE_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERY_RESPONSE_INTVL),
+ "IFLA_BR_MCAST_QUERY_USE_IFADDR": ValueOf(syscall.IFLA_BR_MCAST_QUERY_USE_IFADDR),
+ "IFLA_BR_MCAST_ROUTER": ValueOf(syscall.IFLA_BR_MCAST_ROUTER),
+ "IFLA_BR_MCAST_SNOOPING": ValueOf(syscall.IFLA_BR_MCAST_SNOOPING),
+ "IFLA_BR_MCAST_STARTUP_QUERY_CNT": ValueOf(syscall.IFLA_BR_MCAST_STARTUP_QUERY_CNT),
+ "IFLA_BR_MCAST_STARTUP_QUERY_INTVL": ValueOf(syscall.IFLA_BR_MCAST_STARTUP_QUERY_INTVL),
+ "IFLA_BR_MCAST_STATS_ENABLED": ValueOf(syscall.IFLA_BR_MCAST_STATS_ENABLED),
+ "IFLA_BR_NF_CALL_ARPTABLES": ValueOf(syscall.IFLA_BR_NF_CALL_ARPTABLES),
+ "IFLA_BR_NF_CALL_IP6TABLES": ValueOf(syscall.IFLA_BR_NF_CALL_IP6TABLES),
+ "IFLA_BR_NF_CALL_IPTABLES": ValueOf(syscall.IFLA_BR_NF_CALL_IPTABLES),
+ "IFLA_BR_PAD": ValueOf(syscall.IFLA_BR_PAD),
+ "IFLA_BR_PRIORITY": ValueOf(syscall.IFLA_BR_PRIORITY),
+ "IFLA_BR_ROOT_ID": ValueOf(syscall.IFLA_BR_ROOT_ID),
+ "IFLA_BR_ROOT_PATH_COST": ValueOf(syscall.IFLA_BR_ROOT_PATH_COST),
+ "IFLA_BR_ROOT_PORT": ValueOf(syscall.IFLA_BR_ROOT_PORT),
+ "IFLA_BR_STP_STATE": ValueOf(syscall.IFLA_BR_STP_STATE),
+ "IFLA_BR_TCN_TIMER": ValueOf(syscall.IFLA_BR_TCN_TIMER),
+ "IFLA_BR_TOPOLOGY_CHANGE": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE),
+ "IFLA_BR_TOPOLOGY_CHANGE_DETECTED": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE_DETECTED),
+ "IFLA_BR_TOPOLOGY_CHANGE_TIMER": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE_TIMER),
+ "IFLA_BR_UNSPEC": ValueOf(syscall.IFLA_BR_UNSPEC),
+ "IFLA_BR_VLAN_DEFAULT_PVID": ValueOf(syscall.IFLA_BR_VLAN_DEFAULT_PVID),
+ "IFLA_BR_VLAN_FILTERING": ValueOf(syscall.IFLA_BR_VLAN_FILTERING),
+ "IFLA_BR_VLAN_PROTOCOL": ValueOf(syscall.IFLA_BR_VLAN_PROTOCOL),
+ "IFLA_BR_VLAN_STATS_ENABLED": ValueOf(syscall.IFLA_BR_VLAN_STATS_ENABLED),
+ "IFLA_CARRIER": ValueOf(syscall.IFLA_CARRIER),
+ "IFLA_CARRIER_CHANGES": ValueOf(syscall.IFLA_CARRIER_CHANGES),
+ "IFLA_COST": ValueOf(syscall.IFLA_COST),
+ "IFLA_EVENT": ValueOf(syscall.IFLA_EVENT),
+ "IFLA_EVENT_BONDING_FAILOVER": ValueOf(syscall.IFLA_EVENT_BONDING_FAILOVER),
+ "IFLA_EVENT_BONDING_OPTIONS": ValueOf(syscall.IFLA_EVENT_BONDING_OPTIONS),
+ "IFLA_EVENT_FEATURES": ValueOf(syscall.IFLA_EVENT_FEATURES),
+ "IFLA_EVENT_IGMP_RESEND": ValueOf(syscall.IFLA_EVENT_IGMP_RESEND),
+ "IFLA_EVENT_NONE": ValueOf(syscall.IFLA_EVENT_NONE),
+ "IFLA_EVENT_NOTIFY_PEERS": ValueOf(syscall.IFLA_EVENT_NOTIFY_PEERS),
+ "IFLA_EVENT_REBOOT": ValueOf(syscall.IFLA_EVENT_REBOOT),
+ "IFLA_EXT_MASK": ValueOf(syscall.IFLA_EXT_MASK),
+ "IFLA_GENEVE_COLLECT_METADATA": ValueOf(syscall.IFLA_GENEVE_COLLECT_METADATA),
+ "IFLA_GENEVE_ID": ValueOf(syscall.IFLA_GENEVE_ID),
+ "IFLA_GENEVE_LABEL": ValueOf(syscall.IFLA_GENEVE_LABEL),
+ "IFLA_GENEVE_PORT": ValueOf(syscall.IFLA_GENEVE_PORT),
+ "IFLA_GENEVE_REMOTE": ValueOf(syscall.IFLA_GENEVE_REMOTE),
+ "IFLA_GENEVE_REMOTE6": ValueOf(syscall.IFLA_GENEVE_REMOTE6),
+ "IFLA_GENEVE_TOS": ValueOf(syscall.IFLA_GENEVE_TOS),
+ "IFLA_GENEVE_TTL": ValueOf(syscall.IFLA_GENEVE_TTL),
+ "IFLA_GENEVE_UDP_CSUM": ValueOf(syscall.IFLA_GENEVE_UDP_CSUM),
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_RX": ValueOf(syscall.IFLA_GENEVE_UDP_ZERO_CSUM6_RX),
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_TX": ValueOf(syscall.IFLA_GENEVE_UDP_ZERO_CSUM6_TX),
+ "IFLA_GENEVE_UNSPEC": ValueOf(syscall.IFLA_GENEVE_UNSPEC),
+ "IFLA_GROUP": ValueOf(syscall.IFLA_GROUP),
+ "IFLA_GSO_MAX_SEGS": ValueOf(syscall.IFLA_GSO_MAX_SEGS),
+ "IFLA_GSO_MAX_SIZE": ValueOf(syscall.IFLA_GSO_MAX_SIZE),
+ "IFLA_GTP_FD0": ValueOf(syscall.IFLA_GTP_FD0),
+ "IFLA_GTP_FD1": ValueOf(syscall.IFLA_GTP_FD1),
+ "IFLA_GTP_PDP_HASHSIZE": ValueOf(syscall.IFLA_GTP_PDP_HASHSIZE),
+ "IFLA_GTP_ROLE": ValueOf(syscall.IFLA_GTP_ROLE),
+ "IFLA_GTP_UNSPEC": ValueOf(syscall.IFLA_GTP_UNSPEC),
+ "IFLA_HSR_MULTICAST_SPEC": ValueOf(syscall.IFLA_HSR_MULTICAST_SPEC),
+ "IFLA_HSR_SEQ_NR": ValueOf(syscall.IFLA_HSR_SEQ_NR),
+ "IFLA_HSR_SLAVE1": ValueOf(syscall.IFLA_HSR_SLAVE1),
+ "IFLA_HSR_SLAVE2": ValueOf(syscall.IFLA_HSR_SLAVE2),
+ "IFLA_HSR_SUPERVISION_ADDR": ValueOf(syscall.IFLA_HSR_SUPERVISION_ADDR),
+ "IFLA_HSR_UNSPEC": ValueOf(syscall.IFLA_HSR_UNSPEC),
+ "IFLA_HSR_VERSION": ValueOf(syscall.IFLA_HSR_VERSION),
+ "IFLA_IFALIAS": ValueOf(syscall.IFLA_IFALIAS),
+ "IFLA_IFNAME": ValueOf(syscall.IFLA_IFNAME),
+ "IFLA_IF_NETNSID": ValueOf(syscall.IFLA_IF_NETNSID),
+ "IFLA_INET6_ADDR_GEN_MODE": ValueOf(syscall.IFLA_INET6_ADDR_GEN_MODE),
+ "IFLA_INET6_CACHEINFO": ValueOf(syscall.IFLA_INET6_CACHEINFO),
+ "IFLA_INET6_CONF": ValueOf(syscall.IFLA_INET6_CONF),
+ "IFLA_INET6_FLAGS": ValueOf(syscall.IFLA_INET6_FLAGS),
+ "IFLA_INET6_ICMP6STATS": ValueOf(syscall.IFLA_INET6_ICMP6STATS),
+ "IFLA_INET6_MCAST": ValueOf(syscall.IFLA_INET6_MCAST),
+ "IFLA_INET6_STATS": ValueOf(syscall.IFLA_INET6_STATS),
+ "IFLA_INET6_TOKEN": ValueOf(syscall.IFLA_INET6_TOKEN),
+ "IFLA_INET6_UNSPEC": ValueOf(syscall.IFLA_INET6_UNSPEC),
+ "IFLA_INET_CONF": ValueOf(syscall.IFLA_INET_CONF),
+ "IFLA_INET_UNSPEC": ValueOf(syscall.IFLA_INET_UNSPEC),
+ "IFLA_INFO_DATA": ValueOf(syscall.IFLA_INFO_DATA),
+ "IFLA_INFO_KIND": ValueOf(syscall.IFLA_INFO_KIND),
+ "IFLA_INFO_SLAVE_DATA": ValueOf(syscall.IFLA_INFO_SLAVE_DATA),
+ "IFLA_INFO_SLAVE_KIND": ValueOf(syscall.IFLA_INFO_SLAVE_KIND),
+ "IFLA_INFO_UNSPEC": ValueOf(syscall.IFLA_INFO_UNSPEC),
+ "IFLA_INFO_XSTATS": ValueOf(syscall.IFLA_INFO_XSTATS),
+ "IFLA_IPOIB_MODE": ValueOf(syscall.IFLA_IPOIB_MODE),
+ "IFLA_IPOIB_PKEY": ValueOf(syscall.IFLA_IPOIB_PKEY),
+ "IFLA_IPOIB_UMCAST": ValueOf(syscall.IFLA_IPOIB_UMCAST),
+ "IFLA_IPOIB_UNSPEC": ValueOf(syscall.IFLA_IPOIB_UNSPEC),
+ "IFLA_IPVLAN_FLAGS": ValueOf(syscall.IFLA_IPVLAN_FLAGS),
+ "IFLA_IPVLAN_MODE": ValueOf(syscall.IFLA_IPVLAN_MODE),
+ "IFLA_IPVLAN_UNSPEC": ValueOf(syscall.IFLA_IPVLAN_UNSPEC),
+ "IFLA_LINK": ValueOf(syscall.IFLA_LINK),
+ "IFLA_LINKINFO": ValueOf(syscall.IFLA_LINKINFO),
+ "IFLA_LINKMODE": ValueOf(syscall.IFLA_LINKMODE),
+ "IFLA_LINK_NETNSID": ValueOf(syscall.IFLA_LINK_NETNSID),
+ "IFLA_MACSEC_CIPHER_SUITE": ValueOf(syscall.IFLA_MACSEC_CIPHER_SUITE),
+ "IFLA_MACSEC_ENCODING_SA": ValueOf(syscall.IFLA_MACSEC_ENCODING_SA),
+ "IFLA_MACSEC_ENCRYPT": ValueOf(syscall.IFLA_MACSEC_ENCRYPT),
+ "IFLA_MACSEC_ES": ValueOf(syscall.IFLA_MACSEC_ES),
+ "IFLA_MACSEC_ICV_LEN": ValueOf(syscall.IFLA_MACSEC_ICV_LEN),
+ "IFLA_MACSEC_INC_SCI": ValueOf(syscall.IFLA_MACSEC_INC_SCI),
+ "IFLA_MACSEC_PAD": ValueOf(syscall.IFLA_MACSEC_PAD),
+ "IFLA_MACSEC_PORT": ValueOf(syscall.IFLA_MACSEC_PORT),
+ "IFLA_MACSEC_PROTECT": ValueOf(syscall.IFLA_MACSEC_PROTECT),
+ "IFLA_MACSEC_REPLAY_PROTECT": ValueOf(syscall.IFLA_MACSEC_REPLAY_PROTECT),
+ "IFLA_MACSEC_SCB": ValueOf(syscall.IFLA_MACSEC_SCB),
+ "IFLA_MACSEC_SCI": ValueOf(syscall.IFLA_MACSEC_SCI),
+ "IFLA_MACSEC_UNSPEC": ValueOf(syscall.IFLA_MACSEC_UNSPEC),
+ "IFLA_MACSEC_VALIDATION": ValueOf(syscall.IFLA_MACSEC_VALIDATION),
+ "IFLA_MACSEC_WINDOW": ValueOf(syscall.IFLA_MACSEC_WINDOW),
+ "IFLA_MACVLAN_FLAGS": ValueOf(syscall.IFLA_MACVLAN_FLAGS),
+ "IFLA_MACVLAN_MACADDR": ValueOf(syscall.IFLA_MACVLAN_MACADDR),
+ "IFLA_MACVLAN_MACADDR_COUNT": ValueOf(syscall.IFLA_MACVLAN_MACADDR_COUNT),
+ "IFLA_MACVLAN_MACADDR_DATA": ValueOf(syscall.IFLA_MACVLAN_MACADDR_DATA),
+ "IFLA_MACVLAN_MACADDR_MODE": ValueOf(syscall.IFLA_MACVLAN_MACADDR_MODE),
+ "IFLA_MACVLAN_MODE": ValueOf(syscall.IFLA_MACVLAN_MODE),
+ "IFLA_MACVLAN_UNSPEC": ValueOf(syscall.IFLA_MACVLAN_UNSPEC),
+ "IFLA_MAP": ValueOf(syscall.IFLA_MAP),
+ "IFLA_MASTER": ValueOf(syscall.IFLA_MASTER),
+ "IFLA_MTU": ValueOf(syscall.IFLA_MTU),
+ "IFLA_NET_NS_FD": ValueOf(syscall.IFLA_NET_NS_FD),
+ "IFLA_NET_NS_PID": ValueOf(syscall.IFLA_NET_NS_PID),
+ "IFLA_NEW_NETNSID": ValueOf(syscall.IFLA_NEW_NETNSID),
+ "IFLA_NUM_RX_QUEUES": ValueOf(syscall.IFLA_NUM_RX_QUEUES),
+ "IFLA_NUM_TX_QUEUES": ValueOf(syscall.IFLA_NUM_TX_QUEUES),
+ "IFLA_NUM_VF": ValueOf(syscall.IFLA_NUM_VF),
+ "IFLA_OFFLOAD_XSTATS_CPU_HIT": ValueOf(syscall.IFLA_OFFLOAD_XSTATS_CPU_HIT),
+ "IFLA_OFFLOAD_XSTATS_UNSPEC": ValueOf(syscall.IFLA_OFFLOAD_XSTATS_UNSPEC),
+ "IFLA_OPERSTATE": ValueOf(syscall.IFLA_OPERSTATE),
+ "IFLA_PAD": ValueOf(syscall.IFLA_PAD),
+ "IFLA_PHYS_PORT_ID": ValueOf(syscall.IFLA_PHYS_PORT_ID),
+ "IFLA_PHYS_PORT_NAME": ValueOf(syscall.IFLA_PHYS_PORT_NAME),
+ "IFLA_PHYS_SWITCH_ID": ValueOf(syscall.IFLA_PHYS_SWITCH_ID),
+ "IFLA_PORT_HOST_UUID": ValueOf(syscall.IFLA_PORT_HOST_UUID),
+ "IFLA_PORT_INSTANCE_UUID": ValueOf(syscall.IFLA_PORT_INSTANCE_UUID),
+ "IFLA_PORT_PROFILE": ValueOf(syscall.IFLA_PORT_PROFILE),
+ "IFLA_PORT_REQUEST": ValueOf(syscall.IFLA_PORT_REQUEST),
+ "IFLA_PORT_RESPONSE": ValueOf(syscall.IFLA_PORT_RESPONSE),
+ "IFLA_PORT_SELF": ValueOf(syscall.IFLA_PORT_SELF),
+ "IFLA_PORT_UNSPEC": ValueOf(syscall.IFLA_PORT_UNSPEC),
+ "IFLA_PORT_VF": ValueOf(syscall.IFLA_PORT_VF),
+ "IFLA_PORT_VSI_TYPE": ValueOf(syscall.IFLA_PORT_VSI_TYPE),
+ "IFLA_PPP_DEV_FD": ValueOf(syscall.IFLA_PPP_DEV_FD),
+ "IFLA_PPP_UNSPEC": ValueOf(syscall.IFLA_PPP_UNSPEC),
+ "IFLA_PRIORITY": ValueOf(syscall.IFLA_PRIORITY),
+ "IFLA_PROMISCUITY": ValueOf(syscall.IFLA_PROMISCUITY),
+ "IFLA_PROTINFO": ValueOf(syscall.IFLA_PROTINFO),
+ "IFLA_PROTO_DOWN": ValueOf(syscall.IFLA_PROTO_DOWN),
+ "IFLA_QDISC": ValueOf(syscall.IFLA_QDISC),
+ "IFLA_STATS": ValueOf(syscall.IFLA_STATS),
+ "IFLA_STATS64": ValueOf(syscall.IFLA_STATS64),
+ "IFLA_STATS_AF_SPEC": ValueOf(syscall.IFLA_STATS_AF_SPEC),
+ "IFLA_STATS_LINK_64": ValueOf(syscall.IFLA_STATS_LINK_64),
+ "IFLA_STATS_LINK_OFFLOAD_XSTATS": ValueOf(syscall.IFLA_STATS_LINK_OFFLOAD_XSTATS),
+ "IFLA_STATS_LINK_XSTATS": ValueOf(syscall.IFLA_STATS_LINK_XSTATS),
+ "IFLA_STATS_LINK_XSTATS_SLAVE": ValueOf(syscall.IFLA_STATS_LINK_XSTATS_SLAVE),
+ "IFLA_STATS_UNSPEC": ValueOf(syscall.IFLA_STATS_UNSPEC),
+ "IFLA_TXQLEN": ValueOf(syscall.IFLA_TXQLEN),
+ "IFLA_UNSPEC": ValueOf(syscall.IFLA_UNSPEC),
+ "IFLA_VFINFO_LIST": ValueOf(syscall.IFLA_VFINFO_LIST),
+ "IFLA_VF_IB_NODE_GUID": ValueOf(syscall.IFLA_VF_IB_NODE_GUID),
+ "IFLA_VF_IB_PORT_GUID": ValueOf(syscall.IFLA_VF_IB_PORT_GUID),
+ "IFLA_VF_INFO": ValueOf(syscall.IFLA_VF_INFO),
+ "IFLA_VF_INFO_UNSPEC": ValueOf(syscall.IFLA_VF_INFO_UNSPEC),
+ "IFLA_VF_LINK_STATE": ValueOf(syscall.IFLA_VF_LINK_STATE),
+ "IFLA_VF_LINK_STATE_AUTO": ValueOf(syscall.IFLA_VF_LINK_STATE_AUTO),
+ "IFLA_VF_LINK_STATE_DISABLE": ValueOf(syscall.IFLA_VF_LINK_STATE_DISABLE),
+ "IFLA_VF_LINK_STATE_ENABLE": ValueOf(syscall.IFLA_VF_LINK_STATE_ENABLE),
+ "IFLA_VF_MAC": ValueOf(syscall.IFLA_VF_MAC),
+ "IFLA_VF_PORT": ValueOf(syscall.IFLA_VF_PORT),
+ "IFLA_VF_PORTS": ValueOf(syscall.IFLA_VF_PORTS),
+ "IFLA_VF_PORT_UNSPEC": ValueOf(syscall.IFLA_VF_PORT_UNSPEC),
+ "IFLA_VF_RATE": ValueOf(syscall.IFLA_VF_RATE),
+ "IFLA_VF_RSS_QUERY_EN": ValueOf(syscall.IFLA_VF_RSS_QUERY_EN),
+ "IFLA_VF_SPOOFCHK": ValueOf(syscall.IFLA_VF_SPOOFCHK),
+ "IFLA_VF_STATS": ValueOf(syscall.IFLA_VF_STATS),
+ "IFLA_VF_STATS_BROADCAST": ValueOf(syscall.IFLA_VF_STATS_BROADCAST),
+ "IFLA_VF_STATS_MULTICAST": ValueOf(syscall.IFLA_VF_STATS_MULTICAST),
+ "IFLA_VF_STATS_PAD": ValueOf(syscall.IFLA_VF_STATS_PAD),
+ "IFLA_VF_STATS_RX_BYTES": ValueOf(syscall.IFLA_VF_STATS_RX_BYTES),
+ "IFLA_VF_STATS_RX_PACKETS": ValueOf(syscall.IFLA_VF_STATS_RX_PACKETS),
+ "IFLA_VF_STATS_TX_BYTES": ValueOf(syscall.IFLA_VF_STATS_TX_BYTES),
+ "IFLA_VF_STATS_TX_PACKETS": ValueOf(syscall.IFLA_VF_STATS_TX_PACKETS),
+ "IFLA_VF_TRUST": ValueOf(syscall.IFLA_VF_TRUST),
+ "IFLA_VF_TX_RATE": ValueOf(syscall.IFLA_VF_TX_RATE),
+ "IFLA_VF_UNSPEC": ValueOf(syscall.IFLA_VF_UNSPEC),
+ "IFLA_VF_VLAN": ValueOf(syscall.IFLA_VF_VLAN),
+ "IFLA_VF_VLAN_INFO": ValueOf(syscall.IFLA_VF_VLAN_INFO),
+ "IFLA_VF_VLAN_INFO_UNSPEC": ValueOf(syscall.IFLA_VF_VLAN_INFO_UNSPEC),
+ "IFLA_VF_VLAN_LIST": ValueOf(syscall.IFLA_VF_VLAN_LIST),
+ "IFLA_VLAN_EGRESS_QOS": ValueOf(syscall.IFLA_VLAN_EGRESS_QOS),
+ "IFLA_VLAN_FLAGS": ValueOf(syscall.IFLA_VLAN_FLAGS),
+ "IFLA_VLAN_ID": ValueOf(syscall.IFLA_VLAN_ID),
+ "IFLA_VLAN_INGRESS_QOS": ValueOf(syscall.IFLA_VLAN_INGRESS_QOS),
+ "IFLA_VLAN_PROTOCOL": ValueOf(syscall.IFLA_VLAN_PROTOCOL),
+ "IFLA_VLAN_QOS_MAPPING": ValueOf(syscall.IFLA_VLAN_QOS_MAPPING),
+ "IFLA_VLAN_QOS_UNSPEC": ValueOf(syscall.IFLA_VLAN_QOS_UNSPEC),
+ "IFLA_VLAN_UNSPEC": ValueOf(syscall.IFLA_VLAN_UNSPEC),
+ "IFLA_VRF_PORT_TABLE": ValueOf(syscall.IFLA_VRF_PORT_TABLE),
+ "IFLA_VRF_PORT_UNSPEC": ValueOf(syscall.IFLA_VRF_PORT_UNSPEC),
+ "IFLA_VRF_TABLE": ValueOf(syscall.IFLA_VRF_TABLE),
+ "IFLA_VRF_UNSPEC": ValueOf(syscall.IFLA_VRF_UNSPEC),
+ "IFLA_VXLAN_AGEING": ValueOf(syscall.IFLA_VXLAN_AGEING),
+ "IFLA_VXLAN_COLLECT_METADATA": ValueOf(syscall.IFLA_VXLAN_COLLECT_METADATA),
+ "IFLA_VXLAN_GBP": ValueOf(syscall.IFLA_VXLAN_GBP),
+ "IFLA_VXLAN_GPE": ValueOf(syscall.IFLA_VXLAN_GPE),
+ "IFLA_VXLAN_GROUP": ValueOf(syscall.IFLA_VXLAN_GROUP),
+ "IFLA_VXLAN_GROUP6": ValueOf(syscall.IFLA_VXLAN_GROUP6),
+ "IFLA_VXLAN_ID": ValueOf(syscall.IFLA_VXLAN_ID),
+ "IFLA_VXLAN_L2MISS": ValueOf(syscall.IFLA_VXLAN_L2MISS),
+ "IFLA_VXLAN_L3MISS": ValueOf(syscall.IFLA_VXLAN_L3MISS),
+ "IFLA_VXLAN_LABEL": ValueOf(syscall.IFLA_VXLAN_LABEL),
+ "IFLA_VXLAN_LEARNING": ValueOf(syscall.IFLA_VXLAN_LEARNING),
+ "IFLA_VXLAN_LIMIT": ValueOf(syscall.IFLA_VXLAN_LIMIT),
+ "IFLA_VXLAN_LINK": ValueOf(syscall.IFLA_VXLAN_LINK),
+ "IFLA_VXLAN_LOCAL": ValueOf(syscall.IFLA_VXLAN_LOCAL),
+ "IFLA_VXLAN_LOCAL6": ValueOf(syscall.IFLA_VXLAN_LOCAL6),
+ "IFLA_VXLAN_PORT": ValueOf(syscall.IFLA_VXLAN_PORT),
+ "IFLA_VXLAN_PORT_RANGE": ValueOf(syscall.IFLA_VXLAN_PORT_RANGE),
+ "IFLA_VXLAN_PROXY": ValueOf(syscall.IFLA_VXLAN_PROXY),
+ "IFLA_VXLAN_REMCSUM_NOPARTIAL": ValueOf(syscall.IFLA_VXLAN_REMCSUM_NOPARTIAL),
+ "IFLA_VXLAN_REMCSUM_RX": ValueOf(syscall.IFLA_VXLAN_REMCSUM_RX),
+ "IFLA_VXLAN_REMCSUM_TX": ValueOf(syscall.IFLA_VXLAN_REMCSUM_TX),
+ "IFLA_VXLAN_RSC": ValueOf(syscall.IFLA_VXLAN_RSC),
+ "IFLA_VXLAN_TOS": ValueOf(syscall.IFLA_VXLAN_TOS),
+ "IFLA_VXLAN_TTL": ValueOf(syscall.IFLA_VXLAN_TTL),
+ "IFLA_VXLAN_UDP_CSUM": ValueOf(syscall.IFLA_VXLAN_UDP_CSUM),
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_RX": ValueOf(syscall.IFLA_VXLAN_UDP_ZERO_CSUM6_RX),
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_TX": ValueOf(syscall.IFLA_VXLAN_UDP_ZERO_CSUM6_TX),
+ "IFLA_VXLAN_UNSPEC": ValueOf(syscall.IFLA_VXLAN_UNSPEC),
+ "IFLA_WEIGHT": ValueOf(syscall.IFLA_WEIGHT),
+ "IFLA_WIRELESS": ValueOf(syscall.IFLA_WIRELESS),
+ "IFLA_XDP": ValueOf(syscall.IFLA_XDP),
+ "IFLA_XDP_ATTACHED": ValueOf(syscall.IFLA_XDP_ATTACHED),
+ "IFLA_XDP_FD": ValueOf(syscall.IFLA_XDP_FD),
+ "IFLA_XDP_FLAGS": ValueOf(syscall.IFLA_XDP_FLAGS),
+ "IFLA_XDP_PROG_ID": ValueOf(syscall.IFLA_XDP_PROG_ID),
+ "IFLA_XDP_UNSPEC": ValueOf(syscall.IFLA_XDP_UNSPEC),
+ "IFNAMSIZ": ValueOf(syscall.IFNAMSIZ),
+ "IGNBRK": ValueOf(syscall.IGNBRK),
+ "IGNCR": ValueOf(syscall.IGNCR),
+ "IGNPAR": ValueOf(syscall.IGNPAR),
+ "IMAXBEL": ValueOf(syscall.IMAXBEL),
+ "INLCR": ValueOf(syscall.INLCR),
+ "INPCK": ValueOf(syscall.INPCK),
+ "IN_ACCESS": ValueOf(syscall.IN_ACCESS),
+ "IN_ALL_EVENTS": ValueOf(syscall.IN_ALL_EVENTS),
+ "IN_ATTRIB": ValueOf(syscall.IN_ATTRIB),
+ "IN_CLASSA_HOST": ValueOf(syscall.IN_CLASSA_HOST),
+ "IN_CLASSA_MAX": ValueOf(syscall.IN_CLASSA_MAX),
+ "IN_CLASSA_NET": ValueOf(uint32(syscall.IN_CLASSA_NET)),
+ "IN_CLASSA_NSHIFT": ValueOf(syscall.IN_CLASSA_NSHIFT),
+ "IN_CLASSB_HOST": ValueOf(syscall.IN_CLASSB_HOST),
+ "IN_CLASSB_MAX": ValueOf(syscall.IN_CLASSB_MAX),
+ "IN_CLASSB_NET": ValueOf(uint32(syscall.IN_CLASSB_NET)),
+ "IN_CLASSB_NSHIFT": ValueOf(syscall.IN_CLASSB_NSHIFT),
+ "IN_CLASSC_HOST": ValueOf(syscall.IN_CLASSC_HOST),
+ "IN_CLASSC_NET": ValueOf(uint32(syscall.IN_CLASSC_NET)),
+ "IN_CLASSC_NSHIFT": ValueOf(syscall.IN_CLASSC_NSHIFT),
+ "IN_CLOEXEC": ValueOf(syscall.IN_CLOEXEC),
+ "IN_CLOSE": ValueOf(syscall.IN_CLOSE),
+ "IN_CLOSE_NOWRITE": ValueOf(syscall.IN_CLOSE_NOWRITE),
+ "IN_CLOSE_WRITE": ValueOf(syscall.IN_CLOSE_WRITE),
+ "IN_CREATE": ValueOf(syscall.IN_CREATE),
+ "IN_DELETE": ValueOf(syscall.IN_DELETE),
+ "IN_DELETE_SELF": ValueOf(syscall.IN_DELETE_SELF),
+ "IN_DONT_FOLLOW": ValueOf(syscall.IN_DONT_FOLLOW),
+ "IN_EXCL_UNLINK": ValueOf(syscall.IN_EXCL_UNLINK),
+ "IN_IGNORED": ValueOf(syscall.IN_IGNORED),
+ "IN_ISDIR": ValueOf(syscall.IN_ISDIR),
+ "IN_LOOPBACKNET": ValueOf(syscall.IN_LOOPBACKNET),
+ "IN_MASK_ADD": ValueOf(syscall.IN_MASK_ADD),
+ "IN_MODIFY": ValueOf(syscall.IN_MODIFY),
+ "IN_MOVE": ValueOf(syscall.IN_MOVE),
+ "IN_MOVED_FROM": ValueOf(syscall.IN_MOVED_FROM),
+ "IN_MOVED_TO": ValueOf(syscall.IN_MOVED_TO),
+ "IN_MOVE_SELF": ValueOf(syscall.IN_MOVE_SELF),
+ "IN_NONBLOCK": ValueOf(syscall.IN_NONBLOCK),
+ "IN_ONESHOT": ValueOf(uint32(syscall.IN_ONESHOT)),
+ "IN_ONLYDIR": ValueOf(syscall.IN_ONLYDIR),
+ "IN_OPEN": ValueOf(syscall.IN_OPEN),
+ "IN_Q_OVERFLOW": ValueOf(syscall.IN_Q_OVERFLOW),
+ "IN_UNMOUNT": ValueOf(syscall.IN_UNMOUNT),
+ "IPPROTO_AH": ValueOf(syscall.IPPROTO_AH),
+ "IPPROTO_BEETPH": ValueOf(syscall.IPPROTO_BEETPH),
+ "IPPROTO_COMP": ValueOf(syscall.IPPROTO_COMP),
+ "IPPROTO_DCCP": ValueOf(syscall.IPPROTO_DCCP),
+ "IPPROTO_DSTOPTS": ValueOf(syscall.IPPROTO_DSTOPTS),
+ "IPPROTO_EGP": ValueOf(syscall.IPPROTO_EGP),
+ "IPPROTO_ENCAP": ValueOf(syscall.IPPROTO_ENCAP),
+ "IPPROTO_ESP": ValueOf(syscall.IPPROTO_ESP),
+ "IPPROTO_FRAGMENT": ValueOf(syscall.IPPROTO_FRAGMENT),
+ "IPPROTO_GRE": ValueOf(syscall.IPPROTO_GRE),
+ "IPPROTO_HOPOPTS": ValueOf(syscall.IPPROTO_HOPOPTS),
+ "IPPROTO_ICMP": ValueOf(syscall.IPPROTO_ICMP),
+ "IPPROTO_ICMPV6": ValueOf(syscall.IPPROTO_ICMPV6),
+ "IPPROTO_IDP": ValueOf(syscall.IPPROTO_IDP),
+ "IPPROTO_IGMP": ValueOf(syscall.IPPROTO_IGMP),
+ "IPPROTO_IP": ValueOf(syscall.IPPROTO_IP),
+ "IPPROTO_IPIP": ValueOf(syscall.IPPROTO_IPIP),
+ "IPPROTO_IPV6": ValueOf(syscall.IPPROTO_IPV6),
+ "IPPROTO_MAX": ValueOf(syscall.IPPROTO_MAX),
+ "IPPROTO_MH": ValueOf(syscall.IPPROTO_MH),
+ "IPPROTO_MPLS": ValueOf(syscall.IPPROTO_MPLS),
+ "IPPROTO_MTP": ValueOf(syscall.IPPROTO_MTP),
+ "IPPROTO_NONE": ValueOf(syscall.IPPROTO_NONE),
+ "IPPROTO_PIM": ValueOf(syscall.IPPROTO_PIM),
+ "IPPROTO_PUP": ValueOf(syscall.IPPROTO_PUP),
+ "IPPROTO_RAW": ValueOf(syscall.IPPROTO_RAW),
+ "IPPROTO_ROUTING": ValueOf(syscall.IPPROTO_ROUTING),
+ "IPPROTO_RSVP": ValueOf(syscall.IPPROTO_RSVP),
+ "IPPROTO_SCTP": ValueOf(syscall.IPPROTO_SCTP),
+ "IPPROTO_TCP": ValueOf(syscall.IPPROTO_TCP),
+ "IPPROTO_TP": ValueOf(syscall.IPPROTO_TP),
+ "IPPROTO_UDP": ValueOf(syscall.IPPROTO_UDP),
+ "IPPROTO_UDPLITE": ValueOf(syscall.IPPROTO_UDPLITE),
+ "IPV6_2292DSTOPTS": ValueOf(syscall.IPV6_2292DSTOPTS),
+ "IPV6_2292HOPLIMIT": ValueOf(syscall.IPV6_2292HOPLIMIT),
+ "IPV6_2292HOPOPTS": ValueOf(syscall.IPV6_2292HOPOPTS),
+ "IPV6_2292PKTINFO": ValueOf(syscall.IPV6_2292PKTINFO),
+ "IPV6_2292PKTOPTIONS": ValueOf(syscall.IPV6_2292PKTOPTIONS),
+ "IPV6_2292RTHDR": ValueOf(syscall.IPV6_2292RTHDR),
+ "IPV6_ADDRFORM": ValueOf(syscall.IPV6_ADDRFORM),
+ "IPV6_ADDR_PREFERENCES": ValueOf(syscall.IPV6_ADDR_PREFERENCES),
+ "IPV6_ADD_MEMBERSHIP": ValueOf(syscall.IPV6_ADD_MEMBERSHIP),
+ "IPV6_AUTHHDR": ValueOf(syscall.IPV6_AUTHHDR),
+ "IPV6_AUTOFLOWLABEL": ValueOf(syscall.IPV6_AUTOFLOWLABEL),
+ "IPV6_CHECKSUM": ValueOf(syscall.IPV6_CHECKSUM),
+ "IPV6_DONTFRAG": ValueOf(syscall.IPV6_DONTFRAG),
+ "IPV6_DROP_MEMBERSHIP": ValueOf(syscall.IPV6_DROP_MEMBERSHIP),
+ "IPV6_DSTOPTS": ValueOf(syscall.IPV6_DSTOPTS),
+ "IPV6_HDRINCL": ValueOf(syscall.IPV6_HDRINCL),
+ "IPV6_HOPLIMIT": ValueOf(syscall.IPV6_HOPLIMIT),
+ "IPV6_HOPOPTS": ValueOf(syscall.IPV6_HOPOPTS),
+ "IPV6_IPSEC_POLICY": ValueOf(syscall.IPV6_IPSEC_POLICY),
+ "IPV6_JOIN_ANYCAST": ValueOf(syscall.IPV6_JOIN_ANYCAST),
+ "IPV6_JOIN_GROUP": ValueOf(syscall.IPV6_JOIN_GROUP),
+ "IPV6_LEAVE_ANYCAST": ValueOf(syscall.IPV6_LEAVE_ANYCAST),
+ "IPV6_LEAVE_GROUP": ValueOf(syscall.IPV6_LEAVE_GROUP),
+ "IPV6_MINHOPCOUNT": ValueOf(syscall.IPV6_MINHOPCOUNT),
+ "IPV6_MTU": ValueOf(syscall.IPV6_MTU),
+ "IPV6_MTU_DISCOVER": ValueOf(syscall.IPV6_MTU_DISCOVER),
+ "IPV6_MULTICAST_HOPS": ValueOf(syscall.IPV6_MULTICAST_HOPS),
+ "IPV6_MULTICAST_IF": ValueOf(syscall.IPV6_MULTICAST_IF),
+ "IPV6_MULTICAST_LOOP": ValueOf(syscall.IPV6_MULTICAST_LOOP),
+ "IPV6_NEXTHOP": ValueOf(syscall.IPV6_NEXTHOP),
+ "IPV6_ORIGDSTADDR": ValueOf(syscall.IPV6_ORIGDSTADDR),
+ "IPV6_PATHMTU": ValueOf(syscall.IPV6_PATHMTU),
+ "IPV6_PKTINFO": ValueOf(syscall.IPV6_PKTINFO),
+ "IPV6_PMTUDISC_DO": ValueOf(syscall.IPV6_PMTUDISC_DO),
+ "IPV6_PMTUDISC_DONT": ValueOf(syscall.IPV6_PMTUDISC_DONT),
+ "IPV6_PMTUDISC_INTERFACE": ValueOf(syscall.IPV6_PMTUDISC_INTERFACE),
+ "IPV6_PMTUDISC_OMIT": ValueOf(syscall.IPV6_PMTUDISC_OMIT),
+ "IPV6_PMTUDISC_PROBE": ValueOf(syscall.IPV6_PMTUDISC_PROBE),
+ "IPV6_PMTUDISC_WANT": ValueOf(syscall.IPV6_PMTUDISC_WANT),
+ "IPV6_RECVDSTOPTS": ValueOf(syscall.IPV6_RECVDSTOPTS),
+ "IPV6_RECVERR": ValueOf(syscall.IPV6_RECVERR),
+ "IPV6_RECVFRAGSIZE": ValueOf(syscall.IPV6_RECVFRAGSIZE),
+ "IPV6_RECVHOPLIMIT": ValueOf(syscall.IPV6_RECVHOPLIMIT),
+ "IPV6_RECVHOPOPTS": ValueOf(syscall.IPV6_RECVHOPOPTS),
+ "IPV6_RECVORIGDSTADDR": ValueOf(syscall.IPV6_RECVORIGDSTADDR),
+ "IPV6_RECVPATHMTU": ValueOf(syscall.IPV6_RECVPATHMTU),
+ "IPV6_RECVPKTINFO": ValueOf(syscall.IPV6_RECVPKTINFO),
+ "IPV6_RECVRTHDR": ValueOf(syscall.IPV6_RECVRTHDR),
+ "IPV6_RECVTCLASS": ValueOf(syscall.IPV6_RECVTCLASS),
+ "IPV6_ROUTER_ALERT": ValueOf(syscall.IPV6_ROUTER_ALERT),
+ "IPV6_RTHDR": ValueOf(syscall.IPV6_RTHDR),
+ "IPV6_RTHDRDSTOPTS": ValueOf(syscall.IPV6_RTHDRDSTOPTS),
+ "IPV6_RTHDR_LOOSE": ValueOf(syscall.IPV6_RTHDR_LOOSE),
+ "IPV6_RTHDR_STRICT": ValueOf(syscall.IPV6_RTHDR_STRICT),
+ "IPV6_RTHDR_TYPE_0": ValueOf(syscall.IPV6_RTHDR_TYPE_0),
+ "IPV6_RXDSTOPTS": ValueOf(syscall.IPV6_RXDSTOPTS),
+ "IPV6_RXHOPOPTS": ValueOf(syscall.IPV6_RXHOPOPTS),
+ "IPV6_TCLASS": ValueOf(syscall.IPV6_TCLASS),
+ "IPV6_TRANSPARENT": ValueOf(syscall.IPV6_TRANSPARENT),
+ "IPV6_UNICAST_HOPS": ValueOf(syscall.IPV6_UNICAST_HOPS),
+ "IPV6_UNICAST_IF": ValueOf(syscall.IPV6_UNICAST_IF),
+ "IPV6_V6ONLY": ValueOf(syscall.IPV6_V6ONLY),
+ "IPV6_XFRM_POLICY": ValueOf(syscall.IPV6_XFRM_POLICY),
+ "IP_ADD_MEMBERSHIP": ValueOf(syscall.IP_ADD_MEMBERSHIP),
+ "IP_ADD_SOURCE_MEMBERSHIP": ValueOf(syscall.IP_ADD_SOURCE_MEMBERSHIP),
+ "IP_BIND_ADDRESS_NO_PORT": ValueOf(syscall.IP_BIND_ADDRESS_NO_PORT),
+ "IP_BLOCK_SOURCE": ValueOf(syscall.IP_BLOCK_SOURCE),
+ "IP_CHECKSUM": ValueOf(syscall.IP_CHECKSUM),
+ "IP_DEFAULT_MULTICAST_LOOP": ValueOf(syscall.IP_DEFAULT_MULTICAST_LOOP),
+ "IP_DEFAULT_MULTICAST_TTL": ValueOf(syscall.IP_DEFAULT_MULTICAST_TTL),
+ "IP_DF": ValueOf(syscall.IP_DF),
+ "IP_DROP_MEMBERSHIP": ValueOf(syscall.IP_DROP_MEMBERSHIP),
+ "IP_DROP_SOURCE_MEMBERSHIP": ValueOf(syscall.IP_DROP_SOURCE_MEMBERSHIP),
+ "IP_FREEBIND": ValueOf(syscall.IP_FREEBIND),
+ "IP_HDRINCL": ValueOf(syscall.IP_HDRINCL),
+ "IP_IPSEC_POLICY": ValueOf(syscall.IP_IPSEC_POLICY),
+ "IP_MAXPACKET": ValueOf(syscall.IP_MAXPACKET),
+ "IP_MAX_MEMBERSHIPS": ValueOf(syscall.IP_MAX_MEMBERSHIPS),
+ "IP_MF": ValueOf(syscall.IP_MF),
+ "IP_MINTTL": ValueOf(syscall.IP_MINTTL),
+ "IP_MSFILTER": ValueOf(syscall.IP_MSFILTER),
+ "IP_MSS": ValueOf(syscall.IP_MSS),
+ "IP_MTU": ValueOf(syscall.IP_MTU),
+ "IP_MTU_DISCOVER": ValueOf(syscall.IP_MTU_DISCOVER),
+ "IP_MULTICAST_ALL": ValueOf(syscall.IP_MULTICAST_ALL),
+ "IP_MULTICAST_IF": ValueOf(syscall.IP_MULTICAST_IF),
+ "IP_MULTICAST_LOOP": ValueOf(syscall.IP_MULTICAST_LOOP),
+ "IP_MULTICAST_TTL": ValueOf(syscall.IP_MULTICAST_TTL),
+ "IP_NODEFRAG": ValueOf(syscall.IP_NODEFRAG),
+ "IP_OFFMASK": ValueOf(syscall.IP_OFFMASK),
+ "IP_OPTIONS": ValueOf(syscall.IP_OPTIONS),
+ "IP_ORIGDSTADDR": ValueOf(syscall.IP_ORIGDSTADDR),
+ "IP_PASSSEC": ValueOf(syscall.IP_PASSSEC),
+ "IP_PKTINFO": ValueOf(syscall.IP_PKTINFO),
+ "IP_PKTOPTIONS": ValueOf(syscall.IP_PKTOPTIONS),
+ "IP_PMTUDISC": ValueOf(syscall.IP_PMTUDISC),
+ "IP_PMTUDISC_DO": ValueOf(syscall.IP_PMTUDISC_DO),
+ "IP_PMTUDISC_DONT": ValueOf(syscall.IP_PMTUDISC_DONT),
+ "IP_PMTUDISC_INTERFACE": ValueOf(syscall.IP_PMTUDISC_INTERFACE),
+ "IP_PMTUDISC_OMIT": ValueOf(syscall.IP_PMTUDISC_OMIT),
+ "IP_PMTUDISC_PROBE": ValueOf(syscall.IP_PMTUDISC_PROBE),
+ "IP_PMTUDISC_WANT": ValueOf(syscall.IP_PMTUDISC_WANT),
+ "IP_RECVERR": ValueOf(syscall.IP_RECVERR),
+ "IP_RECVFRAGSIZE": ValueOf(syscall.IP_RECVFRAGSIZE),
+ "IP_RECVOPTS": ValueOf(syscall.IP_RECVOPTS),
+ "IP_RECVORIGDSTADDR": ValueOf(syscall.IP_RECVORIGDSTADDR),
+ "IP_RECVTOS": ValueOf(syscall.IP_RECVTOS),
+ "IP_RECVTTL": ValueOf(syscall.IP_RECVTTL),
+ "IP_RETOPTS": ValueOf(syscall.IP_RETOPTS),
+ "IP_RF": ValueOf(syscall.IP_RF),
+ "IP_ROUTER_ALERT": ValueOf(syscall.IP_ROUTER_ALERT),
+ "IP_TOS": ValueOf(syscall.IP_TOS),
+ "IP_TRANSPARENT": ValueOf(syscall.IP_TRANSPARENT),
+ "IP_TTL": ValueOf(syscall.IP_TTL),
+ "IP_UNBLOCK_SOURCE": ValueOf(syscall.IP_UNBLOCK_SOURCE),
+ "IP_UNICAST_IF": ValueOf(syscall.IP_UNICAST_IF),
+ "IP_XFRM_POLICY": ValueOf(syscall.IP_XFRM_POLICY),
+ "ISIG": ValueOf(syscall.ISIG),
+ "ISTRIP": ValueOf(syscall.ISTRIP),
+ "IUCLC": ValueOf(syscall.IUCLC),
+ "IUTF8": ValueOf(syscall.IUTF8),
+ "IXANY": ValueOf(syscall.IXANY),
+ "IXOFF": ValueOf(syscall.IXOFF),
+ "IXON": ValueOf(syscall.IXON),
+ "ImplementsGetwd": ValueOf(syscall.ImplementsGetwd),
+ "InotifyAddWatch": ValueOf(syscall.InotifyAddWatch),
+ "InotifyInit": ValueOf(syscall.InotifyInit),
+ "InotifyInit1": ValueOf(syscall.InotifyInit1),
+ "InotifyRmWatch": ValueOf(syscall.InotifyRmWatch),
+ "Ioperm": ValueOf(syscall.Ioperm),
+ "Iopl": ValueOf(syscall.Iopl),
+ "Kill": ValueOf(syscall.Kill),
+ "Klogctl": ValueOf(syscall.Klogctl),
+ "LINUX_REBOOT_CMD_CAD_OFF": ValueOf(syscall.LINUX_REBOOT_CMD_CAD_OFF),
+ "LINUX_REBOOT_CMD_CAD_ON": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_CAD_ON)),
+ "LINUX_REBOOT_CMD_HALT": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_HALT)),
+ "LINUX_REBOOT_CMD_KEXEC": ValueOf(syscall.LINUX_REBOOT_CMD_KEXEC),
+ "LINUX_REBOOT_CMD_POWER_OFF": ValueOf(syscall.LINUX_REBOOT_CMD_POWER_OFF),
+ "LINUX_REBOOT_CMD_RESTART": ValueOf(syscall.LINUX_REBOOT_CMD_RESTART),
+ "LINUX_REBOOT_CMD_RESTART2": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_RESTART2)),
+ "LINUX_REBOOT_CMD_SW_SUSPEND": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_SW_SUSPEND)),
+ "LINUX_REBOOT_MAGIC1": ValueOf(uint32(syscall.LINUX_REBOOT_MAGIC1)),
+ "LINUX_REBOOT_MAGIC2": ValueOf(syscall.LINUX_REBOOT_MAGIC2),
+ "LINUX_REBOOT_MAGIC2A": ValueOf(syscall.LINUX_REBOOT_MAGIC2A),
+ "LINUX_REBOOT_MAGIC2B": ValueOf(syscall.LINUX_REBOOT_MAGIC2B),
+ "LINUX_REBOOT_MAGIC2C": ValueOf(syscall.LINUX_REBOOT_MAGIC2C),
+ "LOCK_EX": ValueOf(syscall.LOCK_EX),
+ "LOCK_MAND": ValueOf(syscall.LOCK_MAND),
+ "LOCK_NB": ValueOf(syscall.LOCK_NB),
+ "LOCK_READ": ValueOf(syscall.LOCK_READ),
+ "LOCK_RW": ValueOf(syscall.LOCK_RW),
+ "LOCK_SH": ValueOf(syscall.LOCK_SH),
+ "LOCK_UN": ValueOf(syscall.LOCK_UN),
+ "LOCK_WRITE": ValueOf(syscall.LOCK_WRITE),
+ "Lchown": ValueOf(syscall.Lchown),
+ "Link": ValueOf(syscall.Link),
+ "Listen": ValueOf(syscall.Listen),
+ "Listxattr": ValueOf(syscall.Listxattr),
+ "LsfJump": ValueOf(syscall.LsfJump),
+ "LsfSocket": ValueOf(syscall.LsfSocket),
+ "LsfStmt": ValueOf(syscall.LsfStmt),
+ "Lstat": ValueOf(syscall.Lstat),
+ "MADV_DODUMP": ValueOf(syscall.MADV_DODUMP),
+ "MADV_DOFORK": ValueOf(syscall.MADV_DOFORK),
+ "MADV_DONTDUMP": ValueOf(syscall.MADV_DONTDUMP),
+ "MADV_DONTFORK": ValueOf(syscall.MADV_DONTFORK),
+ "MADV_DONTNEED": ValueOf(syscall.MADV_DONTNEED),
+ "MADV_FREE": ValueOf(syscall.MADV_FREE),
+ "MADV_HUGEPAGE": ValueOf(syscall.MADV_HUGEPAGE),
+ "MADV_HWPOISON": ValueOf(syscall.MADV_HWPOISON),
+ "MADV_KEEPONFORK": ValueOf(syscall.MADV_KEEPONFORK),
+ "MADV_MERGEABLE": ValueOf(syscall.MADV_MERGEABLE),
+ "MADV_NOHUGEPAGE": ValueOf(syscall.MADV_NOHUGEPAGE),
+ "MADV_NORMAL": ValueOf(syscall.MADV_NORMAL),
+ "MADV_RANDOM": ValueOf(syscall.MADV_RANDOM),
+ "MADV_REMOVE": ValueOf(syscall.MADV_REMOVE),
+ "MADV_SEQUENTIAL": ValueOf(syscall.MADV_SEQUENTIAL),
+ "MADV_UNMERGEABLE": ValueOf(syscall.MADV_UNMERGEABLE),
+ "MADV_WILLNEED": ValueOf(syscall.MADV_WILLNEED),
+ "MADV_WIPEONFORK": ValueOf(syscall.MADV_WIPEONFORK),
+ "MAP_32BIT": ValueOf(syscall.MAP_32BIT),
+ "MAP_ANON": ValueOf(syscall.MAP_ANON),
+ "MAP_ANONYMOUS": ValueOf(syscall.MAP_ANONYMOUS),
+ "MAP_DENYWRITE": ValueOf(syscall.MAP_DENYWRITE),
+ "MAP_EXECUTABLE": ValueOf(syscall.MAP_EXECUTABLE),
+ "MAP_FILE": ValueOf(syscall.MAP_FILE),
+ "MAP_FIXED": ValueOf(syscall.MAP_FIXED),
+ "MAP_GROWSDOWN": ValueOf(syscall.MAP_GROWSDOWN),
+ "MAP_HUGETLB": ValueOf(syscall.MAP_HUGETLB),
+ "MAP_HUGE_MASK": ValueOf(syscall.MAP_HUGE_MASK),
+ "MAP_HUGE_SHIFT": ValueOf(syscall.MAP_HUGE_SHIFT),
+ "MAP_LOCKED": ValueOf(syscall.MAP_LOCKED),
+ "MAP_NONBLOCK": ValueOf(syscall.MAP_NONBLOCK),
+ "MAP_NORESERVE": ValueOf(syscall.MAP_NORESERVE),
+ "MAP_POPULATE": ValueOf(syscall.MAP_POPULATE),
+ "MAP_PRIVATE": ValueOf(syscall.MAP_PRIVATE),
+ "MAP_SHARED": ValueOf(syscall.MAP_SHARED),
+ "MAP_STACK": ValueOf(syscall.MAP_STACK),
+ "MAP_TYPE": ValueOf(syscall.MAP_TYPE),
+ "MCL_CURRENT": ValueOf(syscall.MCL_CURRENT),
+ "MCL_FUTURE": ValueOf(syscall.MCL_FUTURE),
+ "MCL_ONFAULT": ValueOf(syscall.MCL_ONFAULT),
+ "MNT_DETACH": ValueOf(syscall.MNT_DETACH),
+ "MNT_EXPIRE": ValueOf(syscall.MNT_EXPIRE),
+ "MNT_FORCE": ValueOf(syscall.MNT_FORCE),
+ "MSG_BATCH": ValueOf(syscall.MSG_BATCH),
+ "MSG_CMSG_CLOEXEC": ValueOf(syscall.MSG_CMSG_CLOEXEC),
+ "MSG_CONFIRM": ValueOf(syscall.MSG_CONFIRM),
+ "MSG_CTRUNC": ValueOf(syscall.MSG_CTRUNC),
+ "MSG_DONTROUTE": ValueOf(syscall.MSG_DONTROUTE),
+ "MSG_DONTWAIT": ValueOf(syscall.MSG_DONTWAIT),
+ "MSG_EOR": ValueOf(syscall.MSG_EOR),
+ "MSG_ERRQUEUE": ValueOf(syscall.MSG_ERRQUEUE),
+ "MSG_FASTOPEN": ValueOf(syscall.MSG_FASTOPEN),
+ "MSG_FIN": ValueOf(syscall.MSG_FIN),
+ "MSG_MORE": ValueOf(syscall.MSG_MORE),
+ "MSG_NOSIGNAL": ValueOf(syscall.MSG_NOSIGNAL),
+ "MSG_OOB": ValueOf(syscall.MSG_OOB),
+ "MSG_PEEK": ValueOf(syscall.MSG_PEEK),
+ "MSG_PROXY": ValueOf(syscall.MSG_PROXY),
+ "MSG_RST": ValueOf(syscall.MSG_RST),
+ "MSG_SYN": ValueOf(syscall.MSG_SYN),
+ "MSG_TRUNC": ValueOf(syscall.MSG_TRUNC),
+ "MSG_TRYHARD": ValueOf(syscall.MSG_TRYHARD),
+ "MSG_WAITALL": ValueOf(syscall.MSG_WAITALL),
+ "MSG_WAITFORONE": ValueOf(syscall.MSG_WAITFORONE),
+ "MSG_ZEROCOPY": ValueOf(syscall.MSG_ZEROCOPY),
+ "MS_ACTIVE": ValueOf(syscall.MS_ACTIVE),
+ "MS_ASYNC": ValueOf(syscall.MS_ASYNC),
+ "MS_BIND": ValueOf(syscall.MS_BIND),
+ "MS_BORN": ValueOf(syscall.MS_BORN),
+ "MS_DIRSYNC": ValueOf(syscall.MS_DIRSYNC),
+ "MS_INVALIDATE": ValueOf(syscall.MS_INVALIDATE),
+ "MS_I_VERSION": ValueOf(syscall.MS_I_VERSION),
+ "MS_KERNMOUNT": ValueOf(syscall.MS_KERNMOUNT),
+ "MS_LAZYTIME": ValueOf(syscall.MS_LAZYTIME),
+ "MS_MANDLOCK": ValueOf(syscall.MS_MANDLOCK),
+ "MS_MGC_MSK": ValueOf(uint32(syscall.MS_MGC_MSK)),
+ "MS_MGC_VAL": ValueOf(uint32(syscall.MS_MGC_VAL)),
+ "MS_MOVE": ValueOf(syscall.MS_MOVE),
+ "MS_NOATIME": ValueOf(syscall.MS_NOATIME),
+ "MS_NODEV": ValueOf(syscall.MS_NODEV),
+ "MS_NODIRATIME": ValueOf(syscall.MS_NODIRATIME),
+ "MS_NOEXEC": ValueOf(syscall.MS_NOEXEC),
+ "MS_NOREMOTELOCK": ValueOf(syscall.MS_NOREMOTELOCK),
+ "MS_NOSEC": ValueOf(syscall.MS_NOSEC),
+ "MS_NOSUID": ValueOf(syscall.MS_NOSUID),
+ "MS_NOUSER": ValueOf(syscall.MS_NOUSER),
+ "MS_POSIXACL": ValueOf(syscall.MS_POSIXACL),
+ "MS_PRIVATE": ValueOf(syscall.MS_PRIVATE),
+ "MS_RDONLY": ValueOf(syscall.MS_RDONLY),
+ "MS_REC": ValueOf(syscall.MS_REC),
+ "MS_RELATIME": ValueOf(syscall.MS_RELATIME),
+ "MS_REMOUNT": ValueOf(syscall.MS_REMOUNT),
+ "MS_RMT_MASK": ValueOf(syscall.MS_RMT_MASK),
+ "MS_SHARED": ValueOf(syscall.MS_SHARED),
+ "MS_SILENT": ValueOf(syscall.MS_SILENT),
+ "MS_SLAVE": ValueOf(syscall.MS_SLAVE),
+ "MS_STRICTATIME": ValueOf(syscall.MS_STRICTATIME),
+ "MS_SUBMOUNT": ValueOf(syscall.MS_SUBMOUNT),
+ "MS_SYNC": ValueOf(syscall.MS_SYNC),
+ "MS_SYNCHRONOUS": ValueOf(syscall.MS_SYNCHRONOUS),
+ "MS_UNBINDABLE": ValueOf(syscall.MS_UNBINDABLE),
+ "MS_VERBOSE": ValueOf(syscall.MS_VERBOSE),
+ "Madvise": ValueOf(syscall.Madvise),
+ "Mkdir": ValueOf(syscall.Mkdir),
+ "Mkdirat": ValueOf(syscall.Mkdirat),
+ "Mkfifo": ValueOf(syscall.Mkfifo),
+ "Mknod": ValueOf(syscall.Mknod),
+ "Mknodat": ValueOf(syscall.Mknodat),
+ "Mlock": ValueOf(syscall.Mlock),
+ "Mlockall": ValueOf(syscall.Mlockall),
+ "Mmap": ValueOf(syscall.Mmap),
+ "Mount": ValueOf(syscall.Mount),
+ "Mprotect": ValueOf(syscall.Mprotect),
+ "Munlock": ValueOf(syscall.Munlock),
+ "Munlockall": ValueOf(syscall.Munlockall),
+ "Munmap": ValueOf(syscall.Munmap),
+ "NETLINK_ADD_MEMBERSHIP": ValueOf(syscall.NETLINK_ADD_MEMBERSHIP),
+ "NETLINK_AUDIT": ValueOf(syscall.NETLINK_AUDIT),
+ "NETLINK_BROADCAST_ERROR": ValueOf(syscall.NETLINK_BROADCAST_ERROR),
+ "NETLINK_CAP_ACK": ValueOf(syscall.NETLINK_CAP_ACK),
+ "NETLINK_CONNECTED": ValueOf(syscall.NETLINK_CONNECTED),
+ "NETLINK_CONNECTOR": ValueOf(syscall.NETLINK_CONNECTOR),
+ "NETLINK_CRYPTO": ValueOf(syscall.NETLINK_CRYPTO),
+ "NETLINK_DNRTMSG": ValueOf(syscall.NETLINK_DNRTMSG),
+ "NETLINK_DROP_MEMBERSHIP": ValueOf(syscall.NETLINK_DROP_MEMBERSHIP),
+ "NETLINK_ECRYPTFS": ValueOf(syscall.NETLINK_ECRYPTFS),
+ "NETLINK_EXT_ACK": ValueOf(syscall.NETLINK_EXT_ACK),
+ "NETLINK_FIB_LOOKUP": ValueOf(syscall.NETLINK_FIB_LOOKUP),
+ "NETLINK_FIREWALL": ValueOf(syscall.NETLINK_FIREWALL),
+ "NETLINK_GENERIC": ValueOf(syscall.NETLINK_GENERIC),
+ "NETLINK_INET_DIAG": ValueOf(syscall.NETLINK_INET_DIAG),
+ "NETLINK_IP6_FW": ValueOf(syscall.NETLINK_IP6_FW),
+ "NETLINK_ISCSI": ValueOf(syscall.NETLINK_ISCSI),
+ "NETLINK_KOBJECT_UEVENT": ValueOf(syscall.NETLINK_KOBJECT_UEVENT),
+ "NETLINK_LISTEN_ALL_NSID": ValueOf(syscall.NETLINK_LISTEN_ALL_NSID),
+ "NETLINK_LIST_MEMBERSHIPS": ValueOf(syscall.NETLINK_LIST_MEMBERSHIPS),
+ "NETLINK_NETFILTER": ValueOf(syscall.NETLINK_NETFILTER),
+ "NETLINK_NFLOG": ValueOf(syscall.NETLINK_NFLOG),
+ "NETLINK_NO_ENOBUFS": ValueOf(syscall.NETLINK_NO_ENOBUFS),
+ "NETLINK_PKTINFO": ValueOf(syscall.NETLINK_PKTINFO),
+ "NETLINK_RDMA": ValueOf(syscall.NETLINK_RDMA),
+ "NETLINK_ROUTE": ValueOf(syscall.NETLINK_ROUTE),
+ "NETLINK_RX_RING": ValueOf(syscall.NETLINK_RX_RING),
+ "NETLINK_SCSITRANSPORT": ValueOf(syscall.NETLINK_SCSITRANSPORT),
+ "NETLINK_SELINUX": ValueOf(syscall.NETLINK_SELINUX),
+ "NETLINK_SMC": ValueOf(syscall.NETLINK_SMC),
+ "NETLINK_SOCK_DIAG": ValueOf(syscall.NETLINK_SOCK_DIAG),
+ "NETLINK_TX_RING": ValueOf(syscall.NETLINK_TX_RING),
+ "NETLINK_UNCONNECTED": ValueOf(syscall.NETLINK_UNCONNECTED),
+ "NETLINK_UNUSED": ValueOf(syscall.NETLINK_UNUSED),
+ "NETLINK_USERSOCK": ValueOf(syscall.NETLINK_USERSOCK),
+ "NETLINK_XFRM": ValueOf(syscall.NETLINK_XFRM),
+ "NI_DGRAM": ValueOf(syscall.NI_DGRAM),
+ "NI_IDN": ValueOf(syscall.NI_IDN),
+ "NI_IDN_ALLOW_UNASSIGNED": ValueOf(syscall.NI_IDN_ALLOW_UNASSIGNED),
+ "NI_IDN_USE_STD3_ASCII_RULES": ValueOf(syscall.NI_IDN_USE_STD3_ASCII_RULES),
+ "NI_MAXHOST": ValueOf(syscall.NI_MAXHOST),
+ "NI_MAXSERV": ValueOf(syscall.NI_MAXSERV),
+ "NI_NAMEREQD": ValueOf(syscall.NI_NAMEREQD),
+ "NI_NOFQDN": ValueOf(syscall.NI_NOFQDN),
+ "NI_NUMERICHOST": ValueOf(syscall.NI_NUMERICHOST),
+ "NI_NUMERICSERV": ValueOf(syscall.NI_NUMERICSERV),
+ "NL0": ValueOf(syscall.NL0),
+ "NL1": ValueOf(syscall.NL1),
+ "NLA_ALIGNTO": ValueOf(syscall.NLA_ALIGNTO),
+ "NLA_F_NESTED": ValueOf(syscall.NLA_F_NESTED),
+ "NLA_F_NET_BYTEORDER": ValueOf(syscall.NLA_F_NET_BYTEORDER),
+ "NLA_HDRLEN": ValueOf(syscall.NLA_HDRLEN),
+ "NLA_TYPE_MASK": ValueOf(syscall.NLA_TYPE_MASK),
+ "NLDLY": ValueOf(syscall.NLDLY),
+ "NLMSGERR_ATTR_COOKIE": ValueOf(syscall.NLMSGERR_ATTR_COOKIE),
+ "NLMSGERR_ATTR_MAX": ValueOf(syscall.NLMSGERR_ATTR_MAX),
+ "NLMSGERR_ATTR_MSG": ValueOf(syscall.NLMSGERR_ATTR_MSG),
+ "NLMSGERR_ATTR_OFFS": ValueOf(syscall.NLMSGERR_ATTR_OFFS),
+ "NLMSGERR_ATTR_UNUSED": ValueOf(syscall.NLMSGERR_ATTR_UNUSED),
+ "NLMSG_ALIGNTO": ValueOf(syscall.NLMSG_ALIGNTO),
+ "NLMSG_DONE": ValueOf(syscall.NLMSG_DONE),
+ "NLMSG_ERROR": ValueOf(syscall.NLMSG_ERROR),
+ "NLMSG_HDRLEN": ValueOf(syscall.NLMSG_HDRLEN),
+ "NLMSG_MIN_TYPE": ValueOf(syscall.NLMSG_MIN_TYPE),
+ "NLMSG_NOOP": ValueOf(syscall.NLMSG_NOOP),
+ "NLMSG_OVERRUN": ValueOf(syscall.NLMSG_OVERRUN),
+ "NLM_F_ACK": ValueOf(syscall.NLM_F_ACK),
+ "NLM_F_ACK_TLVS": ValueOf(syscall.NLM_F_ACK_TLVS),
+ "NLM_F_APPEND": ValueOf(syscall.NLM_F_APPEND),
+ "NLM_F_ATOMIC": ValueOf(syscall.NLM_F_ATOMIC),
+ "NLM_F_CAPPED": ValueOf(syscall.NLM_F_CAPPED),
+ "NLM_F_CREATE": ValueOf(syscall.NLM_F_CREATE),
+ "NLM_F_DUMP": ValueOf(syscall.NLM_F_DUMP),
+ "NLM_F_DUMP_FILTERED": ValueOf(syscall.NLM_F_DUMP_FILTERED),
+ "NLM_F_DUMP_INTR": ValueOf(syscall.NLM_F_DUMP_INTR),
+ "NLM_F_ECHO": ValueOf(syscall.NLM_F_ECHO),
+ "NLM_F_EXCL": ValueOf(syscall.NLM_F_EXCL),
+ "NLM_F_MATCH": ValueOf(syscall.NLM_F_MATCH),
+ "NLM_F_MULTI": ValueOf(syscall.NLM_F_MULTI),
+ "NLM_F_NONREC": ValueOf(syscall.NLM_F_NONREC),
+ "NLM_F_REPLACE": ValueOf(syscall.NLM_F_REPLACE),
+ "NLM_F_REQUEST": ValueOf(syscall.NLM_F_REQUEST),
+ "NLM_F_ROOT": ValueOf(syscall.NLM_F_ROOT),
+ "NOFLSH": ValueOf(syscall.NOFLSH),
+ "Nanosleep": ValueOf(syscall.Nanosleep),
+ "NetlinkRIB": ValueOf(syscall.NetlinkRIB),
+ "NsecToTimespec": ValueOf(syscall.NsecToTimespec),
+ "NsecToTimeval": ValueOf(syscall.NsecToTimeval),
+ "OCRNL": ValueOf(syscall.OCRNL),
+ "OFDEL": ValueOf(syscall.OFDEL),
+ "OFILL": ValueOf(syscall.OFILL),
+ "OLCUC": ValueOf(syscall.OLCUC),
+ "ONLCR": ValueOf(syscall.ONLCR),
+ "ONLRET": ValueOf(syscall.ONLRET),
+ "ONOCR": ValueOf(syscall.ONOCR),
+ "OPOST": ValueOf(syscall.OPOST),
+ "OS": ValueOf(syscall.OS),
+ "O_ACCMODE": ValueOf(syscall.O_ACCMODE),
+ "O_APPEND": ValueOf(syscall.O_APPEND),
+ "O_ASYNC": ValueOf(syscall.O_ASYNC),
+ "O_CLOEXEC": ValueOf(syscall.O_CLOEXEC),
+ "O_CREAT": ValueOf(syscall.O_CREAT),
+ "O_DIRECT": ValueOf(syscall.O_DIRECT),
+ "O_DIRECTORY": ValueOf(syscall.O_DIRECTORY),
+ "O_DSYNC": ValueOf(syscall.O_DSYNC),
+ "O_EXCL": ValueOf(syscall.O_EXCL),
+ "O_FSYNC": ValueOf(syscall.O_FSYNC),
+ "O_LARGEFILE": ValueOf(syscall.O_LARGEFILE),
+ "O_NDELAY": ValueOf(syscall.O_NDELAY),
+ "O_NOATIME": ValueOf(syscall.O_NOATIME),
+ "O_NOCTTY": ValueOf(syscall.O_NOCTTY),
+ "O_NOFOLLOW": ValueOf(syscall.O_NOFOLLOW),
+ "O_NONBLOCK": ValueOf(syscall.O_NONBLOCK),
+ "O_PATH": ValueOf(syscall.O_PATH),
+ "O_RDONLY": ValueOf(syscall.O_RDONLY),
+ "O_RDWR": ValueOf(syscall.O_RDWR),
+ "O_RSYNC": ValueOf(syscall.O_RSYNC),
+ "O_SYNC": ValueOf(syscall.O_SYNC),
+ "O_TMPFILE": ValueOf(syscall.O_TMPFILE),
+ "O_TRUNC": ValueOf(syscall.O_TRUNC),
+ "O_WRONLY": ValueOf(syscall.O_WRONLY),
+ "Open": ValueOf(syscall.Open),
+ "Openat": ValueOf(syscall.Openat),
+ "PACKET_ADD_MEMBERSHIP": ValueOf(syscall.PACKET_ADD_MEMBERSHIP),
+ "PACKET_AUXDATA": ValueOf(syscall.PACKET_AUXDATA),
+ "PACKET_BROADCAST": ValueOf(syscall.PACKET_BROADCAST),
+ "PACKET_COPY_THRESH": ValueOf(syscall.PACKET_COPY_THRESH),
+ "PACKET_DROP_MEMBERSHIP": ValueOf(syscall.PACKET_DROP_MEMBERSHIP),
+ "PACKET_FANOUT": ValueOf(syscall.PACKET_FANOUT),
+ "PACKET_FANOUT_DATA": ValueOf(syscall.PACKET_FANOUT_DATA),
+ "PACKET_FASTROUTE": ValueOf(syscall.PACKET_FASTROUTE),
+ "PACKET_HDRLEN": ValueOf(syscall.PACKET_HDRLEN),
+ "PACKET_HOST": ValueOf(syscall.PACKET_HOST),
+ "PACKET_LOOPBACK": ValueOf(syscall.PACKET_LOOPBACK),
+ "PACKET_LOSS": ValueOf(syscall.PACKET_LOSS),
+ "PACKET_MR_ALLMULTI": ValueOf(syscall.PACKET_MR_ALLMULTI),
+ "PACKET_MR_MULTICAST": ValueOf(syscall.PACKET_MR_MULTICAST),
+ "PACKET_MR_PROMISC": ValueOf(syscall.PACKET_MR_PROMISC),
+ "PACKET_MR_UNICAST": ValueOf(syscall.PACKET_MR_UNICAST),
+ "PACKET_MULTICAST": ValueOf(syscall.PACKET_MULTICAST),
+ "PACKET_ORIGDEV": ValueOf(syscall.PACKET_ORIGDEV),
+ "PACKET_OTHERHOST": ValueOf(syscall.PACKET_OTHERHOST),
+ "PACKET_OUTGOING": ValueOf(syscall.PACKET_OUTGOING),
+ "PACKET_QDISC_BYPASS": ValueOf(syscall.PACKET_QDISC_BYPASS),
+ "PACKET_RECV_OUTPUT": ValueOf(syscall.PACKET_RECV_OUTPUT),
+ "PACKET_RESERVE": ValueOf(syscall.PACKET_RESERVE),
+ "PACKET_ROLLOVER_STATS": ValueOf(syscall.PACKET_ROLLOVER_STATS),
+ "PACKET_RX_RING": ValueOf(syscall.PACKET_RX_RING),
+ "PACKET_STATISTICS": ValueOf(syscall.PACKET_STATISTICS),
+ "PACKET_TIMESTAMP": ValueOf(syscall.PACKET_TIMESTAMP),
+ "PACKET_TX_HAS_OFF": ValueOf(syscall.PACKET_TX_HAS_OFF),
+ "PACKET_TX_RING": ValueOf(syscall.PACKET_TX_RING),
+ "PACKET_TX_TIMESTAMP": ValueOf(syscall.PACKET_TX_TIMESTAMP),
+ "PACKET_VERSION": ValueOf(syscall.PACKET_VERSION),
+ "PACKET_VNET_HDR": ValueOf(syscall.PACKET_VNET_HDR),
+ "PARENB": ValueOf(syscall.PARENB),
+ "PARMRK": ValueOf(syscall.PARMRK),
+ "PARODD": ValueOf(syscall.PARODD),
+ "PC_2_SYMLINKS": ValueOf(syscall.PC_2_SYMLINKS),
+ "PC_ALLOC_SIZE_MIN": ValueOf(syscall.PC_ALLOC_SIZE_MIN),
+ "PC_ASYNC_IO": ValueOf(syscall.PC_ASYNC_IO),
+ "PC_CHOWN_RESTRICTED": ValueOf(syscall.PC_CHOWN_RESTRICTED),
+ "PC_FILESIZEBITS": ValueOf(syscall.PC_FILESIZEBITS),
+ "PC_LINK_MAX": ValueOf(syscall.PC_LINK_MAX),
+ "PC_MAX_CANON": ValueOf(syscall.PC_MAX_CANON),
+ "PC_MAX_INPUT": ValueOf(syscall.PC_MAX_INPUT),
+ "PC_NAME_MAX": ValueOf(syscall.PC_NAME_MAX),
+ "PC_NO_TRUNC": ValueOf(syscall.PC_NO_TRUNC),
+ "PC_PATH_MAX": ValueOf(syscall.PC_PATH_MAX),
+ "PC_PIPE_BUF": ValueOf(syscall.PC_PIPE_BUF),
+ "PC_PRIO_IO": ValueOf(syscall.PC_PRIO_IO),
+ "PC_REC_INCR_XFER_SIZE": ValueOf(syscall.PC_REC_INCR_XFER_SIZE),
+ "PC_REC_MAX_XFER_SIZE": ValueOf(syscall.PC_REC_MAX_XFER_SIZE),
+ "PC_REC_MIN_XFER_SIZE": ValueOf(syscall.PC_REC_MIN_XFER_SIZE),
+ "PC_REC_XFER_ALIGN": ValueOf(syscall.PC_REC_XFER_ALIGN),
+ "PC_SOCK_MAXBUF": ValueOf(syscall.PC_SOCK_MAXBUF),
+ "PC_SYMLINK_MAX": ValueOf(syscall.PC_SYMLINK_MAX),
+ "PC_SYNC_IO": ValueOf(syscall.PC_SYNC_IO),
+ "PC_VDISABLE": ValueOf(syscall.PC_VDISABLE),
+ "PENDIN": ValueOf(syscall.PENDIN),
+ "PRIO_MAX": ValueOf(syscall.PRIO_MAX),
+ "PRIO_MIN": ValueOf(syscall.PRIO_MIN),
+ "PRIO_PGRP": ValueOf(syscall.PRIO_PGRP),
+ "PRIO_PROCESS": ValueOf(syscall.PRIO_PROCESS),
+ "PRIO_USER": ValueOf(syscall.PRIO_USER),
+ "PROT_EXEC": ValueOf(syscall.PROT_EXEC),
+ "PROT_GROWSDOWN": ValueOf(syscall.PROT_GROWSDOWN),
+ "PROT_GROWSUP": ValueOf(syscall.PROT_GROWSUP),
+ "PROT_NONE": ValueOf(syscall.PROT_NONE),
+ "PROT_READ": ValueOf(syscall.PROT_READ),
+ "PROT_WRITE": ValueOf(syscall.PROT_WRITE),
+ "PR_CAPBSET_DROP": ValueOf(syscall.PR_CAPBSET_DROP),
+ "PR_CAPBSET_READ": ValueOf(syscall.PR_CAPBSET_READ),
+ "PR_CAP_AMBIENT": ValueOf(syscall.PR_CAP_AMBIENT),
+ "PR_CAP_AMBIENT_CLEAR_ALL": ValueOf(syscall.PR_CAP_AMBIENT_CLEAR_ALL),
+ "PR_CAP_AMBIENT_IS_SET": ValueOf(syscall.PR_CAP_AMBIENT_IS_SET),
+ "PR_CAP_AMBIENT_LOWER": ValueOf(syscall.PR_CAP_AMBIENT_LOWER),
+ "PR_CAP_AMBIENT_RAISE": ValueOf(syscall.PR_CAP_AMBIENT_RAISE),
+ "PR_ENDIAN_BIG": ValueOf(syscall.PR_ENDIAN_BIG),
+ "PR_ENDIAN_LITTLE": ValueOf(syscall.PR_ENDIAN_LITTLE),
+ "PR_ENDIAN_PPC_LITTLE": ValueOf(syscall.PR_ENDIAN_PPC_LITTLE),
+ "PR_FPEMU_NOPRINT": ValueOf(syscall.PR_FPEMU_NOPRINT),
+ "PR_FPEMU_SIGFPE": ValueOf(syscall.PR_FPEMU_SIGFPE),
+ "PR_FP_EXC_ASYNC": ValueOf(syscall.PR_FP_EXC_ASYNC),
+ "PR_FP_EXC_DISABLED": ValueOf(syscall.PR_FP_EXC_DISABLED),
+ "PR_FP_EXC_DIV": ValueOf(syscall.PR_FP_EXC_DIV),
+ "PR_FP_EXC_INV": ValueOf(syscall.PR_FP_EXC_INV),
+ "PR_FP_EXC_NONRECOV": ValueOf(syscall.PR_FP_EXC_NONRECOV),
+ "PR_FP_EXC_OVF": ValueOf(syscall.PR_FP_EXC_OVF),
+ "PR_FP_EXC_PRECISE": ValueOf(syscall.PR_FP_EXC_PRECISE),
+ "PR_FP_EXC_RES": ValueOf(syscall.PR_FP_EXC_RES),
+ "PR_FP_EXC_SW_ENABLE": ValueOf(syscall.PR_FP_EXC_SW_ENABLE),
+ "PR_FP_EXC_UND": ValueOf(syscall.PR_FP_EXC_UND),
+ "PR_FP_MODE_FR": ValueOf(syscall.PR_FP_MODE_FR),
+ "PR_FP_MODE_FRE": ValueOf(syscall.PR_FP_MODE_FRE),
+ "PR_GET_CHILD_SUBREAPER": ValueOf(syscall.PR_GET_CHILD_SUBREAPER),
+ "PR_GET_DUMPABLE": ValueOf(syscall.PR_GET_DUMPABLE),
+ "PR_GET_ENDIAN": ValueOf(syscall.PR_GET_ENDIAN),
+ "PR_GET_FPEMU": ValueOf(syscall.PR_GET_FPEMU),
+ "PR_GET_FPEXC": ValueOf(syscall.PR_GET_FPEXC),
+ "PR_GET_FP_MODE": ValueOf(syscall.PR_GET_FP_MODE),
+ "PR_GET_KEEPCAPS": ValueOf(syscall.PR_GET_KEEPCAPS),
+ "PR_GET_NAME": ValueOf(syscall.PR_GET_NAME),
+ "PR_GET_NO_NEW_PRIVS": ValueOf(syscall.PR_GET_NO_NEW_PRIVS),
+ "PR_GET_PDEATHSIG": ValueOf(syscall.PR_GET_PDEATHSIG),
+ "PR_GET_SECCOMP": ValueOf(syscall.PR_GET_SECCOMP),
+ "PR_GET_SECUREBITS": ValueOf(syscall.PR_GET_SECUREBITS),
+ "PR_GET_THP_DISABLE": ValueOf(syscall.PR_GET_THP_DISABLE),
+ "PR_GET_TID_ADDRESS": ValueOf(syscall.PR_GET_TID_ADDRESS),
+ "PR_GET_TIMERSLACK": ValueOf(syscall.PR_GET_TIMERSLACK),
+ "PR_GET_TIMING": ValueOf(syscall.PR_GET_TIMING),
+ "PR_GET_TSC": ValueOf(syscall.PR_GET_TSC),
+ "PR_GET_UNALIGN": ValueOf(syscall.PR_GET_UNALIGN),
+ "PR_MCE_KILL": ValueOf(syscall.PR_MCE_KILL),
+ "PR_MCE_KILL_CLEAR": ValueOf(syscall.PR_MCE_KILL_CLEAR),
+ "PR_MCE_KILL_DEFAULT": ValueOf(syscall.PR_MCE_KILL_DEFAULT),
+ "PR_MCE_KILL_EARLY": ValueOf(syscall.PR_MCE_KILL_EARLY),
+ "PR_MCE_KILL_GET": ValueOf(syscall.PR_MCE_KILL_GET),
+ "PR_MCE_KILL_LATE": ValueOf(syscall.PR_MCE_KILL_LATE),
+ "PR_MCE_KILL_SET": ValueOf(syscall.PR_MCE_KILL_SET),
+ "PR_MPX_DISABLE_MANAGEMENT": ValueOf(syscall.PR_MPX_DISABLE_MANAGEMENT),
+ "PR_MPX_ENABLE_MANAGEMENT": ValueOf(syscall.PR_MPX_ENABLE_MANAGEMENT),
+ "PR_SET_CHILD_SUBREAPER": ValueOf(syscall.PR_SET_CHILD_SUBREAPER),
+ "PR_SET_DUMPABLE": ValueOf(syscall.PR_SET_DUMPABLE),
+ "PR_SET_ENDIAN": ValueOf(syscall.PR_SET_ENDIAN),
+ "PR_SET_FPEMU": ValueOf(syscall.PR_SET_FPEMU),
+ "PR_SET_FPEXC": ValueOf(syscall.PR_SET_FPEXC),
+ "PR_SET_FP_MODE": ValueOf(syscall.PR_SET_FP_MODE),
+ "PR_SET_KEEPCAPS": ValueOf(syscall.PR_SET_KEEPCAPS),
+ "PR_SET_MM": ValueOf(syscall.PR_SET_MM),
+ "PR_SET_MM_ARG_END": ValueOf(syscall.PR_SET_MM_ARG_END),
+ "PR_SET_MM_ARG_START": ValueOf(syscall.PR_SET_MM_ARG_START),
+ "PR_SET_MM_AUXV": ValueOf(syscall.PR_SET_MM_AUXV),
+ "PR_SET_MM_BRK": ValueOf(syscall.PR_SET_MM_BRK),
+ "PR_SET_MM_END_CODE": ValueOf(syscall.PR_SET_MM_END_CODE),
+ "PR_SET_MM_END_DATA": ValueOf(syscall.PR_SET_MM_END_DATA),
+ "PR_SET_MM_ENV_END": ValueOf(syscall.PR_SET_MM_ENV_END),
+ "PR_SET_MM_ENV_START": ValueOf(syscall.PR_SET_MM_ENV_START),
+ "PR_SET_MM_EXE_FILE": ValueOf(syscall.PR_SET_MM_EXE_FILE),
+ "PR_SET_MM_MAP": ValueOf(syscall.PR_SET_MM_MAP),
+ "PR_SET_MM_MAP_SIZE": ValueOf(syscall.PR_SET_MM_MAP_SIZE),
+ "PR_SET_MM_START_BRK": ValueOf(syscall.PR_SET_MM_START_BRK),
+ "PR_SET_MM_START_CODE": ValueOf(syscall.PR_SET_MM_START_CODE),
+ "PR_SET_MM_START_DATA": ValueOf(syscall.PR_SET_MM_START_DATA),
+ "PR_SET_MM_START_STACK": ValueOf(syscall.PR_SET_MM_START_STACK),
+ "PR_SET_NAME": ValueOf(syscall.PR_SET_NAME),
+ "PR_SET_NO_NEW_PRIVS": ValueOf(syscall.PR_SET_NO_NEW_PRIVS),
+ "PR_SET_PDEATHSIG": ValueOf(syscall.PR_SET_PDEATHSIG),
+ "PR_SET_PTRACER": ValueOf(syscall.PR_SET_PTRACER),
+ "PR_SET_SECCOMP": ValueOf(syscall.PR_SET_SECCOMP),
+ "PR_SET_SECUREBITS": ValueOf(syscall.PR_SET_SECUREBITS),
+ "PR_SET_THP_DISABLE": ValueOf(syscall.PR_SET_THP_DISABLE),
+ "PR_SET_TIMERSLACK": ValueOf(syscall.PR_SET_TIMERSLACK),
+ "PR_SET_TIMING": ValueOf(syscall.PR_SET_TIMING),
+ "PR_SET_TSC": ValueOf(syscall.PR_SET_TSC),
+ "PR_SET_UNALIGN": ValueOf(syscall.PR_SET_UNALIGN),
+ "PR_SVE_GET_VL": ValueOf(syscall.PR_SVE_GET_VL),
+ "PR_SVE_SET_VL": ValueOf(syscall.PR_SVE_SET_VL),
+ "PR_SVE_SET_VL_ONEXEC": ValueOf(syscall.PR_SVE_SET_VL_ONEXEC),
+ "PR_SVE_VL_INHERIT": ValueOf(syscall.PR_SVE_VL_INHERIT),
+ "PR_SVE_VL_LEN_MASK": ValueOf(syscall.PR_SVE_VL_LEN_MASK),
+ "PR_TASK_PERF_EVENTS_DISABLE": ValueOf(syscall.PR_TASK_PERF_EVENTS_DISABLE),
+ "PR_TASK_PERF_EVENTS_ENABLE": ValueOf(syscall.PR_TASK_PERF_EVENTS_ENABLE),
+ "PR_TIMING_STATISTICAL": ValueOf(syscall.PR_TIMING_STATISTICAL),
+ "PR_TIMING_TIMESTAMP": ValueOf(syscall.PR_TIMING_TIMESTAMP),
+ "PR_TSC_ENABLE": ValueOf(syscall.PR_TSC_ENABLE),
+ "PR_TSC_SIGSEGV": ValueOf(syscall.PR_TSC_SIGSEGV),
+ "PR_UNALIGN_NOPRINT": ValueOf(syscall.PR_UNALIGN_NOPRINT),
+ "PR_UNALIGN_SIGBUS": ValueOf(syscall.PR_UNALIGN_SIGBUS),
+ "PTRACE_ARCH_PRCTL": ValueOf(syscall.PTRACE_ARCH_PRCTL),
+ "PTRACE_ATTACH": ValueOf(syscall.PTRACE_ATTACH),
+ "PTRACE_CONT": ValueOf(syscall.PTRACE_CONT),
+ "PTRACE_DETACH": ValueOf(syscall.PTRACE_DETACH),
+ "PTRACE_EVENT_CLONE": ValueOf(syscall.PTRACE_EVENT_CLONE),
+ "PTRACE_EVENT_EXEC": ValueOf(syscall.PTRACE_EVENT_EXEC),
+ "PTRACE_EVENT_EXIT": ValueOf(syscall.PTRACE_EVENT_EXIT),
+ "PTRACE_EVENT_FORK": ValueOf(syscall.PTRACE_EVENT_FORK),
+ "PTRACE_EVENT_SECCOMP": ValueOf(syscall.PTRACE_EVENT_SECCOMP),
+ "PTRACE_EVENT_STOP": ValueOf(syscall.PTRACE_EVENT_STOP),
+ "PTRACE_EVENT_VFORK": ValueOf(syscall.PTRACE_EVENT_VFORK),
+ "PTRACE_EVENT_VFORK_DONE": ValueOf(syscall.PTRACE_EVENT_VFORK_DONE),
+ "PTRACE_GETEVENTMSG": ValueOf(syscall.PTRACE_GETEVENTMSG),
+ "PTRACE_GETFPREGS": ValueOf(syscall.PTRACE_GETFPREGS),
+ "PTRACE_GETFPXREGS": ValueOf(syscall.PTRACE_GETFPXREGS),
+ "PTRACE_GETREGS": ValueOf(syscall.PTRACE_GETREGS),
+ "PTRACE_GETREGSET": ValueOf(syscall.PTRACE_GETREGSET),
+ "PTRACE_GETSIGINFO": ValueOf(syscall.PTRACE_GETSIGINFO),
+ "PTRACE_GETSIGMASK": ValueOf(syscall.PTRACE_GETSIGMASK),
+ "PTRACE_GET_THREAD_AREA": ValueOf(syscall.PTRACE_GET_THREAD_AREA),
+ "PTRACE_INTERRUPT": ValueOf(syscall.PTRACE_INTERRUPT),
+ "PTRACE_KILL": ValueOf(syscall.PTRACE_KILL),
+ "PTRACE_LISTEN": ValueOf(syscall.PTRACE_LISTEN),
+ "PTRACE_OLDSETOPTIONS": ValueOf(syscall.PTRACE_OLDSETOPTIONS),
+ "PTRACE_O_EXITKILL": ValueOf(syscall.PTRACE_O_EXITKILL),
+ "PTRACE_O_MASK": ValueOf(syscall.PTRACE_O_MASK),
+ "PTRACE_O_SUSPEND_SECCOMP": ValueOf(syscall.PTRACE_O_SUSPEND_SECCOMP),
+ "PTRACE_O_TRACECLONE": ValueOf(syscall.PTRACE_O_TRACECLONE),
+ "PTRACE_O_TRACEEXEC": ValueOf(syscall.PTRACE_O_TRACEEXEC),
+ "PTRACE_O_TRACEEXIT": ValueOf(syscall.PTRACE_O_TRACEEXIT),
+ "PTRACE_O_TRACEFORK": ValueOf(syscall.PTRACE_O_TRACEFORK),
+ "PTRACE_O_TRACESECCOMP": ValueOf(syscall.PTRACE_O_TRACESECCOMP),
+ "PTRACE_O_TRACESYSGOOD": ValueOf(syscall.PTRACE_O_TRACESYSGOOD),
+ "PTRACE_O_TRACEVFORK": ValueOf(syscall.PTRACE_O_TRACEVFORK),
+ "PTRACE_O_TRACEVFORKDONE": ValueOf(syscall.PTRACE_O_TRACEVFORKDONE),
+ "PTRACE_PEEKDATA": ValueOf(syscall.PTRACE_PEEKDATA),
+ "PTRACE_PEEKSIGINFO": ValueOf(syscall.PTRACE_PEEKSIGINFO),
+ "PTRACE_PEEKSIGINFO_SHARED": ValueOf(syscall.PTRACE_PEEKSIGINFO_SHARED),
+ "PTRACE_PEEKTEXT": ValueOf(syscall.PTRACE_PEEKTEXT),
+ "PTRACE_PEEKUSER": ValueOf(syscall.PTRACE_PEEKUSER),
+ "PTRACE_PEEKUSR": ValueOf(syscall.PTRACE_PEEKUSR),
+ "PTRACE_POKEDATA": ValueOf(syscall.PTRACE_POKEDATA),
+ "PTRACE_POKETEXT": ValueOf(syscall.PTRACE_POKETEXT),
+ "PTRACE_POKEUSER": ValueOf(syscall.PTRACE_POKEUSER),
+ "PTRACE_POKEUSR": ValueOf(syscall.PTRACE_POKEUSR),
+ "PTRACE_SECCOMP_GET_FILTER": ValueOf(syscall.PTRACE_SECCOMP_GET_FILTER),
+ "PTRACE_SEIZE": ValueOf(syscall.PTRACE_SEIZE),
+ "PTRACE_SETFPREGS": ValueOf(syscall.PTRACE_SETFPREGS),
+ "PTRACE_SETFPXREGS": ValueOf(syscall.PTRACE_SETFPXREGS),
+ "PTRACE_SETOPTIONS": ValueOf(syscall.PTRACE_SETOPTIONS),
+ "PTRACE_SETREGS": ValueOf(syscall.PTRACE_SETREGS),
+ "PTRACE_SETREGSET": ValueOf(syscall.PTRACE_SETREGSET),
+ "PTRACE_SETSIGINFO": ValueOf(syscall.PTRACE_SETSIGINFO),
+ "PTRACE_SETSIGMASK": ValueOf(syscall.PTRACE_SETSIGMASK),
+ "PTRACE_SET_THREAD_AREA": ValueOf(syscall.PTRACE_SET_THREAD_AREA),
+ "PTRACE_SINGLEBLOCK": ValueOf(syscall.PTRACE_SINGLEBLOCK),
+ "PTRACE_SINGLESTEP": ValueOf(syscall.PTRACE_SINGLESTEP),
+ "PTRACE_SYSCALL": ValueOf(syscall.PTRACE_SYSCALL),
+ "PTRACE_SYSEMU": ValueOf(syscall.PTRACE_SYSEMU),
+ "PTRACE_SYSEMU_SINGLESTEP": ValueOf(syscall.PTRACE_SYSEMU_SINGLESTEP),
+ "PTRACE_TRACEME": ValueOf(syscall.PTRACE_TRACEME),
+ "ParseDirent": ValueOf(syscall.ParseDirent),
+ "ParseNetlinkMessage": ValueOf(syscall.ParseNetlinkMessage),
+ "ParseNetlinkRouteAttr": ValueOf(syscall.ParseNetlinkRouteAttr),
+ "ParseSocketControlMessage": ValueOf(syscall.ParseSocketControlMessage),
+ "ParseUnixCredentials": ValueOf(syscall.ParseUnixCredentials),
+ "ParseUnixRights": ValueOf(syscall.ParseUnixRights),
+ "PathMax": ValueOf(syscall.PathMax),
+ "Pause": ValueOf(syscall.Pause),
+ "Pipe": ValueOf(syscall.Pipe),
+ "Pipe2": ValueOf(syscall.Pipe2),
+ "PivotRoot": ValueOf(syscall.PivotRoot),
+ "Pread": ValueOf(syscall.Pread),
+ "PtraceAttach": ValueOf(syscall.PtraceAttach),
+ "PtraceCont": ValueOf(syscall.PtraceCont),
+ "PtraceDetach": ValueOf(syscall.PtraceDetach),
+ "PtraceGetEventMsg": ValueOf(syscall.PtraceGetEventMsg),
+ "PtraceGetRegs": ValueOf(syscall.PtraceGetRegs),
+ "PtracePeekData": ValueOf(syscall.PtracePeekData),
+ "PtracePeekText": ValueOf(syscall.PtracePeekText),
+ "PtracePokeData": ValueOf(syscall.PtracePokeData),
+ "PtracePokeText": ValueOf(syscall.PtracePokeText),
+ "PtraceSetOptions": ValueOf(syscall.PtraceSetOptions),
+ "PtraceSetRegs": ValueOf(syscall.PtraceSetRegs),
+ "PtraceSingleStep": ValueOf(syscall.PtraceSingleStep),
+ "Pwrite": ValueOf(syscall.Pwrite),
+ "RLIMIT_AS": ValueOf(syscall.RLIMIT_AS),
+ "RLIMIT_CORE": ValueOf(syscall.RLIMIT_CORE),
+ "RLIMIT_CPU": ValueOf(syscall.RLIMIT_CPU),
+ "RLIMIT_DATA": ValueOf(syscall.RLIMIT_DATA),
+ "RLIMIT_FSIZE": ValueOf(syscall.RLIMIT_FSIZE),
+ "RLIMIT_NOFILE": ValueOf(syscall.RLIMIT_NOFILE),
+ "RLIMIT_STACK": ValueOf(syscall.RLIMIT_STACK),
+ "RLIM_INFINITY": ValueOf(uint64(syscall.RLIM_INFINITY)),
+ "RLIM_SAVED_CUR": ValueOf(uint64(syscall.RLIM_SAVED_CUR)),
+ "RLIM_SAVED_MAX": ValueOf(uint64(syscall.RLIM_SAVED_MAX)),
+ "RTAX_ADVMSS": ValueOf(syscall.RTAX_ADVMSS),
+ "RTAX_CC_ALGO": ValueOf(syscall.RTAX_CC_ALGO),
+ "RTAX_CWND": ValueOf(syscall.RTAX_CWND),
+ "RTAX_FASTOPEN_NO_COOKIE": ValueOf(syscall.RTAX_FASTOPEN_NO_COOKIE),
+ "RTAX_FEATURES": ValueOf(syscall.RTAX_FEATURES),
+ "RTAX_FEATURE_ALLFRAG": ValueOf(syscall.RTAX_FEATURE_ALLFRAG),
+ "RTAX_FEATURE_ECN": ValueOf(syscall.RTAX_FEATURE_ECN),
+ "RTAX_FEATURE_MASK": ValueOf(syscall.RTAX_FEATURE_MASK),
+ "RTAX_FEATURE_SACK": ValueOf(syscall.RTAX_FEATURE_SACK),
+ "RTAX_FEATURE_TIMESTAMP": ValueOf(syscall.RTAX_FEATURE_TIMESTAMP),
+ "RTAX_HOPLIMIT": ValueOf(syscall.RTAX_HOPLIMIT),
+ "RTAX_INITCWND": ValueOf(syscall.RTAX_INITCWND),
+ "RTAX_INITRWND": ValueOf(syscall.RTAX_INITRWND),
+ "RTAX_LOCK": ValueOf(syscall.RTAX_LOCK),
+ "RTAX_MTU": ValueOf(syscall.RTAX_MTU),
+ "RTAX_QUICKACK": ValueOf(syscall.RTAX_QUICKACK),
+ "RTAX_REORDERING": ValueOf(syscall.RTAX_REORDERING),
+ "RTAX_RTO_MIN": ValueOf(syscall.RTAX_RTO_MIN),
+ "RTAX_RTT": ValueOf(syscall.RTAX_RTT),
+ "RTAX_RTTVAR": ValueOf(syscall.RTAX_RTTVAR),
+ "RTAX_SSTHRESH": ValueOf(syscall.RTAX_SSTHRESH),
+ "RTAX_UNSPEC": ValueOf(syscall.RTAX_UNSPEC),
+ "RTAX_WINDOW": ValueOf(syscall.RTAX_WINDOW),
+ "RTA_ALIGNTO": ValueOf(syscall.RTA_ALIGNTO),
+ "RTA_CACHEINFO": ValueOf(syscall.RTA_CACHEINFO),
+ "RTA_DST": ValueOf(syscall.RTA_DST),
+ "RTA_ENCAP": ValueOf(syscall.RTA_ENCAP),
+ "RTA_ENCAP_TYPE": ValueOf(syscall.RTA_ENCAP_TYPE),
+ "RTA_EXPIRES": ValueOf(syscall.RTA_EXPIRES),
+ "RTA_FLOW": ValueOf(syscall.RTA_FLOW),
+ "RTA_GATEWAY": ValueOf(syscall.RTA_GATEWAY),
+ "RTA_IIF": ValueOf(syscall.RTA_IIF),
+ "RTA_MARK": ValueOf(syscall.RTA_MARK),
+ "RTA_METRICS": ValueOf(syscall.RTA_METRICS),
+ "RTA_MFC_STATS": ValueOf(syscall.RTA_MFC_STATS),
+ "RTA_MP_ALGO": ValueOf(syscall.RTA_MP_ALGO),
+ "RTA_MULTIPATH": ValueOf(syscall.RTA_MULTIPATH),
+ "RTA_NEWDST": ValueOf(syscall.RTA_NEWDST),
+ "RTA_OIF": ValueOf(syscall.RTA_OIF),
+ "RTA_PAD": ValueOf(syscall.RTA_PAD),
+ "RTA_PREF": ValueOf(syscall.RTA_PREF),
+ "RTA_PREFSRC": ValueOf(syscall.RTA_PREFSRC),
+ "RTA_PRIORITY": ValueOf(syscall.RTA_PRIORITY),
+ "RTA_PROTOINFO": ValueOf(syscall.RTA_PROTOINFO),
+ "RTA_SESSION": ValueOf(syscall.RTA_SESSION),
+ "RTA_SRC": ValueOf(syscall.RTA_SRC),
+ "RTA_TABLE": ValueOf(syscall.RTA_TABLE),
+ "RTA_TTL_PROPAGATE": ValueOf(syscall.RTA_TTL_PROPAGATE),
+ "RTA_UID": ValueOf(syscall.RTA_UID),
+ "RTA_UNSPEC": ValueOf(syscall.RTA_UNSPEC),
+ "RTA_VIA": ValueOf(syscall.RTA_VIA),
+ "RTCF_DIRECTSRC": ValueOf(syscall.RTCF_DIRECTSRC),
+ "RTCF_DOREDIRECT": ValueOf(syscall.RTCF_DOREDIRECT),
+ "RTCF_LOG": ValueOf(syscall.RTCF_LOG),
+ "RTCF_MASQ": ValueOf(syscall.RTCF_MASQ),
+ "RTCF_NAT": ValueOf(syscall.RTCF_NAT),
+ "RTCF_VALVE": ValueOf(syscall.RTCF_VALVE),
+ "RTF_ADDRCLASSMASK": ValueOf(uint32(syscall.RTF_ADDRCLASSMASK)),
+ "RTF_ADDRCONF": ValueOf(syscall.RTF_ADDRCONF),
+ "RTF_ALLONLINK": ValueOf(syscall.RTF_ALLONLINK),
+ "RTF_BROADCAST": ValueOf(syscall.RTF_BROADCAST),
+ "RTF_CACHE": ValueOf(syscall.RTF_CACHE),
+ "RTF_DEFAULT": ValueOf(syscall.RTF_DEFAULT),
+ "RTF_DYNAMIC": ValueOf(syscall.RTF_DYNAMIC),
+ "RTF_FLOW": ValueOf(syscall.RTF_FLOW),
+ "RTF_GATEWAY": ValueOf(syscall.RTF_GATEWAY),
+ "RTF_HOST": ValueOf(syscall.RTF_HOST),
+ "RTF_INTERFACE": ValueOf(syscall.RTF_INTERFACE),
+ "RTF_IRTT": ValueOf(syscall.RTF_IRTT),
+ "RTF_LINKRT": ValueOf(syscall.RTF_LINKRT),
+ "RTF_LOCAL": ValueOf(uint32(syscall.RTF_LOCAL)),
+ "RTF_MODIFIED": ValueOf(syscall.RTF_MODIFIED),
+ "RTF_MSS": ValueOf(syscall.RTF_MSS),
+ "RTF_MTU": ValueOf(syscall.RTF_MTU),
+ "RTF_MULTICAST": ValueOf(syscall.RTF_MULTICAST),
+ "RTF_NAT": ValueOf(syscall.RTF_NAT),
+ "RTF_NOFORWARD": ValueOf(syscall.RTF_NOFORWARD),
+ "RTF_NONEXTHOP": ValueOf(syscall.RTF_NONEXTHOP),
+ "RTF_NOPMTUDISC": ValueOf(syscall.RTF_NOPMTUDISC),
+ "RTF_POLICY": ValueOf(syscall.RTF_POLICY),
+ "RTF_REINSTATE": ValueOf(syscall.RTF_REINSTATE),
+ "RTF_REJECT": ValueOf(syscall.RTF_REJECT),
+ "RTF_STATIC": ValueOf(syscall.RTF_STATIC),
+ "RTF_THROW": ValueOf(syscall.RTF_THROW),
+ "RTF_UP": ValueOf(syscall.RTF_UP),
+ "RTF_WINDOW": ValueOf(syscall.RTF_WINDOW),
+ "RTF_XRESOLVE": ValueOf(syscall.RTF_XRESOLVE),
+ "RTMGRP_DECnet_IFADDR": ValueOf(syscall.RTMGRP_DECnet_IFADDR),
+ "RTMGRP_DECnet_ROUTE": ValueOf(syscall.RTMGRP_DECnet_ROUTE),
+ "RTMGRP_IPV4_IFADDR": ValueOf(syscall.RTMGRP_IPV4_IFADDR),
+ "RTMGRP_IPV4_MROUTE": ValueOf(syscall.RTMGRP_IPV4_MROUTE),
+ "RTMGRP_IPV4_ROUTE": ValueOf(syscall.RTMGRP_IPV4_ROUTE),
+ "RTMGRP_IPV4_RULE": ValueOf(syscall.RTMGRP_IPV4_RULE),
+ "RTMGRP_IPV6_IFADDR": ValueOf(syscall.RTMGRP_IPV6_IFADDR),
+ "RTMGRP_IPV6_IFINFO": ValueOf(syscall.RTMGRP_IPV6_IFINFO),
+ "RTMGRP_IPV6_MROUTE": ValueOf(syscall.RTMGRP_IPV6_MROUTE),
+ "RTMGRP_IPV6_PREFIX": ValueOf(syscall.RTMGRP_IPV6_PREFIX),
+ "RTMGRP_IPV6_ROUTE": ValueOf(syscall.RTMGRP_IPV6_ROUTE),
+ "RTMGRP_LINK": ValueOf(syscall.RTMGRP_LINK),
+ "RTMGRP_NEIGH": ValueOf(syscall.RTMGRP_NEIGH),
+ "RTMGRP_NOTIFY": ValueOf(syscall.RTMGRP_NOTIFY),
+ "RTMGRP_TC": ValueOf(syscall.RTMGRP_TC),
+ "RTMSG_AR_FAILED": ValueOf(syscall.RTMSG_AR_FAILED),
+ "RTMSG_CONTROL": ValueOf(syscall.RTMSG_CONTROL),
+ "RTMSG_DELDEVICE": ValueOf(syscall.RTMSG_DELDEVICE),
+ "RTMSG_DELROUTE": ValueOf(syscall.RTMSG_DELROUTE),
+ "RTMSG_DELRULE": ValueOf(syscall.RTMSG_DELRULE),
+ "RTMSG_NEWDEVICE": ValueOf(syscall.RTMSG_NEWDEVICE),
+ "RTMSG_NEWROUTE": ValueOf(syscall.RTMSG_NEWROUTE),
+ "RTMSG_NEWRULE": ValueOf(syscall.RTMSG_NEWRULE),
+ "RTMSG_OVERRUN": ValueOf(syscall.RTMSG_OVERRUN),
+ "RTM_BASE": ValueOf(syscall.RTM_BASE),
+ "RTM_DELACTION": ValueOf(syscall.RTM_DELACTION),
+ "RTM_DELADDR": ValueOf(syscall.RTM_DELADDR),
+ "RTM_DELADDRLABEL": ValueOf(syscall.RTM_DELADDRLABEL),
+ "RTM_DELLINK": ValueOf(syscall.RTM_DELLINK),
+ "RTM_DELMDB": ValueOf(syscall.RTM_DELMDB),
+ "RTM_DELNEIGH": ValueOf(syscall.RTM_DELNEIGH),
+ "RTM_DELNETCONF": ValueOf(syscall.RTM_DELNETCONF),
+ "RTM_DELNSID": ValueOf(syscall.RTM_DELNSID),
+ "RTM_DELQDISC": ValueOf(syscall.RTM_DELQDISC),
+ "RTM_DELROUTE": ValueOf(syscall.RTM_DELROUTE),
+ "RTM_DELRULE": ValueOf(syscall.RTM_DELRULE),
+ "RTM_DELTCLASS": ValueOf(syscall.RTM_DELTCLASS),
+ "RTM_DELTFILTER": ValueOf(syscall.RTM_DELTFILTER),
+ "RTM_F_CLONED": ValueOf(syscall.RTM_F_CLONED),
+ "RTM_F_EQUALIZE": ValueOf(syscall.RTM_F_EQUALIZE),
+ "RTM_F_FIB_MATCH": ValueOf(syscall.RTM_F_FIB_MATCH),
+ "RTM_F_LOOKUP_TABLE": ValueOf(syscall.RTM_F_LOOKUP_TABLE),
+ "RTM_F_NOTIFY": ValueOf(syscall.RTM_F_NOTIFY),
+ "RTM_F_PREFIX": ValueOf(syscall.RTM_F_PREFIX),
+ "RTM_GETACTION": ValueOf(syscall.RTM_GETACTION),
+ "RTM_GETADDR": ValueOf(syscall.RTM_GETADDR),
+ "RTM_GETADDRLABEL": ValueOf(syscall.RTM_GETADDRLABEL),
+ "RTM_GETANYCAST": ValueOf(syscall.RTM_GETANYCAST),
+ "RTM_GETDCB": ValueOf(syscall.RTM_GETDCB),
+ "RTM_GETLINK": ValueOf(syscall.RTM_GETLINK),
+ "RTM_GETMDB": ValueOf(syscall.RTM_GETMDB),
+ "RTM_GETMULTICAST": ValueOf(syscall.RTM_GETMULTICAST),
+ "RTM_GETNEIGH": ValueOf(syscall.RTM_GETNEIGH),
+ "RTM_GETNEIGHTBL": ValueOf(syscall.RTM_GETNEIGHTBL),
+ "RTM_GETNETCONF": ValueOf(syscall.RTM_GETNETCONF),
+ "RTM_GETNSID": ValueOf(syscall.RTM_GETNSID),
+ "RTM_GETQDISC": ValueOf(syscall.RTM_GETQDISC),
+ "RTM_GETROUTE": ValueOf(syscall.RTM_GETROUTE),
+ "RTM_GETRULE": ValueOf(syscall.RTM_GETRULE),
+ "RTM_GETSTATS": ValueOf(syscall.RTM_GETSTATS),
+ "RTM_GETTCLASS": ValueOf(syscall.RTM_GETTCLASS),
+ "RTM_GETTFILTER": ValueOf(syscall.RTM_GETTFILTER),
+ "RTM_NEWACTION": ValueOf(syscall.RTM_NEWACTION),
+ "RTM_NEWADDR": ValueOf(syscall.RTM_NEWADDR),
+ "RTM_NEWADDRLABEL": ValueOf(syscall.RTM_NEWADDRLABEL),
+ "RTM_NEWCACHEREPORT": ValueOf(syscall.RTM_NEWCACHEREPORT),
+ "RTM_NEWLINK": ValueOf(syscall.RTM_NEWLINK),
+ "RTM_NEWMDB": ValueOf(syscall.RTM_NEWMDB),
+ "RTM_NEWNDUSEROPT": ValueOf(syscall.RTM_NEWNDUSEROPT),
+ "RTM_NEWNEIGH": ValueOf(syscall.RTM_NEWNEIGH),
+ "RTM_NEWNEIGHTBL": ValueOf(syscall.RTM_NEWNEIGHTBL),
+ "RTM_NEWNETCONF": ValueOf(syscall.RTM_NEWNETCONF),
+ "RTM_NEWNSID": ValueOf(syscall.RTM_NEWNSID),
+ "RTM_NEWPREFIX": ValueOf(syscall.RTM_NEWPREFIX),
+ "RTM_NEWQDISC": ValueOf(syscall.RTM_NEWQDISC),
+ "RTM_NEWROUTE": ValueOf(syscall.RTM_NEWROUTE),
+ "RTM_NEWRULE": ValueOf(syscall.RTM_NEWRULE),
+ "RTM_NEWSTATS": ValueOf(syscall.RTM_NEWSTATS),
+ "RTM_NEWTCLASS": ValueOf(syscall.RTM_NEWTCLASS),
+ "RTM_NEWTFILTER": ValueOf(syscall.RTM_NEWTFILTER),
+ "RTM_SETDCB": ValueOf(syscall.RTM_SETDCB),
+ "RTM_SETLINK": ValueOf(syscall.RTM_SETLINK),
+ "RTM_SETNEIGHTBL": ValueOf(syscall.RTM_SETNEIGHTBL),
+ "RTNETLINK_HAVE_PEERINFO": ValueOf(syscall.RTNETLINK_HAVE_PEERINFO),
+ "RTNH_ALIGNTO": ValueOf(syscall.RTNH_ALIGNTO),
+ "RTNH_COMPARE_MASK": ValueOf(syscall.RTNH_COMPARE_MASK),
+ "RTNH_F_DEAD": ValueOf(syscall.RTNH_F_DEAD),
+ "RTNH_F_LINKDOWN": ValueOf(syscall.RTNH_F_LINKDOWN),
+ "RTNH_F_OFFLOAD": ValueOf(syscall.RTNH_F_OFFLOAD),
+ "RTNH_F_ONLINK": ValueOf(syscall.RTNH_F_ONLINK),
+ "RTNH_F_PERVASIVE": ValueOf(syscall.RTNH_F_PERVASIVE),
+ "RTNH_F_UNRESOLVED": ValueOf(syscall.RTNH_F_UNRESOLVED),
+ "RTNLGRP_DCB": ValueOf(syscall.RTNLGRP_DCB),
+ "RTNLGRP_DECnet_IFADDR": ValueOf(syscall.RTNLGRP_DECnet_IFADDR),
+ "RTNLGRP_DECnet_ROUTE": ValueOf(syscall.RTNLGRP_DECnet_ROUTE),
+ "RTNLGRP_DECnet_RULE": ValueOf(syscall.RTNLGRP_DECnet_RULE),
+ "RTNLGRP_IPV4_IFADDR": ValueOf(syscall.RTNLGRP_IPV4_IFADDR),
+ "RTNLGRP_IPV4_MROUTE": ValueOf(syscall.RTNLGRP_IPV4_MROUTE),
+ "RTNLGRP_IPV4_MROUTE_R": ValueOf(syscall.RTNLGRP_IPV4_MROUTE_R),
+ "RTNLGRP_IPV4_NETCONF": ValueOf(syscall.RTNLGRP_IPV4_NETCONF),
+ "RTNLGRP_IPV4_ROUTE": ValueOf(syscall.RTNLGRP_IPV4_ROUTE),
+ "RTNLGRP_IPV4_RULE": ValueOf(syscall.RTNLGRP_IPV4_RULE),
+ "RTNLGRP_IPV6_IFADDR": ValueOf(syscall.RTNLGRP_IPV6_IFADDR),
+ "RTNLGRP_IPV6_IFINFO": ValueOf(syscall.RTNLGRP_IPV6_IFINFO),
+ "RTNLGRP_IPV6_MROUTE": ValueOf(syscall.RTNLGRP_IPV6_MROUTE),
+ "RTNLGRP_IPV6_MROUTE_R": ValueOf(syscall.RTNLGRP_IPV6_MROUTE_R),
+ "RTNLGRP_IPV6_NETCONF": ValueOf(syscall.RTNLGRP_IPV6_NETCONF),
+ "RTNLGRP_IPV6_PREFIX": ValueOf(syscall.RTNLGRP_IPV6_PREFIX),
+ "RTNLGRP_IPV6_ROUTE": ValueOf(syscall.RTNLGRP_IPV6_ROUTE),
+ "RTNLGRP_IPV6_RULE": ValueOf(syscall.RTNLGRP_IPV6_RULE),
+ "RTNLGRP_LINK": ValueOf(syscall.RTNLGRP_LINK),
+ "RTNLGRP_MDB": ValueOf(syscall.RTNLGRP_MDB),
+ "RTNLGRP_MPLS_NETCONF": ValueOf(syscall.RTNLGRP_MPLS_NETCONF),
+ "RTNLGRP_MPLS_ROUTE": ValueOf(syscall.RTNLGRP_MPLS_ROUTE),
+ "RTNLGRP_ND_USEROPT": ValueOf(syscall.RTNLGRP_ND_USEROPT),
+ "RTNLGRP_NEIGH": ValueOf(syscall.RTNLGRP_NEIGH),
+ "RTNLGRP_NONE": ValueOf(syscall.RTNLGRP_NONE),
+ "RTNLGRP_NOP2": ValueOf(syscall.RTNLGRP_NOP2),
+ "RTNLGRP_NOP4": ValueOf(syscall.RTNLGRP_NOP4),
+ "RTNLGRP_NOTIFY": ValueOf(syscall.RTNLGRP_NOTIFY),
+ "RTNLGRP_NSID": ValueOf(syscall.RTNLGRP_NSID),
+ "RTNLGRP_PHONET_IFADDR": ValueOf(syscall.RTNLGRP_PHONET_IFADDR),
+ "RTNLGRP_PHONET_ROUTE": ValueOf(syscall.RTNLGRP_PHONET_ROUTE),
+ "RTNLGRP_TC": ValueOf(syscall.RTNLGRP_TC),
+ "RTNL_FAMILY_IP6MR": ValueOf(syscall.RTNL_FAMILY_IP6MR),
+ "RTNL_FAMILY_IPMR": ValueOf(syscall.RTNL_FAMILY_IPMR),
+ "RTNL_FAMILY_MAX": ValueOf(syscall.RTNL_FAMILY_MAX),
+ "RTN_ANYCAST": ValueOf(syscall.RTN_ANYCAST),
+ "RTN_BLACKHOLE": ValueOf(syscall.RTN_BLACKHOLE),
+ "RTN_BROADCAST": ValueOf(syscall.RTN_BROADCAST),
+ "RTN_LOCAL": ValueOf(syscall.RTN_LOCAL),
+ "RTN_MULTICAST": ValueOf(syscall.RTN_MULTICAST),
+ "RTN_NAT": ValueOf(syscall.RTN_NAT),
+ "RTN_PROHIBIT": ValueOf(syscall.RTN_PROHIBIT),
+ "RTN_THROW": ValueOf(syscall.RTN_THROW),
+ "RTN_UNICAST": ValueOf(syscall.RTN_UNICAST),
+ "RTN_UNREACHABLE": ValueOf(syscall.RTN_UNREACHABLE),
+ "RTN_UNSPEC": ValueOf(syscall.RTN_UNSPEC),
+ "RTN_XRESOLVE": ValueOf(syscall.RTN_XRESOLVE),
+ "RTPROT_BABEL": ValueOf(syscall.RTPROT_BABEL),
+ "RTPROT_BIRD": ValueOf(syscall.RTPROT_BIRD),
+ "RTPROT_BOOT": ValueOf(syscall.RTPROT_BOOT),
+ "RTPROT_DHCP": ValueOf(syscall.RTPROT_DHCP),
+ "RTPROT_DNROUTED": ValueOf(syscall.RTPROT_DNROUTED),
+ "RTPROT_GATED": ValueOf(syscall.RTPROT_GATED),
+ "RTPROT_KERNEL": ValueOf(syscall.RTPROT_KERNEL),
+ "RTPROT_MROUTED": ValueOf(syscall.RTPROT_MROUTED),
+ "RTPROT_MRT": ValueOf(syscall.RTPROT_MRT),
+ "RTPROT_NTK": ValueOf(syscall.RTPROT_NTK),
+ "RTPROT_RA": ValueOf(syscall.RTPROT_RA),
+ "RTPROT_REDIRECT": ValueOf(syscall.RTPROT_REDIRECT),
+ "RTPROT_STATIC": ValueOf(syscall.RTPROT_STATIC),
+ "RTPROT_UNSPEC": ValueOf(syscall.RTPROT_UNSPEC),
+ "RTPROT_XORP": ValueOf(syscall.RTPROT_XORP),
+ "RTPROT_ZEBRA": ValueOf(syscall.RTPROT_ZEBRA),
+ "RT_CLASS_DEFAULT": ValueOf(syscall.RT_CLASS_DEFAULT),
+ "RT_CLASS_LOCAL": ValueOf(syscall.RT_CLASS_LOCAL),
+ "RT_CLASS_MAIN": ValueOf(syscall.RT_CLASS_MAIN),
+ "RT_CLASS_MAX": ValueOf(syscall.RT_CLASS_MAX),
+ "RT_CLASS_UNSPEC": ValueOf(syscall.RT_CLASS_UNSPEC),
+ "RT_SCOPE_HOST": ValueOf(syscall.RT_SCOPE_HOST),
+ "RT_SCOPE_LINK": ValueOf(syscall.RT_SCOPE_LINK),
+ "RT_SCOPE_NOWHERE": ValueOf(syscall.RT_SCOPE_NOWHERE),
+ "RT_SCOPE_SITE": ValueOf(syscall.RT_SCOPE_SITE),
+ "RT_SCOPE_UNIVERSE": ValueOf(syscall.RT_SCOPE_UNIVERSE),
+ "RT_TABLE_COMPAT": ValueOf(syscall.RT_TABLE_COMPAT),
+ "RT_TABLE_DEFAULT": ValueOf(syscall.RT_TABLE_DEFAULT),
+ "RT_TABLE_LOCAL": ValueOf(syscall.RT_TABLE_LOCAL),
+ "RT_TABLE_MAIN": ValueOf(syscall.RT_TABLE_MAIN),
+ "RT_TABLE_MAX": ValueOf(uint32(syscall.RT_TABLE_MAX)),
+ "RT_TABLE_UNSPEC": ValueOf(syscall.RT_TABLE_UNSPEC),
+ "RUSAGE_CHILDREN": ValueOf(syscall.RUSAGE_CHILDREN),
+ "RUSAGE_SELF": ValueOf(syscall.RUSAGE_SELF),
+ "RUSAGE_THREAD": ValueOf(syscall.RUSAGE_THREAD),
+ "RawSyscall": ValueOf(syscall.RawSyscall),
+ "RawSyscall6": ValueOf(syscall.RawSyscall6),
+ "Read": ValueOf(syscall.Read),
+ "ReadDirent": ValueOf(syscall.ReadDirent),
+ "Readlink": ValueOf(syscall.Readlink),
+ "Reboot": ValueOf(syscall.Reboot),
+ "Recvfrom": ValueOf(syscall.Recvfrom),
+ "Recvmsg": ValueOf(syscall.Recvmsg),
+ "Removexattr": ValueOf(syscall.Removexattr),
+ "Rename": ValueOf(syscall.Rename),
+ "Renameat": ValueOf(syscall.Renameat),
+ "Rmdir": ValueOf(syscall.Rmdir),
+ "SCHED_H": ValueOf(syscall.SCHED_H),
+ "SCM_CREDENTIALS": ValueOf(syscall.SCM_CREDENTIALS),
+ "SCM_RIGHTS": ValueOf(syscall.SCM_RIGHTS),
+ "SCM_TIMESTAMP": ValueOf(syscall.SCM_TIMESTAMP),
+ "SCM_TIMESTAMPING": ValueOf(syscall.SCM_TIMESTAMPING),
+ "SCM_TIMESTAMPING_OPT_STATS": ValueOf(syscall.SCM_TIMESTAMPING_OPT_STATS),
+ "SCM_TIMESTAMPING_PKTINFO": ValueOf(syscall.SCM_TIMESTAMPING_PKTINFO),
+ "SCM_TIMESTAMPNS": ValueOf(syscall.SCM_TIMESTAMPNS),
+ "SCM_WIFI_STATUS": ValueOf(syscall.SCM_WIFI_STATUS),
+ "SC_2_CHAR_TERM": ValueOf(syscall.SC_2_CHAR_TERM),
+ "SC_2_C_BIND": ValueOf(syscall.SC_2_C_BIND),
+ "SC_2_C_DEV": ValueOf(syscall.SC_2_C_DEV),
+ "SC_2_C_VERSION": ValueOf(syscall.SC_2_C_VERSION),
+ "SC_2_FORT_DEV": ValueOf(syscall.SC_2_FORT_DEV),
+ "SC_2_FORT_RUN": ValueOf(syscall.SC_2_FORT_RUN),
+ "SC_2_LOCALEDEF": ValueOf(syscall.SC_2_LOCALEDEF),
+ "SC_2_PBS": ValueOf(syscall.SC_2_PBS),
+ "SC_2_PBS_ACCOUNTING": ValueOf(syscall.SC_2_PBS_ACCOUNTING),
+ "SC_2_PBS_CHECKPOINT": ValueOf(syscall.SC_2_PBS_CHECKPOINT),
+ "SC_2_PBS_LOCATE": ValueOf(syscall.SC_2_PBS_LOCATE),
+ "SC_2_PBS_MESSAGE": ValueOf(syscall.SC_2_PBS_MESSAGE),
+ "SC_2_PBS_TRACK": ValueOf(syscall.SC_2_PBS_TRACK),
+ "SC_2_SW_DEV": ValueOf(syscall.SC_2_SW_DEV),
+ "SC_2_UPE": ValueOf(syscall.SC_2_UPE),
+ "SC_2_VERSION": ValueOf(syscall.SC_2_VERSION),
+ "SC_ADVISORY_INFO": ValueOf(syscall.SC_ADVISORY_INFO),
+ "SC_AIO_LISTIO_MAX": ValueOf(syscall.SC_AIO_LISTIO_MAX),
+ "SC_AIO_MAX": ValueOf(syscall.SC_AIO_MAX),
+ "SC_AIO_PRIO_DELTA_MAX": ValueOf(syscall.SC_AIO_PRIO_DELTA_MAX),
+ "SC_ARG_MAX": ValueOf(syscall.SC_ARG_MAX),
+ "SC_ASYNCHRONOUS_IO": ValueOf(syscall.SC_ASYNCHRONOUS_IO),
+ "SC_ATEXIT_MAX": ValueOf(syscall.SC_ATEXIT_MAX),
+ "SC_AVPHYS_PAGES": ValueOf(syscall.SC_AVPHYS_PAGES),
+ "SC_BARRIERS": ValueOf(syscall.SC_BARRIERS),
+ "SC_BASE": ValueOf(syscall.SC_BASE),
+ "SC_BC_BASE_MAX": ValueOf(syscall.SC_BC_BASE_MAX),
+ "SC_BC_DIM_MAX": ValueOf(syscall.SC_BC_DIM_MAX),
+ "SC_BC_SCALE_MAX": ValueOf(syscall.SC_BC_SCALE_MAX),
+ "SC_BC_STRING_MAX": ValueOf(syscall.SC_BC_STRING_MAX),
+ "SC_CHARCLASS_NAME_MAX": ValueOf(syscall.SC_CHARCLASS_NAME_MAX),
+ "SC_CHAR_BIT": ValueOf(syscall.SC_CHAR_BIT),
+ "SC_CHAR_MAX": ValueOf(syscall.SC_CHAR_MAX),
+ "SC_CHAR_MIN": ValueOf(syscall.SC_CHAR_MIN),
+ "SC_CHILD_MAX": ValueOf(syscall.SC_CHILD_MAX),
+ "SC_CLK_TCK": ValueOf(syscall.SC_CLK_TCK),
+ "SC_CLOCK_SELECTION": ValueOf(syscall.SC_CLOCK_SELECTION),
+ "SC_COLL_WEIGHTS_MAX": ValueOf(syscall.SC_COLL_WEIGHTS_MAX),
+ "SC_CPUTIME": ValueOf(syscall.SC_CPUTIME),
+ "SC_C_LANG_SUPPORT": ValueOf(syscall.SC_C_LANG_SUPPORT),
+ "SC_C_LANG_SUPPORT_R": ValueOf(syscall.SC_C_LANG_SUPPORT_R),
+ "SC_DELAYTIMER_MAX": ValueOf(syscall.SC_DELAYTIMER_MAX),
+ "SC_DEVICE_IO": ValueOf(syscall.SC_DEVICE_IO),
+ "SC_DEVICE_SPECIFIC": ValueOf(syscall.SC_DEVICE_SPECIFIC),
+ "SC_DEVICE_SPECIFIC_R": ValueOf(syscall.SC_DEVICE_SPECIFIC_R),
+ "SC_EQUIV_CLASS_MAX": ValueOf(syscall.SC_EQUIV_CLASS_MAX),
+ "SC_EXPR_NEST_MAX": ValueOf(syscall.SC_EXPR_NEST_MAX),
+ "SC_FD_MGMT": ValueOf(syscall.SC_FD_MGMT),
+ "SC_FIFO": ValueOf(syscall.SC_FIFO),
+ "SC_FILE_ATTRIBUTES": ValueOf(syscall.SC_FILE_ATTRIBUTES),
+ "SC_FILE_LOCKING": ValueOf(syscall.SC_FILE_LOCKING),
+ "SC_FILE_SYSTEM": ValueOf(syscall.SC_FILE_SYSTEM),
+ "SC_FSYNC": ValueOf(syscall.SC_FSYNC),
+ "SC_GETGR_R_SIZE_MAX": ValueOf(syscall.SC_GETGR_R_SIZE_MAX),
+ "SC_GETPW_R_SIZE_MAX": ValueOf(syscall.SC_GETPW_R_SIZE_MAX),
+ "SC_HOST_NAME_MAX": ValueOf(syscall.SC_HOST_NAME_MAX),
+ "SC_INT_MAX": ValueOf(syscall.SC_INT_MAX),
+ "SC_INT_MIN": ValueOf(syscall.SC_INT_MIN),
+ "SC_IOV_MAX": ValueOf(syscall.SC_IOV_MAX),
+ "SC_IPV6": ValueOf(syscall.SC_IPV6),
+ "SC_JOB_CONTROL": ValueOf(syscall.SC_JOB_CONTROL),
+ "SC_LEVEL1_DCACHE_ASSOC": ValueOf(syscall.SC_LEVEL1_DCACHE_ASSOC),
+ "SC_LEVEL1_DCACHE_LINESIZE": ValueOf(syscall.SC_LEVEL1_DCACHE_LINESIZE),
+ "SC_LEVEL1_DCACHE_SIZE": ValueOf(syscall.SC_LEVEL1_DCACHE_SIZE),
+ "SC_LEVEL1_ICACHE_ASSOC": ValueOf(syscall.SC_LEVEL1_ICACHE_ASSOC),
+ "SC_LEVEL1_ICACHE_LINESIZE": ValueOf(syscall.SC_LEVEL1_ICACHE_LINESIZE),
+ "SC_LEVEL1_ICACHE_SIZE": ValueOf(syscall.SC_LEVEL1_ICACHE_SIZE),
+ "SC_LEVEL2_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL2_CACHE_ASSOC),
+ "SC_LEVEL2_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL2_CACHE_LINESIZE),
+ "SC_LEVEL2_CACHE_SIZE": ValueOf(syscall.SC_LEVEL2_CACHE_SIZE),
+ "SC_LEVEL3_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL3_CACHE_ASSOC),
+ "SC_LEVEL3_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL3_CACHE_LINESIZE),
+ "SC_LEVEL3_CACHE_SIZE": ValueOf(syscall.SC_LEVEL3_CACHE_SIZE),
+ "SC_LEVEL4_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL4_CACHE_ASSOC),
+ "SC_LEVEL4_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL4_CACHE_LINESIZE),
+ "SC_LEVEL4_CACHE_SIZE": ValueOf(syscall.SC_LEVEL4_CACHE_SIZE),
+ "SC_LINE_MAX": ValueOf(syscall.SC_LINE_MAX),
+ "SC_LOGIN_NAME_MAX": ValueOf(syscall.SC_LOGIN_NAME_MAX),
+ "SC_LONG_BIT": ValueOf(syscall.SC_LONG_BIT),
+ "SC_MAPPED_FILES": ValueOf(syscall.SC_MAPPED_FILES),
+ "SC_MB_LEN_MAX": ValueOf(syscall.SC_MB_LEN_MAX),
+ "SC_MEMLOCK": ValueOf(syscall.SC_MEMLOCK),
+ "SC_MEMLOCK_RANGE": ValueOf(syscall.SC_MEMLOCK_RANGE),
+ "SC_MEMORY_PROTECTION": ValueOf(syscall.SC_MEMORY_PROTECTION),
+ "SC_MESSAGE_PASSING": ValueOf(syscall.SC_MESSAGE_PASSING),
+ "SC_MONOTONIC_CLOCK": ValueOf(syscall.SC_MONOTONIC_CLOCK),
+ "SC_MQ_OPEN_MAX": ValueOf(syscall.SC_MQ_OPEN_MAX),
+ "SC_MQ_PRIO_MAX": ValueOf(syscall.SC_MQ_PRIO_MAX),
+ "SC_MULTI_PROCESS": ValueOf(syscall.SC_MULTI_PROCESS),
+ "SC_NETWORKING": ValueOf(syscall.SC_NETWORKING),
+ "SC_NGROUPS_MAX": ValueOf(syscall.SC_NGROUPS_MAX),
+ "SC_NL_ARGMAX": ValueOf(syscall.SC_NL_ARGMAX),
+ "SC_NL_LANGMAX": ValueOf(syscall.SC_NL_LANGMAX),
+ "SC_NL_MSGMAX": ValueOf(syscall.SC_NL_MSGMAX),
+ "SC_NL_NMAX": ValueOf(syscall.SC_NL_NMAX),
+ "SC_NL_SETMAX": ValueOf(syscall.SC_NL_SETMAX),
+ "SC_NL_TEXTMAX": ValueOf(syscall.SC_NL_TEXTMAX),
+ "SC_NPROCESSORS_CONF": ValueOf(syscall.SC_NPROCESSORS_CONF),
+ "SC_NPROCESSORS_ONLN": ValueOf(syscall.SC_NPROCESSORS_ONLN),
+ "SC_NZERO": ValueOf(syscall.SC_NZERO),
+ "SC_OPEN_MAX": ValueOf(syscall.SC_OPEN_MAX),
+ "SC_PAGESIZE": ValueOf(syscall.SC_PAGESIZE),
+ "SC_PASS_MAX": ValueOf(syscall.SC_PASS_MAX),
+ "SC_PHYS_PAGES": ValueOf(syscall.SC_PHYS_PAGES),
+ "SC_PII": ValueOf(syscall.SC_PII),
+ "SC_PII_INTERNET": ValueOf(syscall.SC_PII_INTERNET),
+ "SC_PII_INTERNET_DGRAM": ValueOf(syscall.SC_PII_INTERNET_DGRAM),
+ "SC_PII_INTERNET_STREAM": ValueOf(syscall.SC_PII_INTERNET_STREAM),
+ "SC_PII_OSI": ValueOf(syscall.SC_PII_OSI),
+ "SC_PII_OSI_CLTS": ValueOf(syscall.SC_PII_OSI_CLTS),
+ "SC_PII_OSI_COTS": ValueOf(syscall.SC_PII_OSI_COTS),
+ "SC_PII_OSI_M": ValueOf(syscall.SC_PII_OSI_M),
+ "SC_PII_SOCKET": ValueOf(syscall.SC_PII_SOCKET),
+ "SC_PII_XTI": ValueOf(syscall.SC_PII_XTI),
+ "SC_PIPE": ValueOf(syscall.SC_PIPE),
+ "SC_POLL": ValueOf(syscall.SC_POLL),
+ "SC_PRIORITIZED_IO": ValueOf(syscall.SC_PRIORITIZED_IO),
+ "SC_PRIORITY_SCHEDULING": ValueOf(syscall.SC_PRIORITY_SCHEDULING),
+ "SC_RAW_SOCKETS": ValueOf(syscall.SC_RAW_SOCKETS),
+ "SC_READER_WRITER_LOCKS": ValueOf(syscall.SC_READER_WRITER_LOCKS),
+ "SC_REALTIME_SIGNALS": ValueOf(syscall.SC_REALTIME_SIGNALS),
+ "SC_REGEXP": ValueOf(syscall.SC_REGEXP),
+ "SC_REGEX_VERSION": ValueOf(syscall.SC_REGEX_VERSION),
+ "SC_RE_DUP_MAX": ValueOf(syscall.SC_RE_DUP_MAX),
+ "SC_RTSIG_MAX": ValueOf(syscall.SC_RTSIG_MAX),
+ "SC_SAVED_IDS": ValueOf(syscall.SC_SAVED_IDS),
+ "SC_SCHAR_MAX": ValueOf(syscall.SC_SCHAR_MAX),
+ "SC_SCHAR_MIN": ValueOf(syscall.SC_SCHAR_MIN),
+ "SC_SELECT": ValueOf(syscall.SC_SELECT),
+ "SC_SEMAPHORES": ValueOf(syscall.SC_SEMAPHORES),
+ "SC_SEM_NSEMS_MAX": ValueOf(syscall.SC_SEM_NSEMS_MAX),
+ "SC_SEM_VALUE_MAX": ValueOf(syscall.SC_SEM_VALUE_MAX),
+ "SC_SHARED_MEMORY_OBJECTS": ValueOf(syscall.SC_SHARED_MEMORY_OBJECTS),
+ "SC_SHELL": ValueOf(syscall.SC_SHELL),
+ "SC_SHRT_MAX": ValueOf(syscall.SC_SHRT_MAX),
+ "SC_SHRT_MIN": ValueOf(syscall.SC_SHRT_MIN),
+ "SC_SIGNALS": ValueOf(syscall.SC_SIGNALS),
+ "SC_SIGQUEUE_MAX": ValueOf(syscall.SC_SIGQUEUE_MAX),
+ "SC_SINGLE_PROCESS": ValueOf(syscall.SC_SINGLE_PROCESS),
+ "SC_SPAWN": ValueOf(syscall.SC_SPAWN),
+ "SC_SPIN_LOCKS": ValueOf(syscall.SC_SPIN_LOCKS),
+ "SC_SPORADIC_SERVER": ValueOf(syscall.SC_SPORADIC_SERVER),
+ "SC_SSIZE_MAX": ValueOf(syscall.SC_SSIZE_MAX),
+ "SC_SS_REPL_MAX": ValueOf(syscall.SC_SS_REPL_MAX),
+ "SC_STREAMS": ValueOf(syscall.SC_STREAMS),
+ "SC_STREAM_MAX": ValueOf(syscall.SC_STREAM_MAX),
+ "SC_SYMLOOP_MAX": ValueOf(syscall.SC_SYMLOOP_MAX),
+ "SC_SYNCHRONIZED_IO": ValueOf(syscall.SC_SYNCHRONIZED_IO),
+ "SC_SYSTEM_DATABASE": ValueOf(syscall.SC_SYSTEM_DATABASE),
+ "SC_SYSTEM_DATABASE_R": ValueOf(syscall.SC_SYSTEM_DATABASE_R),
+ "SC_THREADS": ValueOf(syscall.SC_THREADS),
+ "SC_THREAD_ATTR_STACKADDR": ValueOf(syscall.SC_THREAD_ATTR_STACKADDR),
+ "SC_THREAD_ATTR_STACKSIZE": ValueOf(syscall.SC_THREAD_ATTR_STACKSIZE),
+ "SC_THREAD_CPUTIME": ValueOf(syscall.SC_THREAD_CPUTIME),
+ "SC_THREAD_DESTRUCTOR_ITERATIONS": ValueOf(syscall.SC_THREAD_DESTRUCTOR_ITERATIONS),
+ "SC_THREAD_KEYS_MAX": ValueOf(syscall.SC_THREAD_KEYS_MAX),
+ "SC_THREAD_PRIORITY_SCHEDULING": ValueOf(syscall.SC_THREAD_PRIORITY_SCHEDULING),
+ "SC_THREAD_PRIO_INHERIT": ValueOf(syscall.SC_THREAD_PRIO_INHERIT),
+ "SC_THREAD_PRIO_PROTECT": ValueOf(syscall.SC_THREAD_PRIO_PROTECT),
+ "SC_THREAD_PROCESS_SHARED": ValueOf(syscall.SC_THREAD_PROCESS_SHARED),
+ "SC_THREAD_ROBUST_PRIO_INHERIT": ValueOf(syscall.SC_THREAD_ROBUST_PRIO_INHERIT),
+ "SC_THREAD_ROBUST_PRIO_PROTECT": ValueOf(syscall.SC_THREAD_ROBUST_PRIO_PROTECT),
+ "SC_THREAD_SAFE_FUNCTIONS": ValueOf(syscall.SC_THREAD_SAFE_FUNCTIONS),
+ "SC_THREAD_SPORADIC_SERVER": ValueOf(syscall.SC_THREAD_SPORADIC_SERVER),
+ "SC_THREAD_STACK_MIN": ValueOf(syscall.SC_THREAD_STACK_MIN),
+ "SC_THREAD_THREADS_MAX": ValueOf(syscall.SC_THREAD_THREADS_MAX),
+ "SC_TIMEOUTS": ValueOf(syscall.SC_TIMEOUTS),
+ "SC_TIMERS": ValueOf(syscall.SC_TIMERS),
+ "SC_TIMER_MAX": ValueOf(syscall.SC_TIMER_MAX),
+ "SC_TRACE": ValueOf(syscall.SC_TRACE),
+ "SC_TRACE_EVENT_FILTER": ValueOf(syscall.SC_TRACE_EVENT_FILTER),
+ "SC_TRACE_EVENT_NAME_MAX": ValueOf(syscall.SC_TRACE_EVENT_NAME_MAX),
+ "SC_TRACE_INHERIT": ValueOf(syscall.SC_TRACE_INHERIT),
+ "SC_TRACE_LOG": ValueOf(syscall.SC_TRACE_LOG),
+ "SC_TRACE_NAME_MAX": ValueOf(syscall.SC_TRACE_NAME_MAX),
+ "SC_TRACE_SYS_MAX": ValueOf(syscall.SC_TRACE_SYS_MAX),
+ "SC_TRACE_USER_EVENT_MAX": ValueOf(syscall.SC_TRACE_USER_EVENT_MAX),
+ "SC_TTY_NAME_MAX": ValueOf(syscall.SC_TTY_NAME_MAX),
+ "SC_TYPED_MEMORY_OBJECTS": ValueOf(syscall.SC_TYPED_MEMORY_OBJECTS),
+ "SC_TZNAME_MAX": ValueOf(syscall.SC_TZNAME_MAX),
+ "SC_T_IOV_MAX": ValueOf(syscall.SC_T_IOV_MAX),
+ "SC_UCHAR_MAX": ValueOf(syscall.SC_UCHAR_MAX),
+ "SC_UINT_MAX": ValueOf(syscall.SC_UINT_MAX),
+ "SC_UIO_MAXIOV": ValueOf(syscall.SC_UIO_MAXIOV),
+ "SC_ULONG_MAX": ValueOf(syscall.SC_ULONG_MAX),
+ "SC_USER_GROUPS": ValueOf(syscall.SC_USER_GROUPS),
+ "SC_USER_GROUPS_R": ValueOf(syscall.SC_USER_GROUPS_R),
+ "SC_USHRT_MAX": ValueOf(syscall.SC_USHRT_MAX),
+ "SC_V6_ILP32_OFF32": ValueOf(syscall.SC_V6_ILP32_OFF32),
+ "SC_V6_ILP32_OFFBIG": ValueOf(syscall.SC_V6_ILP32_OFFBIG),
+ "SC_V6_LP64_OFF64": ValueOf(syscall.SC_V6_LP64_OFF64),
+ "SC_V6_LPBIG_OFFBIG": ValueOf(syscall.SC_V6_LPBIG_OFFBIG),
+ "SC_V7_ILP32_OFF32": ValueOf(syscall.SC_V7_ILP32_OFF32),
+ "SC_V7_ILP32_OFFBIG": ValueOf(syscall.SC_V7_ILP32_OFFBIG),
+ "SC_V7_LP64_OFF64": ValueOf(syscall.SC_V7_LP64_OFF64),
+ "SC_V7_LPBIG_OFFBIG": ValueOf(syscall.SC_V7_LPBIG_OFFBIG),
+ "SC_VERSION": ValueOf(syscall.SC_VERSION),
+ "SC_WORD_BIT": ValueOf(syscall.SC_WORD_BIT),
+ "SC_XBS5_ILP32_OFF32": ValueOf(syscall.SC_XBS5_ILP32_OFF32),
+ "SC_XBS5_ILP32_OFFBIG": ValueOf(syscall.SC_XBS5_ILP32_OFFBIG),
+ "SC_XBS5_LP64_OFF64": ValueOf(syscall.SC_XBS5_LP64_OFF64),
+ "SC_XBS5_LPBIG_OFFBIG": ValueOf(syscall.SC_XBS5_LPBIG_OFFBIG),
+ "SC_XOPEN_CRYPT": ValueOf(syscall.SC_XOPEN_CRYPT),
+ "SC_XOPEN_ENH_I18N": ValueOf(syscall.SC_XOPEN_ENH_I18N),
+ "SC_XOPEN_LEGACY": ValueOf(syscall.SC_XOPEN_LEGACY),
+ "SC_XOPEN_REALTIME": ValueOf(syscall.SC_XOPEN_REALTIME),
+ "SC_XOPEN_REALTIME_THREADS": ValueOf(syscall.SC_XOPEN_REALTIME_THREADS),
+ "SC_XOPEN_SHM": ValueOf(syscall.SC_XOPEN_SHM),
+ "SC_XOPEN_STREAMS": ValueOf(syscall.SC_XOPEN_STREAMS),
+ "SC_XOPEN_UNIX": ValueOf(syscall.SC_XOPEN_UNIX),
+ "SC_XOPEN_VERSION": ValueOf(syscall.SC_XOPEN_VERSION),
+ "SC_XOPEN_XCU_VERSION": ValueOf(syscall.SC_XOPEN_XCU_VERSION),
+ "SC_XOPEN_XPG2": ValueOf(syscall.SC_XOPEN_XPG2),
+ "SC_XOPEN_XPG3": ValueOf(syscall.SC_XOPEN_XPG3),
+ "SC_XOPEN_XPG4": ValueOf(syscall.SC_XOPEN_XPG4),
+ "SHUT_RD": ValueOf(syscall.SHUT_RD),
+ "SHUT_RDWR": ValueOf(syscall.SHUT_RDWR),
+ "SHUT_WR": ValueOf(syscall.SHUT_WR),
+ "SIGABRT": ValueOf(syscall.SIGABRT),
+ "SIGALRM": ValueOf(syscall.SIGALRM),
+ "SIGBUS": ValueOf(syscall.SIGBUS),
+ "SIGCHLD": ValueOf(syscall.SIGCHLD),
+ "SIGCLD": ValueOf(syscall.SIGCLD),
+ "SIGCONT": ValueOf(syscall.SIGCONT),
+ "SIGFPE": ValueOf(syscall.SIGFPE),
+ "SIGHUP": ValueOf(syscall.SIGHUP),
+ "SIGILL": ValueOf(syscall.SIGILL),
+ "SIGINT": ValueOf(syscall.SIGINT),
+ "SIGIO": ValueOf(syscall.SIGIO),
+ "SIGIOT": ValueOf(syscall.SIGIOT),
+ "SIGKILL": ValueOf(syscall.SIGKILL),
+ "SIGPIPE": ValueOf(syscall.SIGPIPE),
+ "SIGPOLL": ValueOf(syscall.SIGPOLL),
+ "SIGPROF": ValueOf(syscall.SIGPROF),
+ "SIGPWR": ValueOf(syscall.SIGPWR),
+ "SIGQUIT": ValueOf(syscall.SIGQUIT),
+ "SIGSEGV": ValueOf(syscall.SIGSEGV),
+ "SIGSTKFLT": ValueOf(syscall.SIGSTKFLT),
+ "SIGSTKSZ": ValueOf(syscall.SIGSTKSZ),
+ "SIGSTOP": ValueOf(syscall.SIGSTOP),
+ "SIGSYS": ValueOf(syscall.SIGSYS),
+ "SIGTERM": ValueOf(syscall.SIGTERM),
+ "SIGTRAP": ValueOf(syscall.SIGTRAP),
+ "SIGTSTP": ValueOf(syscall.SIGTSTP),
+ "SIGTTIN": ValueOf(syscall.SIGTTIN),
+ "SIGTTOU": ValueOf(syscall.SIGTTOU),
+ "SIGURG": ValueOf(syscall.SIGURG),
+ "SIGUSR1": ValueOf(syscall.SIGUSR1),
+ "SIGUSR2": ValueOf(syscall.SIGUSR2),
+ "SIGVTALRM": ValueOf(syscall.SIGVTALRM),
+ "SIGWINCH": ValueOf(syscall.SIGWINCH),
+ "SIGXCPU": ValueOf(syscall.SIGXCPU),
+ "SIGXFSZ": ValueOf(syscall.SIGXFSZ),
+ "SIOCADDDLCI": ValueOf(syscall.SIOCADDDLCI),
+ "SIOCADDMULTI": ValueOf(syscall.SIOCADDMULTI),
+ "SIOCADDRT": ValueOf(syscall.SIOCADDRT),
+ "SIOCATMARK": ValueOf(syscall.SIOCATMARK),
+ "SIOCDARP": ValueOf(syscall.SIOCDARP),
+ "SIOCDELDLCI": ValueOf(syscall.SIOCDELDLCI),
+ "SIOCDELMULTI": ValueOf(syscall.SIOCDELMULTI),
+ "SIOCDELRT": ValueOf(syscall.SIOCDELRT),
+ "SIOCDEVPRIVATE": ValueOf(syscall.SIOCDEVPRIVATE),
+ "SIOCDIFADDR": ValueOf(syscall.SIOCDIFADDR),
+ "SIOCDRARP": ValueOf(syscall.SIOCDRARP),
+ "SIOCGARP": ValueOf(syscall.SIOCGARP),
+ "SIOCGIFADDR": ValueOf(syscall.SIOCGIFADDR),
+ "SIOCGIFBR": ValueOf(syscall.SIOCGIFBR),
+ "SIOCGIFBRDADDR": ValueOf(syscall.SIOCGIFBRDADDR),
+ "SIOCGIFCONF": ValueOf(syscall.SIOCGIFCONF),
+ "SIOCGIFCOUNT": ValueOf(syscall.SIOCGIFCOUNT),
+ "SIOCGIFDSTADDR": ValueOf(syscall.SIOCGIFDSTADDR),
+ "SIOCGIFENCAP": ValueOf(syscall.SIOCGIFENCAP),
+ "SIOCGIFFLAGS": ValueOf(syscall.SIOCGIFFLAGS),
+ "SIOCGIFHWADDR": ValueOf(syscall.SIOCGIFHWADDR),
+ "SIOCGIFINDEX": ValueOf(syscall.SIOCGIFINDEX),
+ "SIOCGIFMAP": ValueOf(syscall.SIOCGIFMAP),
+ "SIOCGIFMEM": ValueOf(syscall.SIOCGIFMEM),
+ "SIOCGIFMETRIC": ValueOf(syscall.SIOCGIFMETRIC),
+ "SIOCGIFMTU": ValueOf(syscall.SIOCGIFMTU),
+ "SIOCGIFNAME": ValueOf(syscall.SIOCGIFNAME),
+ "SIOCGIFNETMASK": ValueOf(syscall.SIOCGIFNETMASK),
+ "SIOCGIFPFLAGS": ValueOf(syscall.SIOCGIFPFLAGS),
+ "SIOCGIFSLAVE": ValueOf(syscall.SIOCGIFSLAVE),
+ "SIOCGIFTXQLEN": ValueOf(syscall.SIOCGIFTXQLEN),
+ "SIOCGPGRP": ValueOf(syscall.SIOCGPGRP),
+ "SIOCGRARP": ValueOf(syscall.SIOCGRARP),
+ "SIOCGSTAMP": ValueOf(syscall.SIOCGSTAMP),
+ "SIOCGSTAMPNS": ValueOf(syscall.SIOCGSTAMPNS),
+ "SIOCPROTOPRIVATE": ValueOf(syscall.SIOCPROTOPRIVATE),
+ "SIOCRTMSG": ValueOf(syscall.SIOCRTMSG),
+ "SIOCSARP": ValueOf(syscall.SIOCSARP),
+ "SIOCSIFADDR": ValueOf(syscall.SIOCSIFADDR),
+ "SIOCSIFBR": ValueOf(syscall.SIOCSIFBR),
+ "SIOCSIFBRDADDR": ValueOf(syscall.SIOCSIFBRDADDR),
+ "SIOCSIFDSTADDR": ValueOf(syscall.SIOCSIFDSTADDR),
+ "SIOCSIFENCAP": ValueOf(syscall.SIOCSIFENCAP),
+ "SIOCSIFFLAGS": ValueOf(syscall.SIOCSIFFLAGS),
+ "SIOCSIFHWADDR": ValueOf(syscall.SIOCSIFHWADDR),
+ "SIOCSIFHWBROADCAST": ValueOf(syscall.SIOCSIFHWBROADCAST),
+ "SIOCSIFLINK": ValueOf(syscall.SIOCSIFLINK),
+ "SIOCSIFMAP": ValueOf(syscall.SIOCSIFMAP),
+ "SIOCSIFMEM": ValueOf(syscall.SIOCSIFMEM),
+ "SIOCSIFMETRIC": ValueOf(syscall.SIOCSIFMETRIC),
+ "SIOCSIFMTU": ValueOf(syscall.SIOCSIFMTU),
+ "SIOCSIFNAME": ValueOf(syscall.SIOCSIFNAME),
+ "SIOCSIFNETMASK": ValueOf(syscall.SIOCSIFNETMASK),
+ "SIOCSIFPFLAGS": ValueOf(syscall.SIOCSIFPFLAGS),
+ "SIOCSIFSLAVE": ValueOf(syscall.SIOCSIFSLAVE),
+ "SIOCSIFTXQLEN": ValueOf(syscall.SIOCSIFTXQLEN),
+ "SIOCSPGRP": ValueOf(syscall.SIOCSPGRP),
+ "SIOCSRARP": ValueOf(syscall.SIOCSRARP),
+ "SOCK_CLOEXEC": ValueOf(syscall.SOCK_CLOEXEC),
+ "SOCK_DCCP": ValueOf(syscall.SOCK_DCCP),
+ "SOCK_DGRAM": ValueOf(syscall.SOCK_DGRAM),
+ "SOCK_NONBLOCK": ValueOf(syscall.SOCK_NONBLOCK),
+ "SOCK_PACKET": ValueOf(syscall.SOCK_PACKET),
+ "SOCK_RAW": ValueOf(syscall.SOCK_RAW),
+ "SOCK_RDM": ValueOf(syscall.SOCK_RDM),
+ "SOCK_SEQPACKET": ValueOf(syscall.SOCK_SEQPACKET),
+ "SOCK_STREAM": ValueOf(syscall.SOCK_STREAM),
+ "SOL_AAL": ValueOf(syscall.SOL_AAL),
+ "SOL_ALG": ValueOf(syscall.SOL_ALG),
+ "SOL_ATM": ValueOf(syscall.SOL_ATM),
+ "SOL_BLUETOOTH": ValueOf(syscall.SOL_BLUETOOTH),
+ "SOL_CAIF": ValueOf(syscall.SOL_CAIF),
+ "SOL_DCCP": ValueOf(syscall.SOL_DCCP),
+ "SOL_DECNET": ValueOf(syscall.SOL_DECNET),
+ "SOL_ICMPV6": ValueOf(syscall.SOL_ICMPV6),
+ "SOL_IP": ValueOf(syscall.SOL_IP),
+ "SOL_IPV6": ValueOf(syscall.SOL_IPV6),
+ "SOL_IRDA": ValueOf(syscall.SOL_IRDA),
+ "SOL_IUCV": ValueOf(syscall.SOL_IUCV),
+ "SOL_KCM": ValueOf(syscall.SOL_KCM),
+ "SOL_LLC": ValueOf(syscall.SOL_LLC),
+ "SOL_NETBEUI": ValueOf(syscall.SOL_NETBEUI),
+ "SOL_NETLINK": ValueOf(syscall.SOL_NETLINK),
+ "SOL_NFC": ValueOf(syscall.SOL_NFC),
+ "SOL_PACKET": ValueOf(syscall.SOL_PACKET),
+ "SOL_PNPIPE": ValueOf(syscall.SOL_PNPIPE),
+ "SOL_PPPOL2TP": ValueOf(syscall.SOL_PPPOL2TP),
+ "SOL_RAW": ValueOf(syscall.SOL_RAW),
+ "SOL_RDS": ValueOf(syscall.SOL_RDS),
+ "SOL_RXRPC": ValueOf(syscall.SOL_RXRPC),
+ "SOL_SOCKET": ValueOf(syscall.SOL_SOCKET),
+ "SOL_TCP": ValueOf(syscall.SOL_TCP),
+ "SOL_TIPC": ValueOf(syscall.SOL_TIPC),
+ "SOL_TLS": ValueOf(syscall.SOL_TLS),
+ "SOL_X25": ValueOf(syscall.SOL_X25),
+ "SOMAXCONN": ValueOf(syscall.SOMAXCONN),
+ "SO_ACCEPTCONN": ValueOf(syscall.SO_ACCEPTCONN),
+ "SO_ATTACH_BPF": ValueOf(syscall.SO_ATTACH_BPF),
+ "SO_ATTACH_FILTER": ValueOf(syscall.SO_ATTACH_FILTER),
+ "SO_ATTACH_REUSEPORT_CBPF": ValueOf(syscall.SO_ATTACH_REUSEPORT_CBPF),
+ "SO_ATTACH_REUSEPORT_EBPF": ValueOf(syscall.SO_ATTACH_REUSEPORT_EBPF),
+ "SO_BINDTODEVICE": ValueOf(syscall.SO_BINDTODEVICE),
+ "SO_BPF_EXTENSIONS": ValueOf(syscall.SO_BPF_EXTENSIONS),
+ "SO_BROADCAST": ValueOf(syscall.SO_BROADCAST),
+ "SO_BSDCOMPAT": ValueOf(syscall.SO_BSDCOMPAT),
+ "SO_BUSY_POLL": ValueOf(syscall.SO_BUSY_POLL),
+ "SO_CNX_ADVICE": ValueOf(syscall.SO_CNX_ADVICE),
+ "SO_COOKIE": ValueOf(syscall.SO_COOKIE),
+ "SO_DEBUG": ValueOf(syscall.SO_DEBUG),
+ "SO_DETACH_BPF": ValueOf(syscall.SO_DETACH_BPF),
+ "SO_DETACH_FILTER": ValueOf(syscall.SO_DETACH_FILTER),
+ "SO_DOMAIN": ValueOf(syscall.SO_DOMAIN),
+ "SO_DONTROUTE": ValueOf(syscall.SO_DONTROUTE),
+ "SO_ERROR": ValueOf(syscall.SO_ERROR),
+ "SO_GET_FILTER": ValueOf(syscall.SO_GET_FILTER),
+ "SO_INCOMING_CPU": ValueOf(syscall.SO_INCOMING_CPU),
+ "SO_INCOMING_NAPI_ID": ValueOf(syscall.SO_INCOMING_NAPI_ID),
+ "SO_KEEPALIVE": ValueOf(syscall.SO_KEEPALIVE),
+ "SO_LINGER": ValueOf(syscall.SO_LINGER),
+ "SO_LOCK_FILTER": ValueOf(syscall.SO_LOCK_FILTER),
+ "SO_MARK": ValueOf(syscall.SO_MARK),
+ "SO_MAX_PACING_RATE": ValueOf(syscall.SO_MAX_PACING_RATE),
+ "SO_MEMINFO": ValueOf(syscall.SO_MEMINFO),
+ "SO_NOFCS": ValueOf(syscall.SO_NOFCS),
+ "SO_NO_CHECK": ValueOf(syscall.SO_NO_CHECK),
+ "SO_OOBINLINE": ValueOf(syscall.SO_OOBINLINE),
+ "SO_PASSCRED": ValueOf(syscall.SO_PASSCRED),
+ "SO_PASSSEC": ValueOf(syscall.SO_PASSSEC),
+ "SO_PEEK_OFF": ValueOf(syscall.SO_PEEK_OFF),
+ "SO_PEERCRED": ValueOf(syscall.SO_PEERCRED),
+ "SO_PEERGROUPS": ValueOf(syscall.SO_PEERGROUPS),
+ "SO_PEERNAME": ValueOf(syscall.SO_PEERNAME),
+ "SO_PEERSEC": ValueOf(syscall.SO_PEERSEC),
+ "SO_PRIORITY": ValueOf(syscall.SO_PRIORITY),
+ "SO_PROTOCOL": ValueOf(syscall.SO_PROTOCOL),
+ "SO_RCVBUF": ValueOf(syscall.SO_RCVBUF),
+ "SO_RCVBUFFORCE": ValueOf(syscall.SO_RCVBUFFORCE),
+ "SO_RCVLOWAT": ValueOf(syscall.SO_RCVLOWAT),
+ "SO_RCVTIMEO": ValueOf(syscall.SO_RCVTIMEO),
+ "SO_REUSEADDR": ValueOf(syscall.SO_REUSEADDR),
+ "SO_REUSEPORT": ValueOf(syscall.SO_REUSEPORT),
+ "SO_RXQ_OVFL": ValueOf(syscall.SO_RXQ_OVFL),
+ "SO_SECURITY_AUTHENTICATION": ValueOf(syscall.SO_SECURITY_AUTHENTICATION),
+ "SO_SECURITY_ENCRYPTION_NETWORK": ValueOf(syscall.SO_SECURITY_ENCRYPTION_NETWORK),
+ "SO_SECURITY_ENCRYPTION_TRANSPORT": ValueOf(syscall.SO_SECURITY_ENCRYPTION_TRANSPORT),
+ "SO_SELECT_ERR_QUEUE": ValueOf(syscall.SO_SELECT_ERR_QUEUE),
+ "SO_SNDBUF": ValueOf(syscall.SO_SNDBUF),
+ "SO_SNDBUFFORCE": ValueOf(syscall.SO_SNDBUFFORCE),
+ "SO_SNDLOWAT": ValueOf(syscall.SO_SNDLOWAT),
+ "SO_SNDTIMEO": ValueOf(syscall.SO_SNDTIMEO),
+ "SO_TIMESTAMP": ValueOf(syscall.SO_TIMESTAMP),
+ "SO_TIMESTAMPING": ValueOf(syscall.SO_TIMESTAMPING),
+ "SO_TIMESTAMPNS": ValueOf(syscall.SO_TIMESTAMPNS),
+ "SO_TYPE": ValueOf(syscall.SO_TYPE),
+ "SO_WIFI_STATUS": ValueOf(syscall.SO_WIFI_STATUS),
+ "SO_ZEROCOPY": ValueOf(syscall.SO_ZEROCOPY),
+ "SYS_ACCEPT": ValueOf(syscall.SYS_ACCEPT),
+ "SYS_ACCEPT4": ValueOf(syscall.SYS_ACCEPT4),
+ "SYS_ACCESS": ValueOf(syscall.SYS_ACCESS),
+ "SYS_ACCT": ValueOf(syscall.SYS_ACCT),
+ "SYS_ADD_KEY": ValueOf(syscall.SYS_ADD_KEY),
+ "SYS_ADJTIMEX": ValueOf(syscall.SYS_ADJTIMEX),
+ "SYS_AFS_SYSCALL": ValueOf(syscall.SYS_AFS_SYSCALL),
+ "SYS_ALARM": ValueOf(syscall.SYS_ALARM),
+ "SYS_ARCH_PRCTL": ValueOf(syscall.SYS_ARCH_PRCTL),
+ "SYS_BIND": ValueOf(syscall.SYS_BIND),
+ "SYS_BPF": ValueOf(syscall.SYS_BPF),
+ "SYS_BRK": ValueOf(syscall.SYS_BRK),
+ "SYS_CAPGET": ValueOf(syscall.SYS_CAPGET),
+ "SYS_CAPSET": ValueOf(syscall.SYS_CAPSET),
+ "SYS_CHDIR": ValueOf(syscall.SYS_CHDIR),
+ "SYS_CHMOD": ValueOf(syscall.SYS_CHMOD),
+ "SYS_CHOWN": ValueOf(syscall.SYS_CHOWN),
+ "SYS_CHROOT": ValueOf(syscall.SYS_CHROOT),
+ "SYS_CLOCK_ADJTIME": ValueOf(syscall.SYS_CLOCK_ADJTIME),
+ "SYS_CLOCK_GETRES": ValueOf(syscall.SYS_CLOCK_GETRES),
+ "SYS_CLOCK_GETTIME": ValueOf(syscall.SYS_CLOCK_GETTIME),
+ "SYS_CLOCK_NANOSLEEP": ValueOf(syscall.SYS_CLOCK_NANOSLEEP),
+ "SYS_CLOCK_SETTIME": ValueOf(syscall.SYS_CLOCK_SETTIME),
+ "SYS_CLONE": ValueOf(syscall.SYS_CLONE),
+ "SYS_CLOSE": ValueOf(syscall.SYS_CLOSE),
+ "SYS_CONNECT": ValueOf(syscall.SYS_CONNECT),
+ "SYS_COPY_FILE_RANGE": ValueOf(syscall.SYS_COPY_FILE_RANGE),
+ "SYS_CREAT": ValueOf(syscall.SYS_CREAT),
+ "SYS_CREATE_MODULE": ValueOf(syscall.SYS_CREATE_MODULE),
+ "SYS_DELETE_MODULE": ValueOf(syscall.SYS_DELETE_MODULE),
+ "SYS_DUP": ValueOf(syscall.SYS_DUP),
+ "SYS_DUP2": ValueOf(syscall.SYS_DUP2),
+ "SYS_DUP3": ValueOf(syscall.SYS_DUP3),
+ "SYS_EPOLL_CREATE": ValueOf(syscall.SYS_EPOLL_CREATE),
+ "SYS_EPOLL_CREATE1": ValueOf(syscall.SYS_EPOLL_CREATE1),
+ "SYS_EPOLL_CTL": ValueOf(syscall.SYS_EPOLL_CTL),
+ "SYS_EPOLL_CTL_OLD": ValueOf(syscall.SYS_EPOLL_CTL_OLD),
+ "SYS_EPOLL_PWAIT": ValueOf(syscall.SYS_EPOLL_PWAIT),
+ "SYS_EPOLL_WAIT": ValueOf(syscall.SYS_EPOLL_WAIT),
+ "SYS_EPOLL_WAIT_OLD": ValueOf(syscall.SYS_EPOLL_WAIT_OLD),
+ "SYS_EVENTFD": ValueOf(syscall.SYS_EVENTFD),
+ "SYS_EVENTFD2": ValueOf(syscall.SYS_EVENTFD2),
+ "SYS_EXECVE": ValueOf(syscall.SYS_EXECVE),
+ "SYS_EXECVEAT": ValueOf(syscall.SYS_EXECVEAT),
+ "SYS_EXIT": ValueOf(syscall.SYS_EXIT),
+ "SYS_EXIT_GROUP": ValueOf(syscall.SYS_EXIT_GROUP),
+ "SYS_FACCESSAT": ValueOf(syscall.SYS_FACCESSAT),
+ "SYS_FADVISE64": ValueOf(syscall.SYS_FADVISE64),
+ "SYS_FALLOCATE": ValueOf(syscall.SYS_FALLOCATE),
+ "SYS_FANOTIFY_INIT": ValueOf(syscall.SYS_FANOTIFY_INIT),
+ "SYS_FANOTIFY_MARK": ValueOf(syscall.SYS_FANOTIFY_MARK),
+ "SYS_FCHDIR": ValueOf(syscall.SYS_FCHDIR),
+ "SYS_FCHMOD": ValueOf(syscall.SYS_FCHMOD),
+ "SYS_FCHMODAT": ValueOf(syscall.SYS_FCHMODAT),
+ "SYS_FCHOWN": ValueOf(syscall.SYS_FCHOWN),
+ "SYS_FCHOWNAT": ValueOf(syscall.SYS_FCHOWNAT),
+ "SYS_FCNTL": ValueOf(syscall.SYS_FCNTL),
+ "SYS_FDATASYNC": ValueOf(syscall.SYS_FDATASYNC),
+ "SYS_FGETXATTR": ValueOf(syscall.SYS_FGETXATTR),
+ "SYS_FINIT_MODULE": ValueOf(syscall.SYS_FINIT_MODULE),
+ "SYS_FLISTXATTR": ValueOf(syscall.SYS_FLISTXATTR),
+ "SYS_FLOCK": ValueOf(syscall.SYS_FLOCK),
+ "SYS_FORK": ValueOf(syscall.SYS_FORK),
+ "SYS_FREMOVEXATTR": ValueOf(syscall.SYS_FREMOVEXATTR),
+ "SYS_FSETXATTR": ValueOf(syscall.SYS_FSETXATTR),
+ "SYS_FSTAT": ValueOf(syscall.SYS_FSTAT),
+ "SYS_FSTATFS": ValueOf(syscall.SYS_FSTATFS),
+ "SYS_FSYNC": ValueOf(syscall.SYS_FSYNC),
+ "SYS_FTRUNCATE": ValueOf(syscall.SYS_FTRUNCATE),
+ "SYS_FUTEX": ValueOf(syscall.SYS_FUTEX),
+ "SYS_FUTIMESAT": ValueOf(syscall.SYS_FUTIMESAT),
+ "SYS_GETCPU": ValueOf(syscall.SYS_GETCPU),
+ "SYS_GETCWD": ValueOf(syscall.SYS_GETCWD),
+ "SYS_GETDENTS": ValueOf(syscall.SYS_GETDENTS),
+ "SYS_GETDENTS64": ValueOf(syscall.SYS_GETDENTS64),
+ "SYS_GETEGID": ValueOf(syscall.SYS_GETEGID),
+ "SYS_GETEUID": ValueOf(syscall.SYS_GETEUID),
+ "SYS_GETGID": ValueOf(syscall.SYS_GETGID),
+ "SYS_GETGROUPS": ValueOf(syscall.SYS_GETGROUPS),
+ "SYS_GETITIMER": ValueOf(syscall.SYS_GETITIMER),
+ "SYS_GETPEERNAME": ValueOf(syscall.SYS_GETPEERNAME),
+ "SYS_GETPGID": ValueOf(syscall.SYS_GETPGID),
+ "SYS_GETPGRP": ValueOf(syscall.SYS_GETPGRP),
+ "SYS_GETPID": ValueOf(syscall.SYS_GETPID),
+ "SYS_GETPMSG": ValueOf(syscall.SYS_GETPMSG),
+ "SYS_GETPPID": ValueOf(syscall.SYS_GETPPID),
+ "SYS_GETPRIORITY": ValueOf(syscall.SYS_GETPRIORITY),
+ "SYS_GETRANDOM": ValueOf(syscall.SYS_GETRANDOM),
+ "SYS_GETRESGID": ValueOf(syscall.SYS_GETRESGID),
+ "SYS_GETRESUID": ValueOf(syscall.SYS_GETRESUID),
+ "SYS_GETRLIMIT": ValueOf(syscall.SYS_GETRLIMIT),
+ "SYS_GETRUSAGE": ValueOf(syscall.SYS_GETRUSAGE),
+ "SYS_GETSID": ValueOf(syscall.SYS_GETSID),
+ "SYS_GETSOCKNAME": ValueOf(syscall.SYS_GETSOCKNAME),
+ "SYS_GETSOCKOPT": ValueOf(syscall.SYS_GETSOCKOPT),
+ "SYS_GETTID": ValueOf(syscall.SYS_GETTID),
+ "SYS_GETTIMEOFDAY": ValueOf(syscall.SYS_GETTIMEOFDAY),
+ "SYS_GETUID": ValueOf(syscall.SYS_GETUID),
+ "SYS_GETXATTR": ValueOf(syscall.SYS_GETXATTR),
+ "SYS_GET_KERNEL_SYMS": ValueOf(syscall.SYS_GET_KERNEL_SYMS),
+ "SYS_GET_MEMPOLICY": ValueOf(syscall.SYS_GET_MEMPOLICY),
+ "SYS_GET_ROBUST_LIST": ValueOf(syscall.SYS_GET_ROBUST_LIST),
+ "SYS_GET_THREAD_AREA": ValueOf(syscall.SYS_GET_THREAD_AREA),
+ "SYS_INIT_MODULE": ValueOf(syscall.SYS_INIT_MODULE),
+ "SYS_INOTIFY_ADD_WATCH": ValueOf(syscall.SYS_INOTIFY_ADD_WATCH),
+ "SYS_INOTIFY_INIT": ValueOf(syscall.SYS_INOTIFY_INIT),
+ "SYS_INOTIFY_INIT1": ValueOf(syscall.SYS_INOTIFY_INIT1),
+ "SYS_INOTIFY_RM_WATCH": ValueOf(syscall.SYS_INOTIFY_RM_WATCH),
+ "SYS_IOCTL": ValueOf(syscall.SYS_IOCTL),
+ "SYS_IOPERM": ValueOf(syscall.SYS_IOPERM),
+ "SYS_IOPL": ValueOf(syscall.SYS_IOPL),
+ "SYS_IOPRIO_GET": ValueOf(syscall.SYS_IOPRIO_GET),
+ "SYS_IOPRIO_SET": ValueOf(syscall.SYS_IOPRIO_SET),
+ "SYS_IO_CANCEL": ValueOf(syscall.SYS_IO_CANCEL),
+ "SYS_IO_DESTROY": ValueOf(syscall.SYS_IO_DESTROY),
+ "SYS_IO_GETEVENTS": ValueOf(syscall.SYS_IO_GETEVENTS),
+ "SYS_IO_SETUP": ValueOf(syscall.SYS_IO_SETUP),
+ "SYS_IO_SUBMIT": ValueOf(syscall.SYS_IO_SUBMIT),
+ "SYS_KCMP": ValueOf(syscall.SYS_KCMP),
+ "SYS_KEXEC_FILE_LOAD": ValueOf(syscall.SYS_KEXEC_FILE_LOAD),
+ "SYS_KEXEC_LOAD": ValueOf(syscall.SYS_KEXEC_LOAD),
+ "SYS_KEYCTL": ValueOf(syscall.SYS_KEYCTL),
+ "SYS_KILL": ValueOf(syscall.SYS_KILL),
+ "SYS_LCHOWN": ValueOf(syscall.SYS_LCHOWN),
+ "SYS_LGETXATTR": ValueOf(syscall.SYS_LGETXATTR),
+ "SYS_LINK": ValueOf(syscall.SYS_LINK),
+ "SYS_LINKAT": ValueOf(syscall.SYS_LINKAT),
+ "SYS_LISTEN": ValueOf(syscall.SYS_LISTEN),
+ "SYS_LISTXATTR": ValueOf(syscall.SYS_LISTXATTR),
+ "SYS_LLISTXATTR": ValueOf(syscall.SYS_LLISTXATTR),
+ "SYS_LOOKUP_DCOOKIE": ValueOf(syscall.SYS_LOOKUP_DCOOKIE),
+ "SYS_LREMOVEXATTR": ValueOf(syscall.SYS_LREMOVEXATTR),
+ "SYS_LSEEK": ValueOf(syscall.SYS_LSEEK),
+ "SYS_LSETXATTR": ValueOf(syscall.SYS_LSETXATTR),
+ "SYS_LSTAT": ValueOf(syscall.SYS_LSTAT),
+ "SYS_MADVISE": ValueOf(syscall.SYS_MADVISE),
+ "SYS_MBIND": ValueOf(syscall.SYS_MBIND),
+ "SYS_MEMBARRIER": ValueOf(syscall.SYS_MEMBARRIER),
+ "SYS_MEMFD_CREATE": ValueOf(syscall.SYS_MEMFD_CREATE),
+ "SYS_MIGRATE_PAGES": ValueOf(syscall.SYS_MIGRATE_PAGES),
+ "SYS_MINCORE": ValueOf(syscall.SYS_MINCORE),
+ "SYS_MKDIR": ValueOf(syscall.SYS_MKDIR),
+ "SYS_MKDIRAT": ValueOf(syscall.SYS_MKDIRAT),
+ "SYS_MKNOD": ValueOf(syscall.SYS_MKNOD),
+ "SYS_MKNODAT": ValueOf(syscall.SYS_MKNODAT),
+ "SYS_MLOCK": ValueOf(syscall.SYS_MLOCK),
+ "SYS_MLOCK2": ValueOf(syscall.SYS_MLOCK2),
+ "SYS_MLOCKALL": ValueOf(syscall.SYS_MLOCKALL),
+ "SYS_MMAP": ValueOf(syscall.SYS_MMAP),
+ "SYS_MODIFY_LDT": ValueOf(syscall.SYS_MODIFY_LDT),
+ "SYS_MOUNT": ValueOf(syscall.SYS_MOUNT),
+ "SYS_MOVE_PAGES": ValueOf(syscall.SYS_MOVE_PAGES),
+ "SYS_MPROTECT": ValueOf(syscall.SYS_MPROTECT),
+ "SYS_MQ_GETSETATTR": ValueOf(syscall.SYS_MQ_GETSETATTR),
+ "SYS_MQ_NOTIFY": ValueOf(syscall.SYS_MQ_NOTIFY),
+ "SYS_MQ_OPEN": ValueOf(syscall.SYS_MQ_OPEN),
+ "SYS_MQ_TIMEDRECEIVE": ValueOf(syscall.SYS_MQ_TIMEDRECEIVE),
+ "SYS_MQ_TIMEDSEND": ValueOf(syscall.SYS_MQ_TIMEDSEND),
+ "SYS_MQ_UNLINK": ValueOf(syscall.SYS_MQ_UNLINK),
+ "SYS_MREMAP": ValueOf(syscall.SYS_MREMAP),
+ "SYS_MSGCTL": ValueOf(syscall.SYS_MSGCTL),
+ "SYS_MSGGET": ValueOf(syscall.SYS_MSGGET),
+ "SYS_MSGRCV": ValueOf(syscall.SYS_MSGRCV),
+ "SYS_MSGSND": ValueOf(syscall.SYS_MSGSND),
+ "SYS_MSYNC": ValueOf(syscall.SYS_MSYNC),
+ "SYS_MUNLOCK": ValueOf(syscall.SYS_MUNLOCK),
+ "SYS_MUNLOCKALL": ValueOf(syscall.SYS_MUNLOCKALL),
+ "SYS_MUNMAP": ValueOf(syscall.SYS_MUNMAP),
+ "SYS_NAME_TO_HANDLE_AT": ValueOf(syscall.SYS_NAME_TO_HANDLE_AT),
+ "SYS_NANOSLEEP": ValueOf(syscall.SYS_NANOSLEEP),
+ "SYS_NEWFSTATAT": ValueOf(syscall.SYS_NEWFSTATAT),
+ "SYS_NFSSERVCTL": ValueOf(syscall.SYS_NFSSERVCTL),
+ "SYS_NMLN": ValueOf(syscall.SYS_NMLN),
+ "SYS_OPEN": ValueOf(syscall.SYS_OPEN),
+ "SYS_OPENAT": ValueOf(syscall.SYS_OPENAT),
+ "SYS_OPEN_BY_HANDLE_AT": ValueOf(syscall.SYS_OPEN_BY_HANDLE_AT),
+ "SYS_PAUSE": ValueOf(syscall.SYS_PAUSE),
+ "SYS_PERF_EVENT_OPEN": ValueOf(syscall.SYS_PERF_EVENT_OPEN),
+ "SYS_PERSONALITY": ValueOf(syscall.SYS_PERSONALITY),
+ "SYS_PIPE": ValueOf(syscall.SYS_PIPE),
+ "SYS_PIPE2": ValueOf(syscall.SYS_PIPE2),
+ "SYS_PIVOT_ROOT": ValueOf(syscall.SYS_PIVOT_ROOT),
+ "SYS_PKEY_ALLOC": ValueOf(syscall.SYS_PKEY_ALLOC),
+ "SYS_PKEY_FREE": ValueOf(syscall.SYS_PKEY_FREE),
+ "SYS_PKEY_MPROTECT": ValueOf(syscall.SYS_PKEY_MPROTECT),
+ "SYS_POLL": ValueOf(syscall.SYS_POLL),
+ "SYS_PPOLL": ValueOf(syscall.SYS_PPOLL),
+ "SYS_PRCTL": ValueOf(syscall.SYS_PRCTL),
+ "SYS_PREAD64": ValueOf(syscall.SYS_PREAD64),
+ "SYS_PREADV": ValueOf(syscall.SYS_PREADV),
+ "SYS_PREADV2": ValueOf(syscall.SYS_PREADV2),
+ "SYS_PRLIMIT64": ValueOf(syscall.SYS_PRLIMIT64),
+ "SYS_PROCESS_VM_READV": ValueOf(syscall.SYS_PROCESS_VM_READV),
+ "SYS_PROCESS_VM_WRITEV": ValueOf(syscall.SYS_PROCESS_VM_WRITEV),
+ "SYS_PSELECT6": ValueOf(syscall.SYS_PSELECT6),
+ "SYS_PTRACE": ValueOf(syscall.SYS_PTRACE),
+ "SYS_PUTPMSG": ValueOf(syscall.SYS_PUTPMSG),
+ "SYS_PWRITE64": ValueOf(syscall.SYS_PWRITE64),
+ "SYS_PWRITEV": ValueOf(syscall.SYS_PWRITEV),
+ "SYS_PWRITEV2": ValueOf(syscall.SYS_PWRITEV2),
+ "SYS_QUERY_MODULE": ValueOf(syscall.SYS_QUERY_MODULE),
+ "SYS_QUOTACTL": ValueOf(syscall.SYS_QUOTACTL),
+ "SYS_READ": ValueOf(syscall.SYS_READ),
+ "SYS_READAHEAD": ValueOf(syscall.SYS_READAHEAD),
+ "SYS_READLINK": ValueOf(syscall.SYS_READLINK),
+ "SYS_READLINKAT": ValueOf(syscall.SYS_READLINKAT),
+ "SYS_READV": ValueOf(syscall.SYS_READV),
+ "SYS_REBOOT": ValueOf(syscall.SYS_REBOOT),
+ "SYS_RECVFROM": ValueOf(syscall.SYS_RECVFROM),
+ "SYS_RECVMMSG": ValueOf(syscall.SYS_RECVMMSG),
+ "SYS_RECVMSG": ValueOf(syscall.SYS_RECVMSG),
+ "SYS_REMAP_FILE_PAGES": ValueOf(syscall.SYS_REMAP_FILE_PAGES),
+ "SYS_REMOVEXATTR": ValueOf(syscall.SYS_REMOVEXATTR),
+ "SYS_RENAME": ValueOf(syscall.SYS_RENAME),
+ "SYS_RENAMEAT": ValueOf(syscall.SYS_RENAMEAT),
+ "SYS_RENAMEAT2": ValueOf(syscall.SYS_RENAMEAT2),
+ "SYS_REQUEST_KEY": ValueOf(syscall.SYS_REQUEST_KEY),
+ "SYS_RESTART_SYSCALL": ValueOf(syscall.SYS_RESTART_SYSCALL),
+ "SYS_RMDIR": ValueOf(syscall.SYS_RMDIR),
+ "SYS_RT_SIGACTION": ValueOf(syscall.SYS_RT_SIGACTION),
+ "SYS_RT_SIGPENDING": ValueOf(syscall.SYS_RT_SIGPENDING),
+ "SYS_RT_SIGPROCMASK": ValueOf(syscall.SYS_RT_SIGPROCMASK),
+ "SYS_RT_SIGQUEUEINFO": ValueOf(syscall.SYS_RT_SIGQUEUEINFO),
+ "SYS_RT_SIGRETURN": ValueOf(syscall.SYS_RT_SIGRETURN),
+ "SYS_RT_SIGSUSPEND": ValueOf(syscall.SYS_RT_SIGSUSPEND),
+ "SYS_RT_SIGTIMEDWAIT": ValueOf(syscall.SYS_RT_SIGTIMEDWAIT),
+ "SYS_RT_TGSIGQUEUEINFO": ValueOf(syscall.SYS_RT_TGSIGQUEUEINFO),
+ "SYS_SCHED_GETAFFINITY": ValueOf(syscall.SYS_SCHED_GETAFFINITY),
+ "SYS_SCHED_GETATTR": ValueOf(syscall.SYS_SCHED_GETATTR),
+ "SYS_SCHED_GETPARAM": ValueOf(syscall.SYS_SCHED_GETPARAM),
+ "SYS_SCHED_GETSCHEDULER": ValueOf(syscall.SYS_SCHED_GETSCHEDULER),
+ "SYS_SCHED_GET_PRIORITY_MAX": ValueOf(syscall.SYS_SCHED_GET_PRIORITY_MAX),
+ "SYS_SCHED_GET_PRIORITY_MIN": ValueOf(syscall.SYS_SCHED_GET_PRIORITY_MIN),
+ "SYS_SCHED_RR_GET_INTERVAL": ValueOf(syscall.SYS_SCHED_RR_GET_INTERVAL),
+ "SYS_SCHED_SETAFFINITY": ValueOf(syscall.SYS_SCHED_SETAFFINITY),
+ "SYS_SCHED_SETATTR": ValueOf(syscall.SYS_SCHED_SETATTR),
+ "SYS_SCHED_SETPARAM": ValueOf(syscall.SYS_SCHED_SETPARAM),
+ "SYS_SCHED_SETSCHEDULER": ValueOf(syscall.SYS_SCHED_SETSCHEDULER),
+ "SYS_SCHED_YIELD": ValueOf(syscall.SYS_SCHED_YIELD),
+ "SYS_SECCOMP": ValueOf(syscall.SYS_SECCOMP),
+ "SYS_SECURITY": ValueOf(syscall.SYS_SECURITY),
+ "SYS_SELECT": ValueOf(syscall.SYS_SELECT),
+ "SYS_SEMCTL": ValueOf(syscall.SYS_SEMCTL),
+ "SYS_SEMGET": ValueOf(syscall.SYS_SEMGET),
+ "SYS_SEMOP": ValueOf(syscall.SYS_SEMOP),
+ "SYS_SEMTIMEDOP": ValueOf(syscall.SYS_SEMTIMEDOP),
+ "SYS_SENDFILE": ValueOf(syscall.SYS_SENDFILE),
+ "SYS_SENDMMSG": ValueOf(syscall.SYS_SENDMMSG),
+ "SYS_SENDMSG": ValueOf(syscall.SYS_SENDMSG),
+ "SYS_SENDTO": ValueOf(syscall.SYS_SENDTO),
+ "SYS_SETDOMAINNAME": ValueOf(syscall.SYS_SETDOMAINNAME),
+ "SYS_SETFSGID": ValueOf(syscall.SYS_SETFSGID),
+ "SYS_SETFSUID": ValueOf(syscall.SYS_SETFSUID),
+ "SYS_SETGID": ValueOf(syscall.SYS_SETGID),
+ "SYS_SETGROUPS": ValueOf(syscall.SYS_SETGROUPS),
+ "SYS_SETHOSTNAME": ValueOf(syscall.SYS_SETHOSTNAME),
+ "SYS_SETITIMER": ValueOf(syscall.SYS_SETITIMER),
+ "SYS_SETNS": ValueOf(syscall.SYS_SETNS),
+ "SYS_SETPGID": ValueOf(syscall.SYS_SETPGID),
+ "SYS_SETPRIORITY": ValueOf(syscall.SYS_SETPRIORITY),
+ "SYS_SETREGID": ValueOf(syscall.SYS_SETREGID),
+ "SYS_SETRESGID": ValueOf(syscall.SYS_SETRESGID),
+ "SYS_SETRESUID": ValueOf(syscall.SYS_SETRESUID),
+ "SYS_SETREUID": ValueOf(syscall.SYS_SETREUID),
+ "SYS_SETRLIMIT": ValueOf(syscall.SYS_SETRLIMIT),
+ "SYS_SETSID": ValueOf(syscall.SYS_SETSID),
+ "SYS_SETSOCKOPT": ValueOf(syscall.SYS_SETSOCKOPT),
+ "SYS_SETTIMEOFDAY": ValueOf(syscall.SYS_SETTIMEOFDAY),
+ "SYS_SETUID": ValueOf(syscall.SYS_SETUID),
+ "SYS_SETXATTR": ValueOf(syscall.SYS_SETXATTR),
+ "SYS_SET_MEMPOLICY": ValueOf(syscall.SYS_SET_MEMPOLICY),
+ "SYS_SET_ROBUST_LIST": ValueOf(syscall.SYS_SET_ROBUST_LIST),
+ "SYS_SET_THREAD_AREA": ValueOf(syscall.SYS_SET_THREAD_AREA),
+ "SYS_SET_TID_ADDRESS": ValueOf(syscall.SYS_SET_TID_ADDRESS),
+ "SYS_SHMAT": ValueOf(syscall.SYS_SHMAT),
+ "SYS_SHMCTL": ValueOf(syscall.SYS_SHMCTL),
+ "SYS_SHMDT": ValueOf(syscall.SYS_SHMDT),
+ "SYS_SHMGET": ValueOf(syscall.SYS_SHMGET),
+ "SYS_SHUTDOWN": ValueOf(syscall.SYS_SHUTDOWN),
+ "SYS_SIGALTSTACK": ValueOf(syscall.SYS_SIGALTSTACK),
+ "SYS_SIGNALFD": ValueOf(syscall.SYS_SIGNALFD),
+ "SYS_SIGNALFD4": ValueOf(syscall.SYS_SIGNALFD4),
+ "SYS_SOCKET": ValueOf(syscall.SYS_SOCKET),
+ "SYS_SOCKETPAIR": ValueOf(syscall.SYS_SOCKETPAIR),
+ "SYS_SPLICE": ValueOf(syscall.SYS_SPLICE),
+ "SYS_STAT": ValueOf(syscall.SYS_STAT),
+ "SYS_STATFS": ValueOf(syscall.SYS_STATFS),
+ "SYS_STATX": ValueOf(syscall.SYS_STATX),
+ "SYS_SWAPOFF": ValueOf(syscall.SYS_SWAPOFF),
+ "SYS_SWAPON": ValueOf(syscall.SYS_SWAPON),
+ "SYS_SYMLINK": ValueOf(syscall.SYS_SYMLINK),
+ "SYS_SYMLINKAT": ValueOf(syscall.SYS_SYMLINKAT),
+ "SYS_SYNC": ValueOf(syscall.SYS_SYNC),
+ "SYS_SYNCFS": ValueOf(syscall.SYS_SYNCFS),
+ "SYS_SYNC_FILE_RANGE": ValueOf(syscall.SYS_SYNC_FILE_RANGE),
+ "SYS_SYSFS": ValueOf(syscall.SYS_SYSFS),
+ "SYS_SYSINFO": ValueOf(syscall.SYS_SYSINFO),
+ "SYS_SYSLOG": ValueOf(syscall.SYS_SYSLOG),
+ "SYS_TEE": ValueOf(syscall.SYS_TEE),
+ "SYS_TGKILL": ValueOf(syscall.SYS_TGKILL),
+ "SYS_TIME": ValueOf(syscall.SYS_TIME),
+ "SYS_TIMERFD_CREATE": ValueOf(syscall.SYS_TIMERFD_CREATE),
+ "SYS_TIMERFD_GETTIME": ValueOf(syscall.SYS_TIMERFD_GETTIME),
+ "SYS_TIMERFD_SETTIME": ValueOf(syscall.SYS_TIMERFD_SETTIME),
+ "SYS_TIMER_CREATE": ValueOf(syscall.SYS_TIMER_CREATE),
+ "SYS_TIMER_DELETE": ValueOf(syscall.SYS_TIMER_DELETE),
+ "SYS_TIMER_GETOVERRUN": ValueOf(syscall.SYS_TIMER_GETOVERRUN),
+ "SYS_TIMER_GETTIME": ValueOf(syscall.SYS_TIMER_GETTIME),
+ "SYS_TIMER_SETTIME": ValueOf(syscall.SYS_TIMER_SETTIME),
+ "SYS_TIMES": ValueOf(syscall.SYS_TIMES),
+ "SYS_TKILL": ValueOf(syscall.SYS_TKILL),
+ "SYS_TRUNCATE": ValueOf(syscall.SYS_TRUNCATE),
+ "SYS_TUXCALL": ValueOf(syscall.SYS_TUXCALL),
+ "SYS_UMASK": ValueOf(syscall.SYS_UMASK),
+ "SYS_UMOUNT2": ValueOf(syscall.SYS_UMOUNT2),
+ "SYS_UNAME": ValueOf(syscall.SYS_UNAME),
+ "SYS_UNLINK": ValueOf(syscall.SYS_UNLINK),
+ "SYS_UNLINKAT": ValueOf(syscall.SYS_UNLINKAT),
+ "SYS_UNSHARE": ValueOf(syscall.SYS_UNSHARE),
+ "SYS_USELIB": ValueOf(syscall.SYS_USELIB),
+ "SYS_USERFAULTFD": ValueOf(syscall.SYS_USERFAULTFD),
+ "SYS_USTAT": ValueOf(syscall.SYS_USTAT),
+ "SYS_UTIME": ValueOf(syscall.SYS_UTIME),
+ "SYS_UTIMENSAT": ValueOf(syscall.SYS_UTIMENSAT),
+ "SYS_UTIMES": ValueOf(syscall.SYS_UTIMES),
+ "SYS_VFORK": ValueOf(syscall.SYS_VFORK),
+ "SYS_VHANGUP": ValueOf(syscall.SYS_VHANGUP),
+ "SYS_VMSPLICE": ValueOf(syscall.SYS_VMSPLICE),
+ "SYS_VSERVER": ValueOf(syscall.SYS_VSERVER),
+ "SYS_WAIT4": ValueOf(syscall.SYS_WAIT4),
+ "SYS_WAITID": ValueOf(syscall.SYS_WAITID),
+ "SYS_WRITE": ValueOf(syscall.SYS_WRITE),
+ "SYS_WRITEV": ValueOf(syscall.SYS_WRITEV),
+ "SYS__SYSCTL": ValueOf(syscall.SYS__SYSCTL),
+ "S_BLKSIZE": ValueOf(syscall.S_BLKSIZE),
+ "S_IEXEC": ValueOf(syscall.S_IEXEC),
+ "S_IFBLK": ValueOf(syscall.S_IFBLK),
+ "S_IFCHR": ValueOf(syscall.S_IFCHR),
+ "S_IFDIR": ValueOf(syscall.S_IFDIR),
+ "S_IFIFO": ValueOf(syscall.S_IFIFO),
+ "S_IFLNK": ValueOf(syscall.S_IFLNK),
+ "S_IFMT": ValueOf(syscall.S_IFMT),
+ "S_IFREG": ValueOf(syscall.S_IFREG),
+ "S_IFSOCK": ValueOf(syscall.S_IFSOCK),
+ "S_IREAD": ValueOf(syscall.S_IREAD),
+ "S_IRGRP": ValueOf(syscall.S_IRGRP),
+ "S_IROTH": ValueOf(syscall.S_IROTH),
+ "S_IRUSR": ValueOf(syscall.S_IRUSR),
+ "S_IRWXG": ValueOf(syscall.S_IRWXG),
+ "S_IRWXO": ValueOf(syscall.S_IRWXO),
+ "S_IRWXU": ValueOf(syscall.S_IRWXU),
+ "S_ISGID": ValueOf(syscall.S_ISGID),
+ "S_ISUID": ValueOf(syscall.S_ISUID),
+ "S_ISVTX": ValueOf(syscall.S_ISVTX),
+ "S_IWGRP": ValueOf(syscall.S_IWGRP),
+ "S_IWOTH": ValueOf(syscall.S_IWOTH),
+ "S_IWRITE": ValueOf(syscall.S_IWRITE),
+ "S_IWUSR": ValueOf(syscall.S_IWUSR),
+ "S_IXGRP": ValueOf(syscall.S_IXGRP),
+ "S_IXOTH": ValueOf(syscall.S_IXOTH),
+ "S_IXUSR": ValueOf(syscall.S_IXUSR),
+ "Seek": ValueOf(syscall.Seek),
+ "Select": ValueOf(syscall.Select),
+ "Sendfile": ValueOf(syscall.Sendfile),
+ "Sendmsg": ValueOf(syscall.Sendmsg),
+ "SendmsgN": ValueOf(syscall.SendmsgN),
+ "Sendto": ValueOf(syscall.Sendto),
+ "SetErrno": ValueOf(syscall.SetErrno),
+ "SetLsfPromisc": ValueOf(syscall.SetLsfPromisc),
+ "SetNonblock": ValueOf(syscall.SetNonblock),
+ "Setdomainname": ValueOf(syscall.Setdomainname),
+ "Setenv": ValueOf(syscall.Setenv),
+ "Setfsgid": ValueOf(syscall.Setfsgid),
+ "Setfsuid": ValueOf(syscall.Setfsuid),
+ "Setgid": ValueOf(syscall.Setgid),
+ "Setgroups": ValueOf(syscall.Setgroups),
+ "Sethostname": ValueOf(syscall.Sethostname),
+ "Setpgid": ValueOf(syscall.Setpgid),
+ "Setpriority": ValueOf(syscall.Setpriority),
+ "Setregid": ValueOf(syscall.Setregid),
+ "Setresgid": ValueOf(syscall.Setresgid),
+ "Setresuid": ValueOf(syscall.Setresuid),
+ "Setreuid": ValueOf(syscall.Setreuid),
+ "Setrlimit": ValueOf(syscall.Setrlimit),
+ "Setsid": ValueOf(syscall.Setsid),
+ "SetsockoptByte": ValueOf(syscall.SetsockoptByte),
+ "SetsockoptICMPv6Filter": ValueOf(syscall.SetsockoptICMPv6Filter),
+ "SetsockoptIPMreq": ValueOf(syscall.SetsockoptIPMreq),
+ "SetsockoptIPMreqn": ValueOf(syscall.SetsockoptIPMreqn),
+ "SetsockoptIPv6Mreq": ValueOf(syscall.SetsockoptIPv6Mreq),
+ "SetsockoptInet4Addr": ValueOf(syscall.SetsockoptInet4Addr),
+ "SetsockoptInt": ValueOf(syscall.SetsockoptInt),
+ "SetsockoptLinger": ValueOf(syscall.SetsockoptLinger),
+ "SetsockoptString": ValueOf(syscall.SetsockoptString),
+ "SetsockoptTimeval": ValueOf(syscall.SetsockoptTimeval),
+ "Settimeofday": ValueOf(syscall.Settimeofday),
+ "Setuid": ValueOf(syscall.Setuid),
+ "Setxattr": ValueOf(syscall.Setxattr),
+ "Shutdown": ValueOf(syscall.Shutdown),
+ "Signame": ValueOf(syscall.Signame),
+ "SizeofCmsghdr": ValueOf(syscall.SizeofCmsghdr),
+ "SizeofICMPv6Filter": ValueOf(syscall.SizeofICMPv6Filter),
+ "SizeofIPMreq": ValueOf(syscall.SizeofIPMreq),
+ "SizeofIPMreqn": ValueOf(syscall.SizeofIPMreqn),
+ "SizeofIPv6MTUInfo": ValueOf(syscall.SizeofIPv6MTUInfo),
+ "SizeofIPv6Mreq": ValueOf(syscall.SizeofIPv6Mreq),
+ "SizeofIfAddrmsg": ValueOf(syscall.SizeofIfAddrmsg),
+ "SizeofIfInfomsg": ValueOf(syscall.SizeofIfInfomsg),
+ "SizeofInet4Pktinfo": ValueOf(syscall.SizeofInet4Pktinfo),
+ "SizeofInet6Pktinfo": ValueOf(syscall.SizeofInet6Pktinfo),
+ "SizeofInotifyEvent": ValueOf(syscall.SizeofInotifyEvent),
+ "SizeofLinger": ValueOf(syscall.SizeofLinger),
+ "SizeofMsghdr": ValueOf(syscall.SizeofMsghdr),
+ "SizeofNlAttr": ValueOf(syscall.SizeofNlAttr),
+ "SizeofNlMsgerr": ValueOf(syscall.SizeofNlMsgerr),
+ "SizeofNlMsghdr": ValueOf(syscall.SizeofNlMsghdr),
+ "SizeofRtAttr": ValueOf(syscall.SizeofRtAttr),
+ "SizeofRtGenmsg": ValueOf(syscall.SizeofRtGenmsg),
+ "SizeofRtMsg": ValueOf(syscall.SizeofRtMsg),
+ "SizeofRtNexthop": ValueOf(syscall.SizeofRtNexthop),
+ "SizeofSockFilter": ValueOf(syscall.SizeofSockFilter),
+ "SizeofSockFprog": ValueOf(syscall.SizeofSockFprog),
+ "SizeofSockaddrAny": ValueOf(syscall.SizeofSockaddrAny),
+ "SizeofSockaddrInet4": ValueOf(syscall.SizeofSockaddrInet4),
+ "SizeofSockaddrInet6": ValueOf(syscall.SizeofSockaddrInet6),
+ "SizeofSockaddrLinklayer": ValueOf(syscall.SizeofSockaddrLinklayer),
+ "SizeofSockaddrNetlink": ValueOf(syscall.SizeofSockaddrNetlink),
+ "SizeofSockaddrUnix": ValueOf(syscall.SizeofSockaddrUnix),
+ "SizeofUcred": ValueOf(syscall.SizeofUcred),
+ "Sleep": ValueOf(syscall.Sleep),
+ "SlicePtrFromStrings": ValueOf(syscall.SlicePtrFromStrings),
+ "Socket": ValueOf(syscall.Socket),
+ "SocketDisableIPv6": ValueOf(&syscall.SocketDisableIPv6).Elem(),
+ "Socketpair": ValueOf(syscall.Socketpair),
+ "Splice": ValueOf(syscall.Splice),
+ "StartProcess": ValueOf(syscall.StartProcess),
+ "Stat": ValueOf(syscall.Stat),
+ "Statfs": ValueOf(syscall.Statfs),
+ "Stderr": ValueOf(&syscall.Stderr).Elem(),
+ "Stdin": ValueOf(&syscall.Stdin).Elem(),
+ "Stdout": ValueOf(&syscall.Stdout).Elem(),
+ "StringBytePtr": ValueOf(syscall.StringBytePtr),
+ "StringByteSlice": ValueOf(syscall.StringByteSlice),
+ "StringSlicePtr": ValueOf(syscall.StringSlicePtr),
+ "Symlink": ValueOf(syscall.Symlink),
+ "Sync": ValueOf(syscall.Sync),
+ "SyncFileRange": ValueOf(syscall.SyncFileRange),
+ "Syscall": ValueOf(syscall.Syscall),
+ "Syscall6": ValueOf(syscall.Syscall6),
+ "Sysconf": ValueOf(syscall.Sysconf),
+ "Sysinfo": ValueOf(syscall.Sysinfo),
+ "TABDLY": ValueOf(syscall.TABDLY),
+ "TCGETA": ValueOf(syscall.TCGETA),
+ "TCGETS": ValueOf(syscall.TCGETS),
+ "TCGETX": ValueOf(syscall.TCGETX),
+ "TCIFLUSH": ValueOf(syscall.TCIFLUSH),
+ "TCIOFF": ValueOf(syscall.TCIOFF),
+ "TCIOFLUSH": ValueOf(syscall.TCIOFLUSH),
+ "TCION": ValueOf(syscall.TCION),
+ "TCOFLUSH": ValueOf(syscall.TCOFLUSH),
+ "TCOOFF": ValueOf(syscall.TCOOFF),
+ "TCOON": ValueOf(syscall.TCOON),
+ "TCP_CA_CWR": ValueOf(syscall.TCP_CA_CWR),
+ "TCP_CA_Disorder": ValueOf(syscall.TCP_CA_Disorder),
+ "TCP_CA_Loss": ValueOf(syscall.TCP_CA_Loss),
+ "TCP_CA_Open": ValueOf(syscall.TCP_CA_Open),
+ "TCP_CA_Recovery": ValueOf(syscall.TCP_CA_Recovery),
+ "TCP_CC_INFO": ValueOf(syscall.TCP_CC_INFO),
+ "TCP_CLOSE": ValueOf(syscall.TCP_CLOSE),
+ "TCP_CLOSE_WAIT": ValueOf(syscall.TCP_CLOSE_WAIT),
+ "TCP_CLOSING": ValueOf(syscall.TCP_CLOSING),
+ "TCP_CONGESTION": ValueOf(syscall.TCP_CONGESTION),
+ "TCP_COOKIE_IN_ALWAYS": ValueOf(syscall.TCP_COOKIE_IN_ALWAYS),
+ "TCP_COOKIE_MAX": ValueOf(syscall.TCP_COOKIE_MAX),
+ "TCP_COOKIE_MIN": ValueOf(syscall.TCP_COOKIE_MIN),
+ "TCP_COOKIE_OUT_NEVER": ValueOf(syscall.TCP_COOKIE_OUT_NEVER),
+ "TCP_COOKIE_PAIR_SIZE": ValueOf(syscall.TCP_COOKIE_PAIR_SIZE),
+ "TCP_COOKIE_TRANSACTIONS": ValueOf(syscall.TCP_COOKIE_TRANSACTIONS),
+ "TCP_CORK": ValueOf(syscall.TCP_CORK),
+ "TCP_DEFER_ACCEPT": ValueOf(syscall.TCP_DEFER_ACCEPT),
+ "TCP_ESTABLISHED": ValueOf(syscall.TCP_ESTABLISHED),
+ "TCP_FASTOPEN": ValueOf(syscall.TCP_FASTOPEN),
+ "TCP_FASTOPEN_CONNECT": ValueOf(syscall.TCP_FASTOPEN_CONNECT),
+ "TCP_FIN_WAIT1": ValueOf(syscall.TCP_FIN_WAIT1),
+ "TCP_FIN_WAIT2": ValueOf(syscall.TCP_FIN_WAIT2),
+ "TCP_INFO": ValueOf(syscall.TCP_INFO),
+ "TCP_KEEPCNT": ValueOf(syscall.TCP_KEEPCNT),
+ "TCP_KEEPIDLE": ValueOf(syscall.TCP_KEEPIDLE),
+ "TCP_KEEPINTVL": ValueOf(syscall.TCP_KEEPINTVL),
+ "TCP_LAST_ACK": ValueOf(syscall.TCP_LAST_ACK),
+ "TCP_LINGER2": ValueOf(syscall.TCP_LINGER2),
+ "TCP_LISTEN": ValueOf(syscall.TCP_LISTEN),
+ "TCP_MAXSEG": ValueOf(syscall.TCP_MAXSEG),
+ "TCP_MAXWIN": ValueOf(syscall.TCP_MAXWIN),
+ "TCP_MAX_WINSHIFT": ValueOf(syscall.TCP_MAX_WINSHIFT),
+ "TCP_MD5SIG": ValueOf(syscall.TCP_MD5SIG),
+ "TCP_MD5SIG_EXT": ValueOf(syscall.TCP_MD5SIG_EXT),
+ "TCP_MD5SIG_FLAG_PREFIX": ValueOf(syscall.TCP_MD5SIG_FLAG_PREFIX),
+ "TCP_MD5SIG_MAXKEYLEN": ValueOf(syscall.TCP_MD5SIG_MAXKEYLEN),
+ "TCP_MSS": ValueOf(syscall.TCP_MSS),
+ "TCP_MSS_DEFAULT": ValueOf(syscall.TCP_MSS_DEFAULT),
+ "TCP_MSS_DESIRED": ValueOf(syscall.TCP_MSS_DESIRED),
+ "TCP_NODELAY": ValueOf(syscall.TCP_NODELAY),
+ "TCP_NOTSENT_LOWAT": ValueOf(syscall.TCP_NOTSENT_LOWAT),
+ "TCP_NO_QUEUE": ValueOf(syscall.TCP_NO_QUEUE),
+ "TCP_QUEUES_NR": ValueOf(syscall.TCP_QUEUES_NR),
+ "TCP_QUEUE_SEQ": ValueOf(syscall.TCP_QUEUE_SEQ),
+ "TCP_QUICKACK": ValueOf(syscall.TCP_QUICKACK),
+ "TCP_RECV_QUEUE": ValueOf(syscall.TCP_RECV_QUEUE),
+ "TCP_REPAIR": ValueOf(syscall.TCP_REPAIR),
+ "TCP_REPAIR_OPTIONS": ValueOf(syscall.TCP_REPAIR_OPTIONS),
+ "TCP_REPAIR_QUEUE": ValueOf(syscall.TCP_REPAIR_QUEUE),
+ "TCP_REPAIR_WINDOW": ValueOf(syscall.TCP_REPAIR_WINDOW),
+ "TCP_SAVED_SYN": ValueOf(syscall.TCP_SAVED_SYN),
+ "TCP_SAVE_SYN": ValueOf(syscall.TCP_SAVE_SYN),
+ "TCP_SEND_QUEUE": ValueOf(syscall.TCP_SEND_QUEUE),
+ "TCP_SYNCNT": ValueOf(syscall.TCP_SYNCNT),
+ "TCP_SYN_RECV": ValueOf(syscall.TCP_SYN_RECV),
+ "TCP_SYN_SENT": ValueOf(syscall.TCP_SYN_SENT),
+ "TCP_S_DATA_IN": ValueOf(syscall.TCP_S_DATA_IN),
+ "TCP_S_DATA_OUT": ValueOf(syscall.TCP_S_DATA_OUT),
+ "TCP_THIN_DUPACK": ValueOf(syscall.TCP_THIN_DUPACK),
+ "TCP_THIN_LINEAR_TIMEOUTS": ValueOf(syscall.TCP_THIN_LINEAR_TIMEOUTS),
+ "TCP_TIMESTAMP": ValueOf(syscall.TCP_TIMESTAMP),
+ "TCP_TIME_WAIT": ValueOf(syscall.TCP_TIME_WAIT),
+ "TCP_ULP": ValueOf(syscall.TCP_ULP),
+ "TCP_USER_TIMEOUT": ValueOf(syscall.TCP_USER_TIMEOUT),
+ "TCP_WINDOW_CLAMP": ValueOf(syscall.TCP_WINDOW_CLAMP),
+ "TCSADRAIN": ValueOf(syscall.TCSADRAIN),
+ "TCSAFLUSH": ValueOf(syscall.TCSAFLUSH),
+ "TCSANOW": ValueOf(syscall.TCSANOW),
+ "TCSETA": ValueOf(syscall.TCSETA),
+ "TCSETAF": ValueOf(syscall.TCSETAF),
+ "TCSETAW": ValueOf(syscall.TCSETAW),
+ "TCSETS": ValueOf(syscall.TCSETS),
+ "TCSETSF": ValueOf(syscall.TCSETSF),
+ "TCSETSW": ValueOf(syscall.TCSETSW),
+ "TCSETX": ValueOf(syscall.TCSETX),
+ "TCSETXF": ValueOf(syscall.TCSETXF),
+ "TCSETXW": ValueOf(syscall.TCSETXW),
+ "TIOCCBRK": ValueOf(syscall.TIOCCBRK),
+ "TIOCCONS": ValueOf(syscall.TIOCCONS),
+ "TIOCEXCL": ValueOf(syscall.TIOCEXCL),
+ "TIOCGDEV": ValueOf(uint32(syscall.TIOCGDEV)),
+ "TIOCGETD": ValueOf(syscall.TIOCGETD),
+ "TIOCGICOUNT": ValueOf(syscall.TIOCGICOUNT),
+ "TIOCGLCKTRMIOS": ValueOf(syscall.TIOCGLCKTRMIOS),
+ "TIOCGPGRP": ValueOf(syscall.TIOCGPGRP),
+ "TIOCGPTN": ValueOf(uint32(syscall.TIOCGPTN)),
+ "TIOCGRS485": ValueOf(syscall.TIOCGRS485),
+ "TIOCGSERIAL": ValueOf(syscall.TIOCGSERIAL),
+ "TIOCGSID": ValueOf(syscall.TIOCGSID),
+ "TIOCGSOFTCAR": ValueOf(syscall.TIOCGSOFTCAR),
+ "TIOCGWINSZ": ValueOf(syscall.TIOCGWINSZ),
+ "TIOCINQ": ValueOf(syscall.TIOCINQ),
+ "TIOCLINUX": ValueOf(syscall.TIOCLINUX),
+ "TIOCMBIC": ValueOf(syscall.TIOCMBIC),
+ "TIOCMBIS": ValueOf(syscall.TIOCMBIS),
+ "TIOCMGET": ValueOf(syscall.TIOCMGET),
+ "TIOCMIWAIT": ValueOf(syscall.TIOCMIWAIT),
+ "TIOCMSET": ValueOf(syscall.TIOCMSET),
+ "TIOCM_CAR": ValueOf(syscall.TIOCM_CAR),
+ "TIOCM_CD": ValueOf(syscall.TIOCM_CD),
+ "TIOCM_CTS": ValueOf(syscall.TIOCM_CTS),
+ "TIOCM_DSR": ValueOf(syscall.TIOCM_DSR),
+ "TIOCM_DTR": ValueOf(syscall.TIOCM_DTR),
+ "TIOCM_LE": ValueOf(syscall.TIOCM_LE),
+ "TIOCM_RI": ValueOf(syscall.TIOCM_RI),
+ "TIOCM_RNG": ValueOf(syscall.TIOCM_RNG),
+ "TIOCM_RTS": ValueOf(syscall.TIOCM_RTS),
+ "TIOCM_SR": ValueOf(syscall.TIOCM_SR),
+ "TIOCM_ST": ValueOf(syscall.TIOCM_ST),
+ "TIOCNOTTY": ValueOf(syscall.TIOCNOTTY),
+ "TIOCNXCL": ValueOf(syscall.TIOCNXCL),
+ "TIOCOUTQ": ValueOf(syscall.TIOCOUTQ),
+ "TIOCPKT": ValueOf(syscall.TIOCPKT),
+ "TIOCPKT_DATA": ValueOf(syscall.TIOCPKT_DATA),
+ "TIOCPKT_DOSTOP": ValueOf(syscall.TIOCPKT_DOSTOP),
+ "TIOCPKT_FLUSHREAD": ValueOf(syscall.TIOCPKT_FLUSHREAD),
+ "TIOCPKT_FLUSHWRITE": ValueOf(syscall.TIOCPKT_FLUSHWRITE),
+ "TIOCPKT_IOCTL": ValueOf(syscall.TIOCPKT_IOCTL),
+ "TIOCPKT_NOSTOP": ValueOf(syscall.TIOCPKT_NOSTOP),
+ "TIOCPKT_START": ValueOf(syscall.TIOCPKT_START),
+ "TIOCPKT_STOP": ValueOf(syscall.TIOCPKT_STOP),
+ "TIOCSBRK": ValueOf(syscall.TIOCSBRK),
+ "TIOCSCTTY": ValueOf(syscall.TIOCSCTTY),
+ "TIOCSERCONFIG": ValueOf(syscall.TIOCSERCONFIG),
+ "TIOCSERGETLSR": ValueOf(syscall.TIOCSERGETLSR),
+ "TIOCSERGETMULTI": ValueOf(syscall.TIOCSERGETMULTI),
+ "TIOCSERGSTRUCT": ValueOf(syscall.TIOCSERGSTRUCT),
+ "TIOCSERGWILD": ValueOf(syscall.TIOCSERGWILD),
+ "TIOCSERSETMULTI": ValueOf(syscall.TIOCSERSETMULTI),
+ "TIOCSERSWILD": ValueOf(syscall.TIOCSERSWILD),
+ "TIOCSER_TEMT": ValueOf(syscall.TIOCSER_TEMT),
+ "TIOCSETD": ValueOf(syscall.TIOCSETD),
+ "TIOCSIG": ValueOf(syscall.TIOCSIG),
+ "TIOCSLCKTRMIOS": ValueOf(syscall.TIOCSLCKTRMIOS),
+ "TIOCSPGRP": ValueOf(syscall.TIOCSPGRP),
+ "TIOCSPTLCK": ValueOf(syscall.TIOCSPTLCK),
+ "TIOCSRS485": ValueOf(syscall.TIOCSRS485),
+ "TIOCSSERIAL": ValueOf(syscall.TIOCSSERIAL),
+ "TIOCSSOFTCAR": ValueOf(syscall.TIOCSSOFTCAR),
+ "TIOCSTI": ValueOf(syscall.TIOCSTI),
+ "TIOCSWINSZ": ValueOf(syscall.TIOCSWINSZ),
+ "TIOCVHANGUP": ValueOf(syscall.TIOCVHANGUP),
+ "TOSTOP": ValueOf(syscall.TOSTOP),
+ "TUNATTACHFILTER": ValueOf(syscall.TUNATTACHFILTER),
+ "TUNDETACHFILTER": ValueOf(syscall.TUNDETACHFILTER),
+ "TUNGETFEATURES": ValueOf(uint32(syscall.TUNGETFEATURES)),
+ "TUNGETFILTER": ValueOf(uint32(syscall.TUNGETFILTER)),
+ "TUNGETIFF": ValueOf(uint32(syscall.TUNGETIFF)),
+ "TUNGETSNDBUF": ValueOf(uint32(syscall.TUNGETSNDBUF)),
+ "TUNGETVNETHDRSZ": ValueOf(uint32(syscall.TUNGETVNETHDRSZ)),
+ "TUNSETDEBUG": ValueOf(syscall.TUNSETDEBUG),
+ "TUNSETGROUP": ValueOf(syscall.TUNSETGROUP),
+ "TUNSETIFF": ValueOf(syscall.TUNSETIFF),
+ "TUNSETIFINDEX": ValueOf(syscall.TUNSETIFINDEX),
+ "TUNSETLINK": ValueOf(syscall.TUNSETLINK),
+ "TUNSETNOCSUM": ValueOf(syscall.TUNSETNOCSUM),
+ "TUNSETOFFLOAD": ValueOf(syscall.TUNSETOFFLOAD),
+ "TUNSETOWNER": ValueOf(syscall.TUNSETOWNER),
+ "TUNSETPERSIST": ValueOf(syscall.TUNSETPERSIST),
+ "TUNSETQUEUE": ValueOf(syscall.TUNSETQUEUE),
+ "TUNSETSNDBUF": ValueOf(syscall.TUNSETSNDBUF),
+ "TUNSETTXFILTER": ValueOf(syscall.TUNSETTXFILTER),
+ "TUNSETVNETHDRSZ": ValueOf(syscall.TUNSETVNETHDRSZ),
+ "Tcgetattr": ValueOf(syscall.Tcgetattr),
+ "Tcsetattr": ValueOf(syscall.Tcsetattr),
+ "Tee": ValueOf(syscall.Tee),
+ "Tgkill": ValueOf(syscall.Tgkill),
+ "Time": ValueOf(syscall.Time),
+ "Times": ValueOf(syscall.Times),
+ "TimespecToNsec": ValueOf(syscall.TimespecToNsec),
+ "TimevalToNsec": ValueOf(syscall.TimevalToNsec),
+ "Truncate": ValueOf(syscall.Truncate),
+ "Umask": ValueOf(syscall.Umask),
+ "Uname": ValueOf(syscall.Uname),
+ "UnixCredentials": ValueOf(syscall.UnixCredentials),
+ "UnixRights": ValueOf(syscall.UnixRights),
+ "Unlink": ValueOf(syscall.Unlink),
+ "Unlinkat": ValueOf(syscall.Unlinkat),
+ "Unmount": ValueOf(syscall.Unmount),
+ "Unsetenv": ValueOf(syscall.Unsetenv),
+ "Unshare": ValueOf(syscall.Unshare),
+ "Ustat": ValueOf(syscall.Ustat),
+ "Utime": ValueOf(syscall.Utime),
+ "Utimes": ValueOf(syscall.Utimes),
+ "UtimesNano": ValueOf(syscall.UtimesNano),
+ "VDISCARD": ValueOf(syscall.VDISCARD),
+ "VEOF": ValueOf(syscall.VEOF),
+ "VEOL": ValueOf(syscall.VEOL),
+ "VEOL2": ValueOf(syscall.VEOL2),
+ "VERASE": ValueOf(syscall.VERASE),
+ "VINTR": ValueOf(syscall.VINTR),
+ "VKILL": ValueOf(syscall.VKILL),
+ "VLNEXT": ValueOf(syscall.VLNEXT),
+ "VMIN": ValueOf(syscall.VMIN),
+ "VQUIT": ValueOf(syscall.VQUIT),
+ "VREPRINT": ValueOf(syscall.VREPRINT),
+ "VSTART": ValueOf(syscall.VSTART),
+ "VSTOP": ValueOf(syscall.VSTOP),
+ "VSUSP": ValueOf(syscall.VSUSP),
+ "VTDLY": ValueOf(syscall.VTDLY),
+ "VTIME": ValueOf(syscall.VTIME),
+ "VWERASE": ValueOf(syscall.VWERASE),
+ "WAIT_ANY": ValueOf(syscall.WAIT_ANY),
+ "WAIT_MYPGRP": ValueOf(syscall.WAIT_MYPGRP),
+ "WALL": ValueOf(syscall.WALL),
+ "WCHAR_MAX": ValueOf(syscall.WCHAR_MAX),
+ "WCHAR_MIN": ValueOf(syscall.WCHAR_MIN),
+ "WCHAR_WIDTH": ValueOf(syscall.WCHAR_WIDTH),
+ "WCONTINUED": ValueOf(syscall.WCONTINUED),
+ "WCOREFLAG": ValueOf(syscall.WCOREFLAG),
+ "WEXITED": ValueOf(syscall.WEXITED),
+ "WINT_MAX": ValueOf(uint32(syscall.WINT_MAX)),
+ "WINT_MIN": ValueOf(syscall.WINT_MIN),
+ "WINT_WIDTH": ValueOf(syscall.WINT_WIDTH),
+ "WNOHANG": ValueOf(syscall.WNOHANG),
+ "WNOWAIT": ValueOf(syscall.WNOWAIT),
+ "WORD_BIT": ValueOf(syscall.WORD_BIT),
+ "WSTOPPED": ValueOf(syscall.WSTOPPED),
+ "WUNTRACED": ValueOf(syscall.WUNTRACED),
+ "W_OK": ValueOf(syscall.W_OK),
+ "Wait4": ValueOf(syscall.Wait4),
+ "Write": ValueOf(syscall.Write),
+ "XCASE": ValueOf(syscall.XCASE),
+ }, Types: map[string]Type{
+ "Addrinfo": TypeOf((*syscall.Addrinfo)(nil)).Elem(),
+ "Cmsghdr": TypeOf((*syscall.Cmsghdr)(nil)).Elem(),
+ "Cmsghdr_len_t": TypeOf((*syscall.Cmsghdr_len_t)(nil)).Elem(),
+ "Conn": TypeOf((*syscall.Conn)(nil)).Elem(),
+ "Credential": TypeOf((*syscall.Credential)(nil)).Elem(),
+ "DIR": TypeOf((*syscall.DIR)(nil)).Elem(),
+ "Dirent": TypeOf((*syscall.Dirent)(nil)).Elem(),
+ "EpollEvent": TypeOf((*syscall.EpollEvent)(nil)).Elem(),
+ "Errno": TypeOf((*syscall.Errno)(nil)).Elem(),
+ "FdSet": TypeOf((*syscall.FdSet)(nil)).Elem(),
+ "Flock_t": TypeOf((*syscall.Flock_t)(nil)).Elem(),
+ "Gid_t": TypeOf((*syscall.Gid_t)(nil)).Elem(),
+ "Group": TypeOf((*syscall.Group)(nil)).Elem(),
+ "ICMPv6Filter": TypeOf((*syscall.ICMPv6Filter)(nil)).Elem(),
+ "IPMreq": TypeOf((*syscall.IPMreq)(nil)).Elem(),
+ "IPMreqn": TypeOf((*syscall.IPMreqn)(nil)).Elem(),
+ "IPv6MTUInfo": TypeOf((*syscall.IPv6MTUInfo)(nil)).Elem(),
+ "IPv6Mreq": TypeOf((*syscall.IPv6Mreq)(nil)).Elem(),
+ "IfAddrmsg": TypeOf((*syscall.IfAddrmsg)(nil)).Elem(),
+ "IfInfomsg": TypeOf((*syscall.IfInfomsg)(nil)).Elem(),
+ "Inet4Pktinfo": TypeOf((*syscall.Inet4Pktinfo)(nil)).Elem(),
+ "Inet6Pktinfo": TypeOf((*syscall.Inet6Pktinfo)(nil)).Elem(),
+ "InotifyEvent": TypeOf((*syscall.InotifyEvent)(nil)).Elem(),
+ "Iovec": TypeOf((*syscall.Iovec)(nil)).Elem(),
+ "Iovec_len_t": TypeOf((*syscall.Iovec_len_t)(nil)).Elem(),
+ "Linger": TypeOf((*syscall.Linger)(nil)).Elem(),
+ "Mode_t": TypeOf((*syscall.Mode_t)(nil)).Elem(),
+ "Msghdr": TypeOf((*syscall.Msghdr)(nil)).Elem(),
+ "Msghdr_controllen_t": TypeOf((*syscall.Msghdr_controllen_t)(nil)).Elem(),
+ "NetlinkMessage": TypeOf((*syscall.NetlinkMessage)(nil)).Elem(),
+ "NetlinkRouteAttr": TypeOf((*syscall.NetlinkRouteAttr)(nil)).Elem(),
+ "NetlinkRouteRequest": TypeOf((*syscall.NetlinkRouteRequest)(nil)).Elem(),
+ "NlAttr": TypeOf((*syscall.NlAttr)(nil)).Elem(),
+ "NlMsgerr": TypeOf((*syscall.NlMsgerr)(nil)).Elem(),
+ "NlMsghdr": TypeOf((*syscall.NlMsghdr)(nil)).Elem(),
+ "Offset_t": TypeOf((*syscall.Offset_t)(nil)).Elem(),
+ "Passwd": TypeOf((*syscall.Passwd)(nil)).Elem(),
+ "Pid_t": TypeOf((*syscall.Pid_t)(nil)).Elem(),
+ "ProcAttr": TypeOf((*syscall.ProcAttr)(nil)).Elem(),
+ "PtraceRegs": TypeOf((*syscall.PtraceRegs)(nil)).Elem(),
+ "RawConn": TypeOf((*syscall.RawConn)(nil)).Elem(),
+ "RawSockaddr": TypeOf((*syscall.RawSockaddr)(nil)).Elem(),
+ "RawSockaddrAny": TypeOf((*syscall.RawSockaddrAny)(nil)).Elem(),
+ "RawSockaddrInet4": TypeOf((*syscall.RawSockaddrInet4)(nil)).Elem(),
+ "RawSockaddrInet6": TypeOf((*syscall.RawSockaddrInet6)(nil)).Elem(),
+ "RawSockaddrLinklayer": TypeOf((*syscall.RawSockaddrLinklayer)(nil)).Elem(),
+ "RawSockaddrNetlink": TypeOf((*syscall.RawSockaddrNetlink)(nil)).Elem(),
+ "RawSockaddrUnix": TypeOf((*syscall.RawSockaddrUnix)(nil)).Elem(),
+ "Rlimit": TypeOf((*syscall.Rlimit)(nil)).Elem(),
+ "RtAttr": TypeOf((*syscall.RtAttr)(nil)).Elem(),
+ "RtGenmsg": TypeOf((*syscall.RtGenmsg)(nil)).Elem(),
+ "RtMsg": TypeOf((*syscall.RtMsg)(nil)).Elem(),
+ "RtNexthop": TypeOf((*syscall.RtNexthop)(nil)).Elem(),
+ "Rusage": TypeOf((*syscall.Rusage)(nil)).Elem(),
+ "Signal": TypeOf((*syscall.Signal)(nil)).Elem(),
+ "Size_t": TypeOf((*syscall.Size_t)(nil)).Elem(),
+ "SockFilter": TypeOf((*syscall.SockFilter)(nil)).Elem(),
+ "SockFprog": TypeOf((*syscall.SockFprog)(nil)).Elem(),
+ "Sockaddr": TypeOf((*syscall.Sockaddr)(nil)).Elem(),
+ "SockaddrInet4": TypeOf((*syscall.SockaddrInet4)(nil)).Elem(),
+ "SockaddrInet6": TypeOf((*syscall.SockaddrInet6)(nil)).Elem(),
+ "SockaddrLinklayer": TypeOf((*syscall.SockaddrLinklayer)(nil)).Elem(),
+ "SockaddrNetlink": TypeOf((*syscall.SockaddrNetlink)(nil)).Elem(),
+ "SockaddrUnix": TypeOf((*syscall.SockaddrUnix)(nil)).Elem(),
+ "SocketControlMessage": TypeOf((*syscall.SocketControlMessage)(nil)).Elem(),
+ "Socklen_t": TypeOf((*syscall.Socklen_t)(nil)).Elem(),
+ "Ssize_t": TypeOf((*syscall.Ssize_t)(nil)).Elem(),
+ "Stat_t": TypeOf((*syscall.Stat_t)(nil)).Elem(),
+ "Statfs_t": TypeOf((*syscall.Statfs_t)(nil)).Elem(),
+ "SysProcAttr": TypeOf((*syscall.SysProcAttr)(nil)).Elem(),
+ "SysProcIDMap": TypeOf((*syscall.SysProcIDMap)(nil)).Elem(),
+ "Sysinfo_t": TypeOf((*syscall.Sysinfo_t)(nil)).Elem(),
+ "Termios": TypeOf((*syscall.Termios)(nil)).Elem(),
+ "Time_t": TypeOf((*syscall.Time_t)(nil)).Elem(),
+ "Timespec": TypeOf((*syscall.Timespec)(nil)).Elem(),
+ "Timespec_nsec_t": TypeOf((*syscall.Timespec_nsec_t)(nil)).Elem(),
+ "Timespec_sec_t": TypeOf((*syscall.Timespec_sec_t)(nil)).Elem(),
+ "Timeval": TypeOf((*syscall.Timeval)(nil)).Elem(),
+ "Timeval_sec_t": TypeOf((*syscall.Timeval_sec_t)(nil)).Elem(),
+ "Timeval_usec_t": TypeOf((*syscall.Timeval_usec_t)(nil)).Elem(),
+ "Timex": TypeOf((*syscall.Timex)(nil)).Elem(),
+ "Tms": TypeOf((*syscall.Tms)(nil)).Elem(),
+ "Ucred": TypeOf((*syscall.Ucred)(nil)).Elem(),
+ "Uid_t": TypeOf((*syscall.Uid_t)(nil)).Elem(),
+ "Ustat_t": TypeOf((*syscall.Ustat_t)(nil)).Elem(),
+ "Utimbuf": TypeOf((*syscall.Utimbuf)(nil)).Elem(),
+ "Utsname": TypeOf((*syscall.Utsname)(nil)).Elem(),
+ "WaitStatus": TypeOf((*syscall.WaitStatus)(nil)).Elem(),
+ }, Proxies: map[string]Type{
+ "Conn": TypeOf((*P_syscall_Conn)(nil)).Elem(),
+ "RawConn": TypeOf((*P_syscall_RawConn)(nil)).Elem(),
+ }, Untypeds: map[string]string{
+ "AF_ALG": "int:38",
+ "AF_APPLETALK": "int:5",
+ "AF_ASH": "int:18",
+ "AF_ATMPVC": "int:8",
+ "AF_ATMSVC": "int:20",
+ "AF_AX25": "int:3",
+ "AF_BLUETOOTH": "int:31",
+ "AF_BRIDGE": "int:7",
+ "AF_CAIF": "int:37",
+ "AF_CAN": "int:29",
+ "AF_DECnet": "int:12",
+ "AF_ECONET": "int:19",
+ "AF_FILE": "int:1",
+ "AF_IB": "int:27",
+ "AF_IEEE802154": "int:36",
+ "AF_INET": "int:2",
+ "AF_INET6": "int:10",
+ "AF_IPX": "int:4",
+ "AF_IRDA": "int:23",
+ "AF_ISDN": "int:34",
+ "AF_IUCV": "int:32",
+ "AF_KCM": "int:41",
+ "AF_KEY": "int:15",
+ "AF_LLC": "int:26",
+ "AF_LOCAL": "int:1",
+ "AF_MAX": "int:44",
+ "AF_MPLS": "int:28",
+ "AF_NETBEUI": "int:13",
+ "AF_NETLINK": "int:16",
+ "AF_NETROM": "int:6",
+ "AF_NFC": "int:39",
+ "AF_PACKET": "int:17",
+ "AF_PHONET": "int:35",
+ "AF_PPPOX": "int:24",
+ "AF_QIPCRTR": "int:42",
+ "AF_RDS": "int:21",
+ "AF_ROSE": "int:11",
+ "AF_ROUTE": "int:16",
+ "AF_RXRPC": "int:33",
+ "AF_SECURITY": "int:14",
+ "AF_SMC": "int:43",
+ "AF_SNA": "int:22",
+ "AF_TIPC": "int:30",
+ "AF_UNIX": "int:1",
+ "AF_UNSPEC": "int:0",
+ "AF_VSOCK": "int:40",
+ "AF_WANPIPE": "int:25",
+ "AF_X25": "int:9",
+ "AI_ADDRCONFIG": "int:32",
+ "AI_ALL": "int:16",
+ "AI_CANONIDN": "int:128",
+ "AI_CANONNAME": "int:2",
+ "AI_IDN": "int:64",
+ "AI_IDN_ALLOW_UNASSIGNED": "int:256",
+ "AI_IDN_USE_STD3_ASCII_RULES": "int:512",
+ "AI_NUMERICHOST": "int:4",
+ "AI_NUMERICSERV": "int:1024",
+ "AI_PASSIVE": "int:1",
+ "AI_V4MAPPED": "int:8",
+ "ARCH": "string:amd64",
+ "ARPHRD_ADAPT": "int:264",
+ "ARPHRD_APPLETLK": "int:8",
+ "ARPHRD_ARCNET": "int:7",
+ "ARPHRD_ASH": "int:781",
+ "ARPHRD_ATM": "int:19",
+ "ARPHRD_AX25": "int:3",
+ "ARPHRD_BIF": "int:775",
+ "ARPHRD_CHAOS": "int:5",
+ "ARPHRD_CISCO": "int:513",
+ "ARPHRD_CSLIP": "int:257",
+ "ARPHRD_CSLIP6": "int:259",
+ "ARPHRD_DDCMP": "int:517",
+ "ARPHRD_DLCI": "int:15",
+ "ARPHRD_ECONET": "int:782",
+ "ARPHRD_EETHER": "int:2",
+ "ARPHRD_ETHER": "int:1",
+ "ARPHRD_EUI64": "int:27",
+ "ARPHRD_FCAL": "int:785",
+ "ARPHRD_FCFABRIC": "int:787",
+ "ARPHRD_FCPL": "int:786",
+ "ARPHRD_FCPP": "int:784",
+ "ARPHRD_FDDI": "int:774",
+ "ARPHRD_FRAD": "int:770",
+ "ARPHRD_HDLC": "int:513",
+ "ARPHRD_HIPPI": "int:780",
+ "ARPHRD_HWX25": "int:272",
+ "ARPHRD_IEEE1394": "int:24",
+ "ARPHRD_IEEE802": "int:6",
+ "ARPHRD_IEEE80211": "int:801",
+ "ARPHRD_IEEE80211_PRISM": "int:802",
+ "ARPHRD_IEEE80211_RADIOTAP": "int:803",
+ "ARPHRD_IEEE802154": "int:804",
+ "ARPHRD_IEEE802154_PHY": "int:805",
+ "ARPHRD_IEEE802_TR": "int:800",
+ "ARPHRD_INFINIBAND": "int:32",
+ "ARPHRD_IPDDP": "int:777",
+ "ARPHRD_IPGRE": "int:778",
+ "ARPHRD_IRDA": "int:783",
+ "ARPHRD_LAPB": "int:516",
+ "ARPHRD_LOCALTLK": "int:773",
+ "ARPHRD_LOOPBACK": "int:772",
+ "ARPHRD_METRICOM": "int:23",
+ "ARPHRD_NETROM": "int:0",
+ "ARPHRD_NONE": "int:65534",
+ "ARPHRD_PIMREG": "int:779",
+ "ARPHRD_PPP": "int:512",
+ "ARPHRD_PRONET": "int:4",
+ "ARPHRD_RAWHDLC": "int:518",
+ "ARPHRD_RAWIP": "int:519",
+ "ARPHRD_ROSE": "int:270",
+ "ARPHRD_RSRVD": "int:260",
+ "ARPHRD_SIT": "int:776",
+ "ARPHRD_SKIP": "int:771",
+ "ARPHRD_SLIP": "int:256",
+ "ARPHRD_SLIP6": "int:258",
+ "ARPHRD_TUNNEL": "int:768",
+ "ARPHRD_TUNNEL6": "int:769",
+ "ARPHRD_VOID": "int:65535",
+ "ARPHRD_X25": "int:271",
+ "B0": "int:0",
+ "B1000000": "int:4104",
+ "B110": "int:3",
+ "B115200": "int:4098",
+ "B1152000": "int:4105",
+ "B1200": "int:9",
+ "B134": "int:4",
+ "B150": "int:5",
+ "B1500000": "int:4106",
+ "B1800": "int:10",
+ "B19200": "int:14",
+ "B200": "int:6",
+ "B2000000": "int:4107",
+ "B230400": "int:4099",
+ "B2400": "int:11",
+ "B2500000": "int:4108",
+ "B300": "int:7",
+ "B3000000": "int:4109",
+ "B3500000": "int:4110",
+ "B38400": "int:15",
+ "B4000000": "int:4111",
+ "B460800": "int:4100",
+ "B4800": "int:12",
+ "B50": "int:1",
+ "B500000": "int:4101",
+ "B57600": "int:4097",
+ "B576000": "int:4102",
+ "B600": "int:8",
+ "B75": "int:2",
+ "B921600": "int:4103",
+ "B9600": "int:13",
+ "BPF_A": "int:16",
+ "BPF_ABS": "int:32",
+ "BPF_ADD": "int:0",
+ "BPF_ALU": "int:4",
+ "BPF_AND": "int:80",
+ "BPF_B": "int:16",
+ "BPF_DIV": "int:48",
+ "BPF_H": "int:8",
+ "BPF_IMM": "int:0",
+ "BPF_IND": "int:64",
+ "BPF_JA": "int:0",
+ "BPF_JEQ": "int:16",
+ "BPF_JGE": "int:48",
+ "BPF_JGT": "int:32",
+ "BPF_JMP": "int:5",
+ "BPF_JSET": "int:64",
+ "BPF_K": "int:0",
+ "BPF_LD": "int:0",
+ "BPF_LDX": "int:1",
+ "BPF_LEN": "int:128",
+ "BPF_LL_OFF": "int:-2097152",
+ "BPF_LSH": "int:96",
+ "BPF_MAJOR_VERSION": "int:1",
+ "BPF_MAXINSNS": "int:4096",
+ "BPF_MEM": "int:96",
+ "BPF_MEMWORDS": "int:16",
+ "BPF_MINOR_VERSION": "int:1",
+ "BPF_MISC": "int:7",
+ "BPF_MOD": "int:144",
+ "BPF_MSH": "int:160",
+ "BPF_MUL": "int:32",
+ "BPF_NEG": "int:128",
+ "BPF_NET_OFF": "int:-1048576",
+ "BPF_OR": "int:64",
+ "BPF_RET": "int:6",
+ "BPF_RSH": "int:112",
+ "BPF_ST": "int:2",
+ "BPF_STX": "int:3",
+ "BPF_SUB": "int:16",
+ "BPF_TAX": "int:0",
+ "BPF_TXA": "int:128",
+ "BPF_W": "int:0",
+ "BPF_X": "int:8",
+ "BPF_XOR": "int:160",
+ "BRKINT": "int:2",
+ "BSDLY": "int:8192",
+ "CBAUD": "int:4111",
+ "CBAUDEX": "int:4096",
+ "CIBAUD": "int:269418496",
+ "CLOCAL": "int:2048",
+ "CLONE_CHILD_CLEARTID": "int:2097152",
+ "CLONE_CHILD_SETTID": "int:16777216",
+ "CLONE_DETACHED": "int:4194304",
+ "CLONE_FILES": "int:1024",
+ "CLONE_FS": "int:512",
+ "CLONE_IO": "int:2147483648",
+ "CLONE_NEWCGROUP": "int:33554432",
+ "CLONE_NEWIPC": "int:134217728",
+ "CLONE_NEWNET": "int:1073741824",
+ "CLONE_NEWNS": "int:131072",
+ "CLONE_NEWPID": "int:536870912",
+ "CLONE_NEWUSER": "int:268435456",
+ "CLONE_NEWUTS": "int:67108864",
+ "CLONE_PARENT": "int:32768",
+ "CLONE_PARENT_SETTID": "int:1048576",
+ "CLONE_PTRACE": "int:8192",
+ "CLONE_SETTLS": "int:524288",
+ "CLONE_SIGHAND": "int:2048",
+ "CLONE_SYSVSEM": "int:262144",
+ "CLONE_THREAD": "int:65536",
+ "CLONE_UNTRACED": "int:8388608",
+ "CLONE_VFORK": "int:16384",
+ "CLONE_VM": "int:256",
+ "CMSPAR": "int:1073741824",
+ "CR0": "int:0",
+ "CR1": "int:512",
+ "CR2": "int:1024",
+ "CR3": "int:1536",
+ "CRDLY": "int:1536",
+ "CREAD": "int:128",
+ "CRTSCTS": "int:2147483648",
+ "CS5": "int:0",
+ "CS6": "int:16",
+ "CS7": "int:32",
+ "CS8": "int:48",
+ "CSIZE": "int:48",
+ "CSTOPB": "int:64",
+ "DT_BLK": "int:6",
+ "DT_CHR": "int:2",
+ "DT_DIR": "int:4",
+ "DT_FIFO": "int:1",
+ "DT_LNK": "int:10",
+ "DT_REG": "int:8",
+ "DT_SOCK": "int:12",
+ "DT_UNKNOWN": "int:0",
+ "DT_WHT": "int:14",
+ "EAI_ADDRFAMILY": "int:-9",
+ "EAI_AGAIN": "int:-3",
+ "EAI_ALLDONE": "int:-103",
+ "EAI_BADFLAGS": "int:-1",
+ "EAI_CANCELED": "int:-101",
+ "EAI_FAIL": "int:-4",
+ "EAI_FAMILY": "int:-6",
+ "EAI_IDN_ENCODE": "int:-105",
+ "EAI_INPROGRESS": "int:-100",
+ "EAI_INTR": "int:-104",
+ "EAI_MEMORY": "int:-10",
+ "EAI_NODATA": "int:-5",
+ "EAI_NONAME": "int:-2",
+ "EAI_NOTCANCELED": "int:-102",
+ "EAI_OVERFLOW": "int:-12",
+ "EAI_SERVICE": "int:-8",
+ "EAI_SOCKTYPE": "int:-7",
+ "EAI_SYSTEM": "int:-11",
+ "ECHO": "int:8",
+ "ECHOCTL": "int:512",
+ "ECHOE": "int:16",
+ "ECHOK": "int:32",
+ "ECHOKE": "int:2048",
+ "ECHONL": "int:64",
+ "ECHOPRT": "int:1024",
+ "EPOLLERR": "int:8",
+ "EPOLLET": "int:2147483648",
+ "EPOLLEXCLUSIVE": "int:268435456",
+ "EPOLLHUP": "int:16",
+ "EPOLLIN": "int:1",
+ "EPOLLMSG": "int:1024",
+ "EPOLLONESHOT": "int:1073741824",
+ "EPOLLOUT": "int:4",
+ "EPOLLPRI": "int:2",
+ "EPOLLRDBAND": "int:128",
+ "EPOLLRDHUP": "int:8192",
+ "EPOLLRDNORM": "int:64",
+ "EPOLLWAKEUP": "int:536870912",
+ "EPOLLWRBAND": "int:512",
+ "EPOLLWRNORM": "int:256",
+ "EPOLL_CLOEXEC": "int:524288",
+ "EPOLL_CTL_ADD": "int:1",
+ "EPOLL_CTL_DEL": "int:2",
+ "EPOLL_CTL_MOD": "int:3",
+ "ETH_ALEN": "int:6",
+ "ETH_DATA_LEN": "int:1500",
+ "ETH_FCS_LEN": "int:4",
+ "ETH_FRAME_LEN": "int:1514",
+ "ETH_HLEN": "int:14",
+ "ETH_MAX_MTU": "int:65535",
+ "ETH_MIN_MTU": "int:68",
+ "ETH_P_1588": "int:35063",
+ "ETH_P_8021AD": "int:34984",
+ "ETH_P_8021AH": "int:35047",
+ "ETH_P_8021Q": "int:33024",
+ "ETH_P_80221": "int:35095",
+ "ETH_P_802_2": "int:4",
+ "ETH_P_802_3": "int:1",
+ "ETH_P_802_3_MIN": "int:1536",
+ "ETH_P_802_EX1": "int:34997",
+ "ETH_P_AARP": "int:33011",
+ "ETH_P_AF_IUCV": "int:64507",
+ "ETH_P_ALL": "int:3",
+ "ETH_P_AOE": "int:34978",
+ "ETH_P_ARCNET": "int:26",
+ "ETH_P_ARP": "int:2054",
+ "ETH_P_ATALK": "int:32923",
+ "ETH_P_ATMFATE": "int:34948",
+ "ETH_P_ATMMPOA": "int:34892",
+ "ETH_P_AX25": "int:2",
+ "ETH_P_BATMAN": "int:17157",
+ "ETH_P_BPQ": "int:2303",
+ "ETH_P_CAIF": "int:247",
+ "ETH_P_CAN": "int:12",
+ "ETH_P_CANFD": "int:13",
+ "ETH_P_CONTROL": "int:22",
+ "ETH_P_CUST": "int:24582",
+ "ETH_P_DDCMP": "int:6",
+ "ETH_P_DEC": "int:24576",
+ "ETH_P_DIAG": "int:24581",
+ "ETH_P_DNA_DL": "int:24577",
+ "ETH_P_DNA_RC": "int:24578",
+ "ETH_P_DNA_RT": "int:24579",
+ "ETH_P_DSA": "int:27",
+ "ETH_P_ECONET": "int:24",
+ "ETH_P_EDSA": "int:56026",
+ "ETH_P_ERSPAN": "int:35006",
+ "ETH_P_FCOE": "int:35078",
+ "ETH_P_FIP": "int:35092",
+ "ETH_P_HDLC": "int:25",
+ "ETH_P_HSR": "int:35119",
+ "ETH_P_IBOE": "int:35093",
+ "ETH_P_IEEE802154": "int:246",
+ "ETH_P_IEEEPUP": "int:2560",
+ "ETH_P_IEEEPUPAT": "int:2561",
+ "ETH_P_IFE": "int:60734",
+ "ETH_P_IP": "int:2048",
+ "ETH_P_IPV6": "int:34525",
+ "ETH_P_IPX": "int:33079",
+ "ETH_P_IRDA": "int:23",
+ "ETH_P_LAT": "int:24580",
+ "ETH_P_LINK_CTL": "int:34924",
+ "ETH_P_LOCALTALK": "int:9",
+ "ETH_P_LOOP": "int:96",
+ "ETH_P_LOOPBACK": "int:36864",
+ "ETH_P_MACSEC": "int:35045",
+ "ETH_P_MAP": "int:249",
+ "ETH_P_MOBITEX": "int:21",
+ "ETH_P_MPLS_MC": "int:34888",
+ "ETH_P_MPLS_UC": "int:34887",
+ "ETH_P_MVRP": "int:35061",
+ "ETH_P_NCSI": "int:35064",
+ "ETH_P_NSH": "int:35151",
+ "ETH_P_PAE": "int:34958",
+ "ETH_P_PAUSE": "int:34824",
+ "ETH_P_PHONET": "int:245",
+ "ETH_P_PPPTALK": "int:16",
+ "ETH_P_PPP_DISC": "int:34915",
+ "ETH_P_PPP_MP": "int:8",
+ "ETH_P_PPP_SES": "int:34916",
+ "ETH_P_PRP": "int:35067",
+ "ETH_P_PUP": "int:512",
+ "ETH_P_PUPAT": "int:513",
+ "ETH_P_QINQ1": "int:37120",
+ "ETH_P_QINQ2": "int:37376",
+ "ETH_P_QINQ3": "int:37632",
+ "ETH_P_RARP": "int:32821",
+ "ETH_P_SCA": "int:24583",
+ "ETH_P_SLOW": "int:34825",
+ "ETH_P_SNAP": "int:5",
+ "ETH_P_TDLS": "int:35085",
+ "ETH_P_TEB": "int:25944",
+ "ETH_P_TIPC": "int:35018",
+ "ETH_P_TRAILER": "int:28",
+ "ETH_P_TR_802_2": "int:17",
+ "ETH_P_TSN": "int:8944",
+ "ETH_P_WAN_PPP": "int:7",
+ "ETH_P_WCCP": "int:34878",
+ "ETH_P_X25": "int:2053",
+ "ETH_P_XDSA": "int:248",
+ "ETH_ZLEN": "int:60",
+ "FALLOC_FL_COLLAPSE_RANGE": "int:8",
+ "FALLOC_FL_INSERT_RANGE": "int:32",
+ "FALLOC_FL_KEEP_SIZE": "int:1",
+ "FALLOC_FL_NO_HIDE_STALE": "int:4",
+ "FALLOC_FL_PUNCH_HOLE": "int:2",
+ "FALLOC_FL_UNSHARE_RANGE": "int:64",
+ "FALLOC_FL_ZERO_RANGE": "int:16",
+ "FD_CLOEXEC": "int:1",
+ "FD_SETSIZE": "int:1024",
+ "FFDLY": "int:32768",
+ "FLUSHO": "int:4096",
+ "F_ADD_SEALS": "int:1033",
+ "F_DUPFD": "int:0",
+ "F_DUPFD_CLOEXEC": "int:1030",
+ "F_EXLCK": "int:4",
+ "F_GETFD": "int:1",
+ "F_GETFL": "int:3",
+ "F_GETLEASE": "int:1025",
+ "F_GETLK": "int:5",
+ "F_GETLK64": "int:5",
+ "F_GETOWN": "int:9",
+ "F_GETOWN_EX": "int:16",
+ "F_GETPIPE_SZ": "int:1032",
+ "F_GETSIG": "int:11",
+ "F_GET_FILE_RW_HINT": "int:1037",
+ "F_GET_RW_HINT": "int:1035",
+ "F_GET_SEALS": "int:1034",
+ "F_LOCK": "int:1",
+ "F_NOTIFY": "int:1026",
+ "F_OFD_GETLK": "int:36",
+ "F_OFD_SETLK": "int:37",
+ "F_OFD_SETLKW": "int:38",
+ "F_OK": "int:0",
+ "F_OWNER_GID": "int:2",
+ "F_OWNER_PGRP": "int:2",
+ "F_OWNER_PID": "int:1",
+ "F_OWNER_TID": "int:0",
+ "F_RDLCK": "int:0",
+ "F_SEAL_GROW": "int:4",
+ "F_SEAL_SEAL": "int:1",
+ "F_SEAL_SHRINK": "int:2",
+ "F_SEAL_WRITE": "int:8",
+ "F_SETFD": "int:2",
+ "F_SETFL": "int:4",
+ "F_SETLEASE": "int:1024",
+ "F_SETLK": "int:6",
+ "F_SETLK64": "int:6",
+ "F_SETLKW": "int:7",
+ "F_SETLKW64": "int:7",
+ "F_SETOWN": "int:8",
+ "F_SETOWN_EX": "int:15",
+ "F_SETPIPE_SZ": "int:1031",
+ "F_SETSIG": "int:10",
+ "F_SET_FILE_RW_HINT": "int:1038",
+ "F_SET_RW_HINT": "int:1036",
+ "F_SHLCK": "int:8",
+ "F_TEST": "int:3",
+ "F_TLOCK": "int:2",
+ "F_ULOCK": "int:0",
+ "F_UNLCK": "int:2",
+ "F_WRLCK": "int:1",
+ "HUPCL": "int:1024",
+ "ICANON": "int:2",
+ "ICRNL": "int:256",
+ "IEXTEN": "int:32768",
+ "IFA_ADDRESS": "int:1",
+ "IFA_ANYCAST": "int:5",
+ "IFA_BROADCAST": "int:4",
+ "IFA_CACHEINFO": "int:6",
+ "IFA_FLAGS": "int:8",
+ "IFA_F_DADFAILED": "int:8",
+ "IFA_F_DEPRECATED": "int:32",
+ "IFA_F_HOMEADDRESS": "int:16",
+ "IFA_F_MANAGETEMPADDR": "int:256",
+ "IFA_F_MCAUTOJOIN": "int:1024",
+ "IFA_F_NODAD": "int:2",
+ "IFA_F_NOPREFIXROUTE": "int:512",
+ "IFA_F_OPTIMISTIC": "int:4",
+ "IFA_F_PERMANENT": "int:128",
+ "IFA_F_SECONDARY": "int:1",
+ "IFA_F_STABLE_PRIVACY": "int:2048",
+ "IFA_F_TEMPORARY": "int:1",
+ "IFA_F_TENTATIVE": "int:64",
+ "IFA_LABEL": "int:3",
+ "IFA_LOCAL": "int:2",
+ "IFA_MULTICAST": "int:7",
+ "IFA_UNSPEC": "int:0",
+ "IFF_ALLMULTI": "int:512",
+ "IFF_ATTACH_QUEUE": "int:512",
+ "IFF_AUTOMEDIA": "int:16384",
+ "IFF_BROADCAST": "int:2",
+ "IFF_DEBUG": "int:4",
+ "IFF_DETACH_QUEUE": "int:1024",
+ "IFF_DYNAMIC": "int:32768",
+ "IFF_LOOPBACK": "int:8",
+ "IFF_MASTER": "int:1024",
+ "IFF_MULTICAST": "int:4096",
+ "IFF_MULTI_QUEUE": "int:256",
+ "IFF_NAPI": "int:16",
+ "IFF_NAPI_FRAGS": "int:32",
+ "IFF_NOARP": "int:128",
+ "IFF_NOFILTER": "int:4096",
+ "IFF_NOTRAILERS": "int:32",
+ "IFF_NO_PI": "int:4096",
+ "IFF_ONE_QUEUE": "int:8192",
+ "IFF_PERSIST": "int:2048",
+ "IFF_POINTOPOINT": "int:16",
+ "IFF_PORTSEL": "int:8192",
+ "IFF_PROMISC": "int:256",
+ "IFF_RUNNING": "int:64",
+ "IFF_SLAVE": "int:2048",
+ "IFF_TAP": "int:2",
+ "IFF_TUN": "int:1",
+ "IFF_TUN_EXCL": "int:32768",
+ "IFF_UP": "int:1",
+ "IFF_VNET_HDR": "int:16384",
+ "IFLA_ADDRESS": "int:1",
+ "IFLA_AF_SPEC": "int:26",
+ "IFLA_BOND_ACTIVE_SLAVE": "int:2",
+ "IFLA_BOND_AD_ACTOR_SYSTEM": "int:26",
+ "IFLA_BOND_AD_ACTOR_SYS_PRIO": "int:24",
+ "IFLA_BOND_AD_INFO": "int:23",
+ "IFLA_BOND_AD_INFO_ACTOR_KEY": "int:3",
+ "IFLA_BOND_AD_INFO_AGGREGATOR": "int:1",
+ "IFLA_BOND_AD_INFO_NUM_PORTS": "int:2",
+ "IFLA_BOND_AD_INFO_PARTNER_KEY": "int:4",
+ "IFLA_BOND_AD_INFO_PARTNER_MAC": "int:5",
+ "IFLA_BOND_AD_INFO_UNSPEC": "int:0",
+ "IFLA_BOND_AD_LACP_RATE": "int:21",
+ "IFLA_BOND_AD_SELECT": "int:22",
+ "IFLA_BOND_AD_USER_PORT_KEY": "int:25",
+ "IFLA_BOND_ALL_SLAVES_ACTIVE": "int:17",
+ "IFLA_BOND_ARP_ALL_TARGETS": "int:10",
+ "IFLA_BOND_ARP_INTERVAL": "int:7",
+ "IFLA_BOND_ARP_IP_TARGET": "int:8",
+ "IFLA_BOND_ARP_VALIDATE": "int:9",
+ "IFLA_BOND_DOWNDELAY": "int:5",
+ "IFLA_BOND_FAIL_OVER_MAC": "int:13",
+ "IFLA_BOND_LP_INTERVAL": "int:19",
+ "IFLA_BOND_MIIMON": "int:3",
+ "IFLA_BOND_MIN_LINKS": "int:18",
+ "IFLA_BOND_MODE": "int:1",
+ "IFLA_BOND_NUM_PEER_NOTIF": "int:16",
+ "IFLA_BOND_PACKETS_PER_SLAVE": "int:20",
+ "IFLA_BOND_PRIMARY": "int:11",
+ "IFLA_BOND_PRIMARY_RESELECT": "int:12",
+ "IFLA_BOND_RESEND_IGMP": "int:15",
+ "IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE": "int:7",
+ "IFLA_BOND_SLAVE_AD_AGGREGATOR_ID": "int:6",
+ "IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE": "int:8",
+ "IFLA_BOND_SLAVE_LINK_FAILURE_COUNT": "int:3",
+ "IFLA_BOND_SLAVE_MII_STATUS": "int:2",
+ "IFLA_BOND_SLAVE_PERM_HWADDR": "int:4",
+ "IFLA_BOND_SLAVE_QUEUE_ID": "int:5",
+ "IFLA_BOND_SLAVE_STATE": "int:1",
+ "IFLA_BOND_SLAVE_UNSPEC": "int:0",
+ "IFLA_BOND_TLB_DYNAMIC_LB": "int:27",
+ "IFLA_BOND_UNSPEC": "int:0",
+ "IFLA_BOND_UPDELAY": "int:4",
+ "IFLA_BOND_USE_CARRIER": "int:6",
+ "IFLA_BOND_XMIT_HASH_POLICY": "int:14",
+ "IFLA_BROADCAST": "int:2",
+ "IFLA_BRPORT_BCAST_FLOOD": "int:30",
+ "IFLA_BRPORT_BRIDGE_ID": "int:14",
+ "IFLA_BRPORT_CONFIG_PENDING": "int:20",
+ "IFLA_BRPORT_COST": "int:3",
+ "IFLA_BRPORT_DESIGNATED_COST": "int:16",
+ "IFLA_BRPORT_DESIGNATED_PORT": "int:15",
+ "IFLA_BRPORT_FAST_LEAVE": "int:7",
+ "IFLA_BRPORT_FLUSH": "int:24",
+ "IFLA_BRPORT_FORWARD_DELAY_TIMER": "int:22",
+ "IFLA_BRPORT_GROUP_FWD_MASK": "int:31",
+ "IFLA_BRPORT_GUARD": "int:5",
+ "IFLA_BRPORT_HOLD_TIMER": "int:23",
+ "IFLA_BRPORT_ID": "int:17",
+ "IFLA_BRPORT_LEARNING": "int:8",
+ "IFLA_BRPORT_LEARNING_SYNC": "int:11",
+ "IFLA_BRPORT_MCAST_FLOOD": "int:27",
+ "IFLA_BRPORT_MCAST_TO_UCAST": "int:28",
+ "IFLA_BRPORT_MESSAGE_AGE_TIMER": "int:21",
+ "IFLA_BRPORT_MODE": "int:4",
+ "IFLA_BRPORT_MULTICAST_ROUTER": "int:25",
+ "IFLA_BRPORT_NEIGH_SUPPRESS": "int:32",
+ "IFLA_BRPORT_NO": "int:18",
+ "IFLA_BRPORT_PAD": "int:26",
+ "IFLA_BRPORT_PRIORITY": "int:2",
+ "IFLA_BRPORT_PROTECT": "int:6",
+ "IFLA_BRPORT_PROXYARP": "int:10",
+ "IFLA_BRPORT_PROXYARP_WIFI": "int:12",
+ "IFLA_BRPORT_ROOT_ID": "int:13",
+ "IFLA_BRPORT_STATE": "int:1",
+ "IFLA_BRPORT_TOPOLOGY_CHANGE_ACK": "int:19",
+ "IFLA_BRPORT_UNICAST_FLOOD": "int:9",
+ "IFLA_BRPORT_UNSPEC": "int:0",
+ "IFLA_BRPORT_VLAN_TUNNEL": "int:29",
+ "IFLA_BR_AGEING_TIME": "int:4",
+ "IFLA_BR_BRIDGE_ID": "int:11",
+ "IFLA_BR_FDB_FLUSH": "int:21",
+ "IFLA_BR_FORWARD_DELAY": "int:1",
+ "IFLA_BR_GC_TIMER": "int:19",
+ "IFLA_BR_GROUP_ADDR": "int:20",
+ "IFLA_BR_GROUP_FWD_MASK": "int:9",
+ "IFLA_BR_HELLO_TIME": "int:2",
+ "IFLA_BR_HELLO_TIMER": "int:16",
+ "IFLA_BR_MAX_AGE": "int:3",
+ "IFLA_BR_MCAST_HASH_ELASTICITY": "int:26",
+ "IFLA_BR_MCAST_HASH_MAX": "int:27",
+ "IFLA_BR_MCAST_IGMP_VERSION": "int:43",
+ "IFLA_BR_MCAST_LAST_MEMBER_CNT": "int:28",
+ "IFLA_BR_MCAST_LAST_MEMBER_INTVL": "int:30",
+ "IFLA_BR_MCAST_MEMBERSHIP_INTVL": "int:31",
+ "IFLA_BR_MCAST_MLD_VERSION": "int:44",
+ "IFLA_BR_MCAST_QUERIER": "int:25",
+ "IFLA_BR_MCAST_QUERIER_INTVL": "int:32",
+ "IFLA_BR_MCAST_QUERY_INTVL": "int:33",
+ "IFLA_BR_MCAST_QUERY_RESPONSE_INTVL": "int:34",
+ "IFLA_BR_MCAST_QUERY_USE_IFADDR": "int:24",
+ "IFLA_BR_MCAST_ROUTER": "int:22",
+ "IFLA_BR_MCAST_SNOOPING": "int:23",
+ "IFLA_BR_MCAST_STARTUP_QUERY_CNT": "int:29",
+ "IFLA_BR_MCAST_STARTUP_QUERY_INTVL": "int:35",
+ "IFLA_BR_MCAST_STATS_ENABLED": "int:42",
+ "IFLA_BR_NF_CALL_ARPTABLES": "int:38",
+ "IFLA_BR_NF_CALL_IP6TABLES": "int:37",
+ "IFLA_BR_NF_CALL_IPTABLES": "int:36",
+ "IFLA_BR_PAD": "int:40",
+ "IFLA_BR_PRIORITY": "int:6",
+ "IFLA_BR_ROOT_ID": "int:10",
+ "IFLA_BR_ROOT_PATH_COST": "int:13",
+ "IFLA_BR_ROOT_PORT": "int:12",
+ "IFLA_BR_STP_STATE": "int:5",
+ "IFLA_BR_TCN_TIMER": "int:17",
+ "IFLA_BR_TOPOLOGY_CHANGE": "int:14",
+ "IFLA_BR_TOPOLOGY_CHANGE_DETECTED": "int:15",
+ "IFLA_BR_TOPOLOGY_CHANGE_TIMER": "int:18",
+ "IFLA_BR_UNSPEC": "int:0",
+ "IFLA_BR_VLAN_DEFAULT_PVID": "int:39",
+ "IFLA_BR_VLAN_FILTERING": "int:7",
+ "IFLA_BR_VLAN_PROTOCOL": "int:8",
+ "IFLA_BR_VLAN_STATS_ENABLED": "int:41",
+ "IFLA_CARRIER": "int:33",
+ "IFLA_CARRIER_CHANGES": "int:35",
+ "IFLA_COST": "int:8",
+ "IFLA_EVENT": "int:44",
+ "IFLA_EVENT_BONDING_FAILOVER": "int:3",
+ "IFLA_EVENT_BONDING_OPTIONS": "int:6",
+ "IFLA_EVENT_FEATURES": "int:2",
+ "IFLA_EVENT_IGMP_RESEND": "int:5",
+ "IFLA_EVENT_NONE": "int:0",
+ "IFLA_EVENT_NOTIFY_PEERS": "int:4",
+ "IFLA_EVENT_REBOOT": "int:1",
+ "IFLA_EXT_MASK": "int:29",
+ "IFLA_GENEVE_COLLECT_METADATA": "int:6",
+ "IFLA_GENEVE_ID": "int:1",
+ "IFLA_GENEVE_LABEL": "int:11",
+ "IFLA_GENEVE_PORT": "int:5",
+ "IFLA_GENEVE_REMOTE": "int:2",
+ "IFLA_GENEVE_REMOTE6": "int:7",
+ "IFLA_GENEVE_TOS": "int:4",
+ "IFLA_GENEVE_TTL": "int:3",
+ "IFLA_GENEVE_UDP_CSUM": "int:8",
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_RX": "int:10",
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_TX": "int:9",
+ "IFLA_GENEVE_UNSPEC": "int:0",
+ "IFLA_GROUP": "int:27",
+ "IFLA_GSO_MAX_SEGS": "int:40",
+ "IFLA_GSO_MAX_SIZE": "int:41",
+ "IFLA_GTP_FD0": "int:1",
+ "IFLA_GTP_FD1": "int:2",
+ "IFLA_GTP_PDP_HASHSIZE": "int:3",
+ "IFLA_GTP_ROLE": "int:4",
+ "IFLA_GTP_UNSPEC": "int:0",
+ "IFLA_HSR_MULTICAST_SPEC": "int:3",
+ "IFLA_HSR_SEQ_NR": "int:5",
+ "IFLA_HSR_SLAVE1": "int:1",
+ "IFLA_HSR_SLAVE2": "int:2",
+ "IFLA_HSR_SUPERVISION_ADDR": "int:4",
+ "IFLA_HSR_UNSPEC": "int:0",
+ "IFLA_HSR_VERSION": "int:6",
+ "IFLA_IFALIAS": "int:20",
+ "IFLA_IFNAME": "int:3",
+ "IFLA_IF_NETNSID": "int:46",
+ "IFLA_INET6_ADDR_GEN_MODE": "int:8",
+ "IFLA_INET6_CACHEINFO": "int:5",
+ "IFLA_INET6_CONF": "int:2",
+ "IFLA_INET6_FLAGS": "int:1",
+ "IFLA_INET6_ICMP6STATS": "int:6",
+ "IFLA_INET6_MCAST": "int:4",
+ "IFLA_INET6_STATS": "int:3",
+ "IFLA_INET6_TOKEN": "int:7",
+ "IFLA_INET6_UNSPEC": "int:0",
+ "IFLA_INET_CONF": "int:1",
+ "IFLA_INET_UNSPEC": "int:0",
+ "IFLA_INFO_DATA": "int:2",
+ "IFLA_INFO_KIND": "int:1",
+ "IFLA_INFO_SLAVE_DATA": "int:5",
+ "IFLA_INFO_SLAVE_KIND": "int:4",
+ "IFLA_INFO_UNSPEC": "int:0",
+ "IFLA_INFO_XSTATS": "int:3",
+ "IFLA_IPOIB_MODE": "int:2",
+ "IFLA_IPOIB_PKEY": "int:1",
+ "IFLA_IPOIB_UMCAST": "int:3",
+ "IFLA_IPOIB_UNSPEC": "int:0",
+ "IFLA_IPVLAN_FLAGS": "int:2",
+ "IFLA_IPVLAN_MODE": "int:1",
+ "IFLA_IPVLAN_UNSPEC": "int:0",
+ "IFLA_LINK": "int:5",
+ "IFLA_LINKINFO": "int:18",
+ "IFLA_LINKMODE": "int:17",
+ "IFLA_LINK_NETNSID": "int:37",
+ "IFLA_MACSEC_CIPHER_SUITE": "int:4",
+ "IFLA_MACSEC_ENCODING_SA": "int:6",
+ "IFLA_MACSEC_ENCRYPT": "int:7",
+ "IFLA_MACSEC_ES": "int:10",
+ "IFLA_MACSEC_ICV_LEN": "int:3",
+ "IFLA_MACSEC_INC_SCI": "int:9",
+ "IFLA_MACSEC_PAD": "int:14",
+ "IFLA_MACSEC_PORT": "int:2",
+ "IFLA_MACSEC_PROTECT": "int:8",
+ "IFLA_MACSEC_REPLAY_PROTECT": "int:12",
+ "IFLA_MACSEC_SCB": "int:11",
+ "IFLA_MACSEC_SCI": "int:1",
+ "IFLA_MACSEC_UNSPEC": "int:0",
+ "IFLA_MACSEC_VALIDATION": "int:13",
+ "IFLA_MACSEC_WINDOW": "int:5",
+ "IFLA_MACVLAN_FLAGS": "int:2",
+ "IFLA_MACVLAN_MACADDR": "int:4",
+ "IFLA_MACVLAN_MACADDR_COUNT": "int:6",
+ "IFLA_MACVLAN_MACADDR_DATA": "int:5",
+ "IFLA_MACVLAN_MACADDR_MODE": "int:3",
+ "IFLA_MACVLAN_MODE": "int:1",
+ "IFLA_MACVLAN_UNSPEC": "int:0",
+ "IFLA_MAP": "int:14",
+ "IFLA_MASTER": "int:10",
+ "IFLA_MTU": "int:4",
+ "IFLA_NET_NS_FD": "int:28",
+ "IFLA_NET_NS_PID": "int:19",
+ "IFLA_NEW_NETNSID": "int:45",
+ "IFLA_NUM_RX_QUEUES": "int:32",
+ "IFLA_NUM_TX_QUEUES": "int:31",
+ "IFLA_NUM_VF": "int:21",
+ "IFLA_OFFLOAD_XSTATS_CPU_HIT": "int:1",
+ "IFLA_OFFLOAD_XSTATS_UNSPEC": "int:0",
+ "IFLA_OPERSTATE": "int:16",
+ "IFLA_PAD": "int:42",
+ "IFLA_PHYS_PORT_ID": "int:34",
+ "IFLA_PHYS_PORT_NAME": "int:38",
+ "IFLA_PHYS_SWITCH_ID": "int:36",
+ "IFLA_PORT_HOST_UUID": "int:5",
+ "IFLA_PORT_INSTANCE_UUID": "int:4",
+ "IFLA_PORT_PROFILE": "int:2",
+ "IFLA_PORT_REQUEST": "int:6",
+ "IFLA_PORT_RESPONSE": "int:7",
+ "IFLA_PORT_SELF": "int:25",
+ "IFLA_PORT_UNSPEC": "int:0",
+ "IFLA_PORT_VF": "int:1",
+ "IFLA_PORT_VSI_TYPE": "int:3",
+ "IFLA_PPP_DEV_FD": "int:1",
+ "IFLA_PPP_UNSPEC": "int:0",
+ "IFLA_PRIORITY": "int:9",
+ "IFLA_PROMISCUITY": "int:30",
+ "IFLA_PROTINFO": "int:12",
+ "IFLA_PROTO_DOWN": "int:39",
+ "IFLA_QDISC": "int:6",
+ "IFLA_STATS": "int:7",
+ "IFLA_STATS64": "int:23",
+ "IFLA_STATS_AF_SPEC": "int:5",
+ "IFLA_STATS_LINK_64": "int:1",
+ "IFLA_STATS_LINK_OFFLOAD_XSTATS": "int:4",
+ "IFLA_STATS_LINK_XSTATS": "int:2",
+ "IFLA_STATS_LINK_XSTATS_SLAVE": "int:3",
+ "IFLA_STATS_UNSPEC": "int:0",
+ "IFLA_TXQLEN": "int:13",
+ "IFLA_UNSPEC": "int:0",
+ "IFLA_VFINFO_LIST": "int:22",
+ "IFLA_VF_IB_NODE_GUID": "int:10",
+ "IFLA_VF_IB_PORT_GUID": "int:11",
+ "IFLA_VF_INFO": "int:1",
+ "IFLA_VF_INFO_UNSPEC": "int:0",
+ "IFLA_VF_LINK_STATE": "int:5",
+ "IFLA_VF_LINK_STATE_AUTO": "int:0",
+ "IFLA_VF_LINK_STATE_DISABLE": "int:2",
+ "IFLA_VF_LINK_STATE_ENABLE": "int:1",
+ "IFLA_VF_MAC": "int:1",
+ "IFLA_VF_PORT": "int:1",
+ "IFLA_VF_PORTS": "int:24",
+ "IFLA_VF_PORT_UNSPEC": "int:0",
+ "IFLA_VF_RATE": "int:6",
+ "IFLA_VF_RSS_QUERY_EN": "int:7",
+ "IFLA_VF_SPOOFCHK": "int:4",
+ "IFLA_VF_STATS": "int:8",
+ "IFLA_VF_STATS_BROADCAST": "int:4",
+ "IFLA_VF_STATS_MULTICAST": "int:5",
+ "IFLA_VF_STATS_PAD": "int:6",
+ "IFLA_VF_STATS_RX_BYTES": "int:2",
+ "IFLA_VF_STATS_RX_PACKETS": "int:0",
+ "IFLA_VF_STATS_TX_BYTES": "int:3",
+ "IFLA_VF_STATS_TX_PACKETS": "int:1",
+ "IFLA_VF_TRUST": "int:9",
+ "IFLA_VF_TX_RATE": "int:3",
+ "IFLA_VF_UNSPEC": "int:0",
+ "IFLA_VF_VLAN": "int:2",
+ "IFLA_VF_VLAN_INFO": "int:1",
+ "IFLA_VF_VLAN_INFO_UNSPEC": "int:0",
+ "IFLA_VF_VLAN_LIST": "int:12",
+ "IFLA_VLAN_EGRESS_QOS": "int:3",
+ "IFLA_VLAN_FLAGS": "int:2",
+ "IFLA_VLAN_ID": "int:1",
+ "IFLA_VLAN_INGRESS_QOS": "int:4",
+ "IFLA_VLAN_PROTOCOL": "int:5",
+ "IFLA_VLAN_QOS_MAPPING": "int:1",
+ "IFLA_VLAN_QOS_UNSPEC": "int:0",
+ "IFLA_VLAN_UNSPEC": "int:0",
+ "IFLA_VRF_PORT_TABLE": "int:1",
+ "IFLA_VRF_PORT_UNSPEC": "int:0",
+ "IFLA_VRF_TABLE": "int:1",
+ "IFLA_VRF_UNSPEC": "int:0",
+ "IFLA_VXLAN_AGEING": "int:8",
+ "IFLA_VXLAN_COLLECT_METADATA": "int:25",
+ "IFLA_VXLAN_GBP": "int:23",
+ "IFLA_VXLAN_GPE": "int:27",
+ "IFLA_VXLAN_GROUP": "int:2",
+ "IFLA_VXLAN_GROUP6": "int:16",
+ "IFLA_VXLAN_ID": "int:1",
+ "IFLA_VXLAN_L2MISS": "int:13",
+ "IFLA_VXLAN_L3MISS": "int:14",
+ "IFLA_VXLAN_LABEL": "int:26",
+ "IFLA_VXLAN_LEARNING": "int:7",
+ "IFLA_VXLAN_LIMIT": "int:9",
+ "IFLA_VXLAN_LINK": "int:3",
+ "IFLA_VXLAN_LOCAL": "int:4",
+ "IFLA_VXLAN_LOCAL6": "int:17",
+ "IFLA_VXLAN_PORT": "int:15",
+ "IFLA_VXLAN_PORT_RANGE": "int:10",
+ "IFLA_VXLAN_PROXY": "int:11",
+ "IFLA_VXLAN_REMCSUM_NOPARTIAL": "int:24",
+ "IFLA_VXLAN_REMCSUM_RX": "int:22",
+ "IFLA_VXLAN_REMCSUM_TX": "int:21",
+ "IFLA_VXLAN_RSC": "int:12",
+ "IFLA_VXLAN_TOS": "int:6",
+ "IFLA_VXLAN_TTL": "int:5",
+ "IFLA_VXLAN_UDP_CSUM": "int:18",
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_RX": "int:20",
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_TX": "int:19",
+ "IFLA_VXLAN_UNSPEC": "int:0",
+ "IFLA_WEIGHT": "int:15",
+ "IFLA_WIRELESS": "int:11",
+ "IFLA_XDP": "int:43",
+ "IFLA_XDP_ATTACHED": "int:2",
+ "IFLA_XDP_FD": "int:1",
+ "IFLA_XDP_FLAGS": "int:3",
+ "IFLA_XDP_PROG_ID": "int:4",
+ "IFLA_XDP_UNSPEC": "int:0",
+ "IFNAMSIZ": "int:16",
+ "IGNBRK": "int:1",
+ "IGNCR": "int:128",
+ "IGNPAR": "int:4",
+ "IMAXBEL": "int:8192",
+ "INLCR": "int:64",
+ "INPCK": "int:16",
+ "IN_ACCESS": "int:1",
+ "IN_ALL_EVENTS": "int:4095",
+ "IN_ATTRIB": "int:4",
+ "IN_CLASSA_HOST": "int:16777215",
+ "IN_CLASSA_MAX": "int:128",
+ "IN_CLASSA_NET": "int:4278190080",
+ "IN_CLASSA_NSHIFT": "int:24",
+ "IN_CLASSB_HOST": "int:65535",
+ "IN_CLASSB_MAX": "int:65536",
+ "IN_CLASSB_NET": "int:4294901760",
+ "IN_CLASSB_NSHIFT": "int:16",
+ "IN_CLASSC_HOST": "int:255",
+ "IN_CLASSC_NET": "int:4294967040",
+ "IN_CLASSC_NSHIFT": "int:8",
+ "IN_CLOEXEC": "int:524288",
+ "IN_CLOSE": "int:24",
+ "IN_CLOSE_NOWRITE": "int:16",
+ "IN_CLOSE_WRITE": "int:8",
+ "IN_CREATE": "int:256",
+ "IN_DELETE": "int:512",
+ "IN_DELETE_SELF": "int:1024",
+ "IN_DONT_FOLLOW": "int:33554432",
+ "IN_EXCL_UNLINK": "int:67108864",
+ "IN_IGNORED": "int:32768",
+ "IN_ISDIR": "int:1073741824",
+ "IN_LOOPBACKNET": "int:127",
+ "IN_MASK_ADD": "int:536870912",
+ "IN_MODIFY": "int:2",
+ "IN_MOVE": "int:192",
+ "IN_MOVED_FROM": "int:64",
+ "IN_MOVED_TO": "int:128",
+ "IN_MOVE_SELF": "int:2048",
+ "IN_NONBLOCK": "int:2048",
+ "IN_ONESHOT": "int:2147483648",
+ "IN_ONLYDIR": "int:16777216",
+ "IN_OPEN": "int:32",
+ "IN_Q_OVERFLOW": "int:16384",
+ "IN_UNMOUNT": "int:8192",
+ "IPPROTO_AH": "int:51",
+ "IPPROTO_BEETPH": "int:94",
+ "IPPROTO_COMP": "int:108",
+ "IPPROTO_DCCP": "int:33",
+ "IPPROTO_DSTOPTS": "int:60",
+ "IPPROTO_EGP": "int:8",
+ "IPPROTO_ENCAP": "int:98",
+ "IPPROTO_ESP": "int:50",
+ "IPPROTO_FRAGMENT": "int:44",
+ "IPPROTO_GRE": "int:47",
+ "IPPROTO_HOPOPTS": "int:0",
+ "IPPROTO_ICMP": "int:1",
+ "IPPROTO_ICMPV6": "int:58",
+ "IPPROTO_IDP": "int:22",
+ "IPPROTO_IGMP": "int:2",
+ "IPPROTO_IP": "int:0",
+ "IPPROTO_IPIP": "int:4",
+ "IPPROTO_IPV6": "int:41",
+ "IPPROTO_MAX": "int:256",
+ "IPPROTO_MH": "int:135",
+ "IPPROTO_MPLS": "int:137",
+ "IPPROTO_MTP": "int:92",
+ "IPPROTO_NONE": "int:59",
+ "IPPROTO_PIM": "int:103",
+ "IPPROTO_PUP": "int:12",
+ "IPPROTO_RAW": "int:255",
+ "IPPROTO_ROUTING": "int:43",
+ "IPPROTO_RSVP": "int:46",
+ "IPPROTO_SCTP": "int:132",
+ "IPPROTO_TCP": "int:6",
+ "IPPROTO_TP": "int:29",
+ "IPPROTO_UDP": "int:17",
+ "IPPROTO_UDPLITE": "int:136",
+ "IPV6_2292DSTOPTS": "int:4",
+ "IPV6_2292HOPLIMIT": "int:8",
+ "IPV6_2292HOPOPTS": "int:3",
+ "IPV6_2292PKTINFO": "int:2",
+ "IPV6_2292PKTOPTIONS": "int:6",
+ "IPV6_2292RTHDR": "int:5",
+ "IPV6_ADDRFORM": "int:1",
+ "IPV6_ADDR_PREFERENCES": "int:72",
+ "IPV6_ADD_MEMBERSHIP": "int:20",
+ "IPV6_AUTHHDR": "int:10",
+ "IPV6_AUTOFLOWLABEL": "int:70",
+ "IPV6_CHECKSUM": "int:7",
+ "IPV6_DONTFRAG": "int:62",
+ "IPV6_DROP_MEMBERSHIP": "int:21",
+ "IPV6_DSTOPTS": "int:59",
+ "IPV6_HDRINCL": "int:36",
+ "IPV6_HOPLIMIT": "int:52",
+ "IPV6_HOPOPTS": "int:54",
+ "IPV6_IPSEC_POLICY": "int:34",
+ "IPV6_JOIN_ANYCAST": "int:27",
+ "IPV6_JOIN_GROUP": "int:20",
+ "IPV6_LEAVE_ANYCAST": "int:28",
+ "IPV6_LEAVE_GROUP": "int:21",
+ "IPV6_MINHOPCOUNT": "int:73",
+ "IPV6_MTU": "int:24",
+ "IPV6_MTU_DISCOVER": "int:23",
+ "IPV6_MULTICAST_HOPS": "int:18",
+ "IPV6_MULTICAST_IF": "int:17",
+ "IPV6_MULTICAST_LOOP": "int:19",
+ "IPV6_NEXTHOP": "int:9",
+ "IPV6_ORIGDSTADDR": "int:74",
+ "IPV6_PATHMTU": "int:61",
+ "IPV6_PKTINFO": "int:50",
+ "IPV6_PMTUDISC_DO": "int:2",
+ "IPV6_PMTUDISC_DONT": "int:0",
+ "IPV6_PMTUDISC_INTERFACE": "int:4",
+ "IPV6_PMTUDISC_OMIT": "int:5",
+ "IPV6_PMTUDISC_PROBE": "int:3",
+ "IPV6_PMTUDISC_WANT": "int:1",
+ "IPV6_RECVDSTOPTS": "int:58",
+ "IPV6_RECVERR": "int:25",
+ "IPV6_RECVFRAGSIZE": "int:77",
+ "IPV6_RECVHOPLIMIT": "int:51",
+ "IPV6_RECVHOPOPTS": "int:53",
+ "IPV6_RECVORIGDSTADDR": "int:74",
+ "IPV6_RECVPATHMTU": "int:60",
+ "IPV6_RECVPKTINFO": "int:49",
+ "IPV6_RECVRTHDR": "int:56",
+ "IPV6_RECVTCLASS": "int:66",
+ "IPV6_ROUTER_ALERT": "int:22",
+ "IPV6_RTHDR": "int:57",
+ "IPV6_RTHDRDSTOPTS": "int:55",
+ "IPV6_RTHDR_LOOSE": "int:0",
+ "IPV6_RTHDR_STRICT": "int:1",
+ "IPV6_RTHDR_TYPE_0": "int:0",
+ "IPV6_RXDSTOPTS": "int:59",
+ "IPV6_RXHOPOPTS": "int:54",
+ "IPV6_TCLASS": "int:67",
+ "IPV6_TRANSPARENT": "int:75",
+ "IPV6_UNICAST_HOPS": "int:16",
+ "IPV6_UNICAST_IF": "int:76",
+ "IPV6_V6ONLY": "int:26",
+ "IPV6_XFRM_POLICY": "int:35",
+ "IP_ADD_MEMBERSHIP": "int:35",
+ "IP_ADD_SOURCE_MEMBERSHIP": "int:39",
+ "IP_BIND_ADDRESS_NO_PORT": "int:24",
+ "IP_BLOCK_SOURCE": "int:38",
+ "IP_CHECKSUM": "int:23",
+ "IP_DEFAULT_MULTICAST_LOOP": "int:1",
+ "IP_DEFAULT_MULTICAST_TTL": "int:1",
+ "IP_DF": "int:16384",
+ "IP_DROP_MEMBERSHIP": "int:36",
+ "IP_DROP_SOURCE_MEMBERSHIP": "int:40",
+ "IP_FREEBIND": "int:15",
+ "IP_HDRINCL": "int:3",
+ "IP_IPSEC_POLICY": "int:16",
+ "IP_MAXPACKET": "int:65535",
+ "IP_MAX_MEMBERSHIPS": "int:20",
+ "IP_MF": "int:8192",
+ "IP_MINTTL": "int:21",
+ "IP_MSFILTER": "int:41",
+ "IP_MSS": "int:576",
+ "IP_MTU": "int:14",
+ "IP_MTU_DISCOVER": "int:10",
+ "IP_MULTICAST_ALL": "int:49",
+ "IP_MULTICAST_IF": "int:32",
+ "IP_MULTICAST_LOOP": "int:34",
+ "IP_MULTICAST_TTL": "int:33",
+ "IP_NODEFRAG": "int:22",
+ "IP_OFFMASK": "int:8191",
+ "IP_OPTIONS": "int:4",
+ "IP_ORIGDSTADDR": "int:20",
+ "IP_PASSSEC": "int:18",
+ "IP_PKTINFO": "int:8",
+ "IP_PKTOPTIONS": "int:9",
+ "IP_PMTUDISC": "int:10",
+ "IP_PMTUDISC_DO": "int:2",
+ "IP_PMTUDISC_DONT": "int:0",
+ "IP_PMTUDISC_INTERFACE": "int:4",
+ "IP_PMTUDISC_OMIT": "int:5",
+ "IP_PMTUDISC_PROBE": "int:3",
+ "IP_PMTUDISC_WANT": "int:1",
+ "IP_RECVERR": "int:11",
+ "IP_RECVFRAGSIZE": "int:25",
+ "IP_RECVOPTS": "int:6",
+ "IP_RECVORIGDSTADDR": "int:20",
+ "IP_RECVTOS": "int:13",
+ "IP_RECVTTL": "int:12",
+ "IP_RETOPTS": "int:7",
+ "IP_RF": "int:32768",
+ "IP_ROUTER_ALERT": "int:5",
+ "IP_TOS": "int:1",
+ "IP_TRANSPARENT": "int:19",
+ "IP_TTL": "int:2",
+ "IP_UNBLOCK_SOURCE": "int:37",
+ "IP_UNICAST_IF": "int:50",
+ "IP_XFRM_POLICY": "int:17",
+ "ISIG": "int:1",
+ "ISTRIP": "int:32",
+ "IUCLC": "int:512",
+ "IUTF8": "int:16384",
+ "IXANY": "int:2048",
+ "IXOFF": "int:4096",
+ "IXON": "int:1024",
+ "ImplementsGetwd": "bool:true",
+ "LINUX_REBOOT_CMD_CAD_OFF": "int:0",
+ "LINUX_REBOOT_CMD_CAD_ON": "int:2309737967",
+ "LINUX_REBOOT_CMD_HALT": "int:3454992675",
+ "LINUX_REBOOT_CMD_KEXEC": "int:1163412803",
+ "LINUX_REBOOT_CMD_POWER_OFF": "int:1126301404",
+ "LINUX_REBOOT_CMD_RESTART": "int:19088743",
+ "LINUX_REBOOT_CMD_RESTART2": "int:2712847316",
+ "LINUX_REBOOT_CMD_SW_SUSPEND": "int:3489725666",
+ "LINUX_REBOOT_MAGIC1": "int:4276215469",
+ "LINUX_REBOOT_MAGIC2": "int:672274793",
+ "LINUX_REBOOT_MAGIC2A": "int:85072278",
+ "LINUX_REBOOT_MAGIC2B": "int:369367448",
+ "LINUX_REBOOT_MAGIC2C": "int:537993216",
+ "LOCK_EX": "int:2",
+ "LOCK_MAND": "int:32",
+ "LOCK_NB": "int:4",
+ "LOCK_READ": "int:64",
+ "LOCK_RW": "int:192",
+ "LOCK_SH": "int:1",
+ "LOCK_UN": "int:8",
+ "LOCK_WRITE": "int:128",
+ "MADV_DODUMP": "int:17",
+ "MADV_DOFORK": "int:11",
+ "MADV_DONTDUMP": "int:16",
+ "MADV_DONTFORK": "int:10",
+ "MADV_DONTNEED": "int:4",
+ "MADV_FREE": "int:8",
+ "MADV_HUGEPAGE": "int:14",
+ "MADV_HWPOISON": "int:100",
+ "MADV_KEEPONFORK": "int:19",
+ "MADV_MERGEABLE": "int:12",
+ "MADV_NOHUGEPAGE": "int:15",
+ "MADV_NORMAL": "int:0",
+ "MADV_RANDOM": "int:1",
+ "MADV_REMOVE": "int:9",
+ "MADV_SEQUENTIAL": "int:2",
+ "MADV_UNMERGEABLE": "int:13",
+ "MADV_WILLNEED": "int:3",
+ "MADV_WIPEONFORK": "int:18",
+ "MAP_32BIT": "int:64",
+ "MAP_ANON": "int:32",
+ "MAP_ANONYMOUS": "int:32",
+ "MAP_DENYWRITE": "int:2048",
+ "MAP_EXECUTABLE": "int:4096",
+ "MAP_FILE": "int:0",
+ "MAP_FIXED": "int:16",
+ "MAP_GROWSDOWN": "int:256",
+ "MAP_HUGETLB": "int:262144",
+ "MAP_HUGE_MASK": "int:63",
+ "MAP_HUGE_SHIFT": "int:26",
+ "MAP_LOCKED": "int:8192",
+ "MAP_NONBLOCK": "int:65536",
+ "MAP_NORESERVE": "int:16384",
+ "MAP_POPULATE": "int:32768",
+ "MAP_PRIVATE": "int:2",
+ "MAP_SHARED": "int:1",
+ "MAP_STACK": "int:131072",
+ "MAP_TYPE": "int:15",
+ "MCL_CURRENT": "int:1",
+ "MCL_FUTURE": "int:2",
+ "MCL_ONFAULT": "int:4",
+ "MNT_DETACH": "int:2",
+ "MNT_EXPIRE": "int:4",
+ "MNT_FORCE": "int:1",
+ "MSG_BATCH": "int:262144",
+ "MSG_CMSG_CLOEXEC": "int:1073741824",
+ "MSG_CONFIRM": "int:2048",
+ "MSG_CTRUNC": "int:8",
+ "MSG_DONTROUTE": "int:4",
+ "MSG_DONTWAIT": "int:64",
+ "MSG_EOR": "int:128",
+ "MSG_ERRQUEUE": "int:8192",
+ "MSG_FASTOPEN": "int:536870912",
+ "MSG_FIN": "int:512",
+ "MSG_MORE": "int:32768",
+ "MSG_NOSIGNAL": "int:16384",
+ "MSG_OOB": "int:1",
+ "MSG_PEEK": "int:2",
+ "MSG_PROXY": "int:16",
+ "MSG_RST": "int:4096",
+ "MSG_SYN": "int:1024",
+ "MSG_TRUNC": "int:32",
+ "MSG_TRYHARD": "int:4",
+ "MSG_WAITALL": "int:256",
+ "MSG_WAITFORONE": "int:65536",
+ "MSG_ZEROCOPY": "int:67108864",
+ "MS_ACTIVE": "int:1073741824",
+ "MS_ASYNC": "int:1",
+ "MS_BIND": "int:4096",
+ "MS_BORN": "int:536870912",
+ "MS_DIRSYNC": "int:128",
+ "MS_INVALIDATE": "int:2",
+ "MS_I_VERSION": "int:8388608",
+ "MS_KERNMOUNT": "int:4194304",
+ "MS_LAZYTIME": "int:33554432",
+ "MS_MANDLOCK": "int:64",
+ "MS_MGC_MSK": "int:4294901760",
+ "MS_MGC_VAL": "int:3236757504",
+ "MS_MOVE": "int:8192",
+ "MS_NOATIME": "int:1024",
+ "MS_NODEV": "int:4",
+ "MS_NODIRATIME": "int:2048",
+ "MS_NOEXEC": "int:8",
+ "MS_NOREMOTELOCK": "int:134217728",
+ "MS_NOSEC": "int:268435456",
+ "MS_NOSUID": "int:2",
+ "MS_NOUSER": "int:-2147483648",
+ "MS_POSIXACL": "int:65536",
+ "MS_PRIVATE": "int:262144",
+ "MS_RDONLY": "int:1",
+ "MS_REC": "int:16384",
+ "MS_RELATIME": "int:2097152",
+ "MS_REMOUNT": "int:32",
+ "MS_RMT_MASK": "int:41943121",
+ "MS_SHARED": "int:1048576",
+ "MS_SILENT": "int:32768",
+ "MS_SLAVE": "int:524288",
+ "MS_STRICTATIME": "int:16777216",
+ "MS_SUBMOUNT": "int:67108864",
+ "MS_SYNC": "int:4",
+ "MS_SYNCHRONOUS": "int:16",
+ "MS_UNBINDABLE": "int:131072",
+ "MS_VERBOSE": "int:32768",
+ "NETLINK_ADD_MEMBERSHIP": "int:1",
+ "NETLINK_AUDIT": "int:9",
+ "NETLINK_BROADCAST_ERROR": "int:4",
+ "NETLINK_CAP_ACK": "int:10",
+ "NETLINK_CONNECTED": "int:1",
+ "NETLINK_CONNECTOR": "int:11",
+ "NETLINK_CRYPTO": "int:21",
+ "NETLINK_DNRTMSG": "int:14",
+ "NETLINK_DROP_MEMBERSHIP": "int:2",
+ "NETLINK_ECRYPTFS": "int:19",
+ "NETLINK_EXT_ACK": "int:11",
+ "NETLINK_FIB_LOOKUP": "int:10",
+ "NETLINK_FIREWALL": "int:3",
+ "NETLINK_GENERIC": "int:16",
+ "NETLINK_INET_DIAG": "int:4",
+ "NETLINK_IP6_FW": "int:13",
+ "NETLINK_ISCSI": "int:8",
+ "NETLINK_KOBJECT_UEVENT": "int:15",
+ "NETLINK_LISTEN_ALL_NSID": "int:8",
+ "NETLINK_LIST_MEMBERSHIPS": "int:9",
+ "NETLINK_NETFILTER": "int:12",
+ "NETLINK_NFLOG": "int:5",
+ "NETLINK_NO_ENOBUFS": "int:5",
+ "NETLINK_PKTINFO": "int:3",
+ "NETLINK_RDMA": "int:20",
+ "NETLINK_ROUTE": "int:0",
+ "NETLINK_RX_RING": "int:6",
+ "NETLINK_SCSITRANSPORT": "int:18",
+ "NETLINK_SELINUX": "int:7",
+ "NETLINK_SMC": "int:22",
+ "NETLINK_SOCK_DIAG": "int:4",
+ "NETLINK_TX_RING": "int:7",
+ "NETLINK_UNCONNECTED": "int:0",
+ "NETLINK_UNUSED": "int:1",
+ "NETLINK_USERSOCK": "int:2",
+ "NETLINK_XFRM": "int:6",
+ "NI_DGRAM": "int:16",
+ "NI_IDN": "int:32",
+ "NI_IDN_ALLOW_UNASSIGNED": "int:64",
+ "NI_IDN_USE_STD3_ASCII_RULES": "int:128",
+ "NI_MAXHOST": "int:1025",
+ "NI_MAXSERV": "int:32",
+ "NI_NAMEREQD": "int:8",
+ "NI_NOFQDN": "int:4",
+ "NI_NUMERICHOST": "int:1",
+ "NI_NUMERICSERV": "int:2",
+ "NL0": "int:0",
+ "NL1": "int:256",
+ "NLA_ALIGNTO": "int:4",
+ "NLA_F_NESTED": "int:32768",
+ "NLA_F_NET_BYTEORDER": "int:16384",
+ "NLA_HDRLEN": "int:4",
+ "NLA_TYPE_MASK": "int:-49153",
+ "NLDLY": "int:256",
+ "NLMSGERR_ATTR_COOKIE": "int:3",
+ "NLMSGERR_ATTR_MAX": "int:3",
+ "NLMSGERR_ATTR_MSG": "int:1",
+ "NLMSGERR_ATTR_OFFS": "int:2",
+ "NLMSGERR_ATTR_UNUSED": "int:0",
+ "NLMSG_ALIGNTO": "int:4",
+ "NLMSG_DONE": "int:3",
+ "NLMSG_ERROR": "int:2",
+ "NLMSG_HDRLEN": "int:16",
+ "NLMSG_MIN_TYPE": "int:16",
+ "NLMSG_NOOP": "int:1",
+ "NLMSG_OVERRUN": "int:4",
+ "NLM_F_ACK": "int:4",
+ "NLM_F_ACK_TLVS": "int:512",
+ "NLM_F_APPEND": "int:2048",
+ "NLM_F_ATOMIC": "int:1024",
+ "NLM_F_CAPPED": "int:256",
+ "NLM_F_CREATE": "int:1024",
+ "NLM_F_DUMP": "int:768",
+ "NLM_F_DUMP_FILTERED": "int:32",
+ "NLM_F_DUMP_INTR": "int:16",
+ "NLM_F_ECHO": "int:8",
+ "NLM_F_EXCL": "int:512",
+ "NLM_F_MATCH": "int:512",
+ "NLM_F_MULTI": "int:2",
+ "NLM_F_NONREC": "int:256",
+ "NLM_F_REPLACE": "int:256",
+ "NLM_F_REQUEST": "int:1",
+ "NLM_F_ROOT": "int:256",
+ "NOFLSH": "int:128",
+ "OCRNL": "int:8",
+ "OFDEL": "int:128",
+ "OFILL": "int:64",
+ "OLCUC": "int:2",
+ "ONLCR": "int:4",
+ "ONLRET": "int:32",
+ "ONOCR": "int:16",
+ "OPOST": "int:1",
+ "OS": "string:linux",
+ "O_ACCMODE": "int:3",
+ "O_APPEND": "int:1024",
+ "O_ASYNC": "int:8192",
+ "O_CLOEXEC": "int:524288",
+ "O_CREAT": "int:64",
+ "O_DIRECT": "int:16384",
+ "O_DIRECTORY": "int:65536",
+ "O_DSYNC": "int:4096",
+ "O_EXCL": "int:128",
+ "O_FSYNC": "int:1052672",
+ "O_LARGEFILE": "int:0",
+ "O_NDELAY": "int:2048",
+ "O_NOATIME": "int:262144",
+ "O_NOCTTY": "int:256",
+ "O_NOFOLLOW": "int:131072",
+ "O_NONBLOCK": "int:2048",
+ "O_PATH": "int:2097152",
+ "O_RDONLY": "int:0",
+ "O_RDWR": "int:2",
+ "O_RSYNC": "int:1052672",
+ "O_SYNC": "int:1052672",
+ "O_TMPFILE": "int:4259840",
+ "O_TRUNC": "int:512",
+ "O_WRONLY": "int:1",
+ "PACKET_ADD_MEMBERSHIP": "int:1",
+ "PACKET_AUXDATA": "int:8",
+ "PACKET_BROADCAST": "int:1",
+ "PACKET_COPY_THRESH": "int:7",
+ "PACKET_DROP_MEMBERSHIP": "int:2",
+ "PACKET_FANOUT": "int:18",
+ "PACKET_FANOUT_DATA": "int:22",
+ "PACKET_FASTROUTE": "int:6",
+ "PACKET_HDRLEN": "int:11",
+ "PACKET_HOST": "int:0",
+ "PACKET_LOOPBACK": "int:5",
+ "PACKET_LOSS": "int:14",
+ "PACKET_MR_ALLMULTI": "int:2",
+ "PACKET_MR_MULTICAST": "int:0",
+ "PACKET_MR_PROMISC": "int:1",
+ "PACKET_MR_UNICAST": "int:3",
+ "PACKET_MULTICAST": "int:2",
+ "PACKET_ORIGDEV": "int:9",
+ "PACKET_OTHERHOST": "int:3",
+ "PACKET_OUTGOING": "int:4",
+ "PACKET_QDISC_BYPASS": "int:20",
+ "PACKET_RECV_OUTPUT": "int:3",
+ "PACKET_RESERVE": "int:12",
+ "PACKET_ROLLOVER_STATS": "int:21",
+ "PACKET_RX_RING": "int:5",
+ "PACKET_STATISTICS": "int:6",
+ "PACKET_TIMESTAMP": "int:17",
+ "PACKET_TX_HAS_OFF": "int:19",
+ "PACKET_TX_RING": "int:13",
+ "PACKET_TX_TIMESTAMP": "int:16",
+ "PACKET_VERSION": "int:10",
+ "PACKET_VNET_HDR": "int:15",
+ "PARENB": "int:256",
+ "PARMRK": "int:8",
+ "PARODD": "int:512",
+ "PC_2_SYMLINKS": "int:20",
+ "PC_ALLOC_SIZE_MIN": "int:18",
+ "PC_ASYNC_IO": "int:10",
+ "PC_CHOWN_RESTRICTED": "int:6",
+ "PC_FILESIZEBITS": "int:13",
+ "PC_LINK_MAX": "int:0",
+ "PC_MAX_CANON": "int:1",
+ "PC_MAX_INPUT": "int:2",
+ "PC_NAME_MAX": "int:3",
+ "PC_NO_TRUNC": "int:7",
+ "PC_PATH_MAX": "int:4",
+ "PC_PIPE_BUF": "int:5",
+ "PC_PRIO_IO": "int:11",
+ "PC_REC_INCR_XFER_SIZE": "int:14",
+ "PC_REC_MAX_XFER_SIZE": "int:15",
+ "PC_REC_MIN_XFER_SIZE": "int:16",
+ "PC_REC_XFER_ALIGN": "int:17",
+ "PC_SOCK_MAXBUF": "int:12",
+ "PC_SYMLINK_MAX": "int:19",
+ "PC_SYNC_IO": "int:9",
+ "PC_VDISABLE": "int:8",
+ "PENDIN": "int:16384",
+ "PRIO_MAX": "int:20",
+ "PRIO_MIN": "int:-20",
+ "PRIO_PGRP": "int:1",
+ "PRIO_PROCESS": "int:0",
+ "PRIO_USER": "int:2",
+ "PROT_EXEC": "int:4",
+ "PROT_GROWSDOWN": "int:16777216",
+ "PROT_GROWSUP": "int:33554432",
+ "PROT_NONE": "int:0",
+ "PROT_READ": "int:1",
+ "PROT_WRITE": "int:2",
+ "PR_CAPBSET_DROP": "int:24",
+ "PR_CAPBSET_READ": "int:23",
+ "PR_CAP_AMBIENT": "int:47",
+ "PR_CAP_AMBIENT_CLEAR_ALL": "int:4",
+ "PR_CAP_AMBIENT_IS_SET": "int:1",
+ "PR_CAP_AMBIENT_LOWER": "int:3",
+ "PR_CAP_AMBIENT_RAISE": "int:2",
+ "PR_ENDIAN_BIG": "int:0",
+ "PR_ENDIAN_LITTLE": "int:1",
+ "PR_ENDIAN_PPC_LITTLE": "int:2",
+ "PR_FPEMU_NOPRINT": "int:1",
+ "PR_FPEMU_SIGFPE": "int:2",
+ "PR_FP_EXC_ASYNC": "int:2",
+ "PR_FP_EXC_DISABLED": "int:0",
+ "PR_FP_EXC_DIV": "int:65536",
+ "PR_FP_EXC_INV": "int:1048576",
+ "PR_FP_EXC_NONRECOV": "int:1",
+ "PR_FP_EXC_OVF": "int:131072",
+ "PR_FP_EXC_PRECISE": "int:3",
+ "PR_FP_EXC_RES": "int:524288",
+ "PR_FP_EXC_SW_ENABLE": "int:128",
+ "PR_FP_EXC_UND": "int:262144",
+ "PR_FP_MODE_FR": "int:1",
+ "PR_FP_MODE_FRE": "int:2",
+ "PR_GET_CHILD_SUBREAPER": "int:37",
+ "PR_GET_DUMPABLE": "int:3",
+ "PR_GET_ENDIAN": "int:19",
+ "PR_GET_FPEMU": "int:9",
+ "PR_GET_FPEXC": "int:11",
+ "PR_GET_FP_MODE": "int:46",
+ "PR_GET_KEEPCAPS": "int:7",
+ "PR_GET_NAME": "int:16",
+ "PR_GET_NO_NEW_PRIVS": "int:39",
+ "PR_GET_PDEATHSIG": "int:2",
+ "PR_GET_SECCOMP": "int:21",
+ "PR_GET_SECUREBITS": "int:27",
+ "PR_GET_THP_DISABLE": "int:42",
+ "PR_GET_TID_ADDRESS": "int:40",
+ "PR_GET_TIMERSLACK": "int:30",
+ "PR_GET_TIMING": "int:13",
+ "PR_GET_TSC": "int:25",
+ "PR_GET_UNALIGN": "int:5",
+ "PR_MCE_KILL": "int:33",
+ "PR_MCE_KILL_CLEAR": "int:0",
+ "PR_MCE_KILL_DEFAULT": "int:2",
+ "PR_MCE_KILL_EARLY": "int:1",
+ "PR_MCE_KILL_GET": "int:34",
+ "PR_MCE_KILL_LATE": "int:0",
+ "PR_MCE_KILL_SET": "int:1",
+ "PR_MPX_DISABLE_MANAGEMENT": "int:44",
+ "PR_MPX_ENABLE_MANAGEMENT": "int:43",
+ "PR_SET_CHILD_SUBREAPER": "int:36",
+ "PR_SET_DUMPABLE": "int:4",
+ "PR_SET_ENDIAN": "int:20",
+ "PR_SET_FPEMU": "int:10",
+ "PR_SET_FPEXC": "int:12",
+ "PR_SET_FP_MODE": "int:45",
+ "PR_SET_KEEPCAPS": "int:8",
+ "PR_SET_MM": "int:35",
+ "PR_SET_MM_ARG_END": "int:9",
+ "PR_SET_MM_ARG_START": "int:8",
+ "PR_SET_MM_AUXV": "int:12",
+ "PR_SET_MM_BRK": "int:7",
+ "PR_SET_MM_END_CODE": "int:2",
+ "PR_SET_MM_END_DATA": "int:4",
+ "PR_SET_MM_ENV_END": "int:11",
+ "PR_SET_MM_ENV_START": "int:10",
+ "PR_SET_MM_EXE_FILE": "int:13",
+ "PR_SET_MM_MAP": "int:14",
+ "PR_SET_MM_MAP_SIZE": "int:15",
+ "PR_SET_MM_START_BRK": "int:6",
+ "PR_SET_MM_START_CODE": "int:1",
+ "PR_SET_MM_START_DATA": "int:3",
+ "PR_SET_MM_START_STACK": "int:5",
+ "PR_SET_NAME": "int:15",
+ "PR_SET_NO_NEW_PRIVS": "int:38",
+ "PR_SET_PDEATHSIG": "int:1",
+ "PR_SET_PTRACER": "int:1499557217",
+ "PR_SET_SECCOMP": "int:22",
+ "PR_SET_SECUREBITS": "int:28",
+ "PR_SET_THP_DISABLE": "int:41",
+ "PR_SET_TIMERSLACK": "int:29",
+ "PR_SET_TIMING": "int:14",
+ "PR_SET_TSC": "int:26",
+ "PR_SET_UNALIGN": "int:6",
+ "PR_SVE_GET_VL": "int:51",
+ "PR_SVE_SET_VL": "int:50",
+ "PR_SVE_SET_VL_ONEXEC": "int:262144",
+ "PR_SVE_VL_INHERIT": "int:131072",
+ "PR_SVE_VL_LEN_MASK": "int:65535",
+ "PR_TASK_PERF_EVENTS_DISABLE": "int:31",
+ "PR_TASK_PERF_EVENTS_ENABLE": "int:32",
+ "PR_TIMING_STATISTICAL": "int:0",
+ "PR_TIMING_TIMESTAMP": "int:1",
+ "PR_TSC_ENABLE": "int:1",
+ "PR_TSC_SIGSEGV": "int:2",
+ "PR_UNALIGN_NOPRINT": "int:1",
+ "PR_UNALIGN_SIGBUS": "int:2",
+ "PTRACE_ARCH_PRCTL": "int:30",
+ "PTRACE_ATTACH": "int:16",
+ "PTRACE_CONT": "int:7",
+ "PTRACE_DETACH": "int:17",
+ "PTRACE_EVENT_CLONE": "int:3",
+ "PTRACE_EVENT_EXEC": "int:4",
+ "PTRACE_EVENT_EXIT": "int:6",
+ "PTRACE_EVENT_FORK": "int:1",
+ "PTRACE_EVENT_SECCOMP": "int:7",
+ "PTRACE_EVENT_STOP": "int:128",
+ "PTRACE_EVENT_VFORK": "int:2",
+ "PTRACE_EVENT_VFORK_DONE": "int:5",
+ "PTRACE_GETEVENTMSG": "int:16897",
+ "PTRACE_GETFPREGS": "int:14",
+ "PTRACE_GETFPXREGS": "int:18",
+ "PTRACE_GETREGS": "int:12",
+ "PTRACE_GETREGSET": "int:16900",
+ "PTRACE_GETSIGINFO": "int:16898",
+ "PTRACE_GETSIGMASK": "int:16906",
+ "PTRACE_GET_THREAD_AREA": "int:25",
+ "PTRACE_INTERRUPT": "int:16903",
+ "PTRACE_KILL": "int:8",
+ "PTRACE_LISTEN": "int:16904",
+ "PTRACE_OLDSETOPTIONS": "int:21",
+ "PTRACE_O_EXITKILL": "int:1048576",
+ "PTRACE_O_MASK": "int:3145983",
+ "PTRACE_O_SUSPEND_SECCOMP": "int:2097152",
+ "PTRACE_O_TRACECLONE": "int:8",
+ "PTRACE_O_TRACEEXEC": "int:16",
+ "PTRACE_O_TRACEEXIT": "int:64",
+ "PTRACE_O_TRACEFORK": "int:2",
+ "PTRACE_O_TRACESECCOMP": "int:128",
+ "PTRACE_O_TRACESYSGOOD": "int:1",
+ "PTRACE_O_TRACEVFORK": "int:4",
+ "PTRACE_O_TRACEVFORKDONE": "int:32",
+ "PTRACE_PEEKDATA": "int:2",
+ "PTRACE_PEEKSIGINFO": "int:16905",
+ "PTRACE_PEEKSIGINFO_SHARED": "int:1",
+ "PTRACE_PEEKTEXT": "int:1",
+ "PTRACE_PEEKUSER": "int:3",
+ "PTRACE_PEEKUSR": "int:3",
+ "PTRACE_POKEDATA": "int:5",
+ "PTRACE_POKETEXT": "int:4",
+ "PTRACE_POKEUSER": "int:6",
+ "PTRACE_POKEUSR": "int:6",
+ "PTRACE_SECCOMP_GET_FILTER": "int:16908",
+ "PTRACE_SEIZE": "int:16902",
+ "PTRACE_SETFPREGS": "int:15",
+ "PTRACE_SETFPXREGS": "int:19",
+ "PTRACE_SETOPTIONS": "int:16896",
+ "PTRACE_SETREGS": "int:13",
+ "PTRACE_SETREGSET": "int:16901",
+ "PTRACE_SETSIGINFO": "int:16899",
+ "PTRACE_SETSIGMASK": "int:16907",
+ "PTRACE_SET_THREAD_AREA": "int:26",
+ "PTRACE_SINGLEBLOCK": "int:33",
+ "PTRACE_SINGLESTEP": "int:9",
+ "PTRACE_SYSCALL": "int:24",
+ "PTRACE_SYSEMU": "int:31",
+ "PTRACE_SYSEMU_SINGLESTEP": "int:32",
+ "PTRACE_TRACEME": "int:0",
+ "PathMax": "int:4096",
+ "RLIMIT_AS": "int:9",
+ "RLIMIT_CORE": "int:4",
+ "RLIMIT_CPU": "int:0",
+ "RLIMIT_DATA": "int:2",
+ "RLIMIT_FSIZE": "int:1",
+ "RLIMIT_NOFILE": "int:7",
+ "RLIMIT_STACK": "int:3",
+ "RLIM_INFINITY": "int:18446744073709551615",
+ "RLIM_SAVED_CUR": "int:18446744073709551615",
+ "RLIM_SAVED_MAX": "int:18446744073709551615",
+ "RTAX_ADVMSS": "int:8",
+ "RTAX_CC_ALGO": "int:16",
+ "RTAX_CWND": "int:7",
+ "RTAX_FASTOPEN_NO_COOKIE": "int:17",
+ "RTAX_FEATURES": "int:12",
+ "RTAX_FEATURE_ALLFRAG": "int:8",
+ "RTAX_FEATURE_ECN": "int:1",
+ "RTAX_FEATURE_MASK": "int:15",
+ "RTAX_FEATURE_SACK": "int:2",
+ "RTAX_FEATURE_TIMESTAMP": "int:4",
+ "RTAX_HOPLIMIT": "int:10",
+ "RTAX_INITCWND": "int:11",
+ "RTAX_INITRWND": "int:14",
+ "RTAX_LOCK": "int:1",
+ "RTAX_MTU": "int:2",
+ "RTAX_QUICKACK": "int:15",
+ "RTAX_REORDERING": "int:9",
+ "RTAX_RTO_MIN": "int:13",
+ "RTAX_RTT": "int:4",
+ "RTAX_RTTVAR": "int:5",
+ "RTAX_SSTHRESH": "int:6",
+ "RTAX_UNSPEC": "int:0",
+ "RTAX_WINDOW": "int:3",
+ "RTA_ALIGNTO": "int:4",
+ "RTA_CACHEINFO": "int:12",
+ "RTA_DST": "int:1",
+ "RTA_ENCAP": "int:22",
+ "RTA_ENCAP_TYPE": "int:21",
+ "RTA_EXPIRES": "int:23",
+ "RTA_FLOW": "int:11",
+ "RTA_GATEWAY": "int:5",
+ "RTA_IIF": "int:3",
+ "RTA_MARK": "int:16",
+ "RTA_METRICS": "int:8",
+ "RTA_MFC_STATS": "int:17",
+ "RTA_MP_ALGO": "int:14",
+ "RTA_MULTIPATH": "int:9",
+ "RTA_NEWDST": "int:19",
+ "RTA_OIF": "int:4",
+ "RTA_PAD": "int:24",
+ "RTA_PREF": "int:20",
+ "RTA_PREFSRC": "int:7",
+ "RTA_PRIORITY": "int:6",
+ "RTA_PROTOINFO": "int:10",
+ "RTA_SESSION": "int:13",
+ "RTA_SRC": "int:2",
+ "RTA_TABLE": "int:15",
+ "RTA_TTL_PROPAGATE": "int:26",
+ "RTA_UID": "int:25",
+ "RTA_UNSPEC": "int:0",
+ "RTA_VIA": "int:18",
+ "RTCF_DIRECTSRC": "int:67108864",
+ "RTCF_DOREDIRECT": "int:16777216",
+ "RTCF_LOG": "int:33554432",
+ "RTCF_MASQ": "int:4194304",
+ "RTCF_NAT": "int:8388608",
+ "RTCF_VALVE": "int:2097152",
+ "RTF_ADDRCLASSMASK": "int:4160749568",
+ "RTF_ADDRCONF": "int:262144",
+ "RTF_ALLONLINK": "int:131072",
+ "RTF_BROADCAST": "int:268435456",
+ "RTF_CACHE": "int:16777216",
+ "RTF_DEFAULT": "int:65536",
+ "RTF_DYNAMIC": "int:16",
+ "RTF_FLOW": "int:33554432",
+ "RTF_GATEWAY": "int:2",
+ "RTF_HOST": "int:4",
+ "RTF_INTERFACE": "int:1073741824",
+ "RTF_IRTT": "int:256",
+ "RTF_LINKRT": "int:1048576",
+ "RTF_LOCAL": "int:2147483648",
+ "RTF_MODIFIED": "int:32",
+ "RTF_MSS": "int:64",
+ "RTF_MTU": "int:64",
+ "RTF_MULTICAST": "int:536870912",
+ "RTF_NAT": "int:134217728",
+ "RTF_NOFORWARD": "int:4096",
+ "RTF_NONEXTHOP": "int:2097152",
+ "RTF_NOPMTUDISC": "int:16384",
+ "RTF_POLICY": "int:67108864",
+ "RTF_REINSTATE": "int:8",
+ "RTF_REJECT": "int:512",
+ "RTF_STATIC": "int:1024",
+ "RTF_THROW": "int:8192",
+ "RTF_UP": "int:1",
+ "RTF_WINDOW": "int:128",
+ "RTF_XRESOLVE": "int:2048",
+ "RTMGRP_DECnet_IFADDR": "int:4096",
+ "RTMGRP_DECnet_ROUTE": "int:16384",
+ "RTMGRP_IPV4_IFADDR": "int:16",
+ "RTMGRP_IPV4_MROUTE": "int:32",
+ "RTMGRP_IPV4_ROUTE": "int:64",
+ "RTMGRP_IPV4_RULE": "int:128",
+ "RTMGRP_IPV6_IFADDR": "int:256",
+ "RTMGRP_IPV6_IFINFO": "int:2048",
+ "RTMGRP_IPV6_MROUTE": "int:512",
+ "RTMGRP_IPV6_PREFIX": "int:131072",
+ "RTMGRP_IPV6_ROUTE": "int:1024",
+ "RTMGRP_LINK": "int:1",
+ "RTMGRP_NEIGH": "int:4",
+ "RTMGRP_NOTIFY": "int:2",
+ "RTMGRP_TC": "int:8",
+ "RTMSG_AR_FAILED": "int:81",
+ "RTMSG_CONTROL": "int:64",
+ "RTMSG_DELDEVICE": "int:18",
+ "RTMSG_DELROUTE": "int:34",
+ "RTMSG_DELRULE": "int:50",
+ "RTMSG_NEWDEVICE": "int:17",
+ "RTMSG_NEWROUTE": "int:33",
+ "RTMSG_NEWRULE": "int:49",
+ "RTMSG_OVERRUN": "int:4",
+ "RTM_BASE": "int:16",
+ "RTM_DELACTION": "int:49",
+ "RTM_DELADDR": "int:21",
+ "RTM_DELADDRLABEL": "int:73",
+ "RTM_DELLINK": "int:17",
+ "RTM_DELMDB": "int:85",
+ "RTM_DELNEIGH": "int:29",
+ "RTM_DELNETCONF": "int:81",
+ "RTM_DELNSID": "int:89",
+ "RTM_DELQDISC": "int:37",
+ "RTM_DELROUTE": "int:25",
+ "RTM_DELRULE": "int:33",
+ "RTM_DELTCLASS": "int:41",
+ "RTM_DELTFILTER": "int:45",
+ "RTM_F_CLONED": "int:512",
+ "RTM_F_EQUALIZE": "int:1024",
+ "RTM_F_FIB_MATCH": "int:8192",
+ "RTM_F_LOOKUP_TABLE": "int:4096",
+ "RTM_F_NOTIFY": "int:256",
+ "RTM_F_PREFIX": "int:2048",
+ "RTM_GETACTION": "int:50",
+ "RTM_GETADDR": "int:22",
+ "RTM_GETADDRLABEL": "int:74",
+ "RTM_GETANYCAST": "int:62",
+ "RTM_GETDCB": "int:78",
+ "RTM_GETLINK": "int:18",
+ "RTM_GETMDB": "int:86",
+ "RTM_GETMULTICAST": "int:58",
+ "RTM_GETNEIGH": "int:30",
+ "RTM_GETNEIGHTBL": "int:66",
+ "RTM_GETNETCONF": "int:82",
+ "RTM_GETNSID": "int:90",
+ "RTM_GETQDISC": "int:38",
+ "RTM_GETROUTE": "int:26",
+ "RTM_GETRULE": "int:34",
+ "RTM_GETSTATS": "int:94",
+ "RTM_GETTCLASS": "int:42",
+ "RTM_GETTFILTER": "int:46",
+ "RTM_NEWACTION": "int:48",
+ "RTM_NEWADDR": "int:20",
+ "RTM_NEWADDRLABEL": "int:72",
+ "RTM_NEWCACHEREPORT": "int:96",
+ "RTM_NEWLINK": "int:16",
+ "RTM_NEWMDB": "int:84",
+ "RTM_NEWNDUSEROPT": "int:68",
+ "RTM_NEWNEIGH": "int:28",
+ "RTM_NEWNEIGHTBL": "int:64",
+ "RTM_NEWNETCONF": "int:80",
+ "RTM_NEWNSID": "int:88",
+ "RTM_NEWPREFIX": "int:52",
+ "RTM_NEWQDISC": "int:36",
+ "RTM_NEWROUTE": "int:24",
+ "RTM_NEWRULE": "int:32",
+ "RTM_NEWSTATS": "int:92",
+ "RTM_NEWTCLASS": "int:40",
+ "RTM_NEWTFILTER": "int:44",
+ "RTM_SETDCB": "int:79",
+ "RTM_SETLINK": "int:19",
+ "RTM_SETNEIGHTBL": "int:67",
+ "RTNETLINK_HAVE_PEERINFO": "int:1",
+ "RTNH_ALIGNTO": "int:4",
+ "RTNH_COMPARE_MASK": "int:25",
+ "RTNH_F_DEAD": "int:1",
+ "RTNH_F_LINKDOWN": "int:16",
+ "RTNH_F_OFFLOAD": "int:8",
+ "RTNH_F_ONLINK": "int:4",
+ "RTNH_F_PERVASIVE": "int:2",
+ "RTNH_F_UNRESOLVED": "int:32",
+ "RTNLGRP_DCB": "int:23",
+ "RTNLGRP_DECnet_IFADDR": "int:13",
+ "RTNLGRP_DECnet_ROUTE": "int:15",
+ "RTNLGRP_DECnet_RULE": "int:16",
+ "RTNLGRP_IPV4_IFADDR": "int:5",
+ "RTNLGRP_IPV4_MROUTE": "int:6",
+ "RTNLGRP_IPV4_MROUTE_R": "int:30",
+ "RTNLGRP_IPV4_NETCONF": "int:24",
+ "RTNLGRP_IPV4_ROUTE": "int:7",
+ "RTNLGRP_IPV4_RULE": "int:8",
+ "RTNLGRP_IPV6_IFADDR": "int:9",
+ "RTNLGRP_IPV6_IFINFO": "int:12",
+ "RTNLGRP_IPV6_MROUTE": "int:10",
+ "RTNLGRP_IPV6_MROUTE_R": "int:31",
+ "RTNLGRP_IPV6_NETCONF": "int:25",
+ "RTNLGRP_IPV6_PREFIX": "int:18",
+ "RTNLGRP_IPV6_ROUTE": "int:11",
+ "RTNLGRP_IPV6_RULE": "int:19",
+ "RTNLGRP_LINK": "int:1",
+ "RTNLGRP_MDB": "int:26",
+ "RTNLGRP_MPLS_NETCONF": "int:29",
+ "RTNLGRP_MPLS_ROUTE": "int:27",
+ "RTNLGRP_ND_USEROPT": "int:20",
+ "RTNLGRP_NEIGH": "int:3",
+ "RTNLGRP_NONE": "int:0",
+ "RTNLGRP_NOP2": "int:14",
+ "RTNLGRP_NOP4": "int:17",
+ "RTNLGRP_NOTIFY": "int:2",
+ "RTNLGRP_NSID": "int:28",
+ "RTNLGRP_PHONET_IFADDR": "int:21",
+ "RTNLGRP_PHONET_ROUTE": "int:22",
+ "RTNLGRP_TC": "int:4",
+ "RTNL_FAMILY_IP6MR": "int:129",
+ "RTNL_FAMILY_IPMR": "int:128",
+ "RTNL_FAMILY_MAX": "int:129",
+ "RTN_ANYCAST": "int:4",
+ "RTN_BLACKHOLE": "int:6",
+ "RTN_BROADCAST": "int:3",
+ "RTN_LOCAL": "int:2",
+ "RTN_MULTICAST": "int:5",
+ "RTN_NAT": "int:10",
+ "RTN_PROHIBIT": "int:8",
+ "RTN_THROW": "int:9",
+ "RTN_UNICAST": "int:1",
+ "RTN_UNREACHABLE": "int:7",
+ "RTN_UNSPEC": "int:0",
+ "RTN_XRESOLVE": "int:11",
+ "RTPROT_BABEL": "int:42",
+ "RTPROT_BIRD": "int:12",
+ "RTPROT_BOOT": "int:3",
+ "RTPROT_DHCP": "int:16",
+ "RTPROT_DNROUTED": "int:13",
+ "RTPROT_GATED": "int:8",
+ "RTPROT_KERNEL": "int:2",
+ "RTPROT_MROUTED": "int:17",
+ "RTPROT_MRT": "int:10",
+ "RTPROT_NTK": "int:15",
+ "RTPROT_RA": "int:9",
+ "RTPROT_REDIRECT": "int:1",
+ "RTPROT_STATIC": "int:4",
+ "RTPROT_UNSPEC": "int:0",
+ "RTPROT_XORP": "int:14",
+ "RTPROT_ZEBRA": "int:11",
+ "RT_CLASS_DEFAULT": "int:253",
+ "RT_CLASS_LOCAL": "int:255",
+ "RT_CLASS_MAIN": "int:254",
+ "RT_CLASS_MAX": "int:255",
+ "RT_CLASS_UNSPEC": "int:0",
+ "RT_SCOPE_HOST": "int:254",
+ "RT_SCOPE_LINK": "int:253",
+ "RT_SCOPE_NOWHERE": "int:255",
+ "RT_SCOPE_SITE": "int:200",
+ "RT_SCOPE_UNIVERSE": "int:0",
+ "RT_TABLE_COMPAT": "int:252",
+ "RT_TABLE_DEFAULT": "int:253",
+ "RT_TABLE_LOCAL": "int:255",
+ "RT_TABLE_MAIN": "int:254",
+ "RT_TABLE_MAX": "int:4294967295",
+ "RT_TABLE_UNSPEC": "int:0",
+ "RUSAGE_CHILDREN": "int:-1",
+ "RUSAGE_SELF": "int:0",
+ "RUSAGE_THREAD": "int:1",
+ "SCHED_H": "int:1",
+ "SCM_CREDENTIALS": "int:2",
+ "SCM_RIGHTS": "int:1",
+ "SCM_TIMESTAMP": "int:29",
+ "SCM_TIMESTAMPING": "int:37",
+ "SCM_TIMESTAMPING_OPT_STATS": "int:54",
+ "SCM_TIMESTAMPING_PKTINFO": "int:58",
+ "SCM_TIMESTAMPNS": "int:35",
+ "SCM_WIFI_STATUS": "int:41",
+ "SC_2_CHAR_TERM": "int:95",
+ "SC_2_C_BIND": "int:47",
+ "SC_2_C_DEV": "int:48",
+ "SC_2_C_VERSION": "int:96",
+ "SC_2_FORT_DEV": "int:49",
+ "SC_2_FORT_RUN": "int:50",
+ "SC_2_LOCALEDEF": "int:52",
+ "SC_2_PBS": "int:168",
+ "SC_2_PBS_ACCOUNTING": "int:169",
+ "SC_2_PBS_CHECKPOINT": "int:175",
+ "SC_2_PBS_LOCATE": "int:170",
+ "SC_2_PBS_MESSAGE": "int:171",
+ "SC_2_PBS_TRACK": "int:172",
+ "SC_2_SW_DEV": "int:51",
+ "SC_2_UPE": "int:97",
+ "SC_2_VERSION": "int:46",
+ "SC_ADVISORY_INFO": "int:132",
+ "SC_AIO_LISTIO_MAX": "int:23",
+ "SC_AIO_MAX": "int:24",
+ "SC_AIO_PRIO_DELTA_MAX": "int:25",
+ "SC_ARG_MAX": "int:0",
+ "SC_ASYNCHRONOUS_IO": "int:12",
+ "SC_ATEXIT_MAX": "int:87",
+ "SC_AVPHYS_PAGES": "int:86",
+ "SC_BARRIERS": "int:133",
+ "SC_BASE": "int:134",
+ "SC_BC_BASE_MAX": "int:36",
+ "SC_BC_DIM_MAX": "int:37",
+ "SC_BC_SCALE_MAX": "int:38",
+ "SC_BC_STRING_MAX": "int:39",
+ "SC_CHARCLASS_NAME_MAX": "int:45",
+ "SC_CHAR_BIT": "int:101",
+ "SC_CHAR_MAX": "int:102",
+ "SC_CHAR_MIN": "int:103",
+ "SC_CHILD_MAX": "int:1",
+ "SC_CLK_TCK": "int:2",
+ "SC_CLOCK_SELECTION": "int:137",
+ "SC_COLL_WEIGHTS_MAX": "int:40",
+ "SC_CPUTIME": "int:138",
+ "SC_C_LANG_SUPPORT": "int:135",
+ "SC_C_LANG_SUPPORT_R": "int:136",
+ "SC_DELAYTIMER_MAX": "int:26",
+ "SC_DEVICE_IO": "int:140",
+ "SC_DEVICE_SPECIFIC": "int:141",
+ "SC_DEVICE_SPECIFIC_R": "int:142",
+ "SC_EQUIV_CLASS_MAX": "int:41",
+ "SC_EXPR_NEST_MAX": "int:42",
+ "SC_FD_MGMT": "int:143",
+ "SC_FIFO": "int:144",
+ "SC_FILE_ATTRIBUTES": "int:146",
+ "SC_FILE_LOCKING": "int:147",
+ "SC_FILE_SYSTEM": "int:148",
+ "SC_FSYNC": "int:15",
+ "SC_GETGR_R_SIZE_MAX": "int:69",
+ "SC_GETPW_R_SIZE_MAX": "int:70",
+ "SC_HOST_NAME_MAX": "int:180",
+ "SC_INT_MAX": "int:104",
+ "SC_INT_MIN": "int:105",
+ "SC_IOV_MAX": "int:60",
+ "SC_IPV6": "int:235",
+ "SC_JOB_CONTROL": "int:7",
+ "SC_LEVEL1_DCACHE_ASSOC": "int:189",
+ "SC_LEVEL1_DCACHE_LINESIZE": "int:190",
+ "SC_LEVEL1_DCACHE_SIZE": "int:188",
+ "SC_LEVEL1_ICACHE_ASSOC": "int:186",
+ "SC_LEVEL1_ICACHE_LINESIZE": "int:187",
+ "SC_LEVEL1_ICACHE_SIZE": "int:185",
+ "SC_LEVEL2_CACHE_ASSOC": "int:192",
+ "SC_LEVEL2_CACHE_LINESIZE": "int:193",
+ "SC_LEVEL2_CACHE_SIZE": "int:191",
+ "SC_LEVEL3_CACHE_ASSOC": "int:195",
+ "SC_LEVEL3_CACHE_LINESIZE": "int:196",
+ "SC_LEVEL3_CACHE_SIZE": "int:194",
+ "SC_LEVEL4_CACHE_ASSOC": "int:198",
+ "SC_LEVEL4_CACHE_LINESIZE": "int:199",
+ "SC_LEVEL4_CACHE_SIZE": "int:197",
+ "SC_LINE_MAX": "int:43",
+ "SC_LOGIN_NAME_MAX": "int:71",
+ "SC_LONG_BIT": "int:106",
+ "SC_MAPPED_FILES": "int:16",
+ "SC_MB_LEN_MAX": "int:108",
+ "SC_MEMLOCK": "int:17",
+ "SC_MEMLOCK_RANGE": "int:18",
+ "SC_MEMORY_PROTECTION": "int:19",
+ "SC_MESSAGE_PASSING": "int:20",
+ "SC_MONOTONIC_CLOCK": "int:149",
+ "SC_MQ_OPEN_MAX": "int:27",
+ "SC_MQ_PRIO_MAX": "int:28",
+ "SC_MULTI_PROCESS": "int:150",
+ "SC_NETWORKING": "int:152",
+ "SC_NGROUPS_MAX": "int:3",
+ "SC_NL_ARGMAX": "int:119",
+ "SC_NL_LANGMAX": "int:120",
+ "SC_NL_MSGMAX": "int:121",
+ "SC_NL_NMAX": "int:122",
+ "SC_NL_SETMAX": "int:123",
+ "SC_NL_TEXTMAX": "int:124",
+ "SC_NPROCESSORS_CONF": "int:83",
+ "SC_NPROCESSORS_ONLN": "int:84",
+ "SC_NZERO": "int:109",
+ "SC_OPEN_MAX": "int:4",
+ "SC_PAGESIZE": "int:30",
+ "SC_PASS_MAX": "int:88",
+ "SC_PHYS_PAGES": "int:85",
+ "SC_PII": "int:53",
+ "SC_PII_INTERNET": "int:56",
+ "SC_PII_INTERNET_DGRAM": "int:62",
+ "SC_PII_INTERNET_STREAM": "int:61",
+ "SC_PII_OSI": "int:57",
+ "SC_PII_OSI_CLTS": "int:64",
+ "SC_PII_OSI_COTS": "int:63",
+ "SC_PII_OSI_M": "int:65",
+ "SC_PII_SOCKET": "int:55",
+ "SC_PII_XTI": "int:54",
+ "SC_PIPE": "int:145",
+ "SC_POLL": "int:58",
+ "SC_PRIORITIZED_IO": "int:13",
+ "SC_PRIORITY_SCHEDULING": "int:10",
+ "SC_RAW_SOCKETS": "int:236",
+ "SC_READER_WRITER_LOCKS": "int:153",
+ "SC_REALTIME_SIGNALS": "int:9",
+ "SC_REGEXP": "int:155",
+ "SC_REGEX_VERSION": "int:156",
+ "SC_RE_DUP_MAX": "int:44",
+ "SC_RTSIG_MAX": "int:31",
+ "SC_SAVED_IDS": "int:8",
+ "SC_SCHAR_MAX": "int:111",
+ "SC_SCHAR_MIN": "int:112",
+ "SC_SELECT": "int:59",
+ "SC_SEMAPHORES": "int:21",
+ "SC_SEM_NSEMS_MAX": "int:32",
+ "SC_SEM_VALUE_MAX": "int:33",
+ "SC_SHARED_MEMORY_OBJECTS": "int:22",
+ "SC_SHELL": "int:157",
+ "SC_SHRT_MAX": "int:113",
+ "SC_SHRT_MIN": "int:114",
+ "SC_SIGNALS": "int:158",
+ "SC_SIGQUEUE_MAX": "int:34",
+ "SC_SINGLE_PROCESS": "int:151",
+ "SC_SPAWN": "int:159",
+ "SC_SPIN_LOCKS": "int:154",
+ "SC_SPORADIC_SERVER": "int:160",
+ "SC_SSIZE_MAX": "int:110",
+ "SC_SS_REPL_MAX": "int:241",
+ "SC_STREAMS": "int:174",
+ "SC_STREAM_MAX": "int:5",
+ "SC_SYMLOOP_MAX": "int:173",
+ "SC_SYNCHRONIZED_IO": "int:14",
+ "SC_SYSTEM_DATABASE": "int:162",
+ "SC_SYSTEM_DATABASE_R": "int:163",
+ "SC_THREADS": "int:67",
+ "SC_THREAD_ATTR_STACKADDR": "int:77",
+ "SC_THREAD_ATTR_STACKSIZE": "int:78",
+ "SC_THREAD_CPUTIME": "int:139",
+ "SC_THREAD_DESTRUCTOR_ITERATIONS": "int:73",
+ "SC_THREAD_KEYS_MAX": "int:74",
+ "SC_THREAD_PRIORITY_SCHEDULING": "int:79",
+ "SC_THREAD_PRIO_INHERIT": "int:80",
+ "SC_THREAD_PRIO_PROTECT": "int:81",
+ "SC_THREAD_PROCESS_SHARED": "int:82",
+ "SC_THREAD_ROBUST_PRIO_INHERIT": "int:247",
+ "SC_THREAD_ROBUST_PRIO_PROTECT": "int:248",
+ "SC_THREAD_SAFE_FUNCTIONS": "int:68",
+ "SC_THREAD_SPORADIC_SERVER": "int:161",
+ "SC_THREAD_STACK_MIN": "int:75",
+ "SC_THREAD_THREADS_MAX": "int:76",
+ "SC_TIMEOUTS": "int:164",
+ "SC_TIMERS": "int:11",
+ "SC_TIMER_MAX": "int:35",
+ "SC_TRACE": "int:181",
+ "SC_TRACE_EVENT_FILTER": "int:182",
+ "SC_TRACE_EVENT_NAME_MAX": "int:242",
+ "SC_TRACE_INHERIT": "int:183",
+ "SC_TRACE_LOG": "int:184",
+ "SC_TRACE_NAME_MAX": "int:243",
+ "SC_TRACE_SYS_MAX": "int:244",
+ "SC_TRACE_USER_EVENT_MAX": "int:245",
+ "SC_TTY_NAME_MAX": "int:72",
+ "SC_TYPED_MEMORY_OBJECTS": "int:165",
+ "SC_TZNAME_MAX": "int:6",
+ "SC_T_IOV_MAX": "int:66",
+ "SC_UCHAR_MAX": "int:115",
+ "SC_UINT_MAX": "int:116",
+ "SC_UIO_MAXIOV": "int:60",
+ "SC_ULONG_MAX": "int:117",
+ "SC_USER_GROUPS": "int:166",
+ "SC_USER_GROUPS_R": "int:167",
+ "SC_USHRT_MAX": "int:118",
+ "SC_V6_ILP32_OFF32": "int:176",
+ "SC_V6_ILP32_OFFBIG": "int:177",
+ "SC_V6_LP64_OFF64": "int:178",
+ "SC_V6_LPBIG_OFFBIG": "int:179",
+ "SC_V7_ILP32_OFF32": "int:237",
+ "SC_V7_ILP32_OFFBIG": "int:238",
+ "SC_V7_LP64_OFF64": "int:239",
+ "SC_V7_LPBIG_OFFBIG": "int:240",
+ "SC_VERSION": "int:29",
+ "SC_WORD_BIT": "int:107",
+ "SC_XBS5_ILP32_OFF32": "int:125",
+ "SC_XBS5_ILP32_OFFBIG": "int:126",
+ "SC_XBS5_LP64_OFF64": "int:127",
+ "SC_XBS5_LPBIG_OFFBIG": "int:128",
+ "SC_XOPEN_CRYPT": "int:92",
+ "SC_XOPEN_ENH_I18N": "int:93",
+ "SC_XOPEN_LEGACY": "int:129",
+ "SC_XOPEN_REALTIME": "int:130",
+ "SC_XOPEN_REALTIME_THREADS": "int:131",
+ "SC_XOPEN_SHM": "int:94",
+ "SC_XOPEN_STREAMS": "int:246",
+ "SC_XOPEN_UNIX": "int:91",
+ "SC_XOPEN_VERSION": "int:89",
+ "SC_XOPEN_XCU_VERSION": "int:90",
+ "SC_XOPEN_XPG2": "int:98",
+ "SC_XOPEN_XPG3": "int:99",
+ "SC_XOPEN_XPG4": "int:100",
+ "SHUT_RD": "int:0",
+ "SHUT_RDWR": "int:2",
+ "SHUT_WR": "int:1",
+ "SIOCADDDLCI": "int:35200",
+ "SIOCADDMULTI": "int:35121",
+ "SIOCADDRT": "int:35083",
+ "SIOCATMARK": "int:35077",
+ "SIOCDARP": "int:35155",
+ "SIOCDELDLCI": "int:35201",
+ "SIOCDELMULTI": "int:35122",
+ "SIOCDELRT": "int:35084",
+ "SIOCDEVPRIVATE": "int:35312",
+ "SIOCDIFADDR": "int:35126",
+ "SIOCDRARP": "int:35168",
+ "SIOCGARP": "int:35156",
+ "SIOCGIFADDR": "int:35093",
+ "SIOCGIFBR": "int:35136",
+ "SIOCGIFBRDADDR": "int:35097",
+ "SIOCGIFCONF": "int:35090",
+ "SIOCGIFCOUNT": "int:35128",
+ "SIOCGIFDSTADDR": "int:35095",
+ "SIOCGIFENCAP": "int:35109",
+ "SIOCGIFFLAGS": "int:35091",
+ "SIOCGIFHWADDR": "int:35111",
+ "SIOCGIFINDEX": "int:35123",
+ "SIOCGIFMAP": "int:35184",
+ "SIOCGIFMEM": "int:35103",
+ "SIOCGIFMETRIC": "int:35101",
+ "SIOCGIFMTU": "int:35105",
+ "SIOCGIFNAME": "int:35088",
+ "SIOCGIFNETMASK": "int:35099",
+ "SIOCGIFPFLAGS": "int:35125",
+ "SIOCGIFSLAVE": "int:35113",
+ "SIOCGIFTXQLEN": "int:35138",
+ "SIOCGPGRP": "int:35076",
+ "SIOCGRARP": "int:35169",
+ "SIOCGSTAMP": "int:35078",
+ "SIOCGSTAMPNS": "int:35079",
+ "SIOCPROTOPRIVATE": "int:35296",
+ "SIOCRTMSG": "int:35085",
+ "SIOCSARP": "int:35157",
+ "SIOCSIFADDR": "int:35094",
+ "SIOCSIFBR": "int:35137",
+ "SIOCSIFBRDADDR": "int:35098",
+ "SIOCSIFDSTADDR": "int:35096",
+ "SIOCSIFENCAP": "int:35110",
+ "SIOCSIFFLAGS": "int:35092",
+ "SIOCSIFHWADDR": "int:35108",
+ "SIOCSIFHWBROADCAST": "int:35127",
+ "SIOCSIFLINK": "int:35089",
+ "SIOCSIFMAP": "int:35185",
+ "SIOCSIFMEM": "int:35104",
+ "SIOCSIFMETRIC": "int:35102",
+ "SIOCSIFMTU": "int:35106",
+ "SIOCSIFNAME": "int:35107",
+ "SIOCSIFNETMASK": "int:35100",
+ "SIOCSIFPFLAGS": "int:35124",
+ "SIOCSIFSLAVE": "int:35120",
+ "SIOCSIFTXQLEN": "int:35139",
+ "SIOCSPGRP": "int:35074",
+ "SIOCSRARP": "int:35170",
+ "SOCK_CLOEXEC": "int:524288",
+ "SOCK_DCCP": "int:6",
+ "SOCK_DGRAM": "int:2",
+ "SOCK_NONBLOCK": "int:2048",
+ "SOCK_PACKET": "int:10",
+ "SOCK_RAW": "int:3",
+ "SOCK_RDM": "int:4",
+ "SOCK_SEQPACKET": "int:5",
+ "SOCK_STREAM": "int:1",
+ "SOL_AAL": "int:265",
+ "SOL_ALG": "int:279",
+ "SOL_ATM": "int:264",
+ "SOL_BLUETOOTH": "int:274",
+ "SOL_CAIF": "int:278",
+ "SOL_DCCP": "int:269",
+ "SOL_DECNET": "int:261",
+ "SOL_ICMPV6": "int:58",
+ "SOL_IP": "int:0",
+ "SOL_IPV6": "int:41",
+ "SOL_IRDA": "int:266",
+ "SOL_IUCV": "int:277",
+ "SOL_KCM": "int:281",
+ "SOL_LLC": "int:268",
+ "SOL_NETBEUI": "int:267",
+ "SOL_NETLINK": "int:270",
+ "SOL_NFC": "int:280",
+ "SOL_PACKET": "int:263",
+ "SOL_PNPIPE": "int:275",
+ "SOL_PPPOL2TP": "int:273",
+ "SOL_RAW": "int:255",
+ "SOL_RDS": "int:276",
+ "SOL_RXRPC": "int:272",
+ "SOL_SOCKET": "int:1",
+ "SOL_TCP": "int:6",
+ "SOL_TIPC": "int:271",
+ "SOL_TLS": "int:282",
+ "SOL_X25": "int:262",
+ "SOMAXCONN": "int:128",
+ "SO_ACCEPTCONN": "int:30",
+ "SO_ATTACH_BPF": "int:50",
+ "SO_ATTACH_FILTER": "int:26",
+ "SO_ATTACH_REUSEPORT_CBPF": "int:51",
+ "SO_ATTACH_REUSEPORT_EBPF": "int:52",
+ "SO_BINDTODEVICE": "int:25",
+ "SO_BPF_EXTENSIONS": "int:48",
+ "SO_BROADCAST": "int:6",
+ "SO_BSDCOMPAT": "int:14",
+ "SO_BUSY_POLL": "int:46",
+ "SO_CNX_ADVICE": "int:53",
+ "SO_COOKIE": "int:57",
+ "SO_DEBUG": "int:1",
+ "SO_DETACH_BPF": "int:27",
+ "SO_DETACH_FILTER": "int:27",
+ "SO_DOMAIN": "int:39",
+ "SO_DONTROUTE": "int:5",
+ "SO_ERROR": "int:4",
+ "SO_GET_FILTER": "int:26",
+ "SO_INCOMING_CPU": "int:49",
+ "SO_INCOMING_NAPI_ID": "int:56",
+ "SO_KEEPALIVE": "int:9",
+ "SO_LINGER": "int:13",
+ "SO_LOCK_FILTER": "int:44",
+ "SO_MARK": "int:36",
+ "SO_MAX_PACING_RATE": "int:47",
+ "SO_MEMINFO": "int:55",
+ "SO_NOFCS": "int:43",
+ "SO_NO_CHECK": "int:11",
+ "SO_OOBINLINE": "int:10",
+ "SO_PASSCRED": "int:16",
+ "SO_PASSSEC": "int:34",
+ "SO_PEEK_OFF": "int:42",
+ "SO_PEERCRED": "int:17",
+ "SO_PEERGROUPS": "int:59",
+ "SO_PEERNAME": "int:28",
+ "SO_PEERSEC": "int:31",
+ "SO_PRIORITY": "int:12",
+ "SO_PROTOCOL": "int:38",
+ "SO_RCVBUF": "int:8",
+ "SO_RCVBUFFORCE": "int:33",
+ "SO_RCVLOWAT": "int:18",
+ "SO_RCVTIMEO": "int:20",
+ "SO_REUSEADDR": "int:2",
+ "SO_REUSEPORT": "int:15",
+ "SO_RXQ_OVFL": "int:40",
+ "SO_SECURITY_AUTHENTICATION": "int:22",
+ "SO_SECURITY_ENCRYPTION_NETWORK": "int:24",
+ "SO_SECURITY_ENCRYPTION_TRANSPORT": "int:23",
+ "SO_SELECT_ERR_QUEUE": "int:45",
+ "SO_SNDBUF": "int:7",
+ "SO_SNDBUFFORCE": "int:32",
+ "SO_SNDLOWAT": "int:19",
+ "SO_SNDTIMEO": "int:21",
+ "SO_TIMESTAMP": "int:29",
+ "SO_TIMESTAMPING": "int:37",
+ "SO_TIMESTAMPNS": "int:35",
+ "SO_TYPE": "int:3",
+ "SO_WIFI_STATUS": "int:41",
+ "SO_ZEROCOPY": "int:60",
+ "SYS_ACCEPT": "int:43",
+ "SYS_ACCEPT4": "int:288",
+ "SYS_ACCESS": "int:21",
+ "SYS_ACCT": "int:163",
+ "SYS_ADD_KEY": "int:248",
+ "SYS_ADJTIMEX": "int:159",
+ "SYS_AFS_SYSCALL": "int:183",
+ "SYS_ALARM": "int:37",
+ "SYS_ARCH_PRCTL": "int:158",
+ "SYS_BIND": "int:49",
+ "SYS_BPF": "int:321",
+ "SYS_BRK": "int:12",
+ "SYS_CAPGET": "int:125",
+ "SYS_CAPSET": "int:126",
+ "SYS_CHDIR": "int:80",
+ "SYS_CHMOD": "int:90",
+ "SYS_CHOWN": "int:92",
+ "SYS_CHROOT": "int:161",
+ "SYS_CLOCK_ADJTIME": "int:305",
+ "SYS_CLOCK_GETRES": "int:229",
+ "SYS_CLOCK_GETTIME": "int:228",
+ "SYS_CLOCK_NANOSLEEP": "int:230",
+ "SYS_CLOCK_SETTIME": "int:227",
+ "SYS_CLONE": "int:56",
+ "SYS_CLOSE": "int:3",
+ "SYS_CONNECT": "int:42",
+ "SYS_COPY_FILE_RANGE": "int:326",
+ "SYS_CREAT": "int:85",
+ "SYS_CREATE_MODULE": "int:174",
+ "SYS_DELETE_MODULE": "int:176",
+ "SYS_DUP": "int:32",
+ "SYS_DUP2": "int:33",
+ "SYS_DUP3": "int:292",
+ "SYS_EPOLL_CREATE": "int:213",
+ "SYS_EPOLL_CREATE1": "int:291",
+ "SYS_EPOLL_CTL": "int:233",
+ "SYS_EPOLL_CTL_OLD": "int:214",
+ "SYS_EPOLL_PWAIT": "int:281",
+ "SYS_EPOLL_WAIT": "int:232",
+ "SYS_EPOLL_WAIT_OLD": "int:215",
+ "SYS_EVENTFD": "int:284",
+ "SYS_EVENTFD2": "int:290",
+ "SYS_EXECVE": "int:59",
+ "SYS_EXECVEAT": "int:322",
+ "SYS_EXIT": "int:60",
+ "SYS_EXIT_GROUP": "int:231",
+ "SYS_FACCESSAT": "int:269",
+ "SYS_FADVISE64": "int:221",
+ "SYS_FALLOCATE": "int:285",
+ "SYS_FANOTIFY_INIT": "int:300",
+ "SYS_FANOTIFY_MARK": "int:301",
+ "SYS_FCHDIR": "int:81",
+ "SYS_FCHMOD": "int:91",
+ "SYS_FCHMODAT": "int:268",
+ "SYS_FCHOWN": "int:93",
+ "SYS_FCHOWNAT": "int:260",
+ "SYS_FCNTL": "int:72",
+ "SYS_FDATASYNC": "int:75",
+ "SYS_FGETXATTR": "int:193",
+ "SYS_FINIT_MODULE": "int:313",
+ "SYS_FLISTXATTR": "int:196",
+ "SYS_FLOCK": "int:73",
+ "SYS_FORK": "int:57",
+ "SYS_FREMOVEXATTR": "int:199",
+ "SYS_FSETXATTR": "int:190",
+ "SYS_FSTAT": "int:5",
+ "SYS_FSTATFS": "int:138",
+ "SYS_FSYNC": "int:74",
+ "SYS_FTRUNCATE": "int:77",
+ "SYS_FUTEX": "int:202",
+ "SYS_FUTIMESAT": "int:261",
+ "SYS_GETCPU": "int:309",
+ "SYS_GETCWD": "int:79",
+ "SYS_GETDENTS": "int:78",
+ "SYS_GETDENTS64": "int:217",
+ "SYS_GETEGID": "int:108",
+ "SYS_GETEUID": "int:107",
+ "SYS_GETGID": "int:104",
+ "SYS_GETGROUPS": "int:115",
+ "SYS_GETITIMER": "int:36",
+ "SYS_GETPEERNAME": "int:52",
+ "SYS_GETPGID": "int:121",
+ "SYS_GETPGRP": "int:111",
+ "SYS_GETPID": "int:39",
+ "SYS_GETPMSG": "int:181",
+ "SYS_GETPPID": "int:110",
+ "SYS_GETPRIORITY": "int:140",
+ "SYS_GETRANDOM": "int:318",
+ "SYS_GETRESGID": "int:120",
+ "SYS_GETRESUID": "int:118",
+ "SYS_GETRLIMIT": "int:97",
+ "SYS_GETRUSAGE": "int:98",
+ "SYS_GETSID": "int:124",
+ "SYS_GETSOCKNAME": "int:51",
+ "SYS_GETSOCKOPT": "int:55",
+ "SYS_GETTID": "int:186",
+ "SYS_GETTIMEOFDAY": "int:96",
+ "SYS_GETUID": "int:102",
+ "SYS_GETXATTR": "int:191",
+ "SYS_GET_KERNEL_SYMS": "int:177",
+ "SYS_GET_MEMPOLICY": "int:239",
+ "SYS_GET_ROBUST_LIST": "int:274",
+ "SYS_GET_THREAD_AREA": "int:211",
+ "SYS_INIT_MODULE": "int:175",
+ "SYS_INOTIFY_ADD_WATCH": "int:254",
+ "SYS_INOTIFY_INIT": "int:253",
+ "SYS_INOTIFY_INIT1": "int:294",
+ "SYS_INOTIFY_RM_WATCH": "int:255",
+ "SYS_IOCTL": "int:16",
+ "SYS_IOPERM": "int:173",
+ "SYS_IOPL": "int:172",
+ "SYS_IOPRIO_GET": "int:252",
+ "SYS_IOPRIO_SET": "int:251",
+ "SYS_IO_CANCEL": "int:210",
+ "SYS_IO_DESTROY": "int:207",
+ "SYS_IO_GETEVENTS": "int:208",
+ "SYS_IO_SETUP": "int:206",
+ "SYS_IO_SUBMIT": "int:209",
+ "SYS_KCMP": "int:312",
+ "SYS_KEXEC_FILE_LOAD": "int:320",
+ "SYS_KEXEC_LOAD": "int:246",
+ "SYS_KEYCTL": "int:250",
+ "SYS_KILL": "int:62",
+ "SYS_LCHOWN": "int:94",
+ "SYS_LGETXATTR": "int:192",
+ "SYS_LINK": "int:86",
+ "SYS_LINKAT": "int:265",
+ "SYS_LISTEN": "int:50",
+ "SYS_LISTXATTR": "int:194",
+ "SYS_LLISTXATTR": "int:195",
+ "SYS_LOOKUP_DCOOKIE": "int:212",
+ "SYS_LREMOVEXATTR": "int:198",
+ "SYS_LSEEK": "int:8",
+ "SYS_LSETXATTR": "int:189",
+ "SYS_LSTAT": "int:6",
+ "SYS_MADVISE": "int:28",
+ "SYS_MBIND": "int:237",
+ "SYS_MEMBARRIER": "int:324",
+ "SYS_MEMFD_CREATE": "int:319",
+ "SYS_MIGRATE_PAGES": "int:256",
+ "SYS_MINCORE": "int:27",
+ "SYS_MKDIR": "int:83",
+ "SYS_MKDIRAT": "int:258",
+ "SYS_MKNOD": "int:133",
+ "SYS_MKNODAT": "int:259",
+ "SYS_MLOCK": "int:149",
+ "SYS_MLOCK2": "int:325",
+ "SYS_MLOCKALL": "int:151",
+ "SYS_MMAP": "int:9",
+ "SYS_MODIFY_LDT": "int:154",
+ "SYS_MOUNT": "int:165",
+ "SYS_MOVE_PAGES": "int:279",
+ "SYS_MPROTECT": "int:10",
+ "SYS_MQ_GETSETATTR": "int:245",
+ "SYS_MQ_NOTIFY": "int:244",
+ "SYS_MQ_OPEN": "int:240",
+ "SYS_MQ_TIMEDRECEIVE": "int:243",
+ "SYS_MQ_TIMEDSEND": "int:242",
+ "SYS_MQ_UNLINK": "int:241",
+ "SYS_MREMAP": "int:25",
+ "SYS_MSGCTL": "int:71",
+ "SYS_MSGGET": "int:68",
+ "SYS_MSGRCV": "int:70",
+ "SYS_MSGSND": "int:69",
+ "SYS_MSYNC": "int:26",
+ "SYS_MUNLOCK": "int:150",
+ "SYS_MUNLOCKALL": "int:152",
+ "SYS_MUNMAP": "int:11",
+ "SYS_NAME_TO_HANDLE_AT": "int:303",
+ "SYS_NANOSLEEP": "int:35",
+ "SYS_NEWFSTATAT": "int:262",
+ "SYS_NFSSERVCTL": "int:180",
+ "SYS_NMLN": "int:65",
+ "SYS_OPEN": "int:2",
+ "SYS_OPENAT": "int:257",
+ "SYS_OPEN_BY_HANDLE_AT": "int:304",
+ "SYS_PAUSE": "int:34",
+ "SYS_PERF_EVENT_OPEN": "int:298",
+ "SYS_PERSONALITY": "int:135",
+ "SYS_PIPE": "int:22",
+ "SYS_PIPE2": "int:293",
+ "SYS_PIVOT_ROOT": "int:155",
+ "SYS_PKEY_ALLOC": "int:330",
+ "SYS_PKEY_FREE": "int:331",
+ "SYS_PKEY_MPROTECT": "int:329",
+ "SYS_POLL": "int:7",
+ "SYS_PPOLL": "int:271",
+ "SYS_PRCTL": "int:157",
+ "SYS_PREAD64": "int:17",
+ "SYS_PREADV": "int:295",
+ "SYS_PREADV2": "int:327",
+ "SYS_PRLIMIT64": "int:302",
+ "SYS_PROCESS_VM_READV": "int:310",
+ "SYS_PROCESS_VM_WRITEV": "int:311",
+ "SYS_PSELECT6": "int:270",
+ "SYS_PTRACE": "int:101",
+ "SYS_PUTPMSG": "int:182",
+ "SYS_PWRITE64": "int:18",
+ "SYS_PWRITEV": "int:296",
+ "SYS_PWRITEV2": "int:328",
+ "SYS_QUERY_MODULE": "int:178",
+ "SYS_QUOTACTL": "int:179",
+ "SYS_READ": "int:0",
+ "SYS_READAHEAD": "int:187",
+ "SYS_READLINK": "int:89",
+ "SYS_READLINKAT": "int:267",
+ "SYS_READV": "int:19",
+ "SYS_REBOOT": "int:169",
+ "SYS_RECVFROM": "int:45",
+ "SYS_RECVMMSG": "int:299",
+ "SYS_RECVMSG": "int:47",
+ "SYS_REMAP_FILE_PAGES": "int:216",
+ "SYS_REMOVEXATTR": "int:197",
+ "SYS_RENAME": "int:82",
+ "SYS_RENAMEAT": "int:264",
+ "SYS_RENAMEAT2": "int:316",
+ "SYS_REQUEST_KEY": "int:249",
+ "SYS_RESTART_SYSCALL": "int:219",
+ "SYS_RMDIR": "int:84",
+ "SYS_RT_SIGACTION": "int:13",
+ "SYS_RT_SIGPENDING": "int:127",
+ "SYS_RT_SIGPROCMASK": "int:14",
+ "SYS_RT_SIGQUEUEINFO": "int:129",
+ "SYS_RT_SIGRETURN": "int:15",
+ "SYS_RT_SIGSUSPEND": "int:130",
+ "SYS_RT_SIGTIMEDWAIT": "int:128",
+ "SYS_RT_TGSIGQUEUEINFO": "int:297",
+ "SYS_SCHED_GETAFFINITY": "int:204",
+ "SYS_SCHED_GETATTR": "int:315",
+ "SYS_SCHED_GETPARAM": "int:143",
+ "SYS_SCHED_GETSCHEDULER": "int:145",
+ "SYS_SCHED_GET_PRIORITY_MAX": "int:146",
+ "SYS_SCHED_GET_PRIORITY_MIN": "int:147",
+ "SYS_SCHED_RR_GET_INTERVAL": "int:148",
+ "SYS_SCHED_SETAFFINITY": "int:203",
+ "SYS_SCHED_SETATTR": "int:314",
+ "SYS_SCHED_SETPARAM": "int:142",
+ "SYS_SCHED_SETSCHEDULER": "int:144",
+ "SYS_SCHED_YIELD": "int:24",
+ "SYS_SECCOMP": "int:317",
+ "SYS_SECURITY": "int:185",
+ "SYS_SELECT": "int:23",
+ "SYS_SEMCTL": "int:66",
+ "SYS_SEMGET": "int:64",
+ "SYS_SEMOP": "int:65",
+ "SYS_SEMTIMEDOP": "int:220",
+ "SYS_SENDFILE": "int:40",
+ "SYS_SENDMMSG": "int:307",
+ "SYS_SENDMSG": "int:46",
+ "SYS_SENDTO": "int:44",
+ "SYS_SETDOMAINNAME": "int:171",
+ "SYS_SETFSGID": "int:123",
+ "SYS_SETFSUID": "int:122",
+ "SYS_SETGID": "int:106",
+ "SYS_SETGROUPS": "int:116",
+ "SYS_SETHOSTNAME": "int:170",
+ "SYS_SETITIMER": "int:38",
+ "SYS_SETNS": "int:308",
+ "SYS_SETPGID": "int:109",
+ "SYS_SETPRIORITY": "int:141",
+ "SYS_SETREGID": "int:114",
+ "SYS_SETRESGID": "int:119",
+ "SYS_SETRESUID": "int:117",
+ "SYS_SETREUID": "int:113",
+ "SYS_SETRLIMIT": "int:160",
+ "SYS_SETSID": "int:112",
+ "SYS_SETSOCKOPT": "int:54",
+ "SYS_SETTIMEOFDAY": "int:164",
+ "SYS_SETUID": "int:105",
+ "SYS_SETXATTR": "int:188",
+ "SYS_SET_MEMPOLICY": "int:238",
+ "SYS_SET_ROBUST_LIST": "int:273",
+ "SYS_SET_THREAD_AREA": "int:205",
+ "SYS_SET_TID_ADDRESS": "int:218",
+ "SYS_SHMAT": "int:30",
+ "SYS_SHMCTL": "int:31",
+ "SYS_SHMDT": "int:67",
+ "SYS_SHMGET": "int:29",
+ "SYS_SHUTDOWN": "int:48",
+ "SYS_SIGALTSTACK": "int:131",
+ "SYS_SIGNALFD": "int:282",
+ "SYS_SIGNALFD4": "int:289",
+ "SYS_SOCKET": "int:41",
+ "SYS_SOCKETPAIR": "int:53",
+ "SYS_SPLICE": "int:275",
+ "SYS_STAT": "int:4",
+ "SYS_STATFS": "int:137",
+ "SYS_STATX": "int:332",
+ "SYS_SWAPOFF": "int:168",
+ "SYS_SWAPON": "int:167",
+ "SYS_SYMLINK": "int:88",
+ "SYS_SYMLINKAT": "int:266",
+ "SYS_SYNC": "int:162",
+ "SYS_SYNCFS": "int:306",
+ "SYS_SYNC_FILE_RANGE": "int:277",
+ "SYS_SYSFS": "int:139",
+ "SYS_SYSINFO": "int:99",
+ "SYS_SYSLOG": "int:103",
+ "SYS_TEE": "int:276",
+ "SYS_TGKILL": "int:234",
+ "SYS_TIME": "int:201",
+ "SYS_TIMERFD_CREATE": "int:283",
+ "SYS_TIMERFD_GETTIME": "int:287",
+ "SYS_TIMERFD_SETTIME": "int:286",
+ "SYS_TIMER_CREATE": "int:222",
+ "SYS_TIMER_DELETE": "int:226",
+ "SYS_TIMER_GETOVERRUN": "int:225",
+ "SYS_TIMER_GETTIME": "int:224",
+ "SYS_TIMER_SETTIME": "int:223",
+ "SYS_TIMES": "int:100",
+ "SYS_TKILL": "int:200",
+ "SYS_TRUNCATE": "int:76",
+ "SYS_TUXCALL": "int:184",
+ "SYS_UMASK": "int:95",
+ "SYS_UMOUNT2": "int:166",
+ "SYS_UNAME": "int:63",
+ "SYS_UNLINK": "int:87",
+ "SYS_UNLINKAT": "int:263",
+ "SYS_UNSHARE": "int:272",
+ "SYS_USELIB": "int:134",
+ "SYS_USERFAULTFD": "int:323",
+ "SYS_USTAT": "int:136",
+ "SYS_UTIME": "int:132",
+ "SYS_UTIMENSAT": "int:280",
+ "SYS_UTIMES": "int:235",
+ "SYS_VFORK": "int:58",
+ "SYS_VHANGUP": "int:153",
+ "SYS_VMSPLICE": "int:278",
+ "SYS_VSERVER": "int:236",
+ "SYS_WAIT4": "int:61",
+ "SYS_WAITID": "int:247",
+ "SYS_WRITE": "int:1",
+ "SYS_WRITEV": "int:20",
+ "SYS__SYSCTL": "int:156",
+ "S_BLKSIZE": "int:512",
+ "S_IEXEC": "int:64",
+ "S_IFBLK": "int:24576",
+ "S_IFCHR": "int:8192",
+ "S_IFDIR": "int:16384",
+ "S_IFIFO": "int:4096",
+ "S_IFLNK": "int:40960",
+ "S_IFMT": "int:61440",
+ "S_IFREG": "int:32768",
+ "S_IFSOCK": "int:49152",
+ "S_IREAD": "int:256",
+ "S_IRGRP": "int:32",
+ "S_IROTH": "int:4",
+ "S_IRUSR": "int:256",
+ "S_IRWXG": "int:56",
+ "S_IRWXO": "int:7",
+ "S_IRWXU": "int:448",
+ "S_ISGID": "int:1024",
+ "S_ISUID": "int:2048",
+ "S_ISVTX": "int:512",
+ "S_IWGRP": "int:16",
+ "S_IWOTH": "int:2",
+ "S_IWRITE": "int:128",
+ "S_IWUSR": "int:128",
+ "S_IXGRP": "int:8",
+ "S_IXOTH": "int:1",
+ "S_IXUSR": "int:64",
+ "SizeofCmsghdr": "int:16",
+ "SizeofICMPv6Filter": "int:32",
+ "SizeofIPMreq": "int:8",
+ "SizeofIPMreqn": "int:12",
+ "SizeofIPv6MTUInfo": "int:32",
+ "SizeofIPv6Mreq": "int:20",
+ "SizeofIfAddrmsg": "int:8",
+ "SizeofIfInfomsg": "int:16",
+ "SizeofInet4Pktinfo": "int:12",
+ "SizeofInet6Pktinfo": "int:20",
+ "SizeofInotifyEvent": "int:16",
+ "SizeofLinger": "int:8",
+ "SizeofMsghdr": "int:56",
+ "SizeofNlAttr": "int:4",
+ "SizeofNlMsgerr": "int:20",
+ "SizeofNlMsghdr": "int:16",
+ "SizeofRtAttr": "int:4",
+ "SizeofRtGenmsg": "int:1",
+ "SizeofRtMsg": "int:12",
+ "SizeofRtNexthop": "int:8",
+ "SizeofSockFilter": "int:8",
+ "SizeofSockFprog": "int:16",
+ "SizeofSockaddrAny": "int:108",
+ "SizeofSockaddrInet4": "int:16",
+ "SizeofSockaddrInet6": "int:28",
+ "SizeofSockaddrLinklayer": "int:20",
+ "SizeofSockaddrNetlink": "int:12",
+ "SizeofSockaddrUnix": "int:110",
+ "SizeofUcred": "int:12",
+ "TABDLY": "int:6144",
+ "TCGETA": "int:21509",
+ "TCGETS": "int:21505",
+ "TCGETX": "int:21554",
+ "TCIFLUSH": "int:0",
+ "TCIOFF": "int:2",
+ "TCIOFLUSH": "int:2",
+ "TCION": "int:3",
+ "TCOFLUSH": "int:1",
+ "TCOOFF": "int:0",
+ "TCOON": "int:1",
+ "TCP_CA_CWR": "int:2",
+ "TCP_CA_Disorder": "int:1",
+ "TCP_CA_Loss": "int:4",
+ "TCP_CA_Open": "int:0",
+ "TCP_CA_Recovery": "int:3",
+ "TCP_CC_INFO": "int:26",
+ "TCP_CLOSE": "int:7",
+ "TCP_CLOSE_WAIT": "int:8",
+ "TCP_CLOSING": "int:11",
+ "TCP_CONGESTION": "int:13",
+ "TCP_COOKIE_IN_ALWAYS": "int:1",
+ "TCP_COOKIE_MAX": "int:16",
+ "TCP_COOKIE_MIN": "int:8",
+ "TCP_COOKIE_OUT_NEVER": "int:2",
+ "TCP_COOKIE_PAIR_SIZE": "int:32",
+ "TCP_COOKIE_TRANSACTIONS": "int:15",
+ "TCP_CORK": "int:3",
+ "TCP_DEFER_ACCEPT": "int:9",
+ "TCP_ESTABLISHED": "int:1",
+ "TCP_FASTOPEN": "int:23",
+ "TCP_FASTOPEN_CONNECT": "int:30",
+ "TCP_FIN_WAIT1": "int:4",
+ "TCP_FIN_WAIT2": "int:5",
+ "TCP_INFO": "int:11",
+ "TCP_KEEPCNT": "int:6",
+ "TCP_KEEPIDLE": "int:4",
+ "TCP_KEEPINTVL": "int:5",
+ "TCP_LAST_ACK": "int:9",
+ "TCP_LINGER2": "int:8",
+ "TCP_LISTEN": "int:10",
+ "TCP_MAXSEG": "int:2",
+ "TCP_MAXWIN": "int:65535",
+ "TCP_MAX_WINSHIFT": "int:14",
+ "TCP_MD5SIG": "int:14",
+ "TCP_MD5SIG_EXT": "int:32",
+ "TCP_MD5SIG_FLAG_PREFIX": "int:1",
+ "TCP_MD5SIG_MAXKEYLEN": "int:80",
+ "TCP_MSS": "int:512",
+ "TCP_MSS_DEFAULT": "int:536",
+ "TCP_MSS_DESIRED": "int:1220",
+ "TCP_NODELAY": "int:1",
+ "TCP_NOTSENT_LOWAT": "int:25",
+ "TCP_NO_QUEUE": "int:0",
+ "TCP_QUEUES_NR": "int:3",
+ "TCP_QUEUE_SEQ": "int:21",
+ "TCP_QUICKACK": "int:12",
+ "TCP_RECV_QUEUE": "int:1",
+ "TCP_REPAIR": "int:19",
+ "TCP_REPAIR_OPTIONS": "int:22",
+ "TCP_REPAIR_QUEUE": "int:20",
+ "TCP_REPAIR_WINDOW": "int:29",
+ "TCP_SAVED_SYN": "int:28",
+ "TCP_SAVE_SYN": "int:27",
+ "TCP_SEND_QUEUE": "int:2",
+ "TCP_SYNCNT": "int:7",
+ "TCP_SYN_RECV": "int:3",
+ "TCP_SYN_SENT": "int:2",
+ "TCP_S_DATA_IN": "int:4",
+ "TCP_S_DATA_OUT": "int:8",
+ "TCP_THIN_DUPACK": "int:17",
+ "TCP_THIN_LINEAR_TIMEOUTS": "int:16",
+ "TCP_TIMESTAMP": "int:24",
+ "TCP_TIME_WAIT": "int:6",
+ "TCP_ULP": "int:31",
+ "TCP_USER_TIMEOUT": "int:18",
+ "TCP_WINDOW_CLAMP": "int:10",
+ "TCSADRAIN": "int:1",
+ "TCSAFLUSH": "int:2",
+ "TCSANOW": "int:0",
+ "TCSETA": "int:21510",
+ "TCSETAF": "int:21512",
+ "TCSETAW": "int:21511",
+ "TCSETS": "int:21506",
+ "TCSETSF": "int:21508",
+ "TCSETSW": "int:21507",
+ "TCSETX": "int:21555",
+ "TCSETXF": "int:21556",
+ "TCSETXW": "int:21557",
+ "TIOCCBRK": "int:21544",
+ "TIOCCONS": "int:21533",
+ "TIOCEXCL": "int:21516",
+ "TIOCGDEV": "int:2147767346",
+ "TIOCGETD": "int:21540",
+ "TIOCGICOUNT": "int:21597",
+ "TIOCGLCKTRMIOS": "int:21590",
+ "TIOCGPGRP": "int:21519",
+ "TIOCGPTN": "int:2147767344",
+ "TIOCGRS485": "int:21550",
+ "TIOCGSERIAL": "int:21534",
+ "TIOCGSID": "int:21545",
+ "TIOCGSOFTCAR": "int:21529",
+ "TIOCGWINSZ": "int:21523",
+ "TIOCINQ": "int:21531",
+ "TIOCLINUX": "int:21532",
+ "TIOCMBIC": "int:21527",
+ "TIOCMBIS": "int:21526",
+ "TIOCMGET": "int:21525",
+ "TIOCMIWAIT": "int:21596",
+ "TIOCMSET": "int:21528",
+ "TIOCM_CAR": "int:64",
+ "TIOCM_CD": "int:64",
+ "TIOCM_CTS": "int:32",
+ "TIOCM_DSR": "int:256",
+ "TIOCM_DTR": "int:2",
+ "TIOCM_LE": "int:1",
+ "TIOCM_RI": "int:128",
+ "TIOCM_RNG": "int:128",
+ "TIOCM_RTS": "int:4",
+ "TIOCM_SR": "int:16",
+ "TIOCM_ST": "int:8",
+ "TIOCNOTTY": "int:21538",
+ "TIOCNXCL": "int:21517",
+ "TIOCOUTQ": "int:21521",
+ "TIOCPKT": "int:21536",
+ "TIOCPKT_DATA": "int:0",
+ "TIOCPKT_DOSTOP": "int:32",
+ "TIOCPKT_FLUSHREAD": "int:1",
+ "TIOCPKT_FLUSHWRITE": "int:2",
+ "TIOCPKT_IOCTL": "int:64",
+ "TIOCPKT_NOSTOP": "int:16",
+ "TIOCPKT_START": "int:8",
+ "TIOCPKT_STOP": "int:4",
+ "TIOCSBRK": "int:21543",
+ "TIOCSCTTY": "int:21518",
+ "TIOCSERCONFIG": "int:21587",
+ "TIOCSERGETLSR": "int:21593",
+ "TIOCSERGETMULTI": "int:21594",
+ "TIOCSERGSTRUCT": "int:21592",
+ "TIOCSERGWILD": "int:21588",
+ "TIOCSERSETMULTI": "int:21595",
+ "TIOCSERSWILD": "int:21589",
+ "TIOCSER_TEMT": "int:1",
+ "TIOCSETD": "int:21539",
+ "TIOCSIG": "int:1074025526",
+ "TIOCSLCKTRMIOS": "int:21591",
+ "TIOCSPGRP": "int:21520",
+ "TIOCSPTLCK": "int:1074025521",
+ "TIOCSRS485": "int:21551",
+ "TIOCSSERIAL": "int:21535",
+ "TIOCSSOFTCAR": "int:21530",
+ "TIOCSTI": "int:21522",
+ "TIOCSWINSZ": "int:21524",
+ "TIOCVHANGUP": "int:21559",
+ "TOSTOP": "int:256",
+ "TUNATTACHFILTER": "int:1074812117",
+ "TUNDETACHFILTER": "int:1074812118",
+ "TUNGETFEATURES": "int:2147767503",
+ "TUNGETFILTER": "int:2148553947",
+ "TUNGETIFF": "int:2147767506",
+ "TUNGETSNDBUF": "int:2147767507",
+ "TUNGETVNETHDRSZ": "int:2147767511",
+ "TUNSETDEBUG": "int:1074025673",
+ "TUNSETGROUP": "int:1074025678",
+ "TUNSETIFF": "int:1074025674",
+ "TUNSETIFINDEX": "int:1074025690",
+ "TUNSETLINK": "int:1074025677",
+ "TUNSETNOCSUM": "int:1074025672",
+ "TUNSETOFFLOAD": "int:1074025680",
+ "TUNSETOWNER": "int:1074025676",
+ "TUNSETPERSIST": "int:1074025675",
+ "TUNSETQUEUE": "int:1074025689",
+ "TUNSETSNDBUF": "int:1074025684",
+ "TUNSETTXFILTER": "int:1074025681",
+ "TUNSETVNETHDRSZ": "int:1074025688",
+ "VDISCARD": "int:13",
+ "VEOF": "int:4",
+ "VEOL": "int:11",
+ "VEOL2": "int:16",
+ "VERASE": "int:2",
+ "VINTR": "int:0",
+ "VKILL": "int:3",
+ "VLNEXT": "int:15",
+ "VMIN": "int:6",
+ "VQUIT": "int:1",
+ "VREPRINT": "int:12",
+ "VSTART": "int:8",
+ "VSTOP": "int:9",
+ "VSUSP": "int:10",
+ "VTDLY": "int:16384",
+ "VTIME": "int:5",
+ "VWERASE": "int:14",
+ "WAIT_ANY": "int:-1",
+ "WAIT_MYPGRP": "int:0",
+ "WALL": "int:1073741824",
+ "WCHAR_MAX": "int:2147483647",
+ "WCHAR_MIN": "int:-2147483648",
+ "WCHAR_WIDTH": "int:32",
+ "WCONTINUED": "int:8",
+ "WCOREFLAG": "int:128",
+ "WEXITED": "int:4",
+ "WINT_MAX": "int:4294967295",
+ "WINT_MIN": "int:0",
+ "WINT_WIDTH": "int:32",
+ "WNOHANG": "int:1",
+ "WNOWAIT": "int:16777216",
+ "WORD_BIT": "int:32",
+ "WSTOPPED": "int:2",
+ "WUNTRACED": "int:2",
+ "W_OK": "int:2",
+ "XCASE": "int:4",
+ },
+ }
+}
+
+// --------------- proxy for syscall.Conn ---------------
+type P_syscall_Conn struct {
+ Object interface{}
+ SyscallConn_ func(interface{}) (syscall.RawConn, error)
+}
+func (P *P_syscall_Conn) SyscallConn() (syscall.RawConn, error) {
+ return P.SyscallConn_(P.Object)
+}
+
+// --------------- proxy for syscall.RawConn ---------------
+type P_syscall_RawConn struct {
+ Object interface{}
+ Control_ func(_proxy_obj_ interface{}, f func(fd uintptr)) error
+ Read_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+ Write_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+}
+func (P *P_syscall_RawConn) Control(f func(fd uintptr)) error {
+ return P.Control_(P.Object, f)
+}
+func (P *P_syscall_RawConn) Read(f func(fd uintptr) (done bool)) error {
+ return P.Read_(P.Object, f)
+}
+func (P *P_syscall_RawConn) Write(f func(fd uintptr) (done bool)) error {
+ return P.Write_(P.Object, f)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_arm64.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_arm64.go
new file mode 100644
index 0000000..57ad7fa
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/gccgo_syscall_linux_arm64.go
@@ -0,0 +1,5944 @@
+// +build gccgo
+
+// this file was generated by gomacro command: import _b "syscall"
+// DO NOT EDIT! Any change will be lost when the file is re-generated
+
+package syscall
+
+import (
+ . "reflect"
+ "syscall"
+)
+
+// reflection: allow interpreted code to import "syscall"
+func init() {
+ Packages["syscall"] = Package{
+ Binds: map[string]Value{
+ "AF_ALG": ValueOf(syscall.AF_ALG),
+ "AF_APPLETALK": ValueOf(syscall.AF_APPLETALK),
+ "AF_ASH": ValueOf(syscall.AF_ASH),
+ "AF_ATMPVC": ValueOf(syscall.AF_ATMPVC),
+ "AF_ATMSVC": ValueOf(syscall.AF_ATMSVC),
+ "AF_AX25": ValueOf(syscall.AF_AX25),
+ "AF_BLUETOOTH": ValueOf(syscall.AF_BLUETOOTH),
+ "AF_BRIDGE": ValueOf(syscall.AF_BRIDGE),
+ "AF_CAIF": ValueOf(syscall.AF_CAIF),
+ "AF_CAN": ValueOf(syscall.AF_CAN),
+ "AF_DECnet": ValueOf(syscall.AF_DECnet),
+ "AF_ECONET": ValueOf(syscall.AF_ECONET),
+ "AF_FILE": ValueOf(syscall.AF_FILE),
+ "AF_IB": ValueOf(syscall.AF_IB),
+ "AF_IEEE802154": ValueOf(syscall.AF_IEEE802154),
+ "AF_INET": ValueOf(syscall.AF_INET),
+ "AF_INET6": ValueOf(syscall.AF_INET6),
+ "AF_IPX": ValueOf(syscall.AF_IPX),
+ "AF_IRDA": ValueOf(syscall.AF_IRDA),
+ "AF_ISDN": ValueOf(syscall.AF_ISDN),
+ "AF_IUCV": ValueOf(syscall.AF_IUCV),
+ "AF_KCM": ValueOf(syscall.AF_KCM),
+ "AF_KEY": ValueOf(syscall.AF_KEY),
+ "AF_LLC": ValueOf(syscall.AF_LLC),
+ "AF_LOCAL": ValueOf(syscall.AF_LOCAL),
+ "AF_MAX": ValueOf(syscall.AF_MAX),
+ "AF_MPLS": ValueOf(syscall.AF_MPLS),
+ "AF_NETBEUI": ValueOf(syscall.AF_NETBEUI),
+ "AF_NETLINK": ValueOf(syscall.AF_NETLINK),
+ "AF_NETROM": ValueOf(syscall.AF_NETROM),
+ "AF_NFC": ValueOf(syscall.AF_NFC),
+ "AF_PACKET": ValueOf(syscall.AF_PACKET),
+ "AF_PHONET": ValueOf(syscall.AF_PHONET),
+ "AF_PPPOX": ValueOf(syscall.AF_PPPOX),
+ "AF_QIPCRTR": ValueOf(syscall.AF_QIPCRTR),
+ "AF_RDS": ValueOf(syscall.AF_RDS),
+ "AF_ROSE": ValueOf(syscall.AF_ROSE),
+ "AF_ROUTE": ValueOf(syscall.AF_ROUTE),
+ "AF_RXRPC": ValueOf(syscall.AF_RXRPC),
+ "AF_SECURITY": ValueOf(syscall.AF_SECURITY),
+ "AF_SMC": ValueOf(syscall.AF_SMC),
+ "AF_SNA": ValueOf(syscall.AF_SNA),
+ "AF_TIPC": ValueOf(syscall.AF_TIPC),
+ "AF_UNIX": ValueOf(syscall.AF_UNIX),
+ "AF_UNSPEC": ValueOf(syscall.AF_UNSPEC),
+ "AF_VSOCK": ValueOf(syscall.AF_VSOCK),
+ "AF_WANPIPE": ValueOf(syscall.AF_WANPIPE),
+ "AF_X25": ValueOf(syscall.AF_X25),
+ "AI_ADDRCONFIG": ValueOf(syscall.AI_ADDRCONFIG),
+ "AI_ALL": ValueOf(syscall.AI_ALL),
+ "AI_CANONIDN": ValueOf(syscall.AI_CANONIDN),
+ "AI_CANONNAME": ValueOf(syscall.AI_CANONNAME),
+ "AI_IDN": ValueOf(syscall.AI_IDN),
+ "AI_IDN_ALLOW_UNASSIGNED": ValueOf(syscall.AI_IDN_ALLOW_UNASSIGNED),
+ "AI_IDN_USE_STD3_ASCII_RULES": ValueOf(syscall.AI_IDN_USE_STD3_ASCII_RULES),
+ "AI_NUMERICHOST": ValueOf(syscall.AI_NUMERICHOST),
+ "AI_NUMERICSERV": ValueOf(syscall.AI_NUMERICSERV),
+ "AI_PASSIVE": ValueOf(syscall.AI_PASSIVE),
+ "AI_V4MAPPED": ValueOf(syscall.AI_V4MAPPED),
+ "ARCH": ValueOf(syscall.ARCH),
+ "ARPHRD_ADAPT": ValueOf(syscall.ARPHRD_ADAPT),
+ "ARPHRD_APPLETLK": ValueOf(syscall.ARPHRD_APPLETLK),
+ "ARPHRD_ARCNET": ValueOf(syscall.ARPHRD_ARCNET),
+ "ARPHRD_ASH": ValueOf(syscall.ARPHRD_ASH),
+ "ARPHRD_ATM": ValueOf(syscall.ARPHRD_ATM),
+ "ARPHRD_AX25": ValueOf(syscall.ARPHRD_AX25),
+ "ARPHRD_BIF": ValueOf(syscall.ARPHRD_BIF),
+ "ARPHRD_CHAOS": ValueOf(syscall.ARPHRD_CHAOS),
+ "ARPHRD_CISCO": ValueOf(syscall.ARPHRD_CISCO),
+ "ARPHRD_CSLIP": ValueOf(syscall.ARPHRD_CSLIP),
+ "ARPHRD_CSLIP6": ValueOf(syscall.ARPHRD_CSLIP6),
+ "ARPHRD_DDCMP": ValueOf(syscall.ARPHRD_DDCMP),
+ "ARPHRD_DLCI": ValueOf(syscall.ARPHRD_DLCI),
+ "ARPHRD_ECONET": ValueOf(syscall.ARPHRD_ECONET),
+ "ARPHRD_EETHER": ValueOf(syscall.ARPHRD_EETHER),
+ "ARPHRD_ETHER": ValueOf(syscall.ARPHRD_ETHER),
+ "ARPHRD_EUI64": ValueOf(syscall.ARPHRD_EUI64),
+ "ARPHRD_FCAL": ValueOf(syscall.ARPHRD_FCAL),
+ "ARPHRD_FCFABRIC": ValueOf(syscall.ARPHRD_FCFABRIC),
+ "ARPHRD_FCPL": ValueOf(syscall.ARPHRD_FCPL),
+ "ARPHRD_FCPP": ValueOf(syscall.ARPHRD_FCPP),
+ "ARPHRD_FDDI": ValueOf(syscall.ARPHRD_FDDI),
+ "ARPHRD_FRAD": ValueOf(syscall.ARPHRD_FRAD),
+ "ARPHRD_HDLC": ValueOf(syscall.ARPHRD_HDLC),
+ "ARPHRD_HIPPI": ValueOf(syscall.ARPHRD_HIPPI),
+ "ARPHRD_HWX25": ValueOf(syscall.ARPHRD_HWX25),
+ "ARPHRD_IEEE1394": ValueOf(syscall.ARPHRD_IEEE1394),
+ "ARPHRD_IEEE802": ValueOf(syscall.ARPHRD_IEEE802),
+ "ARPHRD_IEEE80211": ValueOf(syscall.ARPHRD_IEEE80211),
+ "ARPHRD_IEEE80211_PRISM": ValueOf(syscall.ARPHRD_IEEE80211_PRISM),
+ "ARPHRD_IEEE80211_RADIOTAP": ValueOf(syscall.ARPHRD_IEEE80211_RADIOTAP),
+ "ARPHRD_IEEE802154": ValueOf(syscall.ARPHRD_IEEE802154),
+ "ARPHRD_IEEE802154_PHY": ValueOf(syscall.ARPHRD_IEEE802154_PHY),
+ "ARPHRD_IEEE802_TR": ValueOf(syscall.ARPHRD_IEEE802_TR),
+ "ARPHRD_INFINIBAND": ValueOf(syscall.ARPHRD_INFINIBAND),
+ "ARPHRD_IPDDP": ValueOf(syscall.ARPHRD_IPDDP),
+ "ARPHRD_IPGRE": ValueOf(syscall.ARPHRD_IPGRE),
+ "ARPHRD_IRDA": ValueOf(syscall.ARPHRD_IRDA),
+ "ARPHRD_LAPB": ValueOf(syscall.ARPHRD_LAPB),
+ "ARPHRD_LOCALTLK": ValueOf(syscall.ARPHRD_LOCALTLK),
+ "ARPHRD_LOOPBACK": ValueOf(syscall.ARPHRD_LOOPBACK),
+ "ARPHRD_METRICOM": ValueOf(syscall.ARPHRD_METRICOM),
+ "ARPHRD_NETROM": ValueOf(syscall.ARPHRD_NETROM),
+ "ARPHRD_NONE": ValueOf(syscall.ARPHRD_NONE),
+ "ARPHRD_PIMREG": ValueOf(syscall.ARPHRD_PIMREG),
+ "ARPHRD_PPP": ValueOf(syscall.ARPHRD_PPP),
+ "ARPHRD_PRONET": ValueOf(syscall.ARPHRD_PRONET),
+ "ARPHRD_RAWHDLC": ValueOf(syscall.ARPHRD_RAWHDLC),
+ "ARPHRD_RAWIP": ValueOf(syscall.ARPHRD_RAWIP),
+ "ARPHRD_ROSE": ValueOf(syscall.ARPHRD_ROSE),
+ "ARPHRD_RSRVD": ValueOf(syscall.ARPHRD_RSRVD),
+ "ARPHRD_SIT": ValueOf(syscall.ARPHRD_SIT),
+ "ARPHRD_SKIP": ValueOf(syscall.ARPHRD_SKIP),
+ "ARPHRD_SLIP": ValueOf(syscall.ARPHRD_SLIP),
+ "ARPHRD_SLIP6": ValueOf(syscall.ARPHRD_SLIP6),
+ "ARPHRD_TUNNEL": ValueOf(syscall.ARPHRD_TUNNEL),
+ "ARPHRD_TUNNEL6": ValueOf(syscall.ARPHRD_TUNNEL6),
+ "ARPHRD_VOID": ValueOf(syscall.ARPHRD_VOID),
+ "ARPHRD_X25": ValueOf(syscall.ARPHRD_X25),
+ "Accept": ValueOf(syscall.Accept),
+ "Accept4": ValueOf(syscall.Accept4),
+ "Access": ValueOf(syscall.Access),
+ "Acct": ValueOf(syscall.Acct),
+ "Adjtimex": ValueOf(syscall.Adjtimex),
+ "AttachLsf": ValueOf(syscall.AttachLsf),
+ "B0": ValueOf(syscall.B0),
+ "B1000000": ValueOf(syscall.B1000000),
+ "B110": ValueOf(syscall.B110),
+ "B115200": ValueOf(syscall.B115200),
+ "B1152000": ValueOf(syscall.B1152000),
+ "B1200": ValueOf(syscall.B1200),
+ "B134": ValueOf(syscall.B134),
+ "B150": ValueOf(syscall.B150),
+ "B1500000": ValueOf(syscall.B1500000),
+ "B1800": ValueOf(syscall.B1800),
+ "B19200": ValueOf(syscall.B19200),
+ "B200": ValueOf(syscall.B200),
+ "B2000000": ValueOf(syscall.B2000000),
+ "B230400": ValueOf(syscall.B230400),
+ "B2400": ValueOf(syscall.B2400),
+ "B2500000": ValueOf(syscall.B2500000),
+ "B300": ValueOf(syscall.B300),
+ "B3000000": ValueOf(syscall.B3000000),
+ "B3500000": ValueOf(syscall.B3500000),
+ "B38400": ValueOf(syscall.B38400),
+ "B4000000": ValueOf(syscall.B4000000),
+ "B460800": ValueOf(syscall.B460800),
+ "B4800": ValueOf(syscall.B4800),
+ "B50": ValueOf(syscall.B50),
+ "B500000": ValueOf(syscall.B500000),
+ "B57600": ValueOf(syscall.B57600),
+ "B576000": ValueOf(syscall.B576000),
+ "B600": ValueOf(syscall.B600),
+ "B75": ValueOf(syscall.B75),
+ "B921600": ValueOf(syscall.B921600),
+ "B9600": ValueOf(syscall.B9600),
+ "BPF_A": ValueOf(syscall.BPF_A),
+ "BPF_ABS": ValueOf(syscall.BPF_ABS),
+ "BPF_ADD": ValueOf(syscall.BPF_ADD),
+ "BPF_ALU": ValueOf(syscall.BPF_ALU),
+ "BPF_AND": ValueOf(syscall.BPF_AND),
+ "BPF_B": ValueOf(syscall.BPF_B),
+ "BPF_DIV": ValueOf(syscall.BPF_DIV),
+ "BPF_H": ValueOf(syscall.BPF_H),
+ "BPF_IMM": ValueOf(syscall.BPF_IMM),
+ "BPF_IND": ValueOf(syscall.BPF_IND),
+ "BPF_JA": ValueOf(syscall.BPF_JA),
+ "BPF_JEQ": ValueOf(syscall.BPF_JEQ),
+ "BPF_JGE": ValueOf(syscall.BPF_JGE),
+ "BPF_JGT": ValueOf(syscall.BPF_JGT),
+ "BPF_JMP": ValueOf(syscall.BPF_JMP),
+ "BPF_JSET": ValueOf(syscall.BPF_JSET),
+ "BPF_K": ValueOf(syscall.BPF_K),
+ "BPF_LD": ValueOf(syscall.BPF_LD),
+ "BPF_LDX": ValueOf(syscall.BPF_LDX),
+ "BPF_LEN": ValueOf(syscall.BPF_LEN),
+ "BPF_LL_OFF": ValueOf(syscall.BPF_LL_OFF),
+ "BPF_LSH": ValueOf(syscall.BPF_LSH),
+ "BPF_MAJOR_VERSION": ValueOf(syscall.BPF_MAJOR_VERSION),
+ "BPF_MAXINSNS": ValueOf(syscall.BPF_MAXINSNS),
+ "BPF_MEM": ValueOf(syscall.BPF_MEM),
+ "BPF_MEMWORDS": ValueOf(syscall.BPF_MEMWORDS),
+ "BPF_MINOR_VERSION": ValueOf(syscall.BPF_MINOR_VERSION),
+ "BPF_MISC": ValueOf(syscall.BPF_MISC),
+ "BPF_MOD": ValueOf(syscall.BPF_MOD),
+ "BPF_MSH": ValueOf(syscall.BPF_MSH),
+ "BPF_MUL": ValueOf(syscall.BPF_MUL),
+ "BPF_NEG": ValueOf(syscall.BPF_NEG),
+ "BPF_NET_OFF": ValueOf(syscall.BPF_NET_OFF),
+ "BPF_OR": ValueOf(syscall.BPF_OR),
+ "BPF_RET": ValueOf(syscall.BPF_RET),
+ "BPF_RSH": ValueOf(syscall.BPF_RSH),
+ "BPF_ST": ValueOf(syscall.BPF_ST),
+ "BPF_STX": ValueOf(syscall.BPF_STX),
+ "BPF_SUB": ValueOf(syscall.BPF_SUB),
+ "BPF_TAX": ValueOf(syscall.BPF_TAX),
+ "BPF_TXA": ValueOf(syscall.BPF_TXA),
+ "BPF_W": ValueOf(syscall.BPF_W),
+ "BPF_X": ValueOf(syscall.BPF_X),
+ "BPF_XOR": ValueOf(syscall.BPF_XOR),
+ "BRKINT": ValueOf(syscall.BRKINT),
+ "BSDLY": ValueOf(syscall.BSDLY),
+ "Bind": ValueOf(syscall.Bind),
+ "BindToDevice": ValueOf(syscall.BindToDevice),
+ "BytePtrFromString": ValueOf(syscall.BytePtrFromString),
+ "ByteSliceFromString": ValueOf(syscall.ByteSliceFromString),
+ "CBAUD": ValueOf(syscall.CBAUD),
+ "CBAUDEX": ValueOf(syscall.CBAUDEX),
+ "CIBAUD": ValueOf(syscall.CIBAUD),
+ "CLOCAL": ValueOf(syscall.CLOCAL),
+ "CLONE_CHILD_CLEARTID": ValueOf(syscall.CLONE_CHILD_CLEARTID),
+ "CLONE_CHILD_SETTID": ValueOf(syscall.CLONE_CHILD_SETTID),
+ "CLONE_DETACHED": ValueOf(syscall.CLONE_DETACHED),
+ "CLONE_FILES": ValueOf(syscall.CLONE_FILES),
+ "CLONE_FS": ValueOf(syscall.CLONE_FS),
+ "CLONE_IO": ValueOf(uint32(syscall.CLONE_IO)),
+ "CLONE_NEWCGROUP": ValueOf(syscall.CLONE_NEWCGROUP),
+ "CLONE_NEWIPC": ValueOf(syscall.CLONE_NEWIPC),
+ "CLONE_NEWNET": ValueOf(syscall.CLONE_NEWNET),
+ "CLONE_NEWNS": ValueOf(syscall.CLONE_NEWNS),
+ "CLONE_NEWPID": ValueOf(syscall.CLONE_NEWPID),
+ "CLONE_NEWUSER": ValueOf(syscall.CLONE_NEWUSER),
+ "CLONE_NEWUTS": ValueOf(syscall.CLONE_NEWUTS),
+ "CLONE_PARENT": ValueOf(syscall.CLONE_PARENT),
+ "CLONE_PARENT_SETTID": ValueOf(syscall.CLONE_PARENT_SETTID),
+ "CLONE_PTRACE": ValueOf(syscall.CLONE_PTRACE),
+ "CLONE_SETTLS": ValueOf(syscall.CLONE_SETTLS),
+ "CLONE_SIGHAND": ValueOf(syscall.CLONE_SIGHAND),
+ "CLONE_SYSVSEM": ValueOf(syscall.CLONE_SYSVSEM),
+ "CLONE_THREAD": ValueOf(syscall.CLONE_THREAD),
+ "CLONE_UNTRACED": ValueOf(syscall.CLONE_UNTRACED),
+ "CLONE_VFORK": ValueOf(syscall.CLONE_VFORK),
+ "CLONE_VM": ValueOf(syscall.CLONE_VM),
+ "CMSPAR": ValueOf(syscall.CMSPAR),
+ "CR0": ValueOf(syscall.CR0),
+ "CR1": ValueOf(syscall.CR1),
+ "CR2": ValueOf(syscall.CR2),
+ "CR3": ValueOf(syscall.CR3),
+ "CRDLY": ValueOf(syscall.CRDLY),
+ "CREAD": ValueOf(syscall.CREAD),
+ "CRTSCTS": ValueOf(uint32(syscall.CRTSCTS)),
+ "CS5": ValueOf(syscall.CS5),
+ "CS6": ValueOf(syscall.CS6),
+ "CS7": ValueOf(syscall.CS7),
+ "CS8": ValueOf(syscall.CS8),
+ "CSIZE": ValueOf(syscall.CSIZE),
+ "CSTOPB": ValueOf(syscall.CSTOPB),
+ "Cgocall": ValueOf(syscall.Cgocall),
+ "CgocallBack": ValueOf(syscall.CgocallBack),
+ "CgocallBackDone": ValueOf(syscall.CgocallBackDone),
+ "CgocallDone": ValueOf(syscall.CgocallDone),
+ "Chdir": ValueOf(syscall.Chdir),
+ "Chmod": ValueOf(syscall.Chmod),
+ "Chown": ValueOf(syscall.Chown),
+ "Chroot": ValueOf(syscall.Chroot),
+ "Clearenv": ValueOf(syscall.Clearenv),
+ "Close": ValueOf(syscall.Close),
+ "CloseOnExec": ValueOf(syscall.CloseOnExec),
+ "CmsgLen": ValueOf(syscall.CmsgLen),
+ "CmsgSpace": ValueOf(syscall.CmsgSpace),
+ "Connect": ValueOf(syscall.Connect),
+ "Creat": ValueOf(syscall.Creat),
+ "DT_BLK": ValueOf(syscall.DT_BLK),
+ "DT_CHR": ValueOf(syscall.DT_CHR),
+ "DT_DIR": ValueOf(syscall.DT_DIR),
+ "DT_FIFO": ValueOf(syscall.DT_FIFO),
+ "DT_LNK": ValueOf(syscall.DT_LNK),
+ "DT_REG": ValueOf(syscall.DT_REG),
+ "DT_SOCK": ValueOf(syscall.DT_SOCK),
+ "DT_UNKNOWN": ValueOf(syscall.DT_UNKNOWN),
+ "DT_WHT": ValueOf(syscall.DT_WHT),
+ "DetachLsf": ValueOf(syscall.DetachLsf),
+ "Dup": ValueOf(syscall.Dup),
+ "Dup2": ValueOf(syscall.Dup2),
+ "Dup3": ValueOf(syscall.Dup3),
+ "E2BIG": ValueOf(syscall.E2BIG),
+ "EACCES": ValueOf(syscall.EACCES),
+ "EADDRINUSE": ValueOf(syscall.EADDRINUSE),
+ "EADDRNOTAVAIL": ValueOf(syscall.EADDRNOTAVAIL),
+ "EADV": ValueOf(syscall.EADV),
+ "EAFNOSUPPORT": ValueOf(syscall.EAFNOSUPPORT),
+ "EAGAIN": ValueOf(syscall.EAGAIN),
+ "EAI_ADDRFAMILY": ValueOf(syscall.EAI_ADDRFAMILY),
+ "EAI_AGAIN": ValueOf(syscall.EAI_AGAIN),
+ "EAI_ALLDONE": ValueOf(syscall.EAI_ALLDONE),
+ "EAI_BADFLAGS": ValueOf(syscall.EAI_BADFLAGS),
+ "EAI_CANCELED": ValueOf(syscall.EAI_CANCELED),
+ "EAI_FAIL": ValueOf(syscall.EAI_FAIL),
+ "EAI_FAMILY": ValueOf(syscall.EAI_FAMILY),
+ "EAI_IDN_ENCODE": ValueOf(syscall.EAI_IDN_ENCODE),
+ "EAI_INPROGRESS": ValueOf(syscall.EAI_INPROGRESS),
+ "EAI_INTR": ValueOf(syscall.EAI_INTR),
+ "EAI_MEMORY": ValueOf(syscall.EAI_MEMORY),
+ "EAI_NODATA": ValueOf(syscall.EAI_NODATA),
+ "EAI_NONAME": ValueOf(syscall.EAI_NONAME),
+ "EAI_NOTCANCELED": ValueOf(syscall.EAI_NOTCANCELED),
+ "EAI_OVERFLOW": ValueOf(syscall.EAI_OVERFLOW),
+ "EAI_SERVICE": ValueOf(syscall.EAI_SERVICE),
+ "EAI_SOCKTYPE": ValueOf(syscall.EAI_SOCKTYPE),
+ "EAI_SYSTEM": ValueOf(syscall.EAI_SYSTEM),
+ "EALREADY": ValueOf(syscall.EALREADY),
+ "EBADE": ValueOf(syscall.EBADE),
+ "EBADF": ValueOf(syscall.EBADF),
+ "EBADFD": ValueOf(syscall.EBADFD),
+ "EBADMSG": ValueOf(syscall.EBADMSG),
+ "EBADR": ValueOf(syscall.EBADR),
+ "EBADRQC": ValueOf(syscall.EBADRQC),
+ "EBADSLT": ValueOf(syscall.EBADSLT),
+ "EBFONT": ValueOf(syscall.EBFONT),
+ "EBUSY": ValueOf(syscall.EBUSY),
+ "ECANCELED": ValueOf(syscall.ECANCELED),
+ "ECHILD": ValueOf(syscall.ECHILD),
+ "ECHO": ValueOf(syscall.ECHO),
+ "ECHOCTL": ValueOf(syscall.ECHOCTL),
+ "ECHOE": ValueOf(syscall.ECHOE),
+ "ECHOK": ValueOf(syscall.ECHOK),
+ "ECHOKE": ValueOf(syscall.ECHOKE),
+ "ECHONL": ValueOf(syscall.ECHONL),
+ "ECHOPRT": ValueOf(syscall.ECHOPRT),
+ "ECHRNG": ValueOf(syscall.ECHRNG),
+ "ECOMM": ValueOf(syscall.ECOMM),
+ "ECONNABORTED": ValueOf(syscall.ECONNABORTED),
+ "ECONNREFUSED": ValueOf(syscall.ECONNREFUSED),
+ "ECONNRESET": ValueOf(syscall.ECONNRESET),
+ "EDEADLK": ValueOf(syscall.EDEADLK),
+ "EDEADLOCK": ValueOf(syscall.EDEADLOCK),
+ "EDESTADDRREQ": ValueOf(syscall.EDESTADDRREQ),
+ "EDOM": ValueOf(syscall.EDOM),
+ "EDOTDOT": ValueOf(syscall.EDOTDOT),
+ "EDQUOT": ValueOf(syscall.EDQUOT),
+ "EEXIST": ValueOf(syscall.EEXIST),
+ "EFAULT": ValueOf(syscall.EFAULT),
+ "EFBIG": ValueOf(syscall.EFBIG),
+ "EHOSTDOWN": ValueOf(syscall.EHOSTDOWN),
+ "EHOSTUNREACH": ValueOf(syscall.EHOSTUNREACH),
+ "EHWPOISON": ValueOf(syscall.EHWPOISON),
+ "EIDRM": ValueOf(syscall.EIDRM),
+ "EILSEQ": ValueOf(syscall.EILSEQ),
+ "EINPROGRESS": ValueOf(syscall.EINPROGRESS),
+ "EINTR": ValueOf(syscall.EINTR),
+ "EINVAL": ValueOf(syscall.EINVAL),
+ "EIO": ValueOf(syscall.EIO),
+ "EISCONN": ValueOf(syscall.EISCONN),
+ "EISDIR": ValueOf(syscall.EISDIR),
+ "EISNAM": ValueOf(syscall.EISNAM),
+ "EKEYEXPIRED": ValueOf(syscall.EKEYEXPIRED),
+ "EKEYREJECTED": ValueOf(syscall.EKEYREJECTED),
+ "EKEYREVOKED": ValueOf(syscall.EKEYREVOKED),
+ "EL2HLT": ValueOf(syscall.EL2HLT),
+ "EL2NSYNC": ValueOf(syscall.EL2NSYNC),
+ "EL3HLT": ValueOf(syscall.EL3HLT),
+ "EL3RST": ValueOf(syscall.EL3RST),
+ "ELIBACC": ValueOf(syscall.ELIBACC),
+ "ELIBBAD": ValueOf(syscall.ELIBBAD),
+ "ELIBEXEC": ValueOf(syscall.ELIBEXEC),
+ "ELIBMAX": ValueOf(syscall.ELIBMAX),
+ "ELIBSCN": ValueOf(syscall.ELIBSCN),
+ "ELNRNG": ValueOf(syscall.ELNRNG),
+ "ELOOP": ValueOf(syscall.ELOOP),
+ "EMEDIUMTYPE": ValueOf(syscall.EMEDIUMTYPE),
+ "EMFILE": ValueOf(syscall.EMFILE),
+ "EMLINK": ValueOf(syscall.EMLINK),
+ "EMSGSIZE": ValueOf(syscall.EMSGSIZE),
+ "EMULTIHOP": ValueOf(syscall.EMULTIHOP),
+ "ENAMETOOLONG": ValueOf(syscall.ENAMETOOLONG),
+ "ENAVAIL": ValueOf(syscall.ENAVAIL),
+ "ENETDOWN": ValueOf(syscall.ENETDOWN),
+ "ENETRESET": ValueOf(syscall.ENETRESET),
+ "ENETUNREACH": ValueOf(syscall.ENETUNREACH),
+ "ENFILE": ValueOf(syscall.ENFILE),
+ "ENOANO": ValueOf(syscall.ENOANO),
+ "ENOBUFS": ValueOf(syscall.ENOBUFS),
+ "ENOCSI": ValueOf(syscall.ENOCSI),
+ "ENODATA": ValueOf(syscall.ENODATA),
+ "ENODEV": ValueOf(syscall.ENODEV),
+ "ENOENT": ValueOf(syscall.ENOENT),
+ "ENOEXEC": ValueOf(syscall.ENOEXEC),
+ "ENOKEY": ValueOf(syscall.ENOKEY),
+ "ENOLCK": ValueOf(syscall.ENOLCK),
+ "ENOLINK": ValueOf(syscall.ENOLINK),
+ "ENOMEDIUM": ValueOf(syscall.ENOMEDIUM),
+ "ENOMEM": ValueOf(syscall.ENOMEM),
+ "ENOMSG": ValueOf(syscall.ENOMSG),
+ "ENONET": ValueOf(syscall.ENONET),
+ "ENOPKG": ValueOf(syscall.ENOPKG),
+ "ENOPROTOOPT": ValueOf(syscall.ENOPROTOOPT),
+ "ENOSPC": ValueOf(syscall.ENOSPC),
+ "ENOSR": ValueOf(syscall.ENOSR),
+ "ENOSTR": ValueOf(syscall.ENOSTR),
+ "ENOSYS": ValueOf(syscall.ENOSYS),
+ "ENOTBLK": ValueOf(syscall.ENOTBLK),
+ "ENOTCONN": ValueOf(syscall.ENOTCONN),
+ "ENOTDIR": ValueOf(syscall.ENOTDIR),
+ "ENOTEMPTY": ValueOf(syscall.ENOTEMPTY),
+ "ENOTNAM": ValueOf(syscall.ENOTNAM),
+ "ENOTRECOVERABLE": ValueOf(syscall.ENOTRECOVERABLE),
+ "ENOTSOCK": ValueOf(syscall.ENOTSOCK),
+ "ENOTSUP": ValueOf(syscall.ENOTSUP),
+ "ENOTTY": ValueOf(syscall.ENOTTY),
+ "ENOTUNIQ": ValueOf(syscall.ENOTUNIQ),
+ "ENXIO": ValueOf(syscall.ENXIO),
+ "EOPNOTSUPP": ValueOf(syscall.EOPNOTSUPP),
+ "EOVERFLOW": ValueOf(syscall.EOVERFLOW),
+ "EOWNERDEAD": ValueOf(syscall.EOWNERDEAD),
+ "EPERM": ValueOf(syscall.EPERM),
+ "EPFNOSUPPORT": ValueOf(syscall.EPFNOSUPPORT),
+ "EPIPE": ValueOf(syscall.EPIPE),
+ "EPOLLERR": ValueOf(syscall.EPOLLERR),
+ "EPOLLET": ValueOf(uint32(syscall.EPOLLET)),
+ "EPOLLEXCLUSIVE": ValueOf(syscall.EPOLLEXCLUSIVE),
+ "EPOLLHUP": ValueOf(syscall.EPOLLHUP),
+ "EPOLLIN": ValueOf(syscall.EPOLLIN),
+ "EPOLLMSG": ValueOf(syscall.EPOLLMSG),
+ "EPOLLONESHOT": ValueOf(syscall.EPOLLONESHOT),
+ "EPOLLOUT": ValueOf(syscall.EPOLLOUT),
+ "EPOLLPRI": ValueOf(syscall.EPOLLPRI),
+ "EPOLLRDBAND": ValueOf(syscall.EPOLLRDBAND),
+ "EPOLLRDHUP": ValueOf(syscall.EPOLLRDHUP),
+ "EPOLLRDNORM": ValueOf(syscall.EPOLLRDNORM),
+ "EPOLLWAKEUP": ValueOf(syscall.EPOLLWAKEUP),
+ "EPOLLWRBAND": ValueOf(syscall.EPOLLWRBAND),
+ "EPOLLWRNORM": ValueOf(syscall.EPOLLWRNORM),
+ "EPOLL_CLOEXEC": ValueOf(syscall.EPOLL_CLOEXEC),
+ "EPOLL_CTL_ADD": ValueOf(syscall.EPOLL_CTL_ADD),
+ "EPOLL_CTL_DEL": ValueOf(syscall.EPOLL_CTL_DEL),
+ "EPOLL_CTL_MOD": ValueOf(syscall.EPOLL_CTL_MOD),
+ "EPROTO": ValueOf(syscall.EPROTO),
+ "EPROTONOSUPPORT": ValueOf(syscall.EPROTONOSUPPORT),
+ "EPROTOTYPE": ValueOf(syscall.EPROTOTYPE),
+ "ERANGE": ValueOf(syscall.ERANGE),
+ "EREMCHG": ValueOf(syscall.EREMCHG),
+ "EREMOTE": ValueOf(syscall.EREMOTE),
+ "EREMOTEIO": ValueOf(syscall.EREMOTEIO),
+ "ERESTART": ValueOf(syscall.ERESTART),
+ "ERFKILL": ValueOf(syscall.ERFKILL),
+ "EROFS": ValueOf(syscall.EROFS),
+ "ESHUTDOWN": ValueOf(syscall.ESHUTDOWN),
+ "ESOCKTNOSUPPORT": ValueOf(syscall.ESOCKTNOSUPPORT),
+ "ESPIPE": ValueOf(syscall.ESPIPE),
+ "ESRCH": ValueOf(syscall.ESRCH),
+ "ESRMNT": ValueOf(syscall.ESRMNT),
+ "ESTALE": ValueOf(syscall.ESTALE),
+ "ESTRPIPE": ValueOf(syscall.ESTRPIPE),
+ "ETH_ALEN": ValueOf(syscall.ETH_ALEN),
+ "ETH_DATA_LEN": ValueOf(syscall.ETH_DATA_LEN),
+ "ETH_FCS_LEN": ValueOf(syscall.ETH_FCS_LEN),
+ "ETH_FRAME_LEN": ValueOf(syscall.ETH_FRAME_LEN),
+ "ETH_HLEN": ValueOf(syscall.ETH_HLEN),
+ "ETH_MAX_MTU": ValueOf(syscall.ETH_MAX_MTU),
+ "ETH_MIN_MTU": ValueOf(syscall.ETH_MIN_MTU),
+ "ETH_P_1588": ValueOf(syscall.ETH_P_1588),
+ "ETH_P_8021AD": ValueOf(syscall.ETH_P_8021AD),
+ "ETH_P_8021AH": ValueOf(syscall.ETH_P_8021AH),
+ "ETH_P_8021Q": ValueOf(syscall.ETH_P_8021Q),
+ "ETH_P_80221": ValueOf(syscall.ETH_P_80221),
+ "ETH_P_802_2": ValueOf(syscall.ETH_P_802_2),
+ "ETH_P_802_3": ValueOf(syscall.ETH_P_802_3),
+ "ETH_P_802_3_MIN": ValueOf(syscall.ETH_P_802_3_MIN),
+ "ETH_P_802_EX1": ValueOf(syscall.ETH_P_802_EX1),
+ "ETH_P_AARP": ValueOf(syscall.ETH_P_AARP),
+ "ETH_P_AF_IUCV": ValueOf(syscall.ETH_P_AF_IUCV),
+ "ETH_P_ALL": ValueOf(syscall.ETH_P_ALL),
+ "ETH_P_AOE": ValueOf(syscall.ETH_P_AOE),
+ "ETH_P_ARCNET": ValueOf(syscall.ETH_P_ARCNET),
+ "ETH_P_ARP": ValueOf(syscall.ETH_P_ARP),
+ "ETH_P_ATALK": ValueOf(syscall.ETH_P_ATALK),
+ "ETH_P_ATMFATE": ValueOf(syscall.ETH_P_ATMFATE),
+ "ETH_P_ATMMPOA": ValueOf(syscall.ETH_P_ATMMPOA),
+ "ETH_P_AX25": ValueOf(syscall.ETH_P_AX25),
+ "ETH_P_BATMAN": ValueOf(syscall.ETH_P_BATMAN),
+ "ETH_P_BPQ": ValueOf(syscall.ETH_P_BPQ),
+ "ETH_P_CAIF": ValueOf(syscall.ETH_P_CAIF),
+ "ETH_P_CAN": ValueOf(syscall.ETH_P_CAN),
+ "ETH_P_CANFD": ValueOf(syscall.ETH_P_CANFD),
+ "ETH_P_CONTROL": ValueOf(syscall.ETH_P_CONTROL),
+ "ETH_P_CUST": ValueOf(syscall.ETH_P_CUST),
+ "ETH_P_DDCMP": ValueOf(syscall.ETH_P_DDCMP),
+ "ETH_P_DEC": ValueOf(syscall.ETH_P_DEC),
+ "ETH_P_DIAG": ValueOf(syscall.ETH_P_DIAG),
+ "ETH_P_DNA_DL": ValueOf(syscall.ETH_P_DNA_DL),
+ "ETH_P_DNA_RC": ValueOf(syscall.ETH_P_DNA_RC),
+ "ETH_P_DNA_RT": ValueOf(syscall.ETH_P_DNA_RT),
+ "ETH_P_DSA": ValueOf(syscall.ETH_P_DSA),
+ "ETH_P_ECONET": ValueOf(syscall.ETH_P_ECONET),
+ "ETH_P_EDSA": ValueOf(syscall.ETH_P_EDSA),
+ "ETH_P_ERSPAN": ValueOf(syscall.ETH_P_ERSPAN),
+ "ETH_P_FCOE": ValueOf(syscall.ETH_P_FCOE),
+ "ETH_P_FIP": ValueOf(syscall.ETH_P_FIP),
+ "ETH_P_HDLC": ValueOf(syscall.ETH_P_HDLC),
+ "ETH_P_HSR": ValueOf(syscall.ETH_P_HSR),
+ "ETH_P_IBOE": ValueOf(syscall.ETH_P_IBOE),
+ "ETH_P_IEEE802154": ValueOf(syscall.ETH_P_IEEE802154),
+ "ETH_P_IEEEPUP": ValueOf(syscall.ETH_P_IEEEPUP),
+ "ETH_P_IEEEPUPAT": ValueOf(syscall.ETH_P_IEEEPUPAT),
+ "ETH_P_IFE": ValueOf(syscall.ETH_P_IFE),
+ "ETH_P_IP": ValueOf(syscall.ETH_P_IP),
+ "ETH_P_IPV6": ValueOf(syscall.ETH_P_IPV6),
+ "ETH_P_IPX": ValueOf(syscall.ETH_P_IPX),
+ "ETH_P_IRDA": ValueOf(syscall.ETH_P_IRDA),
+ "ETH_P_LAT": ValueOf(syscall.ETH_P_LAT),
+ "ETH_P_LINK_CTL": ValueOf(syscall.ETH_P_LINK_CTL),
+ "ETH_P_LOCALTALK": ValueOf(syscall.ETH_P_LOCALTALK),
+ "ETH_P_LOOP": ValueOf(syscall.ETH_P_LOOP),
+ "ETH_P_LOOPBACK": ValueOf(syscall.ETH_P_LOOPBACK),
+ "ETH_P_MACSEC": ValueOf(syscall.ETH_P_MACSEC),
+ "ETH_P_MAP": ValueOf(syscall.ETH_P_MAP),
+ "ETH_P_MOBITEX": ValueOf(syscall.ETH_P_MOBITEX),
+ "ETH_P_MPLS_MC": ValueOf(syscall.ETH_P_MPLS_MC),
+ "ETH_P_MPLS_UC": ValueOf(syscall.ETH_P_MPLS_UC),
+ "ETH_P_MVRP": ValueOf(syscall.ETH_P_MVRP),
+ "ETH_P_NCSI": ValueOf(syscall.ETH_P_NCSI),
+ "ETH_P_NSH": ValueOf(syscall.ETH_P_NSH),
+ "ETH_P_PAE": ValueOf(syscall.ETH_P_PAE),
+ "ETH_P_PAUSE": ValueOf(syscall.ETH_P_PAUSE),
+ "ETH_P_PHONET": ValueOf(syscall.ETH_P_PHONET),
+ "ETH_P_PPPTALK": ValueOf(syscall.ETH_P_PPPTALK),
+ "ETH_P_PPP_DISC": ValueOf(syscall.ETH_P_PPP_DISC),
+ "ETH_P_PPP_MP": ValueOf(syscall.ETH_P_PPP_MP),
+ "ETH_P_PPP_SES": ValueOf(syscall.ETH_P_PPP_SES),
+ "ETH_P_PRP": ValueOf(syscall.ETH_P_PRP),
+ "ETH_P_PUP": ValueOf(syscall.ETH_P_PUP),
+ "ETH_P_PUPAT": ValueOf(syscall.ETH_P_PUPAT),
+ "ETH_P_QINQ1": ValueOf(syscall.ETH_P_QINQ1),
+ "ETH_P_QINQ2": ValueOf(syscall.ETH_P_QINQ2),
+ "ETH_P_QINQ3": ValueOf(syscall.ETH_P_QINQ3),
+ "ETH_P_RARP": ValueOf(syscall.ETH_P_RARP),
+ "ETH_P_SCA": ValueOf(syscall.ETH_P_SCA),
+ "ETH_P_SLOW": ValueOf(syscall.ETH_P_SLOW),
+ "ETH_P_SNAP": ValueOf(syscall.ETH_P_SNAP),
+ "ETH_P_TDLS": ValueOf(syscall.ETH_P_TDLS),
+ "ETH_P_TEB": ValueOf(syscall.ETH_P_TEB),
+ "ETH_P_TIPC": ValueOf(syscall.ETH_P_TIPC),
+ "ETH_P_TRAILER": ValueOf(syscall.ETH_P_TRAILER),
+ "ETH_P_TR_802_2": ValueOf(syscall.ETH_P_TR_802_2),
+ "ETH_P_TSN": ValueOf(syscall.ETH_P_TSN),
+ "ETH_P_WAN_PPP": ValueOf(syscall.ETH_P_WAN_PPP),
+ "ETH_P_WCCP": ValueOf(syscall.ETH_P_WCCP),
+ "ETH_P_X25": ValueOf(syscall.ETH_P_X25),
+ "ETH_P_XDSA": ValueOf(syscall.ETH_P_XDSA),
+ "ETH_ZLEN": ValueOf(syscall.ETH_ZLEN),
+ "ETIME": ValueOf(syscall.ETIME),
+ "ETIMEDOUT": ValueOf(syscall.ETIMEDOUT),
+ "ETOOMANYREFS": ValueOf(syscall.ETOOMANYREFS),
+ "ETXTBSY": ValueOf(syscall.ETXTBSY),
+ "EUCLEAN": ValueOf(syscall.EUCLEAN),
+ "EUNATCH": ValueOf(syscall.EUNATCH),
+ "EUSERS": ValueOf(syscall.EUSERS),
+ "EWOULDBLOCK": ValueOf(syscall.EWOULDBLOCK),
+ "EXDEV": ValueOf(syscall.EXDEV),
+ "EXFULL": ValueOf(syscall.EXFULL),
+ "Entersyscall": ValueOf(syscall.Entersyscall),
+ "Environ": ValueOf(syscall.Environ),
+ "EpollCreate": ValueOf(syscall.EpollCreate),
+ "EpollCreate1": ValueOf(syscall.EpollCreate1),
+ "EpollCtl": ValueOf(syscall.EpollCtl),
+ "EpollWait": ValueOf(syscall.EpollWait),
+ "Errstr": ValueOf(syscall.Errstr),
+ "Exec": ValueOf(syscall.Exec),
+ "Exit": ValueOf(syscall.Exit),
+ "Exitsyscall": ValueOf(syscall.Exitsyscall),
+ "FALLOC_FL_COLLAPSE_RANGE": ValueOf(syscall.FALLOC_FL_COLLAPSE_RANGE),
+ "FALLOC_FL_INSERT_RANGE": ValueOf(syscall.FALLOC_FL_INSERT_RANGE),
+ "FALLOC_FL_KEEP_SIZE": ValueOf(syscall.FALLOC_FL_KEEP_SIZE),
+ "FALLOC_FL_NO_HIDE_STALE": ValueOf(syscall.FALLOC_FL_NO_HIDE_STALE),
+ "FALLOC_FL_PUNCH_HOLE": ValueOf(syscall.FALLOC_FL_PUNCH_HOLE),
+ "FALLOC_FL_UNSHARE_RANGE": ValueOf(syscall.FALLOC_FL_UNSHARE_RANGE),
+ "FALLOC_FL_ZERO_RANGE": ValueOf(syscall.FALLOC_FL_ZERO_RANGE),
+ "FDClr": ValueOf(syscall.FDClr),
+ "FDIsSet": ValueOf(syscall.FDIsSet),
+ "FDSet": ValueOf(syscall.FDSet),
+ "FDZero": ValueOf(syscall.FDZero),
+ "FD_CLOEXEC": ValueOf(syscall.FD_CLOEXEC),
+ "FD_SETSIZE": ValueOf(syscall.FD_SETSIZE),
+ "FFDLY": ValueOf(syscall.FFDLY),
+ "FLUSHO": ValueOf(syscall.FLUSHO),
+ "F_ADD_SEALS": ValueOf(syscall.F_ADD_SEALS),
+ "F_DUPFD": ValueOf(syscall.F_DUPFD),
+ "F_DUPFD_CLOEXEC": ValueOf(syscall.F_DUPFD_CLOEXEC),
+ "F_EXLCK": ValueOf(syscall.F_EXLCK),
+ "F_GETFD": ValueOf(syscall.F_GETFD),
+ "F_GETFL": ValueOf(syscall.F_GETFL),
+ "F_GETLEASE": ValueOf(syscall.F_GETLEASE),
+ "F_GETLK": ValueOf(syscall.F_GETLK),
+ "F_GETLK64": ValueOf(syscall.F_GETLK64),
+ "F_GETOWN": ValueOf(syscall.F_GETOWN),
+ "F_GETOWN_EX": ValueOf(syscall.F_GETOWN_EX),
+ "F_GETPIPE_SZ": ValueOf(syscall.F_GETPIPE_SZ),
+ "F_GETSIG": ValueOf(syscall.F_GETSIG),
+ "F_GET_FILE_RW_HINT": ValueOf(syscall.F_GET_FILE_RW_HINT),
+ "F_GET_RW_HINT": ValueOf(syscall.F_GET_RW_HINT),
+ "F_GET_SEALS": ValueOf(syscall.F_GET_SEALS),
+ "F_LOCK": ValueOf(syscall.F_LOCK),
+ "F_NOTIFY": ValueOf(syscall.F_NOTIFY),
+ "F_OFD_GETLK": ValueOf(syscall.F_OFD_GETLK),
+ "F_OFD_SETLK": ValueOf(syscall.F_OFD_SETLK),
+ "F_OFD_SETLKW": ValueOf(syscall.F_OFD_SETLKW),
+ "F_OK": ValueOf(syscall.F_OK),
+ "F_OWNER_GID": ValueOf(syscall.F_OWNER_GID),
+ "F_OWNER_PGRP": ValueOf(syscall.F_OWNER_PGRP),
+ "F_OWNER_PID": ValueOf(syscall.F_OWNER_PID),
+ "F_OWNER_TID": ValueOf(syscall.F_OWNER_TID),
+ "F_RDLCK": ValueOf(syscall.F_RDLCK),
+ "F_SEAL_GROW": ValueOf(syscall.F_SEAL_GROW),
+ "F_SEAL_SEAL": ValueOf(syscall.F_SEAL_SEAL),
+ "F_SEAL_SHRINK": ValueOf(syscall.F_SEAL_SHRINK),
+ "F_SEAL_WRITE": ValueOf(syscall.F_SEAL_WRITE),
+ "F_SETFD": ValueOf(syscall.F_SETFD),
+ "F_SETFL": ValueOf(syscall.F_SETFL),
+ "F_SETLEASE": ValueOf(syscall.F_SETLEASE),
+ "F_SETLK": ValueOf(syscall.F_SETLK),
+ "F_SETLK64": ValueOf(syscall.F_SETLK64),
+ "F_SETLKW": ValueOf(syscall.F_SETLKW),
+ "F_SETLKW64": ValueOf(syscall.F_SETLKW64),
+ "F_SETOWN": ValueOf(syscall.F_SETOWN),
+ "F_SETOWN_EX": ValueOf(syscall.F_SETOWN_EX),
+ "F_SETPIPE_SZ": ValueOf(syscall.F_SETPIPE_SZ),
+ "F_SETSIG": ValueOf(syscall.F_SETSIG),
+ "F_SET_FILE_RW_HINT": ValueOf(syscall.F_SET_FILE_RW_HINT),
+ "F_SET_RW_HINT": ValueOf(syscall.F_SET_RW_HINT),
+ "F_SHLCK": ValueOf(syscall.F_SHLCK),
+ "F_TEST": ValueOf(syscall.F_TEST),
+ "F_TLOCK": ValueOf(syscall.F_TLOCK),
+ "F_ULOCK": ValueOf(syscall.F_ULOCK),
+ "F_UNLCK": ValueOf(syscall.F_UNLCK),
+ "F_WRLCK": ValueOf(syscall.F_WRLCK),
+ "Faccessat": ValueOf(syscall.Faccessat),
+ "Fallocate": ValueOf(syscall.Fallocate),
+ "Fchdir": ValueOf(syscall.Fchdir),
+ "Fchmod": ValueOf(syscall.Fchmod),
+ "Fchmodat": ValueOf(syscall.Fchmodat),
+ "Fchown": ValueOf(syscall.Fchown),
+ "Fchownat": ValueOf(syscall.Fchownat),
+ "FcntlFlock": ValueOf(syscall.FcntlFlock),
+ "Fdatasync": ValueOf(syscall.Fdatasync),
+ "Flock": ValueOf(syscall.Flock),
+ "ForkExec": ValueOf(syscall.ForkExec),
+ "ForkLock": ValueOf(&syscall.ForkLock).Elem(),
+ "Fstat": ValueOf(syscall.Fstat),
+ "Fstatfs": ValueOf(syscall.Fstatfs),
+ "Fsync": ValueOf(syscall.Fsync),
+ "Ftruncate": ValueOf(syscall.Ftruncate),
+ "Futimes": ValueOf(syscall.Futimes),
+ "Futimesat": ValueOf(syscall.Futimesat),
+ "GetErrno": ValueOf(syscall.GetErrno),
+ "Getcwd": ValueOf(syscall.Getcwd),
+ "Getdents": ValueOf(syscall.Getdents),
+ "Getegid": ValueOf(syscall.Getegid),
+ "Getenv": ValueOf(syscall.Getenv),
+ "Geteuid": ValueOf(syscall.Geteuid),
+ "Getgid": ValueOf(syscall.Getgid),
+ "Getgroups": ValueOf(syscall.Getgroups),
+ "Getpagesize": ValueOf(syscall.Getpagesize),
+ "Getpeername": ValueOf(syscall.Getpeername),
+ "Getpgid": ValueOf(syscall.Getpgid),
+ "Getpgrp": ValueOf(syscall.Getpgrp),
+ "Getpid": ValueOf(syscall.Getpid),
+ "Getppid": ValueOf(syscall.Getppid),
+ "Getpriority": ValueOf(syscall.Getpriority),
+ "Getrlimit": ValueOf(syscall.Getrlimit),
+ "Getrusage": ValueOf(syscall.Getrusage),
+ "Getsockname": ValueOf(syscall.Getsockname),
+ "GetsockoptByte": ValueOf(syscall.GetsockoptByte),
+ "GetsockoptICMPv6Filter": ValueOf(syscall.GetsockoptICMPv6Filter),
+ "GetsockoptIPMreq": ValueOf(syscall.GetsockoptIPMreq),
+ "GetsockoptIPMreqn": ValueOf(syscall.GetsockoptIPMreqn),
+ "GetsockoptIPv6MTUInfo": ValueOf(syscall.GetsockoptIPv6MTUInfo),
+ "GetsockoptIPv6Mreq": ValueOf(syscall.GetsockoptIPv6Mreq),
+ "GetsockoptInet4Addr": ValueOf(syscall.GetsockoptInet4Addr),
+ "GetsockoptInt": ValueOf(syscall.GetsockoptInt),
+ "GetsockoptUcred": ValueOf(syscall.GetsockoptUcred),
+ "Gettid": ValueOf(syscall.Gettid),
+ "Gettimeofday": ValueOf(syscall.Gettimeofday),
+ "Getuid": ValueOf(syscall.Getuid),
+ "Getwd": ValueOf(syscall.Getwd),
+ "Getxattr": ValueOf(syscall.Getxattr),
+ "HUPCL": ValueOf(syscall.HUPCL),
+ "ICANON": ValueOf(syscall.ICANON),
+ "ICRNL": ValueOf(syscall.ICRNL),
+ "IEXTEN": ValueOf(syscall.IEXTEN),
+ "IFA_ADDRESS": ValueOf(syscall.IFA_ADDRESS),
+ "IFA_ANYCAST": ValueOf(syscall.IFA_ANYCAST),
+ "IFA_BROADCAST": ValueOf(syscall.IFA_BROADCAST),
+ "IFA_CACHEINFO": ValueOf(syscall.IFA_CACHEINFO),
+ "IFA_FLAGS": ValueOf(syscall.IFA_FLAGS),
+ "IFA_F_DADFAILED": ValueOf(syscall.IFA_F_DADFAILED),
+ "IFA_F_DEPRECATED": ValueOf(syscall.IFA_F_DEPRECATED),
+ "IFA_F_HOMEADDRESS": ValueOf(syscall.IFA_F_HOMEADDRESS),
+ "IFA_F_MANAGETEMPADDR": ValueOf(syscall.IFA_F_MANAGETEMPADDR),
+ "IFA_F_MCAUTOJOIN": ValueOf(syscall.IFA_F_MCAUTOJOIN),
+ "IFA_F_NODAD": ValueOf(syscall.IFA_F_NODAD),
+ "IFA_F_NOPREFIXROUTE": ValueOf(syscall.IFA_F_NOPREFIXROUTE),
+ "IFA_F_OPTIMISTIC": ValueOf(syscall.IFA_F_OPTIMISTIC),
+ "IFA_F_PERMANENT": ValueOf(syscall.IFA_F_PERMANENT),
+ "IFA_F_SECONDARY": ValueOf(syscall.IFA_F_SECONDARY),
+ "IFA_F_STABLE_PRIVACY": ValueOf(syscall.IFA_F_STABLE_PRIVACY),
+ "IFA_F_TEMPORARY": ValueOf(syscall.IFA_F_TEMPORARY),
+ "IFA_F_TENTATIVE": ValueOf(syscall.IFA_F_TENTATIVE),
+ "IFA_LABEL": ValueOf(syscall.IFA_LABEL),
+ "IFA_LOCAL": ValueOf(syscall.IFA_LOCAL),
+ "IFA_MULTICAST": ValueOf(syscall.IFA_MULTICAST),
+ "IFA_UNSPEC": ValueOf(syscall.IFA_UNSPEC),
+ "IFF_ALLMULTI": ValueOf(syscall.IFF_ALLMULTI),
+ "IFF_ATTACH_QUEUE": ValueOf(syscall.IFF_ATTACH_QUEUE),
+ "IFF_AUTOMEDIA": ValueOf(syscall.IFF_AUTOMEDIA),
+ "IFF_BROADCAST": ValueOf(syscall.IFF_BROADCAST),
+ "IFF_DEBUG": ValueOf(syscall.IFF_DEBUG),
+ "IFF_DETACH_QUEUE": ValueOf(syscall.IFF_DETACH_QUEUE),
+ "IFF_DYNAMIC": ValueOf(syscall.IFF_DYNAMIC),
+ "IFF_LOOPBACK": ValueOf(syscall.IFF_LOOPBACK),
+ "IFF_MASTER": ValueOf(syscall.IFF_MASTER),
+ "IFF_MULTICAST": ValueOf(syscall.IFF_MULTICAST),
+ "IFF_MULTI_QUEUE": ValueOf(syscall.IFF_MULTI_QUEUE),
+ "IFF_NAPI": ValueOf(syscall.IFF_NAPI),
+ "IFF_NAPI_FRAGS": ValueOf(syscall.IFF_NAPI_FRAGS),
+ "IFF_NOARP": ValueOf(syscall.IFF_NOARP),
+ "IFF_NOFILTER": ValueOf(syscall.IFF_NOFILTER),
+ "IFF_NOTRAILERS": ValueOf(syscall.IFF_NOTRAILERS),
+ "IFF_NO_PI": ValueOf(syscall.IFF_NO_PI),
+ "IFF_ONE_QUEUE": ValueOf(syscall.IFF_ONE_QUEUE),
+ "IFF_PERSIST": ValueOf(syscall.IFF_PERSIST),
+ "IFF_POINTOPOINT": ValueOf(syscall.IFF_POINTOPOINT),
+ "IFF_PORTSEL": ValueOf(syscall.IFF_PORTSEL),
+ "IFF_PROMISC": ValueOf(syscall.IFF_PROMISC),
+ "IFF_RUNNING": ValueOf(syscall.IFF_RUNNING),
+ "IFF_SLAVE": ValueOf(syscall.IFF_SLAVE),
+ "IFF_TAP": ValueOf(syscall.IFF_TAP),
+ "IFF_TUN": ValueOf(syscall.IFF_TUN),
+ "IFF_TUN_EXCL": ValueOf(syscall.IFF_TUN_EXCL),
+ "IFF_UP": ValueOf(syscall.IFF_UP),
+ "IFF_VNET_HDR": ValueOf(syscall.IFF_VNET_HDR),
+ "IFLA_ADDRESS": ValueOf(syscall.IFLA_ADDRESS),
+ "IFLA_AF_SPEC": ValueOf(syscall.IFLA_AF_SPEC),
+ "IFLA_BOND_ACTIVE_SLAVE": ValueOf(syscall.IFLA_BOND_ACTIVE_SLAVE),
+ "IFLA_BOND_AD_ACTOR_SYSTEM": ValueOf(syscall.IFLA_BOND_AD_ACTOR_SYSTEM),
+ "IFLA_BOND_AD_ACTOR_SYS_PRIO": ValueOf(syscall.IFLA_BOND_AD_ACTOR_SYS_PRIO),
+ "IFLA_BOND_AD_INFO": ValueOf(syscall.IFLA_BOND_AD_INFO),
+ "IFLA_BOND_AD_INFO_ACTOR_KEY": ValueOf(syscall.IFLA_BOND_AD_INFO_ACTOR_KEY),
+ "IFLA_BOND_AD_INFO_AGGREGATOR": ValueOf(syscall.IFLA_BOND_AD_INFO_AGGREGATOR),
+ "IFLA_BOND_AD_INFO_NUM_PORTS": ValueOf(syscall.IFLA_BOND_AD_INFO_NUM_PORTS),
+ "IFLA_BOND_AD_INFO_PARTNER_KEY": ValueOf(syscall.IFLA_BOND_AD_INFO_PARTNER_KEY),
+ "IFLA_BOND_AD_INFO_PARTNER_MAC": ValueOf(syscall.IFLA_BOND_AD_INFO_PARTNER_MAC),
+ "IFLA_BOND_AD_INFO_UNSPEC": ValueOf(syscall.IFLA_BOND_AD_INFO_UNSPEC),
+ "IFLA_BOND_AD_LACP_RATE": ValueOf(syscall.IFLA_BOND_AD_LACP_RATE),
+ "IFLA_BOND_AD_SELECT": ValueOf(syscall.IFLA_BOND_AD_SELECT),
+ "IFLA_BOND_AD_USER_PORT_KEY": ValueOf(syscall.IFLA_BOND_AD_USER_PORT_KEY),
+ "IFLA_BOND_ALL_SLAVES_ACTIVE": ValueOf(syscall.IFLA_BOND_ALL_SLAVES_ACTIVE),
+ "IFLA_BOND_ARP_ALL_TARGETS": ValueOf(syscall.IFLA_BOND_ARP_ALL_TARGETS),
+ "IFLA_BOND_ARP_INTERVAL": ValueOf(syscall.IFLA_BOND_ARP_INTERVAL),
+ "IFLA_BOND_ARP_IP_TARGET": ValueOf(syscall.IFLA_BOND_ARP_IP_TARGET),
+ "IFLA_BOND_ARP_VALIDATE": ValueOf(syscall.IFLA_BOND_ARP_VALIDATE),
+ "IFLA_BOND_DOWNDELAY": ValueOf(syscall.IFLA_BOND_DOWNDELAY),
+ "IFLA_BOND_FAIL_OVER_MAC": ValueOf(syscall.IFLA_BOND_FAIL_OVER_MAC),
+ "IFLA_BOND_LP_INTERVAL": ValueOf(syscall.IFLA_BOND_LP_INTERVAL),
+ "IFLA_BOND_MIIMON": ValueOf(syscall.IFLA_BOND_MIIMON),
+ "IFLA_BOND_MIN_LINKS": ValueOf(syscall.IFLA_BOND_MIN_LINKS),
+ "IFLA_BOND_MODE": ValueOf(syscall.IFLA_BOND_MODE),
+ "IFLA_BOND_NUM_PEER_NOTIF": ValueOf(syscall.IFLA_BOND_NUM_PEER_NOTIF),
+ "IFLA_BOND_PACKETS_PER_SLAVE": ValueOf(syscall.IFLA_BOND_PACKETS_PER_SLAVE),
+ "IFLA_BOND_PRIMARY": ValueOf(syscall.IFLA_BOND_PRIMARY),
+ "IFLA_BOND_PRIMARY_RESELECT": ValueOf(syscall.IFLA_BOND_PRIMARY_RESELECT),
+ "IFLA_BOND_RESEND_IGMP": ValueOf(syscall.IFLA_BOND_RESEND_IGMP),
+ "IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE),
+ "IFLA_BOND_SLAVE_AD_AGGREGATOR_ID": ValueOf(syscall.IFLA_BOND_SLAVE_AD_AGGREGATOR_ID),
+ "IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE),
+ "IFLA_BOND_SLAVE_LINK_FAILURE_COUNT": ValueOf(syscall.IFLA_BOND_SLAVE_LINK_FAILURE_COUNT),
+ "IFLA_BOND_SLAVE_MII_STATUS": ValueOf(syscall.IFLA_BOND_SLAVE_MII_STATUS),
+ "IFLA_BOND_SLAVE_PERM_HWADDR": ValueOf(syscall.IFLA_BOND_SLAVE_PERM_HWADDR),
+ "IFLA_BOND_SLAVE_QUEUE_ID": ValueOf(syscall.IFLA_BOND_SLAVE_QUEUE_ID),
+ "IFLA_BOND_SLAVE_STATE": ValueOf(syscall.IFLA_BOND_SLAVE_STATE),
+ "IFLA_BOND_SLAVE_UNSPEC": ValueOf(syscall.IFLA_BOND_SLAVE_UNSPEC),
+ "IFLA_BOND_TLB_DYNAMIC_LB": ValueOf(syscall.IFLA_BOND_TLB_DYNAMIC_LB),
+ "IFLA_BOND_UNSPEC": ValueOf(syscall.IFLA_BOND_UNSPEC),
+ "IFLA_BOND_UPDELAY": ValueOf(syscall.IFLA_BOND_UPDELAY),
+ "IFLA_BOND_USE_CARRIER": ValueOf(syscall.IFLA_BOND_USE_CARRIER),
+ "IFLA_BOND_XMIT_HASH_POLICY": ValueOf(syscall.IFLA_BOND_XMIT_HASH_POLICY),
+ "IFLA_BROADCAST": ValueOf(syscall.IFLA_BROADCAST),
+ "IFLA_BRPORT_BCAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_BCAST_FLOOD),
+ "IFLA_BRPORT_BRIDGE_ID": ValueOf(syscall.IFLA_BRPORT_BRIDGE_ID),
+ "IFLA_BRPORT_CONFIG_PENDING": ValueOf(syscall.IFLA_BRPORT_CONFIG_PENDING),
+ "IFLA_BRPORT_COST": ValueOf(syscall.IFLA_BRPORT_COST),
+ "IFLA_BRPORT_DESIGNATED_COST": ValueOf(syscall.IFLA_BRPORT_DESIGNATED_COST),
+ "IFLA_BRPORT_DESIGNATED_PORT": ValueOf(syscall.IFLA_BRPORT_DESIGNATED_PORT),
+ "IFLA_BRPORT_FAST_LEAVE": ValueOf(syscall.IFLA_BRPORT_FAST_LEAVE),
+ "IFLA_BRPORT_FLUSH": ValueOf(syscall.IFLA_BRPORT_FLUSH),
+ "IFLA_BRPORT_FORWARD_DELAY_TIMER": ValueOf(syscall.IFLA_BRPORT_FORWARD_DELAY_TIMER),
+ "IFLA_BRPORT_GROUP_FWD_MASK": ValueOf(syscall.IFLA_BRPORT_GROUP_FWD_MASK),
+ "IFLA_BRPORT_GUARD": ValueOf(syscall.IFLA_BRPORT_GUARD),
+ "IFLA_BRPORT_HOLD_TIMER": ValueOf(syscall.IFLA_BRPORT_HOLD_TIMER),
+ "IFLA_BRPORT_ID": ValueOf(syscall.IFLA_BRPORT_ID),
+ "IFLA_BRPORT_LEARNING": ValueOf(syscall.IFLA_BRPORT_LEARNING),
+ "IFLA_BRPORT_LEARNING_SYNC": ValueOf(syscall.IFLA_BRPORT_LEARNING_SYNC),
+ "IFLA_BRPORT_MCAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_MCAST_FLOOD),
+ "IFLA_BRPORT_MCAST_TO_UCAST": ValueOf(syscall.IFLA_BRPORT_MCAST_TO_UCAST),
+ "IFLA_BRPORT_MESSAGE_AGE_TIMER": ValueOf(syscall.IFLA_BRPORT_MESSAGE_AGE_TIMER),
+ "IFLA_BRPORT_MODE": ValueOf(syscall.IFLA_BRPORT_MODE),
+ "IFLA_BRPORT_MULTICAST_ROUTER": ValueOf(syscall.IFLA_BRPORT_MULTICAST_ROUTER),
+ "IFLA_BRPORT_NEIGH_SUPPRESS": ValueOf(syscall.IFLA_BRPORT_NEIGH_SUPPRESS),
+ "IFLA_BRPORT_NO": ValueOf(syscall.IFLA_BRPORT_NO),
+ "IFLA_BRPORT_PAD": ValueOf(syscall.IFLA_BRPORT_PAD),
+ "IFLA_BRPORT_PRIORITY": ValueOf(syscall.IFLA_BRPORT_PRIORITY),
+ "IFLA_BRPORT_PROTECT": ValueOf(syscall.IFLA_BRPORT_PROTECT),
+ "IFLA_BRPORT_PROXYARP": ValueOf(syscall.IFLA_BRPORT_PROXYARP),
+ "IFLA_BRPORT_PROXYARP_WIFI": ValueOf(syscall.IFLA_BRPORT_PROXYARP_WIFI),
+ "IFLA_BRPORT_ROOT_ID": ValueOf(syscall.IFLA_BRPORT_ROOT_ID),
+ "IFLA_BRPORT_STATE": ValueOf(syscall.IFLA_BRPORT_STATE),
+ "IFLA_BRPORT_TOPOLOGY_CHANGE_ACK": ValueOf(syscall.IFLA_BRPORT_TOPOLOGY_CHANGE_ACK),
+ "IFLA_BRPORT_UNICAST_FLOOD": ValueOf(syscall.IFLA_BRPORT_UNICAST_FLOOD),
+ "IFLA_BRPORT_UNSPEC": ValueOf(syscall.IFLA_BRPORT_UNSPEC),
+ "IFLA_BRPORT_VLAN_TUNNEL": ValueOf(syscall.IFLA_BRPORT_VLAN_TUNNEL),
+ "IFLA_BR_AGEING_TIME": ValueOf(syscall.IFLA_BR_AGEING_TIME),
+ "IFLA_BR_BRIDGE_ID": ValueOf(syscall.IFLA_BR_BRIDGE_ID),
+ "IFLA_BR_FDB_FLUSH": ValueOf(syscall.IFLA_BR_FDB_FLUSH),
+ "IFLA_BR_FORWARD_DELAY": ValueOf(syscall.IFLA_BR_FORWARD_DELAY),
+ "IFLA_BR_GC_TIMER": ValueOf(syscall.IFLA_BR_GC_TIMER),
+ "IFLA_BR_GROUP_ADDR": ValueOf(syscall.IFLA_BR_GROUP_ADDR),
+ "IFLA_BR_GROUP_FWD_MASK": ValueOf(syscall.IFLA_BR_GROUP_FWD_MASK),
+ "IFLA_BR_HELLO_TIME": ValueOf(syscall.IFLA_BR_HELLO_TIME),
+ "IFLA_BR_HELLO_TIMER": ValueOf(syscall.IFLA_BR_HELLO_TIMER),
+ "IFLA_BR_MAX_AGE": ValueOf(syscall.IFLA_BR_MAX_AGE),
+ "IFLA_BR_MCAST_HASH_ELASTICITY": ValueOf(syscall.IFLA_BR_MCAST_HASH_ELASTICITY),
+ "IFLA_BR_MCAST_HASH_MAX": ValueOf(syscall.IFLA_BR_MCAST_HASH_MAX),
+ "IFLA_BR_MCAST_IGMP_VERSION": ValueOf(syscall.IFLA_BR_MCAST_IGMP_VERSION),
+ "IFLA_BR_MCAST_LAST_MEMBER_CNT": ValueOf(syscall.IFLA_BR_MCAST_LAST_MEMBER_CNT),
+ "IFLA_BR_MCAST_LAST_MEMBER_INTVL": ValueOf(syscall.IFLA_BR_MCAST_LAST_MEMBER_INTVL),
+ "IFLA_BR_MCAST_MEMBERSHIP_INTVL": ValueOf(syscall.IFLA_BR_MCAST_MEMBERSHIP_INTVL),
+ "IFLA_BR_MCAST_MLD_VERSION": ValueOf(syscall.IFLA_BR_MCAST_MLD_VERSION),
+ "IFLA_BR_MCAST_QUERIER": ValueOf(syscall.IFLA_BR_MCAST_QUERIER),
+ "IFLA_BR_MCAST_QUERIER_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERIER_INTVL),
+ "IFLA_BR_MCAST_QUERY_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERY_INTVL),
+ "IFLA_BR_MCAST_QUERY_RESPONSE_INTVL": ValueOf(syscall.IFLA_BR_MCAST_QUERY_RESPONSE_INTVL),
+ "IFLA_BR_MCAST_QUERY_USE_IFADDR": ValueOf(syscall.IFLA_BR_MCAST_QUERY_USE_IFADDR),
+ "IFLA_BR_MCAST_ROUTER": ValueOf(syscall.IFLA_BR_MCAST_ROUTER),
+ "IFLA_BR_MCAST_SNOOPING": ValueOf(syscall.IFLA_BR_MCAST_SNOOPING),
+ "IFLA_BR_MCAST_STARTUP_QUERY_CNT": ValueOf(syscall.IFLA_BR_MCAST_STARTUP_QUERY_CNT),
+ "IFLA_BR_MCAST_STARTUP_QUERY_INTVL": ValueOf(syscall.IFLA_BR_MCAST_STARTUP_QUERY_INTVL),
+ "IFLA_BR_MCAST_STATS_ENABLED": ValueOf(syscall.IFLA_BR_MCAST_STATS_ENABLED),
+ "IFLA_BR_NF_CALL_ARPTABLES": ValueOf(syscall.IFLA_BR_NF_CALL_ARPTABLES),
+ "IFLA_BR_NF_CALL_IP6TABLES": ValueOf(syscall.IFLA_BR_NF_CALL_IP6TABLES),
+ "IFLA_BR_NF_CALL_IPTABLES": ValueOf(syscall.IFLA_BR_NF_CALL_IPTABLES),
+ "IFLA_BR_PAD": ValueOf(syscall.IFLA_BR_PAD),
+ "IFLA_BR_PRIORITY": ValueOf(syscall.IFLA_BR_PRIORITY),
+ "IFLA_BR_ROOT_ID": ValueOf(syscall.IFLA_BR_ROOT_ID),
+ "IFLA_BR_ROOT_PATH_COST": ValueOf(syscall.IFLA_BR_ROOT_PATH_COST),
+ "IFLA_BR_ROOT_PORT": ValueOf(syscall.IFLA_BR_ROOT_PORT),
+ "IFLA_BR_STP_STATE": ValueOf(syscall.IFLA_BR_STP_STATE),
+ "IFLA_BR_TCN_TIMER": ValueOf(syscall.IFLA_BR_TCN_TIMER),
+ "IFLA_BR_TOPOLOGY_CHANGE": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE),
+ "IFLA_BR_TOPOLOGY_CHANGE_DETECTED": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE_DETECTED),
+ "IFLA_BR_TOPOLOGY_CHANGE_TIMER": ValueOf(syscall.IFLA_BR_TOPOLOGY_CHANGE_TIMER),
+ "IFLA_BR_UNSPEC": ValueOf(syscall.IFLA_BR_UNSPEC),
+ "IFLA_BR_VLAN_DEFAULT_PVID": ValueOf(syscall.IFLA_BR_VLAN_DEFAULT_PVID),
+ "IFLA_BR_VLAN_FILTERING": ValueOf(syscall.IFLA_BR_VLAN_FILTERING),
+ "IFLA_BR_VLAN_PROTOCOL": ValueOf(syscall.IFLA_BR_VLAN_PROTOCOL),
+ "IFLA_BR_VLAN_STATS_ENABLED": ValueOf(syscall.IFLA_BR_VLAN_STATS_ENABLED),
+ "IFLA_CARRIER": ValueOf(syscall.IFLA_CARRIER),
+ "IFLA_CARRIER_CHANGES": ValueOf(syscall.IFLA_CARRIER_CHANGES),
+ "IFLA_COST": ValueOf(syscall.IFLA_COST),
+ "IFLA_EVENT": ValueOf(syscall.IFLA_EVENT),
+ "IFLA_EVENT_BONDING_FAILOVER": ValueOf(syscall.IFLA_EVENT_BONDING_FAILOVER),
+ "IFLA_EVENT_BONDING_OPTIONS": ValueOf(syscall.IFLA_EVENT_BONDING_OPTIONS),
+ "IFLA_EVENT_FEATURES": ValueOf(syscall.IFLA_EVENT_FEATURES),
+ "IFLA_EVENT_IGMP_RESEND": ValueOf(syscall.IFLA_EVENT_IGMP_RESEND),
+ "IFLA_EVENT_NONE": ValueOf(syscall.IFLA_EVENT_NONE),
+ "IFLA_EVENT_NOTIFY_PEERS": ValueOf(syscall.IFLA_EVENT_NOTIFY_PEERS),
+ "IFLA_EVENT_REBOOT": ValueOf(syscall.IFLA_EVENT_REBOOT),
+ "IFLA_EXT_MASK": ValueOf(syscall.IFLA_EXT_MASK),
+ "IFLA_GENEVE_COLLECT_METADATA": ValueOf(syscall.IFLA_GENEVE_COLLECT_METADATA),
+ "IFLA_GENEVE_ID": ValueOf(syscall.IFLA_GENEVE_ID),
+ "IFLA_GENEVE_LABEL": ValueOf(syscall.IFLA_GENEVE_LABEL),
+ "IFLA_GENEVE_PORT": ValueOf(syscall.IFLA_GENEVE_PORT),
+ "IFLA_GENEVE_REMOTE": ValueOf(syscall.IFLA_GENEVE_REMOTE),
+ "IFLA_GENEVE_REMOTE6": ValueOf(syscall.IFLA_GENEVE_REMOTE6),
+ "IFLA_GENEVE_TOS": ValueOf(syscall.IFLA_GENEVE_TOS),
+ "IFLA_GENEVE_TTL": ValueOf(syscall.IFLA_GENEVE_TTL),
+ "IFLA_GENEVE_UDP_CSUM": ValueOf(syscall.IFLA_GENEVE_UDP_CSUM),
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_RX": ValueOf(syscall.IFLA_GENEVE_UDP_ZERO_CSUM6_RX),
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_TX": ValueOf(syscall.IFLA_GENEVE_UDP_ZERO_CSUM6_TX),
+ "IFLA_GENEVE_UNSPEC": ValueOf(syscall.IFLA_GENEVE_UNSPEC),
+ "IFLA_GROUP": ValueOf(syscall.IFLA_GROUP),
+ "IFLA_GSO_MAX_SEGS": ValueOf(syscall.IFLA_GSO_MAX_SEGS),
+ "IFLA_GSO_MAX_SIZE": ValueOf(syscall.IFLA_GSO_MAX_SIZE),
+ "IFLA_GTP_FD0": ValueOf(syscall.IFLA_GTP_FD0),
+ "IFLA_GTP_FD1": ValueOf(syscall.IFLA_GTP_FD1),
+ "IFLA_GTP_PDP_HASHSIZE": ValueOf(syscall.IFLA_GTP_PDP_HASHSIZE),
+ "IFLA_GTP_ROLE": ValueOf(syscall.IFLA_GTP_ROLE),
+ "IFLA_GTP_UNSPEC": ValueOf(syscall.IFLA_GTP_UNSPEC),
+ "IFLA_HSR_MULTICAST_SPEC": ValueOf(syscall.IFLA_HSR_MULTICAST_SPEC),
+ "IFLA_HSR_SEQ_NR": ValueOf(syscall.IFLA_HSR_SEQ_NR),
+ "IFLA_HSR_SLAVE1": ValueOf(syscall.IFLA_HSR_SLAVE1),
+ "IFLA_HSR_SLAVE2": ValueOf(syscall.IFLA_HSR_SLAVE2),
+ "IFLA_HSR_SUPERVISION_ADDR": ValueOf(syscall.IFLA_HSR_SUPERVISION_ADDR),
+ "IFLA_HSR_UNSPEC": ValueOf(syscall.IFLA_HSR_UNSPEC),
+ "IFLA_HSR_VERSION": ValueOf(syscall.IFLA_HSR_VERSION),
+ "IFLA_IFALIAS": ValueOf(syscall.IFLA_IFALIAS),
+ "IFLA_IFNAME": ValueOf(syscall.IFLA_IFNAME),
+ "IFLA_IF_NETNSID": ValueOf(syscall.IFLA_IF_NETNSID),
+ "IFLA_INET6_ADDR_GEN_MODE": ValueOf(syscall.IFLA_INET6_ADDR_GEN_MODE),
+ "IFLA_INET6_CACHEINFO": ValueOf(syscall.IFLA_INET6_CACHEINFO),
+ "IFLA_INET6_CONF": ValueOf(syscall.IFLA_INET6_CONF),
+ "IFLA_INET6_FLAGS": ValueOf(syscall.IFLA_INET6_FLAGS),
+ "IFLA_INET6_ICMP6STATS": ValueOf(syscall.IFLA_INET6_ICMP6STATS),
+ "IFLA_INET6_MCAST": ValueOf(syscall.IFLA_INET6_MCAST),
+ "IFLA_INET6_STATS": ValueOf(syscall.IFLA_INET6_STATS),
+ "IFLA_INET6_TOKEN": ValueOf(syscall.IFLA_INET6_TOKEN),
+ "IFLA_INET6_UNSPEC": ValueOf(syscall.IFLA_INET6_UNSPEC),
+ "IFLA_INET_CONF": ValueOf(syscall.IFLA_INET_CONF),
+ "IFLA_INET_UNSPEC": ValueOf(syscall.IFLA_INET_UNSPEC),
+ "IFLA_INFO_DATA": ValueOf(syscall.IFLA_INFO_DATA),
+ "IFLA_INFO_KIND": ValueOf(syscall.IFLA_INFO_KIND),
+ "IFLA_INFO_SLAVE_DATA": ValueOf(syscall.IFLA_INFO_SLAVE_DATA),
+ "IFLA_INFO_SLAVE_KIND": ValueOf(syscall.IFLA_INFO_SLAVE_KIND),
+ "IFLA_INFO_UNSPEC": ValueOf(syscall.IFLA_INFO_UNSPEC),
+ "IFLA_INFO_XSTATS": ValueOf(syscall.IFLA_INFO_XSTATS),
+ "IFLA_IPOIB_MODE": ValueOf(syscall.IFLA_IPOIB_MODE),
+ "IFLA_IPOIB_PKEY": ValueOf(syscall.IFLA_IPOIB_PKEY),
+ "IFLA_IPOIB_UMCAST": ValueOf(syscall.IFLA_IPOIB_UMCAST),
+ "IFLA_IPOIB_UNSPEC": ValueOf(syscall.IFLA_IPOIB_UNSPEC),
+ "IFLA_IPVLAN_FLAGS": ValueOf(syscall.IFLA_IPVLAN_FLAGS),
+ "IFLA_IPVLAN_MODE": ValueOf(syscall.IFLA_IPVLAN_MODE),
+ "IFLA_IPVLAN_UNSPEC": ValueOf(syscall.IFLA_IPVLAN_UNSPEC),
+ "IFLA_LINK": ValueOf(syscall.IFLA_LINK),
+ "IFLA_LINKINFO": ValueOf(syscall.IFLA_LINKINFO),
+ "IFLA_LINKMODE": ValueOf(syscall.IFLA_LINKMODE),
+ "IFLA_LINK_NETNSID": ValueOf(syscall.IFLA_LINK_NETNSID),
+ "IFLA_MACSEC_CIPHER_SUITE": ValueOf(syscall.IFLA_MACSEC_CIPHER_SUITE),
+ "IFLA_MACSEC_ENCODING_SA": ValueOf(syscall.IFLA_MACSEC_ENCODING_SA),
+ "IFLA_MACSEC_ENCRYPT": ValueOf(syscall.IFLA_MACSEC_ENCRYPT),
+ "IFLA_MACSEC_ES": ValueOf(syscall.IFLA_MACSEC_ES),
+ "IFLA_MACSEC_ICV_LEN": ValueOf(syscall.IFLA_MACSEC_ICV_LEN),
+ "IFLA_MACSEC_INC_SCI": ValueOf(syscall.IFLA_MACSEC_INC_SCI),
+ "IFLA_MACSEC_PAD": ValueOf(syscall.IFLA_MACSEC_PAD),
+ "IFLA_MACSEC_PORT": ValueOf(syscall.IFLA_MACSEC_PORT),
+ "IFLA_MACSEC_PROTECT": ValueOf(syscall.IFLA_MACSEC_PROTECT),
+ "IFLA_MACSEC_REPLAY_PROTECT": ValueOf(syscall.IFLA_MACSEC_REPLAY_PROTECT),
+ "IFLA_MACSEC_SCB": ValueOf(syscall.IFLA_MACSEC_SCB),
+ "IFLA_MACSEC_SCI": ValueOf(syscall.IFLA_MACSEC_SCI),
+ "IFLA_MACSEC_UNSPEC": ValueOf(syscall.IFLA_MACSEC_UNSPEC),
+ "IFLA_MACSEC_VALIDATION": ValueOf(syscall.IFLA_MACSEC_VALIDATION),
+ "IFLA_MACSEC_WINDOW": ValueOf(syscall.IFLA_MACSEC_WINDOW),
+ "IFLA_MACVLAN_FLAGS": ValueOf(syscall.IFLA_MACVLAN_FLAGS),
+ "IFLA_MACVLAN_MACADDR": ValueOf(syscall.IFLA_MACVLAN_MACADDR),
+ "IFLA_MACVLAN_MACADDR_COUNT": ValueOf(syscall.IFLA_MACVLAN_MACADDR_COUNT),
+ "IFLA_MACVLAN_MACADDR_DATA": ValueOf(syscall.IFLA_MACVLAN_MACADDR_DATA),
+ "IFLA_MACVLAN_MACADDR_MODE": ValueOf(syscall.IFLA_MACVLAN_MACADDR_MODE),
+ "IFLA_MACVLAN_MODE": ValueOf(syscall.IFLA_MACVLAN_MODE),
+ "IFLA_MACVLAN_UNSPEC": ValueOf(syscall.IFLA_MACVLAN_UNSPEC),
+ "IFLA_MAP": ValueOf(syscall.IFLA_MAP),
+ "IFLA_MASTER": ValueOf(syscall.IFLA_MASTER),
+ "IFLA_MTU": ValueOf(syscall.IFLA_MTU),
+ "IFLA_NET_NS_FD": ValueOf(syscall.IFLA_NET_NS_FD),
+ "IFLA_NET_NS_PID": ValueOf(syscall.IFLA_NET_NS_PID),
+ "IFLA_NEW_NETNSID": ValueOf(syscall.IFLA_NEW_NETNSID),
+ "IFLA_NUM_RX_QUEUES": ValueOf(syscall.IFLA_NUM_RX_QUEUES),
+ "IFLA_NUM_TX_QUEUES": ValueOf(syscall.IFLA_NUM_TX_QUEUES),
+ "IFLA_NUM_VF": ValueOf(syscall.IFLA_NUM_VF),
+ "IFLA_OFFLOAD_XSTATS_CPU_HIT": ValueOf(syscall.IFLA_OFFLOAD_XSTATS_CPU_HIT),
+ "IFLA_OFFLOAD_XSTATS_UNSPEC": ValueOf(syscall.IFLA_OFFLOAD_XSTATS_UNSPEC),
+ "IFLA_OPERSTATE": ValueOf(syscall.IFLA_OPERSTATE),
+ "IFLA_PAD": ValueOf(syscall.IFLA_PAD),
+ "IFLA_PHYS_PORT_ID": ValueOf(syscall.IFLA_PHYS_PORT_ID),
+ "IFLA_PHYS_PORT_NAME": ValueOf(syscall.IFLA_PHYS_PORT_NAME),
+ "IFLA_PHYS_SWITCH_ID": ValueOf(syscall.IFLA_PHYS_SWITCH_ID),
+ "IFLA_PORT_HOST_UUID": ValueOf(syscall.IFLA_PORT_HOST_UUID),
+ "IFLA_PORT_INSTANCE_UUID": ValueOf(syscall.IFLA_PORT_INSTANCE_UUID),
+ "IFLA_PORT_PROFILE": ValueOf(syscall.IFLA_PORT_PROFILE),
+ "IFLA_PORT_REQUEST": ValueOf(syscall.IFLA_PORT_REQUEST),
+ "IFLA_PORT_RESPONSE": ValueOf(syscall.IFLA_PORT_RESPONSE),
+ "IFLA_PORT_SELF": ValueOf(syscall.IFLA_PORT_SELF),
+ "IFLA_PORT_UNSPEC": ValueOf(syscall.IFLA_PORT_UNSPEC),
+ "IFLA_PORT_VF": ValueOf(syscall.IFLA_PORT_VF),
+ "IFLA_PORT_VSI_TYPE": ValueOf(syscall.IFLA_PORT_VSI_TYPE),
+ "IFLA_PPP_DEV_FD": ValueOf(syscall.IFLA_PPP_DEV_FD),
+ "IFLA_PPP_UNSPEC": ValueOf(syscall.IFLA_PPP_UNSPEC),
+ "IFLA_PRIORITY": ValueOf(syscall.IFLA_PRIORITY),
+ "IFLA_PROMISCUITY": ValueOf(syscall.IFLA_PROMISCUITY),
+ "IFLA_PROTINFO": ValueOf(syscall.IFLA_PROTINFO),
+ "IFLA_PROTO_DOWN": ValueOf(syscall.IFLA_PROTO_DOWN),
+ "IFLA_QDISC": ValueOf(syscall.IFLA_QDISC),
+ "IFLA_STATS": ValueOf(syscall.IFLA_STATS),
+ "IFLA_STATS64": ValueOf(syscall.IFLA_STATS64),
+ "IFLA_STATS_AF_SPEC": ValueOf(syscall.IFLA_STATS_AF_SPEC),
+ "IFLA_STATS_LINK_64": ValueOf(syscall.IFLA_STATS_LINK_64),
+ "IFLA_STATS_LINK_OFFLOAD_XSTATS": ValueOf(syscall.IFLA_STATS_LINK_OFFLOAD_XSTATS),
+ "IFLA_STATS_LINK_XSTATS": ValueOf(syscall.IFLA_STATS_LINK_XSTATS),
+ "IFLA_STATS_LINK_XSTATS_SLAVE": ValueOf(syscall.IFLA_STATS_LINK_XSTATS_SLAVE),
+ "IFLA_STATS_UNSPEC": ValueOf(syscall.IFLA_STATS_UNSPEC),
+ "IFLA_TXQLEN": ValueOf(syscall.IFLA_TXQLEN),
+ "IFLA_UNSPEC": ValueOf(syscall.IFLA_UNSPEC),
+ "IFLA_VFINFO_LIST": ValueOf(syscall.IFLA_VFINFO_LIST),
+ "IFLA_VF_IB_NODE_GUID": ValueOf(syscall.IFLA_VF_IB_NODE_GUID),
+ "IFLA_VF_IB_PORT_GUID": ValueOf(syscall.IFLA_VF_IB_PORT_GUID),
+ "IFLA_VF_INFO": ValueOf(syscall.IFLA_VF_INFO),
+ "IFLA_VF_INFO_UNSPEC": ValueOf(syscall.IFLA_VF_INFO_UNSPEC),
+ "IFLA_VF_LINK_STATE": ValueOf(syscall.IFLA_VF_LINK_STATE),
+ "IFLA_VF_LINK_STATE_AUTO": ValueOf(syscall.IFLA_VF_LINK_STATE_AUTO),
+ "IFLA_VF_LINK_STATE_DISABLE": ValueOf(syscall.IFLA_VF_LINK_STATE_DISABLE),
+ "IFLA_VF_LINK_STATE_ENABLE": ValueOf(syscall.IFLA_VF_LINK_STATE_ENABLE),
+ "IFLA_VF_MAC": ValueOf(syscall.IFLA_VF_MAC),
+ "IFLA_VF_PORT": ValueOf(syscall.IFLA_VF_PORT),
+ "IFLA_VF_PORTS": ValueOf(syscall.IFLA_VF_PORTS),
+ "IFLA_VF_PORT_UNSPEC": ValueOf(syscall.IFLA_VF_PORT_UNSPEC),
+ "IFLA_VF_RATE": ValueOf(syscall.IFLA_VF_RATE),
+ "IFLA_VF_RSS_QUERY_EN": ValueOf(syscall.IFLA_VF_RSS_QUERY_EN),
+ "IFLA_VF_SPOOFCHK": ValueOf(syscall.IFLA_VF_SPOOFCHK),
+ "IFLA_VF_STATS": ValueOf(syscall.IFLA_VF_STATS),
+ "IFLA_VF_STATS_BROADCAST": ValueOf(syscall.IFLA_VF_STATS_BROADCAST),
+ "IFLA_VF_STATS_MULTICAST": ValueOf(syscall.IFLA_VF_STATS_MULTICAST),
+ "IFLA_VF_STATS_PAD": ValueOf(syscall.IFLA_VF_STATS_PAD),
+ "IFLA_VF_STATS_RX_BYTES": ValueOf(syscall.IFLA_VF_STATS_RX_BYTES),
+ "IFLA_VF_STATS_RX_PACKETS": ValueOf(syscall.IFLA_VF_STATS_RX_PACKETS),
+ "IFLA_VF_STATS_TX_BYTES": ValueOf(syscall.IFLA_VF_STATS_TX_BYTES),
+ "IFLA_VF_STATS_TX_PACKETS": ValueOf(syscall.IFLA_VF_STATS_TX_PACKETS),
+ "IFLA_VF_TRUST": ValueOf(syscall.IFLA_VF_TRUST),
+ "IFLA_VF_TX_RATE": ValueOf(syscall.IFLA_VF_TX_RATE),
+ "IFLA_VF_UNSPEC": ValueOf(syscall.IFLA_VF_UNSPEC),
+ "IFLA_VF_VLAN": ValueOf(syscall.IFLA_VF_VLAN),
+ "IFLA_VF_VLAN_INFO": ValueOf(syscall.IFLA_VF_VLAN_INFO),
+ "IFLA_VF_VLAN_INFO_UNSPEC": ValueOf(syscall.IFLA_VF_VLAN_INFO_UNSPEC),
+ "IFLA_VF_VLAN_LIST": ValueOf(syscall.IFLA_VF_VLAN_LIST),
+ "IFLA_VLAN_EGRESS_QOS": ValueOf(syscall.IFLA_VLAN_EGRESS_QOS),
+ "IFLA_VLAN_FLAGS": ValueOf(syscall.IFLA_VLAN_FLAGS),
+ "IFLA_VLAN_ID": ValueOf(syscall.IFLA_VLAN_ID),
+ "IFLA_VLAN_INGRESS_QOS": ValueOf(syscall.IFLA_VLAN_INGRESS_QOS),
+ "IFLA_VLAN_PROTOCOL": ValueOf(syscall.IFLA_VLAN_PROTOCOL),
+ "IFLA_VLAN_QOS_MAPPING": ValueOf(syscall.IFLA_VLAN_QOS_MAPPING),
+ "IFLA_VLAN_QOS_UNSPEC": ValueOf(syscall.IFLA_VLAN_QOS_UNSPEC),
+ "IFLA_VLAN_UNSPEC": ValueOf(syscall.IFLA_VLAN_UNSPEC),
+ "IFLA_VRF_PORT_TABLE": ValueOf(syscall.IFLA_VRF_PORT_TABLE),
+ "IFLA_VRF_PORT_UNSPEC": ValueOf(syscall.IFLA_VRF_PORT_UNSPEC),
+ "IFLA_VRF_TABLE": ValueOf(syscall.IFLA_VRF_TABLE),
+ "IFLA_VRF_UNSPEC": ValueOf(syscall.IFLA_VRF_UNSPEC),
+ "IFLA_VXLAN_AGEING": ValueOf(syscall.IFLA_VXLAN_AGEING),
+ "IFLA_VXLAN_COLLECT_METADATA": ValueOf(syscall.IFLA_VXLAN_COLLECT_METADATA),
+ "IFLA_VXLAN_GBP": ValueOf(syscall.IFLA_VXLAN_GBP),
+ "IFLA_VXLAN_GPE": ValueOf(syscall.IFLA_VXLAN_GPE),
+ "IFLA_VXLAN_GROUP": ValueOf(syscall.IFLA_VXLAN_GROUP),
+ "IFLA_VXLAN_GROUP6": ValueOf(syscall.IFLA_VXLAN_GROUP6),
+ "IFLA_VXLAN_ID": ValueOf(syscall.IFLA_VXLAN_ID),
+ "IFLA_VXLAN_L2MISS": ValueOf(syscall.IFLA_VXLAN_L2MISS),
+ "IFLA_VXLAN_L3MISS": ValueOf(syscall.IFLA_VXLAN_L3MISS),
+ "IFLA_VXLAN_LABEL": ValueOf(syscall.IFLA_VXLAN_LABEL),
+ "IFLA_VXLAN_LEARNING": ValueOf(syscall.IFLA_VXLAN_LEARNING),
+ "IFLA_VXLAN_LIMIT": ValueOf(syscall.IFLA_VXLAN_LIMIT),
+ "IFLA_VXLAN_LINK": ValueOf(syscall.IFLA_VXLAN_LINK),
+ "IFLA_VXLAN_LOCAL": ValueOf(syscall.IFLA_VXLAN_LOCAL),
+ "IFLA_VXLAN_LOCAL6": ValueOf(syscall.IFLA_VXLAN_LOCAL6),
+ "IFLA_VXLAN_PORT": ValueOf(syscall.IFLA_VXLAN_PORT),
+ "IFLA_VXLAN_PORT_RANGE": ValueOf(syscall.IFLA_VXLAN_PORT_RANGE),
+ "IFLA_VXLAN_PROXY": ValueOf(syscall.IFLA_VXLAN_PROXY),
+ "IFLA_VXLAN_REMCSUM_NOPARTIAL": ValueOf(syscall.IFLA_VXLAN_REMCSUM_NOPARTIAL),
+ "IFLA_VXLAN_REMCSUM_RX": ValueOf(syscall.IFLA_VXLAN_REMCSUM_RX),
+ "IFLA_VXLAN_REMCSUM_TX": ValueOf(syscall.IFLA_VXLAN_REMCSUM_TX),
+ "IFLA_VXLAN_RSC": ValueOf(syscall.IFLA_VXLAN_RSC),
+ "IFLA_VXLAN_TOS": ValueOf(syscall.IFLA_VXLAN_TOS),
+ "IFLA_VXLAN_TTL": ValueOf(syscall.IFLA_VXLAN_TTL),
+ "IFLA_VXLAN_UDP_CSUM": ValueOf(syscall.IFLA_VXLAN_UDP_CSUM),
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_RX": ValueOf(syscall.IFLA_VXLAN_UDP_ZERO_CSUM6_RX),
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_TX": ValueOf(syscall.IFLA_VXLAN_UDP_ZERO_CSUM6_TX),
+ "IFLA_VXLAN_UNSPEC": ValueOf(syscall.IFLA_VXLAN_UNSPEC),
+ "IFLA_WEIGHT": ValueOf(syscall.IFLA_WEIGHT),
+ "IFLA_WIRELESS": ValueOf(syscall.IFLA_WIRELESS),
+ "IFLA_XDP": ValueOf(syscall.IFLA_XDP),
+ "IFLA_XDP_ATTACHED": ValueOf(syscall.IFLA_XDP_ATTACHED),
+ "IFLA_XDP_FD": ValueOf(syscall.IFLA_XDP_FD),
+ "IFLA_XDP_FLAGS": ValueOf(syscall.IFLA_XDP_FLAGS),
+ "IFLA_XDP_PROG_ID": ValueOf(syscall.IFLA_XDP_PROG_ID),
+ "IFLA_XDP_UNSPEC": ValueOf(syscall.IFLA_XDP_UNSPEC),
+ "IFNAMSIZ": ValueOf(syscall.IFNAMSIZ),
+ "IGNBRK": ValueOf(syscall.IGNBRK),
+ "IGNCR": ValueOf(syscall.IGNCR),
+ "IGNPAR": ValueOf(syscall.IGNPAR),
+ "IMAXBEL": ValueOf(syscall.IMAXBEL),
+ "INLCR": ValueOf(syscall.INLCR),
+ "INPCK": ValueOf(syscall.INPCK),
+ "IN_ACCESS": ValueOf(syscall.IN_ACCESS),
+ "IN_ALL_EVENTS": ValueOf(syscall.IN_ALL_EVENTS),
+ "IN_ATTRIB": ValueOf(syscall.IN_ATTRIB),
+ "IN_CLASSA_HOST": ValueOf(syscall.IN_CLASSA_HOST),
+ "IN_CLASSA_MAX": ValueOf(syscall.IN_CLASSA_MAX),
+ "IN_CLASSA_NET": ValueOf(uint32(syscall.IN_CLASSA_NET)),
+ "IN_CLASSA_NSHIFT": ValueOf(syscall.IN_CLASSA_NSHIFT),
+ "IN_CLASSB_HOST": ValueOf(syscall.IN_CLASSB_HOST),
+ "IN_CLASSB_MAX": ValueOf(syscall.IN_CLASSB_MAX),
+ "IN_CLASSB_NET": ValueOf(uint32(syscall.IN_CLASSB_NET)),
+ "IN_CLASSB_NSHIFT": ValueOf(syscall.IN_CLASSB_NSHIFT),
+ "IN_CLASSC_HOST": ValueOf(syscall.IN_CLASSC_HOST),
+ "IN_CLASSC_NET": ValueOf(uint32(syscall.IN_CLASSC_NET)),
+ "IN_CLASSC_NSHIFT": ValueOf(syscall.IN_CLASSC_NSHIFT),
+ "IN_CLOEXEC": ValueOf(syscall.IN_CLOEXEC),
+ "IN_CLOSE": ValueOf(syscall.IN_CLOSE),
+ "IN_CLOSE_NOWRITE": ValueOf(syscall.IN_CLOSE_NOWRITE),
+ "IN_CLOSE_WRITE": ValueOf(syscall.IN_CLOSE_WRITE),
+ "IN_CREATE": ValueOf(syscall.IN_CREATE),
+ "IN_DELETE": ValueOf(syscall.IN_DELETE),
+ "IN_DELETE_SELF": ValueOf(syscall.IN_DELETE_SELF),
+ "IN_DONT_FOLLOW": ValueOf(syscall.IN_DONT_FOLLOW),
+ "IN_EXCL_UNLINK": ValueOf(syscall.IN_EXCL_UNLINK),
+ "IN_IGNORED": ValueOf(syscall.IN_IGNORED),
+ "IN_ISDIR": ValueOf(syscall.IN_ISDIR),
+ "IN_LOOPBACKNET": ValueOf(syscall.IN_LOOPBACKNET),
+ "IN_MASK_ADD": ValueOf(syscall.IN_MASK_ADD),
+ "IN_MODIFY": ValueOf(syscall.IN_MODIFY),
+ "IN_MOVE": ValueOf(syscall.IN_MOVE),
+ "IN_MOVED_FROM": ValueOf(syscall.IN_MOVED_FROM),
+ "IN_MOVED_TO": ValueOf(syscall.IN_MOVED_TO),
+ "IN_MOVE_SELF": ValueOf(syscall.IN_MOVE_SELF),
+ "IN_NONBLOCK": ValueOf(syscall.IN_NONBLOCK),
+ "IN_ONESHOT": ValueOf(uint32(syscall.IN_ONESHOT)),
+ "IN_ONLYDIR": ValueOf(syscall.IN_ONLYDIR),
+ "IN_OPEN": ValueOf(syscall.IN_OPEN),
+ "IN_Q_OVERFLOW": ValueOf(syscall.IN_Q_OVERFLOW),
+ "IN_UNMOUNT": ValueOf(syscall.IN_UNMOUNT),
+ "IPPROTO_AH": ValueOf(syscall.IPPROTO_AH),
+ "IPPROTO_BEETPH": ValueOf(syscall.IPPROTO_BEETPH),
+ "IPPROTO_COMP": ValueOf(syscall.IPPROTO_COMP),
+ "IPPROTO_DCCP": ValueOf(syscall.IPPROTO_DCCP),
+ "IPPROTO_DSTOPTS": ValueOf(syscall.IPPROTO_DSTOPTS),
+ "IPPROTO_EGP": ValueOf(syscall.IPPROTO_EGP),
+ "IPPROTO_ENCAP": ValueOf(syscall.IPPROTO_ENCAP),
+ "IPPROTO_ESP": ValueOf(syscall.IPPROTO_ESP),
+ "IPPROTO_FRAGMENT": ValueOf(syscall.IPPROTO_FRAGMENT),
+ "IPPROTO_GRE": ValueOf(syscall.IPPROTO_GRE),
+ "IPPROTO_HOPOPTS": ValueOf(syscall.IPPROTO_HOPOPTS),
+ "IPPROTO_ICMP": ValueOf(syscall.IPPROTO_ICMP),
+ "IPPROTO_ICMPV6": ValueOf(syscall.IPPROTO_ICMPV6),
+ "IPPROTO_IDP": ValueOf(syscall.IPPROTO_IDP),
+ "IPPROTO_IGMP": ValueOf(syscall.IPPROTO_IGMP),
+ "IPPROTO_IP": ValueOf(syscall.IPPROTO_IP),
+ "IPPROTO_IPIP": ValueOf(syscall.IPPROTO_IPIP),
+ "IPPROTO_IPV6": ValueOf(syscall.IPPROTO_IPV6),
+ "IPPROTO_MAX": ValueOf(syscall.IPPROTO_MAX),
+ "IPPROTO_MH": ValueOf(syscall.IPPROTO_MH),
+ "IPPROTO_MPLS": ValueOf(syscall.IPPROTO_MPLS),
+ "IPPROTO_MTP": ValueOf(syscall.IPPROTO_MTP),
+ "IPPROTO_NONE": ValueOf(syscall.IPPROTO_NONE),
+ "IPPROTO_PIM": ValueOf(syscall.IPPROTO_PIM),
+ "IPPROTO_PUP": ValueOf(syscall.IPPROTO_PUP),
+ "IPPROTO_RAW": ValueOf(syscall.IPPROTO_RAW),
+ "IPPROTO_ROUTING": ValueOf(syscall.IPPROTO_ROUTING),
+ "IPPROTO_RSVP": ValueOf(syscall.IPPROTO_RSVP),
+ "IPPROTO_SCTP": ValueOf(syscall.IPPROTO_SCTP),
+ "IPPROTO_TCP": ValueOf(syscall.IPPROTO_TCP),
+ "IPPROTO_TP": ValueOf(syscall.IPPROTO_TP),
+ "IPPROTO_UDP": ValueOf(syscall.IPPROTO_UDP),
+ "IPPROTO_UDPLITE": ValueOf(syscall.IPPROTO_UDPLITE),
+ "IPV6_2292DSTOPTS": ValueOf(syscall.IPV6_2292DSTOPTS),
+ "IPV6_2292HOPLIMIT": ValueOf(syscall.IPV6_2292HOPLIMIT),
+ "IPV6_2292HOPOPTS": ValueOf(syscall.IPV6_2292HOPOPTS),
+ "IPV6_2292PKTINFO": ValueOf(syscall.IPV6_2292PKTINFO),
+ "IPV6_2292PKTOPTIONS": ValueOf(syscall.IPV6_2292PKTOPTIONS),
+ "IPV6_2292RTHDR": ValueOf(syscall.IPV6_2292RTHDR),
+ "IPV6_ADDRFORM": ValueOf(syscall.IPV6_ADDRFORM),
+ "IPV6_ADDR_PREFERENCES": ValueOf(syscall.IPV6_ADDR_PREFERENCES),
+ "IPV6_ADD_MEMBERSHIP": ValueOf(syscall.IPV6_ADD_MEMBERSHIP),
+ "IPV6_AUTHHDR": ValueOf(syscall.IPV6_AUTHHDR),
+ "IPV6_AUTOFLOWLABEL": ValueOf(syscall.IPV6_AUTOFLOWLABEL),
+ "IPV6_CHECKSUM": ValueOf(syscall.IPV6_CHECKSUM),
+ "IPV6_DONTFRAG": ValueOf(syscall.IPV6_DONTFRAG),
+ "IPV6_DROP_MEMBERSHIP": ValueOf(syscall.IPV6_DROP_MEMBERSHIP),
+ "IPV6_DSTOPTS": ValueOf(syscall.IPV6_DSTOPTS),
+ "IPV6_HDRINCL": ValueOf(syscall.IPV6_HDRINCL),
+ "IPV6_HOPLIMIT": ValueOf(syscall.IPV6_HOPLIMIT),
+ "IPV6_HOPOPTS": ValueOf(syscall.IPV6_HOPOPTS),
+ "IPV6_IPSEC_POLICY": ValueOf(syscall.IPV6_IPSEC_POLICY),
+ "IPV6_JOIN_ANYCAST": ValueOf(syscall.IPV6_JOIN_ANYCAST),
+ "IPV6_JOIN_GROUP": ValueOf(syscall.IPV6_JOIN_GROUP),
+ "IPV6_LEAVE_ANYCAST": ValueOf(syscall.IPV6_LEAVE_ANYCAST),
+ "IPV6_LEAVE_GROUP": ValueOf(syscall.IPV6_LEAVE_GROUP),
+ "IPV6_MINHOPCOUNT": ValueOf(syscall.IPV6_MINHOPCOUNT),
+ "IPV6_MTU": ValueOf(syscall.IPV6_MTU),
+ "IPV6_MTU_DISCOVER": ValueOf(syscall.IPV6_MTU_DISCOVER),
+ "IPV6_MULTICAST_HOPS": ValueOf(syscall.IPV6_MULTICAST_HOPS),
+ "IPV6_MULTICAST_IF": ValueOf(syscall.IPV6_MULTICAST_IF),
+ "IPV6_MULTICAST_LOOP": ValueOf(syscall.IPV6_MULTICAST_LOOP),
+ "IPV6_NEXTHOP": ValueOf(syscall.IPV6_NEXTHOP),
+ "IPV6_ORIGDSTADDR": ValueOf(syscall.IPV6_ORIGDSTADDR),
+ "IPV6_PATHMTU": ValueOf(syscall.IPV6_PATHMTU),
+ "IPV6_PKTINFO": ValueOf(syscall.IPV6_PKTINFO),
+ "IPV6_PMTUDISC_DO": ValueOf(syscall.IPV6_PMTUDISC_DO),
+ "IPV6_PMTUDISC_DONT": ValueOf(syscall.IPV6_PMTUDISC_DONT),
+ "IPV6_PMTUDISC_INTERFACE": ValueOf(syscall.IPV6_PMTUDISC_INTERFACE),
+ "IPV6_PMTUDISC_OMIT": ValueOf(syscall.IPV6_PMTUDISC_OMIT),
+ "IPV6_PMTUDISC_PROBE": ValueOf(syscall.IPV6_PMTUDISC_PROBE),
+ "IPV6_PMTUDISC_WANT": ValueOf(syscall.IPV6_PMTUDISC_WANT),
+ "IPV6_RECVDSTOPTS": ValueOf(syscall.IPV6_RECVDSTOPTS),
+ "IPV6_RECVERR": ValueOf(syscall.IPV6_RECVERR),
+ "IPV6_RECVFRAGSIZE": ValueOf(syscall.IPV6_RECVFRAGSIZE),
+ "IPV6_RECVHOPLIMIT": ValueOf(syscall.IPV6_RECVHOPLIMIT),
+ "IPV6_RECVHOPOPTS": ValueOf(syscall.IPV6_RECVHOPOPTS),
+ "IPV6_RECVORIGDSTADDR": ValueOf(syscall.IPV6_RECVORIGDSTADDR),
+ "IPV6_RECVPATHMTU": ValueOf(syscall.IPV6_RECVPATHMTU),
+ "IPV6_RECVPKTINFO": ValueOf(syscall.IPV6_RECVPKTINFO),
+ "IPV6_RECVRTHDR": ValueOf(syscall.IPV6_RECVRTHDR),
+ "IPV6_RECVTCLASS": ValueOf(syscall.IPV6_RECVTCLASS),
+ "IPV6_ROUTER_ALERT": ValueOf(syscall.IPV6_ROUTER_ALERT),
+ "IPV6_RTHDR": ValueOf(syscall.IPV6_RTHDR),
+ "IPV6_RTHDRDSTOPTS": ValueOf(syscall.IPV6_RTHDRDSTOPTS),
+ "IPV6_RTHDR_LOOSE": ValueOf(syscall.IPV6_RTHDR_LOOSE),
+ "IPV6_RTHDR_STRICT": ValueOf(syscall.IPV6_RTHDR_STRICT),
+ "IPV6_RTHDR_TYPE_0": ValueOf(syscall.IPV6_RTHDR_TYPE_0),
+ "IPV6_RXDSTOPTS": ValueOf(syscall.IPV6_RXDSTOPTS),
+ "IPV6_RXHOPOPTS": ValueOf(syscall.IPV6_RXHOPOPTS),
+ "IPV6_TCLASS": ValueOf(syscall.IPV6_TCLASS),
+ "IPV6_TRANSPARENT": ValueOf(syscall.IPV6_TRANSPARENT),
+ "IPV6_UNICAST_HOPS": ValueOf(syscall.IPV6_UNICAST_HOPS),
+ "IPV6_UNICAST_IF": ValueOf(syscall.IPV6_UNICAST_IF),
+ "IPV6_V6ONLY": ValueOf(syscall.IPV6_V6ONLY),
+ "IPV6_XFRM_POLICY": ValueOf(syscall.IPV6_XFRM_POLICY),
+ "IP_ADD_MEMBERSHIP": ValueOf(syscall.IP_ADD_MEMBERSHIP),
+ "IP_ADD_SOURCE_MEMBERSHIP": ValueOf(syscall.IP_ADD_SOURCE_MEMBERSHIP),
+ "IP_BIND_ADDRESS_NO_PORT": ValueOf(syscall.IP_BIND_ADDRESS_NO_PORT),
+ "IP_BLOCK_SOURCE": ValueOf(syscall.IP_BLOCK_SOURCE),
+ "IP_CHECKSUM": ValueOf(syscall.IP_CHECKSUM),
+ "IP_DEFAULT_MULTICAST_LOOP": ValueOf(syscall.IP_DEFAULT_MULTICAST_LOOP),
+ "IP_DEFAULT_MULTICAST_TTL": ValueOf(syscall.IP_DEFAULT_MULTICAST_TTL),
+ "IP_DF": ValueOf(syscall.IP_DF),
+ "IP_DROP_MEMBERSHIP": ValueOf(syscall.IP_DROP_MEMBERSHIP),
+ "IP_DROP_SOURCE_MEMBERSHIP": ValueOf(syscall.IP_DROP_SOURCE_MEMBERSHIP),
+ "IP_FREEBIND": ValueOf(syscall.IP_FREEBIND),
+ "IP_HDRINCL": ValueOf(syscall.IP_HDRINCL),
+ "IP_IPSEC_POLICY": ValueOf(syscall.IP_IPSEC_POLICY),
+ "IP_MAXPACKET": ValueOf(syscall.IP_MAXPACKET),
+ "IP_MAX_MEMBERSHIPS": ValueOf(syscall.IP_MAX_MEMBERSHIPS),
+ "IP_MF": ValueOf(syscall.IP_MF),
+ "IP_MINTTL": ValueOf(syscall.IP_MINTTL),
+ "IP_MSFILTER": ValueOf(syscall.IP_MSFILTER),
+ "IP_MSS": ValueOf(syscall.IP_MSS),
+ "IP_MTU": ValueOf(syscall.IP_MTU),
+ "IP_MTU_DISCOVER": ValueOf(syscall.IP_MTU_DISCOVER),
+ "IP_MULTICAST_ALL": ValueOf(syscall.IP_MULTICAST_ALL),
+ "IP_MULTICAST_IF": ValueOf(syscall.IP_MULTICAST_IF),
+ "IP_MULTICAST_LOOP": ValueOf(syscall.IP_MULTICAST_LOOP),
+ "IP_MULTICAST_TTL": ValueOf(syscall.IP_MULTICAST_TTL),
+ "IP_NODEFRAG": ValueOf(syscall.IP_NODEFRAG),
+ "IP_OFFMASK": ValueOf(syscall.IP_OFFMASK),
+ "IP_OPTIONS": ValueOf(syscall.IP_OPTIONS),
+ "IP_ORIGDSTADDR": ValueOf(syscall.IP_ORIGDSTADDR),
+ "IP_PASSSEC": ValueOf(syscall.IP_PASSSEC),
+ "IP_PKTINFO": ValueOf(syscall.IP_PKTINFO),
+ "IP_PKTOPTIONS": ValueOf(syscall.IP_PKTOPTIONS),
+ "IP_PMTUDISC": ValueOf(syscall.IP_PMTUDISC),
+ "IP_PMTUDISC_DO": ValueOf(syscall.IP_PMTUDISC_DO),
+ "IP_PMTUDISC_DONT": ValueOf(syscall.IP_PMTUDISC_DONT),
+ "IP_PMTUDISC_INTERFACE": ValueOf(syscall.IP_PMTUDISC_INTERFACE),
+ "IP_PMTUDISC_OMIT": ValueOf(syscall.IP_PMTUDISC_OMIT),
+ "IP_PMTUDISC_PROBE": ValueOf(syscall.IP_PMTUDISC_PROBE),
+ "IP_PMTUDISC_WANT": ValueOf(syscall.IP_PMTUDISC_WANT),
+ "IP_RECVERR": ValueOf(syscall.IP_RECVERR),
+ "IP_RECVFRAGSIZE": ValueOf(syscall.IP_RECVFRAGSIZE),
+ "IP_RECVOPTS": ValueOf(syscall.IP_RECVOPTS),
+ "IP_RECVORIGDSTADDR": ValueOf(syscall.IP_RECVORIGDSTADDR),
+ "IP_RECVTOS": ValueOf(syscall.IP_RECVTOS),
+ "IP_RECVTTL": ValueOf(syscall.IP_RECVTTL),
+ "IP_RETOPTS": ValueOf(syscall.IP_RETOPTS),
+ "IP_RF": ValueOf(syscall.IP_RF),
+ "IP_ROUTER_ALERT": ValueOf(syscall.IP_ROUTER_ALERT),
+ "IP_TOS": ValueOf(syscall.IP_TOS),
+ "IP_TRANSPARENT": ValueOf(syscall.IP_TRANSPARENT),
+ "IP_TTL": ValueOf(syscall.IP_TTL),
+ "IP_UNBLOCK_SOURCE": ValueOf(syscall.IP_UNBLOCK_SOURCE),
+ "IP_UNICAST_IF": ValueOf(syscall.IP_UNICAST_IF),
+ "IP_XFRM_POLICY": ValueOf(syscall.IP_XFRM_POLICY),
+ "ISIG": ValueOf(syscall.ISIG),
+ "ISTRIP": ValueOf(syscall.ISTRIP),
+ "IUCLC": ValueOf(syscall.IUCLC),
+ "IUTF8": ValueOf(syscall.IUTF8),
+ "IXANY": ValueOf(syscall.IXANY),
+ "IXOFF": ValueOf(syscall.IXOFF),
+ "IXON": ValueOf(syscall.IXON),
+ "ImplementsGetwd": ValueOf(syscall.ImplementsGetwd),
+ "InotifyAddWatch": ValueOf(syscall.InotifyAddWatch),
+ "InotifyInit": ValueOf(syscall.InotifyInit),
+ "InotifyInit1": ValueOf(syscall.InotifyInit1),
+ "InotifyRmWatch": ValueOf(syscall.InotifyRmWatch),
+ "Kill": ValueOf(syscall.Kill),
+ "Klogctl": ValueOf(syscall.Klogctl),
+ "LINUX_REBOOT_CMD_CAD_OFF": ValueOf(syscall.LINUX_REBOOT_CMD_CAD_OFF),
+ "LINUX_REBOOT_CMD_CAD_ON": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_CAD_ON)),
+ "LINUX_REBOOT_CMD_HALT": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_HALT)),
+ "LINUX_REBOOT_CMD_KEXEC": ValueOf(syscall.LINUX_REBOOT_CMD_KEXEC),
+ "LINUX_REBOOT_CMD_POWER_OFF": ValueOf(syscall.LINUX_REBOOT_CMD_POWER_OFF),
+ "LINUX_REBOOT_CMD_RESTART": ValueOf(syscall.LINUX_REBOOT_CMD_RESTART),
+ "LINUX_REBOOT_CMD_RESTART2": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_RESTART2)),
+ "LINUX_REBOOT_CMD_SW_SUSPEND": ValueOf(uint32(syscall.LINUX_REBOOT_CMD_SW_SUSPEND)),
+ "LINUX_REBOOT_MAGIC1": ValueOf(uint32(syscall.LINUX_REBOOT_MAGIC1)),
+ "LINUX_REBOOT_MAGIC2": ValueOf(syscall.LINUX_REBOOT_MAGIC2),
+ "LINUX_REBOOT_MAGIC2A": ValueOf(syscall.LINUX_REBOOT_MAGIC2A),
+ "LINUX_REBOOT_MAGIC2B": ValueOf(syscall.LINUX_REBOOT_MAGIC2B),
+ "LINUX_REBOOT_MAGIC2C": ValueOf(syscall.LINUX_REBOOT_MAGIC2C),
+ "LOCK_EX": ValueOf(syscall.LOCK_EX),
+ "LOCK_MAND": ValueOf(syscall.LOCK_MAND),
+ "LOCK_NB": ValueOf(syscall.LOCK_NB),
+ "LOCK_READ": ValueOf(syscall.LOCK_READ),
+ "LOCK_RW": ValueOf(syscall.LOCK_RW),
+ "LOCK_SH": ValueOf(syscall.LOCK_SH),
+ "LOCK_UN": ValueOf(syscall.LOCK_UN),
+ "LOCK_WRITE": ValueOf(syscall.LOCK_WRITE),
+ "Lchown": ValueOf(syscall.Lchown),
+ "Link": ValueOf(syscall.Link),
+ "Listen": ValueOf(syscall.Listen),
+ "Listxattr": ValueOf(syscall.Listxattr),
+ "LsfJump": ValueOf(syscall.LsfJump),
+ "LsfSocket": ValueOf(syscall.LsfSocket),
+ "LsfStmt": ValueOf(syscall.LsfStmt),
+ "Lstat": ValueOf(syscall.Lstat),
+ "MADV_DODUMP": ValueOf(syscall.MADV_DODUMP),
+ "MADV_DOFORK": ValueOf(syscall.MADV_DOFORK),
+ "MADV_DONTDUMP": ValueOf(syscall.MADV_DONTDUMP),
+ "MADV_DONTFORK": ValueOf(syscall.MADV_DONTFORK),
+ "MADV_DONTNEED": ValueOf(syscall.MADV_DONTNEED),
+ "MADV_FREE": ValueOf(syscall.MADV_FREE),
+ "MADV_HUGEPAGE": ValueOf(syscall.MADV_HUGEPAGE),
+ "MADV_HWPOISON": ValueOf(syscall.MADV_HWPOISON),
+ "MADV_KEEPONFORK": ValueOf(syscall.MADV_KEEPONFORK),
+ "MADV_MERGEABLE": ValueOf(syscall.MADV_MERGEABLE),
+ "MADV_NOHUGEPAGE": ValueOf(syscall.MADV_NOHUGEPAGE),
+ "MADV_NORMAL": ValueOf(syscall.MADV_NORMAL),
+ "MADV_RANDOM": ValueOf(syscall.MADV_RANDOM),
+ "MADV_REMOVE": ValueOf(syscall.MADV_REMOVE),
+ "MADV_SEQUENTIAL": ValueOf(syscall.MADV_SEQUENTIAL),
+ "MADV_UNMERGEABLE": ValueOf(syscall.MADV_UNMERGEABLE),
+ "MADV_WILLNEED": ValueOf(syscall.MADV_WILLNEED),
+ "MADV_WIPEONFORK": ValueOf(syscall.MADV_WIPEONFORK),
+ "MAP_ANON": ValueOf(syscall.MAP_ANON),
+ "MAP_ANONYMOUS": ValueOf(syscall.MAP_ANONYMOUS),
+ "MAP_DENYWRITE": ValueOf(syscall.MAP_DENYWRITE),
+ "MAP_EXECUTABLE": ValueOf(syscall.MAP_EXECUTABLE),
+ "MAP_FILE": ValueOf(syscall.MAP_FILE),
+ "MAP_FIXED": ValueOf(syscall.MAP_FIXED),
+ "MAP_GROWSDOWN": ValueOf(syscall.MAP_GROWSDOWN),
+ "MAP_HUGETLB": ValueOf(syscall.MAP_HUGETLB),
+ "MAP_HUGE_MASK": ValueOf(syscall.MAP_HUGE_MASK),
+ "MAP_HUGE_SHIFT": ValueOf(syscall.MAP_HUGE_SHIFT),
+ "MAP_LOCKED": ValueOf(syscall.MAP_LOCKED),
+ "MAP_NONBLOCK": ValueOf(syscall.MAP_NONBLOCK),
+ "MAP_NORESERVE": ValueOf(syscall.MAP_NORESERVE),
+ "MAP_POPULATE": ValueOf(syscall.MAP_POPULATE),
+ "MAP_PRIVATE": ValueOf(syscall.MAP_PRIVATE),
+ "MAP_SHARED": ValueOf(syscall.MAP_SHARED),
+ "MAP_STACK": ValueOf(syscall.MAP_STACK),
+ "MAP_TYPE": ValueOf(syscall.MAP_TYPE),
+ "MCL_CURRENT": ValueOf(syscall.MCL_CURRENT),
+ "MCL_FUTURE": ValueOf(syscall.MCL_FUTURE),
+ "MCL_ONFAULT": ValueOf(syscall.MCL_ONFAULT),
+ "MNT_DETACH": ValueOf(syscall.MNT_DETACH),
+ "MNT_EXPIRE": ValueOf(syscall.MNT_EXPIRE),
+ "MNT_FORCE": ValueOf(syscall.MNT_FORCE),
+ "MSG_BATCH": ValueOf(syscall.MSG_BATCH),
+ "MSG_CMSG_CLOEXEC": ValueOf(syscall.MSG_CMSG_CLOEXEC),
+ "MSG_CONFIRM": ValueOf(syscall.MSG_CONFIRM),
+ "MSG_CTRUNC": ValueOf(syscall.MSG_CTRUNC),
+ "MSG_DONTROUTE": ValueOf(syscall.MSG_DONTROUTE),
+ "MSG_DONTWAIT": ValueOf(syscall.MSG_DONTWAIT),
+ "MSG_EOR": ValueOf(syscall.MSG_EOR),
+ "MSG_ERRQUEUE": ValueOf(syscall.MSG_ERRQUEUE),
+ "MSG_FASTOPEN": ValueOf(syscall.MSG_FASTOPEN),
+ "MSG_FIN": ValueOf(syscall.MSG_FIN),
+ "MSG_MORE": ValueOf(syscall.MSG_MORE),
+ "MSG_NOSIGNAL": ValueOf(syscall.MSG_NOSIGNAL),
+ "MSG_OOB": ValueOf(syscall.MSG_OOB),
+ "MSG_PEEK": ValueOf(syscall.MSG_PEEK),
+ "MSG_PROXY": ValueOf(syscall.MSG_PROXY),
+ "MSG_RST": ValueOf(syscall.MSG_RST),
+ "MSG_SYN": ValueOf(syscall.MSG_SYN),
+ "MSG_TRUNC": ValueOf(syscall.MSG_TRUNC),
+ "MSG_TRYHARD": ValueOf(syscall.MSG_TRYHARD),
+ "MSG_WAITALL": ValueOf(syscall.MSG_WAITALL),
+ "MSG_WAITFORONE": ValueOf(syscall.MSG_WAITFORONE),
+ "MSG_ZEROCOPY": ValueOf(syscall.MSG_ZEROCOPY),
+ "MS_ACTIVE": ValueOf(syscall.MS_ACTIVE),
+ "MS_ASYNC": ValueOf(syscall.MS_ASYNC),
+ "MS_BIND": ValueOf(syscall.MS_BIND),
+ "MS_BORN": ValueOf(syscall.MS_BORN),
+ "MS_DIRSYNC": ValueOf(syscall.MS_DIRSYNC),
+ "MS_INVALIDATE": ValueOf(syscall.MS_INVALIDATE),
+ "MS_I_VERSION": ValueOf(syscall.MS_I_VERSION),
+ "MS_KERNMOUNT": ValueOf(syscall.MS_KERNMOUNT),
+ "MS_LAZYTIME": ValueOf(syscall.MS_LAZYTIME),
+ "MS_MANDLOCK": ValueOf(syscall.MS_MANDLOCK),
+ "MS_MGC_MSK": ValueOf(uint32(syscall.MS_MGC_MSK)),
+ "MS_MGC_VAL": ValueOf(uint32(syscall.MS_MGC_VAL)),
+ "MS_MOVE": ValueOf(syscall.MS_MOVE),
+ "MS_NOATIME": ValueOf(syscall.MS_NOATIME),
+ "MS_NODEV": ValueOf(syscall.MS_NODEV),
+ "MS_NODIRATIME": ValueOf(syscall.MS_NODIRATIME),
+ "MS_NOEXEC": ValueOf(syscall.MS_NOEXEC),
+ "MS_NOREMOTELOCK": ValueOf(syscall.MS_NOREMOTELOCK),
+ "MS_NOSEC": ValueOf(syscall.MS_NOSEC),
+ "MS_NOSUID": ValueOf(syscall.MS_NOSUID),
+ "MS_NOUSER": ValueOf(syscall.MS_NOUSER),
+ "MS_POSIXACL": ValueOf(syscall.MS_POSIXACL),
+ "MS_PRIVATE": ValueOf(syscall.MS_PRIVATE),
+ "MS_RDONLY": ValueOf(syscall.MS_RDONLY),
+ "MS_REC": ValueOf(syscall.MS_REC),
+ "MS_RELATIME": ValueOf(syscall.MS_RELATIME),
+ "MS_REMOUNT": ValueOf(syscall.MS_REMOUNT),
+ "MS_RMT_MASK": ValueOf(syscall.MS_RMT_MASK),
+ "MS_SHARED": ValueOf(syscall.MS_SHARED),
+ "MS_SILENT": ValueOf(syscall.MS_SILENT),
+ "MS_SLAVE": ValueOf(syscall.MS_SLAVE),
+ "MS_STRICTATIME": ValueOf(syscall.MS_STRICTATIME),
+ "MS_SUBMOUNT": ValueOf(syscall.MS_SUBMOUNT),
+ "MS_SYNC": ValueOf(syscall.MS_SYNC),
+ "MS_SYNCHRONOUS": ValueOf(syscall.MS_SYNCHRONOUS),
+ "MS_UNBINDABLE": ValueOf(syscall.MS_UNBINDABLE),
+ "MS_VERBOSE": ValueOf(syscall.MS_VERBOSE),
+ "Madvise": ValueOf(syscall.Madvise),
+ "Mkdir": ValueOf(syscall.Mkdir),
+ "Mkdirat": ValueOf(syscall.Mkdirat),
+ "Mkfifo": ValueOf(syscall.Mkfifo),
+ "Mknod": ValueOf(syscall.Mknod),
+ "Mknodat": ValueOf(syscall.Mknodat),
+ "Mlock": ValueOf(syscall.Mlock),
+ "Mlockall": ValueOf(syscall.Mlockall),
+ "Mmap": ValueOf(syscall.Mmap),
+ "Mount": ValueOf(syscall.Mount),
+ "Mprotect": ValueOf(syscall.Mprotect),
+ "Munlock": ValueOf(syscall.Munlock),
+ "Munlockall": ValueOf(syscall.Munlockall),
+ "Munmap": ValueOf(syscall.Munmap),
+ "NETLINK_ADD_MEMBERSHIP": ValueOf(syscall.NETLINK_ADD_MEMBERSHIP),
+ "NETLINK_AUDIT": ValueOf(syscall.NETLINK_AUDIT),
+ "NETLINK_BROADCAST_ERROR": ValueOf(syscall.NETLINK_BROADCAST_ERROR),
+ "NETLINK_CAP_ACK": ValueOf(syscall.NETLINK_CAP_ACK),
+ "NETLINK_CONNECTED": ValueOf(syscall.NETLINK_CONNECTED),
+ "NETLINK_CONNECTOR": ValueOf(syscall.NETLINK_CONNECTOR),
+ "NETLINK_CRYPTO": ValueOf(syscall.NETLINK_CRYPTO),
+ "NETLINK_DNRTMSG": ValueOf(syscall.NETLINK_DNRTMSG),
+ "NETLINK_DROP_MEMBERSHIP": ValueOf(syscall.NETLINK_DROP_MEMBERSHIP),
+ "NETLINK_ECRYPTFS": ValueOf(syscall.NETLINK_ECRYPTFS),
+ "NETLINK_EXT_ACK": ValueOf(syscall.NETLINK_EXT_ACK),
+ "NETLINK_FIB_LOOKUP": ValueOf(syscall.NETLINK_FIB_LOOKUP),
+ "NETLINK_FIREWALL": ValueOf(syscall.NETLINK_FIREWALL),
+ "NETLINK_GENERIC": ValueOf(syscall.NETLINK_GENERIC),
+ "NETLINK_INET_DIAG": ValueOf(syscall.NETLINK_INET_DIAG),
+ "NETLINK_IP6_FW": ValueOf(syscall.NETLINK_IP6_FW),
+ "NETLINK_ISCSI": ValueOf(syscall.NETLINK_ISCSI),
+ "NETLINK_KOBJECT_UEVENT": ValueOf(syscall.NETLINK_KOBJECT_UEVENT),
+ "NETLINK_LISTEN_ALL_NSID": ValueOf(syscall.NETLINK_LISTEN_ALL_NSID),
+ "NETLINK_LIST_MEMBERSHIPS": ValueOf(syscall.NETLINK_LIST_MEMBERSHIPS),
+ "NETLINK_NETFILTER": ValueOf(syscall.NETLINK_NETFILTER),
+ "NETLINK_NFLOG": ValueOf(syscall.NETLINK_NFLOG),
+ "NETLINK_NO_ENOBUFS": ValueOf(syscall.NETLINK_NO_ENOBUFS),
+ "NETLINK_PKTINFO": ValueOf(syscall.NETLINK_PKTINFO),
+ "NETLINK_RDMA": ValueOf(syscall.NETLINK_RDMA),
+ "NETLINK_ROUTE": ValueOf(syscall.NETLINK_ROUTE),
+ "NETLINK_RX_RING": ValueOf(syscall.NETLINK_RX_RING),
+ "NETLINK_SCSITRANSPORT": ValueOf(syscall.NETLINK_SCSITRANSPORT),
+ "NETLINK_SELINUX": ValueOf(syscall.NETLINK_SELINUX),
+ "NETLINK_SMC": ValueOf(syscall.NETLINK_SMC),
+ "NETLINK_SOCK_DIAG": ValueOf(syscall.NETLINK_SOCK_DIAG),
+ "NETLINK_TX_RING": ValueOf(syscall.NETLINK_TX_RING),
+ "NETLINK_UNCONNECTED": ValueOf(syscall.NETLINK_UNCONNECTED),
+ "NETLINK_UNUSED": ValueOf(syscall.NETLINK_UNUSED),
+ "NETLINK_USERSOCK": ValueOf(syscall.NETLINK_USERSOCK),
+ "NETLINK_XFRM": ValueOf(syscall.NETLINK_XFRM),
+ "NI_DGRAM": ValueOf(syscall.NI_DGRAM),
+ "NI_IDN": ValueOf(syscall.NI_IDN),
+ "NI_IDN_ALLOW_UNASSIGNED": ValueOf(syscall.NI_IDN_ALLOW_UNASSIGNED),
+ "NI_IDN_USE_STD3_ASCII_RULES": ValueOf(syscall.NI_IDN_USE_STD3_ASCII_RULES),
+ "NI_MAXHOST": ValueOf(syscall.NI_MAXHOST),
+ "NI_MAXSERV": ValueOf(syscall.NI_MAXSERV),
+ "NI_NAMEREQD": ValueOf(syscall.NI_NAMEREQD),
+ "NI_NOFQDN": ValueOf(syscall.NI_NOFQDN),
+ "NI_NUMERICHOST": ValueOf(syscall.NI_NUMERICHOST),
+ "NI_NUMERICSERV": ValueOf(syscall.NI_NUMERICSERV),
+ "NL0": ValueOf(syscall.NL0),
+ "NL1": ValueOf(syscall.NL1),
+ "NLA_ALIGNTO": ValueOf(syscall.NLA_ALIGNTO),
+ "NLA_F_NESTED": ValueOf(syscall.NLA_F_NESTED),
+ "NLA_F_NET_BYTEORDER": ValueOf(syscall.NLA_F_NET_BYTEORDER),
+ "NLA_HDRLEN": ValueOf(syscall.NLA_HDRLEN),
+ "NLA_TYPE_MASK": ValueOf(syscall.NLA_TYPE_MASK),
+ "NLDLY": ValueOf(syscall.NLDLY),
+ "NLMSGERR_ATTR_COOKIE": ValueOf(syscall.NLMSGERR_ATTR_COOKIE),
+ "NLMSGERR_ATTR_MAX": ValueOf(syscall.NLMSGERR_ATTR_MAX),
+ "NLMSGERR_ATTR_MSG": ValueOf(syscall.NLMSGERR_ATTR_MSG),
+ "NLMSGERR_ATTR_OFFS": ValueOf(syscall.NLMSGERR_ATTR_OFFS),
+ "NLMSGERR_ATTR_UNUSED": ValueOf(syscall.NLMSGERR_ATTR_UNUSED),
+ "NLMSG_ALIGNTO": ValueOf(syscall.NLMSG_ALIGNTO),
+ "NLMSG_DONE": ValueOf(syscall.NLMSG_DONE),
+ "NLMSG_ERROR": ValueOf(syscall.NLMSG_ERROR),
+ "NLMSG_HDRLEN": ValueOf(syscall.NLMSG_HDRLEN),
+ "NLMSG_MIN_TYPE": ValueOf(syscall.NLMSG_MIN_TYPE),
+ "NLMSG_NOOP": ValueOf(syscall.NLMSG_NOOP),
+ "NLMSG_OVERRUN": ValueOf(syscall.NLMSG_OVERRUN),
+ "NLM_F_ACK": ValueOf(syscall.NLM_F_ACK),
+ "NLM_F_ACK_TLVS": ValueOf(syscall.NLM_F_ACK_TLVS),
+ "NLM_F_APPEND": ValueOf(syscall.NLM_F_APPEND),
+ "NLM_F_ATOMIC": ValueOf(syscall.NLM_F_ATOMIC),
+ "NLM_F_CAPPED": ValueOf(syscall.NLM_F_CAPPED),
+ "NLM_F_CREATE": ValueOf(syscall.NLM_F_CREATE),
+ "NLM_F_DUMP": ValueOf(syscall.NLM_F_DUMP),
+ "NLM_F_DUMP_FILTERED": ValueOf(syscall.NLM_F_DUMP_FILTERED),
+ "NLM_F_DUMP_INTR": ValueOf(syscall.NLM_F_DUMP_INTR),
+ "NLM_F_ECHO": ValueOf(syscall.NLM_F_ECHO),
+ "NLM_F_EXCL": ValueOf(syscall.NLM_F_EXCL),
+ "NLM_F_MATCH": ValueOf(syscall.NLM_F_MATCH),
+ "NLM_F_MULTI": ValueOf(syscall.NLM_F_MULTI),
+ "NLM_F_NONREC": ValueOf(syscall.NLM_F_NONREC),
+ "NLM_F_REPLACE": ValueOf(syscall.NLM_F_REPLACE),
+ "NLM_F_REQUEST": ValueOf(syscall.NLM_F_REQUEST),
+ "NLM_F_ROOT": ValueOf(syscall.NLM_F_ROOT),
+ "NOFLSH": ValueOf(syscall.NOFLSH),
+ "Nanosleep": ValueOf(syscall.Nanosleep),
+ "NetlinkRIB": ValueOf(syscall.NetlinkRIB),
+ "NsecToTimespec": ValueOf(syscall.NsecToTimespec),
+ "NsecToTimeval": ValueOf(syscall.NsecToTimeval),
+ "OCRNL": ValueOf(syscall.OCRNL),
+ "OFDEL": ValueOf(syscall.OFDEL),
+ "OFILL": ValueOf(syscall.OFILL),
+ "OLCUC": ValueOf(syscall.OLCUC),
+ "ONLCR": ValueOf(syscall.ONLCR),
+ "ONLRET": ValueOf(syscall.ONLRET),
+ "ONOCR": ValueOf(syscall.ONOCR),
+ "OPOST": ValueOf(syscall.OPOST),
+ "OS": ValueOf(syscall.OS),
+ "O_ACCMODE": ValueOf(syscall.O_ACCMODE),
+ "O_APPEND": ValueOf(syscall.O_APPEND),
+ "O_ASYNC": ValueOf(syscall.O_ASYNC),
+ "O_CLOEXEC": ValueOf(syscall.O_CLOEXEC),
+ "O_CREAT": ValueOf(syscall.O_CREAT),
+ "O_DIRECT": ValueOf(syscall.O_DIRECT),
+ "O_DIRECTORY": ValueOf(syscall.O_DIRECTORY),
+ "O_DSYNC": ValueOf(syscall.O_DSYNC),
+ "O_EXCL": ValueOf(syscall.O_EXCL),
+ "O_FSYNC": ValueOf(syscall.O_FSYNC),
+ "O_LARGEFILE": ValueOf(syscall.O_LARGEFILE),
+ "O_NDELAY": ValueOf(syscall.O_NDELAY),
+ "O_NOATIME": ValueOf(syscall.O_NOATIME),
+ "O_NOCTTY": ValueOf(syscall.O_NOCTTY),
+ "O_NOFOLLOW": ValueOf(syscall.O_NOFOLLOW),
+ "O_NONBLOCK": ValueOf(syscall.O_NONBLOCK),
+ "O_PATH": ValueOf(syscall.O_PATH),
+ "O_RDONLY": ValueOf(syscall.O_RDONLY),
+ "O_RDWR": ValueOf(syscall.O_RDWR),
+ "O_RSYNC": ValueOf(syscall.O_RSYNC),
+ "O_SYNC": ValueOf(syscall.O_SYNC),
+ "O_TMPFILE": ValueOf(syscall.O_TMPFILE),
+ "O_TRUNC": ValueOf(syscall.O_TRUNC),
+ "O_WRONLY": ValueOf(syscall.O_WRONLY),
+ "Open": ValueOf(syscall.Open),
+ "Openat": ValueOf(syscall.Openat),
+ "PACKET_ADD_MEMBERSHIP": ValueOf(syscall.PACKET_ADD_MEMBERSHIP),
+ "PACKET_AUXDATA": ValueOf(syscall.PACKET_AUXDATA),
+ "PACKET_BROADCAST": ValueOf(syscall.PACKET_BROADCAST),
+ "PACKET_COPY_THRESH": ValueOf(syscall.PACKET_COPY_THRESH),
+ "PACKET_DROP_MEMBERSHIP": ValueOf(syscall.PACKET_DROP_MEMBERSHIP),
+ "PACKET_FANOUT": ValueOf(syscall.PACKET_FANOUT),
+ "PACKET_FANOUT_DATA": ValueOf(syscall.PACKET_FANOUT_DATA),
+ "PACKET_FASTROUTE": ValueOf(syscall.PACKET_FASTROUTE),
+ "PACKET_HDRLEN": ValueOf(syscall.PACKET_HDRLEN),
+ "PACKET_HOST": ValueOf(syscall.PACKET_HOST),
+ "PACKET_LOOPBACK": ValueOf(syscall.PACKET_LOOPBACK),
+ "PACKET_LOSS": ValueOf(syscall.PACKET_LOSS),
+ "PACKET_MR_ALLMULTI": ValueOf(syscall.PACKET_MR_ALLMULTI),
+ "PACKET_MR_MULTICAST": ValueOf(syscall.PACKET_MR_MULTICAST),
+ "PACKET_MR_PROMISC": ValueOf(syscall.PACKET_MR_PROMISC),
+ "PACKET_MR_UNICAST": ValueOf(syscall.PACKET_MR_UNICAST),
+ "PACKET_MULTICAST": ValueOf(syscall.PACKET_MULTICAST),
+ "PACKET_ORIGDEV": ValueOf(syscall.PACKET_ORIGDEV),
+ "PACKET_OTHERHOST": ValueOf(syscall.PACKET_OTHERHOST),
+ "PACKET_OUTGOING": ValueOf(syscall.PACKET_OUTGOING),
+ "PACKET_QDISC_BYPASS": ValueOf(syscall.PACKET_QDISC_BYPASS),
+ "PACKET_RECV_OUTPUT": ValueOf(syscall.PACKET_RECV_OUTPUT),
+ "PACKET_RESERVE": ValueOf(syscall.PACKET_RESERVE),
+ "PACKET_ROLLOVER_STATS": ValueOf(syscall.PACKET_ROLLOVER_STATS),
+ "PACKET_RX_RING": ValueOf(syscall.PACKET_RX_RING),
+ "PACKET_STATISTICS": ValueOf(syscall.PACKET_STATISTICS),
+ "PACKET_TIMESTAMP": ValueOf(syscall.PACKET_TIMESTAMP),
+ "PACKET_TX_HAS_OFF": ValueOf(syscall.PACKET_TX_HAS_OFF),
+ "PACKET_TX_RING": ValueOf(syscall.PACKET_TX_RING),
+ "PACKET_TX_TIMESTAMP": ValueOf(syscall.PACKET_TX_TIMESTAMP),
+ "PACKET_VERSION": ValueOf(syscall.PACKET_VERSION),
+ "PACKET_VNET_HDR": ValueOf(syscall.PACKET_VNET_HDR),
+ "PARENB": ValueOf(syscall.PARENB),
+ "PARMRK": ValueOf(syscall.PARMRK),
+ "PARODD": ValueOf(syscall.PARODD),
+ "PC_2_SYMLINKS": ValueOf(syscall.PC_2_SYMLINKS),
+ "PC_ALLOC_SIZE_MIN": ValueOf(syscall.PC_ALLOC_SIZE_MIN),
+ "PC_ASYNC_IO": ValueOf(syscall.PC_ASYNC_IO),
+ "PC_CHOWN_RESTRICTED": ValueOf(syscall.PC_CHOWN_RESTRICTED),
+ "PC_FILESIZEBITS": ValueOf(syscall.PC_FILESIZEBITS),
+ "PC_LINK_MAX": ValueOf(syscall.PC_LINK_MAX),
+ "PC_MAX_CANON": ValueOf(syscall.PC_MAX_CANON),
+ "PC_MAX_INPUT": ValueOf(syscall.PC_MAX_INPUT),
+ "PC_NAME_MAX": ValueOf(syscall.PC_NAME_MAX),
+ "PC_NO_TRUNC": ValueOf(syscall.PC_NO_TRUNC),
+ "PC_PATH_MAX": ValueOf(syscall.PC_PATH_MAX),
+ "PC_PIPE_BUF": ValueOf(syscall.PC_PIPE_BUF),
+ "PC_PRIO_IO": ValueOf(syscall.PC_PRIO_IO),
+ "PC_REC_INCR_XFER_SIZE": ValueOf(syscall.PC_REC_INCR_XFER_SIZE),
+ "PC_REC_MAX_XFER_SIZE": ValueOf(syscall.PC_REC_MAX_XFER_SIZE),
+ "PC_REC_MIN_XFER_SIZE": ValueOf(syscall.PC_REC_MIN_XFER_SIZE),
+ "PC_REC_XFER_ALIGN": ValueOf(syscall.PC_REC_XFER_ALIGN),
+ "PC_SOCK_MAXBUF": ValueOf(syscall.PC_SOCK_MAXBUF),
+ "PC_SYMLINK_MAX": ValueOf(syscall.PC_SYMLINK_MAX),
+ "PC_SYNC_IO": ValueOf(syscall.PC_SYNC_IO),
+ "PC_VDISABLE": ValueOf(syscall.PC_VDISABLE),
+ "PENDIN": ValueOf(syscall.PENDIN),
+ "PRIO_MAX": ValueOf(syscall.PRIO_MAX),
+ "PRIO_MIN": ValueOf(syscall.PRIO_MIN),
+ "PRIO_PGRP": ValueOf(syscall.PRIO_PGRP),
+ "PRIO_PROCESS": ValueOf(syscall.PRIO_PROCESS),
+ "PRIO_USER": ValueOf(syscall.PRIO_USER),
+ "PROT_EXEC": ValueOf(syscall.PROT_EXEC),
+ "PROT_GROWSDOWN": ValueOf(syscall.PROT_GROWSDOWN),
+ "PROT_GROWSUP": ValueOf(syscall.PROT_GROWSUP),
+ "PROT_NONE": ValueOf(syscall.PROT_NONE),
+ "PROT_READ": ValueOf(syscall.PROT_READ),
+ "PROT_WRITE": ValueOf(syscall.PROT_WRITE),
+ "PR_CAPBSET_DROP": ValueOf(syscall.PR_CAPBSET_DROP),
+ "PR_CAPBSET_READ": ValueOf(syscall.PR_CAPBSET_READ),
+ "PR_CAP_AMBIENT": ValueOf(syscall.PR_CAP_AMBIENT),
+ "PR_CAP_AMBIENT_CLEAR_ALL": ValueOf(syscall.PR_CAP_AMBIENT_CLEAR_ALL),
+ "PR_CAP_AMBIENT_IS_SET": ValueOf(syscall.PR_CAP_AMBIENT_IS_SET),
+ "PR_CAP_AMBIENT_LOWER": ValueOf(syscall.PR_CAP_AMBIENT_LOWER),
+ "PR_CAP_AMBIENT_RAISE": ValueOf(syscall.PR_CAP_AMBIENT_RAISE),
+ "PR_ENDIAN_BIG": ValueOf(syscall.PR_ENDIAN_BIG),
+ "PR_ENDIAN_LITTLE": ValueOf(syscall.PR_ENDIAN_LITTLE),
+ "PR_ENDIAN_PPC_LITTLE": ValueOf(syscall.PR_ENDIAN_PPC_LITTLE),
+ "PR_FPEMU_NOPRINT": ValueOf(syscall.PR_FPEMU_NOPRINT),
+ "PR_FPEMU_SIGFPE": ValueOf(syscall.PR_FPEMU_SIGFPE),
+ "PR_FP_EXC_ASYNC": ValueOf(syscall.PR_FP_EXC_ASYNC),
+ "PR_FP_EXC_DISABLED": ValueOf(syscall.PR_FP_EXC_DISABLED),
+ "PR_FP_EXC_DIV": ValueOf(syscall.PR_FP_EXC_DIV),
+ "PR_FP_EXC_INV": ValueOf(syscall.PR_FP_EXC_INV),
+ "PR_FP_EXC_NONRECOV": ValueOf(syscall.PR_FP_EXC_NONRECOV),
+ "PR_FP_EXC_OVF": ValueOf(syscall.PR_FP_EXC_OVF),
+ "PR_FP_EXC_PRECISE": ValueOf(syscall.PR_FP_EXC_PRECISE),
+ "PR_FP_EXC_RES": ValueOf(syscall.PR_FP_EXC_RES),
+ "PR_FP_EXC_SW_ENABLE": ValueOf(syscall.PR_FP_EXC_SW_ENABLE),
+ "PR_FP_EXC_UND": ValueOf(syscall.PR_FP_EXC_UND),
+ "PR_FP_MODE_FR": ValueOf(syscall.PR_FP_MODE_FR),
+ "PR_FP_MODE_FRE": ValueOf(syscall.PR_FP_MODE_FRE),
+ "PR_GET_CHILD_SUBREAPER": ValueOf(syscall.PR_GET_CHILD_SUBREAPER),
+ "PR_GET_DUMPABLE": ValueOf(syscall.PR_GET_DUMPABLE),
+ "PR_GET_ENDIAN": ValueOf(syscall.PR_GET_ENDIAN),
+ "PR_GET_FPEMU": ValueOf(syscall.PR_GET_FPEMU),
+ "PR_GET_FPEXC": ValueOf(syscall.PR_GET_FPEXC),
+ "PR_GET_FP_MODE": ValueOf(syscall.PR_GET_FP_MODE),
+ "PR_GET_KEEPCAPS": ValueOf(syscall.PR_GET_KEEPCAPS),
+ "PR_GET_NAME": ValueOf(syscall.PR_GET_NAME),
+ "PR_GET_NO_NEW_PRIVS": ValueOf(syscall.PR_GET_NO_NEW_PRIVS),
+ "PR_GET_PDEATHSIG": ValueOf(syscall.PR_GET_PDEATHSIG),
+ "PR_GET_SECCOMP": ValueOf(syscall.PR_GET_SECCOMP),
+ "PR_GET_SECUREBITS": ValueOf(syscall.PR_GET_SECUREBITS),
+ "PR_GET_THP_DISABLE": ValueOf(syscall.PR_GET_THP_DISABLE),
+ "PR_GET_TID_ADDRESS": ValueOf(syscall.PR_GET_TID_ADDRESS),
+ "PR_GET_TIMERSLACK": ValueOf(syscall.PR_GET_TIMERSLACK),
+ "PR_GET_TIMING": ValueOf(syscall.PR_GET_TIMING),
+ "PR_GET_TSC": ValueOf(syscall.PR_GET_TSC),
+ "PR_GET_UNALIGN": ValueOf(syscall.PR_GET_UNALIGN),
+ "PR_MCE_KILL": ValueOf(syscall.PR_MCE_KILL),
+ "PR_MCE_KILL_CLEAR": ValueOf(syscall.PR_MCE_KILL_CLEAR),
+ "PR_MCE_KILL_DEFAULT": ValueOf(syscall.PR_MCE_KILL_DEFAULT),
+ "PR_MCE_KILL_EARLY": ValueOf(syscall.PR_MCE_KILL_EARLY),
+ "PR_MCE_KILL_GET": ValueOf(syscall.PR_MCE_KILL_GET),
+ "PR_MCE_KILL_LATE": ValueOf(syscall.PR_MCE_KILL_LATE),
+ "PR_MCE_KILL_SET": ValueOf(syscall.PR_MCE_KILL_SET),
+ "PR_MPX_DISABLE_MANAGEMENT": ValueOf(syscall.PR_MPX_DISABLE_MANAGEMENT),
+ "PR_MPX_ENABLE_MANAGEMENT": ValueOf(syscall.PR_MPX_ENABLE_MANAGEMENT),
+ "PR_SET_CHILD_SUBREAPER": ValueOf(syscall.PR_SET_CHILD_SUBREAPER),
+ "PR_SET_DUMPABLE": ValueOf(syscall.PR_SET_DUMPABLE),
+ "PR_SET_ENDIAN": ValueOf(syscall.PR_SET_ENDIAN),
+ "PR_SET_FPEMU": ValueOf(syscall.PR_SET_FPEMU),
+ "PR_SET_FPEXC": ValueOf(syscall.PR_SET_FPEXC),
+ "PR_SET_FP_MODE": ValueOf(syscall.PR_SET_FP_MODE),
+ "PR_SET_KEEPCAPS": ValueOf(syscall.PR_SET_KEEPCAPS),
+ "PR_SET_MM": ValueOf(syscall.PR_SET_MM),
+ "PR_SET_MM_ARG_END": ValueOf(syscall.PR_SET_MM_ARG_END),
+ "PR_SET_MM_ARG_START": ValueOf(syscall.PR_SET_MM_ARG_START),
+ "PR_SET_MM_AUXV": ValueOf(syscall.PR_SET_MM_AUXV),
+ "PR_SET_MM_BRK": ValueOf(syscall.PR_SET_MM_BRK),
+ "PR_SET_MM_END_CODE": ValueOf(syscall.PR_SET_MM_END_CODE),
+ "PR_SET_MM_END_DATA": ValueOf(syscall.PR_SET_MM_END_DATA),
+ "PR_SET_MM_ENV_END": ValueOf(syscall.PR_SET_MM_ENV_END),
+ "PR_SET_MM_ENV_START": ValueOf(syscall.PR_SET_MM_ENV_START),
+ "PR_SET_MM_EXE_FILE": ValueOf(syscall.PR_SET_MM_EXE_FILE),
+ "PR_SET_MM_MAP": ValueOf(syscall.PR_SET_MM_MAP),
+ "PR_SET_MM_MAP_SIZE": ValueOf(syscall.PR_SET_MM_MAP_SIZE),
+ "PR_SET_MM_START_BRK": ValueOf(syscall.PR_SET_MM_START_BRK),
+ "PR_SET_MM_START_CODE": ValueOf(syscall.PR_SET_MM_START_CODE),
+ "PR_SET_MM_START_DATA": ValueOf(syscall.PR_SET_MM_START_DATA),
+ "PR_SET_MM_START_STACK": ValueOf(syscall.PR_SET_MM_START_STACK),
+ "PR_SET_NAME": ValueOf(syscall.PR_SET_NAME),
+ "PR_SET_NO_NEW_PRIVS": ValueOf(syscall.PR_SET_NO_NEW_PRIVS),
+ "PR_SET_PDEATHSIG": ValueOf(syscall.PR_SET_PDEATHSIG),
+ "PR_SET_PTRACER": ValueOf(syscall.PR_SET_PTRACER),
+ "PR_SET_SECCOMP": ValueOf(syscall.PR_SET_SECCOMP),
+ "PR_SET_SECUREBITS": ValueOf(syscall.PR_SET_SECUREBITS),
+ "PR_SET_THP_DISABLE": ValueOf(syscall.PR_SET_THP_DISABLE),
+ "PR_SET_TIMERSLACK": ValueOf(syscall.PR_SET_TIMERSLACK),
+ "PR_SET_TIMING": ValueOf(syscall.PR_SET_TIMING),
+ "PR_SET_TSC": ValueOf(syscall.PR_SET_TSC),
+ "PR_SET_UNALIGN": ValueOf(syscall.PR_SET_UNALIGN),
+ "PR_SVE_GET_VL": ValueOf(syscall.PR_SVE_GET_VL),
+ "PR_SVE_SET_VL": ValueOf(syscall.PR_SVE_SET_VL),
+ "PR_SVE_SET_VL_ONEXEC": ValueOf(syscall.PR_SVE_SET_VL_ONEXEC),
+ "PR_SVE_VL_INHERIT": ValueOf(syscall.PR_SVE_VL_INHERIT),
+ "PR_SVE_VL_LEN_MASK": ValueOf(syscall.PR_SVE_VL_LEN_MASK),
+ "PR_TASK_PERF_EVENTS_DISABLE": ValueOf(syscall.PR_TASK_PERF_EVENTS_DISABLE),
+ "PR_TASK_PERF_EVENTS_ENABLE": ValueOf(syscall.PR_TASK_PERF_EVENTS_ENABLE),
+ "PR_TIMING_STATISTICAL": ValueOf(syscall.PR_TIMING_STATISTICAL),
+ "PR_TIMING_TIMESTAMP": ValueOf(syscall.PR_TIMING_TIMESTAMP),
+ "PR_TSC_ENABLE": ValueOf(syscall.PR_TSC_ENABLE),
+ "PR_TSC_SIGSEGV": ValueOf(syscall.PR_TSC_SIGSEGV),
+ "PR_UNALIGN_NOPRINT": ValueOf(syscall.PR_UNALIGN_NOPRINT),
+ "PR_UNALIGN_SIGBUS": ValueOf(syscall.PR_UNALIGN_SIGBUS),
+ "PTRACE_ATTACH": ValueOf(syscall.PTRACE_ATTACH),
+ "PTRACE_CONT": ValueOf(syscall.PTRACE_CONT),
+ "PTRACE_DETACH": ValueOf(syscall.PTRACE_DETACH),
+ "PTRACE_EVENT_CLONE": ValueOf(syscall.PTRACE_EVENT_CLONE),
+ "PTRACE_EVENT_EXEC": ValueOf(syscall.PTRACE_EVENT_EXEC),
+ "PTRACE_EVENT_EXIT": ValueOf(syscall.PTRACE_EVENT_EXIT),
+ "PTRACE_EVENT_FORK": ValueOf(syscall.PTRACE_EVENT_FORK),
+ "PTRACE_EVENT_SECCOMP": ValueOf(syscall.PTRACE_EVENT_SECCOMP),
+ "PTRACE_EVENT_STOP": ValueOf(syscall.PTRACE_EVENT_STOP),
+ "PTRACE_EVENT_VFORK": ValueOf(syscall.PTRACE_EVENT_VFORK),
+ "PTRACE_EVENT_VFORK_DONE": ValueOf(syscall.PTRACE_EVENT_VFORK_DONE),
+ "PTRACE_GETEVENTMSG": ValueOf(syscall.PTRACE_GETEVENTMSG),
+ "PTRACE_GETREGSET": ValueOf(syscall.PTRACE_GETREGSET),
+ "PTRACE_GETSIGINFO": ValueOf(syscall.PTRACE_GETSIGINFO),
+ "PTRACE_GETSIGMASK": ValueOf(syscall.PTRACE_GETSIGMASK),
+ "PTRACE_INTERRUPT": ValueOf(syscall.PTRACE_INTERRUPT),
+ "PTRACE_KILL": ValueOf(syscall.PTRACE_KILL),
+ "PTRACE_LISTEN": ValueOf(syscall.PTRACE_LISTEN),
+ "PTRACE_O_EXITKILL": ValueOf(syscall.PTRACE_O_EXITKILL),
+ "PTRACE_O_MASK": ValueOf(syscall.PTRACE_O_MASK),
+ "PTRACE_O_SUSPEND_SECCOMP": ValueOf(syscall.PTRACE_O_SUSPEND_SECCOMP),
+ "PTRACE_O_TRACECLONE": ValueOf(syscall.PTRACE_O_TRACECLONE),
+ "PTRACE_O_TRACEEXEC": ValueOf(syscall.PTRACE_O_TRACEEXEC),
+ "PTRACE_O_TRACEEXIT": ValueOf(syscall.PTRACE_O_TRACEEXIT),
+ "PTRACE_O_TRACEFORK": ValueOf(syscall.PTRACE_O_TRACEFORK),
+ "PTRACE_O_TRACESECCOMP": ValueOf(syscall.PTRACE_O_TRACESECCOMP),
+ "PTRACE_O_TRACESYSGOOD": ValueOf(syscall.PTRACE_O_TRACESYSGOOD),
+ "PTRACE_O_TRACEVFORK": ValueOf(syscall.PTRACE_O_TRACEVFORK),
+ "PTRACE_O_TRACEVFORKDONE": ValueOf(syscall.PTRACE_O_TRACEVFORKDONE),
+ "PTRACE_PEEKDATA": ValueOf(syscall.PTRACE_PEEKDATA),
+ "PTRACE_PEEKSIGINFO": ValueOf(syscall.PTRACE_PEEKSIGINFO),
+ "PTRACE_PEEKSIGINFO_SHARED": ValueOf(syscall.PTRACE_PEEKSIGINFO_SHARED),
+ "PTRACE_PEEKTEXT": ValueOf(syscall.PTRACE_PEEKTEXT),
+ "PTRACE_PEEKUSER": ValueOf(syscall.PTRACE_PEEKUSER),
+ "PTRACE_PEEKUSR": ValueOf(syscall.PTRACE_PEEKUSR),
+ "PTRACE_POKEDATA": ValueOf(syscall.PTRACE_POKEDATA),
+ "PTRACE_POKETEXT": ValueOf(syscall.PTRACE_POKETEXT),
+ "PTRACE_POKEUSER": ValueOf(syscall.PTRACE_POKEUSER),
+ "PTRACE_POKEUSR": ValueOf(syscall.PTRACE_POKEUSR),
+ "PTRACE_SECCOMP_GET_FILTER": ValueOf(syscall.PTRACE_SECCOMP_GET_FILTER),
+ "PTRACE_SEIZE": ValueOf(syscall.PTRACE_SEIZE),
+ "PTRACE_SETOPTIONS": ValueOf(syscall.PTRACE_SETOPTIONS),
+ "PTRACE_SETREGSET": ValueOf(syscall.PTRACE_SETREGSET),
+ "PTRACE_SETSIGINFO": ValueOf(syscall.PTRACE_SETSIGINFO),
+ "PTRACE_SETSIGMASK": ValueOf(syscall.PTRACE_SETSIGMASK),
+ "PTRACE_SINGLESTEP": ValueOf(syscall.PTRACE_SINGLESTEP),
+ "PTRACE_SYSCALL": ValueOf(syscall.PTRACE_SYSCALL),
+ "PTRACE_TRACEME": ValueOf(syscall.PTRACE_TRACEME),
+ "ParseDirent": ValueOf(syscall.ParseDirent),
+ "ParseNetlinkMessage": ValueOf(syscall.ParseNetlinkMessage),
+ "ParseNetlinkRouteAttr": ValueOf(syscall.ParseNetlinkRouteAttr),
+ "ParseSocketControlMessage": ValueOf(syscall.ParseSocketControlMessage),
+ "ParseUnixCredentials": ValueOf(syscall.ParseUnixCredentials),
+ "ParseUnixRights": ValueOf(syscall.ParseUnixRights),
+ "PathMax": ValueOf(syscall.PathMax),
+ "Pause": ValueOf(syscall.Pause),
+ "Pipe": ValueOf(syscall.Pipe),
+ "Pipe2": ValueOf(syscall.Pipe2),
+ "PivotRoot": ValueOf(syscall.PivotRoot),
+ "Pread": ValueOf(syscall.Pread),
+ "PtraceAttach": ValueOf(syscall.PtraceAttach),
+ "PtraceCont": ValueOf(syscall.PtraceCont),
+ "PtraceDetach": ValueOf(syscall.PtraceDetach),
+ "PtraceGetEventMsg": ValueOf(syscall.PtraceGetEventMsg),
+ "PtracePeekData": ValueOf(syscall.PtracePeekData),
+ "PtracePeekText": ValueOf(syscall.PtracePeekText),
+ "PtracePokeData": ValueOf(syscall.PtracePokeData),
+ "PtracePokeText": ValueOf(syscall.PtracePokeText),
+ "PtraceSetOptions": ValueOf(syscall.PtraceSetOptions),
+ "PtraceSingleStep": ValueOf(syscall.PtraceSingleStep),
+ "Pwrite": ValueOf(syscall.Pwrite),
+ "RLIMIT_AS": ValueOf(syscall.RLIMIT_AS),
+ "RLIMIT_CORE": ValueOf(syscall.RLIMIT_CORE),
+ "RLIMIT_CPU": ValueOf(syscall.RLIMIT_CPU),
+ "RLIMIT_DATA": ValueOf(syscall.RLIMIT_DATA),
+ "RLIMIT_FSIZE": ValueOf(syscall.RLIMIT_FSIZE),
+ "RLIMIT_NOFILE": ValueOf(syscall.RLIMIT_NOFILE),
+ "RLIMIT_STACK": ValueOf(syscall.RLIMIT_STACK),
+ "RLIM_INFINITY": ValueOf(uint64(syscall.RLIM_INFINITY)),
+ "RLIM_SAVED_CUR": ValueOf(uint64(syscall.RLIM_SAVED_CUR)),
+ "RLIM_SAVED_MAX": ValueOf(uint64(syscall.RLIM_SAVED_MAX)),
+ "RTAX_ADVMSS": ValueOf(syscall.RTAX_ADVMSS),
+ "RTAX_CC_ALGO": ValueOf(syscall.RTAX_CC_ALGO),
+ "RTAX_CWND": ValueOf(syscall.RTAX_CWND),
+ "RTAX_FASTOPEN_NO_COOKIE": ValueOf(syscall.RTAX_FASTOPEN_NO_COOKIE),
+ "RTAX_FEATURES": ValueOf(syscall.RTAX_FEATURES),
+ "RTAX_FEATURE_ALLFRAG": ValueOf(syscall.RTAX_FEATURE_ALLFRAG),
+ "RTAX_FEATURE_ECN": ValueOf(syscall.RTAX_FEATURE_ECN),
+ "RTAX_FEATURE_MASK": ValueOf(syscall.RTAX_FEATURE_MASK),
+ "RTAX_FEATURE_SACK": ValueOf(syscall.RTAX_FEATURE_SACK),
+ "RTAX_FEATURE_TIMESTAMP": ValueOf(syscall.RTAX_FEATURE_TIMESTAMP),
+ "RTAX_HOPLIMIT": ValueOf(syscall.RTAX_HOPLIMIT),
+ "RTAX_INITCWND": ValueOf(syscall.RTAX_INITCWND),
+ "RTAX_INITRWND": ValueOf(syscall.RTAX_INITRWND),
+ "RTAX_LOCK": ValueOf(syscall.RTAX_LOCK),
+ "RTAX_MTU": ValueOf(syscall.RTAX_MTU),
+ "RTAX_QUICKACK": ValueOf(syscall.RTAX_QUICKACK),
+ "RTAX_REORDERING": ValueOf(syscall.RTAX_REORDERING),
+ "RTAX_RTO_MIN": ValueOf(syscall.RTAX_RTO_MIN),
+ "RTAX_RTT": ValueOf(syscall.RTAX_RTT),
+ "RTAX_RTTVAR": ValueOf(syscall.RTAX_RTTVAR),
+ "RTAX_SSTHRESH": ValueOf(syscall.RTAX_SSTHRESH),
+ "RTAX_UNSPEC": ValueOf(syscall.RTAX_UNSPEC),
+ "RTAX_WINDOW": ValueOf(syscall.RTAX_WINDOW),
+ "RTA_ALIGNTO": ValueOf(syscall.RTA_ALIGNTO),
+ "RTA_CACHEINFO": ValueOf(syscall.RTA_CACHEINFO),
+ "RTA_DST": ValueOf(syscall.RTA_DST),
+ "RTA_ENCAP": ValueOf(syscall.RTA_ENCAP),
+ "RTA_ENCAP_TYPE": ValueOf(syscall.RTA_ENCAP_TYPE),
+ "RTA_EXPIRES": ValueOf(syscall.RTA_EXPIRES),
+ "RTA_FLOW": ValueOf(syscall.RTA_FLOW),
+ "RTA_GATEWAY": ValueOf(syscall.RTA_GATEWAY),
+ "RTA_IIF": ValueOf(syscall.RTA_IIF),
+ "RTA_MARK": ValueOf(syscall.RTA_MARK),
+ "RTA_METRICS": ValueOf(syscall.RTA_METRICS),
+ "RTA_MFC_STATS": ValueOf(syscall.RTA_MFC_STATS),
+ "RTA_MP_ALGO": ValueOf(syscall.RTA_MP_ALGO),
+ "RTA_MULTIPATH": ValueOf(syscall.RTA_MULTIPATH),
+ "RTA_NEWDST": ValueOf(syscall.RTA_NEWDST),
+ "RTA_OIF": ValueOf(syscall.RTA_OIF),
+ "RTA_PAD": ValueOf(syscall.RTA_PAD),
+ "RTA_PREF": ValueOf(syscall.RTA_PREF),
+ "RTA_PREFSRC": ValueOf(syscall.RTA_PREFSRC),
+ "RTA_PRIORITY": ValueOf(syscall.RTA_PRIORITY),
+ "RTA_PROTOINFO": ValueOf(syscall.RTA_PROTOINFO),
+ "RTA_SESSION": ValueOf(syscall.RTA_SESSION),
+ "RTA_SRC": ValueOf(syscall.RTA_SRC),
+ "RTA_TABLE": ValueOf(syscall.RTA_TABLE),
+ "RTA_TTL_PROPAGATE": ValueOf(syscall.RTA_TTL_PROPAGATE),
+ "RTA_UID": ValueOf(syscall.RTA_UID),
+ "RTA_UNSPEC": ValueOf(syscall.RTA_UNSPEC),
+ "RTA_VIA": ValueOf(syscall.RTA_VIA),
+ "RTCF_DIRECTSRC": ValueOf(syscall.RTCF_DIRECTSRC),
+ "RTCF_DOREDIRECT": ValueOf(syscall.RTCF_DOREDIRECT),
+ "RTCF_LOG": ValueOf(syscall.RTCF_LOG),
+ "RTCF_MASQ": ValueOf(syscall.RTCF_MASQ),
+ "RTCF_NAT": ValueOf(syscall.RTCF_NAT),
+ "RTCF_VALVE": ValueOf(syscall.RTCF_VALVE),
+ "RTF_ADDRCLASSMASK": ValueOf(uint32(syscall.RTF_ADDRCLASSMASK)),
+ "RTF_ADDRCONF": ValueOf(syscall.RTF_ADDRCONF),
+ "RTF_ALLONLINK": ValueOf(syscall.RTF_ALLONLINK),
+ "RTF_BROADCAST": ValueOf(syscall.RTF_BROADCAST),
+ "RTF_CACHE": ValueOf(syscall.RTF_CACHE),
+ "RTF_DEFAULT": ValueOf(syscall.RTF_DEFAULT),
+ "RTF_DYNAMIC": ValueOf(syscall.RTF_DYNAMIC),
+ "RTF_FLOW": ValueOf(syscall.RTF_FLOW),
+ "RTF_GATEWAY": ValueOf(syscall.RTF_GATEWAY),
+ "RTF_HOST": ValueOf(syscall.RTF_HOST),
+ "RTF_INTERFACE": ValueOf(syscall.RTF_INTERFACE),
+ "RTF_IRTT": ValueOf(syscall.RTF_IRTT),
+ "RTF_LINKRT": ValueOf(syscall.RTF_LINKRT),
+ "RTF_LOCAL": ValueOf(uint32(syscall.RTF_LOCAL)),
+ "RTF_MODIFIED": ValueOf(syscall.RTF_MODIFIED),
+ "RTF_MSS": ValueOf(syscall.RTF_MSS),
+ "RTF_MTU": ValueOf(syscall.RTF_MTU),
+ "RTF_MULTICAST": ValueOf(syscall.RTF_MULTICAST),
+ "RTF_NAT": ValueOf(syscall.RTF_NAT),
+ "RTF_NOFORWARD": ValueOf(syscall.RTF_NOFORWARD),
+ "RTF_NONEXTHOP": ValueOf(syscall.RTF_NONEXTHOP),
+ "RTF_NOPMTUDISC": ValueOf(syscall.RTF_NOPMTUDISC),
+ "RTF_POLICY": ValueOf(syscall.RTF_POLICY),
+ "RTF_REINSTATE": ValueOf(syscall.RTF_REINSTATE),
+ "RTF_REJECT": ValueOf(syscall.RTF_REJECT),
+ "RTF_STATIC": ValueOf(syscall.RTF_STATIC),
+ "RTF_THROW": ValueOf(syscall.RTF_THROW),
+ "RTF_UP": ValueOf(syscall.RTF_UP),
+ "RTF_WINDOW": ValueOf(syscall.RTF_WINDOW),
+ "RTF_XRESOLVE": ValueOf(syscall.RTF_XRESOLVE),
+ "RTMGRP_DECnet_IFADDR": ValueOf(syscall.RTMGRP_DECnet_IFADDR),
+ "RTMGRP_DECnet_ROUTE": ValueOf(syscall.RTMGRP_DECnet_ROUTE),
+ "RTMGRP_IPV4_IFADDR": ValueOf(syscall.RTMGRP_IPV4_IFADDR),
+ "RTMGRP_IPV4_MROUTE": ValueOf(syscall.RTMGRP_IPV4_MROUTE),
+ "RTMGRP_IPV4_ROUTE": ValueOf(syscall.RTMGRP_IPV4_ROUTE),
+ "RTMGRP_IPV4_RULE": ValueOf(syscall.RTMGRP_IPV4_RULE),
+ "RTMGRP_IPV6_IFADDR": ValueOf(syscall.RTMGRP_IPV6_IFADDR),
+ "RTMGRP_IPV6_IFINFO": ValueOf(syscall.RTMGRP_IPV6_IFINFO),
+ "RTMGRP_IPV6_MROUTE": ValueOf(syscall.RTMGRP_IPV6_MROUTE),
+ "RTMGRP_IPV6_PREFIX": ValueOf(syscall.RTMGRP_IPV6_PREFIX),
+ "RTMGRP_IPV6_ROUTE": ValueOf(syscall.RTMGRP_IPV6_ROUTE),
+ "RTMGRP_LINK": ValueOf(syscall.RTMGRP_LINK),
+ "RTMGRP_NEIGH": ValueOf(syscall.RTMGRP_NEIGH),
+ "RTMGRP_NOTIFY": ValueOf(syscall.RTMGRP_NOTIFY),
+ "RTMGRP_TC": ValueOf(syscall.RTMGRP_TC),
+ "RTMSG_AR_FAILED": ValueOf(syscall.RTMSG_AR_FAILED),
+ "RTMSG_CONTROL": ValueOf(syscall.RTMSG_CONTROL),
+ "RTMSG_DELDEVICE": ValueOf(syscall.RTMSG_DELDEVICE),
+ "RTMSG_DELROUTE": ValueOf(syscall.RTMSG_DELROUTE),
+ "RTMSG_DELRULE": ValueOf(syscall.RTMSG_DELRULE),
+ "RTMSG_NEWDEVICE": ValueOf(syscall.RTMSG_NEWDEVICE),
+ "RTMSG_NEWROUTE": ValueOf(syscall.RTMSG_NEWROUTE),
+ "RTMSG_NEWRULE": ValueOf(syscall.RTMSG_NEWRULE),
+ "RTMSG_OVERRUN": ValueOf(syscall.RTMSG_OVERRUN),
+ "RTM_BASE": ValueOf(syscall.RTM_BASE),
+ "RTM_DELACTION": ValueOf(syscall.RTM_DELACTION),
+ "RTM_DELADDR": ValueOf(syscall.RTM_DELADDR),
+ "RTM_DELADDRLABEL": ValueOf(syscall.RTM_DELADDRLABEL),
+ "RTM_DELLINK": ValueOf(syscall.RTM_DELLINK),
+ "RTM_DELMDB": ValueOf(syscall.RTM_DELMDB),
+ "RTM_DELNEIGH": ValueOf(syscall.RTM_DELNEIGH),
+ "RTM_DELNETCONF": ValueOf(syscall.RTM_DELNETCONF),
+ "RTM_DELNSID": ValueOf(syscall.RTM_DELNSID),
+ "RTM_DELQDISC": ValueOf(syscall.RTM_DELQDISC),
+ "RTM_DELROUTE": ValueOf(syscall.RTM_DELROUTE),
+ "RTM_DELRULE": ValueOf(syscall.RTM_DELRULE),
+ "RTM_DELTCLASS": ValueOf(syscall.RTM_DELTCLASS),
+ "RTM_DELTFILTER": ValueOf(syscall.RTM_DELTFILTER),
+ "RTM_F_CLONED": ValueOf(syscall.RTM_F_CLONED),
+ "RTM_F_EQUALIZE": ValueOf(syscall.RTM_F_EQUALIZE),
+ "RTM_F_FIB_MATCH": ValueOf(syscall.RTM_F_FIB_MATCH),
+ "RTM_F_LOOKUP_TABLE": ValueOf(syscall.RTM_F_LOOKUP_TABLE),
+ "RTM_F_NOTIFY": ValueOf(syscall.RTM_F_NOTIFY),
+ "RTM_F_PREFIX": ValueOf(syscall.RTM_F_PREFIX),
+ "RTM_GETACTION": ValueOf(syscall.RTM_GETACTION),
+ "RTM_GETADDR": ValueOf(syscall.RTM_GETADDR),
+ "RTM_GETADDRLABEL": ValueOf(syscall.RTM_GETADDRLABEL),
+ "RTM_GETANYCAST": ValueOf(syscall.RTM_GETANYCAST),
+ "RTM_GETDCB": ValueOf(syscall.RTM_GETDCB),
+ "RTM_GETLINK": ValueOf(syscall.RTM_GETLINK),
+ "RTM_GETMDB": ValueOf(syscall.RTM_GETMDB),
+ "RTM_GETMULTICAST": ValueOf(syscall.RTM_GETMULTICAST),
+ "RTM_GETNEIGH": ValueOf(syscall.RTM_GETNEIGH),
+ "RTM_GETNEIGHTBL": ValueOf(syscall.RTM_GETNEIGHTBL),
+ "RTM_GETNETCONF": ValueOf(syscall.RTM_GETNETCONF),
+ "RTM_GETNSID": ValueOf(syscall.RTM_GETNSID),
+ "RTM_GETQDISC": ValueOf(syscall.RTM_GETQDISC),
+ "RTM_GETROUTE": ValueOf(syscall.RTM_GETROUTE),
+ "RTM_GETRULE": ValueOf(syscall.RTM_GETRULE),
+ "RTM_GETSTATS": ValueOf(syscall.RTM_GETSTATS),
+ "RTM_GETTCLASS": ValueOf(syscall.RTM_GETTCLASS),
+ "RTM_GETTFILTER": ValueOf(syscall.RTM_GETTFILTER),
+ "RTM_NEWACTION": ValueOf(syscall.RTM_NEWACTION),
+ "RTM_NEWADDR": ValueOf(syscall.RTM_NEWADDR),
+ "RTM_NEWADDRLABEL": ValueOf(syscall.RTM_NEWADDRLABEL),
+ "RTM_NEWCACHEREPORT": ValueOf(syscall.RTM_NEWCACHEREPORT),
+ "RTM_NEWLINK": ValueOf(syscall.RTM_NEWLINK),
+ "RTM_NEWMDB": ValueOf(syscall.RTM_NEWMDB),
+ "RTM_NEWNDUSEROPT": ValueOf(syscall.RTM_NEWNDUSEROPT),
+ "RTM_NEWNEIGH": ValueOf(syscall.RTM_NEWNEIGH),
+ "RTM_NEWNEIGHTBL": ValueOf(syscall.RTM_NEWNEIGHTBL),
+ "RTM_NEWNETCONF": ValueOf(syscall.RTM_NEWNETCONF),
+ "RTM_NEWNSID": ValueOf(syscall.RTM_NEWNSID),
+ "RTM_NEWPREFIX": ValueOf(syscall.RTM_NEWPREFIX),
+ "RTM_NEWQDISC": ValueOf(syscall.RTM_NEWQDISC),
+ "RTM_NEWROUTE": ValueOf(syscall.RTM_NEWROUTE),
+ "RTM_NEWRULE": ValueOf(syscall.RTM_NEWRULE),
+ "RTM_NEWSTATS": ValueOf(syscall.RTM_NEWSTATS),
+ "RTM_NEWTCLASS": ValueOf(syscall.RTM_NEWTCLASS),
+ "RTM_NEWTFILTER": ValueOf(syscall.RTM_NEWTFILTER),
+ "RTM_SETDCB": ValueOf(syscall.RTM_SETDCB),
+ "RTM_SETLINK": ValueOf(syscall.RTM_SETLINK),
+ "RTM_SETNEIGHTBL": ValueOf(syscall.RTM_SETNEIGHTBL),
+ "RTNETLINK_HAVE_PEERINFO": ValueOf(syscall.RTNETLINK_HAVE_PEERINFO),
+ "RTNH_ALIGNTO": ValueOf(syscall.RTNH_ALIGNTO),
+ "RTNH_COMPARE_MASK": ValueOf(syscall.RTNH_COMPARE_MASK),
+ "RTNH_F_DEAD": ValueOf(syscall.RTNH_F_DEAD),
+ "RTNH_F_LINKDOWN": ValueOf(syscall.RTNH_F_LINKDOWN),
+ "RTNH_F_OFFLOAD": ValueOf(syscall.RTNH_F_OFFLOAD),
+ "RTNH_F_ONLINK": ValueOf(syscall.RTNH_F_ONLINK),
+ "RTNH_F_PERVASIVE": ValueOf(syscall.RTNH_F_PERVASIVE),
+ "RTNH_F_UNRESOLVED": ValueOf(syscall.RTNH_F_UNRESOLVED),
+ "RTNLGRP_DCB": ValueOf(syscall.RTNLGRP_DCB),
+ "RTNLGRP_DECnet_IFADDR": ValueOf(syscall.RTNLGRP_DECnet_IFADDR),
+ "RTNLGRP_DECnet_ROUTE": ValueOf(syscall.RTNLGRP_DECnet_ROUTE),
+ "RTNLGRP_DECnet_RULE": ValueOf(syscall.RTNLGRP_DECnet_RULE),
+ "RTNLGRP_IPV4_IFADDR": ValueOf(syscall.RTNLGRP_IPV4_IFADDR),
+ "RTNLGRP_IPV4_MROUTE": ValueOf(syscall.RTNLGRP_IPV4_MROUTE),
+ "RTNLGRP_IPV4_MROUTE_R": ValueOf(syscall.RTNLGRP_IPV4_MROUTE_R),
+ "RTNLGRP_IPV4_NETCONF": ValueOf(syscall.RTNLGRP_IPV4_NETCONF),
+ "RTNLGRP_IPV4_ROUTE": ValueOf(syscall.RTNLGRP_IPV4_ROUTE),
+ "RTNLGRP_IPV4_RULE": ValueOf(syscall.RTNLGRP_IPV4_RULE),
+ "RTNLGRP_IPV6_IFADDR": ValueOf(syscall.RTNLGRP_IPV6_IFADDR),
+ "RTNLGRP_IPV6_IFINFO": ValueOf(syscall.RTNLGRP_IPV6_IFINFO),
+ "RTNLGRP_IPV6_MROUTE": ValueOf(syscall.RTNLGRP_IPV6_MROUTE),
+ "RTNLGRP_IPV6_MROUTE_R": ValueOf(syscall.RTNLGRP_IPV6_MROUTE_R),
+ "RTNLGRP_IPV6_NETCONF": ValueOf(syscall.RTNLGRP_IPV6_NETCONF),
+ "RTNLGRP_IPV6_PREFIX": ValueOf(syscall.RTNLGRP_IPV6_PREFIX),
+ "RTNLGRP_IPV6_ROUTE": ValueOf(syscall.RTNLGRP_IPV6_ROUTE),
+ "RTNLGRP_IPV6_RULE": ValueOf(syscall.RTNLGRP_IPV6_RULE),
+ "RTNLGRP_LINK": ValueOf(syscall.RTNLGRP_LINK),
+ "RTNLGRP_MDB": ValueOf(syscall.RTNLGRP_MDB),
+ "RTNLGRP_MPLS_NETCONF": ValueOf(syscall.RTNLGRP_MPLS_NETCONF),
+ "RTNLGRP_MPLS_ROUTE": ValueOf(syscall.RTNLGRP_MPLS_ROUTE),
+ "RTNLGRP_ND_USEROPT": ValueOf(syscall.RTNLGRP_ND_USEROPT),
+ "RTNLGRP_NEIGH": ValueOf(syscall.RTNLGRP_NEIGH),
+ "RTNLGRP_NONE": ValueOf(syscall.RTNLGRP_NONE),
+ "RTNLGRP_NOP2": ValueOf(syscall.RTNLGRP_NOP2),
+ "RTNLGRP_NOP4": ValueOf(syscall.RTNLGRP_NOP4),
+ "RTNLGRP_NOTIFY": ValueOf(syscall.RTNLGRP_NOTIFY),
+ "RTNLGRP_NSID": ValueOf(syscall.RTNLGRP_NSID),
+ "RTNLGRP_PHONET_IFADDR": ValueOf(syscall.RTNLGRP_PHONET_IFADDR),
+ "RTNLGRP_PHONET_ROUTE": ValueOf(syscall.RTNLGRP_PHONET_ROUTE),
+ "RTNLGRP_TC": ValueOf(syscall.RTNLGRP_TC),
+ "RTNL_FAMILY_IP6MR": ValueOf(syscall.RTNL_FAMILY_IP6MR),
+ "RTNL_FAMILY_IPMR": ValueOf(syscall.RTNL_FAMILY_IPMR),
+ "RTNL_FAMILY_MAX": ValueOf(syscall.RTNL_FAMILY_MAX),
+ "RTN_ANYCAST": ValueOf(syscall.RTN_ANYCAST),
+ "RTN_BLACKHOLE": ValueOf(syscall.RTN_BLACKHOLE),
+ "RTN_BROADCAST": ValueOf(syscall.RTN_BROADCAST),
+ "RTN_LOCAL": ValueOf(syscall.RTN_LOCAL),
+ "RTN_MULTICAST": ValueOf(syscall.RTN_MULTICAST),
+ "RTN_NAT": ValueOf(syscall.RTN_NAT),
+ "RTN_PROHIBIT": ValueOf(syscall.RTN_PROHIBIT),
+ "RTN_THROW": ValueOf(syscall.RTN_THROW),
+ "RTN_UNICAST": ValueOf(syscall.RTN_UNICAST),
+ "RTN_UNREACHABLE": ValueOf(syscall.RTN_UNREACHABLE),
+ "RTN_UNSPEC": ValueOf(syscall.RTN_UNSPEC),
+ "RTN_XRESOLVE": ValueOf(syscall.RTN_XRESOLVE),
+ "RTPROT_BABEL": ValueOf(syscall.RTPROT_BABEL),
+ "RTPROT_BIRD": ValueOf(syscall.RTPROT_BIRD),
+ "RTPROT_BOOT": ValueOf(syscall.RTPROT_BOOT),
+ "RTPROT_DHCP": ValueOf(syscall.RTPROT_DHCP),
+ "RTPROT_DNROUTED": ValueOf(syscall.RTPROT_DNROUTED),
+ "RTPROT_GATED": ValueOf(syscall.RTPROT_GATED),
+ "RTPROT_KERNEL": ValueOf(syscall.RTPROT_KERNEL),
+ "RTPROT_MROUTED": ValueOf(syscall.RTPROT_MROUTED),
+ "RTPROT_MRT": ValueOf(syscall.RTPROT_MRT),
+ "RTPROT_NTK": ValueOf(syscall.RTPROT_NTK),
+ "RTPROT_RA": ValueOf(syscall.RTPROT_RA),
+ "RTPROT_REDIRECT": ValueOf(syscall.RTPROT_REDIRECT),
+ "RTPROT_STATIC": ValueOf(syscall.RTPROT_STATIC),
+ "RTPROT_UNSPEC": ValueOf(syscall.RTPROT_UNSPEC),
+ "RTPROT_XORP": ValueOf(syscall.RTPROT_XORP),
+ "RTPROT_ZEBRA": ValueOf(syscall.RTPROT_ZEBRA),
+ "RT_CLASS_DEFAULT": ValueOf(syscall.RT_CLASS_DEFAULT),
+ "RT_CLASS_LOCAL": ValueOf(syscall.RT_CLASS_LOCAL),
+ "RT_CLASS_MAIN": ValueOf(syscall.RT_CLASS_MAIN),
+ "RT_CLASS_MAX": ValueOf(syscall.RT_CLASS_MAX),
+ "RT_CLASS_UNSPEC": ValueOf(syscall.RT_CLASS_UNSPEC),
+ "RT_SCOPE_HOST": ValueOf(syscall.RT_SCOPE_HOST),
+ "RT_SCOPE_LINK": ValueOf(syscall.RT_SCOPE_LINK),
+ "RT_SCOPE_NOWHERE": ValueOf(syscall.RT_SCOPE_NOWHERE),
+ "RT_SCOPE_SITE": ValueOf(syscall.RT_SCOPE_SITE),
+ "RT_SCOPE_UNIVERSE": ValueOf(syscall.RT_SCOPE_UNIVERSE),
+ "RT_TABLE_COMPAT": ValueOf(syscall.RT_TABLE_COMPAT),
+ "RT_TABLE_DEFAULT": ValueOf(syscall.RT_TABLE_DEFAULT),
+ "RT_TABLE_LOCAL": ValueOf(syscall.RT_TABLE_LOCAL),
+ "RT_TABLE_MAIN": ValueOf(syscall.RT_TABLE_MAIN),
+ "RT_TABLE_MAX": ValueOf(uint32(syscall.RT_TABLE_MAX)),
+ "RT_TABLE_UNSPEC": ValueOf(syscall.RT_TABLE_UNSPEC),
+ "RUSAGE_CHILDREN": ValueOf(syscall.RUSAGE_CHILDREN),
+ "RUSAGE_SELF": ValueOf(syscall.RUSAGE_SELF),
+ "RUSAGE_THREAD": ValueOf(syscall.RUSAGE_THREAD),
+ "RawSyscall": ValueOf(syscall.RawSyscall),
+ "RawSyscall6": ValueOf(syscall.RawSyscall6),
+ "Read": ValueOf(syscall.Read),
+ "ReadDirent": ValueOf(syscall.ReadDirent),
+ "Readlink": ValueOf(syscall.Readlink),
+ "Reboot": ValueOf(syscall.Reboot),
+ "Recvfrom": ValueOf(syscall.Recvfrom),
+ "Recvmsg": ValueOf(syscall.Recvmsg),
+ "Removexattr": ValueOf(syscall.Removexattr),
+ "Rename": ValueOf(syscall.Rename),
+ "Renameat": ValueOf(syscall.Renameat),
+ "Rmdir": ValueOf(syscall.Rmdir),
+ "SCHED_H": ValueOf(syscall.SCHED_H),
+ "SCM_CREDENTIALS": ValueOf(syscall.SCM_CREDENTIALS),
+ "SCM_RIGHTS": ValueOf(syscall.SCM_RIGHTS),
+ "SCM_TIMESTAMP": ValueOf(syscall.SCM_TIMESTAMP),
+ "SCM_TIMESTAMPING": ValueOf(syscall.SCM_TIMESTAMPING),
+ "SCM_TIMESTAMPING_OPT_STATS": ValueOf(syscall.SCM_TIMESTAMPING_OPT_STATS),
+ "SCM_TIMESTAMPING_PKTINFO": ValueOf(syscall.SCM_TIMESTAMPING_PKTINFO),
+ "SCM_TIMESTAMPNS": ValueOf(syscall.SCM_TIMESTAMPNS),
+ "SCM_WIFI_STATUS": ValueOf(syscall.SCM_WIFI_STATUS),
+ "SC_2_CHAR_TERM": ValueOf(syscall.SC_2_CHAR_TERM),
+ "SC_2_C_BIND": ValueOf(syscall.SC_2_C_BIND),
+ "SC_2_C_DEV": ValueOf(syscall.SC_2_C_DEV),
+ "SC_2_C_VERSION": ValueOf(syscall.SC_2_C_VERSION),
+ "SC_2_FORT_DEV": ValueOf(syscall.SC_2_FORT_DEV),
+ "SC_2_FORT_RUN": ValueOf(syscall.SC_2_FORT_RUN),
+ "SC_2_LOCALEDEF": ValueOf(syscall.SC_2_LOCALEDEF),
+ "SC_2_PBS": ValueOf(syscall.SC_2_PBS),
+ "SC_2_PBS_ACCOUNTING": ValueOf(syscall.SC_2_PBS_ACCOUNTING),
+ "SC_2_PBS_CHECKPOINT": ValueOf(syscall.SC_2_PBS_CHECKPOINT),
+ "SC_2_PBS_LOCATE": ValueOf(syscall.SC_2_PBS_LOCATE),
+ "SC_2_PBS_MESSAGE": ValueOf(syscall.SC_2_PBS_MESSAGE),
+ "SC_2_PBS_TRACK": ValueOf(syscall.SC_2_PBS_TRACK),
+ "SC_2_SW_DEV": ValueOf(syscall.SC_2_SW_DEV),
+ "SC_2_UPE": ValueOf(syscall.SC_2_UPE),
+ "SC_2_VERSION": ValueOf(syscall.SC_2_VERSION),
+ "SC_ADVISORY_INFO": ValueOf(syscall.SC_ADVISORY_INFO),
+ "SC_AIO_LISTIO_MAX": ValueOf(syscall.SC_AIO_LISTIO_MAX),
+ "SC_AIO_MAX": ValueOf(syscall.SC_AIO_MAX),
+ "SC_AIO_PRIO_DELTA_MAX": ValueOf(syscall.SC_AIO_PRIO_DELTA_MAX),
+ "SC_ARG_MAX": ValueOf(syscall.SC_ARG_MAX),
+ "SC_ASYNCHRONOUS_IO": ValueOf(syscall.SC_ASYNCHRONOUS_IO),
+ "SC_ATEXIT_MAX": ValueOf(syscall.SC_ATEXIT_MAX),
+ "SC_AVPHYS_PAGES": ValueOf(syscall.SC_AVPHYS_PAGES),
+ "SC_BARRIERS": ValueOf(syscall.SC_BARRIERS),
+ "SC_BASE": ValueOf(syscall.SC_BASE),
+ "SC_BC_BASE_MAX": ValueOf(syscall.SC_BC_BASE_MAX),
+ "SC_BC_DIM_MAX": ValueOf(syscall.SC_BC_DIM_MAX),
+ "SC_BC_SCALE_MAX": ValueOf(syscall.SC_BC_SCALE_MAX),
+ "SC_BC_STRING_MAX": ValueOf(syscall.SC_BC_STRING_MAX),
+ "SC_CHARCLASS_NAME_MAX": ValueOf(syscall.SC_CHARCLASS_NAME_MAX),
+ "SC_CHAR_BIT": ValueOf(syscall.SC_CHAR_BIT),
+ "SC_CHAR_MAX": ValueOf(syscall.SC_CHAR_MAX),
+ "SC_CHAR_MIN": ValueOf(syscall.SC_CHAR_MIN),
+ "SC_CHILD_MAX": ValueOf(syscall.SC_CHILD_MAX),
+ "SC_CLK_TCK": ValueOf(syscall.SC_CLK_TCK),
+ "SC_CLOCK_SELECTION": ValueOf(syscall.SC_CLOCK_SELECTION),
+ "SC_COLL_WEIGHTS_MAX": ValueOf(syscall.SC_COLL_WEIGHTS_MAX),
+ "SC_CPUTIME": ValueOf(syscall.SC_CPUTIME),
+ "SC_C_LANG_SUPPORT": ValueOf(syscall.SC_C_LANG_SUPPORT),
+ "SC_C_LANG_SUPPORT_R": ValueOf(syscall.SC_C_LANG_SUPPORT_R),
+ "SC_DELAYTIMER_MAX": ValueOf(syscall.SC_DELAYTIMER_MAX),
+ "SC_DEVICE_IO": ValueOf(syscall.SC_DEVICE_IO),
+ "SC_DEVICE_SPECIFIC": ValueOf(syscall.SC_DEVICE_SPECIFIC),
+ "SC_DEVICE_SPECIFIC_R": ValueOf(syscall.SC_DEVICE_SPECIFIC_R),
+ "SC_EQUIV_CLASS_MAX": ValueOf(syscall.SC_EQUIV_CLASS_MAX),
+ "SC_EXPR_NEST_MAX": ValueOf(syscall.SC_EXPR_NEST_MAX),
+ "SC_FD_MGMT": ValueOf(syscall.SC_FD_MGMT),
+ "SC_FIFO": ValueOf(syscall.SC_FIFO),
+ "SC_FILE_ATTRIBUTES": ValueOf(syscall.SC_FILE_ATTRIBUTES),
+ "SC_FILE_LOCKING": ValueOf(syscall.SC_FILE_LOCKING),
+ "SC_FILE_SYSTEM": ValueOf(syscall.SC_FILE_SYSTEM),
+ "SC_FSYNC": ValueOf(syscall.SC_FSYNC),
+ "SC_GETGR_R_SIZE_MAX": ValueOf(syscall.SC_GETGR_R_SIZE_MAX),
+ "SC_GETPW_R_SIZE_MAX": ValueOf(syscall.SC_GETPW_R_SIZE_MAX),
+ "SC_HOST_NAME_MAX": ValueOf(syscall.SC_HOST_NAME_MAX),
+ "SC_INT_MAX": ValueOf(syscall.SC_INT_MAX),
+ "SC_INT_MIN": ValueOf(syscall.SC_INT_MIN),
+ "SC_IOV_MAX": ValueOf(syscall.SC_IOV_MAX),
+ "SC_IPV6": ValueOf(syscall.SC_IPV6),
+ "SC_JOB_CONTROL": ValueOf(syscall.SC_JOB_CONTROL),
+ "SC_LEVEL1_DCACHE_ASSOC": ValueOf(syscall.SC_LEVEL1_DCACHE_ASSOC),
+ "SC_LEVEL1_DCACHE_LINESIZE": ValueOf(syscall.SC_LEVEL1_DCACHE_LINESIZE),
+ "SC_LEVEL1_DCACHE_SIZE": ValueOf(syscall.SC_LEVEL1_DCACHE_SIZE),
+ "SC_LEVEL1_ICACHE_ASSOC": ValueOf(syscall.SC_LEVEL1_ICACHE_ASSOC),
+ "SC_LEVEL1_ICACHE_LINESIZE": ValueOf(syscall.SC_LEVEL1_ICACHE_LINESIZE),
+ "SC_LEVEL1_ICACHE_SIZE": ValueOf(syscall.SC_LEVEL1_ICACHE_SIZE),
+ "SC_LEVEL2_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL2_CACHE_ASSOC),
+ "SC_LEVEL2_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL2_CACHE_LINESIZE),
+ "SC_LEVEL2_CACHE_SIZE": ValueOf(syscall.SC_LEVEL2_CACHE_SIZE),
+ "SC_LEVEL3_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL3_CACHE_ASSOC),
+ "SC_LEVEL3_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL3_CACHE_LINESIZE),
+ "SC_LEVEL3_CACHE_SIZE": ValueOf(syscall.SC_LEVEL3_CACHE_SIZE),
+ "SC_LEVEL4_CACHE_ASSOC": ValueOf(syscall.SC_LEVEL4_CACHE_ASSOC),
+ "SC_LEVEL4_CACHE_LINESIZE": ValueOf(syscall.SC_LEVEL4_CACHE_LINESIZE),
+ "SC_LEVEL4_CACHE_SIZE": ValueOf(syscall.SC_LEVEL4_CACHE_SIZE),
+ "SC_LINE_MAX": ValueOf(syscall.SC_LINE_MAX),
+ "SC_LOGIN_NAME_MAX": ValueOf(syscall.SC_LOGIN_NAME_MAX),
+ "SC_LONG_BIT": ValueOf(syscall.SC_LONG_BIT),
+ "SC_MAPPED_FILES": ValueOf(syscall.SC_MAPPED_FILES),
+ "SC_MB_LEN_MAX": ValueOf(syscall.SC_MB_LEN_MAX),
+ "SC_MEMLOCK": ValueOf(syscall.SC_MEMLOCK),
+ "SC_MEMLOCK_RANGE": ValueOf(syscall.SC_MEMLOCK_RANGE),
+ "SC_MEMORY_PROTECTION": ValueOf(syscall.SC_MEMORY_PROTECTION),
+ "SC_MESSAGE_PASSING": ValueOf(syscall.SC_MESSAGE_PASSING),
+ "SC_MONOTONIC_CLOCK": ValueOf(syscall.SC_MONOTONIC_CLOCK),
+ "SC_MQ_OPEN_MAX": ValueOf(syscall.SC_MQ_OPEN_MAX),
+ "SC_MQ_PRIO_MAX": ValueOf(syscall.SC_MQ_PRIO_MAX),
+ "SC_MULTI_PROCESS": ValueOf(syscall.SC_MULTI_PROCESS),
+ "SC_NETWORKING": ValueOf(syscall.SC_NETWORKING),
+ "SC_NGROUPS_MAX": ValueOf(syscall.SC_NGROUPS_MAX),
+ "SC_NL_ARGMAX": ValueOf(syscall.SC_NL_ARGMAX),
+ "SC_NL_LANGMAX": ValueOf(syscall.SC_NL_LANGMAX),
+ "SC_NL_MSGMAX": ValueOf(syscall.SC_NL_MSGMAX),
+ "SC_NL_NMAX": ValueOf(syscall.SC_NL_NMAX),
+ "SC_NL_SETMAX": ValueOf(syscall.SC_NL_SETMAX),
+ "SC_NL_TEXTMAX": ValueOf(syscall.SC_NL_TEXTMAX),
+ "SC_NPROCESSORS_CONF": ValueOf(syscall.SC_NPROCESSORS_CONF),
+ "SC_NPROCESSORS_ONLN": ValueOf(syscall.SC_NPROCESSORS_ONLN),
+ "SC_NZERO": ValueOf(syscall.SC_NZERO),
+ "SC_OPEN_MAX": ValueOf(syscall.SC_OPEN_MAX),
+ "SC_PAGESIZE": ValueOf(syscall.SC_PAGESIZE),
+ "SC_PASS_MAX": ValueOf(syscall.SC_PASS_MAX),
+ "SC_PHYS_PAGES": ValueOf(syscall.SC_PHYS_PAGES),
+ "SC_PII": ValueOf(syscall.SC_PII),
+ "SC_PII_INTERNET": ValueOf(syscall.SC_PII_INTERNET),
+ "SC_PII_INTERNET_DGRAM": ValueOf(syscall.SC_PII_INTERNET_DGRAM),
+ "SC_PII_INTERNET_STREAM": ValueOf(syscall.SC_PII_INTERNET_STREAM),
+ "SC_PII_OSI": ValueOf(syscall.SC_PII_OSI),
+ "SC_PII_OSI_CLTS": ValueOf(syscall.SC_PII_OSI_CLTS),
+ "SC_PII_OSI_COTS": ValueOf(syscall.SC_PII_OSI_COTS),
+ "SC_PII_OSI_M": ValueOf(syscall.SC_PII_OSI_M),
+ "SC_PII_SOCKET": ValueOf(syscall.SC_PII_SOCKET),
+ "SC_PII_XTI": ValueOf(syscall.SC_PII_XTI),
+ "SC_PIPE": ValueOf(syscall.SC_PIPE),
+ "SC_POLL": ValueOf(syscall.SC_POLL),
+ "SC_PRIORITIZED_IO": ValueOf(syscall.SC_PRIORITIZED_IO),
+ "SC_PRIORITY_SCHEDULING": ValueOf(syscall.SC_PRIORITY_SCHEDULING),
+ "SC_RAW_SOCKETS": ValueOf(syscall.SC_RAW_SOCKETS),
+ "SC_READER_WRITER_LOCKS": ValueOf(syscall.SC_READER_WRITER_LOCKS),
+ "SC_REALTIME_SIGNALS": ValueOf(syscall.SC_REALTIME_SIGNALS),
+ "SC_REGEXP": ValueOf(syscall.SC_REGEXP),
+ "SC_REGEX_VERSION": ValueOf(syscall.SC_REGEX_VERSION),
+ "SC_RE_DUP_MAX": ValueOf(syscall.SC_RE_DUP_MAX),
+ "SC_RTSIG_MAX": ValueOf(syscall.SC_RTSIG_MAX),
+ "SC_SAVED_IDS": ValueOf(syscall.SC_SAVED_IDS),
+ "SC_SCHAR_MAX": ValueOf(syscall.SC_SCHAR_MAX),
+ "SC_SCHAR_MIN": ValueOf(syscall.SC_SCHAR_MIN),
+ "SC_SELECT": ValueOf(syscall.SC_SELECT),
+ "SC_SEMAPHORES": ValueOf(syscall.SC_SEMAPHORES),
+ "SC_SEM_NSEMS_MAX": ValueOf(syscall.SC_SEM_NSEMS_MAX),
+ "SC_SEM_VALUE_MAX": ValueOf(syscall.SC_SEM_VALUE_MAX),
+ "SC_SHARED_MEMORY_OBJECTS": ValueOf(syscall.SC_SHARED_MEMORY_OBJECTS),
+ "SC_SHELL": ValueOf(syscall.SC_SHELL),
+ "SC_SHRT_MAX": ValueOf(syscall.SC_SHRT_MAX),
+ "SC_SHRT_MIN": ValueOf(syscall.SC_SHRT_MIN),
+ "SC_SIGNALS": ValueOf(syscall.SC_SIGNALS),
+ "SC_SIGQUEUE_MAX": ValueOf(syscall.SC_SIGQUEUE_MAX),
+ "SC_SINGLE_PROCESS": ValueOf(syscall.SC_SINGLE_PROCESS),
+ "SC_SPAWN": ValueOf(syscall.SC_SPAWN),
+ "SC_SPIN_LOCKS": ValueOf(syscall.SC_SPIN_LOCKS),
+ "SC_SPORADIC_SERVER": ValueOf(syscall.SC_SPORADIC_SERVER),
+ "SC_SSIZE_MAX": ValueOf(syscall.SC_SSIZE_MAX),
+ "SC_SS_REPL_MAX": ValueOf(syscall.SC_SS_REPL_MAX),
+ "SC_STREAMS": ValueOf(syscall.SC_STREAMS),
+ "SC_STREAM_MAX": ValueOf(syscall.SC_STREAM_MAX),
+ "SC_SYMLOOP_MAX": ValueOf(syscall.SC_SYMLOOP_MAX),
+ "SC_SYNCHRONIZED_IO": ValueOf(syscall.SC_SYNCHRONIZED_IO),
+ "SC_SYSTEM_DATABASE": ValueOf(syscall.SC_SYSTEM_DATABASE),
+ "SC_SYSTEM_DATABASE_R": ValueOf(syscall.SC_SYSTEM_DATABASE_R),
+ "SC_THREADS": ValueOf(syscall.SC_THREADS),
+ "SC_THREAD_ATTR_STACKADDR": ValueOf(syscall.SC_THREAD_ATTR_STACKADDR),
+ "SC_THREAD_ATTR_STACKSIZE": ValueOf(syscall.SC_THREAD_ATTR_STACKSIZE),
+ "SC_THREAD_CPUTIME": ValueOf(syscall.SC_THREAD_CPUTIME),
+ "SC_THREAD_DESTRUCTOR_ITERATIONS": ValueOf(syscall.SC_THREAD_DESTRUCTOR_ITERATIONS),
+ "SC_THREAD_KEYS_MAX": ValueOf(syscall.SC_THREAD_KEYS_MAX),
+ "SC_THREAD_PRIORITY_SCHEDULING": ValueOf(syscall.SC_THREAD_PRIORITY_SCHEDULING),
+ "SC_THREAD_PRIO_INHERIT": ValueOf(syscall.SC_THREAD_PRIO_INHERIT),
+ "SC_THREAD_PRIO_PROTECT": ValueOf(syscall.SC_THREAD_PRIO_PROTECT),
+ "SC_THREAD_PROCESS_SHARED": ValueOf(syscall.SC_THREAD_PROCESS_SHARED),
+ "SC_THREAD_ROBUST_PRIO_INHERIT": ValueOf(syscall.SC_THREAD_ROBUST_PRIO_INHERIT),
+ "SC_THREAD_ROBUST_PRIO_PROTECT": ValueOf(syscall.SC_THREAD_ROBUST_PRIO_PROTECT),
+ "SC_THREAD_SAFE_FUNCTIONS": ValueOf(syscall.SC_THREAD_SAFE_FUNCTIONS),
+ "SC_THREAD_SPORADIC_SERVER": ValueOf(syscall.SC_THREAD_SPORADIC_SERVER),
+ "SC_THREAD_STACK_MIN": ValueOf(syscall.SC_THREAD_STACK_MIN),
+ "SC_THREAD_THREADS_MAX": ValueOf(syscall.SC_THREAD_THREADS_MAX),
+ "SC_TIMEOUTS": ValueOf(syscall.SC_TIMEOUTS),
+ "SC_TIMERS": ValueOf(syscall.SC_TIMERS),
+ "SC_TIMER_MAX": ValueOf(syscall.SC_TIMER_MAX),
+ "SC_TRACE": ValueOf(syscall.SC_TRACE),
+ "SC_TRACE_EVENT_FILTER": ValueOf(syscall.SC_TRACE_EVENT_FILTER),
+ "SC_TRACE_EVENT_NAME_MAX": ValueOf(syscall.SC_TRACE_EVENT_NAME_MAX),
+ "SC_TRACE_INHERIT": ValueOf(syscall.SC_TRACE_INHERIT),
+ "SC_TRACE_LOG": ValueOf(syscall.SC_TRACE_LOG),
+ "SC_TRACE_NAME_MAX": ValueOf(syscall.SC_TRACE_NAME_MAX),
+ "SC_TRACE_SYS_MAX": ValueOf(syscall.SC_TRACE_SYS_MAX),
+ "SC_TRACE_USER_EVENT_MAX": ValueOf(syscall.SC_TRACE_USER_EVENT_MAX),
+ "SC_TTY_NAME_MAX": ValueOf(syscall.SC_TTY_NAME_MAX),
+ "SC_TYPED_MEMORY_OBJECTS": ValueOf(syscall.SC_TYPED_MEMORY_OBJECTS),
+ "SC_TZNAME_MAX": ValueOf(syscall.SC_TZNAME_MAX),
+ "SC_T_IOV_MAX": ValueOf(syscall.SC_T_IOV_MAX),
+ "SC_UCHAR_MAX": ValueOf(syscall.SC_UCHAR_MAX),
+ "SC_UINT_MAX": ValueOf(syscall.SC_UINT_MAX),
+ "SC_UIO_MAXIOV": ValueOf(syscall.SC_UIO_MAXIOV),
+ "SC_ULONG_MAX": ValueOf(syscall.SC_ULONG_MAX),
+ "SC_USER_GROUPS": ValueOf(syscall.SC_USER_GROUPS),
+ "SC_USER_GROUPS_R": ValueOf(syscall.SC_USER_GROUPS_R),
+ "SC_USHRT_MAX": ValueOf(syscall.SC_USHRT_MAX),
+ "SC_V6_ILP32_OFF32": ValueOf(syscall.SC_V6_ILP32_OFF32),
+ "SC_V6_ILP32_OFFBIG": ValueOf(syscall.SC_V6_ILP32_OFFBIG),
+ "SC_V6_LP64_OFF64": ValueOf(syscall.SC_V6_LP64_OFF64),
+ "SC_V6_LPBIG_OFFBIG": ValueOf(syscall.SC_V6_LPBIG_OFFBIG),
+ "SC_V7_ILP32_OFF32": ValueOf(syscall.SC_V7_ILP32_OFF32),
+ "SC_V7_ILP32_OFFBIG": ValueOf(syscall.SC_V7_ILP32_OFFBIG),
+ "SC_V7_LP64_OFF64": ValueOf(syscall.SC_V7_LP64_OFF64),
+ "SC_V7_LPBIG_OFFBIG": ValueOf(syscall.SC_V7_LPBIG_OFFBIG),
+ "SC_VERSION": ValueOf(syscall.SC_VERSION),
+ "SC_WORD_BIT": ValueOf(syscall.SC_WORD_BIT),
+ "SC_XBS5_ILP32_OFF32": ValueOf(syscall.SC_XBS5_ILP32_OFF32),
+ "SC_XBS5_ILP32_OFFBIG": ValueOf(syscall.SC_XBS5_ILP32_OFFBIG),
+ "SC_XBS5_LP64_OFF64": ValueOf(syscall.SC_XBS5_LP64_OFF64),
+ "SC_XBS5_LPBIG_OFFBIG": ValueOf(syscall.SC_XBS5_LPBIG_OFFBIG),
+ "SC_XOPEN_CRYPT": ValueOf(syscall.SC_XOPEN_CRYPT),
+ "SC_XOPEN_ENH_I18N": ValueOf(syscall.SC_XOPEN_ENH_I18N),
+ "SC_XOPEN_LEGACY": ValueOf(syscall.SC_XOPEN_LEGACY),
+ "SC_XOPEN_REALTIME": ValueOf(syscall.SC_XOPEN_REALTIME),
+ "SC_XOPEN_REALTIME_THREADS": ValueOf(syscall.SC_XOPEN_REALTIME_THREADS),
+ "SC_XOPEN_SHM": ValueOf(syscall.SC_XOPEN_SHM),
+ "SC_XOPEN_STREAMS": ValueOf(syscall.SC_XOPEN_STREAMS),
+ "SC_XOPEN_UNIX": ValueOf(syscall.SC_XOPEN_UNIX),
+ "SC_XOPEN_VERSION": ValueOf(syscall.SC_XOPEN_VERSION),
+ "SC_XOPEN_XCU_VERSION": ValueOf(syscall.SC_XOPEN_XCU_VERSION),
+ "SC_XOPEN_XPG2": ValueOf(syscall.SC_XOPEN_XPG2),
+ "SC_XOPEN_XPG3": ValueOf(syscall.SC_XOPEN_XPG3),
+ "SC_XOPEN_XPG4": ValueOf(syscall.SC_XOPEN_XPG4),
+ "SHUT_RD": ValueOf(syscall.SHUT_RD),
+ "SHUT_RDWR": ValueOf(syscall.SHUT_RDWR),
+ "SHUT_WR": ValueOf(syscall.SHUT_WR),
+ "SIGABRT": ValueOf(syscall.SIGABRT),
+ "SIGALRM": ValueOf(syscall.SIGALRM),
+ "SIGBUS": ValueOf(syscall.SIGBUS),
+ "SIGCHLD": ValueOf(syscall.SIGCHLD),
+ "SIGCLD": ValueOf(syscall.SIGCLD),
+ "SIGCONT": ValueOf(syscall.SIGCONT),
+ "SIGFPE": ValueOf(syscall.SIGFPE),
+ "SIGHUP": ValueOf(syscall.SIGHUP),
+ "SIGILL": ValueOf(syscall.SIGILL),
+ "SIGINT": ValueOf(syscall.SIGINT),
+ "SIGIO": ValueOf(syscall.SIGIO),
+ "SIGIOT": ValueOf(syscall.SIGIOT),
+ "SIGKILL": ValueOf(syscall.SIGKILL),
+ "SIGPIPE": ValueOf(syscall.SIGPIPE),
+ "SIGPOLL": ValueOf(syscall.SIGPOLL),
+ "SIGPROF": ValueOf(syscall.SIGPROF),
+ "SIGPWR": ValueOf(syscall.SIGPWR),
+ "SIGQUIT": ValueOf(syscall.SIGQUIT),
+ "SIGSEGV": ValueOf(syscall.SIGSEGV),
+ "SIGSTKFLT": ValueOf(syscall.SIGSTKFLT),
+ "SIGSTKSZ": ValueOf(syscall.SIGSTKSZ),
+ "SIGSTOP": ValueOf(syscall.SIGSTOP),
+ "SIGSYS": ValueOf(syscall.SIGSYS),
+ "SIGTERM": ValueOf(syscall.SIGTERM),
+ "SIGTRAP": ValueOf(syscall.SIGTRAP),
+ "SIGTSTP": ValueOf(syscall.SIGTSTP),
+ "SIGTTIN": ValueOf(syscall.SIGTTIN),
+ "SIGTTOU": ValueOf(syscall.SIGTTOU),
+ "SIGURG": ValueOf(syscall.SIGURG),
+ "SIGUSR1": ValueOf(syscall.SIGUSR1),
+ "SIGUSR2": ValueOf(syscall.SIGUSR2),
+ "SIGVTALRM": ValueOf(syscall.SIGVTALRM),
+ "SIGWINCH": ValueOf(syscall.SIGWINCH),
+ "SIGXCPU": ValueOf(syscall.SIGXCPU),
+ "SIGXFSZ": ValueOf(syscall.SIGXFSZ),
+ "SIOCADDDLCI": ValueOf(syscall.SIOCADDDLCI),
+ "SIOCADDMULTI": ValueOf(syscall.SIOCADDMULTI),
+ "SIOCADDRT": ValueOf(syscall.SIOCADDRT),
+ "SIOCATMARK": ValueOf(syscall.SIOCATMARK),
+ "SIOCDARP": ValueOf(syscall.SIOCDARP),
+ "SIOCDELDLCI": ValueOf(syscall.SIOCDELDLCI),
+ "SIOCDELMULTI": ValueOf(syscall.SIOCDELMULTI),
+ "SIOCDELRT": ValueOf(syscall.SIOCDELRT),
+ "SIOCDEVPRIVATE": ValueOf(syscall.SIOCDEVPRIVATE),
+ "SIOCDIFADDR": ValueOf(syscall.SIOCDIFADDR),
+ "SIOCDRARP": ValueOf(syscall.SIOCDRARP),
+ "SIOCGARP": ValueOf(syscall.SIOCGARP),
+ "SIOCGIFADDR": ValueOf(syscall.SIOCGIFADDR),
+ "SIOCGIFBR": ValueOf(syscall.SIOCGIFBR),
+ "SIOCGIFBRDADDR": ValueOf(syscall.SIOCGIFBRDADDR),
+ "SIOCGIFCONF": ValueOf(syscall.SIOCGIFCONF),
+ "SIOCGIFCOUNT": ValueOf(syscall.SIOCGIFCOUNT),
+ "SIOCGIFDSTADDR": ValueOf(syscall.SIOCGIFDSTADDR),
+ "SIOCGIFENCAP": ValueOf(syscall.SIOCGIFENCAP),
+ "SIOCGIFFLAGS": ValueOf(syscall.SIOCGIFFLAGS),
+ "SIOCGIFHWADDR": ValueOf(syscall.SIOCGIFHWADDR),
+ "SIOCGIFINDEX": ValueOf(syscall.SIOCGIFINDEX),
+ "SIOCGIFMAP": ValueOf(syscall.SIOCGIFMAP),
+ "SIOCGIFMEM": ValueOf(syscall.SIOCGIFMEM),
+ "SIOCGIFMETRIC": ValueOf(syscall.SIOCGIFMETRIC),
+ "SIOCGIFMTU": ValueOf(syscall.SIOCGIFMTU),
+ "SIOCGIFNAME": ValueOf(syscall.SIOCGIFNAME),
+ "SIOCGIFNETMASK": ValueOf(syscall.SIOCGIFNETMASK),
+ "SIOCGIFPFLAGS": ValueOf(syscall.SIOCGIFPFLAGS),
+ "SIOCGIFSLAVE": ValueOf(syscall.SIOCGIFSLAVE),
+ "SIOCGIFTXQLEN": ValueOf(syscall.SIOCGIFTXQLEN),
+ "SIOCGPGRP": ValueOf(syscall.SIOCGPGRP),
+ "SIOCGRARP": ValueOf(syscall.SIOCGRARP),
+ "SIOCGSTAMP": ValueOf(syscall.SIOCGSTAMP),
+ "SIOCGSTAMPNS": ValueOf(syscall.SIOCGSTAMPNS),
+ "SIOCPROTOPRIVATE": ValueOf(syscall.SIOCPROTOPRIVATE),
+ "SIOCRTMSG": ValueOf(syscall.SIOCRTMSG),
+ "SIOCSARP": ValueOf(syscall.SIOCSARP),
+ "SIOCSIFADDR": ValueOf(syscall.SIOCSIFADDR),
+ "SIOCSIFBR": ValueOf(syscall.SIOCSIFBR),
+ "SIOCSIFBRDADDR": ValueOf(syscall.SIOCSIFBRDADDR),
+ "SIOCSIFDSTADDR": ValueOf(syscall.SIOCSIFDSTADDR),
+ "SIOCSIFENCAP": ValueOf(syscall.SIOCSIFENCAP),
+ "SIOCSIFFLAGS": ValueOf(syscall.SIOCSIFFLAGS),
+ "SIOCSIFHWADDR": ValueOf(syscall.SIOCSIFHWADDR),
+ "SIOCSIFHWBROADCAST": ValueOf(syscall.SIOCSIFHWBROADCAST),
+ "SIOCSIFLINK": ValueOf(syscall.SIOCSIFLINK),
+ "SIOCSIFMAP": ValueOf(syscall.SIOCSIFMAP),
+ "SIOCSIFMEM": ValueOf(syscall.SIOCSIFMEM),
+ "SIOCSIFMETRIC": ValueOf(syscall.SIOCSIFMETRIC),
+ "SIOCSIFMTU": ValueOf(syscall.SIOCSIFMTU),
+ "SIOCSIFNAME": ValueOf(syscall.SIOCSIFNAME),
+ "SIOCSIFNETMASK": ValueOf(syscall.SIOCSIFNETMASK),
+ "SIOCSIFPFLAGS": ValueOf(syscall.SIOCSIFPFLAGS),
+ "SIOCSIFSLAVE": ValueOf(syscall.SIOCSIFSLAVE),
+ "SIOCSIFTXQLEN": ValueOf(syscall.SIOCSIFTXQLEN),
+ "SIOCSPGRP": ValueOf(syscall.SIOCSPGRP),
+ "SIOCSRARP": ValueOf(syscall.SIOCSRARP),
+ "SOCK_CLOEXEC": ValueOf(syscall.SOCK_CLOEXEC),
+ "SOCK_DCCP": ValueOf(syscall.SOCK_DCCP),
+ "SOCK_DGRAM": ValueOf(syscall.SOCK_DGRAM),
+ "SOCK_NONBLOCK": ValueOf(syscall.SOCK_NONBLOCK),
+ "SOCK_PACKET": ValueOf(syscall.SOCK_PACKET),
+ "SOCK_RAW": ValueOf(syscall.SOCK_RAW),
+ "SOCK_RDM": ValueOf(syscall.SOCK_RDM),
+ "SOCK_SEQPACKET": ValueOf(syscall.SOCK_SEQPACKET),
+ "SOCK_STREAM": ValueOf(syscall.SOCK_STREAM),
+ "SOL_AAL": ValueOf(syscall.SOL_AAL),
+ "SOL_ALG": ValueOf(syscall.SOL_ALG),
+ "SOL_ATM": ValueOf(syscall.SOL_ATM),
+ "SOL_BLUETOOTH": ValueOf(syscall.SOL_BLUETOOTH),
+ "SOL_CAIF": ValueOf(syscall.SOL_CAIF),
+ "SOL_DCCP": ValueOf(syscall.SOL_DCCP),
+ "SOL_DECNET": ValueOf(syscall.SOL_DECNET),
+ "SOL_ICMPV6": ValueOf(syscall.SOL_ICMPV6),
+ "SOL_IP": ValueOf(syscall.SOL_IP),
+ "SOL_IPV6": ValueOf(syscall.SOL_IPV6),
+ "SOL_IRDA": ValueOf(syscall.SOL_IRDA),
+ "SOL_IUCV": ValueOf(syscall.SOL_IUCV),
+ "SOL_KCM": ValueOf(syscall.SOL_KCM),
+ "SOL_LLC": ValueOf(syscall.SOL_LLC),
+ "SOL_NETBEUI": ValueOf(syscall.SOL_NETBEUI),
+ "SOL_NETLINK": ValueOf(syscall.SOL_NETLINK),
+ "SOL_NFC": ValueOf(syscall.SOL_NFC),
+ "SOL_PACKET": ValueOf(syscall.SOL_PACKET),
+ "SOL_PNPIPE": ValueOf(syscall.SOL_PNPIPE),
+ "SOL_PPPOL2TP": ValueOf(syscall.SOL_PPPOL2TP),
+ "SOL_RAW": ValueOf(syscall.SOL_RAW),
+ "SOL_RDS": ValueOf(syscall.SOL_RDS),
+ "SOL_RXRPC": ValueOf(syscall.SOL_RXRPC),
+ "SOL_SOCKET": ValueOf(syscall.SOL_SOCKET),
+ "SOL_TCP": ValueOf(syscall.SOL_TCP),
+ "SOL_TIPC": ValueOf(syscall.SOL_TIPC),
+ "SOL_TLS": ValueOf(syscall.SOL_TLS),
+ "SOL_X25": ValueOf(syscall.SOL_X25),
+ "SOMAXCONN": ValueOf(syscall.SOMAXCONN),
+ "SO_ACCEPTCONN": ValueOf(syscall.SO_ACCEPTCONN),
+ "SO_ATTACH_BPF": ValueOf(syscall.SO_ATTACH_BPF),
+ "SO_ATTACH_FILTER": ValueOf(syscall.SO_ATTACH_FILTER),
+ "SO_ATTACH_REUSEPORT_CBPF": ValueOf(syscall.SO_ATTACH_REUSEPORT_CBPF),
+ "SO_ATTACH_REUSEPORT_EBPF": ValueOf(syscall.SO_ATTACH_REUSEPORT_EBPF),
+ "SO_BINDTODEVICE": ValueOf(syscall.SO_BINDTODEVICE),
+ "SO_BPF_EXTENSIONS": ValueOf(syscall.SO_BPF_EXTENSIONS),
+ "SO_BROADCAST": ValueOf(syscall.SO_BROADCAST),
+ "SO_BSDCOMPAT": ValueOf(syscall.SO_BSDCOMPAT),
+ "SO_BUSY_POLL": ValueOf(syscall.SO_BUSY_POLL),
+ "SO_CNX_ADVICE": ValueOf(syscall.SO_CNX_ADVICE),
+ "SO_COOKIE": ValueOf(syscall.SO_COOKIE),
+ "SO_DEBUG": ValueOf(syscall.SO_DEBUG),
+ "SO_DETACH_BPF": ValueOf(syscall.SO_DETACH_BPF),
+ "SO_DETACH_FILTER": ValueOf(syscall.SO_DETACH_FILTER),
+ "SO_DOMAIN": ValueOf(syscall.SO_DOMAIN),
+ "SO_DONTROUTE": ValueOf(syscall.SO_DONTROUTE),
+ "SO_ERROR": ValueOf(syscall.SO_ERROR),
+ "SO_GET_FILTER": ValueOf(syscall.SO_GET_FILTER),
+ "SO_INCOMING_CPU": ValueOf(syscall.SO_INCOMING_CPU),
+ "SO_INCOMING_NAPI_ID": ValueOf(syscall.SO_INCOMING_NAPI_ID),
+ "SO_KEEPALIVE": ValueOf(syscall.SO_KEEPALIVE),
+ "SO_LINGER": ValueOf(syscall.SO_LINGER),
+ "SO_LOCK_FILTER": ValueOf(syscall.SO_LOCK_FILTER),
+ "SO_MARK": ValueOf(syscall.SO_MARK),
+ "SO_MAX_PACING_RATE": ValueOf(syscall.SO_MAX_PACING_RATE),
+ "SO_MEMINFO": ValueOf(syscall.SO_MEMINFO),
+ "SO_NOFCS": ValueOf(syscall.SO_NOFCS),
+ "SO_NO_CHECK": ValueOf(syscall.SO_NO_CHECK),
+ "SO_OOBINLINE": ValueOf(syscall.SO_OOBINLINE),
+ "SO_PASSCRED": ValueOf(syscall.SO_PASSCRED),
+ "SO_PASSSEC": ValueOf(syscall.SO_PASSSEC),
+ "SO_PEEK_OFF": ValueOf(syscall.SO_PEEK_OFF),
+ "SO_PEERCRED": ValueOf(syscall.SO_PEERCRED),
+ "SO_PEERGROUPS": ValueOf(syscall.SO_PEERGROUPS),
+ "SO_PEERNAME": ValueOf(syscall.SO_PEERNAME),
+ "SO_PEERSEC": ValueOf(syscall.SO_PEERSEC),
+ "SO_PRIORITY": ValueOf(syscall.SO_PRIORITY),
+ "SO_PROTOCOL": ValueOf(syscall.SO_PROTOCOL),
+ "SO_RCVBUF": ValueOf(syscall.SO_RCVBUF),
+ "SO_RCVBUFFORCE": ValueOf(syscall.SO_RCVBUFFORCE),
+ "SO_RCVLOWAT": ValueOf(syscall.SO_RCVLOWAT),
+ "SO_RCVTIMEO": ValueOf(syscall.SO_RCVTIMEO),
+ "SO_REUSEADDR": ValueOf(syscall.SO_REUSEADDR),
+ "SO_REUSEPORT": ValueOf(syscall.SO_REUSEPORT),
+ "SO_RXQ_OVFL": ValueOf(syscall.SO_RXQ_OVFL),
+ "SO_SECURITY_AUTHENTICATION": ValueOf(syscall.SO_SECURITY_AUTHENTICATION),
+ "SO_SECURITY_ENCRYPTION_NETWORK": ValueOf(syscall.SO_SECURITY_ENCRYPTION_NETWORK),
+ "SO_SECURITY_ENCRYPTION_TRANSPORT": ValueOf(syscall.SO_SECURITY_ENCRYPTION_TRANSPORT),
+ "SO_SELECT_ERR_QUEUE": ValueOf(syscall.SO_SELECT_ERR_QUEUE),
+ "SO_SNDBUF": ValueOf(syscall.SO_SNDBUF),
+ "SO_SNDBUFFORCE": ValueOf(syscall.SO_SNDBUFFORCE),
+ "SO_SNDLOWAT": ValueOf(syscall.SO_SNDLOWAT),
+ "SO_SNDTIMEO": ValueOf(syscall.SO_SNDTIMEO),
+ "SO_TIMESTAMP": ValueOf(syscall.SO_TIMESTAMP),
+ "SO_TIMESTAMPING": ValueOf(syscall.SO_TIMESTAMPING),
+ "SO_TIMESTAMPNS": ValueOf(syscall.SO_TIMESTAMPNS),
+ "SO_TYPE": ValueOf(syscall.SO_TYPE),
+ "SO_WIFI_STATUS": ValueOf(syscall.SO_WIFI_STATUS),
+ "SO_ZEROCOPY": ValueOf(syscall.SO_ZEROCOPY),
+ "SYS_ACCEPT": ValueOf(syscall.SYS_ACCEPT),
+ "SYS_ACCEPT4": ValueOf(syscall.SYS_ACCEPT4),
+ "SYS_ACCT": ValueOf(syscall.SYS_ACCT),
+ "SYS_ADD_KEY": ValueOf(syscall.SYS_ADD_KEY),
+ "SYS_ADJTIMEX": ValueOf(syscall.SYS_ADJTIMEX),
+ "SYS_BIND": ValueOf(syscall.SYS_BIND),
+ "SYS_BPF": ValueOf(syscall.SYS_BPF),
+ "SYS_BRK": ValueOf(syscall.SYS_BRK),
+ "SYS_CAPGET": ValueOf(syscall.SYS_CAPGET),
+ "SYS_CAPSET": ValueOf(syscall.SYS_CAPSET),
+ "SYS_CHDIR": ValueOf(syscall.SYS_CHDIR),
+ "SYS_CHROOT": ValueOf(syscall.SYS_CHROOT),
+ "SYS_CLOCK_ADJTIME": ValueOf(syscall.SYS_CLOCK_ADJTIME),
+ "SYS_CLOCK_GETRES": ValueOf(syscall.SYS_CLOCK_GETRES),
+ "SYS_CLOCK_GETTIME": ValueOf(syscall.SYS_CLOCK_GETTIME),
+ "SYS_CLOCK_NANOSLEEP": ValueOf(syscall.SYS_CLOCK_NANOSLEEP),
+ "SYS_CLOCK_SETTIME": ValueOf(syscall.SYS_CLOCK_SETTIME),
+ "SYS_CLONE": ValueOf(syscall.SYS_CLONE),
+ "SYS_CLOSE": ValueOf(syscall.SYS_CLOSE),
+ "SYS_CONNECT": ValueOf(syscall.SYS_CONNECT),
+ "SYS_COPY_FILE_RANGE": ValueOf(syscall.SYS_COPY_FILE_RANGE),
+ "SYS_DELETE_MODULE": ValueOf(syscall.SYS_DELETE_MODULE),
+ "SYS_DUP": ValueOf(syscall.SYS_DUP),
+ "SYS_DUP3": ValueOf(syscall.SYS_DUP3),
+ "SYS_EPOLL_CREATE1": ValueOf(syscall.SYS_EPOLL_CREATE1),
+ "SYS_EPOLL_CTL": ValueOf(syscall.SYS_EPOLL_CTL),
+ "SYS_EPOLL_PWAIT": ValueOf(syscall.SYS_EPOLL_PWAIT),
+ "SYS_EVENTFD2": ValueOf(syscall.SYS_EVENTFD2),
+ "SYS_EXECVE": ValueOf(syscall.SYS_EXECVE),
+ "SYS_EXECVEAT": ValueOf(syscall.SYS_EXECVEAT),
+ "SYS_EXIT": ValueOf(syscall.SYS_EXIT),
+ "SYS_EXIT_GROUP": ValueOf(syscall.SYS_EXIT_GROUP),
+ "SYS_FACCESSAT": ValueOf(syscall.SYS_FACCESSAT),
+ "SYS_FADVISE64": ValueOf(syscall.SYS_FADVISE64),
+ "SYS_FALLOCATE": ValueOf(syscall.SYS_FALLOCATE),
+ "SYS_FANOTIFY_INIT": ValueOf(syscall.SYS_FANOTIFY_INIT),
+ "SYS_FANOTIFY_MARK": ValueOf(syscall.SYS_FANOTIFY_MARK),
+ "SYS_FCHDIR": ValueOf(syscall.SYS_FCHDIR),
+ "SYS_FCHMOD": ValueOf(syscall.SYS_FCHMOD),
+ "SYS_FCHMODAT": ValueOf(syscall.SYS_FCHMODAT),
+ "SYS_FCHOWN": ValueOf(syscall.SYS_FCHOWN),
+ "SYS_FCHOWNAT": ValueOf(syscall.SYS_FCHOWNAT),
+ "SYS_FCNTL": ValueOf(syscall.SYS_FCNTL),
+ "SYS_FDATASYNC": ValueOf(syscall.SYS_FDATASYNC),
+ "SYS_FGETXATTR": ValueOf(syscall.SYS_FGETXATTR),
+ "SYS_FINIT_MODULE": ValueOf(syscall.SYS_FINIT_MODULE),
+ "SYS_FLISTXATTR": ValueOf(syscall.SYS_FLISTXATTR),
+ "SYS_FLOCK": ValueOf(syscall.SYS_FLOCK),
+ "SYS_FREMOVEXATTR": ValueOf(syscall.SYS_FREMOVEXATTR),
+ "SYS_FSETXATTR": ValueOf(syscall.SYS_FSETXATTR),
+ "SYS_FSTAT": ValueOf(syscall.SYS_FSTAT),
+ "SYS_FSTATFS": ValueOf(syscall.SYS_FSTATFS),
+ "SYS_FSYNC": ValueOf(syscall.SYS_FSYNC),
+ "SYS_FTRUNCATE": ValueOf(syscall.SYS_FTRUNCATE),
+ "SYS_FUTEX": ValueOf(syscall.SYS_FUTEX),
+ "SYS_GETCPU": ValueOf(syscall.SYS_GETCPU),
+ "SYS_GETCWD": ValueOf(syscall.SYS_GETCWD),
+ "SYS_GETDENTS": ValueOf(syscall.SYS_GETDENTS),
+ "SYS_GETDENTS64": ValueOf(syscall.SYS_GETDENTS64),
+ "SYS_GETEGID": ValueOf(syscall.SYS_GETEGID),
+ "SYS_GETEUID": ValueOf(syscall.SYS_GETEUID),
+ "SYS_GETGID": ValueOf(syscall.SYS_GETGID),
+ "SYS_GETGROUPS": ValueOf(syscall.SYS_GETGROUPS),
+ "SYS_GETITIMER": ValueOf(syscall.SYS_GETITIMER),
+ "SYS_GETPEERNAME": ValueOf(syscall.SYS_GETPEERNAME),
+ "SYS_GETPGID": ValueOf(syscall.SYS_GETPGID),
+ "SYS_GETPID": ValueOf(syscall.SYS_GETPID),
+ "SYS_GETPPID": ValueOf(syscall.SYS_GETPPID),
+ "SYS_GETPRIORITY": ValueOf(syscall.SYS_GETPRIORITY),
+ "SYS_GETRANDOM": ValueOf(syscall.SYS_GETRANDOM),
+ "SYS_GETRESGID": ValueOf(syscall.SYS_GETRESGID),
+ "SYS_GETRESUID": ValueOf(syscall.SYS_GETRESUID),
+ "SYS_GETRLIMIT": ValueOf(syscall.SYS_GETRLIMIT),
+ "SYS_GETRUSAGE": ValueOf(syscall.SYS_GETRUSAGE),
+ "SYS_GETSID": ValueOf(syscall.SYS_GETSID),
+ "SYS_GETSOCKNAME": ValueOf(syscall.SYS_GETSOCKNAME),
+ "SYS_GETSOCKOPT": ValueOf(syscall.SYS_GETSOCKOPT),
+ "SYS_GETTID": ValueOf(syscall.SYS_GETTID),
+ "SYS_GETTIMEOFDAY": ValueOf(syscall.SYS_GETTIMEOFDAY),
+ "SYS_GETUID": ValueOf(syscall.SYS_GETUID),
+ "SYS_GETXATTR": ValueOf(syscall.SYS_GETXATTR),
+ "SYS_GET_MEMPOLICY": ValueOf(syscall.SYS_GET_MEMPOLICY),
+ "SYS_GET_ROBUST_LIST": ValueOf(syscall.SYS_GET_ROBUST_LIST),
+ "SYS_INIT_MODULE": ValueOf(syscall.SYS_INIT_MODULE),
+ "SYS_INOTIFY_ADD_WATCH": ValueOf(syscall.SYS_INOTIFY_ADD_WATCH),
+ "SYS_INOTIFY_INIT1": ValueOf(syscall.SYS_INOTIFY_INIT1),
+ "SYS_INOTIFY_RM_WATCH": ValueOf(syscall.SYS_INOTIFY_RM_WATCH),
+ "SYS_IOCTL": ValueOf(syscall.SYS_IOCTL),
+ "SYS_IOPRIO_GET": ValueOf(syscall.SYS_IOPRIO_GET),
+ "SYS_IOPRIO_SET": ValueOf(syscall.SYS_IOPRIO_SET),
+ "SYS_IO_CANCEL": ValueOf(syscall.SYS_IO_CANCEL),
+ "SYS_IO_DESTROY": ValueOf(syscall.SYS_IO_DESTROY),
+ "SYS_IO_GETEVENTS": ValueOf(syscall.SYS_IO_GETEVENTS),
+ "SYS_IO_SETUP": ValueOf(syscall.SYS_IO_SETUP),
+ "SYS_IO_SUBMIT": ValueOf(syscall.SYS_IO_SUBMIT),
+ "SYS_KCMP": ValueOf(syscall.SYS_KCMP),
+ "SYS_KEXEC_LOAD": ValueOf(syscall.SYS_KEXEC_LOAD),
+ "SYS_KEYCTL": ValueOf(syscall.SYS_KEYCTL),
+ "SYS_KILL": ValueOf(syscall.SYS_KILL),
+ "SYS_LGETXATTR": ValueOf(syscall.SYS_LGETXATTR),
+ "SYS_LINKAT": ValueOf(syscall.SYS_LINKAT),
+ "SYS_LISTEN": ValueOf(syscall.SYS_LISTEN),
+ "SYS_LISTXATTR": ValueOf(syscall.SYS_LISTXATTR),
+ "SYS_LLISTXATTR": ValueOf(syscall.SYS_LLISTXATTR),
+ "SYS_LOOKUP_DCOOKIE": ValueOf(syscall.SYS_LOOKUP_DCOOKIE),
+ "SYS_LREMOVEXATTR": ValueOf(syscall.SYS_LREMOVEXATTR),
+ "SYS_LSEEK": ValueOf(syscall.SYS_LSEEK),
+ "SYS_LSETXATTR": ValueOf(syscall.SYS_LSETXATTR),
+ "SYS_MADVISE": ValueOf(syscall.SYS_MADVISE),
+ "SYS_MBIND": ValueOf(syscall.SYS_MBIND),
+ "SYS_MEMBARRIER": ValueOf(syscall.SYS_MEMBARRIER),
+ "SYS_MEMFD_CREATE": ValueOf(syscall.SYS_MEMFD_CREATE),
+ "SYS_MIGRATE_PAGES": ValueOf(syscall.SYS_MIGRATE_PAGES),
+ "SYS_MINCORE": ValueOf(syscall.SYS_MINCORE),
+ "SYS_MKDIRAT": ValueOf(syscall.SYS_MKDIRAT),
+ "SYS_MKNODAT": ValueOf(syscall.SYS_MKNODAT),
+ "SYS_MLOCK": ValueOf(syscall.SYS_MLOCK),
+ "SYS_MLOCK2": ValueOf(syscall.SYS_MLOCK2),
+ "SYS_MLOCKALL": ValueOf(syscall.SYS_MLOCKALL),
+ "SYS_MMAP": ValueOf(syscall.SYS_MMAP),
+ "SYS_MOUNT": ValueOf(syscall.SYS_MOUNT),
+ "SYS_MOVE_PAGES": ValueOf(syscall.SYS_MOVE_PAGES),
+ "SYS_MPROTECT": ValueOf(syscall.SYS_MPROTECT),
+ "SYS_MQ_GETSETATTR": ValueOf(syscall.SYS_MQ_GETSETATTR),
+ "SYS_MQ_NOTIFY": ValueOf(syscall.SYS_MQ_NOTIFY),
+ "SYS_MQ_OPEN": ValueOf(syscall.SYS_MQ_OPEN),
+ "SYS_MQ_TIMEDRECEIVE": ValueOf(syscall.SYS_MQ_TIMEDRECEIVE),
+ "SYS_MQ_TIMEDSEND": ValueOf(syscall.SYS_MQ_TIMEDSEND),
+ "SYS_MQ_UNLINK": ValueOf(syscall.SYS_MQ_UNLINK),
+ "SYS_MREMAP": ValueOf(syscall.SYS_MREMAP),
+ "SYS_MSGCTL": ValueOf(syscall.SYS_MSGCTL),
+ "SYS_MSGGET": ValueOf(syscall.SYS_MSGGET),
+ "SYS_MSGRCV": ValueOf(syscall.SYS_MSGRCV),
+ "SYS_MSGSND": ValueOf(syscall.SYS_MSGSND),
+ "SYS_MSYNC": ValueOf(syscall.SYS_MSYNC),
+ "SYS_MUNLOCK": ValueOf(syscall.SYS_MUNLOCK),
+ "SYS_MUNLOCKALL": ValueOf(syscall.SYS_MUNLOCKALL),
+ "SYS_MUNMAP": ValueOf(syscall.SYS_MUNMAP),
+ "SYS_NAME_TO_HANDLE_AT": ValueOf(syscall.SYS_NAME_TO_HANDLE_AT),
+ "SYS_NANOSLEEP": ValueOf(syscall.SYS_NANOSLEEP),
+ "SYS_NEWFSTATAT": ValueOf(syscall.SYS_NEWFSTATAT),
+ "SYS_NFSSERVCTL": ValueOf(syscall.SYS_NFSSERVCTL),
+ "SYS_NMLN": ValueOf(syscall.SYS_NMLN),
+ "SYS_OPENAT": ValueOf(syscall.SYS_OPENAT),
+ "SYS_OPEN_BY_HANDLE_AT": ValueOf(syscall.SYS_OPEN_BY_HANDLE_AT),
+ "SYS_PERF_EVENT_OPEN": ValueOf(syscall.SYS_PERF_EVENT_OPEN),
+ "SYS_PERSONALITY": ValueOf(syscall.SYS_PERSONALITY),
+ "SYS_PIPE2": ValueOf(syscall.SYS_PIPE2),
+ "SYS_PIVOT_ROOT": ValueOf(syscall.SYS_PIVOT_ROOT),
+ "SYS_PKEY_ALLOC": ValueOf(syscall.SYS_PKEY_ALLOC),
+ "SYS_PKEY_FREE": ValueOf(syscall.SYS_PKEY_FREE),
+ "SYS_PKEY_MPROTECT": ValueOf(syscall.SYS_PKEY_MPROTECT),
+ "SYS_PPOLL": ValueOf(syscall.SYS_PPOLL),
+ "SYS_PRCTL": ValueOf(syscall.SYS_PRCTL),
+ "SYS_PREAD64": ValueOf(syscall.SYS_PREAD64),
+ "SYS_PREADV": ValueOf(syscall.SYS_PREADV),
+ "SYS_PREADV2": ValueOf(syscall.SYS_PREADV2),
+ "SYS_PRLIMIT64": ValueOf(syscall.SYS_PRLIMIT64),
+ "SYS_PROCESS_VM_READV": ValueOf(syscall.SYS_PROCESS_VM_READV),
+ "SYS_PROCESS_VM_WRITEV": ValueOf(syscall.SYS_PROCESS_VM_WRITEV),
+ "SYS_PSELECT6": ValueOf(syscall.SYS_PSELECT6),
+ "SYS_PTRACE": ValueOf(syscall.SYS_PTRACE),
+ "SYS_PWRITE64": ValueOf(syscall.SYS_PWRITE64),
+ "SYS_PWRITEV": ValueOf(syscall.SYS_PWRITEV),
+ "SYS_PWRITEV2": ValueOf(syscall.SYS_PWRITEV2),
+ "SYS_QUOTACTL": ValueOf(syscall.SYS_QUOTACTL),
+ "SYS_READ": ValueOf(syscall.SYS_READ),
+ "SYS_READAHEAD": ValueOf(syscall.SYS_READAHEAD),
+ "SYS_READLINKAT": ValueOf(syscall.SYS_READLINKAT),
+ "SYS_READV": ValueOf(syscall.SYS_READV),
+ "SYS_REBOOT": ValueOf(syscall.SYS_REBOOT),
+ "SYS_RECVFROM": ValueOf(syscall.SYS_RECVFROM),
+ "SYS_RECVMMSG": ValueOf(syscall.SYS_RECVMMSG),
+ "SYS_RECVMSG": ValueOf(syscall.SYS_RECVMSG),
+ "SYS_REMAP_FILE_PAGES": ValueOf(syscall.SYS_REMAP_FILE_PAGES),
+ "SYS_REMOVEXATTR": ValueOf(syscall.SYS_REMOVEXATTR),
+ "SYS_RENAMEAT": ValueOf(syscall.SYS_RENAMEAT),
+ "SYS_RENAMEAT2": ValueOf(syscall.SYS_RENAMEAT2),
+ "SYS_REQUEST_KEY": ValueOf(syscall.SYS_REQUEST_KEY),
+ "SYS_RESTART_SYSCALL": ValueOf(syscall.SYS_RESTART_SYSCALL),
+ "SYS_RT_SIGACTION": ValueOf(syscall.SYS_RT_SIGACTION),
+ "SYS_RT_SIGPENDING": ValueOf(syscall.SYS_RT_SIGPENDING),
+ "SYS_RT_SIGPROCMASK": ValueOf(syscall.SYS_RT_SIGPROCMASK),
+ "SYS_RT_SIGQUEUEINFO": ValueOf(syscall.SYS_RT_SIGQUEUEINFO),
+ "SYS_RT_SIGRETURN": ValueOf(syscall.SYS_RT_SIGRETURN),
+ "SYS_RT_SIGSUSPEND": ValueOf(syscall.SYS_RT_SIGSUSPEND),
+ "SYS_RT_SIGTIMEDWAIT": ValueOf(syscall.SYS_RT_SIGTIMEDWAIT),
+ "SYS_RT_TGSIGQUEUEINFO": ValueOf(syscall.SYS_RT_TGSIGQUEUEINFO),
+ "SYS_SCHED_GETAFFINITY": ValueOf(syscall.SYS_SCHED_GETAFFINITY),
+ "SYS_SCHED_GETATTR": ValueOf(syscall.SYS_SCHED_GETATTR),
+ "SYS_SCHED_GETPARAM": ValueOf(syscall.SYS_SCHED_GETPARAM),
+ "SYS_SCHED_GETSCHEDULER": ValueOf(syscall.SYS_SCHED_GETSCHEDULER),
+ "SYS_SCHED_GET_PRIORITY_MAX": ValueOf(syscall.SYS_SCHED_GET_PRIORITY_MAX),
+ "SYS_SCHED_GET_PRIORITY_MIN": ValueOf(syscall.SYS_SCHED_GET_PRIORITY_MIN),
+ "SYS_SCHED_RR_GET_INTERVAL": ValueOf(syscall.SYS_SCHED_RR_GET_INTERVAL),
+ "SYS_SCHED_SETAFFINITY": ValueOf(syscall.SYS_SCHED_SETAFFINITY),
+ "SYS_SCHED_SETATTR": ValueOf(syscall.SYS_SCHED_SETATTR),
+ "SYS_SCHED_SETPARAM": ValueOf(syscall.SYS_SCHED_SETPARAM),
+ "SYS_SCHED_SETSCHEDULER": ValueOf(syscall.SYS_SCHED_SETSCHEDULER),
+ "SYS_SCHED_YIELD": ValueOf(syscall.SYS_SCHED_YIELD),
+ "SYS_SECCOMP": ValueOf(syscall.SYS_SECCOMP),
+ "SYS_SEMCTL": ValueOf(syscall.SYS_SEMCTL),
+ "SYS_SEMGET": ValueOf(syscall.SYS_SEMGET),
+ "SYS_SEMOP": ValueOf(syscall.SYS_SEMOP),
+ "SYS_SEMTIMEDOP": ValueOf(syscall.SYS_SEMTIMEDOP),
+ "SYS_SENDFILE": ValueOf(syscall.SYS_SENDFILE),
+ "SYS_SENDMMSG": ValueOf(syscall.SYS_SENDMMSG),
+ "SYS_SENDMSG": ValueOf(syscall.SYS_SENDMSG),
+ "SYS_SENDTO": ValueOf(syscall.SYS_SENDTO),
+ "SYS_SETDOMAINNAME": ValueOf(syscall.SYS_SETDOMAINNAME),
+ "SYS_SETFSGID": ValueOf(syscall.SYS_SETFSGID),
+ "SYS_SETFSUID": ValueOf(syscall.SYS_SETFSUID),
+ "SYS_SETGID": ValueOf(syscall.SYS_SETGID),
+ "SYS_SETGROUPS": ValueOf(syscall.SYS_SETGROUPS),
+ "SYS_SETHOSTNAME": ValueOf(syscall.SYS_SETHOSTNAME),
+ "SYS_SETITIMER": ValueOf(syscall.SYS_SETITIMER),
+ "SYS_SETNS": ValueOf(syscall.SYS_SETNS),
+ "SYS_SETPGID": ValueOf(syscall.SYS_SETPGID),
+ "SYS_SETPRIORITY": ValueOf(syscall.SYS_SETPRIORITY),
+ "SYS_SETREGID": ValueOf(syscall.SYS_SETREGID),
+ "SYS_SETRESGID": ValueOf(syscall.SYS_SETRESGID),
+ "SYS_SETRESUID": ValueOf(syscall.SYS_SETRESUID),
+ "SYS_SETREUID": ValueOf(syscall.SYS_SETREUID),
+ "SYS_SETRLIMIT": ValueOf(syscall.SYS_SETRLIMIT),
+ "SYS_SETSID": ValueOf(syscall.SYS_SETSID),
+ "SYS_SETSOCKOPT": ValueOf(syscall.SYS_SETSOCKOPT),
+ "SYS_SETTIMEOFDAY": ValueOf(syscall.SYS_SETTIMEOFDAY),
+ "SYS_SETUID": ValueOf(syscall.SYS_SETUID),
+ "SYS_SETXATTR": ValueOf(syscall.SYS_SETXATTR),
+ "SYS_SET_MEMPOLICY": ValueOf(syscall.SYS_SET_MEMPOLICY),
+ "SYS_SET_ROBUST_LIST": ValueOf(syscall.SYS_SET_ROBUST_LIST),
+ "SYS_SET_TID_ADDRESS": ValueOf(syscall.SYS_SET_TID_ADDRESS),
+ "SYS_SHMAT": ValueOf(syscall.SYS_SHMAT),
+ "SYS_SHMCTL": ValueOf(syscall.SYS_SHMCTL),
+ "SYS_SHMDT": ValueOf(syscall.SYS_SHMDT),
+ "SYS_SHMGET": ValueOf(syscall.SYS_SHMGET),
+ "SYS_SHUTDOWN": ValueOf(syscall.SYS_SHUTDOWN),
+ "SYS_SIGALTSTACK": ValueOf(syscall.SYS_SIGALTSTACK),
+ "SYS_SIGNALFD4": ValueOf(syscall.SYS_SIGNALFD4),
+ "SYS_SOCKET": ValueOf(syscall.SYS_SOCKET),
+ "SYS_SOCKETPAIR": ValueOf(syscall.SYS_SOCKETPAIR),
+ "SYS_SPLICE": ValueOf(syscall.SYS_SPLICE),
+ "SYS_STATFS": ValueOf(syscall.SYS_STATFS),
+ "SYS_STATX": ValueOf(syscall.SYS_STATX),
+ "SYS_SWAPOFF": ValueOf(syscall.SYS_SWAPOFF),
+ "SYS_SWAPON": ValueOf(syscall.SYS_SWAPON),
+ "SYS_SYMLINKAT": ValueOf(syscall.SYS_SYMLINKAT),
+ "SYS_SYNC": ValueOf(syscall.SYS_SYNC),
+ "SYS_SYNCFS": ValueOf(syscall.SYS_SYNCFS),
+ "SYS_SYNC_FILE_RANGE": ValueOf(syscall.SYS_SYNC_FILE_RANGE),
+ "SYS_SYSINFO": ValueOf(syscall.SYS_SYSINFO),
+ "SYS_SYSLOG": ValueOf(syscall.SYS_SYSLOG),
+ "SYS_TEE": ValueOf(syscall.SYS_TEE),
+ "SYS_TGKILL": ValueOf(syscall.SYS_TGKILL),
+ "SYS_TIMERFD_CREATE": ValueOf(syscall.SYS_TIMERFD_CREATE),
+ "SYS_TIMERFD_GETTIME": ValueOf(syscall.SYS_TIMERFD_GETTIME),
+ "SYS_TIMERFD_SETTIME": ValueOf(syscall.SYS_TIMERFD_SETTIME),
+ "SYS_TIMER_CREATE": ValueOf(syscall.SYS_TIMER_CREATE),
+ "SYS_TIMER_DELETE": ValueOf(syscall.SYS_TIMER_DELETE),
+ "SYS_TIMER_GETOVERRUN": ValueOf(syscall.SYS_TIMER_GETOVERRUN),
+ "SYS_TIMER_GETTIME": ValueOf(syscall.SYS_TIMER_GETTIME),
+ "SYS_TIMER_SETTIME": ValueOf(syscall.SYS_TIMER_SETTIME),
+ "SYS_TIMES": ValueOf(syscall.SYS_TIMES),
+ "SYS_TKILL": ValueOf(syscall.SYS_TKILL),
+ "SYS_TRUNCATE": ValueOf(syscall.SYS_TRUNCATE),
+ "SYS_UMASK": ValueOf(syscall.SYS_UMASK),
+ "SYS_UMOUNT2": ValueOf(syscall.SYS_UMOUNT2),
+ "SYS_UNAME": ValueOf(syscall.SYS_UNAME),
+ "SYS_UNLINKAT": ValueOf(syscall.SYS_UNLINKAT),
+ "SYS_UNSHARE": ValueOf(syscall.SYS_UNSHARE),
+ "SYS_USERFAULTFD": ValueOf(syscall.SYS_USERFAULTFD),
+ "SYS_UTIMENSAT": ValueOf(syscall.SYS_UTIMENSAT),
+ "SYS_VHANGUP": ValueOf(syscall.SYS_VHANGUP),
+ "SYS_VMSPLICE": ValueOf(syscall.SYS_VMSPLICE),
+ "SYS_WAIT4": ValueOf(syscall.SYS_WAIT4),
+ "SYS_WAITID": ValueOf(syscall.SYS_WAITID),
+ "SYS_WRITE": ValueOf(syscall.SYS_WRITE),
+ "SYS_WRITEV": ValueOf(syscall.SYS_WRITEV),
+ "S_BLKSIZE": ValueOf(syscall.S_BLKSIZE),
+ "S_IEXEC": ValueOf(syscall.S_IEXEC),
+ "S_IFBLK": ValueOf(syscall.S_IFBLK),
+ "S_IFCHR": ValueOf(syscall.S_IFCHR),
+ "S_IFDIR": ValueOf(syscall.S_IFDIR),
+ "S_IFIFO": ValueOf(syscall.S_IFIFO),
+ "S_IFLNK": ValueOf(syscall.S_IFLNK),
+ "S_IFMT": ValueOf(syscall.S_IFMT),
+ "S_IFREG": ValueOf(syscall.S_IFREG),
+ "S_IFSOCK": ValueOf(syscall.S_IFSOCK),
+ "S_IREAD": ValueOf(syscall.S_IREAD),
+ "S_IRGRP": ValueOf(syscall.S_IRGRP),
+ "S_IROTH": ValueOf(syscall.S_IROTH),
+ "S_IRUSR": ValueOf(syscall.S_IRUSR),
+ "S_IRWXG": ValueOf(syscall.S_IRWXG),
+ "S_IRWXO": ValueOf(syscall.S_IRWXO),
+ "S_IRWXU": ValueOf(syscall.S_IRWXU),
+ "S_ISGID": ValueOf(syscall.S_ISGID),
+ "S_ISUID": ValueOf(syscall.S_ISUID),
+ "S_ISVTX": ValueOf(syscall.S_ISVTX),
+ "S_IWGRP": ValueOf(syscall.S_IWGRP),
+ "S_IWOTH": ValueOf(syscall.S_IWOTH),
+ "S_IWRITE": ValueOf(syscall.S_IWRITE),
+ "S_IWUSR": ValueOf(syscall.S_IWUSR),
+ "S_IXGRP": ValueOf(syscall.S_IXGRP),
+ "S_IXOTH": ValueOf(syscall.S_IXOTH),
+ "S_IXUSR": ValueOf(syscall.S_IXUSR),
+ "Seek": ValueOf(syscall.Seek),
+ "Select": ValueOf(syscall.Select),
+ "Sendfile": ValueOf(syscall.Sendfile),
+ "Sendmsg": ValueOf(syscall.Sendmsg),
+ "SendmsgN": ValueOf(syscall.SendmsgN),
+ "Sendto": ValueOf(syscall.Sendto),
+ "SetErrno": ValueOf(syscall.SetErrno),
+ "SetLsfPromisc": ValueOf(syscall.SetLsfPromisc),
+ "SetNonblock": ValueOf(syscall.SetNonblock),
+ "Setdomainname": ValueOf(syscall.Setdomainname),
+ "Setenv": ValueOf(syscall.Setenv),
+ "Setfsgid": ValueOf(syscall.Setfsgid),
+ "Setfsuid": ValueOf(syscall.Setfsuid),
+ "Setgid": ValueOf(syscall.Setgid),
+ "Setgroups": ValueOf(syscall.Setgroups),
+ "Sethostname": ValueOf(syscall.Sethostname),
+ "Setpgid": ValueOf(syscall.Setpgid),
+ "Setpriority": ValueOf(syscall.Setpriority),
+ "Setregid": ValueOf(syscall.Setregid),
+ "Setresgid": ValueOf(syscall.Setresgid),
+ "Setresuid": ValueOf(syscall.Setresuid),
+ "Setreuid": ValueOf(syscall.Setreuid),
+ "Setrlimit": ValueOf(syscall.Setrlimit),
+ "Setsid": ValueOf(syscall.Setsid),
+ "SetsockoptByte": ValueOf(syscall.SetsockoptByte),
+ "SetsockoptICMPv6Filter": ValueOf(syscall.SetsockoptICMPv6Filter),
+ "SetsockoptIPMreq": ValueOf(syscall.SetsockoptIPMreq),
+ "SetsockoptIPMreqn": ValueOf(syscall.SetsockoptIPMreqn),
+ "SetsockoptIPv6Mreq": ValueOf(syscall.SetsockoptIPv6Mreq),
+ "SetsockoptInet4Addr": ValueOf(syscall.SetsockoptInet4Addr),
+ "SetsockoptInt": ValueOf(syscall.SetsockoptInt),
+ "SetsockoptLinger": ValueOf(syscall.SetsockoptLinger),
+ "SetsockoptString": ValueOf(syscall.SetsockoptString),
+ "SetsockoptTimeval": ValueOf(syscall.SetsockoptTimeval),
+ "Settimeofday": ValueOf(syscall.Settimeofday),
+ "Setuid": ValueOf(syscall.Setuid),
+ "Setxattr": ValueOf(syscall.Setxattr),
+ "Shutdown": ValueOf(syscall.Shutdown),
+ "Signame": ValueOf(syscall.Signame),
+ "SizeofCmsghdr": ValueOf(syscall.SizeofCmsghdr),
+ "SizeofICMPv6Filter": ValueOf(syscall.SizeofICMPv6Filter),
+ "SizeofIPMreq": ValueOf(syscall.SizeofIPMreq),
+ "SizeofIPMreqn": ValueOf(syscall.SizeofIPMreqn),
+ "SizeofIPv6MTUInfo": ValueOf(syscall.SizeofIPv6MTUInfo),
+ "SizeofIPv6Mreq": ValueOf(syscall.SizeofIPv6Mreq),
+ "SizeofIfAddrmsg": ValueOf(syscall.SizeofIfAddrmsg),
+ "SizeofIfInfomsg": ValueOf(syscall.SizeofIfInfomsg),
+ "SizeofInet4Pktinfo": ValueOf(syscall.SizeofInet4Pktinfo),
+ "SizeofInet6Pktinfo": ValueOf(syscall.SizeofInet6Pktinfo),
+ "SizeofInotifyEvent": ValueOf(syscall.SizeofInotifyEvent),
+ "SizeofLinger": ValueOf(syscall.SizeofLinger),
+ "SizeofMsghdr": ValueOf(syscall.SizeofMsghdr),
+ "SizeofNlAttr": ValueOf(syscall.SizeofNlAttr),
+ "SizeofNlMsgerr": ValueOf(syscall.SizeofNlMsgerr),
+ "SizeofNlMsghdr": ValueOf(syscall.SizeofNlMsghdr),
+ "SizeofRtAttr": ValueOf(syscall.SizeofRtAttr),
+ "SizeofRtGenmsg": ValueOf(syscall.SizeofRtGenmsg),
+ "SizeofRtMsg": ValueOf(syscall.SizeofRtMsg),
+ "SizeofRtNexthop": ValueOf(syscall.SizeofRtNexthop),
+ "SizeofSockFilter": ValueOf(syscall.SizeofSockFilter),
+ "SizeofSockFprog": ValueOf(syscall.SizeofSockFprog),
+ "SizeofSockaddrAny": ValueOf(syscall.SizeofSockaddrAny),
+ "SizeofSockaddrInet4": ValueOf(syscall.SizeofSockaddrInet4),
+ "SizeofSockaddrInet6": ValueOf(syscall.SizeofSockaddrInet6),
+ "SizeofSockaddrLinklayer": ValueOf(syscall.SizeofSockaddrLinklayer),
+ "SizeofSockaddrNetlink": ValueOf(syscall.SizeofSockaddrNetlink),
+ "SizeofSockaddrUnix": ValueOf(syscall.SizeofSockaddrUnix),
+ "SizeofUcred": ValueOf(syscall.SizeofUcred),
+ "Sleep": ValueOf(syscall.Sleep),
+ "SlicePtrFromStrings": ValueOf(syscall.SlicePtrFromStrings),
+ "Socket": ValueOf(syscall.Socket),
+ "SocketDisableIPv6": ValueOf(&syscall.SocketDisableIPv6).Elem(),
+ "Socketpair": ValueOf(syscall.Socketpair),
+ "Splice": ValueOf(syscall.Splice),
+ "StartProcess": ValueOf(syscall.StartProcess),
+ "Stat": ValueOf(syscall.Stat),
+ "Statfs": ValueOf(syscall.Statfs),
+ "Stderr": ValueOf(&syscall.Stderr).Elem(),
+ "Stdin": ValueOf(&syscall.Stdin).Elem(),
+ "Stdout": ValueOf(&syscall.Stdout).Elem(),
+ "StringBytePtr": ValueOf(syscall.StringBytePtr),
+ "StringByteSlice": ValueOf(syscall.StringByteSlice),
+ "StringSlicePtr": ValueOf(syscall.StringSlicePtr),
+ "Symlink": ValueOf(syscall.Symlink),
+ "Sync": ValueOf(syscall.Sync),
+ "SyncFileRange": ValueOf(syscall.SyncFileRange),
+ "Syscall": ValueOf(syscall.Syscall),
+ "Syscall6": ValueOf(syscall.Syscall6),
+ "Sysconf": ValueOf(syscall.Sysconf),
+ "Sysinfo": ValueOf(syscall.Sysinfo),
+ "TABDLY": ValueOf(syscall.TABDLY),
+ "TCGETA": ValueOf(syscall.TCGETA),
+ "TCGETS": ValueOf(syscall.TCGETS),
+ "TCGETX": ValueOf(syscall.TCGETX),
+ "TCIFLUSH": ValueOf(syscall.TCIFLUSH),
+ "TCIOFF": ValueOf(syscall.TCIOFF),
+ "TCIOFLUSH": ValueOf(syscall.TCIOFLUSH),
+ "TCION": ValueOf(syscall.TCION),
+ "TCOFLUSH": ValueOf(syscall.TCOFLUSH),
+ "TCOOFF": ValueOf(syscall.TCOOFF),
+ "TCOON": ValueOf(syscall.TCOON),
+ "TCP_CA_CWR": ValueOf(syscall.TCP_CA_CWR),
+ "TCP_CA_Disorder": ValueOf(syscall.TCP_CA_Disorder),
+ "TCP_CA_Loss": ValueOf(syscall.TCP_CA_Loss),
+ "TCP_CA_Open": ValueOf(syscall.TCP_CA_Open),
+ "TCP_CA_Recovery": ValueOf(syscall.TCP_CA_Recovery),
+ "TCP_CC_INFO": ValueOf(syscall.TCP_CC_INFO),
+ "TCP_CLOSE": ValueOf(syscall.TCP_CLOSE),
+ "TCP_CLOSE_WAIT": ValueOf(syscall.TCP_CLOSE_WAIT),
+ "TCP_CLOSING": ValueOf(syscall.TCP_CLOSING),
+ "TCP_CONGESTION": ValueOf(syscall.TCP_CONGESTION),
+ "TCP_COOKIE_IN_ALWAYS": ValueOf(syscall.TCP_COOKIE_IN_ALWAYS),
+ "TCP_COOKIE_MAX": ValueOf(syscall.TCP_COOKIE_MAX),
+ "TCP_COOKIE_MIN": ValueOf(syscall.TCP_COOKIE_MIN),
+ "TCP_COOKIE_OUT_NEVER": ValueOf(syscall.TCP_COOKIE_OUT_NEVER),
+ "TCP_COOKIE_PAIR_SIZE": ValueOf(syscall.TCP_COOKIE_PAIR_SIZE),
+ "TCP_COOKIE_TRANSACTIONS": ValueOf(syscall.TCP_COOKIE_TRANSACTIONS),
+ "TCP_CORK": ValueOf(syscall.TCP_CORK),
+ "TCP_DEFER_ACCEPT": ValueOf(syscall.TCP_DEFER_ACCEPT),
+ "TCP_ESTABLISHED": ValueOf(syscall.TCP_ESTABLISHED),
+ "TCP_FASTOPEN": ValueOf(syscall.TCP_FASTOPEN),
+ "TCP_FASTOPEN_CONNECT": ValueOf(syscall.TCP_FASTOPEN_CONNECT),
+ "TCP_FIN_WAIT1": ValueOf(syscall.TCP_FIN_WAIT1),
+ "TCP_FIN_WAIT2": ValueOf(syscall.TCP_FIN_WAIT2),
+ "TCP_INFO": ValueOf(syscall.TCP_INFO),
+ "TCP_KEEPCNT": ValueOf(syscall.TCP_KEEPCNT),
+ "TCP_KEEPIDLE": ValueOf(syscall.TCP_KEEPIDLE),
+ "TCP_KEEPINTVL": ValueOf(syscall.TCP_KEEPINTVL),
+ "TCP_LAST_ACK": ValueOf(syscall.TCP_LAST_ACK),
+ "TCP_LINGER2": ValueOf(syscall.TCP_LINGER2),
+ "TCP_LISTEN": ValueOf(syscall.TCP_LISTEN),
+ "TCP_MAXSEG": ValueOf(syscall.TCP_MAXSEG),
+ "TCP_MAXWIN": ValueOf(syscall.TCP_MAXWIN),
+ "TCP_MAX_WINSHIFT": ValueOf(syscall.TCP_MAX_WINSHIFT),
+ "TCP_MD5SIG": ValueOf(syscall.TCP_MD5SIG),
+ "TCP_MD5SIG_EXT": ValueOf(syscall.TCP_MD5SIG_EXT),
+ "TCP_MD5SIG_FLAG_PREFIX": ValueOf(syscall.TCP_MD5SIG_FLAG_PREFIX),
+ "TCP_MD5SIG_MAXKEYLEN": ValueOf(syscall.TCP_MD5SIG_MAXKEYLEN),
+ "TCP_MSS": ValueOf(syscall.TCP_MSS),
+ "TCP_MSS_DEFAULT": ValueOf(syscall.TCP_MSS_DEFAULT),
+ "TCP_MSS_DESIRED": ValueOf(syscall.TCP_MSS_DESIRED),
+ "TCP_NODELAY": ValueOf(syscall.TCP_NODELAY),
+ "TCP_NOTSENT_LOWAT": ValueOf(syscall.TCP_NOTSENT_LOWAT),
+ "TCP_NO_QUEUE": ValueOf(syscall.TCP_NO_QUEUE),
+ "TCP_QUEUES_NR": ValueOf(syscall.TCP_QUEUES_NR),
+ "TCP_QUEUE_SEQ": ValueOf(syscall.TCP_QUEUE_SEQ),
+ "TCP_QUICKACK": ValueOf(syscall.TCP_QUICKACK),
+ "TCP_RECV_QUEUE": ValueOf(syscall.TCP_RECV_QUEUE),
+ "TCP_REPAIR": ValueOf(syscall.TCP_REPAIR),
+ "TCP_REPAIR_OPTIONS": ValueOf(syscall.TCP_REPAIR_OPTIONS),
+ "TCP_REPAIR_QUEUE": ValueOf(syscall.TCP_REPAIR_QUEUE),
+ "TCP_REPAIR_WINDOW": ValueOf(syscall.TCP_REPAIR_WINDOW),
+ "TCP_SAVED_SYN": ValueOf(syscall.TCP_SAVED_SYN),
+ "TCP_SAVE_SYN": ValueOf(syscall.TCP_SAVE_SYN),
+ "TCP_SEND_QUEUE": ValueOf(syscall.TCP_SEND_QUEUE),
+ "TCP_SYNCNT": ValueOf(syscall.TCP_SYNCNT),
+ "TCP_SYN_RECV": ValueOf(syscall.TCP_SYN_RECV),
+ "TCP_SYN_SENT": ValueOf(syscall.TCP_SYN_SENT),
+ "TCP_S_DATA_IN": ValueOf(syscall.TCP_S_DATA_IN),
+ "TCP_S_DATA_OUT": ValueOf(syscall.TCP_S_DATA_OUT),
+ "TCP_THIN_DUPACK": ValueOf(syscall.TCP_THIN_DUPACK),
+ "TCP_THIN_LINEAR_TIMEOUTS": ValueOf(syscall.TCP_THIN_LINEAR_TIMEOUTS),
+ "TCP_TIMESTAMP": ValueOf(syscall.TCP_TIMESTAMP),
+ "TCP_TIME_WAIT": ValueOf(syscall.TCP_TIME_WAIT),
+ "TCP_ULP": ValueOf(syscall.TCP_ULP),
+ "TCP_USER_TIMEOUT": ValueOf(syscall.TCP_USER_TIMEOUT),
+ "TCP_WINDOW_CLAMP": ValueOf(syscall.TCP_WINDOW_CLAMP),
+ "TCSADRAIN": ValueOf(syscall.TCSADRAIN),
+ "TCSAFLUSH": ValueOf(syscall.TCSAFLUSH),
+ "TCSANOW": ValueOf(syscall.TCSANOW),
+ "TCSETA": ValueOf(syscall.TCSETA),
+ "TCSETAF": ValueOf(syscall.TCSETAF),
+ "TCSETAW": ValueOf(syscall.TCSETAW),
+ "TCSETS": ValueOf(syscall.TCSETS),
+ "TCSETSF": ValueOf(syscall.TCSETSF),
+ "TCSETSW": ValueOf(syscall.TCSETSW),
+ "TCSETX": ValueOf(syscall.TCSETX),
+ "TCSETXF": ValueOf(syscall.TCSETXF),
+ "TCSETXW": ValueOf(syscall.TCSETXW),
+ "TIOCCBRK": ValueOf(syscall.TIOCCBRK),
+ "TIOCCONS": ValueOf(syscall.TIOCCONS),
+ "TIOCEXCL": ValueOf(syscall.TIOCEXCL),
+ "TIOCGDEV": ValueOf(uint32(syscall.TIOCGDEV)),
+ "TIOCGETD": ValueOf(syscall.TIOCGETD),
+ "TIOCGICOUNT": ValueOf(syscall.TIOCGICOUNT),
+ "TIOCGLCKTRMIOS": ValueOf(syscall.TIOCGLCKTRMIOS),
+ "TIOCGPGRP": ValueOf(syscall.TIOCGPGRP),
+ "TIOCGPTN": ValueOf(uint32(syscall.TIOCGPTN)),
+ "TIOCGRS485": ValueOf(syscall.TIOCGRS485),
+ "TIOCGSERIAL": ValueOf(syscall.TIOCGSERIAL),
+ "TIOCGSID": ValueOf(syscall.TIOCGSID),
+ "TIOCGSOFTCAR": ValueOf(syscall.TIOCGSOFTCAR),
+ "TIOCGWINSZ": ValueOf(syscall.TIOCGWINSZ),
+ "TIOCINQ": ValueOf(syscall.TIOCINQ),
+ "TIOCLINUX": ValueOf(syscall.TIOCLINUX),
+ "TIOCMBIC": ValueOf(syscall.TIOCMBIC),
+ "TIOCMBIS": ValueOf(syscall.TIOCMBIS),
+ "TIOCMGET": ValueOf(syscall.TIOCMGET),
+ "TIOCMIWAIT": ValueOf(syscall.TIOCMIWAIT),
+ "TIOCMSET": ValueOf(syscall.TIOCMSET),
+ "TIOCM_CAR": ValueOf(syscall.TIOCM_CAR),
+ "TIOCM_CD": ValueOf(syscall.TIOCM_CD),
+ "TIOCM_CTS": ValueOf(syscall.TIOCM_CTS),
+ "TIOCM_DSR": ValueOf(syscall.TIOCM_DSR),
+ "TIOCM_DTR": ValueOf(syscall.TIOCM_DTR),
+ "TIOCM_LE": ValueOf(syscall.TIOCM_LE),
+ "TIOCM_RI": ValueOf(syscall.TIOCM_RI),
+ "TIOCM_RNG": ValueOf(syscall.TIOCM_RNG),
+ "TIOCM_RTS": ValueOf(syscall.TIOCM_RTS),
+ "TIOCM_SR": ValueOf(syscall.TIOCM_SR),
+ "TIOCM_ST": ValueOf(syscall.TIOCM_ST),
+ "TIOCNOTTY": ValueOf(syscall.TIOCNOTTY),
+ "TIOCNXCL": ValueOf(syscall.TIOCNXCL),
+ "TIOCOUTQ": ValueOf(syscall.TIOCOUTQ),
+ "TIOCPKT": ValueOf(syscall.TIOCPKT),
+ "TIOCPKT_DATA": ValueOf(syscall.TIOCPKT_DATA),
+ "TIOCPKT_DOSTOP": ValueOf(syscall.TIOCPKT_DOSTOP),
+ "TIOCPKT_FLUSHREAD": ValueOf(syscall.TIOCPKT_FLUSHREAD),
+ "TIOCPKT_FLUSHWRITE": ValueOf(syscall.TIOCPKT_FLUSHWRITE),
+ "TIOCPKT_IOCTL": ValueOf(syscall.TIOCPKT_IOCTL),
+ "TIOCPKT_NOSTOP": ValueOf(syscall.TIOCPKT_NOSTOP),
+ "TIOCPKT_START": ValueOf(syscall.TIOCPKT_START),
+ "TIOCPKT_STOP": ValueOf(syscall.TIOCPKT_STOP),
+ "TIOCSBRK": ValueOf(syscall.TIOCSBRK),
+ "TIOCSCTTY": ValueOf(syscall.TIOCSCTTY),
+ "TIOCSERCONFIG": ValueOf(syscall.TIOCSERCONFIG),
+ "TIOCSERGETLSR": ValueOf(syscall.TIOCSERGETLSR),
+ "TIOCSERGETMULTI": ValueOf(syscall.TIOCSERGETMULTI),
+ "TIOCSERGSTRUCT": ValueOf(syscall.TIOCSERGSTRUCT),
+ "TIOCSERGWILD": ValueOf(syscall.TIOCSERGWILD),
+ "TIOCSERSETMULTI": ValueOf(syscall.TIOCSERSETMULTI),
+ "TIOCSERSWILD": ValueOf(syscall.TIOCSERSWILD),
+ "TIOCSER_TEMT": ValueOf(syscall.TIOCSER_TEMT),
+ "TIOCSETD": ValueOf(syscall.TIOCSETD),
+ "TIOCSIG": ValueOf(syscall.TIOCSIG),
+ "TIOCSLCKTRMIOS": ValueOf(syscall.TIOCSLCKTRMIOS),
+ "TIOCSPGRP": ValueOf(syscall.TIOCSPGRP),
+ "TIOCSPTLCK": ValueOf(syscall.TIOCSPTLCK),
+ "TIOCSRS485": ValueOf(syscall.TIOCSRS485),
+ "TIOCSSERIAL": ValueOf(syscall.TIOCSSERIAL),
+ "TIOCSSOFTCAR": ValueOf(syscall.TIOCSSOFTCAR),
+ "TIOCSTI": ValueOf(syscall.TIOCSTI),
+ "TIOCSWINSZ": ValueOf(syscall.TIOCSWINSZ),
+ "TIOCVHANGUP": ValueOf(syscall.TIOCVHANGUP),
+ "TOSTOP": ValueOf(syscall.TOSTOP),
+ "TUNATTACHFILTER": ValueOf(syscall.TUNATTACHFILTER),
+ "TUNDETACHFILTER": ValueOf(syscall.TUNDETACHFILTER),
+ "TUNGETFEATURES": ValueOf(uint32(syscall.TUNGETFEATURES)),
+ "TUNGETFILTER": ValueOf(uint32(syscall.TUNGETFILTER)),
+ "TUNGETIFF": ValueOf(uint32(syscall.TUNGETIFF)),
+ "TUNGETSNDBUF": ValueOf(uint32(syscall.TUNGETSNDBUF)),
+ "TUNGETVNETHDRSZ": ValueOf(uint32(syscall.TUNGETVNETHDRSZ)),
+ "TUNSETDEBUG": ValueOf(syscall.TUNSETDEBUG),
+ "TUNSETGROUP": ValueOf(syscall.TUNSETGROUP),
+ "TUNSETIFF": ValueOf(syscall.TUNSETIFF),
+ "TUNSETIFINDEX": ValueOf(syscall.TUNSETIFINDEX),
+ "TUNSETLINK": ValueOf(syscall.TUNSETLINK),
+ "TUNSETNOCSUM": ValueOf(syscall.TUNSETNOCSUM),
+ "TUNSETOFFLOAD": ValueOf(syscall.TUNSETOFFLOAD),
+ "TUNSETOWNER": ValueOf(syscall.TUNSETOWNER),
+ "TUNSETPERSIST": ValueOf(syscall.TUNSETPERSIST),
+ "TUNSETQUEUE": ValueOf(syscall.TUNSETQUEUE),
+ "TUNSETSNDBUF": ValueOf(syscall.TUNSETSNDBUF),
+ "TUNSETTXFILTER": ValueOf(syscall.TUNSETTXFILTER),
+ "TUNSETVNETHDRSZ": ValueOf(syscall.TUNSETVNETHDRSZ),
+ "Tcgetattr": ValueOf(syscall.Tcgetattr),
+ "Tcsetattr": ValueOf(syscall.Tcsetattr),
+ "Tee": ValueOf(syscall.Tee),
+ "Tgkill": ValueOf(syscall.Tgkill),
+ "Time": ValueOf(syscall.Time),
+ "Times": ValueOf(syscall.Times),
+ "TimespecToNsec": ValueOf(syscall.TimespecToNsec),
+ "TimevalToNsec": ValueOf(syscall.TimevalToNsec),
+ "Truncate": ValueOf(syscall.Truncate),
+ "Umask": ValueOf(syscall.Umask),
+ "Uname": ValueOf(syscall.Uname),
+ "UnixCredentials": ValueOf(syscall.UnixCredentials),
+ "UnixRights": ValueOf(syscall.UnixRights),
+ "Unlink": ValueOf(syscall.Unlink),
+ "Unlinkat": ValueOf(syscall.Unlinkat),
+ "Unmount": ValueOf(syscall.Unmount),
+ "Unsetenv": ValueOf(syscall.Unsetenv),
+ "Unshare": ValueOf(syscall.Unshare),
+ "Utime": ValueOf(syscall.Utime),
+ "Utimes": ValueOf(syscall.Utimes),
+ "UtimesNano": ValueOf(syscall.UtimesNano),
+ "VDISCARD": ValueOf(syscall.VDISCARD),
+ "VEOF": ValueOf(syscall.VEOF),
+ "VEOL": ValueOf(syscall.VEOL),
+ "VEOL2": ValueOf(syscall.VEOL2),
+ "VERASE": ValueOf(syscall.VERASE),
+ "VINTR": ValueOf(syscall.VINTR),
+ "VKILL": ValueOf(syscall.VKILL),
+ "VLNEXT": ValueOf(syscall.VLNEXT),
+ "VMIN": ValueOf(syscall.VMIN),
+ "VQUIT": ValueOf(syscall.VQUIT),
+ "VREPRINT": ValueOf(syscall.VREPRINT),
+ "VSTART": ValueOf(syscall.VSTART),
+ "VSTOP": ValueOf(syscall.VSTOP),
+ "VSUSP": ValueOf(syscall.VSUSP),
+ "VTDLY": ValueOf(syscall.VTDLY),
+ "VTIME": ValueOf(syscall.VTIME),
+ "VWERASE": ValueOf(syscall.VWERASE),
+ "WAIT_ANY": ValueOf(syscall.WAIT_ANY),
+ "WAIT_MYPGRP": ValueOf(syscall.WAIT_MYPGRP),
+ "WALL": ValueOf(syscall.WALL),
+ "WCHAR_MAX": ValueOf(uint32(syscall.WCHAR_MAX)),
+ "WCHAR_MIN": ValueOf(syscall.WCHAR_MIN),
+ "WCHAR_WIDTH": ValueOf(syscall.WCHAR_WIDTH),
+ "WCONTINUED": ValueOf(syscall.WCONTINUED),
+ "WCOREFLAG": ValueOf(syscall.WCOREFLAG),
+ "WEXITED": ValueOf(syscall.WEXITED),
+ "WINT_MAX": ValueOf(uint32(syscall.WINT_MAX)),
+ "WINT_MIN": ValueOf(syscall.WINT_MIN),
+ "WINT_WIDTH": ValueOf(syscall.WINT_WIDTH),
+ "WNOHANG": ValueOf(syscall.WNOHANG),
+ "WNOWAIT": ValueOf(syscall.WNOWAIT),
+ "WORD_BIT": ValueOf(syscall.WORD_BIT),
+ "WSTOPPED": ValueOf(syscall.WSTOPPED),
+ "WUNTRACED": ValueOf(syscall.WUNTRACED),
+ "W_OK": ValueOf(syscall.W_OK),
+ "Wait4": ValueOf(syscall.Wait4),
+ "Write": ValueOf(syscall.Write),
+ "XCASE": ValueOf(syscall.XCASE),
+ }, Types: map[string]Type{
+ "Addrinfo": TypeOf((*syscall.Addrinfo)(nil)).Elem(),
+ "Cmsghdr": TypeOf((*syscall.Cmsghdr)(nil)).Elem(),
+ "Cmsghdr_len_t": TypeOf((*syscall.Cmsghdr_len_t)(nil)).Elem(),
+ "Conn": TypeOf((*syscall.Conn)(nil)).Elem(),
+ "Credential": TypeOf((*syscall.Credential)(nil)).Elem(),
+ "DIR": TypeOf((*syscall.DIR)(nil)).Elem(),
+ "Dirent": TypeOf((*syscall.Dirent)(nil)).Elem(),
+ "EpollEvent": TypeOf((*syscall.EpollEvent)(nil)).Elem(),
+ "Errno": TypeOf((*syscall.Errno)(nil)).Elem(),
+ "FdSet": TypeOf((*syscall.FdSet)(nil)).Elem(),
+ "Flock_t": TypeOf((*syscall.Flock_t)(nil)).Elem(),
+ "Gid_t": TypeOf((*syscall.Gid_t)(nil)).Elem(),
+ "Group": TypeOf((*syscall.Group)(nil)).Elem(),
+ "ICMPv6Filter": TypeOf((*syscall.ICMPv6Filter)(nil)).Elem(),
+ "IPMreq": TypeOf((*syscall.IPMreq)(nil)).Elem(),
+ "IPMreqn": TypeOf((*syscall.IPMreqn)(nil)).Elem(),
+ "IPv6MTUInfo": TypeOf((*syscall.IPv6MTUInfo)(nil)).Elem(),
+ "IPv6Mreq": TypeOf((*syscall.IPv6Mreq)(nil)).Elem(),
+ "IfAddrmsg": TypeOf((*syscall.IfAddrmsg)(nil)).Elem(),
+ "IfInfomsg": TypeOf((*syscall.IfInfomsg)(nil)).Elem(),
+ "Inet4Pktinfo": TypeOf((*syscall.Inet4Pktinfo)(nil)).Elem(),
+ "Inet6Pktinfo": TypeOf((*syscall.Inet6Pktinfo)(nil)).Elem(),
+ "InotifyEvent": TypeOf((*syscall.InotifyEvent)(nil)).Elem(),
+ "Iovec": TypeOf((*syscall.Iovec)(nil)).Elem(),
+ "Iovec_len_t": TypeOf((*syscall.Iovec_len_t)(nil)).Elem(),
+ "Linger": TypeOf((*syscall.Linger)(nil)).Elem(),
+ "Mode_t": TypeOf((*syscall.Mode_t)(nil)).Elem(),
+ "Msghdr": TypeOf((*syscall.Msghdr)(nil)).Elem(),
+ "Msghdr_controllen_t": TypeOf((*syscall.Msghdr_controllen_t)(nil)).Elem(),
+ "NetlinkMessage": TypeOf((*syscall.NetlinkMessage)(nil)).Elem(),
+ "NetlinkRouteAttr": TypeOf((*syscall.NetlinkRouteAttr)(nil)).Elem(),
+ "NetlinkRouteRequest": TypeOf((*syscall.NetlinkRouteRequest)(nil)).Elem(),
+ "NlAttr": TypeOf((*syscall.NlAttr)(nil)).Elem(),
+ "NlMsgerr": TypeOf((*syscall.NlMsgerr)(nil)).Elem(),
+ "NlMsghdr": TypeOf((*syscall.NlMsghdr)(nil)).Elem(),
+ "Offset_t": TypeOf((*syscall.Offset_t)(nil)).Elem(),
+ "Passwd": TypeOf((*syscall.Passwd)(nil)).Elem(),
+ "Pid_t": TypeOf((*syscall.Pid_t)(nil)).Elem(),
+ "ProcAttr": TypeOf((*syscall.ProcAttr)(nil)).Elem(),
+ "PtraceRegs": TypeOf((*syscall.PtraceRegs)(nil)).Elem(),
+ "RawConn": TypeOf((*syscall.RawConn)(nil)).Elem(),
+ "RawSockaddr": TypeOf((*syscall.RawSockaddr)(nil)).Elem(),
+ "RawSockaddrAny": TypeOf((*syscall.RawSockaddrAny)(nil)).Elem(),
+ "RawSockaddrInet4": TypeOf((*syscall.RawSockaddrInet4)(nil)).Elem(),
+ "RawSockaddrInet6": TypeOf((*syscall.RawSockaddrInet6)(nil)).Elem(),
+ "RawSockaddrLinklayer": TypeOf((*syscall.RawSockaddrLinklayer)(nil)).Elem(),
+ "RawSockaddrNetlink": TypeOf((*syscall.RawSockaddrNetlink)(nil)).Elem(),
+ "RawSockaddrUnix": TypeOf((*syscall.RawSockaddrUnix)(nil)).Elem(),
+ "Rlimit": TypeOf((*syscall.Rlimit)(nil)).Elem(),
+ "RtAttr": TypeOf((*syscall.RtAttr)(nil)).Elem(),
+ "RtGenmsg": TypeOf((*syscall.RtGenmsg)(nil)).Elem(),
+ "RtMsg": TypeOf((*syscall.RtMsg)(nil)).Elem(),
+ "RtNexthop": TypeOf((*syscall.RtNexthop)(nil)).Elem(),
+ "Rusage": TypeOf((*syscall.Rusage)(nil)).Elem(),
+ "Signal": TypeOf((*syscall.Signal)(nil)).Elem(),
+ "Size_t": TypeOf((*syscall.Size_t)(nil)).Elem(),
+ "SockFilter": TypeOf((*syscall.SockFilter)(nil)).Elem(),
+ "SockFprog": TypeOf((*syscall.SockFprog)(nil)).Elem(),
+ "Sockaddr": TypeOf((*syscall.Sockaddr)(nil)).Elem(),
+ "SockaddrInet4": TypeOf((*syscall.SockaddrInet4)(nil)).Elem(),
+ "SockaddrInet6": TypeOf((*syscall.SockaddrInet6)(nil)).Elem(),
+ "SockaddrLinklayer": TypeOf((*syscall.SockaddrLinklayer)(nil)).Elem(),
+ "SockaddrNetlink": TypeOf((*syscall.SockaddrNetlink)(nil)).Elem(),
+ "SockaddrUnix": TypeOf((*syscall.SockaddrUnix)(nil)).Elem(),
+ "SocketControlMessage": TypeOf((*syscall.SocketControlMessage)(nil)).Elem(),
+ "Socklen_t": TypeOf((*syscall.Socklen_t)(nil)).Elem(),
+ "Ssize_t": TypeOf((*syscall.Ssize_t)(nil)).Elem(),
+ "Stat_t": TypeOf((*syscall.Stat_t)(nil)).Elem(),
+ "Statfs_t": TypeOf((*syscall.Statfs_t)(nil)).Elem(),
+ "SysProcAttr": TypeOf((*syscall.SysProcAttr)(nil)).Elem(),
+ "SysProcIDMap": TypeOf((*syscall.SysProcIDMap)(nil)).Elem(),
+ "Sysinfo_t": TypeOf((*syscall.Sysinfo_t)(nil)).Elem(),
+ "Termios": TypeOf((*syscall.Termios)(nil)).Elem(),
+ "Time_t": TypeOf((*syscall.Time_t)(nil)).Elem(),
+ "Timespec": TypeOf((*syscall.Timespec)(nil)).Elem(),
+ "Timespec_nsec_t": TypeOf((*syscall.Timespec_nsec_t)(nil)).Elem(),
+ "Timespec_sec_t": TypeOf((*syscall.Timespec_sec_t)(nil)).Elem(),
+ "Timeval": TypeOf((*syscall.Timeval)(nil)).Elem(),
+ "Timeval_sec_t": TypeOf((*syscall.Timeval_sec_t)(nil)).Elem(),
+ "Timeval_usec_t": TypeOf((*syscall.Timeval_usec_t)(nil)).Elem(),
+ "Timex": TypeOf((*syscall.Timex)(nil)).Elem(),
+ "Tms": TypeOf((*syscall.Tms)(nil)).Elem(),
+ "Ucred": TypeOf((*syscall.Ucred)(nil)).Elem(),
+ "Uid_t": TypeOf((*syscall.Uid_t)(nil)).Elem(),
+ "Ustat_t": TypeOf((*syscall.Ustat_t)(nil)).Elem(),
+ "Utimbuf": TypeOf((*syscall.Utimbuf)(nil)).Elem(),
+ "Utsname": TypeOf((*syscall.Utsname)(nil)).Elem(),
+ "WaitStatus": TypeOf((*syscall.WaitStatus)(nil)).Elem(),
+ }, Proxies: map[string]Type{
+ "Conn": TypeOf((*P_syscall_Conn)(nil)).Elem(),
+ "RawConn": TypeOf((*P_syscall_RawConn)(nil)).Elem(),
+ }, Untypeds: map[string]string{
+ "AF_ALG": "int:38",
+ "AF_APPLETALK": "int:5",
+ "AF_ASH": "int:18",
+ "AF_ATMPVC": "int:8",
+ "AF_ATMSVC": "int:20",
+ "AF_AX25": "int:3",
+ "AF_BLUETOOTH": "int:31",
+ "AF_BRIDGE": "int:7",
+ "AF_CAIF": "int:37",
+ "AF_CAN": "int:29",
+ "AF_DECnet": "int:12",
+ "AF_ECONET": "int:19",
+ "AF_FILE": "int:1",
+ "AF_IB": "int:27",
+ "AF_IEEE802154": "int:36",
+ "AF_INET": "int:2",
+ "AF_INET6": "int:10",
+ "AF_IPX": "int:4",
+ "AF_IRDA": "int:23",
+ "AF_ISDN": "int:34",
+ "AF_IUCV": "int:32",
+ "AF_KCM": "int:41",
+ "AF_KEY": "int:15",
+ "AF_LLC": "int:26",
+ "AF_LOCAL": "int:1",
+ "AF_MAX": "int:44",
+ "AF_MPLS": "int:28",
+ "AF_NETBEUI": "int:13",
+ "AF_NETLINK": "int:16",
+ "AF_NETROM": "int:6",
+ "AF_NFC": "int:39",
+ "AF_PACKET": "int:17",
+ "AF_PHONET": "int:35",
+ "AF_PPPOX": "int:24",
+ "AF_QIPCRTR": "int:42",
+ "AF_RDS": "int:21",
+ "AF_ROSE": "int:11",
+ "AF_ROUTE": "int:16",
+ "AF_RXRPC": "int:33",
+ "AF_SECURITY": "int:14",
+ "AF_SMC": "int:43",
+ "AF_SNA": "int:22",
+ "AF_TIPC": "int:30",
+ "AF_UNIX": "int:1",
+ "AF_UNSPEC": "int:0",
+ "AF_VSOCK": "int:40",
+ "AF_WANPIPE": "int:25",
+ "AF_X25": "int:9",
+ "AI_ADDRCONFIG": "int:32",
+ "AI_ALL": "int:16",
+ "AI_CANONIDN": "int:128",
+ "AI_CANONNAME": "int:2",
+ "AI_IDN": "int:64",
+ "AI_IDN_ALLOW_UNASSIGNED": "int:256",
+ "AI_IDN_USE_STD3_ASCII_RULES": "int:512",
+ "AI_NUMERICHOST": "int:4",
+ "AI_NUMERICSERV": "int:1024",
+ "AI_PASSIVE": "int:1",
+ "AI_V4MAPPED": "int:8",
+ "ARCH": "string:arm64",
+ "ARPHRD_ADAPT": "int:264",
+ "ARPHRD_APPLETLK": "int:8",
+ "ARPHRD_ARCNET": "int:7",
+ "ARPHRD_ASH": "int:781",
+ "ARPHRD_ATM": "int:19",
+ "ARPHRD_AX25": "int:3",
+ "ARPHRD_BIF": "int:775",
+ "ARPHRD_CHAOS": "int:5",
+ "ARPHRD_CISCO": "int:513",
+ "ARPHRD_CSLIP": "int:257",
+ "ARPHRD_CSLIP6": "int:259",
+ "ARPHRD_DDCMP": "int:517",
+ "ARPHRD_DLCI": "int:15",
+ "ARPHRD_ECONET": "int:782",
+ "ARPHRD_EETHER": "int:2",
+ "ARPHRD_ETHER": "int:1",
+ "ARPHRD_EUI64": "int:27",
+ "ARPHRD_FCAL": "int:785",
+ "ARPHRD_FCFABRIC": "int:787",
+ "ARPHRD_FCPL": "int:786",
+ "ARPHRD_FCPP": "int:784",
+ "ARPHRD_FDDI": "int:774",
+ "ARPHRD_FRAD": "int:770",
+ "ARPHRD_HDLC": "int:513",
+ "ARPHRD_HIPPI": "int:780",
+ "ARPHRD_HWX25": "int:272",
+ "ARPHRD_IEEE1394": "int:24",
+ "ARPHRD_IEEE802": "int:6",
+ "ARPHRD_IEEE80211": "int:801",
+ "ARPHRD_IEEE80211_PRISM": "int:802",
+ "ARPHRD_IEEE80211_RADIOTAP": "int:803",
+ "ARPHRD_IEEE802154": "int:804",
+ "ARPHRD_IEEE802154_PHY": "int:805",
+ "ARPHRD_IEEE802_TR": "int:800",
+ "ARPHRD_INFINIBAND": "int:32",
+ "ARPHRD_IPDDP": "int:777",
+ "ARPHRD_IPGRE": "int:778",
+ "ARPHRD_IRDA": "int:783",
+ "ARPHRD_LAPB": "int:516",
+ "ARPHRD_LOCALTLK": "int:773",
+ "ARPHRD_LOOPBACK": "int:772",
+ "ARPHRD_METRICOM": "int:23",
+ "ARPHRD_NETROM": "int:0",
+ "ARPHRD_NONE": "int:65534",
+ "ARPHRD_PIMREG": "int:779",
+ "ARPHRD_PPP": "int:512",
+ "ARPHRD_PRONET": "int:4",
+ "ARPHRD_RAWHDLC": "int:518",
+ "ARPHRD_RAWIP": "int:519",
+ "ARPHRD_ROSE": "int:270",
+ "ARPHRD_RSRVD": "int:260",
+ "ARPHRD_SIT": "int:776",
+ "ARPHRD_SKIP": "int:771",
+ "ARPHRD_SLIP": "int:256",
+ "ARPHRD_SLIP6": "int:258",
+ "ARPHRD_TUNNEL": "int:768",
+ "ARPHRD_TUNNEL6": "int:769",
+ "ARPHRD_VOID": "int:65535",
+ "ARPHRD_X25": "int:271",
+ "B0": "int:0",
+ "B1000000": "int:4104",
+ "B110": "int:3",
+ "B115200": "int:4098",
+ "B1152000": "int:4105",
+ "B1200": "int:9",
+ "B134": "int:4",
+ "B150": "int:5",
+ "B1500000": "int:4106",
+ "B1800": "int:10",
+ "B19200": "int:14",
+ "B200": "int:6",
+ "B2000000": "int:4107",
+ "B230400": "int:4099",
+ "B2400": "int:11",
+ "B2500000": "int:4108",
+ "B300": "int:7",
+ "B3000000": "int:4109",
+ "B3500000": "int:4110",
+ "B38400": "int:15",
+ "B4000000": "int:4111",
+ "B460800": "int:4100",
+ "B4800": "int:12",
+ "B50": "int:1",
+ "B500000": "int:4101",
+ "B57600": "int:4097",
+ "B576000": "int:4102",
+ "B600": "int:8",
+ "B75": "int:2",
+ "B921600": "int:4103",
+ "B9600": "int:13",
+ "BPF_A": "int:16",
+ "BPF_ABS": "int:32",
+ "BPF_ADD": "int:0",
+ "BPF_ALU": "int:4",
+ "BPF_AND": "int:80",
+ "BPF_B": "int:16",
+ "BPF_DIV": "int:48",
+ "BPF_H": "int:8",
+ "BPF_IMM": "int:0",
+ "BPF_IND": "int:64",
+ "BPF_JA": "int:0",
+ "BPF_JEQ": "int:16",
+ "BPF_JGE": "int:48",
+ "BPF_JGT": "int:32",
+ "BPF_JMP": "int:5",
+ "BPF_JSET": "int:64",
+ "BPF_K": "int:0",
+ "BPF_LD": "int:0",
+ "BPF_LDX": "int:1",
+ "BPF_LEN": "int:128",
+ "BPF_LL_OFF": "int:-2097152",
+ "BPF_LSH": "int:96",
+ "BPF_MAJOR_VERSION": "int:1",
+ "BPF_MAXINSNS": "int:4096",
+ "BPF_MEM": "int:96",
+ "BPF_MEMWORDS": "int:16",
+ "BPF_MINOR_VERSION": "int:1",
+ "BPF_MISC": "int:7",
+ "BPF_MOD": "int:144",
+ "BPF_MSH": "int:160",
+ "BPF_MUL": "int:32",
+ "BPF_NEG": "int:128",
+ "BPF_NET_OFF": "int:-1048576",
+ "BPF_OR": "int:64",
+ "BPF_RET": "int:6",
+ "BPF_RSH": "int:112",
+ "BPF_ST": "int:2",
+ "BPF_STX": "int:3",
+ "BPF_SUB": "int:16",
+ "BPF_TAX": "int:0",
+ "BPF_TXA": "int:128",
+ "BPF_W": "int:0",
+ "BPF_X": "int:8",
+ "BPF_XOR": "int:160",
+ "BRKINT": "int:2",
+ "BSDLY": "int:8192",
+ "CBAUD": "int:4111",
+ "CBAUDEX": "int:4096",
+ "CIBAUD": "int:269418496",
+ "CLOCAL": "int:2048",
+ "CLONE_CHILD_CLEARTID": "int:2097152",
+ "CLONE_CHILD_SETTID": "int:16777216",
+ "CLONE_DETACHED": "int:4194304",
+ "CLONE_FILES": "int:1024",
+ "CLONE_FS": "int:512",
+ "CLONE_IO": "int:2147483648",
+ "CLONE_NEWCGROUP": "int:33554432",
+ "CLONE_NEWIPC": "int:134217728",
+ "CLONE_NEWNET": "int:1073741824",
+ "CLONE_NEWNS": "int:131072",
+ "CLONE_NEWPID": "int:536870912",
+ "CLONE_NEWUSER": "int:268435456",
+ "CLONE_NEWUTS": "int:67108864",
+ "CLONE_PARENT": "int:32768",
+ "CLONE_PARENT_SETTID": "int:1048576",
+ "CLONE_PTRACE": "int:8192",
+ "CLONE_SETTLS": "int:524288",
+ "CLONE_SIGHAND": "int:2048",
+ "CLONE_SYSVSEM": "int:262144",
+ "CLONE_THREAD": "int:65536",
+ "CLONE_UNTRACED": "int:8388608",
+ "CLONE_VFORK": "int:16384",
+ "CLONE_VM": "int:256",
+ "CMSPAR": "int:1073741824",
+ "CR0": "int:0",
+ "CR1": "int:512",
+ "CR2": "int:1024",
+ "CR3": "int:1536",
+ "CRDLY": "int:1536",
+ "CREAD": "int:128",
+ "CRTSCTS": "int:2147483648",
+ "CS5": "int:0",
+ "CS6": "int:16",
+ "CS7": "int:32",
+ "CS8": "int:48",
+ "CSIZE": "int:48",
+ "CSTOPB": "int:64",
+ "DT_BLK": "int:6",
+ "DT_CHR": "int:2",
+ "DT_DIR": "int:4",
+ "DT_FIFO": "int:1",
+ "DT_LNK": "int:10",
+ "DT_REG": "int:8",
+ "DT_SOCK": "int:12",
+ "DT_UNKNOWN": "int:0",
+ "DT_WHT": "int:14",
+ "EAI_ADDRFAMILY": "int:-9",
+ "EAI_AGAIN": "int:-3",
+ "EAI_ALLDONE": "int:-103",
+ "EAI_BADFLAGS": "int:-1",
+ "EAI_CANCELED": "int:-101",
+ "EAI_FAIL": "int:-4",
+ "EAI_FAMILY": "int:-6",
+ "EAI_IDN_ENCODE": "int:-105",
+ "EAI_INPROGRESS": "int:-100",
+ "EAI_INTR": "int:-104",
+ "EAI_MEMORY": "int:-10",
+ "EAI_NODATA": "int:-5",
+ "EAI_NONAME": "int:-2",
+ "EAI_NOTCANCELED": "int:-102",
+ "EAI_OVERFLOW": "int:-12",
+ "EAI_SERVICE": "int:-8",
+ "EAI_SOCKTYPE": "int:-7",
+ "EAI_SYSTEM": "int:-11",
+ "ECHO": "int:8",
+ "ECHOCTL": "int:512",
+ "ECHOE": "int:16",
+ "ECHOK": "int:32",
+ "ECHOKE": "int:2048",
+ "ECHONL": "int:64",
+ "ECHOPRT": "int:1024",
+ "EPOLLERR": "int:8",
+ "EPOLLET": "int:2147483648",
+ "EPOLLEXCLUSIVE": "int:268435456",
+ "EPOLLHUP": "int:16",
+ "EPOLLIN": "int:1",
+ "EPOLLMSG": "int:1024",
+ "EPOLLONESHOT": "int:1073741824",
+ "EPOLLOUT": "int:4",
+ "EPOLLPRI": "int:2",
+ "EPOLLRDBAND": "int:128",
+ "EPOLLRDHUP": "int:8192",
+ "EPOLLRDNORM": "int:64",
+ "EPOLLWAKEUP": "int:536870912",
+ "EPOLLWRBAND": "int:512",
+ "EPOLLWRNORM": "int:256",
+ "EPOLL_CLOEXEC": "int:524288",
+ "EPOLL_CTL_ADD": "int:1",
+ "EPOLL_CTL_DEL": "int:2",
+ "EPOLL_CTL_MOD": "int:3",
+ "ETH_ALEN": "int:6",
+ "ETH_DATA_LEN": "int:1500",
+ "ETH_FCS_LEN": "int:4",
+ "ETH_FRAME_LEN": "int:1514",
+ "ETH_HLEN": "int:14",
+ "ETH_MAX_MTU": "int:65535",
+ "ETH_MIN_MTU": "int:68",
+ "ETH_P_1588": "int:35063",
+ "ETH_P_8021AD": "int:34984",
+ "ETH_P_8021AH": "int:35047",
+ "ETH_P_8021Q": "int:33024",
+ "ETH_P_80221": "int:35095",
+ "ETH_P_802_2": "int:4",
+ "ETH_P_802_3": "int:1",
+ "ETH_P_802_3_MIN": "int:1536",
+ "ETH_P_802_EX1": "int:34997",
+ "ETH_P_AARP": "int:33011",
+ "ETH_P_AF_IUCV": "int:64507",
+ "ETH_P_ALL": "int:3",
+ "ETH_P_AOE": "int:34978",
+ "ETH_P_ARCNET": "int:26",
+ "ETH_P_ARP": "int:2054",
+ "ETH_P_ATALK": "int:32923",
+ "ETH_P_ATMFATE": "int:34948",
+ "ETH_P_ATMMPOA": "int:34892",
+ "ETH_P_AX25": "int:2",
+ "ETH_P_BATMAN": "int:17157",
+ "ETH_P_BPQ": "int:2303",
+ "ETH_P_CAIF": "int:247",
+ "ETH_P_CAN": "int:12",
+ "ETH_P_CANFD": "int:13",
+ "ETH_P_CONTROL": "int:22",
+ "ETH_P_CUST": "int:24582",
+ "ETH_P_DDCMP": "int:6",
+ "ETH_P_DEC": "int:24576",
+ "ETH_P_DIAG": "int:24581",
+ "ETH_P_DNA_DL": "int:24577",
+ "ETH_P_DNA_RC": "int:24578",
+ "ETH_P_DNA_RT": "int:24579",
+ "ETH_P_DSA": "int:27",
+ "ETH_P_ECONET": "int:24",
+ "ETH_P_EDSA": "int:56026",
+ "ETH_P_ERSPAN": "int:35006",
+ "ETH_P_FCOE": "int:35078",
+ "ETH_P_FIP": "int:35092",
+ "ETH_P_HDLC": "int:25",
+ "ETH_P_HSR": "int:35119",
+ "ETH_P_IBOE": "int:35093",
+ "ETH_P_IEEE802154": "int:246",
+ "ETH_P_IEEEPUP": "int:2560",
+ "ETH_P_IEEEPUPAT": "int:2561",
+ "ETH_P_IFE": "int:60734",
+ "ETH_P_IP": "int:2048",
+ "ETH_P_IPV6": "int:34525",
+ "ETH_P_IPX": "int:33079",
+ "ETH_P_IRDA": "int:23",
+ "ETH_P_LAT": "int:24580",
+ "ETH_P_LINK_CTL": "int:34924",
+ "ETH_P_LOCALTALK": "int:9",
+ "ETH_P_LOOP": "int:96",
+ "ETH_P_LOOPBACK": "int:36864",
+ "ETH_P_MACSEC": "int:35045",
+ "ETH_P_MAP": "int:249",
+ "ETH_P_MOBITEX": "int:21",
+ "ETH_P_MPLS_MC": "int:34888",
+ "ETH_P_MPLS_UC": "int:34887",
+ "ETH_P_MVRP": "int:35061",
+ "ETH_P_NCSI": "int:35064",
+ "ETH_P_NSH": "int:35151",
+ "ETH_P_PAE": "int:34958",
+ "ETH_P_PAUSE": "int:34824",
+ "ETH_P_PHONET": "int:245",
+ "ETH_P_PPPTALK": "int:16",
+ "ETH_P_PPP_DISC": "int:34915",
+ "ETH_P_PPP_MP": "int:8",
+ "ETH_P_PPP_SES": "int:34916",
+ "ETH_P_PRP": "int:35067",
+ "ETH_P_PUP": "int:512",
+ "ETH_P_PUPAT": "int:513",
+ "ETH_P_QINQ1": "int:37120",
+ "ETH_P_QINQ2": "int:37376",
+ "ETH_P_QINQ3": "int:37632",
+ "ETH_P_RARP": "int:32821",
+ "ETH_P_SCA": "int:24583",
+ "ETH_P_SLOW": "int:34825",
+ "ETH_P_SNAP": "int:5",
+ "ETH_P_TDLS": "int:35085",
+ "ETH_P_TEB": "int:25944",
+ "ETH_P_TIPC": "int:35018",
+ "ETH_P_TRAILER": "int:28",
+ "ETH_P_TR_802_2": "int:17",
+ "ETH_P_TSN": "int:8944",
+ "ETH_P_WAN_PPP": "int:7",
+ "ETH_P_WCCP": "int:34878",
+ "ETH_P_X25": "int:2053",
+ "ETH_P_XDSA": "int:248",
+ "ETH_ZLEN": "int:60",
+ "FALLOC_FL_COLLAPSE_RANGE": "int:8",
+ "FALLOC_FL_INSERT_RANGE": "int:32",
+ "FALLOC_FL_KEEP_SIZE": "int:1",
+ "FALLOC_FL_NO_HIDE_STALE": "int:4",
+ "FALLOC_FL_PUNCH_HOLE": "int:2",
+ "FALLOC_FL_UNSHARE_RANGE": "int:64",
+ "FALLOC_FL_ZERO_RANGE": "int:16",
+ "FD_CLOEXEC": "int:1",
+ "FD_SETSIZE": "int:1024",
+ "FFDLY": "int:32768",
+ "FLUSHO": "int:4096",
+ "F_ADD_SEALS": "int:1033",
+ "F_DUPFD": "int:0",
+ "F_DUPFD_CLOEXEC": "int:1030",
+ "F_EXLCK": "int:4",
+ "F_GETFD": "int:1",
+ "F_GETFL": "int:3",
+ "F_GETLEASE": "int:1025",
+ "F_GETLK": "int:5",
+ "F_GETLK64": "int:5",
+ "F_GETOWN": "int:9",
+ "F_GETOWN_EX": "int:16",
+ "F_GETPIPE_SZ": "int:1032",
+ "F_GETSIG": "int:11",
+ "F_GET_FILE_RW_HINT": "int:1037",
+ "F_GET_RW_HINT": "int:1035",
+ "F_GET_SEALS": "int:1034",
+ "F_LOCK": "int:1",
+ "F_NOTIFY": "int:1026",
+ "F_OFD_GETLK": "int:36",
+ "F_OFD_SETLK": "int:37",
+ "F_OFD_SETLKW": "int:38",
+ "F_OK": "int:0",
+ "F_OWNER_GID": "int:2",
+ "F_OWNER_PGRP": "int:2",
+ "F_OWNER_PID": "int:1",
+ "F_OWNER_TID": "int:0",
+ "F_RDLCK": "int:0",
+ "F_SEAL_GROW": "int:4",
+ "F_SEAL_SEAL": "int:1",
+ "F_SEAL_SHRINK": "int:2",
+ "F_SEAL_WRITE": "int:8",
+ "F_SETFD": "int:2",
+ "F_SETFL": "int:4",
+ "F_SETLEASE": "int:1024",
+ "F_SETLK": "int:6",
+ "F_SETLK64": "int:6",
+ "F_SETLKW": "int:7",
+ "F_SETLKW64": "int:7",
+ "F_SETOWN": "int:8",
+ "F_SETOWN_EX": "int:15",
+ "F_SETPIPE_SZ": "int:1031",
+ "F_SETSIG": "int:10",
+ "F_SET_FILE_RW_HINT": "int:1038",
+ "F_SET_RW_HINT": "int:1036",
+ "F_SHLCK": "int:8",
+ "F_TEST": "int:3",
+ "F_TLOCK": "int:2",
+ "F_ULOCK": "int:0",
+ "F_UNLCK": "int:2",
+ "F_WRLCK": "int:1",
+ "HUPCL": "int:1024",
+ "ICANON": "int:2",
+ "ICRNL": "int:256",
+ "IEXTEN": "int:32768",
+ "IFA_ADDRESS": "int:1",
+ "IFA_ANYCAST": "int:5",
+ "IFA_BROADCAST": "int:4",
+ "IFA_CACHEINFO": "int:6",
+ "IFA_FLAGS": "int:8",
+ "IFA_F_DADFAILED": "int:8",
+ "IFA_F_DEPRECATED": "int:32",
+ "IFA_F_HOMEADDRESS": "int:16",
+ "IFA_F_MANAGETEMPADDR": "int:256",
+ "IFA_F_MCAUTOJOIN": "int:1024",
+ "IFA_F_NODAD": "int:2",
+ "IFA_F_NOPREFIXROUTE": "int:512",
+ "IFA_F_OPTIMISTIC": "int:4",
+ "IFA_F_PERMANENT": "int:128",
+ "IFA_F_SECONDARY": "int:1",
+ "IFA_F_STABLE_PRIVACY": "int:2048",
+ "IFA_F_TEMPORARY": "int:1",
+ "IFA_F_TENTATIVE": "int:64",
+ "IFA_LABEL": "int:3",
+ "IFA_LOCAL": "int:2",
+ "IFA_MULTICAST": "int:7",
+ "IFA_UNSPEC": "int:0",
+ "IFF_ALLMULTI": "int:512",
+ "IFF_ATTACH_QUEUE": "int:512",
+ "IFF_AUTOMEDIA": "int:16384",
+ "IFF_BROADCAST": "int:2",
+ "IFF_DEBUG": "int:4",
+ "IFF_DETACH_QUEUE": "int:1024",
+ "IFF_DYNAMIC": "int:32768",
+ "IFF_LOOPBACK": "int:8",
+ "IFF_MASTER": "int:1024",
+ "IFF_MULTICAST": "int:4096",
+ "IFF_MULTI_QUEUE": "int:256",
+ "IFF_NAPI": "int:16",
+ "IFF_NAPI_FRAGS": "int:32",
+ "IFF_NOARP": "int:128",
+ "IFF_NOFILTER": "int:4096",
+ "IFF_NOTRAILERS": "int:32",
+ "IFF_NO_PI": "int:4096",
+ "IFF_ONE_QUEUE": "int:8192",
+ "IFF_PERSIST": "int:2048",
+ "IFF_POINTOPOINT": "int:16",
+ "IFF_PORTSEL": "int:8192",
+ "IFF_PROMISC": "int:256",
+ "IFF_RUNNING": "int:64",
+ "IFF_SLAVE": "int:2048",
+ "IFF_TAP": "int:2",
+ "IFF_TUN": "int:1",
+ "IFF_TUN_EXCL": "int:32768",
+ "IFF_UP": "int:1",
+ "IFF_VNET_HDR": "int:16384",
+ "IFLA_ADDRESS": "int:1",
+ "IFLA_AF_SPEC": "int:26",
+ "IFLA_BOND_ACTIVE_SLAVE": "int:2",
+ "IFLA_BOND_AD_ACTOR_SYSTEM": "int:26",
+ "IFLA_BOND_AD_ACTOR_SYS_PRIO": "int:24",
+ "IFLA_BOND_AD_INFO": "int:23",
+ "IFLA_BOND_AD_INFO_ACTOR_KEY": "int:3",
+ "IFLA_BOND_AD_INFO_AGGREGATOR": "int:1",
+ "IFLA_BOND_AD_INFO_NUM_PORTS": "int:2",
+ "IFLA_BOND_AD_INFO_PARTNER_KEY": "int:4",
+ "IFLA_BOND_AD_INFO_PARTNER_MAC": "int:5",
+ "IFLA_BOND_AD_INFO_UNSPEC": "int:0",
+ "IFLA_BOND_AD_LACP_RATE": "int:21",
+ "IFLA_BOND_AD_SELECT": "int:22",
+ "IFLA_BOND_AD_USER_PORT_KEY": "int:25",
+ "IFLA_BOND_ALL_SLAVES_ACTIVE": "int:17",
+ "IFLA_BOND_ARP_ALL_TARGETS": "int:10",
+ "IFLA_BOND_ARP_INTERVAL": "int:7",
+ "IFLA_BOND_ARP_IP_TARGET": "int:8",
+ "IFLA_BOND_ARP_VALIDATE": "int:9",
+ "IFLA_BOND_DOWNDELAY": "int:5",
+ "IFLA_BOND_FAIL_OVER_MAC": "int:13",
+ "IFLA_BOND_LP_INTERVAL": "int:19",
+ "IFLA_BOND_MIIMON": "int:3",
+ "IFLA_BOND_MIN_LINKS": "int:18",
+ "IFLA_BOND_MODE": "int:1",
+ "IFLA_BOND_NUM_PEER_NOTIF": "int:16",
+ "IFLA_BOND_PACKETS_PER_SLAVE": "int:20",
+ "IFLA_BOND_PRIMARY": "int:11",
+ "IFLA_BOND_PRIMARY_RESELECT": "int:12",
+ "IFLA_BOND_RESEND_IGMP": "int:15",
+ "IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE": "int:7",
+ "IFLA_BOND_SLAVE_AD_AGGREGATOR_ID": "int:6",
+ "IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE": "int:8",
+ "IFLA_BOND_SLAVE_LINK_FAILURE_COUNT": "int:3",
+ "IFLA_BOND_SLAVE_MII_STATUS": "int:2",
+ "IFLA_BOND_SLAVE_PERM_HWADDR": "int:4",
+ "IFLA_BOND_SLAVE_QUEUE_ID": "int:5",
+ "IFLA_BOND_SLAVE_STATE": "int:1",
+ "IFLA_BOND_SLAVE_UNSPEC": "int:0",
+ "IFLA_BOND_TLB_DYNAMIC_LB": "int:27",
+ "IFLA_BOND_UNSPEC": "int:0",
+ "IFLA_BOND_UPDELAY": "int:4",
+ "IFLA_BOND_USE_CARRIER": "int:6",
+ "IFLA_BOND_XMIT_HASH_POLICY": "int:14",
+ "IFLA_BROADCAST": "int:2",
+ "IFLA_BRPORT_BCAST_FLOOD": "int:30",
+ "IFLA_BRPORT_BRIDGE_ID": "int:14",
+ "IFLA_BRPORT_CONFIG_PENDING": "int:20",
+ "IFLA_BRPORT_COST": "int:3",
+ "IFLA_BRPORT_DESIGNATED_COST": "int:16",
+ "IFLA_BRPORT_DESIGNATED_PORT": "int:15",
+ "IFLA_BRPORT_FAST_LEAVE": "int:7",
+ "IFLA_BRPORT_FLUSH": "int:24",
+ "IFLA_BRPORT_FORWARD_DELAY_TIMER": "int:22",
+ "IFLA_BRPORT_GROUP_FWD_MASK": "int:31",
+ "IFLA_BRPORT_GUARD": "int:5",
+ "IFLA_BRPORT_HOLD_TIMER": "int:23",
+ "IFLA_BRPORT_ID": "int:17",
+ "IFLA_BRPORT_LEARNING": "int:8",
+ "IFLA_BRPORT_LEARNING_SYNC": "int:11",
+ "IFLA_BRPORT_MCAST_FLOOD": "int:27",
+ "IFLA_BRPORT_MCAST_TO_UCAST": "int:28",
+ "IFLA_BRPORT_MESSAGE_AGE_TIMER": "int:21",
+ "IFLA_BRPORT_MODE": "int:4",
+ "IFLA_BRPORT_MULTICAST_ROUTER": "int:25",
+ "IFLA_BRPORT_NEIGH_SUPPRESS": "int:32",
+ "IFLA_BRPORT_NO": "int:18",
+ "IFLA_BRPORT_PAD": "int:26",
+ "IFLA_BRPORT_PRIORITY": "int:2",
+ "IFLA_BRPORT_PROTECT": "int:6",
+ "IFLA_BRPORT_PROXYARP": "int:10",
+ "IFLA_BRPORT_PROXYARP_WIFI": "int:12",
+ "IFLA_BRPORT_ROOT_ID": "int:13",
+ "IFLA_BRPORT_STATE": "int:1",
+ "IFLA_BRPORT_TOPOLOGY_CHANGE_ACK": "int:19",
+ "IFLA_BRPORT_UNICAST_FLOOD": "int:9",
+ "IFLA_BRPORT_UNSPEC": "int:0",
+ "IFLA_BRPORT_VLAN_TUNNEL": "int:29",
+ "IFLA_BR_AGEING_TIME": "int:4",
+ "IFLA_BR_BRIDGE_ID": "int:11",
+ "IFLA_BR_FDB_FLUSH": "int:21",
+ "IFLA_BR_FORWARD_DELAY": "int:1",
+ "IFLA_BR_GC_TIMER": "int:19",
+ "IFLA_BR_GROUP_ADDR": "int:20",
+ "IFLA_BR_GROUP_FWD_MASK": "int:9",
+ "IFLA_BR_HELLO_TIME": "int:2",
+ "IFLA_BR_HELLO_TIMER": "int:16",
+ "IFLA_BR_MAX_AGE": "int:3",
+ "IFLA_BR_MCAST_HASH_ELASTICITY": "int:26",
+ "IFLA_BR_MCAST_HASH_MAX": "int:27",
+ "IFLA_BR_MCAST_IGMP_VERSION": "int:43",
+ "IFLA_BR_MCAST_LAST_MEMBER_CNT": "int:28",
+ "IFLA_BR_MCAST_LAST_MEMBER_INTVL": "int:30",
+ "IFLA_BR_MCAST_MEMBERSHIP_INTVL": "int:31",
+ "IFLA_BR_MCAST_MLD_VERSION": "int:44",
+ "IFLA_BR_MCAST_QUERIER": "int:25",
+ "IFLA_BR_MCAST_QUERIER_INTVL": "int:32",
+ "IFLA_BR_MCAST_QUERY_INTVL": "int:33",
+ "IFLA_BR_MCAST_QUERY_RESPONSE_INTVL": "int:34",
+ "IFLA_BR_MCAST_QUERY_USE_IFADDR": "int:24",
+ "IFLA_BR_MCAST_ROUTER": "int:22",
+ "IFLA_BR_MCAST_SNOOPING": "int:23",
+ "IFLA_BR_MCAST_STARTUP_QUERY_CNT": "int:29",
+ "IFLA_BR_MCAST_STARTUP_QUERY_INTVL": "int:35",
+ "IFLA_BR_MCAST_STATS_ENABLED": "int:42",
+ "IFLA_BR_NF_CALL_ARPTABLES": "int:38",
+ "IFLA_BR_NF_CALL_IP6TABLES": "int:37",
+ "IFLA_BR_NF_CALL_IPTABLES": "int:36",
+ "IFLA_BR_PAD": "int:40",
+ "IFLA_BR_PRIORITY": "int:6",
+ "IFLA_BR_ROOT_ID": "int:10",
+ "IFLA_BR_ROOT_PATH_COST": "int:13",
+ "IFLA_BR_ROOT_PORT": "int:12",
+ "IFLA_BR_STP_STATE": "int:5",
+ "IFLA_BR_TCN_TIMER": "int:17",
+ "IFLA_BR_TOPOLOGY_CHANGE": "int:14",
+ "IFLA_BR_TOPOLOGY_CHANGE_DETECTED": "int:15",
+ "IFLA_BR_TOPOLOGY_CHANGE_TIMER": "int:18",
+ "IFLA_BR_UNSPEC": "int:0",
+ "IFLA_BR_VLAN_DEFAULT_PVID": "int:39",
+ "IFLA_BR_VLAN_FILTERING": "int:7",
+ "IFLA_BR_VLAN_PROTOCOL": "int:8",
+ "IFLA_BR_VLAN_STATS_ENABLED": "int:41",
+ "IFLA_CARRIER": "int:33",
+ "IFLA_CARRIER_CHANGES": "int:35",
+ "IFLA_COST": "int:8",
+ "IFLA_EVENT": "int:44",
+ "IFLA_EVENT_BONDING_FAILOVER": "int:3",
+ "IFLA_EVENT_BONDING_OPTIONS": "int:6",
+ "IFLA_EVENT_FEATURES": "int:2",
+ "IFLA_EVENT_IGMP_RESEND": "int:5",
+ "IFLA_EVENT_NONE": "int:0",
+ "IFLA_EVENT_NOTIFY_PEERS": "int:4",
+ "IFLA_EVENT_REBOOT": "int:1",
+ "IFLA_EXT_MASK": "int:29",
+ "IFLA_GENEVE_COLLECT_METADATA": "int:6",
+ "IFLA_GENEVE_ID": "int:1",
+ "IFLA_GENEVE_LABEL": "int:11",
+ "IFLA_GENEVE_PORT": "int:5",
+ "IFLA_GENEVE_REMOTE": "int:2",
+ "IFLA_GENEVE_REMOTE6": "int:7",
+ "IFLA_GENEVE_TOS": "int:4",
+ "IFLA_GENEVE_TTL": "int:3",
+ "IFLA_GENEVE_UDP_CSUM": "int:8",
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_RX": "int:10",
+ "IFLA_GENEVE_UDP_ZERO_CSUM6_TX": "int:9",
+ "IFLA_GENEVE_UNSPEC": "int:0",
+ "IFLA_GROUP": "int:27",
+ "IFLA_GSO_MAX_SEGS": "int:40",
+ "IFLA_GSO_MAX_SIZE": "int:41",
+ "IFLA_GTP_FD0": "int:1",
+ "IFLA_GTP_FD1": "int:2",
+ "IFLA_GTP_PDP_HASHSIZE": "int:3",
+ "IFLA_GTP_ROLE": "int:4",
+ "IFLA_GTP_UNSPEC": "int:0",
+ "IFLA_HSR_MULTICAST_SPEC": "int:3",
+ "IFLA_HSR_SEQ_NR": "int:5",
+ "IFLA_HSR_SLAVE1": "int:1",
+ "IFLA_HSR_SLAVE2": "int:2",
+ "IFLA_HSR_SUPERVISION_ADDR": "int:4",
+ "IFLA_HSR_UNSPEC": "int:0",
+ "IFLA_HSR_VERSION": "int:6",
+ "IFLA_IFALIAS": "int:20",
+ "IFLA_IFNAME": "int:3",
+ "IFLA_IF_NETNSID": "int:46",
+ "IFLA_INET6_ADDR_GEN_MODE": "int:8",
+ "IFLA_INET6_CACHEINFO": "int:5",
+ "IFLA_INET6_CONF": "int:2",
+ "IFLA_INET6_FLAGS": "int:1",
+ "IFLA_INET6_ICMP6STATS": "int:6",
+ "IFLA_INET6_MCAST": "int:4",
+ "IFLA_INET6_STATS": "int:3",
+ "IFLA_INET6_TOKEN": "int:7",
+ "IFLA_INET6_UNSPEC": "int:0",
+ "IFLA_INET_CONF": "int:1",
+ "IFLA_INET_UNSPEC": "int:0",
+ "IFLA_INFO_DATA": "int:2",
+ "IFLA_INFO_KIND": "int:1",
+ "IFLA_INFO_SLAVE_DATA": "int:5",
+ "IFLA_INFO_SLAVE_KIND": "int:4",
+ "IFLA_INFO_UNSPEC": "int:0",
+ "IFLA_INFO_XSTATS": "int:3",
+ "IFLA_IPOIB_MODE": "int:2",
+ "IFLA_IPOIB_PKEY": "int:1",
+ "IFLA_IPOIB_UMCAST": "int:3",
+ "IFLA_IPOIB_UNSPEC": "int:0",
+ "IFLA_IPVLAN_FLAGS": "int:2",
+ "IFLA_IPVLAN_MODE": "int:1",
+ "IFLA_IPVLAN_UNSPEC": "int:0",
+ "IFLA_LINK": "int:5",
+ "IFLA_LINKINFO": "int:18",
+ "IFLA_LINKMODE": "int:17",
+ "IFLA_LINK_NETNSID": "int:37",
+ "IFLA_MACSEC_CIPHER_SUITE": "int:4",
+ "IFLA_MACSEC_ENCODING_SA": "int:6",
+ "IFLA_MACSEC_ENCRYPT": "int:7",
+ "IFLA_MACSEC_ES": "int:10",
+ "IFLA_MACSEC_ICV_LEN": "int:3",
+ "IFLA_MACSEC_INC_SCI": "int:9",
+ "IFLA_MACSEC_PAD": "int:14",
+ "IFLA_MACSEC_PORT": "int:2",
+ "IFLA_MACSEC_PROTECT": "int:8",
+ "IFLA_MACSEC_REPLAY_PROTECT": "int:12",
+ "IFLA_MACSEC_SCB": "int:11",
+ "IFLA_MACSEC_SCI": "int:1",
+ "IFLA_MACSEC_UNSPEC": "int:0",
+ "IFLA_MACSEC_VALIDATION": "int:13",
+ "IFLA_MACSEC_WINDOW": "int:5",
+ "IFLA_MACVLAN_FLAGS": "int:2",
+ "IFLA_MACVLAN_MACADDR": "int:4",
+ "IFLA_MACVLAN_MACADDR_COUNT": "int:6",
+ "IFLA_MACVLAN_MACADDR_DATA": "int:5",
+ "IFLA_MACVLAN_MACADDR_MODE": "int:3",
+ "IFLA_MACVLAN_MODE": "int:1",
+ "IFLA_MACVLAN_UNSPEC": "int:0",
+ "IFLA_MAP": "int:14",
+ "IFLA_MASTER": "int:10",
+ "IFLA_MTU": "int:4",
+ "IFLA_NET_NS_FD": "int:28",
+ "IFLA_NET_NS_PID": "int:19",
+ "IFLA_NEW_NETNSID": "int:45",
+ "IFLA_NUM_RX_QUEUES": "int:32",
+ "IFLA_NUM_TX_QUEUES": "int:31",
+ "IFLA_NUM_VF": "int:21",
+ "IFLA_OFFLOAD_XSTATS_CPU_HIT": "int:1",
+ "IFLA_OFFLOAD_XSTATS_UNSPEC": "int:0",
+ "IFLA_OPERSTATE": "int:16",
+ "IFLA_PAD": "int:42",
+ "IFLA_PHYS_PORT_ID": "int:34",
+ "IFLA_PHYS_PORT_NAME": "int:38",
+ "IFLA_PHYS_SWITCH_ID": "int:36",
+ "IFLA_PORT_HOST_UUID": "int:5",
+ "IFLA_PORT_INSTANCE_UUID": "int:4",
+ "IFLA_PORT_PROFILE": "int:2",
+ "IFLA_PORT_REQUEST": "int:6",
+ "IFLA_PORT_RESPONSE": "int:7",
+ "IFLA_PORT_SELF": "int:25",
+ "IFLA_PORT_UNSPEC": "int:0",
+ "IFLA_PORT_VF": "int:1",
+ "IFLA_PORT_VSI_TYPE": "int:3",
+ "IFLA_PPP_DEV_FD": "int:1",
+ "IFLA_PPP_UNSPEC": "int:0",
+ "IFLA_PRIORITY": "int:9",
+ "IFLA_PROMISCUITY": "int:30",
+ "IFLA_PROTINFO": "int:12",
+ "IFLA_PROTO_DOWN": "int:39",
+ "IFLA_QDISC": "int:6",
+ "IFLA_STATS": "int:7",
+ "IFLA_STATS64": "int:23",
+ "IFLA_STATS_AF_SPEC": "int:5",
+ "IFLA_STATS_LINK_64": "int:1",
+ "IFLA_STATS_LINK_OFFLOAD_XSTATS": "int:4",
+ "IFLA_STATS_LINK_XSTATS": "int:2",
+ "IFLA_STATS_LINK_XSTATS_SLAVE": "int:3",
+ "IFLA_STATS_UNSPEC": "int:0",
+ "IFLA_TXQLEN": "int:13",
+ "IFLA_UNSPEC": "int:0",
+ "IFLA_VFINFO_LIST": "int:22",
+ "IFLA_VF_IB_NODE_GUID": "int:10",
+ "IFLA_VF_IB_PORT_GUID": "int:11",
+ "IFLA_VF_INFO": "int:1",
+ "IFLA_VF_INFO_UNSPEC": "int:0",
+ "IFLA_VF_LINK_STATE": "int:5",
+ "IFLA_VF_LINK_STATE_AUTO": "int:0",
+ "IFLA_VF_LINK_STATE_DISABLE": "int:2",
+ "IFLA_VF_LINK_STATE_ENABLE": "int:1",
+ "IFLA_VF_MAC": "int:1",
+ "IFLA_VF_PORT": "int:1",
+ "IFLA_VF_PORTS": "int:24",
+ "IFLA_VF_PORT_UNSPEC": "int:0",
+ "IFLA_VF_RATE": "int:6",
+ "IFLA_VF_RSS_QUERY_EN": "int:7",
+ "IFLA_VF_SPOOFCHK": "int:4",
+ "IFLA_VF_STATS": "int:8",
+ "IFLA_VF_STATS_BROADCAST": "int:4",
+ "IFLA_VF_STATS_MULTICAST": "int:5",
+ "IFLA_VF_STATS_PAD": "int:6",
+ "IFLA_VF_STATS_RX_BYTES": "int:2",
+ "IFLA_VF_STATS_RX_PACKETS": "int:0",
+ "IFLA_VF_STATS_TX_BYTES": "int:3",
+ "IFLA_VF_STATS_TX_PACKETS": "int:1",
+ "IFLA_VF_TRUST": "int:9",
+ "IFLA_VF_TX_RATE": "int:3",
+ "IFLA_VF_UNSPEC": "int:0",
+ "IFLA_VF_VLAN": "int:2",
+ "IFLA_VF_VLAN_INFO": "int:1",
+ "IFLA_VF_VLAN_INFO_UNSPEC": "int:0",
+ "IFLA_VF_VLAN_LIST": "int:12",
+ "IFLA_VLAN_EGRESS_QOS": "int:3",
+ "IFLA_VLAN_FLAGS": "int:2",
+ "IFLA_VLAN_ID": "int:1",
+ "IFLA_VLAN_INGRESS_QOS": "int:4",
+ "IFLA_VLAN_PROTOCOL": "int:5",
+ "IFLA_VLAN_QOS_MAPPING": "int:1",
+ "IFLA_VLAN_QOS_UNSPEC": "int:0",
+ "IFLA_VLAN_UNSPEC": "int:0",
+ "IFLA_VRF_PORT_TABLE": "int:1",
+ "IFLA_VRF_PORT_UNSPEC": "int:0",
+ "IFLA_VRF_TABLE": "int:1",
+ "IFLA_VRF_UNSPEC": "int:0",
+ "IFLA_VXLAN_AGEING": "int:8",
+ "IFLA_VXLAN_COLLECT_METADATA": "int:25",
+ "IFLA_VXLAN_GBP": "int:23",
+ "IFLA_VXLAN_GPE": "int:27",
+ "IFLA_VXLAN_GROUP": "int:2",
+ "IFLA_VXLAN_GROUP6": "int:16",
+ "IFLA_VXLAN_ID": "int:1",
+ "IFLA_VXLAN_L2MISS": "int:13",
+ "IFLA_VXLAN_L3MISS": "int:14",
+ "IFLA_VXLAN_LABEL": "int:26",
+ "IFLA_VXLAN_LEARNING": "int:7",
+ "IFLA_VXLAN_LIMIT": "int:9",
+ "IFLA_VXLAN_LINK": "int:3",
+ "IFLA_VXLAN_LOCAL": "int:4",
+ "IFLA_VXLAN_LOCAL6": "int:17",
+ "IFLA_VXLAN_PORT": "int:15",
+ "IFLA_VXLAN_PORT_RANGE": "int:10",
+ "IFLA_VXLAN_PROXY": "int:11",
+ "IFLA_VXLAN_REMCSUM_NOPARTIAL": "int:24",
+ "IFLA_VXLAN_REMCSUM_RX": "int:22",
+ "IFLA_VXLAN_REMCSUM_TX": "int:21",
+ "IFLA_VXLAN_RSC": "int:12",
+ "IFLA_VXLAN_TOS": "int:6",
+ "IFLA_VXLAN_TTL": "int:5",
+ "IFLA_VXLAN_UDP_CSUM": "int:18",
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_RX": "int:20",
+ "IFLA_VXLAN_UDP_ZERO_CSUM6_TX": "int:19",
+ "IFLA_VXLAN_UNSPEC": "int:0",
+ "IFLA_WEIGHT": "int:15",
+ "IFLA_WIRELESS": "int:11",
+ "IFLA_XDP": "int:43",
+ "IFLA_XDP_ATTACHED": "int:2",
+ "IFLA_XDP_FD": "int:1",
+ "IFLA_XDP_FLAGS": "int:3",
+ "IFLA_XDP_PROG_ID": "int:4",
+ "IFLA_XDP_UNSPEC": "int:0",
+ "IFNAMSIZ": "int:16",
+ "IGNBRK": "int:1",
+ "IGNCR": "int:128",
+ "IGNPAR": "int:4",
+ "IMAXBEL": "int:8192",
+ "INLCR": "int:64",
+ "INPCK": "int:16",
+ "IN_ACCESS": "int:1",
+ "IN_ALL_EVENTS": "int:4095",
+ "IN_ATTRIB": "int:4",
+ "IN_CLASSA_HOST": "int:16777215",
+ "IN_CLASSA_MAX": "int:128",
+ "IN_CLASSA_NET": "int:4278190080",
+ "IN_CLASSA_NSHIFT": "int:24",
+ "IN_CLASSB_HOST": "int:65535",
+ "IN_CLASSB_MAX": "int:65536",
+ "IN_CLASSB_NET": "int:4294901760",
+ "IN_CLASSB_NSHIFT": "int:16",
+ "IN_CLASSC_HOST": "int:255",
+ "IN_CLASSC_NET": "int:4294967040",
+ "IN_CLASSC_NSHIFT": "int:8",
+ "IN_CLOEXEC": "int:524288",
+ "IN_CLOSE": "int:24",
+ "IN_CLOSE_NOWRITE": "int:16",
+ "IN_CLOSE_WRITE": "int:8",
+ "IN_CREATE": "int:256",
+ "IN_DELETE": "int:512",
+ "IN_DELETE_SELF": "int:1024",
+ "IN_DONT_FOLLOW": "int:33554432",
+ "IN_EXCL_UNLINK": "int:67108864",
+ "IN_IGNORED": "int:32768",
+ "IN_ISDIR": "int:1073741824",
+ "IN_LOOPBACKNET": "int:127",
+ "IN_MASK_ADD": "int:536870912",
+ "IN_MODIFY": "int:2",
+ "IN_MOVE": "int:192",
+ "IN_MOVED_FROM": "int:64",
+ "IN_MOVED_TO": "int:128",
+ "IN_MOVE_SELF": "int:2048",
+ "IN_NONBLOCK": "int:2048",
+ "IN_ONESHOT": "int:2147483648",
+ "IN_ONLYDIR": "int:16777216",
+ "IN_OPEN": "int:32",
+ "IN_Q_OVERFLOW": "int:16384",
+ "IN_UNMOUNT": "int:8192",
+ "IPPROTO_AH": "int:51",
+ "IPPROTO_BEETPH": "int:94",
+ "IPPROTO_COMP": "int:108",
+ "IPPROTO_DCCP": "int:33",
+ "IPPROTO_DSTOPTS": "int:60",
+ "IPPROTO_EGP": "int:8",
+ "IPPROTO_ENCAP": "int:98",
+ "IPPROTO_ESP": "int:50",
+ "IPPROTO_FRAGMENT": "int:44",
+ "IPPROTO_GRE": "int:47",
+ "IPPROTO_HOPOPTS": "int:0",
+ "IPPROTO_ICMP": "int:1",
+ "IPPROTO_ICMPV6": "int:58",
+ "IPPROTO_IDP": "int:22",
+ "IPPROTO_IGMP": "int:2",
+ "IPPROTO_IP": "int:0",
+ "IPPROTO_IPIP": "int:4",
+ "IPPROTO_IPV6": "int:41",
+ "IPPROTO_MAX": "int:256",
+ "IPPROTO_MH": "int:135",
+ "IPPROTO_MPLS": "int:137",
+ "IPPROTO_MTP": "int:92",
+ "IPPROTO_NONE": "int:59",
+ "IPPROTO_PIM": "int:103",
+ "IPPROTO_PUP": "int:12",
+ "IPPROTO_RAW": "int:255",
+ "IPPROTO_ROUTING": "int:43",
+ "IPPROTO_RSVP": "int:46",
+ "IPPROTO_SCTP": "int:132",
+ "IPPROTO_TCP": "int:6",
+ "IPPROTO_TP": "int:29",
+ "IPPROTO_UDP": "int:17",
+ "IPPROTO_UDPLITE": "int:136",
+ "IPV6_2292DSTOPTS": "int:4",
+ "IPV6_2292HOPLIMIT": "int:8",
+ "IPV6_2292HOPOPTS": "int:3",
+ "IPV6_2292PKTINFO": "int:2",
+ "IPV6_2292PKTOPTIONS": "int:6",
+ "IPV6_2292RTHDR": "int:5",
+ "IPV6_ADDRFORM": "int:1",
+ "IPV6_ADDR_PREFERENCES": "int:72",
+ "IPV6_ADD_MEMBERSHIP": "int:20",
+ "IPV6_AUTHHDR": "int:10",
+ "IPV6_AUTOFLOWLABEL": "int:70",
+ "IPV6_CHECKSUM": "int:7",
+ "IPV6_DONTFRAG": "int:62",
+ "IPV6_DROP_MEMBERSHIP": "int:21",
+ "IPV6_DSTOPTS": "int:59",
+ "IPV6_HDRINCL": "int:36",
+ "IPV6_HOPLIMIT": "int:52",
+ "IPV6_HOPOPTS": "int:54",
+ "IPV6_IPSEC_POLICY": "int:34",
+ "IPV6_JOIN_ANYCAST": "int:27",
+ "IPV6_JOIN_GROUP": "int:20",
+ "IPV6_LEAVE_ANYCAST": "int:28",
+ "IPV6_LEAVE_GROUP": "int:21",
+ "IPV6_MINHOPCOUNT": "int:73",
+ "IPV6_MTU": "int:24",
+ "IPV6_MTU_DISCOVER": "int:23",
+ "IPV6_MULTICAST_HOPS": "int:18",
+ "IPV6_MULTICAST_IF": "int:17",
+ "IPV6_MULTICAST_LOOP": "int:19",
+ "IPV6_NEXTHOP": "int:9",
+ "IPV6_ORIGDSTADDR": "int:74",
+ "IPV6_PATHMTU": "int:61",
+ "IPV6_PKTINFO": "int:50",
+ "IPV6_PMTUDISC_DO": "int:2",
+ "IPV6_PMTUDISC_DONT": "int:0",
+ "IPV6_PMTUDISC_INTERFACE": "int:4",
+ "IPV6_PMTUDISC_OMIT": "int:5",
+ "IPV6_PMTUDISC_PROBE": "int:3",
+ "IPV6_PMTUDISC_WANT": "int:1",
+ "IPV6_RECVDSTOPTS": "int:58",
+ "IPV6_RECVERR": "int:25",
+ "IPV6_RECVFRAGSIZE": "int:77",
+ "IPV6_RECVHOPLIMIT": "int:51",
+ "IPV6_RECVHOPOPTS": "int:53",
+ "IPV6_RECVORIGDSTADDR": "int:74",
+ "IPV6_RECVPATHMTU": "int:60",
+ "IPV6_RECVPKTINFO": "int:49",
+ "IPV6_RECVRTHDR": "int:56",
+ "IPV6_RECVTCLASS": "int:66",
+ "IPV6_ROUTER_ALERT": "int:22",
+ "IPV6_RTHDR": "int:57",
+ "IPV6_RTHDRDSTOPTS": "int:55",
+ "IPV6_RTHDR_LOOSE": "int:0",
+ "IPV6_RTHDR_STRICT": "int:1",
+ "IPV6_RTHDR_TYPE_0": "int:0",
+ "IPV6_RXDSTOPTS": "int:59",
+ "IPV6_RXHOPOPTS": "int:54",
+ "IPV6_TCLASS": "int:67",
+ "IPV6_TRANSPARENT": "int:75",
+ "IPV6_UNICAST_HOPS": "int:16",
+ "IPV6_UNICAST_IF": "int:76",
+ "IPV6_V6ONLY": "int:26",
+ "IPV6_XFRM_POLICY": "int:35",
+ "IP_ADD_MEMBERSHIP": "int:35",
+ "IP_ADD_SOURCE_MEMBERSHIP": "int:39",
+ "IP_BIND_ADDRESS_NO_PORT": "int:24",
+ "IP_BLOCK_SOURCE": "int:38",
+ "IP_CHECKSUM": "int:23",
+ "IP_DEFAULT_MULTICAST_LOOP": "int:1",
+ "IP_DEFAULT_MULTICAST_TTL": "int:1",
+ "IP_DF": "int:16384",
+ "IP_DROP_MEMBERSHIP": "int:36",
+ "IP_DROP_SOURCE_MEMBERSHIP": "int:40",
+ "IP_FREEBIND": "int:15",
+ "IP_HDRINCL": "int:3",
+ "IP_IPSEC_POLICY": "int:16",
+ "IP_MAXPACKET": "int:65535",
+ "IP_MAX_MEMBERSHIPS": "int:20",
+ "IP_MF": "int:8192",
+ "IP_MINTTL": "int:21",
+ "IP_MSFILTER": "int:41",
+ "IP_MSS": "int:576",
+ "IP_MTU": "int:14",
+ "IP_MTU_DISCOVER": "int:10",
+ "IP_MULTICAST_ALL": "int:49",
+ "IP_MULTICAST_IF": "int:32",
+ "IP_MULTICAST_LOOP": "int:34",
+ "IP_MULTICAST_TTL": "int:33",
+ "IP_NODEFRAG": "int:22",
+ "IP_OFFMASK": "int:8191",
+ "IP_OPTIONS": "int:4",
+ "IP_ORIGDSTADDR": "int:20",
+ "IP_PASSSEC": "int:18",
+ "IP_PKTINFO": "int:8",
+ "IP_PKTOPTIONS": "int:9",
+ "IP_PMTUDISC": "int:10",
+ "IP_PMTUDISC_DO": "int:2",
+ "IP_PMTUDISC_DONT": "int:0",
+ "IP_PMTUDISC_INTERFACE": "int:4",
+ "IP_PMTUDISC_OMIT": "int:5",
+ "IP_PMTUDISC_PROBE": "int:3",
+ "IP_PMTUDISC_WANT": "int:1",
+ "IP_RECVERR": "int:11",
+ "IP_RECVFRAGSIZE": "int:25",
+ "IP_RECVOPTS": "int:6",
+ "IP_RECVORIGDSTADDR": "int:20",
+ "IP_RECVTOS": "int:13",
+ "IP_RECVTTL": "int:12",
+ "IP_RETOPTS": "int:7",
+ "IP_RF": "int:32768",
+ "IP_ROUTER_ALERT": "int:5",
+ "IP_TOS": "int:1",
+ "IP_TRANSPARENT": "int:19",
+ "IP_TTL": "int:2",
+ "IP_UNBLOCK_SOURCE": "int:37",
+ "IP_UNICAST_IF": "int:50",
+ "IP_XFRM_POLICY": "int:17",
+ "ISIG": "int:1",
+ "ISTRIP": "int:32",
+ "IUCLC": "int:512",
+ "IUTF8": "int:16384",
+ "IXANY": "int:2048",
+ "IXOFF": "int:4096",
+ "IXON": "int:1024",
+ "ImplementsGetwd": "bool:true",
+ "LINUX_REBOOT_CMD_CAD_OFF": "int:0",
+ "LINUX_REBOOT_CMD_CAD_ON": "int:2309737967",
+ "LINUX_REBOOT_CMD_HALT": "int:3454992675",
+ "LINUX_REBOOT_CMD_KEXEC": "int:1163412803",
+ "LINUX_REBOOT_CMD_POWER_OFF": "int:1126301404",
+ "LINUX_REBOOT_CMD_RESTART": "int:19088743",
+ "LINUX_REBOOT_CMD_RESTART2": "int:2712847316",
+ "LINUX_REBOOT_CMD_SW_SUSPEND": "int:3489725666",
+ "LINUX_REBOOT_MAGIC1": "int:4276215469",
+ "LINUX_REBOOT_MAGIC2": "int:672274793",
+ "LINUX_REBOOT_MAGIC2A": "int:85072278",
+ "LINUX_REBOOT_MAGIC2B": "int:369367448",
+ "LINUX_REBOOT_MAGIC2C": "int:537993216",
+ "LOCK_EX": "int:2",
+ "LOCK_MAND": "int:32",
+ "LOCK_NB": "int:4",
+ "LOCK_READ": "int:64",
+ "LOCK_RW": "int:192",
+ "LOCK_SH": "int:1",
+ "LOCK_UN": "int:8",
+ "LOCK_WRITE": "int:128",
+ "MADV_DODUMP": "int:17",
+ "MADV_DOFORK": "int:11",
+ "MADV_DONTDUMP": "int:16",
+ "MADV_DONTFORK": "int:10",
+ "MADV_DONTNEED": "int:4",
+ "MADV_FREE": "int:8",
+ "MADV_HUGEPAGE": "int:14",
+ "MADV_HWPOISON": "int:100",
+ "MADV_KEEPONFORK": "int:19",
+ "MADV_MERGEABLE": "int:12",
+ "MADV_NOHUGEPAGE": "int:15",
+ "MADV_NORMAL": "int:0",
+ "MADV_RANDOM": "int:1",
+ "MADV_REMOVE": "int:9",
+ "MADV_SEQUENTIAL": "int:2",
+ "MADV_UNMERGEABLE": "int:13",
+ "MADV_WILLNEED": "int:3",
+ "MADV_WIPEONFORK": "int:18",
+ "MAP_ANON": "int:32",
+ "MAP_ANONYMOUS": "int:32",
+ "MAP_DENYWRITE": "int:2048",
+ "MAP_EXECUTABLE": "int:4096",
+ "MAP_FILE": "int:0",
+ "MAP_FIXED": "int:16",
+ "MAP_GROWSDOWN": "int:256",
+ "MAP_HUGETLB": "int:262144",
+ "MAP_HUGE_MASK": "int:63",
+ "MAP_HUGE_SHIFT": "int:26",
+ "MAP_LOCKED": "int:8192",
+ "MAP_NONBLOCK": "int:65536",
+ "MAP_NORESERVE": "int:16384",
+ "MAP_POPULATE": "int:32768",
+ "MAP_PRIVATE": "int:2",
+ "MAP_SHARED": "int:1",
+ "MAP_STACK": "int:131072",
+ "MAP_TYPE": "int:15",
+ "MCL_CURRENT": "int:1",
+ "MCL_FUTURE": "int:2",
+ "MCL_ONFAULT": "int:4",
+ "MNT_DETACH": "int:2",
+ "MNT_EXPIRE": "int:4",
+ "MNT_FORCE": "int:1",
+ "MSG_BATCH": "int:262144",
+ "MSG_CMSG_CLOEXEC": "int:1073741824",
+ "MSG_CONFIRM": "int:2048",
+ "MSG_CTRUNC": "int:8",
+ "MSG_DONTROUTE": "int:4",
+ "MSG_DONTWAIT": "int:64",
+ "MSG_EOR": "int:128",
+ "MSG_ERRQUEUE": "int:8192",
+ "MSG_FASTOPEN": "int:536870912",
+ "MSG_FIN": "int:512",
+ "MSG_MORE": "int:32768",
+ "MSG_NOSIGNAL": "int:16384",
+ "MSG_OOB": "int:1",
+ "MSG_PEEK": "int:2",
+ "MSG_PROXY": "int:16",
+ "MSG_RST": "int:4096",
+ "MSG_SYN": "int:1024",
+ "MSG_TRUNC": "int:32",
+ "MSG_TRYHARD": "int:4",
+ "MSG_WAITALL": "int:256",
+ "MSG_WAITFORONE": "int:65536",
+ "MSG_ZEROCOPY": "int:67108864",
+ "MS_ACTIVE": "int:1073741824",
+ "MS_ASYNC": "int:1",
+ "MS_BIND": "int:4096",
+ "MS_BORN": "int:536870912",
+ "MS_DIRSYNC": "int:128",
+ "MS_INVALIDATE": "int:2",
+ "MS_I_VERSION": "int:8388608",
+ "MS_KERNMOUNT": "int:4194304",
+ "MS_LAZYTIME": "int:33554432",
+ "MS_MANDLOCK": "int:64",
+ "MS_MGC_MSK": "int:4294901760",
+ "MS_MGC_VAL": "int:3236757504",
+ "MS_MOVE": "int:8192",
+ "MS_NOATIME": "int:1024",
+ "MS_NODEV": "int:4",
+ "MS_NODIRATIME": "int:2048",
+ "MS_NOEXEC": "int:8",
+ "MS_NOREMOTELOCK": "int:134217728",
+ "MS_NOSEC": "int:268435456",
+ "MS_NOSUID": "int:2",
+ "MS_NOUSER": "int:-2147483648",
+ "MS_POSIXACL": "int:65536",
+ "MS_PRIVATE": "int:262144",
+ "MS_RDONLY": "int:1",
+ "MS_REC": "int:16384",
+ "MS_RELATIME": "int:2097152",
+ "MS_REMOUNT": "int:32",
+ "MS_RMT_MASK": "int:41943121",
+ "MS_SHARED": "int:1048576",
+ "MS_SILENT": "int:32768",
+ "MS_SLAVE": "int:524288",
+ "MS_STRICTATIME": "int:16777216",
+ "MS_SUBMOUNT": "int:67108864",
+ "MS_SYNC": "int:4",
+ "MS_SYNCHRONOUS": "int:16",
+ "MS_UNBINDABLE": "int:131072",
+ "MS_VERBOSE": "int:32768",
+ "NETLINK_ADD_MEMBERSHIP": "int:1",
+ "NETLINK_AUDIT": "int:9",
+ "NETLINK_BROADCAST_ERROR": "int:4",
+ "NETLINK_CAP_ACK": "int:10",
+ "NETLINK_CONNECTED": "int:1",
+ "NETLINK_CONNECTOR": "int:11",
+ "NETLINK_CRYPTO": "int:21",
+ "NETLINK_DNRTMSG": "int:14",
+ "NETLINK_DROP_MEMBERSHIP": "int:2",
+ "NETLINK_ECRYPTFS": "int:19",
+ "NETLINK_EXT_ACK": "int:11",
+ "NETLINK_FIB_LOOKUP": "int:10",
+ "NETLINK_FIREWALL": "int:3",
+ "NETLINK_GENERIC": "int:16",
+ "NETLINK_INET_DIAG": "int:4",
+ "NETLINK_IP6_FW": "int:13",
+ "NETLINK_ISCSI": "int:8",
+ "NETLINK_KOBJECT_UEVENT": "int:15",
+ "NETLINK_LISTEN_ALL_NSID": "int:8",
+ "NETLINK_LIST_MEMBERSHIPS": "int:9",
+ "NETLINK_NETFILTER": "int:12",
+ "NETLINK_NFLOG": "int:5",
+ "NETLINK_NO_ENOBUFS": "int:5",
+ "NETLINK_PKTINFO": "int:3",
+ "NETLINK_RDMA": "int:20",
+ "NETLINK_ROUTE": "int:0",
+ "NETLINK_RX_RING": "int:6",
+ "NETLINK_SCSITRANSPORT": "int:18",
+ "NETLINK_SELINUX": "int:7",
+ "NETLINK_SMC": "int:22",
+ "NETLINK_SOCK_DIAG": "int:4",
+ "NETLINK_TX_RING": "int:7",
+ "NETLINK_UNCONNECTED": "int:0",
+ "NETLINK_UNUSED": "int:1",
+ "NETLINK_USERSOCK": "int:2",
+ "NETLINK_XFRM": "int:6",
+ "NI_DGRAM": "int:16",
+ "NI_IDN": "int:32",
+ "NI_IDN_ALLOW_UNASSIGNED": "int:64",
+ "NI_IDN_USE_STD3_ASCII_RULES": "int:128",
+ "NI_MAXHOST": "int:1025",
+ "NI_MAXSERV": "int:32",
+ "NI_NAMEREQD": "int:8",
+ "NI_NOFQDN": "int:4",
+ "NI_NUMERICHOST": "int:1",
+ "NI_NUMERICSERV": "int:2",
+ "NL0": "int:0",
+ "NL1": "int:256",
+ "NLA_ALIGNTO": "int:4",
+ "NLA_F_NESTED": "int:32768",
+ "NLA_F_NET_BYTEORDER": "int:16384",
+ "NLA_HDRLEN": "int:4",
+ "NLA_TYPE_MASK": "int:-49153",
+ "NLDLY": "int:256",
+ "NLMSGERR_ATTR_COOKIE": "int:3",
+ "NLMSGERR_ATTR_MAX": "int:3",
+ "NLMSGERR_ATTR_MSG": "int:1",
+ "NLMSGERR_ATTR_OFFS": "int:2",
+ "NLMSGERR_ATTR_UNUSED": "int:0",
+ "NLMSG_ALIGNTO": "int:4",
+ "NLMSG_DONE": "int:3",
+ "NLMSG_ERROR": "int:2",
+ "NLMSG_HDRLEN": "int:16",
+ "NLMSG_MIN_TYPE": "int:16",
+ "NLMSG_NOOP": "int:1",
+ "NLMSG_OVERRUN": "int:4",
+ "NLM_F_ACK": "int:4",
+ "NLM_F_ACK_TLVS": "int:512",
+ "NLM_F_APPEND": "int:2048",
+ "NLM_F_ATOMIC": "int:1024",
+ "NLM_F_CAPPED": "int:256",
+ "NLM_F_CREATE": "int:1024",
+ "NLM_F_DUMP": "int:768",
+ "NLM_F_DUMP_FILTERED": "int:32",
+ "NLM_F_DUMP_INTR": "int:16",
+ "NLM_F_ECHO": "int:8",
+ "NLM_F_EXCL": "int:512",
+ "NLM_F_MATCH": "int:512",
+ "NLM_F_MULTI": "int:2",
+ "NLM_F_NONREC": "int:256",
+ "NLM_F_REPLACE": "int:256",
+ "NLM_F_REQUEST": "int:1",
+ "NLM_F_ROOT": "int:256",
+ "NOFLSH": "int:128",
+ "OCRNL": "int:8",
+ "OFDEL": "int:128",
+ "OFILL": "int:64",
+ "OLCUC": "int:2",
+ "ONLCR": "int:4",
+ "ONLRET": "int:32",
+ "ONOCR": "int:16",
+ "OPOST": "int:1",
+ "OS": "string:linux",
+ "O_ACCMODE": "int:3",
+ "O_APPEND": "int:1024",
+ "O_ASYNC": "int:8192",
+ "O_CLOEXEC": "int:524288",
+ "O_CREAT": "int:64",
+ "O_DIRECT": "int:65536",
+ "O_DIRECTORY": "int:16384",
+ "O_DSYNC": "int:4096",
+ "O_EXCL": "int:128",
+ "O_FSYNC": "int:1052672",
+ "O_LARGEFILE": "int:0",
+ "O_NDELAY": "int:2048",
+ "O_NOATIME": "int:262144",
+ "O_NOCTTY": "int:256",
+ "O_NOFOLLOW": "int:32768",
+ "O_NONBLOCK": "int:2048",
+ "O_PATH": "int:2097152",
+ "O_RDONLY": "int:0",
+ "O_RDWR": "int:2",
+ "O_RSYNC": "int:1052672",
+ "O_SYNC": "int:1052672",
+ "O_TMPFILE": "int:4210688",
+ "O_TRUNC": "int:512",
+ "O_WRONLY": "int:1",
+ "PACKET_ADD_MEMBERSHIP": "int:1",
+ "PACKET_AUXDATA": "int:8",
+ "PACKET_BROADCAST": "int:1",
+ "PACKET_COPY_THRESH": "int:7",
+ "PACKET_DROP_MEMBERSHIP": "int:2",
+ "PACKET_FANOUT": "int:18",
+ "PACKET_FANOUT_DATA": "int:22",
+ "PACKET_FASTROUTE": "int:6",
+ "PACKET_HDRLEN": "int:11",
+ "PACKET_HOST": "int:0",
+ "PACKET_LOOPBACK": "int:5",
+ "PACKET_LOSS": "int:14",
+ "PACKET_MR_ALLMULTI": "int:2",
+ "PACKET_MR_MULTICAST": "int:0",
+ "PACKET_MR_PROMISC": "int:1",
+ "PACKET_MR_UNICAST": "int:3",
+ "PACKET_MULTICAST": "int:2",
+ "PACKET_ORIGDEV": "int:9",
+ "PACKET_OTHERHOST": "int:3",
+ "PACKET_OUTGOING": "int:4",
+ "PACKET_QDISC_BYPASS": "int:20",
+ "PACKET_RECV_OUTPUT": "int:3",
+ "PACKET_RESERVE": "int:12",
+ "PACKET_ROLLOVER_STATS": "int:21",
+ "PACKET_RX_RING": "int:5",
+ "PACKET_STATISTICS": "int:6",
+ "PACKET_TIMESTAMP": "int:17",
+ "PACKET_TX_HAS_OFF": "int:19",
+ "PACKET_TX_RING": "int:13",
+ "PACKET_TX_TIMESTAMP": "int:16",
+ "PACKET_VERSION": "int:10",
+ "PACKET_VNET_HDR": "int:15",
+ "PARENB": "int:256",
+ "PARMRK": "int:8",
+ "PARODD": "int:512",
+ "PC_2_SYMLINKS": "int:20",
+ "PC_ALLOC_SIZE_MIN": "int:18",
+ "PC_ASYNC_IO": "int:10",
+ "PC_CHOWN_RESTRICTED": "int:6",
+ "PC_FILESIZEBITS": "int:13",
+ "PC_LINK_MAX": "int:0",
+ "PC_MAX_CANON": "int:1",
+ "PC_MAX_INPUT": "int:2",
+ "PC_NAME_MAX": "int:3",
+ "PC_NO_TRUNC": "int:7",
+ "PC_PATH_MAX": "int:4",
+ "PC_PIPE_BUF": "int:5",
+ "PC_PRIO_IO": "int:11",
+ "PC_REC_INCR_XFER_SIZE": "int:14",
+ "PC_REC_MAX_XFER_SIZE": "int:15",
+ "PC_REC_MIN_XFER_SIZE": "int:16",
+ "PC_REC_XFER_ALIGN": "int:17",
+ "PC_SOCK_MAXBUF": "int:12",
+ "PC_SYMLINK_MAX": "int:19",
+ "PC_SYNC_IO": "int:9",
+ "PC_VDISABLE": "int:8",
+ "PENDIN": "int:16384",
+ "PRIO_MAX": "int:20",
+ "PRIO_MIN": "int:-20",
+ "PRIO_PGRP": "int:1",
+ "PRIO_PROCESS": "int:0",
+ "PRIO_USER": "int:2",
+ "PROT_EXEC": "int:4",
+ "PROT_GROWSDOWN": "int:16777216",
+ "PROT_GROWSUP": "int:33554432",
+ "PROT_NONE": "int:0",
+ "PROT_READ": "int:1",
+ "PROT_WRITE": "int:2",
+ "PR_CAPBSET_DROP": "int:24",
+ "PR_CAPBSET_READ": "int:23",
+ "PR_CAP_AMBIENT": "int:47",
+ "PR_CAP_AMBIENT_CLEAR_ALL": "int:4",
+ "PR_CAP_AMBIENT_IS_SET": "int:1",
+ "PR_CAP_AMBIENT_LOWER": "int:3",
+ "PR_CAP_AMBIENT_RAISE": "int:2",
+ "PR_ENDIAN_BIG": "int:0",
+ "PR_ENDIAN_LITTLE": "int:1",
+ "PR_ENDIAN_PPC_LITTLE": "int:2",
+ "PR_FPEMU_NOPRINT": "int:1",
+ "PR_FPEMU_SIGFPE": "int:2",
+ "PR_FP_EXC_ASYNC": "int:2",
+ "PR_FP_EXC_DISABLED": "int:0",
+ "PR_FP_EXC_DIV": "int:65536",
+ "PR_FP_EXC_INV": "int:1048576",
+ "PR_FP_EXC_NONRECOV": "int:1",
+ "PR_FP_EXC_OVF": "int:131072",
+ "PR_FP_EXC_PRECISE": "int:3",
+ "PR_FP_EXC_RES": "int:524288",
+ "PR_FP_EXC_SW_ENABLE": "int:128",
+ "PR_FP_EXC_UND": "int:262144",
+ "PR_FP_MODE_FR": "int:1",
+ "PR_FP_MODE_FRE": "int:2",
+ "PR_GET_CHILD_SUBREAPER": "int:37",
+ "PR_GET_DUMPABLE": "int:3",
+ "PR_GET_ENDIAN": "int:19",
+ "PR_GET_FPEMU": "int:9",
+ "PR_GET_FPEXC": "int:11",
+ "PR_GET_FP_MODE": "int:46",
+ "PR_GET_KEEPCAPS": "int:7",
+ "PR_GET_NAME": "int:16",
+ "PR_GET_NO_NEW_PRIVS": "int:39",
+ "PR_GET_PDEATHSIG": "int:2",
+ "PR_GET_SECCOMP": "int:21",
+ "PR_GET_SECUREBITS": "int:27",
+ "PR_GET_THP_DISABLE": "int:42",
+ "PR_GET_TID_ADDRESS": "int:40",
+ "PR_GET_TIMERSLACK": "int:30",
+ "PR_GET_TIMING": "int:13",
+ "PR_GET_TSC": "int:25",
+ "PR_GET_UNALIGN": "int:5",
+ "PR_MCE_KILL": "int:33",
+ "PR_MCE_KILL_CLEAR": "int:0",
+ "PR_MCE_KILL_DEFAULT": "int:2",
+ "PR_MCE_KILL_EARLY": "int:1",
+ "PR_MCE_KILL_GET": "int:34",
+ "PR_MCE_KILL_LATE": "int:0",
+ "PR_MCE_KILL_SET": "int:1",
+ "PR_MPX_DISABLE_MANAGEMENT": "int:44",
+ "PR_MPX_ENABLE_MANAGEMENT": "int:43",
+ "PR_SET_CHILD_SUBREAPER": "int:36",
+ "PR_SET_DUMPABLE": "int:4",
+ "PR_SET_ENDIAN": "int:20",
+ "PR_SET_FPEMU": "int:10",
+ "PR_SET_FPEXC": "int:12",
+ "PR_SET_FP_MODE": "int:45",
+ "PR_SET_KEEPCAPS": "int:8",
+ "PR_SET_MM": "int:35",
+ "PR_SET_MM_ARG_END": "int:9",
+ "PR_SET_MM_ARG_START": "int:8",
+ "PR_SET_MM_AUXV": "int:12",
+ "PR_SET_MM_BRK": "int:7",
+ "PR_SET_MM_END_CODE": "int:2",
+ "PR_SET_MM_END_DATA": "int:4",
+ "PR_SET_MM_ENV_END": "int:11",
+ "PR_SET_MM_ENV_START": "int:10",
+ "PR_SET_MM_EXE_FILE": "int:13",
+ "PR_SET_MM_MAP": "int:14",
+ "PR_SET_MM_MAP_SIZE": "int:15",
+ "PR_SET_MM_START_BRK": "int:6",
+ "PR_SET_MM_START_CODE": "int:1",
+ "PR_SET_MM_START_DATA": "int:3",
+ "PR_SET_MM_START_STACK": "int:5",
+ "PR_SET_NAME": "int:15",
+ "PR_SET_NO_NEW_PRIVS": "int:38",
+ "PR_SET_PDEATHSIG": "int:1",
+ "PR_SET_PTRACER": "int:1499557217",
+ "PR_SET_SECCOMP": "int:22",
+ "PR_SET_SECUREBITS": "int:28",
+ "PR_SET_THP_DISABLE": "int:41",
+ "PR_SET_TIMERSLACK": "int:29",
+ "PR_SET_TIMING": "int:14",
+ "PR_SET_TSC": "int:26",
+ "PR_SET_UNALIGN": "int:6",
+ "PR_SVE_GET_VL": "int:51",
+ "PR_SVE_SET_VL": "int:50",
+ "PR_SVE_SET_VL_ONEXEC": "int:262144",
+ "PR_SVE_VL_INHERIT": "int:131072",
+ "PR_SVE_VL_LEN_MASK": "int:65535",
+ "PR_TASK_PERF_EVENTS_DISABLE": "int:31",
+ "PR_TASK_PERF_EVENTS_ENABLE": "int:32",
+ "PR_TIMING_STATISTICAL": "int:0",
+ "PR_TIMING_TIMESTAMP": "int:1",
+ "PR_TSC_ENABLE": "int:1",
+ "PR_TSC_SIGSEGV": "int:2",
+ "PR_UNALIGN_NOPRINT": "int:1",
+ "PR_UNALIGN_SIGBUS": "int:2",
+ "PTRACE_ATTACH": "int:16",
+ "PTRACE_CONT": "int:7",
+ "PTRACE_DETACH": "int:17",
+ "PTRACE_EVENT_CLONE": "int:3",
+ "PTRACE_EVENT_EXEC": "int:4",
+ "PTRACE_EVENT_EXIT": "int:6",
+ "PTRACE_EVENT_FORK": "int:1",
+ "PTRACE_EVENT_SECCOMP": "int:7",
+ "PTRACE_EVENT_STOP": "int:128",
+ "PTRACE_EVENT_VFORK": "int:2",
+ "PTRACE_EVENT_VFORK_DONE": "int:5",
+ "PTRACE_GETEVENTMSG": "int:16897",
+ "PTRACE_GETREGSET": "int:16900",
+ "PTRACE_GETSIGINFO": "int:16898",
+ "PTRACE_GETSIGMASK": "int:16906",
+ "PTRACE_INTERRUPT": "int:16903",
+ "PTRACE_KILL": "int:8",
+ "PTRACE_LISTEN": "int:16904",
+ "PTRACE_O_EXITKILL": "int:1048576",
+ "PTRACE_O_MASK": "int:3145983",
+ "PTRACE_O_SUSPEND_SECCOMP": "int:2097152",
+ "PTRACE_O_TRACECLONE": "int:8",
+ "PTRACE_O_TRACEEXEC": "int:16",
+ "PTRACE_O_TRACEEXIT": "int:64",
+ "PTRACE_O_TRACEFORK": "int:2",
+ "PTRACE_O_TRACESECCOMP": "int:128",
+ "PTRACE_O_TRACESYSGOOD": "int:1",
+ "PTRACE_O_TRACEVFORK": "int:4",
+ "PTRACE_O_TRACEVFORKDONE": "int:32",
+ "PTRACE_PEEKDATA": "int:2",
+ "PTRACE_PEEKSIGINFO": "int:16905",
+ "PTRACE_PEEKSIGINFO_SHARED": "int:1",
+ "PTRACE_PEEKTEXT": "int:1",
+ "PTRACE_PEEKUSER": "int:3",
+ "PTRACE_PEEKUSR": "int:3",
+ "PTRACE_POKEDATA": "int:5",
+ "PTRACE_POKETEXT": "int:4",
+ "PTRACE_POKEUSER": "int:6",
+ "PTRACE_POKEUSR": "int:6",
+ "PTRACE_SECCOMP_GET_FILTER": "int:16908",
+ "PTRACE_SEIZE": "int:16902",
+ "PTRACE_SETOPTIONS": "int:16896",
+ "PTRACE_SETREGSET": "int:16901",
+ "PTRACE_SETSIGINFO": "int:16899",
+ "PTRACE_SETSIGMASK": "int:16907",
+ "PTRACE_SINGLESTEP": "int:9",
+ "PTRACE_SYSCALL": "int:24",
+ "PTRACE_TRACEME": "int:0",
+ "PathMax": "int:4096",
+ "RLIMIT_AS": "int:9",
+ "RLIMIT_CORE": "int:4",
+ "RLIMIT_CPU": "int:0",
+ "RLIMIT_DATA": "int:2",
+ "RLIMIT_FSIZE": "int:1",
+ "RLIMIT_NOFILE": "int:7",
+ "RLIMIT_STACK": "int:3",
+ "RLIM_INFINITY": "int:18446744073709551615",
+ "RLIM_SAVED_CUR": "int:18446744073709551615",
+ "RLIM_SAVED_MAX": "int:18446744073709551615",
+ "RTAX_ADVMSS": "int:8",
+ "RTAX_CC_ALGO": "int:16",
+ "RTAX_CWND": "int:7",
+ "RTAX_FASTOPEN_NO_COOKIE": "int:17",
+ "RTAX_FEATURES": "int:12",
+ "RTAX_FEATURE_ALLFRAG": "int:8",
+ "RTAX_FEATURE_ECN": "int:1",
+ "RTAX_FEATURE_MASK": "int:15",
+ "RTAX_FEATURE_SACK": "int:2",
+ "RTAX_FEATURE_TIMESTAMP": "int:4",
+ "RTAX_HOPLIMIT": "int:10",
+ "RTAX_INITCWND": "int:11",
+ "RTAX_INITRWND": "int:14",
+ "RTAX_LOCK": "int:1",
+ "RTAX_MTU": "int:2",
+ "RTAX_QUICKACK": "int:15",
+ "RTAX_REORDERING": "int:9",
+ "RTAX_RTO_MIN": "int:13",
+ "RTAX_RTT": "int:4",
+ "RTAX_RTTVAR": "int:5",
+ "RTAX_SSTHRESH": "int:6",
+ "RTAX_UNSPEC": "int:0",
+ "RTAX_WINDOW": "int:3",
+ "RTA_ALIGNTO": "int:4",
+ "RTA_CACHEINFO": "int:12",
+ "RTA_DST": "int:1",
+ "RTA_ENCAP": "int:22",
+ "RTA_ENCAP_TYPE": "int:21",
+ "RTA_EXPIRES": "int:23",
+ "RTA_FLOW": "int:11",
+ "RTA_GATEWAY": "int:5",
+ "RTA_IIF": "int:3",
+ "RTA_MARK": "int:16",
+ "RTA_METRICS": "int:8",
+ "RTA_MFC_STATS": "int:17",
+ "RTA_MP_ALGO": "int:14",
+ "RTA_MULTIPATH": "int:9",
+ "RTA_NEWDST": "int:19",
+ "RTA_OIF": "int:4",
+ "RTA_PAD": "int:24",
+ "RTA_PREF": "int:20",
+ "RTA_PREFSRC": "int:7",
+ "RTA_PRIORITY": "int:6",
+ "RTA_PROTOINFO": "int:10",
+ "RTA_SESSION": "int:13",
+ "RTA_SRC": "int:2",
+ "RTA_TABLE": "int:15",
+ "RTA_TTL_PROPAGATE": "int:26",
+ "RTA_UID": "int:25",
+ "RTA_UNSPEC": "int:0",
+ "RTA_VIA": "int:18",
+ "RTCF_DIRECTSRC": "int:67108864",
+ "RTCF_DOREDIRECT": "int:16777216",
+ "RTCF_LOG": "int:33554432",
+ "RTCF_MASQ": "int:4194304",
+ "RTCF_NAT": "int:8388608",
+ "RTCF_VALVE": "int:2097152",
+ "RTF_ADDRCLASSMASK": "int:4160749568",
+ "RTF_ADDRCONF": "int:262144",
+ "RTF_ALLONLINK": "int:131072",
+ "RTF_BROADCAST": "int:268435456",
+ "RTF_CACHE": "int:16777216",
+ "RTF_DEFAULT": "int:65536",
+ "RTF_DYNAMIC": "int:16",
+ "RTF_FLOW": "int:33554432",
+ "RTF_GATEWAY": "int:2",
+ "RTF_HOST": "int:4",
+ "RTF_INTERFACE": "int:1073741824",
+ "RTF_IRTT": "int:256",
+ "RTF_LINKRT": "int:1048576",
+ "RTF_LOCAL": "int:2147483648",
+ "RTF_MODIFIED": "int:32",
+ "RTF_MSS": "int:64",
+ "RTF_MTU": "int:64",
+ "RTF_MULTICAST": "int:536870912",
+ "RTF_NAT": "int:134217728",
+ "RTF_NOFORWARD": "int:4096",
+ "RTF_NONEXTHOP": "int:2097152",
+ "RTF_NOPMTUDISC": "int:16384",
+ "RTF_POLICY": "int:67108864",
+ "RTF_REINSTATE": "int:8",
+ "RTF_REJECT": "int:512",
+ "RTF_STATIC": "int:1024",
+ "RTF_THROW": "int:8192",
+ "RTF_UP": "int:1",
+ "RTF_WINDOW": "int:128",
+ "RTF_XRESOLVE": "int:2048",
+ "RTMGRP_DECnet_IFADDR": "int:4096",
+ "RTMGRP_DECnet_ROUTE": "int:16384",
+ "RTMGRP_IPV4_IFADDR": "int:16",
+ "RTMGRP_IPV4_MROUTE": "int:32",
+ "RTMGRP_IPV4_ROUTE": "int:64",
+ "RTMGRP_IPV4_RULE": "int:128",
+ "RTMGRP_IPV6_IFADDR": "int:256",
+ "RTMGRP_IPV6_IFINFO": "int:2048",
+ "RTMGRP_IPV6_MROUTE": "int:512",
+ "RTMGRP_IPV6_PREFIX": "int:131072",
+ "RTMGRP_IPV6_ROUTE": "int:1024",
+ "RTMGRP_LINK": "int:1",
+ "RTMGRP_NEIGH": "int:4",
+ "RTMGRP_NOTIFY": "int:2",
+ "RTMGRP_TC": "int:8",
+ "RTMSG_AR_FAILED": "int:81",
+ "RTMSG_CONTROL": "int:64",
+ "RTMSG_DELDEVICE": "int:18",
+ "RTMSG_DELROUTE": "int:34",
+ "RTMSG_DELRULE": "int:50",
+ "RTMSG_NEWDEVICE": "int:17",
+ "RTMSG_NEWROUTE": "int:33",
+ "RTMSG_NEWRULE": "int:49",
+ "RTMSG_OVERRUN": "int:4",
+ "RTM_BASE": "int:16",
+ "RTM_DELACTION": "int:49",
+ "RTM_DELADDR": "int:21",
+ "RTM_DELADDRLABEL": "int:73",
+ "RTM_DELLINK": "int:17",
+ "RTM_DELMDB": "int:85",
+ "RTM_DELNEIGH": "int:29",
+ "RTM_DELNETCONF": "int:81",
+ "RTM_DELNSID": "int:89",
+ "RTM_DELQDISC": "int:37",
+ "RTM_DELROUTE": "int:25",
+ "RTM_DELRULE": "int:33",
+ "RTM_DELTCLASS": "int:41",
+ "RTM_DELTFILTER": "int:45",
+ "RTM_F_CLONED": "int:512",
+ "RTM_F_EQUALIZE": "int:1024",
+ "RTM_F_FIB_MATCH": "int:8192",
+ "RTM_F_LOOKUP_TABLE": "int:4096",
+ "RTM_F_NOTIFY": "int:256",
+ "RTM_F_PREFIX": "int:2048",
+ "RTM_GETACTION": "int:50",
+ "RTM_GETADDR": "int:22",
+ "RTM_GETADDRLABEL": "int:74",
+ "RTM_GETANYCAST": "int:62",
+ "RTM_GETDCB": "int:78",
+ "RTM_GETLINK": "int:18",
+ "RTM_GETMDB": "int:86",
+ "RTM_GETMULTICAST": "int:58",
+ "RTM_GETNEIGH": "int:30",
+ "RTM_GETNEIGHTBL": "int:66",
+ "RTM_GETNETCONF": "int:82",
+ "RTM_GETNSID": "int:90",
+ "RTM_GETQDISC": "int:38",
+ "RTM_GETROUTE": "int:26",
+ "RTM_GETRULE": "int:34",
+ "RTM_GETSTATS": "int:94",
+ "RTM_GETTCLASS": "int:42",
+ "RTM_GETTFILTER": "int:46",
+ "RTM_NEWACTION": "int:48",
+ "RTM_NEWADDR": "int:20",
+ "RTM_NEWADDRLABEL": "int:72",
+ "RTM_NEWCACHEREPORT": "int:96",
+ "RTM_NEWLINK": "int:16",
+ "RTM_NEWMDB": "int:84",
+ "RTM_NEWNDUSEROPT": "int:68",
+ "RTM_NEWNEIGH": "int:28",
+ "RTM_NEWNEIGHTBL": "int:64",
+ "RTM_NEWNETCONF": "int:80",
+ "RTM_NEWNSID": "int:88",
+ "RTM_NEWPREFIX": "int:52",
+ "RTM_NEWQDISC": "int:36",
+ "RTM_NEWROUTE": "int:24",
+ "RTM_NEWRULE": "int:32",
+ "RTM_NEWSTATS": "int:92",
+ "RTM_NEWTCLASS": "int:40",
+ "RTM_NEWTFILTER": "int:44",
+ "RTM_SETDCB": "int:79",
+ "RTM_SETLINK": "int:19",
+ "RTM_SETNEIGHTBL": "int:67",
+ "RTNETLINK_HAVE_PEERINFO": "int:1",
+ "RTNH_ALIGNTO": "int:4",
+ "RTNH_COMPARE_MASK": "int:25",
+ "RTNH_F_DEAD": "int:1",
+ "RTNH_F_LINKDOWN": "int:16",
+ "RTNH_F_OFFLOAD": "int:8",
+ "RTNH_F_ONLINK": "int:4",
+ "RTNH_F_PERVASIVE": "int:2",
+ "RTNH_F_UNRESOLVED": "int:32",
+ "RTNLGRP_DCB": "int:23",
+ "RTNLGRP_DECnet_IFADDR": "int:13",
+ "RTNLGRP_DECnet_ROUTE": "int:15",
+ "RTNLGRP_DECnet_RULE": "int:16",
+ "RTNLGRP_IPV4_IFADDR": "int:5",
+ "RTNLGRP_IPV4_MROUTE": "int:6",
+ "RTNLGRP_IPV4_MROUTE_R": "int:30",
+ "RTNLGRP_IPV4_NETCONF": "int:24",
+ "RTNLGRP_IPV4_ROUTE": "int:7",
+ "RTNLGRP_IPV4_RULE": "int:8",
+ "RTNLGRP_IPV6_IFADDR": "int:9",
+ "RTNLGRP_IPV6_IFINFO": "int:12",
+ "RTNLGRP_IPV6_MROUTE": "int:10",
+ "RTNLGRP_IPV6_MROUTE_R": "int:31",
+ "RTNLGRP_IPV6_NETCONF": "int:25",
+ "RTNLGRP_IPV6_PREFIX": "int:18",
+ "RTNLGRP_IPV6_ROUTE": "int:11",
+ "RTNLGRP_IPV6_RULE": "int:19",
+ "RTNLGRP_LINK": "int:1",
+ "RTNLGRP_MDB": "int:26",
+ "RTNLGRP_MPLS_NETCONF": "int:29",
+ "RTNLGRP_MPLS_ROUTE": "int:27",
+ "RTNLGRP_ND_USEROPT": "int:20",
+ "RTNLGRP_NEIGH": "int:3",
+ "RTNLGRP_NONE": "int:0",
+ "RTNLGRP_NOP2": "int:14",
+ "RTNLGRP_NOP4": "int:17",
+ "RTNLGRP_NOTIFY": "int:2",
+ "RTNLGRP_NSID": "int:28",
+ "RTNLGRP_PHONET_IFADDR": "int:21",
+ "RTNLGRP_PHONET_ROUTE": "int:22",
+ "RTNLGRP_TC": "int:4",
+ "RTNL_FAMILY_IP6MR": "int:129",
+ "RTNL_FAMILY_IPMR": "int:128",
+ "RTNL_FAMILY_MAX": "int:129",
+ "RTN_ANYCAST": "int:4",
+ "RTN_BLACKHOLE": "int:6",
+ "RTN_BROADCAST": "int:3",
+ "RTN_LOCAL": "int:2",
+ "RTN_MULTICAST": "int:5",
+ "RTN_NAT": "int:10",
+ "RTN_PROHIBIT": "int:8",
+ "RTN_THROW": "int:9",
+ "RTN_UNICAST": "int:1",
+ "RTN_UNREACHABLE": "int:7",
+ "RTN_UNSPEC": "int:0",
+ "RTN_XRESOLVE": "int:11",
+ "RTPROT_BABEL": "int:42",
+ "RTPROT_BIRD": "int:12",
+ "RTPROT_BOOT": "int:3",
+ "RTPROT_DHCP": "int:16",
+ "RTPROT_DNROUTED": "int:13",
+ "RTPROT_GATED": "int:8",
+ "RTPROT_KERNEL": "int:2",
+ "RTPROT_MROUTED": "int:17",
+ "RTPROT_MRT": "int:10",
+ "RTPROT_NTK": "int:15",
+ "RTPROT_RA": "int:9",
+ "RTPROT_REDIRECT": "int:1",
+ "RTPROT_STATIC": "int:4",
+ "RTPROT_UNSPEC": "int:0",
+ "RTPROT_XORP": "int:14",
+ "RTPROT_ZEBRA": "int:11",
+ "RT_CLASS_DEFAULT": "int:253",
+ "RT_CLASS_LOCAL": "int:255",
+ "RT_CLASS_MAIN": "int:254",
+ "RT_CLASS_MAX": "int:255",
+ "RT_CLASS_UNSPEC": "int:0",
+ "RT_SCOPE_HOST": "int:254",
+ "RT_SCOPE_LINK": "int:253",
+ "RT_SCOPE_NOWHERE": "int:255",
+ "RT_SCOPE_SITE": "int:200",
+ "RT_SCOPE_UNIVERSE": "int:0",
+ "RT_TABLE_COMPAT": "int:252",
+ "RT_TABLE_DEFAULT": "int:253",
+ "RT_TABLE_LOCAL": "int:255",
+ "RT_TABLE_MAIN": "int:254",
+ "RT_TABLE_MAX": "int:4294967295",
+ "RT_TABLE_UNSPEC": "int:0",
+ "RUSAGE_CHILDREN": "int:-1",
+ "RUSAGE_SELF": "int:0",
+ "RUSAGE_THREAD": "int:1",
+ "SCHED_H": "int:1",
+ "SCM_CREDENTIALS": "int:2",
+ "SCM_RIGHTS": "int:1",
+ "SCM_TIMESTAMP": "int:29",
+ "SCM_TIMESTAMPING": "int:37",
+ "SCM_TIMESTAMPING_OPT_STATS": "int:54",
+ "SCM_TIMESTAMPING_PKTINFO": "int:58",
+ "SCM_TIMESTAMPNS": "int:35",
+ "SCM_WIFI_STATUS": "int:41",
+ "SC_2_CHAR_TERM": "int:95",
+ "SC_2_C_BIND": "int:47",
+ "SC_2_C_DEV": "int:48",
+ "SC_2_C_VERSION": "int:96",
+ "SC_2_FORT_DEV": "int:49",
+ "SC_2_FORT_RUN": "int:50",
+ "SC_2_LOCALEDEF": "int:52",
+ "SC_2_PBS": "int:168",
+ "SC_2_PBS_ACCOUNTING": "int:169",
+ "SC_2_PBS_CHECKPOINT": "int:175",
+ "SC_2_PBS_LOCATE": "int:170",
+ "SC_2_PBS_MESSAGE": "int:171",
+ "SC_2_PBS_TRACK": "int:172",
+ "SC_2_SW_DEV": "int:51",
+ "SC_2_UPE": "int:97",
+ "SC_2_VERSION": "int:46",
+ "SC_ADVISORY_INFO": "int:132",
+ "SC_AIO_LISTIO_MAX": "int:23",
+ "SC_AIO_MAX": "int:24",
+ "SC_AIO_PRIO_DELTA_MAX": "int:25",
+ "SC_ARG_MAX": "int:0",
+ "SC_ASYNCHRONOUS_IO": "int:12",
+ "SC_ATEXIT_MAX": "int:87",
+ "SC_AVPHYS_PAGES": "int:86",
+ "SC_BARRIERS": "int:133",
+ "SC_BASE": "int:134",
+ "SC_BC_BASE_MAX": "int:36",
+ "SC_BC_DIM_MAX": "int:37",
+ "SC_BC_SCALE_MAX": "int:38",
+ "SC_BC_STRING_MAX": "int:39",
+ "SC_CHARCLASS_NAME_MAX": "int:45",
+ "SC_CHAR_BIT": "int:101",
+ "SC_CHAR_MAX": "int:102",
+ "SC_CHAR_MIN": "int:103",
+ "SC_CHILD_MAX": "int:1",
+ "SC_CLK_TCK": "int:2",
+ "SC_CLOCK_SELECTION": "int:137",
+ "SC_COLL_WEIGHTS_MAX": "int:40",
+ "SC_CPUTIME": "int:138",
+ "SC_C_LANG_SUPPORT": "int:135",
+ "SC_C_LANG_SUPPORT_R": "int:136",
+ "SC_DELAYTIMER_MAX": "int:26",
+ "SC_DEVICE_IO": "int:140",
+ "SC_DEVICE_SPECIFIC": "int:141",
+ "SC_DEVICE_SPECIFIC_R": "int:142",
+ "SC_EQUIV_CLASS_MAX": "int:41",
+ "SC_EXPR_NEST_MAX": "int:42",
+ "SC_FD_MGMT": "int:143",
+ "SC_FIFO": "int:144",
+ "SC_FILE_ATTRIBUTES": "int:146",
+ "SC_FILE_LOCKING": "int:147",
+ "SC_FILE_SYSTEM": "int:148",
+ "SC_FSYNC": "int:15",
+ "SC_GETGR_R_SIZE_MAX": "int:69",
+ "SC_GETPW_R_SIZE_MAX": "int:70",
+ "SC_HOST_NAME_MAX": "int:180",
+ "SC_INT_MAX": "int:104",
+ "SC_INT_MIN": "int:105",
+ "SC_IOV_MAX": "int:60",
+ "SC_IPV6": "int:235",
+ "SC_JOB_CONTROL": "int:7",
+ "SC_LEVEL1_DCACHE_ASSOC": "int:189",
+ "SC_LEVEL1_DCACHE_LINESIZE": "int:190",
+ "SC_LEVEL1_DCACHE_SIZE": "int:188",
+ "SC_LEVEL1_ICACHE_ASSOC": "int:186",
+ "SC_LEVEL1_ICACHE_LINESIZE": "int:187",
+ "SC_LEVEL1_ICACHE_SIZE": "int:185",
+ "SC_LEVEL2_CACHE_ASSOC": "int:192",
+ "SC_LEVEL2_CACHE_LINESIZE": "int:193",
+ "SC_LEVEL2_CACHE_SIZE": "int:191",
+ "SC_LEVEL3_CACHE_ASSOC": "int:195",
+ "SC_LEVEL3_CACHE_LINESIZE": "int:196",
+ "SC_LEVEL3_CACHE_SIZE": "int:194",
+ "SC_LEVEL4_CACHE_ASSOC": "int:198",
+ "SC_LEVEL4_CACHE_LINESIZE": "int:199",
+ "SC_LEVEL4_CACHE_SIZE": "int:197",
+ "SC_LINE_MAX": "int:43",
+ "SC_LOGIN_NAME_MAX": "int:71",
+ "SC_LONG_BIT": "int:106",
+ "SC_MAPPED_FILES": "int:16",
+ "SC_MB_LEN_MAX": "int:108",
+ "SC_MEMLOCK": "int:17",
+ "SC_MEMLOCK_RANGE": "int:18",
+ "SC_MEMORY_PROTECTION": "int:19",
+ "SC_MESSAGE_PASSING": "int:20",
+ "SC_MONOTONIC_CLOCK": "int:149",
+ "SC_MQ_OPEN_MAX": "int:27",
+ "SC_MQ_PRIO_MAX": "int:28",
+ "SC_MULTI_PROCESS": "int:150",
+ "SC_NETWORKING": "int:152",
+ "SC_NGROUPS_MAX": "int:3",
+ "SC_NL_ARGMAX": "int:119",
+ "SC_NL_LANGMAX": "int:120",
+ "SC_NL_MSGMAX": "int:121",
+ "SC_NL_NMAX": "int:122",
+ "SC_NL_SETMAX": "int:123",
+ "SC_NL_TEXTMAX": "int:124",
+ "SC_NPROCESSORS_CONF": "int:83",
+ "SC_NPROCESSORS_ONLN": "int:84",
+ "SC_NZERO": "int:109",
+ "SC_OPEN_MAX": "int:4",
+ "SC_PAGESIZE": "int:30",
+ "SC_PASS_MAX": "int:88",
+ "SC_PHYS_PAGES": "int:85",
+ "SC_PII": "int:53",
+ "SC_PII_INTERNET": "int:56",
+ "SC_PII_INTERNET_DGRAM": "int:62",
+ "SC_PII_INTERNET_STREAM": "int:61",
+ "SC_PII_OSI": "int:57",
+ "SC_PII_OSI_CLTS": "int:64",
+ "SC_PII_OSI_COTS": "int:63",
+ "SC_PII_OSI_M": "int:65",
+ "SC_PII_SOCKET": "int:55",
+ "SC_PII_XTI": "int:54",
+ "SC_PIPE": "int:145",
+ "SC_POLL": "int:58",
+ "SC_PRIORITIZED_IO": "int:13",
+ "SC_PRIORITY_SCHEDULING": "int:10",
+ "SC_RAW_SOCKETS": "int:236",
+ "SC_READER_WRITER_LOCKS": "int:153",
+ "SC_REALTIME_SIGNALS": "int:9",
+ "SC_REGEXP": "int:155",
+ "SC_REGEX_VERSION": "int:156",
+ "SC_RE_DUP_MAX": "int:44",
+ "SC_RTSIG_MAX": "int:31",
+ "SC_SAVED_IDS": "int:8",
+ "SC_SCHAR_MAX": "int:111",
+ "SC_SCHAR_MIN": "int:112",
+ "SC_SELECT": "int:59",
+ "SC_SEMAPHORES": "int:21",
+ "SC_SEM_NSEMS_MAX": "int:32",
+ "SC_SEM_VALUE_MAX": "int:33",
+ "SC_SHARED_MEMORY_OBJECTS": "int:22",
+ "SC_SHELL": "int:157",
+ "SC_SHRT_MAX": "int:113",
+ "SC_SHRT_MIN": "int:114",
+ "SC_SIGNALS": "int:158",
+ "SC_SIGQUEUE_MAX": "int:34",
+ "SC_SINGLE_PROCESS": "int:151",
+ "SC_SPAWN": "int:159",
+ "SC_SPIN_LOCKS": "int:154",
+ "SC_SPORADIC_SERVER": "int:160",
+ "SC_SSIZE_MAX": "int:110",
+ "SC_SS_REPL_MAX": "int:241",
+ "SC_STREAMS": "int:174",
+ "SC_STREAM_MAX": "int:5",
+ "SC_SYMLOOP_MAX": "int:173",
+ "SC_SYNCHRONIZED_IO": "int:14",
+ "SC_SYSTEM_DATABASE": "int:162",
+ "SC_SYSTEM_DATABASE_R": "int:163",
+ "SC_THREADS": "int:67",
+ "SC_THREAD_ATTR_STACKADDR": "int:77",
+ "SC_THREAD_ATTR_STACKSIZE": "int:78",
+ "SC_THREAD_CPUTIME": "int:139",
+ "SC_THREAD_DESTRUCTOR_ITERATIONS": "int:73",
+ "SC_THREAD_KEYS_MAX": "int:74",
+ "SC_THREAD_PRIORITY_SCHEDULING": "int:79",
+ "SC_THREAD_PRIO_INHERIT": "int:80",
+ "SC_THREAD_PRIO_PROTECT": "int:81",
+ "SC_THREAD_PROCESS_SHARED": "int:82",
+ "SC_THREAD_ROBUST_PRIO_INHERIT": "int:247",
+ "SC_THREAD_ROBUST_PRIO_PROTECT": "int:248",
+ "SC_THREAD_SAFE_FUNCTIONS": "int:68",
+ "SC_THREAD_SPORADIC_SERVER": "int:161",
+ "SC_THREAD_STACK_MIN": "int:75",
+ "SC_THREAD_THREADS_MAX": "int:76",
+ "SC_TIMEOUTS": "int:164",
+ "SC_TIMERS": "int:11",
+ "SC_TIMER_MAX": "int:35",
+ "SC_TRACE": "int:181",
+ "SC_TRACE_EVENT_FILTER": "int:182",
+ "SC_TRACE_EVENT_NAME_MAX": "int:242",
+ "SC_TRACE_INHERIT": "int:183",
+ "SC_TRACE_LOG": "int:184",
+ "SC_TRACE_NAME_MAX": "int:243",
+ "SC_TRACE_SYS_MAX": "int:244",
+ "SC_TRACE_USER_EVENT_MAX": "int:245",
+ "SC_TTY_NAME_MAX": "int:72",
+ "SC_TYPED_MEMORY_OBJECTS": "int:165",
+ "SC_TZNAME_MAX": "int:6",
+ "SC_T_IOV_MAX": "int:66",
+ "SC_UCHAR_MAX": "int:115",
+ "SC_UINT_MAX": "int:116",
+ "SC_UIO_MAXIOV": "int:60",
+ "SC_ULONG_MAX": "int:117",
+ "SC_USER_GROUPS": "int:166",
+ "SC_USER_GROUPS_R": "int:167",
+ "SC_USHRT_MAX": "int:118",
+ "SC_V6_ILP32_OFF32": "int:176",
+ "SC_V6_ILP32_OFFBIG": "int:177",
+ "SC_V6_LP64_OFF64": "int:178",
+ "SC_V6_LPBIG_OFFBIG": "int:179",
+ "SC_V7_ILP32_OFF32": "int:237",
+ "SC_V7_ILP32_OFFBIG": "int:238",
+ "SC_V7_LP64_OFF64": "int:239",
+ "SC_V7_LPBIG_OFFBIG": "int:240",
+ "SC_VERSION": "int:29",
+ "SC_WORD_BIT": "int:107",
+ "SC_XBS5_ILP32_OFF32": "int:125",
+ "SC_XBS5_ILP32_OFFBIG": "int:126",
+ "SC_XBS5_LP64_OFF64": "int:127",
+ "SC_XBS5_LPBIG_OFFBIG": "int:128",
+ "SC_XOPEN_CRYPT": "int:92",
+ "SC_XOPEN_ENH_I18N": "int:93",
+ "SC_XOPEN_LEGACY": "int:129",
+ "SC_XOPEN_REALTIME": "int:130",
+ "SC_XOPEN_REALTIME_THREADS": "int:131",
+ "SC_XOPEN_SHM": "int:94",
+ "SC_XOPEN_STREAMS": "int:246",
+ "SC_XOPEN_UNIX": "int:91",
+ "SC_XOPEN_VERSION": "int:89",
+ "SC_XOPEN_XCU_VERSION": "int:90",
+ "SC_XOPEN_XPG2": "int:98",
+ "SC_XOPEN_XPG3": "int:99",
+ "SC_XOPEN_XPG4": "int:100",
+ "SHUT_RD": "int:0",
+ "SHUT_RDWR": "int:2",
+ "SHUT_WR": "int:1",
+ "SIOCADDDLCI": "int:35200",
+ "SIOCADDMULTI": "int:35121",
+ "SIOCADDRT": "int:35083",
+ "SIOCATMARK": "int:35077",
+ "SIOCDARP": "int:35155",
+ "SIOCDELDLCI": "int:35201",
+ "SIOCDELMULTI": "int:35122",
+ "SIOCDELRT": "int:35084",
+ "SIOCDEVPRIVATE": "int:35312",
+ "SIOCDIFADDR": "int:35126",
+ "SIOCDRARP": "int:35168",
+ "SIOCGARP": "int:35156",
+ "SIOCGIFADDR": "int:35093",
+ "SIOCGIFBR": "int:35136",
+ "SIOCGIFBRDADDR": "int:35097",
+ "SIOCGIFCONF": "int:35090",
+ "SIOCGIFCOUNT": "int:35128",
+ "SIOCGIFDSTADDR": "int:35095",
+ "SIOCGIFENCAP": "int:35109",
+ "SIOCGIFFLAGS": "int:35091",
+ "SIOCGIFHWADDR": "int:35111",
+ "SIOCGIFINDEX": "int:35123",
+ "SIOCGIFMAP": "int:35184",
+ "SIOCGIFMEM": "int:35103",
+ "SIOCGIFMETRIC": "int:35101",
+ "SIOCGIFMTU": "int:35105",
+ "SIOCGIFNAME": "int:35088",
+ "SIOCGIFNETMASK": "int:35099",
+ "SIOCGIFPFLAGS": "int:35125",
+ "SIOCGIFSLAVE": "int:35113",
+ "SIOCGIFTXQLEN": "int:35138",
+ "SIOCGPGRP": "int:35076",
+ "SIOCGRARP": "int:35169",
+ "SIOCGSTAMP": "int:35078",
+ "SIOCGSTAMPNS": "int:35079",
+ "SIOCPROTOPRIVATE": "int:35296",
+ "SIOCRTMSG": "int:35085",
+ "SIOCSARP": "int:35157",
+ "SIOCSIFADDR": "int:35094",
+ "SIOCSIFBR": "int:35137",
+ "SIOCSIFBRDADDR": "int:35098",
+ "SIOCSIFDSTADDR": "int:35096",
+ "SIOCSIFENCAP": "int:35110",
+ "SIOCSIFFLAGS": "int:35092",
+ "SIOCSIFHWADDR": "int:35108",
+ "SIOCSIFHWBROADCAST": "int:35127",
+ "SIOCSIFLINK": "int:35089",
+ "SIOCSIFMAP": "int:35185",
+ "SIOCSIFMEM": "int:35104",
+ "SIOCSIFMETRIC": "int:35102",
+ "SIOCSIFMTU": "int:35106",
+ "SIOCSIFNAME": "int:35107",
+ "SIOCSIFNETMASK": "int:35100",
+ "SIOCSIFPFLAGS": "int:35124",
+ "SIOCSIFSLAVE": "int:35120",
+ "SIOCSIFTXQLEN": "int:35139",
+ "SIOCSPGRP": "int:35074",
+ "SIOCSRARP": "int:35170",
+ "SOCK_CLOEXEC": "int:524288",
+ "SOCK_DCCP": "int:6",
+ "SOCK_DGRAM": "int:2",
+ "SOCK_NONBLOCK": "int:2048",
+ "SOCK_PACKET": "int:10",
+ "SOCK_RAW": "int:3",
+ "SOCK_RDM": "int:4",
+ "SOCK_SEQPACKET": "int:5",
+ "SOCK_STREAM": "int:1",
+ "SOL_AAL": "int:265",
+ "SOL_ALG": "int:279",
+ "SOL_ATM": "int:264",
+ "SOL_BLUETOOTH": "int:274",
+ "SOL_CAIF": "int:278",
+ "SOL_DCCP": "int:269",
+ "SOL_DECNET": "int:261",
+ "SOL_ICMPV6": "int:58",
+ "SOL_IP": "int:0",
+ "SOL_IPV6": "int:41",
+ "SOL_IRDA": "int:266",
+ "SOL_IUCV": "int:277",
+ "SOL_KCM": "int:281",
+ "SOL_LLC": "int:268",
+ "SOL_NETBEUI": "int:267",
+ "SOL_NETLINK": "int:270",
+ "SOL_NFC": "int:280",
+ "SOL_PACKET": "int:263",
+ "SOL_PNPIPE": "int:275",
+ "SOL_PPPOL2TP": "int:273",
+ "SOL_RAW": "int:255",
+ "SOL_RDS": "int:276",
+ "SOL_RXRPC": "int:272",
+ "SOL_SOCKET": "int:1",
+ "SOL_TCP": "int:6",
+ "SOL_TIPC": "int:271",
+ "SOL_TLS": "int:282",
+ "SOL_X25": "int:262",
+ "SOMAXCONN": "int:128",
+ "SO_ACCEPTCONN": "int:30",
+ "SO_ATTACH_BPF": "int:50",
+ "SO_ATTACH_FILTER": "int:26",
+ "SO_ATTACH_REUSEPORT_CBPF": "int:51",
+ "SO_ATTACH_REUSEPORT_EBPF": "int:52",
+ "SO_BINDTODEVICE": "int:25",
+ "SO_BPF_EXTENSIONS": "int:48",
+ "SO_BROADCAST": "int:6",
+ "SO_BSDCOMPAT": "int:14",
+ "SO_BUSY_POLL": "int:46",
+ "SO_CNX_ADVICE": "int:53",
+ "SO_COOKIE": "int:57",
+ "SO_DEBUG": "int:1",
+ "SO_DETACH_BPF": "int:27",
+ "SO_DETACH_FILTER": "int:27",
+ "SO_DOMAIN": "int:39",
+ "SO_DONTROUTE": "int:5",
+ "SO_ERROR": "int:4",
+ "SO_GET_FILTER": "int:26",
+ "SO_INCOMING_CPU": "int:49",
+ "SO_INCOMING_NAPI_ID": "int:56",
+ "SO_KEEPALIVE": "int:9",
+ "SO_LINGER": "int:13",
+ "SO_LOCK_FILTER": "int:44",
+ "SO_MARK": "int:36",
+ "SO_MAX_PACING_RATE": "int:47",
+ "SO_MEMINFO": "int:55",
+ "SO_NOFCS": "int:43",
+ "SO_NO_CHECK": "int:11",
+ "SO_OOBINLINE": "int:10",
+ "SO_PASSCRED": "int:16",
+ "SO_PASSSEC": "int:34",
+ "SO_PEEK_OFF": "int:42",
+ "SO_PEERCRED": "int:17",
+ "SO_PEERGROUPS": "int:59",
+ "SO_PEERNAME": "int:28",
+ "SO_PEERSEC": "int:31",
+ "SO_PRIORITY": "int:12",
+ "SO_PROTOCOL": "int:38",
+ "SO_RCVBUF": "int:8",
+ "SO_RCVBUFFORCE": "int:33",
+ "SO_RCVLOWAT": "int:18",
+ "SO_RCVTIMEO": "int:20",
+ "SO_REUSEADDR": "int:2",
+ "SO_REUSEPORT": "int:15",
+ "SO_RXQ_OVFL": "int:40",
+ "SO_SECURITY_AUTHENTICATION": "int:22",
+ "SO_SECURITY_ENCRYPTION_NETWORK": "int:24",
+ "SO_SECURITY_ENCRYPTION_TRANSPORT": "int:23",
+ "SO_SELECT_ERR_QUEUE": "int:45",
+ "SO_SNDBUF": "int:7",
+ "SO_SNDBUFFORCE": "int:32",
+ "SO_SNDLOWAT": "int:19",
+ "SO_SNDTIMEO": "int:21",
+ "SO_TIMESTAMP": "int:29",
+ "SO_TIMESTAMPING": "int:37",
+ "SO_TIMESTAMPNS": "int:35",
+ "SO_TYPE": "int:3",
+ "SO_WIFI_STATUS": "int:41",
+ "SO_ZEROCOPY": "int:60",
+ "SYS_ACCEPT": "int:202",
+ "SYS_ACCEPT4": "int:242",
+ "SYS_ACCT": "int:89",
+ "SYS_ADD_KEY": "int:217",
+ "SYS_ADJTIMEX": "int:171",
+ "SYS_BIND": "int:200",
+ "SYS_BPF": "int:280",
+ "SYS_BRK": "int:214",
+ "SYS_CAPGET": "int:90",
+ "SYS_CAPSET": "int:91",
+ "SYS_CHDIR": "int:49",
+ "SYS_CHROOT": "int:51",
+ "SYS_CLOCK_ADJTIME": "int:266",
+ "SYS_CLOCK_GETRES": "int:114",
+ "SYS_CLOCK_GETTIME": "int:113",
+ "SYS_CLOCK_NANOSLEEP": "int:115",
+ "SYS_CLOCK_SETTIME": "int:112",
+ "SYS_CLONE": "int:220",
+ "SYS_CLOSE": "int:57",
+ "SYS_CONNECT": "int:203",
+ "SYS_COPY_FILE_RANGE": "int:285",
+ "SYS_DELETE_MODULE": "int:106",
+ "SYS_DUP": "int:23",
+ "SYS_DUP3": "int:24",
+ "SYS_EPOLL_CREATE1": "int:20",
+ "SYS_EPOLL_CTL": "int:21",
+ "SYS_EPOLL_PWAIT": "int:22",
+ "SYS_EVENTFD2": "int:19",
+ "SYS_EXECVE": "int:221",
+ "SYS_EXECVEAT": "int:281",
+ "SYS_EXIT": "int:93",
+ "SYS_EXIT_GROUP": "int:94",
+ "SYS_FACCESSAT": "int:48",
+ "SYS_FADVISE64": "int:223",
+ "SYS_FALLOCATE": "int:47",
+ "SYS_FANOTIFY_INIT": "int:262",
+ "SYS_FANOTIFY_MARK": "int:263",
+ "SYS_FCHDIR": "int:50",
+ "SYS_FCHMOD": "int:52",
+ "SYS_FCHMODAT": "int:53",
+ "SYS_FCHOWN": "int:55",
+ "SYS_FCHOWNAT": "int:54",
+ "SYS_FCNTL": "int:25",
+ "SYS_FDATASYNC": "int:83",
+ "SYS_FGETXATTR": "int:10",
+ "SYS_FINIT_MODULE": "int:273",
+ "SYS_FLISTXATTR": "int:13",
+ "SYS_FLOCK": "int:32",
+ "SYS_FREMOVEXATTR": "int:16",
+ "SYS_FSETXATTR": "int:7",
+ "SYS_FSTAT": "int:80",
+ "SYS_FSTATFS": "int:44",
+ "SYS_FSYNC": "int:82",
+ "SYS_FTRUNCATE": "int:46",
+ "SYS_FUTEX": "int:98",
+ "SYS_GETCPU": "int:168",
+ "SYS_GETCWD": "int:17",
+ "SYS_GETDENTS": "int:0",
+ "SYS_GETDENTS64": "int:61",
+ "SYS_GETEGID": "int:177",
+ "SYS_GETEUID": "int:175",
+ "SYS_GETGID": "int:176",
+ "SYS_GETGROUPS": "int:158",
+ "SYS_GETITIMER": "int:102",
+ "SYS_GETPEERNAME": "int:205",
+ "SYS_GETPGID": "int:155",
+ "SYS_GETPID": "int:172",
+ "SYS_GETPPID": "int:173",
+ "SYS_GETPRIORITY": "int:141",
+ "SYS_GETRANDOM": "int:278",
+ "SYS_GETRESGID": "int:150",
+ "SYS_GETRESUID": "int:148",
+ "SYS_GETRLIMIT": "int:163",
+ "SYS_GETRUSAGE": "int:165",
+ "SYS_GETSID": "int:156",
+ "SYS_GETSOCKNAME": "int:204",
+ "SYS_GETSOCKOPT": "int:209",
+ "SYS_GETTID": "int:178",
+ "SYS_GETTIMEOFDAY": "int:169",
+ "SYS_GETUID": "int:174",
+ "SYS_GETXATTR": "int:8",
+ "SYS_GET_MEMPOLICY": "int:236",
+ "SYS_GET_ROBUST_LIST": "int:100",
+ "SYS_INIT_MODULE": "int:105",
+ "SYS_INOTIFY_ADD_WATCH": "int:27",
+ "SYS_INOTIFY_INIT1": "int:26",
+ "SYS_INOTIFY_RM_WATCH": "int:28",
+ "SYS_IOCTL": "int:29",
+ "SYS_IOPRIO_GET": "int:31",
+ "SYS_IOPRIO_SET": "int:30",
+ "SYS_IO_CANCEL": "int:3",
+ "SYS_IO_DESTROY": "int:1",
+ "SYS_IO_GETEVENTS": "int:4",
+ "SYS_IO_SETUP": "int:0",
+ "SYS_IO_SUBMIT": "int:2",
+ "SYS_KCMP": "int:272",
+ "SYS_KEXEC_LOAD": "int:104",
+ "SYS_KEYCTL": "int:219",
+ "SYS_KILL": "int:129",
+ "SYS_LGETXATTR": "int:9",
+ "SYS_LINKAT": "int:37",
+ "SYS_LISTEN": "int:201",
+ "SYS_LISTXATTR": "int:11",
+ "SYS_LLISTXATTR": "int:12",
+ "SYS_LOOKUP_DCOOKIE": "int:18",
+ "SYS_LREMOVEXATTR": "int:15",
+ "SYS_LSEEK": "int:62",
+ "SYS_LSETXATTR": "int:6",
+ "SYS_MADVISE": "int:233",
+ "SYS_MBIND": "int:235",
+ "SYS_MEMBARRIER": "int:283",
+ "SYS_MEMFD_CREATE": "int:279",
+ "SYS_MIGRATE_PAGES": "int:238",
+ "SYS_MINCORE": "int:232",
+ "SYS_MKDIRAT": "int:34",
+ "SYS_MKNODAT": "int:33",
+ "SYS_MLOCK": "int:228",
+ "SYS_MLOCK2": "int:284",
+ "SYS_MLOCKALL": "int:230",
+ "SYS_MMAP": "int:222",
+ "SYS_MOUNT": "int:40",
+ "SYS_MOVE_PAGES": "int:239",
+ "SYS_MPROTECT": "int:226",
+ "SYS_MQ_GETSETATTR": "int:185",
+ "SYS_MQ_NOTIFY": "int:184",
+ "SYS_MQ_OPEN": "int:180",
+ "SYS_MQ_TIMEDRECEIVE": "int:183",
+ "SYS_MQ_TIMEDSEND": "int:182",
+ "SYS_MQ_UNLINK": "int:181",
+ "SYS_MREMAP": "int:216",
+ "SYS_MSGCTL": "int:187",
+ "SYS_MSGGET": "int:186",
+ "SYS_MSGRCV": "int:188",
+ "SYS_MSGSND": "int:189",
+ "SYS_MSYNC": "int:227",
+ "SYS_MUNLOCK": "int:229",
+ "SYS_MUNLOCKALL": "int:231",
+ "SYS_MUNMAP": "int:215",
+ "SYS_NAME_TO_HANDLE_AT": "int:264",
+ "SYS_NANOSLEEP": "int:101",
+ "SYS_NEWFSTATAT": "int:79",
+ "SYS_NFSSERVCTL": "int:42",
+ "SYS_NMLN": "int:65",
+ "SYS_OPENAT": "int:56",
+ "SYS_OPEN_BY_HANDLE_AT": "int:265",
+ "SYS_PERF_EVENT_OPEN": "int:241",
+ "SYS_PERSONALITY": "int:92",
+ "SYS_PIPE2": "int:59",
+ "SYS_PIVOT_ROOT": "int:41",
+ "SYS_PKEY_ALLOC": "int:289",
+ "SYS_PKEY_FREE": "int:290",
+ "SYS_PKEY_MPROTECT": "int:288",
+ "SYS_PPOLL": "int:73",
+ "SYS_PRCTL": "int:167",
+ "SYS_PREAD64": "int:67",
+ "SYS_PREADV": "int:69",
+ "SYS_PREADV2": "int:286",
+ "SYS_PRLIMIT64": "int:261",
+ "SYS_PROCESS_VM_READV": "int:270",
+ "SYS_PROCESS_VM_WRITEV": "int:271",
+ "SYS_PSELECT6": "int:72",
+ "SYS_PTRACE": "int:117",
+ "SYS_PWRITE64": "int:68",
+ "SYS_PWRITEV": "int:70",
+ "SYS_PWRITEV2": "int:287",
+ "SYS_QUOTACTL": "int:60",
+ "SYS_READ": "int:63",
+ "SYS_READAHEAD": "int:213",
+ "SYS_READLINKAT": "int:78",
+ "SYS_READV": "int:65",
+ "SYS_REBOOT": "int:142",
+ "SYS_RECVFROM": "int:207",
+ "SYS_RECVMMSG": "int:243",
+ "SYS_RECVMSG": "int:212",
+ "SYS_REMAP_FILE_PAGES": "int:234",
+ "SYS_REMOVEXATTR": "int:14",
+ "SYS_RENAMEAT": "int:38",
+ "SYS_RENAMEAT2": "int:276",
+ "SYS_REQUEST_KEY": "int:218",
+ "SYS_RESTART_SYSCALL": "int:128",
+ "SYS_RT_SIGACTION": "int:134",
+ "SYS_RT_SIGPENDING": "int:136",
+ "SYS_RT_SIGPROCMASK": "int:135",
+ "SYS_RT_SIGQUEUEINFO": "int:138",
+ "SYS_RT_SIGRETURN": "int:139",
+ "SYS_RT_SIGSUSPEND": "int:133",
+ "SYS_RT_SIGTIMEDWAIT": "int:137",
+ "SYS_RT_TGSIGQUEUEINFO": "int:240",
+ "SYS_SCHED_GETAFFINITY": "int:123",
+ "SYS_SCHED_GETATTR": "int:275",
+ "SYS_SCHED_GETPARAM": "int:121",
+ "SYS_SCHED_GETSCHEDULER": "int:120",
+ "SYS_SCHED_GET_PRIORITY_MAX": "int:125",
+ "SYS_SCHED_GET_PRIORITY_MIN": "int:126",
+ "SYS_SCHED_RR_GET_INTERVAL": "int:127",
+ "SYS_SCHED_SETAFFINITY": "int:122",
+ "SYS_SCHED_SETATTR": "int:274",
+ "SYS_SCHED_SETPARAM": "int:118",
+ "SYS_SCHED_SETSCHEDULER": "int:119",
+ "SYS_SCHED_YIELD": "int:124",
+ "SYS_SECCOMP": "int:277",
+ "SYS_SEMCTL": "int:191",
+ "SYS_SEMGET": "int:190",
+ "SYS_SEMOP": "int:193",
+ "SYS_SEMTIMEDOP": "int:192",
+ "SYS_SENDFILE": "int:71",
+ "SYS_SENDMMSG": "int:269",
+ "SYS_SENDMSG": "int:211",
+ "SYS_SENDTO": "int:206",
+ "SYS_SETDOMAINNAME": "int:162",
+ "SYS_SETFSGID": "int:152",
+ "SYS_SETFSUID": "int:151",
+ "SYS_SETGID": "int:144",
+ "SYS_SETGROUPS": "int:159",
+ "SYS_SETHOSTNAME": "int:161",
+ "SYS_SETITIMER": "int:103",
+ "SYS_SETNS": "int:268",
+ "SYS_SETPGID": "int:154",
+ "SYS_SETPRIORITY": "int:140",
+ "SYS_SETREGID": "int:143",
+ "SYS_SETRESGID": "int:149",
+ "SYS_SETRESUID": "int:147",
+ "SYS_SETREUID": "int:145",
+ "SYS_SETRLIMIT": "int:164",
+ "SYS_SETSID": "int:157",
+ "SYS_SETSOCKOPT": "int:208",
+ "SYS_SETTIMEOFDAY": "int:170",
+ "SYS_SETUID": "int:146",
+ "SYS_SETXATTR": "int:5",
+ "SYS_SET_MEMPOLICY": "int:237",
+ "SYS_SET_ROBUST_LIST": "int:99",
+ "SYS_SET_TID_ADDRESS": "int:96",
+ "SYS_SHMAT": "int:196",
+ "SYS_SHMCTL": "int:195",
+ "SYS_SHMDT": "int:197",
+ "SYS_SHMGET": "int:194",
+ "SYS_SHUTDOWN": "int:210",
+ "SYS_SIGALTSTACK": "int:132",
+ "SYS_SIGNALFD4": "int:74",
+ "SYS_SOCKET": "int:198",
+ "SYS_SOCKETPAIR": "int:199",
+ "SYS_SPLICE": "int:76",
+ "SYS_STATFS": "int:43",
+ "SYS_STATX": "int:291",
+ "SYS_SWAPOFF": "int:225",
+ "SYS_SWAPON": "int:224",
+ "SYS_SYMLINKAT": "int:36",
+ "SYS_SYNC": "int:81",
+ "SYS_SYNCFS": "int:267",
+ "SYS_SYNC_FILE_RANGE": "int:84",
+ "SYS_SYSINFO": "int:179",
+ "SYS_SYSLOG": "int:116",
+ "SYS_TEE": "int:77",
+ "SYS_TGKILL": "int:131",
+ "SYS_TIMERFD_CREATE": "int:85",
+ "SYS_TIMERFD_GETTIME": "int:87",
+ "SYS_TIMERFD_SETTIME": "int:86",
+ "SYS_TIMER_CREATE": "int:107",
+ "SYS_TIMER_DELETE": "int:111",
+ "SYS_TIMER_GETOVERRUN": "int:109",
+ "SYS_TIMER_GETTIME": "int:108",
+ "SYS_TIMER_SETTIME": "int:110",
+ "SYS_TIMES": "int:153",
+ "SYS_TKILL": "int:130",
+ "SYS_TRUNCATE": "int:45",
+ "SYS_UMASK": "int:166",
+ "SYS_UMOUNT2": "int:39",
+ "SYS_UNAME": "int:160",
+ "SYS_UNLINKAT": "int:35",
+ "SYS_UNSHARE": "int:97",
+ "SYS_USERFAULTFD": "int:282",
+ "SYS_UTIMENSAT": "int:88",
+ "SYS_VHANGUP": "int:58",
+ "SYS_VMSPLICE": "int:75",
+ "SYS_WAIT4": "int:260",
+ "SYS_WAITID": "int:95",
+ "SYS_WRITE": "int:64",
+ "SYS_WRITEV": "int:66",
+ "S_BLKSIZE": "int:512",
+ "S_IEXEC": "int:64",
+ "S_IFBLK": "int:24576",
+ "S_IFCHR": "int:8192",
+ "S_IFDIR": "int:16384",
+ "S_IFIFO": "int:4096",
+ "S_IFLNK": "int:40960",
+ "S_IFMT": "int:61440",
+ "S_IFREG": "int:32768",
+ "S_IFSOCK": "int:49152",
+ "S_IREAD": "int:256",
+ "S_IRGRP": "int:32",
+ "S_IROTH": "int:4",
+ "S_IRUSR": "int:256",
+ "S_IRWXG": "int:56",
+ "S_IRWXO": "int:7",
+ "S_IRWXU": "int:448",
+ "S_ISGID": "int:1024",
+ "S_ISUID": "int:2048",
+ "S_ISVTX": "int:512",
+ "S_IWGRP": "int:16",
+ "S_IWOTH": "int:2",
+ "S_IWRITE": "int:128",
+ "S_IWUSR": "int:128",
+ "S_IXGRP": "int:8",
+ "S_IXOTH": "int:1",
+ "S_IXUSR": "int:64",
+ "SizeofCmsghdr": "int:16",
+ "SizeofICMPv6Filter": "int:32",
+ "SizeofIPMreq": "int:8",
+ "SizeofIPMreqn": "int:12",
+ "SizeofIPv6MTUInfo": "int:32",
+ "SizeofIPv6Mreq": "int:20",
+ "SizeofIfAddrmsg": "int:8",
+ "SizeofIfInfomsg": "int:16",
+ "SizeofInet4Pktinfo": "int:12",
+ "SizeofInet6Pktinfo": "int:20",
+ "SizeofInotifyEvent": "int:16",
+ "SizeofLinger": "int:8",
+ "SizeofMsghdr": "int:56",
+ "SizeofNlAttr": "int:4",
+ "SizeofNlMsgerr": "int:20",
+ "SizeofNlMsghdr": "int:16",
+ "SizeofRtAttr": "int:4",
+ "SizeofRtGenmsg": "int:1",
+ "SizeofRtMsg": "int:12",
+ "SizeofRtNexthop": "int:8",
+ "SizeofSockFilter": "int:8",
+ "SizeofSockFprog": "int:16",
+ "SizeofSockaddrAny": "int:108",
+ "SizeofSockaddrInet4": "int:16",
+ "SizeofSockaddrInet6": "int:28",
+ "SizeofSockaddrLinklayer": "int:20",
+ "SizeofSockaddrNetlink": "int:12",
+ "SizeofSockaddrUnix": "int:110",
+ "SizeofUcred": "int:12",
+ "TABDLY": "int:6144",
+ "TCGETA": "int:21509",
+ "TCGETS": "int:21505",
+ "TCGETX": "int:21554",
+ "TCIFLUSH": "int:0",
+ "TCIOFF": "int:2",
+ "TCIOFLUSH": "int:2",
+ "TCION": "int:3",
+ "TCOFLUSH": "int:1",
+ "TCOOFF": "int:0",
+ "TCOON": "int:1",
+ "TCP_CA_CWR": "int:2",
+ "TCP_CA_Disorder": "int:1",
+ "TCP_CA_Loss": "int:4",
+ "TCP_CA_Open": "int:0",
+ "TCP_CA_Recovery": "int:3",
+ "TCP_CC_INFO": "int:26",
+ "TCP_CLOSE": "int:7",
+ "TCP_CLOSE_WAIT": "int:8",
+ "TCP_CLOSING": "int:11",
+ "TCP_CONGESTION": "int:13",
+ "TCP_COOKIE_IN_ALWAYS": "int:1",
+ "TCP_COOKIE_MAX": "int:16",
+ "TCP_COOKIE_MIN": "int:8",
+ "TCP_COOKIE_OUT_NEVER": "int:2",
+ "TCP_COOKIE_PAIR_SIZE": "int:32",
+ "TCP_COOKIE_TRANSACTIONS": "int:15",
+ "TCP_CORK": "int:3",
+ "TCP_DEFER_ACCEPT": "int:9",
+ "TCP_ESTABLISHED": "int:1",
+ "TCP_FASTOPEN": "int:23",
+ "TCP_FASTOPEN_CONNECT": "int:30",
+ "TCP_FIN_WAIT1": "int:4",
+ "TCP_FIN_WAIT2": "int:5",
+ "TCP_INFO": "int:11",
+ "TCP_KEEPCNT": "int:6",
+ "TCP_KEEPIDLE": "int:4",
+ "TCP_KEEPINTVL": "int:5",
+ "TCP_LAST_ACK": "int:9",
+ "TCP_LINGER2": "int:8",
+ "TCP_LISTEN": "int:10",
+ "TCP_MAXSEG": "int:2",
+ "TCP_MAXWIN": "int:65535",
+ "TCP_MAX_WINSHIFT": "int:14",
+ "TCP_MD5SIG": "int:14",
+ "TCP_MD5SIG_EXT": "int:32",
+ "TCP_MD5SIG_FLAG_PREFIX": "int:1",
+ "TCP_MD5SIG_MAXKEYLEN": "int:80",
+ "TCP_MSS": "int:512",
+ "TCP_MSS_DEFAULT": "int:536",
+ "TCP_MSS_DESIRED": "int:1220",
+ "TCP_NODELAY": "int:1",
+ "TCP_NOTSENT_LOWAT": "int:25",
+ "TCP_NO_QUEUE": "int:0",
+ "TCP_QUEUES_NR": "int:3",
+ "TCP_QUEUE_SEQ": "int:21",
+ "TCP_QUICKACK": "int:12",
+ "TCP_RECV_QUEUE": "int:1",
+ "TCP_REPAIR": "int:19",
+ "TCP_REPAIR_OPTIONS": "int:22",
+ "TCP_REPAIR_QUEUE": "int:20",
+ "TCP_REPAIR_WINDOW": "int:29",
+ "TCP_SAVED_SYN": "int:28",
+ "TCP_SAVE_SYN": "int:27",
+ "TCP_SEND_QUEUE": "int:2",
+ "TCP_SYNCNT": "int:7",
+ "TCP_SYN_RECV": "int:3",
+ "TCP_SYN_SENT": "int:2",
+ "TCP_S_DATA_IN": "int:4",
+ "TCP_S_DATA_OUT": "int:8",
+ "TCP_THIN_DUPACK": "int:17",
+ "TCP_THIN_LINEAR_TIMEOUTS": "int:16",
+ "TCP_TIMESTAMP": "int:24",
+ "TCP_TIME_WAIT": "int:6",
+ "TCP_ULP": "int:31",
+ "TCP_USER_TIMEOUT": "int:18",
+ "TCP_WINDOW_CLAMP": "int:10",
+ "TCSADRAIN": "int:1",
+ "TCSAFLUSH": "int:2",
+ "TCSANOW": "int:0",
+ "TCSETA": "int:21510",
+ "TCSETAF": "int:21512",
+ "TCSETAW": "int:21511",
+ "TCSETS": "int:21506",
+ "TCSETSF": "int:21508",
+ "TCSETSW": "int:21507",
+ "TCSETX": "int:21555",
+ "TCSETXF": "int:21556",
+ "TCSETXW": "int:21557",
+ "TIOCCBRK": "int:21544",
+ "TIOCCONS": "int:21533",
+ "TIOCEXCL": "int:21516",
+ "TIOCGDEV": "int:2147767346",
+ "TIOCGETD": "int:21540",
+ "TIOCGICOUNT": "int:21597",
+ "TIOCGLCKTRMIOS": "int:21590",
+ "TIOCGPGRP": "int:21519",
+ "TIOCGPTN": "int:2147767344",
+ "TIOCGRS485": "int:21550",
+ "TIOCGSERIAL": "int:21534",
+ "TIOCGSID": "int:21545",
+ "TIOCGSOFTCAR": "int:21529",
+ "TIOCGWINSZ": "int:21523",
+ "TIOCINQ": "int:21531",
+ "TIOCLINUX": "int:21532",
+ "TIOCMBIC": "int:21527",
+ "TIOCMBIS": "int:21526",
+ "TIOCMGET": "int:21525",
+ "TIOCMIWAIT": "int:21596",
+ "TIOCMSET": "int:21528",
+ "TIOCM_CAR": "int:64",
+ "TIOCM_CD": "int:64",
+ "TIOCM_CTS": "int:32",
+ "TIOCM_DSR": "int:256",
+ "TIOCM_DTR": "int:2",
+ "TIOCM_LE": "int:1",
+ "TIOCM_RI": "int:128",
+ "TIOCM_RNG": "int:128",
+ "TIOCM_RTS": "int:4",
+ "TIOCM_SR": "int:16",
+ "TIOCM_ST": "int:8",
+ "TIOCNOTTY": "int:21538",
+ "TIOCNXCL": "int:21517",
+ "TIOCOUTQ": "int:21521",
+ "TIOCPKT": "int:21536",
+ "TIOCPKT_DATA": "int:0",
+ "TIOCPKT_DOSTOP": "int:32",
+ "TIOCPKT_FLUSHREAD": "int:1",
+ "TIOCPKT_FLUSHWRITE": "int:2",
+ "TIOCPKT_IOCTL": "int:64",
+ "TIOCPKT_NOSTOP": "int:16",
+ "TIOCPKT_START": "int:8",
+ "TIOCPKT_STOP": "int:4",
+ "TIOCSBRK": "int:21543",
+ "TIOCSCTTY": "int:21518",
+ "TIOCSERCONFIG": "int:21587",
+ "TIOCSERGETLSR": "int:21593",
+ "TIOCSERGETMULTI": "int:21594",
+ "TIOCSERGSTRUCT": "int:21592",
+ "TIOCSERGWILD": "int:21588",
+ "TIOCSERSETMULTI": "int:21595",
+ "TIOCSERSWILD": "int:21589",
+ "TIOCSER_TEMT": "int:1",
+ "TIOCSETD": "int:21539",
+ "TIOCSIG": "int:1074025526",
+ "TIOCSLCKTRMIOS": "int:21591",
+ "TIOCSPGRP": "int:21520",
+ "TIOCSPTLCK": "int:1074025521",
+ "TIOCSRS485": "int:21551",
+ "TIOCSSERIAL": "int:21535",
+ "TIOCSSOFTCAR": "int:21530",
+ "TIOCSTI": "int:21522",
+ "TIOCSWINSZ": "int:21524",
+ "TIOCVHANGUP": "int:21559",
+ "TOSTOP": "int:256",
+ "TUNATTACHFILTER": "int:1074812117",
+ "TUNDETACHFILTER": "int:1074812118",
+ "TUNGETFEATURES": "int:2147767503",
+ "TUNGETFILTER": "int:2148553947",
+ "TUNGETIFF": "int:2147767506",
+ "TUNGETSNDBUF": "int:2147767507",
+ "TUNGETVNETHDRSZ": "int:2147767511",
+ "TUNSETDEBUG": "int:1074025673",
+ "TUNSETGROUP": "int:1074025678",
+ "TUNSETIFF": "int:1074025674",
+ "TUNSETIFINDEX": "int:1074025690",
+ "TUNSETLINK": "int:1074025677",
+ "TUNSETNOCSUM": "int:1074025672",
+ "TUNSETOFFLOAD": "int:1074025680",
+ "TUNSETOWNER": "int:1074025676",
+ "TUNSETPERSIST": "int:1074025675",
+ "TUNSETQUEUE": "int:1074025689",
+ "TUNSETSNDBUF": "int:1074025684",
+ "TUNSETTXFILTER": "int:1074025681",
+ "TUNSETVNETHDRSZ": "int:1074025688",
+ "VDISCARD": "int:13",
+ "VEOF": "int:4",
+ "VEOL": "int:11",
+ "VEOL2": "int:16",
+ "VERASE": "int:2",
+ "VINTR": "int:0",
+ "VKILL": "int:3",
+ "VLNEXT": "int:15",
+ "VMIN": "int:6",
+ "VQUIT": "int:1",
+ "VREPRINT": "int:12",
+ "VSTART": "int:8",
+ "VSTOP": "int:9",
+ "VSUSP": "int:10",
+ "VTDLY": "int:16384",
+ "VTIME": "int:5",
+ "VWERASE": "int:14",
+ "WAIT_ANY": "int:-1",
+ "WAIT_MYPGRP": "int:0",
+ "WALL": "int:1073741824",
+ "WCHAR_MAX": "int:4294967295",
+ "WCHAR_MIN": "int:0",
+ "WCHAR_WIDTH": "int:32",
+ "WCONTINUED": "int:8",
+ "WCOREFLAG": "int:128",
+ "WEXITED": "int:4",
+ "WINT_MAX": "int:4294967295",
+ "WINT_MIN": "int:0",
+ "WINT_WIDTH": "int:32",
+ "WNOHANG": "int:1",
+ "WNOWAIT": "int:16777216",
+ "WORD_BIT": "int:32",
+ "WSTOPPED": "int:2",
+ "WUNTRACED": "int:2",
+ "W_OK": "int:2",
+ "XCASE": "int:4",
+ },
+ }
+}
+
+// --------------- proxy for syscall.Conn ---------------
+type P_syscall_Conn struct {
+ Object interface{}
+ SyscallConn_ func(interface{}) (syscall.RawConn, error)
+}
+func (P *P_syscall_Conn) SyscallConn() (syscall.RawConn, error) {
+ return P.SyscallConn_(P.Object)
+}
+
+// --------------- proxy for syscall.RawConn ---------------
+type P_syscall_RawConn struct {
+ Object interface{}
+ Control_ func(_proxy_obj_ interface{}, f func(fd uintptr)) error
+ Read_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+ Write_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+}
+func (P *P_syscall_RawConn) Control(f func(fd uintptr)) error {
+ return P.Control_(P.Object, f)
+}
+func (P *P_syscall_RawConn) Read(f func(fd uintptr) (done bool)) error {
+ return P.Read_(P.Object, f)
+}
+func (P *P_syscall_RawConn) Write(f func(fd uintptr) (done bool)) error {
+ return P.Write_(P.Object, f)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_darwin_386.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_darwin_386.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_darwin_386.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_darwin_386.go
index 4e316cd..4df5ed4 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_darwin_386.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_darwin_386.go
@@ -1,15 +1,16 @@
-// +build !gccgo
+// +build gc
-// this file was generated by gomacro command: import "syscall"
+// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
"syscall"
)
+// reflection: allow interpreted code to import "syscall"
func init() {
Packages["syscall"] = Package{
Binds: map[string]Value{
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_darwin_amd64.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_darwin_amd64.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_darwin_amd64.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_darwin_amd64.go
index 9e418e0..2b7f143 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_darwin_amd64.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_darwin_amd64.go
@@ -1,15 +1,16 @@
-// +build !gccgo
+// +build gc
-// this file was generated by gomacro command: import "syscall"
+// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
"syscall"
)
+// reflection: allow interpreted code to import "syscall"
func init() {
Packages["syscall"] = Package{
Binds: map[string]Value{
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_freebsd_386.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_freebsd_386.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_freebsd_386.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_freebsd_386.go
index 275f315..48f3457 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_freebsd_386.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_freebsd_386.go
@@ -1,9 +1,9 @@
-// +build !gccgo
+// +build gc
// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_freebsd_amd64.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_freebsd_amd64.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_freebsd_amd64.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_freebsd_amd64.go
index a66c112..33593ec 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_freebsd_amd64.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_freebsd_amd64.go
@@ -1,9 +1,9 @@
-// +build !gccgo
+// +build gc
// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_386.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_386.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_linux_386.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_386.go
index 4fd6da8..b8d05bb 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_386.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_386.go
@@ -1,9 +1,9 @@
-// +build !gccgo
+// +build gc
// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
@@ -2154,8 +2154,9 @@ func init() {
"Wait4": ValueOf(syscall.Wait4),
"Write": ValueOf(syscall.Write),
"XCASE": ValueOf(syscall.XCASE),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Cmsghdr": TypeOf((*syscall.Cmsghdr)(nil)).Elem(),
+ "Conn": TypeOf((*syscall.Conn)(nil)).Elem(),
"Credential": TypeOf((*syscall.Credential)(nil)).Elem(),
"Dirent": TypeOf((*syscall.Dirent)(nil)).Elem(),
"EpollEvent": TypeOf((*syscall.EpollEvent)(nil)).Elem(),
@@ -2184,6 +2185,7 @@ func init() {
"NlMsghdr": TypeOf((*syscall.NlMsghdr)(nil)).Elem(),
"ProcAttr": TypeOf((*syscall.ProcAttr)(nil)).Elem(),
"PtraceRegs": TypeOf((*syscall.PtraceRegs)(nil)).Elem(),
+ "RawConn": TypeOf((*syscall.RawConn)(nil)).Elem(),
"RawSockaddr": TypeOf((*syscall.RawSockaddr)(nil)).Elem(),
"RawSockaddrAny": TypeOf((*syscall.RawSockaddrAny)(nil)).Elem(),
"RawSockaddrInet4": TypeOf((*syscall.RawSockaddrInet4)(nil)).Elem(),
@@ -2224,7 +2226,10 @@ func init() {
"Utimbuf": TypeOf((*syscall.Utimbuf)(nil)).Elem(),
"Utsname": TypeOf((*syscall.Utsname)(nil)).Elem(),
"WaitStatus": TypeOf((*syscall.WaitStatus)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Conn": TypeOf((*Conn_syscall)(nil)).Elem(),
+ "RawConn": TypeOf((*RawConn_syscall)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"AF_ALG": "int:38",
"AF_APPLETALK": "int:5",
"AF_ASH": "int:18",
@@ -3965,6 +3970,32 @@ func init() {
"WSTOPPED": "int:2",
"WUNTRACED": "int:2",
"XCASE": "int:4",
- },
+ },
}
}
+
+// --------------- proxy for syscall.Conn ---------------
+type Conn_syscall struct {
+ Object interface{}
+ SyscallConn_ func(interface{}) (syscall.RawConn, error)
+}
+func (Proxy *Conn_syscall) SyscallConn() (syscall.RawConn, error) {
+ return Proxy.SyscallConn_(Proxy.Object)
+}
+
+// --------------- proxy for syscall.RawConn ---------------
+type RawConn_syscall struct {
+ Object interface{}
+ Control_ func(_proxy_obj_ interface{}, f func(fd uintptr)) error
+ Read_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+ Write_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+}
+func (Proxy *RawConn_syscall) Control(f func(fd uintptr)) error {
+ return Proxy.Control_(Proxy.Object, f)
+}
+func (Proxy *RawConn_syscall) Read(f func(fd uintptr) (done bool)) error {
+ return Proxy.Read_(Proxy.Object, f)
+}
+func (Proxy *RawConn_syscall) Write(f func(fd uintptr) (done bool)) error {
+ return Proxy.Write_(Proxy.Object, f)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_amd64.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_amd64.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_linux_amd64.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_amd64.go
index d3a6f88..945edd0 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_amd64.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_amd64.go
@@ -1,9 +1,9 @@
-// +build !gccgo
+// +build gc
// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
@@ -2120,8 +2120,9 @@ func init() {
"Wait4": ValueOf(syscall.Wait4),
"Write": ValueOf(syscall.Write),
"XCASE": ValueOf(syscall.XCASE),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Cmsghdr": TypeOf((*syscall.Cmsghdr)(nil)).Elem(),
+ "Conn": TypeOf((*syscall.Conn)(nil)).Elem(),
"Credential": TypeOf((*syscall.Credential)(nil)).Elem(),
"Dirent": TypeOf((*syscall.Dirent)(nil)).Elem(),
"EpollEvent": TypeOf((*syscall.EpollEvent)(nil)).Elem(),
@@ -2150,6 +2151,7 @@ func init() {
"NlMsghdr": TypeOf((*syscall.NlMsghdr)(nil)).Elem(),
"ProcAttr": TypeOf((*syscall.ProcAttr)(nil)).Elem(),
"PtraceRegs": TypeOf((*syscall.PtraceRegs)(nil)).Elem(),
+ "RawConn": TypeOf((*syscall.RawConn)(nil)).Elem(),
"RawSockaddr": TypeOf((*syscall.RawSockaddr)(nil)).Elem(),
"RawSockaddrAny": TypeOf((*syscall.RawSockaddrAny)(nil)).Elem(),
"RawSockaddrInet4": TypeOf((*syscall.RawSockaddrInet4)(nil)).Elem(),
@@ -2190,7 +2192,10 @@ func init() {
"Utimbuf": TypeOf((*syscall.Utimbuf)(nil)).Elem(),
"Utsname": TypeOf((*syscall.Utsname)(nil)).Elem(),
"WaitStatus": TypeOf((*syscall.WaitStatus)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Proxies: map[string]Type{
+ "Conn": TypeOf((*Conn_syscall)(nil)).Elem(),
+ "RawConn": TypeOf((*RawConn_syscall)(nil)).Elem(),
+ }, Untypeds: map[string]string{
"AF_ALG": "int:38",
"AF_APPLETALK": "int:5",
"AF_ASH": "int:18",
@@ -3897,6 +3902,32 @@ func init() {
"WSTOPPED": "int:2",
"WUNTRACED": "int:2",
"XCASE": "int:4",
- },
+ },
}
}
+
+// --------------- proxy for syscall.Conn ---------------
+type Conn_syscall struct {
+ Object interface{}
+ SyscallConn_ func(interface{}) (syscall.RawConn, error)
+}
+func (Proxy *Conn_syscall) SyscallConn() (syscall.RawConn, error) {
+ return Proxy.SyscallConn_(Proxy.Object)
+}
+
+// --------------- proxy for syscall.RawConn ---------------
+type RawConn_syscall struct {
+ Object interface{}
+ Control_ func(_proxy_obj_ interface{}, f func(fd uintptr)) error
+ Read_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+ Write_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+}
+func (Proxy *RawConn_syscall) Control(f func(fd uintptr)) error {
+ return Proxy.Control_(Proxy.Object, f)
+}
+func (Proxy *RawConn_syscall) Read(f func(fd uintptr) (done bool)) error {
+ return Proxy.Read_(Proxy.Object, f)
+}
+func (Proxy *RawConn_syscall) Write(f func(fd uintptr) (done bool)) error {
+ return Proxy.Write_(Proxy.Object, f)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_arm.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_arm.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_linux_arm.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_arm.go
index 25589ad..2ffb32d 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_arm.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_arm.go
@@ -1,15 +1,16 @@
-// +build !gccgo
+// +build gc
-// this file was generated by gomacro command: import "syscall"
+// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
"syscall"
)
+// reflection: allow interpreted code to import "syscall"
func init() {
Packages["syscall"] = Package{
Binds: map[string]Value{
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_arm64.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_arm64.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_linux_arm64.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_arm64.go
index db59c95..6fa40c4 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_linux_arm64.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_linux_arm64.go
@@ -1,9 +1,9 @@
-// +build !gccgo
+// +build gc
// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_windows_386.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_windows_386.go
new file mode 100644
index 0000000..30a0c4c
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_windows_386.go
@@ -0,0 +1,1516 @@
+// +build gc
+
+// this file was generated by gomacro command: import _b "syscall"
+// DO NOT EDIT! Any change will be lost when the file is re-generated
+
+package syscall
+
+import (
+ . "reflect"
+ "syscall"
+)
+
+// reflection: allow interpreted code to import "syscall"
+func init() {
+ Packages["syscall"] = Package{
+ Binds: map[string]Value{
+ "AF_INET": ValueOf(syscall.AF_INET),
+ "AF_INET6": ValueOf(syscall.AF_INET6),
+ "AF_NETBIOS": ValueOf(syscall.AF_NETBIOS),
+ "AF_UNIX": ValueOf(syscall.AF_UNIX),
+ "AF_UNSPEC": ValueOf(syscall.AF_UNSPEC),
+ "AI_CANONNAME": ValueOf(syscall.AI_CANONNAME),
+ "AI_NUMERICHOST": ValueOf(syscall.AI_NUMERICHOST),
+ "AI_PASSIVE": ValueOf(syscall.AI_PASSIVE),
+ "APPLICATION_ERROR": ValueOf(syscall.APPLICATION_ERROR),
+ "AUTHTYPE_CLIENT": ValueOf(syscall.AUTHTYPE_CLIENT),
+ "AUTHTYPE_SERVER": ValueOf(syscall.AUTHTYPE_SERVER),
+ "Accept": ValueOf(syscall.Accept),
+ "AcceptEx": ValueOf(syscall.AcceptEx),
+ "BASE_PROTOCOL": ValueOf(syscall.BASE_PROTOCOL),
+ "Bind": ValueOf(syscall.Bind),
+ "BytePtrFromString": ValueOf(syscall.BytePtrFromString),
+ "ByteSliceFromString": ValueOf(syscall.ByteSliceFromString),
+ "CERT_CHAIN_POLICY_AUTHENTICODE": ValueOf(syscall.CERT_CHAIN_POLICY_AUTHENTICODE),
+ "CERT_CHAIN_POLICY_AUTHENTICODE_TS": ValueOf(syscall.CERT_CHAIN_POLICY_AUTHENTICODE_TS),
+ "CERT_CHAIN_POLICY_BASE": ValueOf(syscall.CERT_CHAIN_POLICY_BASE),
+ "CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": ValueOf(syscall.CERT_CHAIN_POLICY_BASIC_CONSTRAINTS),
+ "CERT_CHAIN_POLICY_EV": ValueOf(syscall.CERT_CHAIN_POLICY_EV),
+ "CERT_CHAIN_POLICY_MICROSOFT_ROOT": ValueOf(syscall.CERT_CHAIN_POLICY_MICROSOFT_ROOT),
+ "CERT_CHAIN_POLICY_NT_AUTH": ValueOf(syscall.CERT_CHAIN_POLICY_NT_AUTH),
+ "CERT_CHAIN_POLICY_SSL": ValueOf(syscall.CERT_CHAIN_POLICY_SSL),
+ "CERT_E_CN_NO_MATCH": ValueOf(uint32(syscall.CERT_E_CN_NO_MATCH)),
+ "CERT_E_EXPIRED": ValueOf(uint32(syscall.CERT_E_EXPIRED)),
+ "CERT_E_PURPOSE": ValueOf(uint32(syscall.CERT_E_PURPOSE)),
+ "CERT_E_ROLE": ValueOf(uint32(syscall.CERT_E_ROLE)),
+ "CERT_E_UNTRUSTEDROOT": ValueOf(uint32(syscall.CERT_E_UNTRUSTEDROOT)),
+ "CERT_STORE_ADD_ALWAYS": ValueOf(syscall.CERT_STORE_ADD_ALWAYS),
+ "CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG": ValueOf(syscall.CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG),
+ "CERT_STORE_PROV_MEMORY": ValueOf(syscall.CERT_STORE_PROV_MEMORY),
+ "CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT": ValueOf(syscall.CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT),
+ "CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT": ValueOf(syscall.CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT),
+ "CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT": ValueOf(syscall.CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT),
+ "CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT": ValueOf(syscall.CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT),
+ "CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT": ValueOf(syscall.CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT),
+ "CERT_TRUST_INVALID_BASIC_CONSTRAINTS": ValueOf(syscall.CERT_TRUST_INVALID_BASIC_CONSTRAINTS),
+ "CERT_TRUST_INVALID_EXTENSION": ValueOf(syscall.CERT_TRUST_INVALID_EXTENSION),
+ "CERT_TRUST_INVALID_NAME_CONSTRAINTS": ValueOf(syscall.CERT_TRUST_INVALID_NAME_CONSTRAINTS),
+ "CERT_TRUST_INVALID_POLICY_CONSTRAINTS": ValueOf(syscall.CERT_TRUST_INVALID_POLICY_CONSTRAINTS),
+ "CERT_TRUST_IS_CYCLIC": ValueOf(syscall.CERT_TRUST_IS_CYCLIC),
+ "CERT_TRUST_IS_EXPLICIT_DISTRUST": ValueOf(syscall.CERT_TRUST_IS_EXPLICIT_DISTRUST),
+ "CERT_TRUST_IS_NOT_SIGNATURE_VALID": ValueOf(syscall.CERT_TRUST_IS_NOT_SIGNATURE_VALID),
+ "CERT_TRUST_IS_NOT_TIME_VALID": ValueOf(syscall.CERT_TRUST_IS_NOT_TIME_VALID),
+ "CERT_TRUST_IS_NOT_VALID_FOR_USAGE": ValueOf(syscall.CERT_TRUST_IS_NOT_VALID_FOR_USAGE),
+ "CERT_TRUST_IS_OFFLINE_REVOCATION": ValueOf(syscall.CERT_TRUST_IS_OFFLINE_REVOCATION),
+ "CERT_TRUST_IS_REVOKED": ValueOf(syscall.CERT_TRUST_IS_REVOKED),
+ "CERT_TRUST_IS_UNTRUSTED_ROOT": ValueOf(syscall.CERT_TRUST_IS_UNTRUSTED_ROOT),
+ "CERT_TRUST_NO_ERROR": ValueOf(syscall.CERT_TRUST_NO_ERROR),
+ "CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY": ValueOf(syscall.CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY),
+ "CERT_TRUST_REVOCATION_STATUS_UNKNOWN": ValueOf(syscall.CERT_TRUST_REVOCATION_STATUS_UNKNOWN),
+ "CREATE_ALWAYS": ValueOf(syscall.CREATE_ALWAYS),
+ "CREATE_NEW": ValueOf(syscall.CREATE_NEW),
+ "CREATE_NEW_PROCESS_GROUP": ValueOf(syscall.CREATE_NEW_PROCESS_GROUP),
+ "CREATE_UNICODE_ENVIRONMENT": ValueOf(syscall.CREATE_UNICODE_ENVIRONMENT),
+ "CRYPT_DEFAULT_CONTAINER_OPTIONAL": ValueOf(syscall.CRYPT_DEFAULT_CONTAINER_OPTIONAL),
+ "CRYPT_DELETEKEYSET": ValueOf(syscall.CRYPT_DELETEKEYSET),
+ "CRYPT_MACHINE_KEYSET": ValueOf(syscall.CRYPT_MACHINE_KEYSET),
+ "CRYPT_NEWKEYSET": ValueOf(syscall.CRYPT_NEWKEYSET),
+ "CRYPT_SILENT": ValueOf(syscall.CRYPT_SILENT),
+ "CRYPT_VERIFYCONTEXT": ValueOf(uint32(syscall.CRYPT_VERIFYCONTEXT)),
+ "CTRL_BREAK_EVENT": ValueOf(syscall.CTRL_BREAK_EVENT),
+ "CTRL_C_EVENT": ValueOf(syscall.CTRL_C_EVENT),
+ "CancelIo": ValueOf(syscall.CancelIo),
+ "CancelIoEx": ValueOf(syscall.CancelIoEx),
+ "CertAddCertificateContextToStore": ValueOf(syscall.CertAddCertificateContextToStore),
+ "CertCloseStore": ValueOf(syscall.CertCloseStore),
+ "CertCreateCertificateContext": ValueOf(syscall.CertCreateCertificateContext),
+ "CertEnumCertificatesInStore": ValueOf(syscall.CertEnumCertificatesInStore),
+ "CertFreeCertificateChain": ValueOf(syscall.CertFreeCertificateChain),
+ "CertFreeCertificateContext": ValueOf(syscall.CertFreeCertificateContext),
+ "CertGetCertificateChain": ValueOf(syscall.CertGetCertificateChain),
+ "CertOpenStore": ValueOf(syscall.CertOpenStore),
+ "CertOpenSystemStore": ValueOf(syscall.CertOpenSystemStore),
+ "CertVerifyCertificateChainPolicy": ValueOf(syscall.CertVerifyCertificateChainPolicy),
+ "Chdir": ValueOf(syscall.Chdir),
+ "Chmod": ValueOf(syscall.Chmod),
+ "Chown": ValueOf(syscall.Chown),
+ "Clearenv": ValueOf(syscall.Clearenv),
+ "Close": ValueOf(syscall.Close),
+ "CloseHandle": ValueOf(syscall.CloseHandle),
+ "CloseOnExec": ValueOf(syscall.CloseOnExec),
+ "Closesocket": ValueOf(syscall.Closesocket),
+ "CommandLineToArgv": ValueOf(syscall.CommandLineToArgv),
+ "ComputerName": ValueOf(syscall.ComputerName),
+ "Connect": ValueOf(syscall.Connect),
+ "ConnectEx": ValueOf(syscall.ConnectEx),
+ "ConvertSidToStringSid": ValueOf(syscall.ConvertSidToStringSid),
+ "ConvertStringSidToSid": ValueOf(syscall.ConvertStringSidToSid),
+ "CopySid": ValueOf(syscall.CopySid),
+ "CreateDirectory": ValueOf(syscall.CreateDirectory),
+ "CreateFile": ValueOf(syscall.CreateFile),
+ "CreateFileMapping": ValueOf(syscall.CreateFileMapping),
+ "CreateHardLink": ValueOf(syscall.CreateHardLink),
+ "CreateIoCompletionPort": ValueOf(syscall.CreateIoCompletionPort),
+ "CreatePipe": ValueOf(syscall.CreatePipe),
+ "CreateProcess": ValueOf(syscall.CreateProcess),
+ "CreateProcessAsUser": ValueOf(syscall.CreateProcessAsUser),
+ "CreateSymbolicLink": ValueOf(syscall.CreateSymbolicLink),
+ "CreateToolhelp32Snapshot": ValueOf(syscall.CreateToolhelp32Snapshot),
+ "CryptAcquireContext": ValueOf(syscall.CryptAcquireContext),
+ "CryptGenRandom": ValueOf(syscall.CryptGenRandom),
+ "CryptReleaseContext": ValueOf(syscall.CryptReleaseContext),
+ "DNS_INFO_NO_RECORDS": ValueOf(syscall.DNS_INFO_NO_RECORDS),
+ "DNS_TYPE_A": ValueOf(syscall.DNS_TYPE_A),
+ "DNS_TYPE_A6": ValueOf(syscall.DNS_TYPE_A6),
+ "DNS_TYPE_AAAA": ValueOf(syscall.DNS_TYPE_AAAA),
+ "DNS_TYPE_ADDRS": ValueOf(syscall.DNS_TYPE_ADDRS),
+ "DNS_TYPE_AFSDB": ValueOf(syscall.DNS_TYPE_AFSDB),
+ "DNS_TYPE_ALL": ValueOf(syscall.DNS_TYPE_ALL),
+ "DNS_TYPE_ANY": ValueOf(syscall.DNS_TYPE_ANY),
+ "DNS_TYPE_ATMA": ValueOf(syscall.DNS_TYPE_ATMA),
+ "DNS_TYPE_AXFR": ValueOf(syscall.DNS_TYPE_AXFR),
+ "DNS_TYPE_CERT": ValueOf(syscall.DNS_TYPE_CERT),
+ "DNS_TYPE_CNAME": ValueOf(syscall.DNS_TYPE_CNAME),
+ "DNS_TYPE_DHCID": ValueOf(syscall.DNS_TYPE_DHCID),
+ "DNS_TYPE_DNAME": ValueOf(syscall.DNS_TYPE_DNAME),
+ "DNS_TYPE_DNSKEY": ValueOf(syscall.DNS_TYPE_DNSKEY),
+ "DNS_TYPE_DS": ValueOf(syscall.DNS_TYPE_DS),
+ "DNS_TYPE_EID": ValueOf(syscall.DNS_TYPE_EID),
+ "DNS_TYPE_GID": ValueOf(syscall.DNS_TYPE_GID),
+ "DNS_TYPE_GPOS": ValueOf(syscall.DNS_TYPE_GPOS),
+ "DNS_TYPE_HINFO": ValueOf(syscall.DNS_TYPE_HINFO),
+ "DNS_TYPE_ISDN": ValueOf(syscall.DNS_TYPE_ISDN),
+ "DNS_TYPE_IXFR": ValueOf(syscall.DNS_TYPE_IXFR),
+ "DNS_TYPE_KEY": ValueOf(syscall.DNS_TYPE_KEY),
+ "DNS_TYPE_KX": ValueOf(syscall.DNS_TYPE_KX),
+ "DNS_TYPE_LOC": ValueOf(syscall.DNS_TYPE_LOC),
+ "DNS_TYPE_MAILA": ValueOf(syscall.DNS_TYPE_MAILA),
+ "DNS_TYPE_MAILB": ValueOf(syscall.DNS_TYPE_MAILB),
+ "DNS_TYPE_MB": ValueOf(syscall.DNS_TYPE_MB),
+ "DNS_TYPE_MD": ValueOf(syscall.DNS_TYPE_MD),
+ "DNS_TYPE_MF": ValueOf(syscall.DNS_TYPE_MF),
+ "DNS_TYPE_MG": ValueOf(syscall.DNS_TYPE_MG),
+ "DNS_TYPE_MINFO": ValueOf(syscall.DNS_TYPE_MINFO),
+ "DNS_TYPE_MR": ValueOf(syscall.DNS_TYPE_MR),
+ "DNS_TYPE_MX": ValueOf(syscall.DNS_TYPE_MX),
+ "DNS_TYPE_NAPTR": ValueOf(syscall.DNS_TYPE_NAPTR),
+ "DNS_TYPE_NBSTAT": ValueOf(syscall.DNS_TYPE_NBSTAT),
+ "DNS_TYPE_NIMLOC": ValueOf(syscall.DNS_TYPE_NIMLOC),
+ "DNS_TYPE_NS": ValueOf(syscall.DNS_TYPE_NS),
+ "DNS_TYPE_NSAP": ValueOf(syscall.DNS_TYPE_NSAP),
+ "DNS_TYPE_NSAPPTR": ValueOf(syscall.DNS_TYPE_NSAPPTR),
+ "DNS_TYPE_NSEC": ValueOf(syscall.DNS_TYPE_NSEC),
+ "DNS_TYPE_NULL": ValueOf(syscall.DNS_TYPE_NULL),
+ "DNS_TYPE_NXT": ValueOf(syscall.DNS_TYPE_NXT),
+ "DNS_TYPE_OPT": ValueOf(syscall.DNS_TYPE_OPT),
+ "DNS_TYPE_PTR": ValueOf(syscall.DNS_TYPE_PTR),
+ "DNS_TYPE_PX": ValueOf(syscall.DNS_TYPE_PX),
+ "DNS_TYPE_RP": ValueOf(syscall.DNS_TYPE_RP),
+ "DNS_TYPE_RRSIG": ValueOf(syscall.DNS_TYPE_RRSIG),
+ "DNS_TYPE_RT": ValueOf(syscall.DNS_TYPE_RT),
+ "DNS_TYPE_SIG": ValueOf(syscall.DNS_TYPE_SIG),
+ "DNS_TYPE_SINK": ValueOf(syscall.DNS_TYPE_SINK),
+ "DNS_TYPE_SOA": ValueOf(syscall.DNS_TYPE_SOA),
+ "DNS_TYPE_SRV": ValueOf(syscall.DNS_TYPE_SRV),
+ "DNS_TYPE_TEXT": ValueOf(syscall.DNS_TYPE_TEXT),
+ "DNS_TYPE_TKEY": ValueOf(syscall.DNS_TYPE_TKEY),
+ "DNS_TYPE_TSIG": ValueOf(syscall.DNS_TYPE_TSIG),
+ "DNS_TYPE_UID": ValueOf(syscall.DNS_TYPE_UID),
+ "DNS_TYPE_UINFO": ValueOf(syscall.DNS_TYPE_UINFO),
+ "DNS_TYPE_UNSPEC": ValueOf(syscall.DNS_TYPE_UNSPEC),
+ "DNS_TYPE_WINS": ValueOf(syscall.DNS_TYPE_WINS),
+ "DNS_TYPE_WINSR": ValueOf(syscall.DNS_TYPE_WINSR),
+ "DNS_TYPE_WKS": ValueOf(syscall.DNS_TYPE_WKS),
+ "DNS_TYPE_X25": ValueOf(syscall.DNS_TYPE_X25),
+ "DUPLICATE_CLOSE_SOURCE": ValueOf(syscall.DUPLICATE_CLOSE_SOURCE),
+ "DUPLICATE_SAME_ACCESS": ValueOf(syscall.DUPLICATE_SAME_ACCESS),
+ "DeleteFile": ValueOf(syscall.DeleteFile),
+ "DeviceIoControl": ValueOf(syscall.DeviceIoControl),
+ "DnsNameCompare": ValueOf(syscall.DnsNameCompare),
+ "DnsQuery": ValueOf(syscall.DnsQuery),
+ "DnsRecordListFree": ValueOf(syscall.DnsRecordListFree),
+ "DnsSectionAdditional": ValueOf(syscall.DnsSectionAdditional),
+ "DnsSectionAnswer": ValueOf(syscall.DnsSectionAnswer),
+ "DnsSectionAuthority": ValueOf(syscall.DnsSectionAuthority),
+ "DnsSectionQuestion": ValueOf(syscall.DnsSectionQuestion),
+ "DuplicateHandle": ValueOf(syscall.DuplicateHandle),
+ "E2BIG": ValueOf(syscall.E2BIG),
+ "EACCES": ValueOf(syscall.EACCES),
+ "EADDRINUSE": ValueOf(syscall.EADDRINUSE),
+ "EADDRNOTAVAIL": ValueOf(syscall.EADDRNOTAVAIL),
+ "EADV": ValueOf(syscall.EADV),
+ "EAFNOSUPPORT": ValueOf(syscall.EAFNOSUPPORT),
+ "EAGAIN": ValueOf(syscall.EAGAIN),
+ "EALREADY": ValueOf(syscall.EALREADY),
+ "EBADE": ValueOf(syscall.EBADE),
+ "EBADF": ValueOf(syscall.EBADF),
+ "EBADFD": ValueOf(syscall.EBADFD),
+ "EBADMSG": ValueOf(syscall.EBADMSG),
+ "EBADR": ValueOf(syscall.EBADR),
+ "EBADRQC": ValueOf(syscall.EBADRQC),
+ "EBADSLT": ValueOf(syscall.EBADSLT),
+ "EBFONT": ValueOf(syscall.EBFONT),
+ "EBUSY": ValueOf(syscall.EBUSY),
+ "ECANCELED": ValueOf(syscall.ECANCELED),
+ "ECHILD": ValueOf(syscall.ECHILD),
+ "ECHRNG": ValueOf(syscall.ECHRNG),
+ "ECOMM": ValueOf(syscall.ECOMM),
+ "ECONNABORTED": ValueOf(syscall.ECONNABORTED),
+ "ECONNREFUSED": ValueOf(syscall.ECONNREFUSED),
+ "ECONNRESET": ValueOf(syscall.ECONNRESET),
+ "EDEADLK": ValueOf(syscall.EDEADLK),
+ "EDEADLOCK": ValueOf(syscall.EDEADLOCK),
+ "EDESTADDRREQ": ValueOf(syscall.EDESTADDRREQ),
+ "EDOM": ValueOf(syscall.EDOM),
+ "EDOTDOT": ValueOf(syscall.EDOTDOT),
+ "EDQUOT": ValueOf(syscall.EDQUOT),
+ "EEXIST": ValueOf(syscall.EEXIST),
+ "EFAULT": ValueOf(syscall.EFAULT),
+ "EFBIG": ValueOf(syscall.EFBIG),
+ "EHOSTDOWN": ValueOf(syscall.EHOSTDOWN),
+ "EHOSTUNREACH": ValueOf(syscall.EHOSTUNREACH),
+ "EIDRM": ValueOf(syscall.EIDRM),
+ "EILSEQ": ValueOf(syscall.EILSEQ),
+ "EINPROGRESS": ValueOf(syscall.EINPROGRESS),
+ "EINTR": ValueOf(syscall.EINTR),
+ "EINVAL": ValueOf(syscall.EINVAL),
+ "EIO": ValueOf(syscall.EIO),
+ "EISCONN": ValueOf(syscall.EISCONN),
+ "EISDIR": ValueOf(syscall.EISDIR),
+ "EISNAM": ValueOf(syscall.EISNAM),
+ "EKEYEXPIRED": ValueOf(syscall.EKEYEXPIRED),
+ "EKEYREJECTED": ValueOf(syscall.EKEYREJECTED),
+ "EKEYREVOKED": ValueOf(syscall.EKEYREVOKED),
+ "EL2HLT": ValueOf(syscall.EL2HLT),
+ "EL2NSYNC": ValueOf(syscall.EL2NSYNC),
+ "EL3HLT": ValueOf(syscall.EL3HLT),
+ "EL3RST": ValueOf(syscall.EL3RST),
+ "ELIBACC": ValueOf(syscall.ELIBACC),
+ "ELIBBAD": ValueOf(syscall.ELIBBAD),
+ "ELIBEXEC": ValueOf(syscall.ELIBEXEC),
+ "ELIBMAX": ValueOf(syscall.ELIBMAX),
+ "ELIBSCN": ValueOf(syscall.ELIBSCN),
+ "ELNRNG": ValueOf(syscall.ELNRNG),
+ "ELOOP": ValueOf(syscall.ELOOP),
+ "EMEDIUMTYPE": ValueOf(syscall.EMEDIUMTYPE),
+ "EMFILE": ValueOf(syscall.EMFILE),
+ "EMLINK": ValueOf(syscall.EMLINK),
+ "EMSGSIZE": ValueOf(syscall.EMSGSIZE),
+ "EMULTIHOP": ValueOf(syscall.EMULTIHOP),
+ "ENAMETOOLONG": ValueOf(syscall.ENAMETOOLONG),
+ "ENAVAIL": ValueOf(syscall.ENAVAIL),
+ "ENETDOWN": ValueOf(syscall.ENETDOWN),
+ "ENETRESET": ValueOf(syscall.ENETRESET),
+ "ENETUNREACH": ValueOf(syscall.ENETUNREACH),
+ "ENFILE": ValueOf(syscall.ENFILE),
+ "ENOANO": ValueOf(syscall.ENOANO),
+ "ENOBUFS": ValueOf(syscall.ENOBUFS),
+ "ENOCSI": ValueOf(syscall.ENOCSI),
+ "ENODATA": ValueOf(syscall.ENODATA),
+ "ENODEV": ValueOf(syscall.ENODEV),
+ "ENOENT": ValueOf(syscall.ENOENT),
+ "ENOEXEC": ValueOf(syscall.ENOEXEC),
+ "ENOKEY": ValueOf(syscall.ENOKEY),
+ "ENOLCK": ValueOf(syscall.ENOLCK),
+ "ENOLINK": ValueOf(syscall.ENOLINK),
+ "ENOMEDIUM": ValueOf(syscall.ENOMEDIUM),
+ "ENOMEM": ValueOf(syscall.ENOMEM),
+ "ENOMSG": ValueOf(syscall.ENOMSG),
+ "ENONET": ValueOf(syscall.ENONET),
+ "ENOPKG": ValueOf(syscall.ENOPKG),
+ "ENOPROTOOPT": ValueOf(syscall.ENOPROTOOPT),
+ "ENOSPC": ValueOf(syscall.ENOSPC),
+ "ENOSR": ValueOf(syscall.ENOSR),
+ "ENOSTR": ValueOf(syscall.ENOSTR),
+ "ENOSYS": ValueOf(syscall.ENOSYS),
+ "ENOTBLK": ValueOf(syscall.ENOTBLK),
+ "ENOTCONN": ValueOf(syscall.ENOTCONN),
+ "ENOTDIR": ValueOf(syscall.ENOTDIR),
+ "ENOTEMPTY": ValueOf(syscall.ENOTEMPTY),
+ "ENOTNAM": ValueOf(syscall.ENOTNAM),
+ "ENOTRECOVERABLE": ValueOf(syscall.ENOTRECOVERABLE),
+ "ENOTSOCK": ValueOf(syscall.ENOTSOCK),
+ "ENOTSUP": ValueOf(syscall.ENOTSUP),
+ "ENOTTY": ValueOf(syscall.ENOTTY),
+ "ENOTUNIQ": ValueOf(syscall.ENOTUNIQ),
+ "ENXIO": ValueOf(syscall.ENXIO),
+ "EOPNOTSUPP": ValueOf(syscall.EOPNOTSUPP),
+ "EOVERFLOW": ValueOf(syscall.EOVERFLOW),
+ "EOWNERDEAD": ValueOf(syscall.EOWNERDEAD),
+ "EPERM": ValueOf(syscall.EPERM),
+ "EPFNOSUPPORT": ValueOf(syscall.EPFNOSUPPORT),
+ "EPIPE": ValueOf(syscall.EPIPE),
+ "EPROTO": ValueOf(syscall.EPROTO),
+ "EPROTONOSUPPORT": ValueOf(syscall.EPROTONOSUPPORT),
+ "EPROTOTYPE": ValueOf(syscall.EPROTOTYPE),
+ "ERANGE": ValueOf(syscall.ERANGE),
+ "EREMCHG": ValueOf(syscall.EREMCHG),
+ "EREMOTE": ValueOf(syscall.EREMOTE),
+ "EREMOTEIO": ValueOf(syscall.EREMOTEIO),
+ "ERESTART": ValueOf(syscall.ERESTART),
+ "EROFS": ValueOf(syscall.EROFS),
+ "ERROR_ACCESS_DENIED": ValueOf(syscall.ERROR_ACCESS_DENIED),
+ "ERROR_ALREADY_EXISTS": ValueOf(syscall.ERROR_ALREADY_EXISTS),
+ "ERROR_BROKEN_PIPE": ValueOf(syscall.ERROR_BROKEN_PIPE),
+ "ERROR_BUFFER_OVERFLOW": ValueOf(syscall.ERROR_BUFFER_OVERFLOW),
+ "ERROR_DIR_NOT_EMPTY": ValueOf(syscall.ERROR_DIR_NOT_EMPTY),
+ "ERROR_ENVVAR_NOT_FOUND": ValueOf(syscall.ERROR_ENVVAR_NOT_FOUND),
+ "ERROR_FILE_EXISTS": ValueOf(syscall.ERROR_FILE_EXISTS),
+ "ERROR_FILE_NOT_FOUND": ValueOf(syscall.ERROR_FILE_NOT_FOUND),
+ "ERROR_HANDLE_EOF": ValueOf(syscall.ERROR_HANDLE_EOF),
+ "ERROR_INSUFFICIENT_BUFFER": ValueOf(syscall.ERROR_INSUFFICIENT_BUFFER),
+ "ERROR_IO_PENDING": ValueOf(syscall.ERROR_IO_PENDING),
+ "ERROR_MOD_NOT_FOUND": ValueOf(syscall.ERROR_MOD_NOT_FOUND),
+ "ERROR_MORE_DATA": ValueOf(syscall.ERROR_MORE_DATA),
+ "ERROR_NETNAME_DELETED": ValueOf(syscall.ERROR_NETNAME_DELETED),
+ "ERROR_NOT_FOUND": ValueOf(syscall.ERROR_NOT_FOUND),
+ "ERROR_NO_MORE_FILES": ValueOf(syscall.ERROR_NO_MORE_FILES),
+ "ERROR_OPERATION_ABORTED": ValueOf(syscall.ERROR_OPERATION_ABORTED),
+ "ERROR_PATH_NOT_FOUND": ValueOf(syscall.ERROR_PATH_NOT_FOUND),
+ "ERROR_PRIVILEGE_NOT_HELD": ValueOf(syscall.ERROR_PRIVILEGE_NOT_HELD),
+ "ERROR_PROC_NOT_FOUND": ValueOf(syscall.ERROR_PROC_NOT_FOUND),
+ "ESHUTDOWN": ValueOf(syscall.ESHUTDOWN),
+ "ESOCKTNOSUPPORT": ValueOf(syscall.ESOCKTNOSUPPORT),
+ "ESPIPE": ValueOf(syscall.ESPIPE),
+ "ESRCH": ValueOf(syscall.ESRCH),
+ "ESRMNT": ValueOf(syscall.ESRMNT),
+ "ESTALE": ValueOf(syscall.ESTALE),
+ "ESTRPIPE": ValueOf(syscall.ESTRPIPE),
+ "ETIME": ValueOf(syscall.ETIME),
+ "ETIMEDOUT": ValueOf(syscall.ETIMEDOUT),
+ "ETOOMANYREFS": ValueOf(syscall.ETOOMANYREFS),
+ "ETXTBSY": ValueOf(syscall.ETXTBSY),
+ "EUCLEAN": ValueOf(syscall.EUCLEAN),
+ "EUNATCH": ValueOf(syscall.EUNATCH),
+ "EUSERS": ValueOf(syscall.EUSERS),
+ "EWINDOWS": ValueOf(syscall.EWINDOWS),
+ "EWOULDBLOCK": ValueOf(syscall.EWOULDBLOCK),
+ "EXDEV": ValueOf(syscall.EXDEV),
+ "EXFULL": ValueOf(syscall.EXFULL),
+ "Environ": ValueOf(syscall.Environ),
+ "EscapeArg": ValueOf(syscall.EscapeArg),
+ "Exec": ValueOf(syscall.Exec),
+ "Exit": ValueOf(syscall.Exit),
+ "ExitProcess": ValueOf(syscall.ExitProcess),
+ "FILE_ACTION_ADDED": ValueOf(syscall.FILE_ACTION_ADDED),
+ "FILE_ACTION_MODIFIED": ValueOf(syscall.FILE_ACTION_MODIFIED),
+ "FILE_ACTION_REMOVED": ValueOf(syscall.FILE_ACTION_REMOVED),
+ "FILE_ACTION_RENAMED_NEW_NAME": ValueOf(syscall.FILE_ACTION_RENAMED_NEW_NAME),
+ "FILE_ACTION_RENAMED_OLD_NAME": ValueOf(syscall.FILE_ACTION_RENAMED_OLD_NAME),
+ "FILE_APPEND_DATA": ValueOf(syscall.FILE_APPEND_DATA),
+ "FILE_ATTRIBUTE_ARCHIVE": ValueOf(syscall.FILE_ATTRIBUTE_ARCHIVE),
+ "FILE_ATTRIBUTE_DIRECTORY": ValueOf(syscall.FILE_ATTRIBUTE_DIRECTORY),
+ "FILE_ATTRIBUTE_HIDDEN": ValueOf(syscall.FILE_ATTRIBUTE_HIDDEN),
+ "FILE_ATTRIBUTE_NORMAL": ValueOf(syscall.FILE_ATTRIBUTE_NORMAL),
+ "FILE_ATTRIBUTE_READONLY": ValueOf(syscall.FILE_ATTRIBUTE_READONLY),
+ "FILE_ATTRIBUTE_REPARSE_POINT": ValueOf(syscall.FILE_ATTRIBUTE_REPARSE_POINT),
+ "FILE_ATTRIBUTE_SYSTEM": ValueOf(syscall.FILE_ATTRIBUTE_SYSTEM),
+ "FILE_BEGIN": ValueOf(syscall.FILE_BEGIN),
+ "FILE_CURRENT": ValueOf(syscall.FILE_CURRENT),
+ "FILE_END": ValueOf(syscall.FILE_END),
+ "FILE_FLAG_BACKUP_SEMANTICS": ValueOf(syscall.FILE_FLAG_BACKUP_SEMANTICS),
+ "FILE_FLAG_OPEN_REPARSE_POINT": ValueOf(syscall.FILE_FLAG_OPEN_REPARSE_POINT),
+ "FILE_FLAG_OVERLAPPED": ValueOf(syscall.FILE_FLAG_OVERLAPPED),
+ "FILE_LIST_DIRECTORY": ValueOf(syscall.FILE_LIST_DIRECTORY),
+ "FILE_MAP_COPY": ValueOf(syscall.FILE_MAP_COPY),
+ "FILE_MAP_EXECUTE": ValueOf(syscall.FILE_MAP_EXECUTE),
+ "FILE_MAP_READ": ValueOf(syscall.FILE_MAP_READ),
+ "FILE_MAP_WRITE": ValueOf(syscall.FILE_MAP_WRITE),
+ "FILE_NOTIFY_CHANGE_ATTRIBUTES": ValueOf(syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES),
+ "FILE_NOTIFY_CHANGE_CREATION": ValueOf(syscall.FILE_NOTIFY_CHANGE_CREATION),
+ "FILE_NOTIFY_CHANGE_DIR_NAME": ValueOf(syscall.FILE_NOTIFY_CHANGE_DIR_NAME),
+ "FILE_NOTIFY_CHANGE_FILE_NAME": ValueOf(syscall.FILE_NOTIFY_CHANGE_FILE_NAME),
+ "FILE_NOTIFY_CHANGE_LAST_ACCESS": ValueOf(syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS),
+ "FILE_NOTIFY_CHANGE_LAST_WRITE": ValueOf(syscall.FILE_NOTIFY_CHANGE_LAST_WRITE),
+ "FILE_NOTIFY_CHANGE_SIZE": ValueOf(syscall.FILE_NOTIFY_CHANGE_SIZE),
+ "FILE_SHARE_DELETE": ValueOf(syscall.FILE_SHARE_DELETE),
+ "FILE_SHARE_READ": ValueOf(syscall.FILE_SHARE_READ),
+ "FILE_SHARE_WRITE": ValueOf(syscall.FILE_SHARE_WRITE),
+ "FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": ValueOf(syscall.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS),
+ "FILE_SKIP_SET_EVENT_ON_HANDLE": ValueOf(syscall.FILE_SKIP_SET_EVENT_ON_HANDLE),
+ "FILE_TYPE_CHAR": ValueOf(syscall.FILE_TYPE_CHAR),
+ "FILE_TYPE_DISK": ValueOf(syscall.FILE_TYPE_DISK),
+ "FILE_TYPE_PIPE": ValueOf(syscall.FILE_TYPE_PIPE),
+ "FILE_TYPE_REMOTE": ValueOf(syscall.FILE_TYPE_REMOTE),
+ "FILE_TYPE_UNKNOWN": ValueOf(syscall.FILE_TYPE_UNKNOWN),
+ "FILE_WRITE_ATTRIBUTES": ValueOf(syscall.FILE_WRITE_ATTRIBUTES),
+ "FORMAT_MESSAGE_ALLOCATE_BUFFER": ValueOf(syscall.FORMAT_MESSAGE_ALLOCATE_BUFFER),
+ "FORMAT_MESSAGE_ARGUMENT_ARRAY": ValueOf(syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY),
+ "FORMAT_MESSAGE_FROM_HMODULE": ValueOf(syscall.FORMAT_MESSAGE_FROM_HMODULE),
+ "FORMAT_MESSAGE_FROM_STRING": ValueOf(syscall.FORMAT_MESSAGE_FROM_STRING),
+ "FORMAT_MESSAGE_FROM_SYSTEM": ValueOf(syscall.FORMAT_MESSAGE_FROM_SYSTEM),
+ "FORMAT_MESSAGE_IGNORE_INSERTS": ValueOf(syscall.FORMAT_MESSAGE_IGNORE_INSERTS),
+ "FORMAT_MESSAGE_MAX_WIDTH_MASK": ValueOf(syscall.FORMAT_MESSAGE_MAX_WIDTH_MASK),
+ "FSCTL_GET_REPARSE_POINT": ValueOf(syscall.FSCTL_GET_REPARSE_POINT),
+ "Fchdir": ValueOf(syscall.Fchdir),
+ "Fchmod": ValueOf(syscall.Fchmod),
+ "Fchown": ValueOf(syscall.Fchown),
+ "FindClose": ValueOf(syscall.FindClose),
+ "FindFirstFile": ValueOf(syscall.FindFirstFile),
+ "FindNextFile": ValueOf(syscall.FindNextFile),
+ "FlushFileBuffers": ValueOf(syscall.FlushFileBuffers),
+ "FlushViewOfFile": ValueOf(syscall.FlushViewOfFile),
+ "ForkLock": ValueOf(&syscall.ForkLock).Elem(),
+ "FormatMessage": ValueOf(syscall.FormatMessage),
+ "FreeAddrInfoW": ValueOf(syscall.FreeAddrInfoW),
+ "FreeEnvironmentStrings": ValueOf(syscall.FreeEnvironmentStrings),
+ "FreeLibrary": ValueOf(syscall.FreeLibrary),
+ "Fsync": ValueOf(syscall.Fsync),
+ "Ftruncate": ValueOf(syscall.Ftruncate),
+ "FullPath": ValueOf(syscall.FullPath),
+ "GENERIC_ALL": ValueOf(syscall.GENERIC_ALL),
+ "GENERIC_EXECUTE": ValueOf(syscall.GENERIC_EXECUTE),
+ "GENERIC_READ": ValueOf(uint32(syscall.GENERIC_READ)),
+ "GENERIC_WRITE": ValueOf(syscall.GENERIC_WRITE),
+ "GetAcceptExSockaddrs": ValueOf(syscall.GetAcceptExSockaddrs),
+ "GetAdaptersInfo": ValueOf(syscall.GetAdaptersInfo),
+ "GetAddrInfoW": ValueOf(syscall.GetAddrInfoW),
+ "GetCommandLine": ValueOf(syscall.GetCommandLine),
+ "GetComputerName": ValueOf(syscall.GetComputerName),
+ "GetConsoleMode": ValueOf(syscall.GetConsoleMode),
+ "GetCurrentDirectory": ValueOf(syscall.GetCurrentDirectory),
+ "GetCurrentProcess": ValueOf(syscall.GetCurrentProcess),
+ "GetEnvironmentStrings": ValueOf(syscall.GetEnvironmentStrings),
+ "GetEnvironmentVariable": ValueOf(syscall.GetEnvironmentVariable),
+ "GetExitCodeProcess": ValueOf(syscall.GetExitCodeProcess),
+ "GetFileAttributes": ValueOf(syscall.GetFileAttributes),
+ "GetFileAttributesEx": ValueOf(syscall.GetFileAttributesEx),
+ "GetFileExInfoStandard": ValueOf(syscall.GetFileExInfoStandard),
+ "GetFileExMaxInfoLevel": ValueOf(syscall.GetFileExMaxInfoLevel),
+ "GetFileInformationByHandle": ValueOf(syscall.GetFileInformationByHandle),
+ "GetFileType": ValueOf(syscall.GetFileType),
+ "GetFullPathName": ValueOf(syscall.GetFullPathName),
+ "GetHostByName": ValueOf(syscall.GetHostByName),
+ "GetIfEntry": ValueOf(syscall.GetIfEntry),
+ "GetLastError": ValueOf(syscall.GetLastError),
+ "GetLengthSid": ValueOf(syscall.GetLengthSid),
+ "GetLongPathName": ValueOf(syscall.GetLongPathName),
+ "GetProcAddress": ValueOf(syscall.GetProcAddress),
+ "GetProcessTimes": ValueOf(syscall.GetProcessTimes),
+ "GetProtoByName": ValueOf(syscall.GetProtoByName),
+ "GetQueuedCompletionStatus": ValueOf(syscall.GetQueuedCompletionStatus),
+ "GetServByName": ValueOf(syscall.GetServByName),
+ "GetShortPathName": ValueOf(syscall.GetShortPathName),
+ "GetStartupInfo": ValueOf(syscall.GetStartupInfo),
+ "GetStdHandle": ValueOf(syscall.GetStdHandle),
+ "GetSystemTimeAsFileTime": ValueOf(syscall.GetSystemTimeAsFileTime),
+ "GetTempPath": ValueOf(syscall.GetTempPath),
+ "GetTimeZoneInformation": ValueOf(syscall.GetTimeZoneInformation),
+ "GetTokenInformation": ValueOf(syscall.GetTokenInformation),
+ "GetUserNameEx": ValueOf(syscall.GetUserNameEx),
+ "GetUserProfileDirectory": ValueOf(syscall.GetUserProfileDirectory),
+ "GetVersion": ValueOf(syscall.GetVersion),
+ "Getegid": ValueOf(syscall.Getegid),
+ "Getenv": ValueOf(syscall.Getenv),
+ "Geteuid": ValueOf(syscall.Geteuid),
+ "Getgid": ValueOf(syscall.Getgid),
+ "Getgroups": ValueOf(syscall.Getgroups),
+ "Getpagesize": ValueOf(syscall.Getpagesize),
+ "Getpeername": ValueOf(syscall.Getpeername),
+ "Getpid": ValueOf(syscall.Getpid),
+ "Getppid": ValueOf(syscall.Getppid),
+ "Getsockname": ValueOf(syscall.Getsockname),
+ "Getsockopt": ValueOf(syscall.Getsockopt),
+ "GetsockoptInt": ValueOf(syscall.GetsockoptInt),
+ "Gettimeofday": ValueOf(syscall.Gettimeofday),
+ "Getuid": ValueOf(syscall.Getuid),
+ "Getwd": ValueOf(syscall.Getwd),
+ "HANDLE_FLAG_INHERIT": ValueOf(syscall.HANDLE_FLAG_INHERIT),
+ "HKEY_CLASSES_ROOT": ValueOf(uint32(syscall.HKEY_CLASSES_ROOT)),
+ "HKEY_CURRENT_CONFIG": ValueOf(uint32(syscall.HKEY_CURRENT_CONFIG)),
+ "HKEY_CURRENT_USER": ValueOf(uint32(syscall.HKEY_CURRENT_USER)),
+ "HKEY_DYN_DATA": ValueOf(uint32(syscall.HKEY_DYN_DATA)),
+ "HKEY_LOCAL_MACHINE": ValueOf(uint32(syscall.HKEY_LOCAL_MACHINE)),
+ "HKEY_PERFORMANCE_DATA": ValueOf(uint32(syscall.HKEY_PERFORMANCE_DATA)),
+ "HKEY_USERS": ValueOf(uint32(syscall.HKEY_USERS)),
+ "IFF_BROADCAST": ValueOf(syscall.IFF_BROADCAST),
+ "IFF_LOOPBACK": ValueOf(syscall.IFF_LOOPBACK),
+ "IFF_MULTICAST": ValueOf(syscall.IFF_MULTICAST),
+ "IFF_POINTTOPOINT": ValueOf(syscall.IFF_POINTTOPOINT),
+ "IFF_UP": ValueOf(syscall.IFF_UP),
+ "IGNORE": ValueOf(syscall.IGNORE),
+ "INFINITE": ValueOf(uint32(syscall.INFINITE)),
+ "INVALID_FILE_ATTRIBUTES": ValueOf(uint32(syscall.INVALID_FILE_ATTRIBUTES)),
+ "IOC_IN": ValueOf(uint32(syscall.IOC_IN)),
+ "IOC_INOUT": ValueOf(uint32(syscall.IOC_INOUT)),
+ "IOC_OUT": ValueOf(syscall.IOC_OUT),
+ "IOC_VENDOR": ValueOf(syscall.IOC_VENDOR),
+ "IOC_WS2": ValueOf(syscall.IOC_WS2),
+ "IO_REPARSE_TAG_SYMLINK": ValueOf(uint32(syscall.IO_REPARSE_TAG_SYMLINK)),
+ "IPPROTO_IP": ValueOf(syscall.IPPROTO_IP),
+ "IPPROTO_IPV6": ValueOf(syscall.IPPROTO_IPV6),
+ "IPPROTO_TCP": ValueOf(syscall.IPPROTO_TCP),
+ "IPPROTO_UDP": ValueOf(syscall.IPPROTO_UDP),
+ "IPV6_JOIN_GROUP": ValueOf(syscall.IPV6_JOIN_GROUP),
+ "IPV6_LEAVE_GROUP": ValueOf(syscall.IPV6_LEAVE_GROUP),
+ "IPV6_MULTICAST_HOPS": ValueOf(syscall.IPV6_MULTICAST_HOPS),
+ "IPV6_MULTICAST_IF": ValueOf(syscall.IPV6_MULTICAST_IF),
+ "IPV6_MULTICAST_LOOP": ValueOf(syscall.IPV6_MULTICAST_LOOP),
+ "IPV6_UNICAST_HOPS": ValueOf(syscall.IPV6_UNICAST_HOPS),
+ "IPV6_V6ONLY": ValueOf(syscall.IPV6_V6ONLY),
+ "IP_ADD_MEMBERSHIP": ValueOf(syscall.IP_ADD_MEMBERSHIP),
+ "IP_DROP_MEMBERSHIP": ValueOf(syscall.IP_DROP_MEMBERSHIP),
+ "IP_MULTICAST_IF": ValueOf(syscall.IP_MULTICAST_IF),
+ "IP_MULTICAST_LOOP": ValueOf(syscall.IP_MULTICAST_LOOP),
+ "IP_MULTICAST_TTL": ValueOf(syscall.IP_MULTICAST_TTL),
+ "IP_TOS": ValueOf(syscall.IP_TOS),
+ "IP_TTL": ValueOf(syscall.IP_TTL),
+ "ImplementsGetwd": ValueOf(syscall.ImplementsGetwd),
+ "InvalidHandle": ValueOf(syscall.InvalidHandle),
+ "KEY_ALL_ACCESS": ValueOf(syscall.KEY_ALL_ACCESS),
+ "KEY_CREATE_LINK": ValueOf(syscall.KEY_CREATE_LINK),
+ "KEY_CREATE_SUB_KEY": ValueOf(syscall.KEY_CREATE_SUB_KEY),
+ "KEY_ENUMERATE_SUB_KEYS": ValueOf(syscall.KEY_ENUMERATE_SUB_KEYS),
+ "KEY_EXECUTE": ValueOf(syscall.KEY_EXECUTE),
+ "KEY_NOTIFY": ValueOf(syscall.KEY_NOTIFY),
+ "KEY_QUERY_VALUE": ValueOf(syscall.KEY_QUERY_VALUE),
+ "KEY_READ": ValueOf(syscall.KEY_READ),
+ "KEY_SET_VALUE": ValueOf(syscall.KEY_SET_VALUE),
+ "KEY_WOW64_32KEY": ValueOf(syscall.KEY_WOW64_32KEY),
+ "KEY_WOW64_64KEY": ValueOf(syscall.KEY_WOW64_64KEY),
+ "KEY_WRITE": ValueOf(syscall.KEY_WRITE),
+ "LANG_ENGLISH": ValueOf(syscall.LANG_ENGLISH),
+ "LAYERED_PROTOCOL": ValueOf(syscall.LAYERED_PROTOCOL),
+ "Lchown": ValueOf(syscall.Lchown),
+ "Link": ValueOf(syscall.Link),
+ "Listen": ValueOf(syscall.Listen),
+ "LoadCancelIoEx": ValueOf(syscall.LoadCancelIoEx),
+ "LoadConnectEx": ValueOf(syscall.LoadConnectEx),
+ "LoadCreateSymbolicLink": ValueOf(syscall.LoadCreateSymbolicLink),
+ "LoadDLL": ValueOf(syscall.LoadDLL),
+ "LoadGetAddrInfo": ValueOf(syscall.LoadGetAddrInfo),
+ "LoadLibrary": ValueOf(syscall.LoadLibrary),
+ "LoadSetFileCompletionNotificationModes": ValueOf(syscall.LoadSetFileCompletionNotificationModes),
+ "LocalFree": ValueOf(syscall.LocalFree),
+ "LookupAccountName": ValueOf(syscall.LookupAccountName),
+ "LookupAccountSid": ValueOf(syscall.LookupAccountSid),
+ "LookupSID": ValueOf(syscall.LookupSID),
+ "MAXIMUM_REPARSE_DATA_BUFFER_SIZE": ValueOf(syscall.MAXIMUM_REPARSE_DATA_BUFFER_SIZE),
+ "MAXLEN_IFDESCR": ValueOf(syscall.MAXLEN_IFDESCR),
+ "MAXLEN_PHYSADDR": ValueOf(syscall.MAXLEN_PHYSADDR),
+ "MAX_ADAPTER_ADDRESS_LENGTH": ValueOf(syscall.MAX_ADAPTER_ADDRESS_LENGTH),
+ "MAX_ADAPTER_DESCRIPTION_LENGTH": ValueOf(syscall.MAX_ADAPTER_DESCRIPTION_LENGTH),
+ "MAX_ADAPTER_NAME_LENGTH": ValueOf(syscall.MAX_ADAPTER_NAME_LENGTH),
+ "MAX_COMPUTERNAME_LENGTH": ValueOf(syscall.MAX_COMPUTERNAME_LENGTH),
+ "MAX_INTERFACE_NAME_LEN": ValueOf(syscall.MAX_INTERFACE_NAME_LEN),
+ "MAX_LONG_PATH": ValueOf(syscall.MAX_LONG_PATH),
+ "MAX_PATH": ValueOf(syscall.MAX_PATH),
+ "MAX_PROTOCOL_CHAIN": ValueOf(syscall.MAX_PROTOCOL_CHAIN),
+ "MapViewOfFile": ValueOf(syscall.MapViewOfFile),
+ "MaxTokenInfoClass": ValueOf(syscall.MaxTokenInfoClass),
+ "Mkdir": ValueOf(syscall.Mkdir),
+ "MoveFile": ValueOf(syscall.MoveFile),
+ "MustLoadDLL": ValueOf(syscall.MustLoadDLL),
+ "NameCanonical": ValueOf(syscall.NameCanonical),
+ "NameCanonicalEx": ValueOf(syscall.NameCanonicalEx),
+ "NameDisplay": ValueOf(syscall.NameDisplay),
+ "NameDnsDomain": ValueOf(syscall.NameDnsDomain),
+ "NameFullyQualifiedDN": ValueOf(syscall.NameFullyQualifiedDN),
+ "NameSamCompatible": ValueOf(syscall.NameSamCompatible),
+ "NameServicePrincipal": ValueOf(syscall.NameServicePrincipal),
+ "NameUniqueId": ValueOf(syscall.NameUniqueId),
+ "NameUnknown": ValueOf(syscall.NameUnknown),
+ "NameUserPrincipal": ValueOf(syscall.NameUserPrincipal),
+ "NetApiBufferFree": ValueOf(syscall.NetApiBufferFree),
+ "NetGetJoinInformation": ValueOf(syscall.NetGetJoinInformation),
+ "NetSetupDomainName": ValueOf(syscall.NetSetupDomainName),
+ "NetSetupUnjoined": ValueOf(syscall.NetSetupUnjoined),
+ "NetSetupUnknownStatus": ValueOf(syscall.NetSetupUnknownStatus),
+ "NetSetupWorkgroupName": ValueOf(syscall.NetSetupWorkgroupName),
+ "NetUserGetInfo": ValueOf(syscall.NetUserGetInfo),
+ "NewCallback": ValueOf(syscall.NewCallback),
+ "NewCallbackCDecl": ValueOf(syscall.NewCallbackCDecl),
+ "NewLazyDLL": ValueOf(syscall.NewLazyDLL),
+ "NsecToFiletime": ValueOf(syscall.NsecToFiletime),
+ "NsecToTimespec": ValueOf(syscall.NsecToTimespec),
+ "NsecToTimeval": ValueOf(syscall.NsecToTimeval),
+ "Ntohs": ValueOf(syscall.Ntohs),
+ "OID_PKIX_KP_SERVER_AUTH": ValueOf(&syscall.OID_PKIX_KP_SERVER_AUTH).Elem(),
+ "OID_SERVER_GATED_CRYPTO": ValueOf(&syscall.OID_SERVER_GATED_CRYPTO).Elem(),
+ "OID_SGC_NETSCAPE": ValueOf(&syscall.OID_SGC_NETSCAPE).Elem(),
+ "OPEN_ALWAYS": ValueOf(syscall.OPEN_ALWAYS),
+ "OPEN_EXISTING": ValueOf(syscall.OPEN_EXISTING),
+ "O_APPEND": ValueOf(syscall.O_APPEND),
+ "O_ASYNC": ValueOf(syscall.O_ASYNC),
+ "O_CLOEXEC": ValueOf(syscall.O_CLOEXEC),
+ "O_CREAT": ValueOf(syscall.O_CREAT),
+ "O_EXCL": ValueOf(syscall.O_EXCL),
+ "O_NOCTTY": ValueOf(syscall.O_NOCTTY),
+ "O_NONBLOCK": ValueOf(syscall.O_NONBLOCK),
+ "O_RDONLY": ValueOf(syscall.O_RDONLY),
+ "O_RDWR": ValueOf(syscall.O_RDWR),
+ "O_SYNC": ValueOf(syscall.O_SYNC),
+ "O_TRUNC": ValueOf(syscall.O_TRUNC),
+ "O_WRONLY": ValueOf(syscall.O_WRONLY),
+ "Open": ValueOf(syscall.Open),
+ "OpenCurrentProcessToken": ValueOf(syscall.OpenCurrentProcessToken),
+ "OpenProcess": ValueOf(syscall.OpenProcess),
+ "OpenProcessToken": ValueOf(syscall.OpenProcessToken),
+ "PAGE_EXECUTE_READ": ValueOf(syscall.PAGE_EXECUTE_READ),
+ "PAGE_EXECUTE_READWRITE": ValueOf(syscall.PAGE_EXECUTE_READWRITE),
+ "PAGE_EXECUTE_WRITECOPY": ValueOf(syscall.PAGE_EXECUTE_WRITECOPY),
+ "PAGE_READONLY": ValueOf(syscall.PAGE_READONLY),
+ "PAGE_READWRITE": ValueOf(syscall.PAGE_READWRITE),
+ "PAGE_WRITECOPY": ValueOf(syscall.PAGE_WRITECOPY),
+ "PFL_HIDDEN": ValueOf(syscall.PFL_HIDDEN),
+ "PFL_MATCHES_PROTOCOL_ZERO": ValueOf(syscall.PFL_MATCHES_PROTOCOL_ZERO),
+ "PFL_MULTIPLE_PROTO_ENTRIES": ValueOf(syscall.PFL_MULTIPLE_PROTO_ENTRIES),
+ "PFL_NETWORKDIRECT_PROVIDER": ValueOf(syscall.PFL_NETWORKDIRECT_PROVIDER),
+ "PFL_RECOMMENDED_PROTO_ENTRY": ValueOf(syscall.PFL_RECOMMENDED_PROTO_ENTRY),
+ "PKCS_7_ASN_ENCODING": ValueOf(syscall.PKCS_7_ASN_ENCODING),
+ "PROCESS_QUERY_INFORMATION": ValueOf(syscall.PROCESS_QUERY_INFORMATION),
+ "PROCESS_TERMINATE": ValueOf(syscall.PROCESS_TERMINATE),
+ "PROV_DH_SCHANNEL": ValueOf(syscall.PROV_DH_SCHANNEL),
+ "PROV_DSS": ValueOf(syscall.PROV_DSS),
+ "PROV_DSS_DH": ValueOf(syscall.PROV_DSS_DH),
+ "PROV_EC_ECDSA_FULL": ValueOf(syscall.PROV_EC_ECDSA_FULL),
+ "PROV_EC_ECDSA_SIG": ValueOf(syscall.PROV_EC_ECDSA_SIG),
+ "PROV_EC_ECNRA_FULL": ValueOf(syscall.PROV_EC_ECNRA_FULL),
+ "PROV_EC_ECNRA_SIG": ValueOf(syscall.PROV_EC_ECNRA_SIG),
+ "PROV_FORTEZZA": ValueOf(syscall.PROV_FORTEZZA),
+ "PROV_INTEL_SEC": ValueOf(syscall.PROV_INTEL_SEC),
+ "PROV_MS_EXCHANGE": ValueOf(syscall.PROV_MS_EXCHANGE),
+ "PROV_REPLACE_OWF": ValueOf(syscall.PROV_REPLACE_OWF),
+ "PROV_RNG": ValueOf(syscall.PROV_RNG),
+ "PROV_RSA_AES": ValueOf(syscall.PROV_RSA_AES),
+ "PROV_RSA_FULL": ValueOf(syscall.PROV_RSA_FULL),
+ "PROV_RSA_SCHANNEL": ValueOf(syscall.PROV_RSA_SCHANNEL),
+ "PROV_RSA_SIG": ValueOf(syscall.PROV_RSA_SIG),
+ "PROV_SPYRUS_LYNKS": ValueOf(syscall.PROV_SPYRUS_LYNKS),
+ "PROV_SSL": ValueOf(syscall.PROV_SSL),
+ "Pipe": ValueOf(syscall.Pipe),
+ "PostQueuedCompletionStatus": ValueOf(syscall.PostQueuedCompletionStatus),
+ "Process32First": ValueOf(syscall.Process32First),
+ "Process32Next": ValueOf(syscall.Process32Next),
+ "REG_BINARY": ValueOf(syscall.REG_BINARY),
+ "REG_DWORD": ValueOf(syscall.REG_DWORD),
+ "REG_DWORD_BIG_ENDIAN": ValueOf(syscall.REG_DWORD_BIG_ENDIAN),
+ "REG_DWORD_LITTLE_ENDIAN": ValueOf(syscall.REG_DWORD_LITTLE_ENDIAN),
+ "REG_EXPAND_SZ": ValueOf(syscall.REG_EXPAND_SZ),
+ "REG_FULL_RESOURCE_DESCRIPTOR": ValueOf(syscall.REG_FULL_RESOURCE_DESCRIPTOR),
+ "REG_LINK": ValueOf(syscall.REG_LINK),
+ "REG_MULTI_SZ": ValueOf(syscall.REG_MULTI_SZ),
+ "REG_NONE": ValueOf(syscall.REG_NONE),
+ "REG_QWORD": ValueOf(syscall.REG_QWORD),
+ "REG_QWORD_LITTLE_ENDIAN": ValueOf(syscall.REG_QWORD_LITTLE_ENDIAN),
+ "REG_RESOURCE_LIST": ValueOf(syscall.REG_RESOURCE_LIST),
+ "REG_RESOURCE_REQUIREMENTS_LIST": ValueOf(syscall.REG_RESOURCE_REQUIREMENTS_LIST),
+ "REG_SZ": ValueOf(syscall.REG_SZ),
+ "Read": ValueOf(syscall.Read),
+ "ReadConsole": ValueOf(syscall.ReadConsole),
+ "ReadDirectoryChanges": ValueOf(syscall.ReadDirectoryChanges),
+ "ReadFile": ValueOf(syscall.ReadFile),
+ "Readlink": ValueOf(syscall.Readlink),
+ "Recvfrom": ValueOf(syscall.Recvfrom),
+ "RegCloseKey": ValueOf(syscall.RegCloseKey),
+ "RegEnumKeyEx": ValueOf(syscall.RegEnumKeyEx),
+ "RegOpenKeyEx": ValueOf(syscall.RegOpenKeyEx),
+ "RegQueryInfoKey": ValueOf(syscall.RegQueryInfoKey),
+ "RegQueryValueEx": ValueOf(syscall.RegQueryValueEx),
+ "RemoveDirectory": ValueOf(syscall.RemoveDirectory),
+ "Rename": ValueOf(syscall.Rename),
+ "Rmdir": ValueOf(syscall.Rmdir),
+ "SHUT_RD": ValueOf(syscall.SHUT_RD),
+ "SHUT_RDWR": ValueOf(syscall.SHUT_RDWR),
+ "SHUT_WR": ValueOf(syscall.SHUT_WR),
+ "SIGABRT": ValueOf(syscall.SIGABRT),
+ "SIGALRM": ValueOf(syscall.SIGALRM),
+ "SIGBUS": ValueOf(syscall.SIGBUS),
+ "SIGFPE": ValueOf(syscall.SIGFPE),
+ "SIGHUP": ValueOf(syscall.SIGHUP),
+ "SIGILL": ValueOf(syscall.SIGILL),
+ "SIGINT": ValueOf(syscall.SIGINT),
+ "SIGKILL": ValueOf(syscall.SIGKILL),
+ "SIGPIPE": ValueOf(syscall.SIGPIPE),
+ "SIGQUIT": ValueOf(syscall.SIGQUIT),
+ "SIGSEGV": ValueOf(syscall.SIGSEGV),
+ "SIGTERM": ValueOf(syscall.SIGTERM),
+ "SIGTRAP": ValueOf(syscall.SIGTRAP),
+ "SIO_GET_EXTENSION_FUNCTION_POINTER": ValueOf(uint32(syscall.SIO_GET_EXTENSION_FUNCTION_POINTER)),
+ "SIO_GET_INTERFACE_LIST": ValueOf(syscall.SIO_GET_INTERFACE_LIST),
+ "SIO_KEEPALIVE_VALS": ValueOf(uint32(syscall.SIO_KEEPALIVE_VALS)),
+ "SIO_UDP_CONNRESET": ValueOf(uint32(syscall.SIO_UDP_CONNRESET)),
+ "SOCK_DGRAM": ValueOf(syscall.SOCK_DGRAM),
+ "SOCK_RAW": ValueOf(syscall.SOCK_RAW),
+ "SOCK_SEQPACKET": ValueOf(syscall.SOCK_SEQPACKET),
+ "SOCK_STREAM": ValueOf(syscall.SOCK_STREAM),
+ "SOL_SOCKET": ValueOf(syscall.SOL_SOCKET),
+ "SOMAXCONN": ValueOf(syscall.SOMAXCONN),
+ "SO_BROADCAST": ValueOf(syscall.SO_BROADCAST),
+ "SO_DONTROUTE": ValueOf(syscall.SO_DONTROUTE),
+ "SO_KEEPALIVE": ValueOf(syscall.SO_KEEPALIVE),
+ "SO_LINGER": ValueOf(syscall.SO_LINGER),
+ "SO_RCVBUF": ValueOf(syscall.SO_RCVBUF),
+ "SO_REUSEADDR": ValueOf(syscall.SO_REUSEADDR),
+ "SO_SNDBUF": ValueOf(syscall.SO_SNDBUF),
+ "SO_UPDATE_ACCEPT_CONTEXT": ValueOf(syscall.SO_UPDATE_ACCEPT_CONTEXT),
+ "SO_UPDATE_CONNECT_CONTEXT": ValueOf(syscall.SO_UPDATE_CONNECT_CONTEXT),
+ "STANDARD_RIGHTS_ALL": ValueOf(syscall.STANDARD_RIGHTS_ALL),
+ "STANDARD_RIGHTS_EXECUTE": ValueOf(syscall.STANDARD_RIGHTS_EXECUTE),
+ "STANDARD_RIGHTS_READ": ValueOf(syscall.STANDARD_RIGHTS_READ),
+ "STANDARD_RIGHTS_REQUIRED": ValueOf(syscall.STANDARD_RIGHTS_REQUIRED),
+ "STANDARD_RIGHTS_WRITE": ValueOf(syscall.STANDARD_RIGHTS_WRITE),
+ "STARTF_USESHOWWINDOW": ValueOf(syscall.STARTF_USESHOWWINDOW),
+ "STARTF_USESTDHANDLES": ValueOf(syscall.STARTF_USESTDHANDLES),
+ "STD_ERROR_HANDLE": ValueOf(syscall.STD_ERROR_HANDLE),
+ "STD_INPUT_HANDLE": ValueOf(syscall.STD_INPUT_HANDLE),
+ "STD_OUTPUT_HANDLE": ValueOf(syscall.STD_OUTPUT_HANDLE),
+ "SUBLANG_ENGLISH_US": ValueOf(syscall.SUBLANG_ENGLISH_US),
+ "SW_FORCEMINIMIZE": ValueOf(syscall.SW_FORCEMINIMIZE),
+ "SW_HIDE": ValueOf(syscall.SW_HIDE),
+ "SW_MAXIMIZE": ValueOf(syscall.SW_MAXIMIZE),
+ "SW_MINIMIZE": ValueOf(syscall.SW_MINIMIZE),
+ "SW_NORMAL": ValueOf(syscall.SW_NORMAL),
+ "SW_RESTORE": ValueOf(syscall.SW_RESTORE),
+ "SW_SHOW": ValueOf(syscall.SW_SHOW),
+ "SW_SHOWDEFAULT": ValueOf(syscall.SW_SHOWDEFAULT),
+ "SW_SHOWMAXIMIZED": ValueOf(syscall.SW_SHOWMAXIMIZED),
+ "SW_SHOWMINIMIZED": ValueOf(syscall.SW_SHOWMINIMIZED),
+ "SW_SHOWMINNOACTIVE": ValueOf(syscall.SW_SHOWMINNOACTIVE),
+ "SW_SHOWNA": ValueOf(syscall.SW_SHOWNA),
+ "SW_SHOWNOACTIVATE": ValueOf(syscall.SW_SHOWNOACTIVATE),
+ "SW_SHOWNORMAL": ValueOf(syscall.SW_SHOWNORMAL),
+ "SYMBOLIC_LINK_FLAG_DIRECTORY": ValueOf(syscall.SYMBOLIC_LINK_FLAG_DIRECTORY),
+ "SYNCHRONIZE": ValueOf(syscall.SYNCHRONIZE),
+ "S_IFBLK": ValueOf(syscall.S_IFBLK),
+ "S_IFCHR": ValueOf(syscall.S_IFCHR),
+ "S_IFDIR": ValueOf(syscall.S_IFDIR),
+ "S_IFIFO": ValueOf(syscall.S_IFIFO),
+ "S_IFLNK": ValueOf(syscall.S_IFLNK),
+ "S_IFMT": ValueOf(syscall.S_IFMT),
+ "S_IFREG": ValueOf(syscall.S_IFREG),
+ "S_IFSOCK": ValueOf(syscall.S_IFSOCK),
+ "S_IRUSR": ValueOf(syscall.S_IRUSR),
+ "S_ISGID": ValueOf(syscall.S_ISGID),
+ "S_ISUID": ValueOf(syscall.S_ISUID),
+ "S_ISVTX": ValueOf(syscall.S_ISVTX),
+ "S_IWRITE": ValueOf(syscall.S_IWRITE),
+ "S_IWUSR": ValueOf(syscall.S_IWUSR),
+ "S_IXUSR": ValueOf(syscall.S_IXUSR),
+ "Seek": ValueOf(syscall.Seek),
+ "Sendto": ValueOf(syscall.Sendto),
+ "SetCurrentDirectory": ValueOf(syscall.SetCurrentDirectory),
+ "SetEndOfFile": ValueOf(syscall.SetEndOfFile),
+ "SetEnvironmentVariable": ValueOf(syscall.SetEnvironmentVariable),
+ "SetFileAttributes": ValueOf(syscall.SetFileAttributes),
+ "SetFileCompletionNotificationModes": ValueOf(syscall.SetFileCompletionNotificationModes),
+ "SetFilePointer": ValueOf(syscall.SetFilePointer),
+ "SetFileTime": ValueOf(syscall.SetFileTime),
+ "SetHandleInformation": ValueOf(syscall.SetHandleInformation),
+ "SetNonblock": ValueOf(syscall.SetNonblock),
+ "Setenv": ValueOf(syscall.Setenv),
+ "Setsockopt": ValueOf(syscall.Setsockopt),
+ "SetsockoptIPMreq": ValueOf(syscall.SetsockoptIPMreq),
+ "SetsockoptIPv6Mreq": ValueOf(syscall.SetsockoptIPv6Mreq),
+ "SetsockoptInet4Addr": ValueOf(syscall.SetsockoptInet4Addr),
+ "SetsockoptInt": ValueOf(syscall.SetsockoptInt),
+ "SetsockoptLinger": ValueOf(syscall.SetsockoptLinger),
+ "SetsockoptTimeval": ValueOf(syscall.SetsockoptTimeval),
+ "Shutdown": ValueOf(syscall.Shutdown),
+ "SidTypeAlias": ValueOf(syscall.SidTypeAlias),
+ "SidTypeComputer": ValueOf(syscall.SidTypeComputer),
+ "SidTypeDeletedAccount": ValueOf(syscall.SidTypeDeletedAccount),
+ "SidTypeDomain": ValueOf(syscall.SidTypeDomain),
+ "SidTypeGroup": ValueOf(syscall.SidTypeGroup),
+ "SidTypeInvalid": ValueOf(syscall.SidTypeInvalid),
+ "SidTypeLabel": ValueOf(syscall.SidTypeLabel),
+ "SidTypeUnknown": ValueOf(syscall.SidTypeUnknown),
+ "SidTypeUser": ValueOf(syscall.SidTypeUser),
+ "SidTypeWellKnownGroup": ValueOf(syscall.SidTypeWellKnownGroup),
+ "Socket": ValueOf(syscall.Socket),
+ "SocketDisableIPv6": ValueOf(&syscall.SocketDisableIPv6).Elem(),
+ "StartProcess": ValueOf(syscall.StartProcess),
+ "Stderr": ValueOf(&syscall.Stderr).Elem(),
+ "Stdin": ValueOf(&syscall.Stdin).Elem(),
+ "Stdout": ValueOf(&syscall.Stdout).Elem(),
+ "StringBytePtr": ValueOf(syscall.StringBytePtr),
+ "StringByteSlice": ValueOf(syscall.StringByteSlice),
+ "StringToSid": ValueOf(syscall.StringToSid),
+ "StringToUTF16": ValueOf(syscall.StringToUTF16),
+ "StringToUTF16Ptr": ValueOf(syscall.StringToUTF16Ptr),
+ "Symlink": ValueOf(syscall.Symlink),
+ "Syscall": ValueOf(syscall.Syscall),
+ "Syscall12": ValueOf(syscall.Syscall12),
+ "Syscall15": ValueOf(syscall.Syscall15),
+ "Syscall6": ValueOf(syscall.Syscall6),
+ "Syscall9": ValueOf(syscall.Syscall9),
+ "TCP_NODELAY": ValueOf(syscall.TCP_NODELAY),
+ "TF_DISCONNECT": ValueOf(syscall.TF_DISCONNECT),
+ "TF_REUSE_SOCKET": ValueOf(syscall.TF_REUSE_SOCKET),
+ "TF_USE_DEFAULT_WORKER": ValueOf(syscall.TF_USE_DEFAULT_WORKER),
+ "TF_USE_KERNEL_APC": ValueOf(syscall.TF_USE_KERNEL_APC),
+ "TF_USE_SYSTEM_THREAD": ValueOf(syscall.TF_USE_SYSTEM_THREAD),
+ "TF_WRITE_BEHIND": ValueOf(syscall.TF_WRITE_BEHIND),
+ "TH32CS_INHERIT": ValueOf(uint32(syscall.TH32CS_INHERIT)),
+ "TH32CS_SNAPALL": ValueOf(syscall.TH32CS_SNAPALL),
+ "TH32CS_SNAPHEAPLIST": ValueOf(syscall.TH32CS_SNAPHEAPLIST),
+ "TH32CS_SNAPMODULE": ValueOf(syscall.TH32CS_SNAPMODULE),
+ "TH32CS_SNAPMODULE32": ValueOf(syscall.TH32CS_SNAPMODULE32),
+ "TH32CS_SNAPPROCESS": ValueOf(syscall.TH32CS_SNAPPROCESS),
+ "TH32CS_SNAPTHREAD": ValueOf(syscall.TH32CS_SNAPTHREAD),
+ "TIME_ZONE_ID_DAYLIGHT": ValueOf(syscall.TIME_ZONE_ID_DAYLIGHT),
+ "TIME_ZONE_ID_STANDARD": ValueOf(syscall.TIME_ZONE_ID_STANDARD),
+ "TIME_ZONE_ID_UNKNOWN": ValueOf(syscall.TIME_ZONE_ID_UNKNOWN),
+ "TOKEN_ADJUST_DEFAULT": ValueOf(syscall.TOKEN_ADJUST_DEFAULT),
+ "TOKEN_ADJUST_GROUPS": ValueOf(syscall.TOKEN_ADJUST_GROUPS),
+ "TOKEN_ADJUST_PRIVILEGES": ValueOf(syscall.TOKEN_ADJUST_PRIVILEGES),
+ "TOKEN_ALL_ACCESS": ValueOf(syscall.TOKEN_ALL_ACCESS),
+ "TOKEN_ASSIGN_PRIMARY": ValueOf(syscall.TOKEN_ASSIGN_PRIMARY),
+ "TOKEN_DUPLICATE": ValueOf(syscall.TOKEN_DUPLICATE),
+ "TOKEN_EXECUTE": ValueOf(syscall.TOKEN_EXECUTE),
+ "TOKEN_IMPERSONATE": ValueOf(syscall.TOKEN_IMPERSONATE),
+ "TOKEN_QUERY": ValueOf(syscall.TOKEN_QUERY),
+ "TOKEN_QUERY_SOURCE": ValueOf(syscall.TOKEN_QUERY_SOURCE),
+ "TOKEN_READ": ValueOf(syscall.TOKEN_READ),
+ "TOKEN_WRITE": ValueOf(syscall.TOKEN_WRITE),
+ "TRUNCATE_EXISTING": ValueOf(syscall.TRUNCATE_EXISTING),
+ "TerminateProcess": ValueOf(syscall.TerminateProcess),
+ "TimespecToNsec": ValueOf(syscall.TimespecToNsec),
+ "TokenAccessInformation": ValueOf(syscall.TokenAccessInformation),
+ "TokenAuditPolicy": ValueOf(syscall.TokenAuditPolicy),
+ "TokenDefaultDacl": ValueOf(syscall.TokenDefaultDacl),
+ "TokenElevation": ValueOf(syscall.TokenElevation),
+ "TokenElevationType": ValueOf(syscall.TokenElevationType),
+ "TokenGroups": ValueOf(syscall.TokenGroups),
+ "TokenGroupsAndPrivileges": ValueOf(syscall.TokenGroupsAndPrivileges),
+ "TokenHasRestrictions": ValueOf(syscall.TokenHasRestrictions),
+ "TokenImpersonationLevel": ValueOf(syscall.TokenImpersonationLevel),
+ "TokenIntegrityLevel": ValueOf(syscall.TokenIntegrityLevel),
+ "TokenLinkedToken": ValueOf(syscall.TokenLinkedToken),
+ "TokenLogonSid": ValueOf(syscall.TokenLogonSid),
+ "TokenMandatoryPolicy": ValueOf(syscall.TokenMandatoryPolicy),
+ "TokenOrigin": ValueOf(syscall.TokenOrigin),
+ "TokenOwner": ValueOf(syscall.TokenOwner),
+ "TokenPrimaryGroup": ValueOf(syscall.TokenPrimaryGroup),
+ "TokenPrivileges": ValueOf(syscall.TokenPrivileges),
+ "TokenRestrictedSids": ValueOf(syscall.TokenRestrictedSids),
+ "TokenSandBoxInert": ValueOf(syscall.TokenSandBoxInert),
+ "TokenSessionId": ValueOf(syscall.TokenSessionId),
+ "TokenSessionReference": ValueOf(syscall.TokenSessionReference),
+ "TokenSource": ValueOf(syscall.TokenSource),
+ "TokenStatistics": ValueOf(syscall.TokenStatistics),
+ "TokenType": ValueOf(syscall.TokenType),
+ "TokenUIAccess": ValueOf(syscall.TokenUIAccess),
+ "TokenUser": ValueOf(syscall.TokenUser),
+ "TokenVirtualizationAllowed": ValueOf(syscall.TokenVirtualizationAllowed),
+ "TokenVirtualizationEnabled": ValueOf(syscall.TokenVirtualizationEnabled),
+ "TranslateAccountName": ValueOf(syscall.TranslateAccountName),
+ "TranslateName": ValueOf(syscall.TranslateName),
+ "TransmitFile": ValueOf(syscall.TransmitFile),
+ "USAGE_MATCH_TYPE_AND": ValueOf(syscall.USAGE_MATCH_TYPE_AND),
+ "USAGE_MATCH_TYPE_OR": ValueOf(syscall.USAGE_MATCH_TYPE_OR),
+ "UTF16FromString": ValueOf(syscall.UTF16FromString),
+ "UTF16PtrFromString": ValueOf(syscall.UTF16PtrFromString),
+ "UTF16ToString": ValueOf(syscall.UTF16ToString),
+ "Unlink": ValueOf(syscall.Unlink),
+ "UnmapViewOfFile": ValueOf(syscall.UnmapViewOfFile),
+ "Unsetenv": ValueOf(syscall.Unsetenv),
+ "Utimes": ValueOf(syscall.Utimes),
+ "UtimesNano": ValueOf(syscall.UtimesNano),
+ "VirtualLock": ValueOf(syscall.VirtualLock),
+ "VirtualUnlock": ValueOf(syscall.VirtualUnlock),
+ "WAIT_ABANDONED": ValueOf(syscall.WAIT_ABANDONED),
+ "WAIT_FAILED": ValueOf(uint32(syscall.WAIT_FAILED)),
+ "WAIT_OBJECT_0": ValueOf(syscall.WAIT_OBJECT_0),
+ "WAIT_TIMEOUT": ValueOf(syscall.WAIT_TIMEOUT),
+ "WSACleanup": ValueOf(syscall.WSACleanup),
+ "WSADESCRIPTION_LEN": ValueOf(syscall.WSADESCRIPTION_LEN),
+ "WSAEACCES": ValueOf(syscall.WSAEACCES),
+ "WSAECONNABORTED": ValueOf(syscall.WSAECONNABORTED),
+ "WSAECONNRESET": ValueOf(syscall.WSAECONNRESET),
+ "WSAEnumProtocols": ValueOf(syscall.WSAEnumProtocols),
+ "WSAID_CONNECTEX": ValueOf(&syscall.WSAID_CONNECTEX).Elem(),
+ "WSAIoctl": ValueOf(syscall.WSAIoctl),
+ "WSAPROTOCOL_LEN": ValueOf(syscall.WSAPROTOCOL_LEN),
+ "WSARecv": ValueOf(syscall.WSARecv),
+ "WSARecvFrom": ValueOf(syscall.WSARecvFrom),
+ "WSASYS_STATUS_LEN": ValueOf(syscall.WSASYS_STATUS_LEN),
+ "WSASend": ValueOf(syscall.WSASend),
+ "WSASendTo": ValueOf(syscall.WSASendTo),
+ "WSASendto": ValueOf(syscall.WSASendto),
+ "WSAStartup": ValueOf(syscall.WSAStartup),
+ "WaitForSingleObject": ValueOf(syscall.WaitForSingleObject),
+ "Write": ValueOf(syscall.Write),
+ "WriteConsole": ValueOf(syscall.WriteConsole),
+ "WriteFile": ValueOf(syscall.WriteFile),
+ "X509_ASN_ENCODING": ValueOf(syscall.X509_ASN_ENCODING),
+ "XP1_CONNECTIONLESS": ValueOf(syscall.XP1_CONNECTIONLESS),
+ "XP1_CONNECT_DATA": ValueOf(syscall.XP1_CONNECT_DATA),
+ "XP1_DISCONNECT_DATA": ValueOf(syscall.XP1_DISCONNECT_DATA),
+ "XP1_EXPEDITED_DATA": ValueOf(syscall.XP1_EXPEDITED_DATA),
+ "XP1_GRACEFUL_CLOSE": ValueOf(syscall.XP1_GRACEFUL_CLOSE),
+ "XP1_GUARANTEED_DELIVERY": ValueOf(syscall.XP1_GUARANTEED_DELIVERY),
+ "XP1_GUARANTEED_ORDER": ValueOf(syscall.XP1_GUARANTEED_ORDER),
+ "XP1_IFS_HANDLES": ValueOf(syscall.XP1_IFS_HANDLES),
+ "XP1_MESSAGE_ORIENTED": ValueOf(syscall.XP1_MESSAGE_ORIENTED),
+ "XP1_MULTIPOINT_CONTROL_PLANE": ValueOf(syscall.XP1_MULTIPOINT_CONTROL_PLANE),
+ "XP1_MULTIPOINT_DATA_PLANE": ValueOf(syscall.XP1_MULTIPOINT_DATA_PLANE),
+ "XP1_PARTIAL_MESSAGE": ValueOf(syscall.XP1_PARTIAL_MESSAGE),
+ "XP1_PSEUDO_STREAM": ValueOf(syscall.XP1_PSEUDO_STREAM),
+ "XP1_QOS_SUPPORTED": ValueOf(syscall.XP1_QOS_SUPPORTED),
+ "XP1_SAN_SUPPORT_SDP": ValueOf(syscall.XP1_SAN_SUPPORT_SDP),
+ "XP1_SUPPORT_BROADCAST": ValueOf(syscall.XP1_SUPPORT_BROADCAST),
+ "XP1_SUPPORT_MULTIPOINT": ValueOf(syscall.XP1_SUPPORT_MULTIPOINT),
+ "XP1_UNI_RECV": ValueOf(syscall.XP1_UNI_RECV),
+ "XP1_UNI_SEND": ValueOf(syscall.XP1_UNI_SEND),
+ }, Types: map[string]Type{
+ "AddrinfoW": TypeOf((*syscall.AddrinfoW)(nil)).Elem(),
+ "ByHandleFileInformation": TypeOf((*syscall.ByHandleFileInformation)(nil)).Elem(),
+ "CertChainContext": TypeOf((*syscall.CertChainContext)(nil)).Elem(),
+ "CertChainElement": TypeOf((*syscall.CertChainElement)(nil)).Elem(),
+ "CertChainPara": TypeOf((*syscall.CertChainPara)(nil)).Elem(),
+ "CertChainPolicyPara": TypeOf((*syscall.CertChainPolicyPara)(nil)).Elem(),
+ "CertChainPolicyStatus": TypeOf((*syscall.CertChainPolicyStatus)(nil)).Elem(),
+ "CertContext": TypeOf((*syscall.CertContext)(nil)).Elem(),
+ "CertEnhKeyUsage": TypeOf((*syscall.CertEnhKeyUsage)(nil)).Elem(),
+ "CertRevocationInfo": TypeOf((*syscall.CertRevocationInfo)(nil)).Elem(),
+ "CertSimpleChain": TypeOf((*syscall.CertSimpleChain)(nil)).Elem(),
+ "CertTrustStatus": TypeOf((*syscall.CertTrustStatus)(nil)).Elem(),
+ "CertUsageMatch": TypeOf((*syscall.CertUsageMatch)(nil)).Elem(),
+ "Conn": TypeOf((*syscall.Conn)(nil)).Elem(),
+ "DLL": TypeOf((*syscall.DLL)(nil)).Elem(),
+ "DLLError": TypeOf((*syscall.DLLError)(nil)).Elem(),
+ "DNSMXData": TypeOf((*syscall.DNSMXData)(nil)).Elem(),
+ "DNSPTRData": TypeOf((*syscall.DNSPTRData)(nil)).Elem(),
+ "DNSRecord": TypeOf((*syscall.DNSRecord)(nil)).Elem(),
+ "DNSSRVData": TypeOf((*syscall.DNSSRVData)(nil)).Elem(),
+ "DNSTXTData": TypeOf((*syscall.DNSTXTData)(nil)).Elem(),
+ "Errno": TypeOf((*syscall.Errno)(nil)).Elem(),
+ "FileNotifyInformation": TypeOf((*syscall.FileNotifyInformation)(nil)).Elem(),
+ "Filetime": TypeOf((*syscall.Filetime)(nil)).Elem(),
+ "GUID": TypeOf((*syscall.GUID)(nil)).Elem(),
+ "Handle": TypeOf((*syscall.Handle)(nil)).Elem(),
+ "Hostent": TypeOf((*syscall.Hostent)(nil)).Elem(),
+ "IPMreq": TypeOf((*syscall.IPMreq)(nil)).Elem(),
+ "IPv6Mreq": TypeOf((*syscall.IPv6Mreq)(nil)).Elem(),
+ "InterfaceInfo": TypeOf((*syscall.InterfaceInfo)(nil)).Elem(),
+ "IpAdapterInfo": TypeOf((*syscall.IpAdapterInfo)(nil)).Elem(),
+ "IpAddrString": TypeOf((*syscall.IpAddrString)(nil)).Elem(),
+ "IpAddressString": TypeOf((*syscall.IpAddressString)(nil)).Elem(),
+ "IpMaskString": TypeOf((*syscall.IpMaskString)(nil)).Elem(),
+ "LazyDLL": TypeOf((*syscall.LazyDLL)(nil)).Elem(),
+ "LazyProc": TypeOf((*syscall.LazyProc)(nil)).Elem(),
+ "Linger": TypeOf((*syscall.Linger)(nil)).Elem(),
+ "MibIfRow": TypeOf((*syscall.MibIfRow)(nil)).Elem(),
+ "Overlapped": TypeOf((*syscall.Overlapped)(nil)).Elem(),
+ "Proc": TypeOf((*syscall.Proc)(nil)).Elem(),
+ "ProcAttr": TypeOf((*syscall.ProcAttr)(nil)).Elem(),
+ "ProcessEntry32": TypeOf((*syscall.ProcessEntry32)(nil)).Elem(),
+ "ProcessInformation": TypeOf((*syscall.ProcessInformation)(nil)).Elem(),
+ "Protoent": TypeOf((*syscall.Protoent)(nil)).Elem(),
+ "RawConn": TypeOf((*syscall.RawConn)(nil)).Elem(),
+ "RawSockaddr": TypeOf((*syscall.RawSockaddr)(nil)).Elem(),
+ "RawSockaddrAny": TypeOf((*syscall.RawSockaddrAny)(nil)).Elem(),
+ "RawSockaddrInet4": TypeOf((*syscall.RawSockaddrInet4)(nil)).Elem(),
+ "RawSockaddrInet6": TypeOf((*syscall.RawSockaddrInet6)(nil)).Elem(),
+ "Rusage": TypeOf((*syscall.Rusage)(nil)).Elem(),
+ "SID": TypeOf((*syscall.SID)(nil)).Elem(),
+ "SIDAndAttributes": TypeOf((*syscall.SIDAndAttributes)(nil)).Elem(),
+ "SSLExtraCertChainPolicyPara": TypeOf((*syscall.SSLExtraCertChainPolicyPara)(nil)).Elem(),
+ "SecurityAttributes": TypeOf((*syscall.SecurityAttributes)(nil)).Elem(),
+ "Servent": TypeOf((*syscall.Servent)(nil)).Elem(),
+ "Signal": TypeOf((*syscall.Signal)(nil)).Elem(),
+ "Sockaddr": TypeOf((*syscall.Sockaddr)(nil)).Elem(),
+ "SockaddrGen": TypeOf((*syscall.SockaddrGen)(nil)).Elem(),
+ "SockaddrInet4": TypeOf((*syscall.SockaddrInet4)(nil)).Elem(),
+ "SockaddrInet6": TypeOf((*syscall.SockaddrInet6)(nil)).Elem(),
+ "SockaddrUnix": TypeOf((*syscall.SockaddrUnix)(nil)).Elem(),
+ "StartupInfo": TypeOf((*syscall.StartupInfo)(nil)).Elem(),
+ "SysProcAttr": TypeOf((*syscall.SysProcAttr)(nil)).Elem(),
+ "Systemtime": TypeOf((*syscall.Systemtime)(nil)).Elem(),
+ "TCPKeepalive": TypeOf((*syscall.TCPKeepalive)(nil)).Elem(),
+ "Timespec": TypeOf((*syscall.Timespec)(nil)).Elem(),
+ "Timeval": TypeOf((*syscall.Timeval)(nil)).Elem(),
+ "Timezoneinformation": TypeOf((*syscall.Timezoneinformation)(nil)).Elem(),
+ "Token": TypeOf((*syscall.Token)(nil)).Elem(),
+ "Tokenprimarygroup": TypeOf((*syscall.Tokenprimarygroup)(nil)).Elem(),
+ "Tokenuser": TypeOf((*syscall.Tokenuser)(nil)).Elem(),
+ "TransmitFileBuffers": TypeOf((*syscall.TransmitFileBuffers)(nil)).Elem(),
+ "UserInfo10": TypeOf((*syscall.UserInfo10)(nil)).Elem(),
+ "WSABuf": TypeOf((*syscall.WSABuf)(nil)).Elem(),
+ "WSAData": TypeOf((*syscall.WSAData)(nil)).Elem(),
+ "WSAProtocolChain": TypeOf((*syscall.WSAProtocolChain)(nil)).Elem(),
+ "WSAProtocolInfo": TypeOf((*syscall.WSAProtocolInfo)(nil)).Elem(),
+ "WaitStatus": TypeOf((*syscall.WaitStatus)(nil)).Elem(),
+ "Win32FileAttributeData": TypeOf((*syscall.Win32FileAttributeData)(nil)).Elem(),
+ "Win32finddata": TypeOf((*syscall.Win32finddata)(nil)).Elem(),
+ }, Proxies: map[string]Type{
+ "Conn": TypeOf((*Conn_syscall)(nil)).Elem(),
+ "RawConn": TypeOf((*RawConn_syscall)(nil)).Elem(),
+ }, Untypeds: map[string]string{
+ "AF_INET": "int:2",
+ "AF_INET6": "int:23",
+ "AF_NETBIOS": "int:17",
+ "AF_UNIX": "int:1",
+ "AF_UNSPEC": "int:0",
+ "AI_CANONNAME": "int:2",
+ "AI_NUMERICHOST": "int:4",
+ "AI_PASSIVE": "int:1",
+ "APPLICATION_ERROR": "int:536870912",
+ "AUTHTYPE_CLIENT": "int:1",
+ "AUTHTYPE_SERVER": "int:2",
+ "BASE_PROTOCOL": "int:1",
+ "CERT_CHAIN_POLICY_AUTHENTICODE": "int:2",
+ "CERT_CHAIN_POLICY_AUTHENTICODE_TS": "int:3",
+ "CERT_CHAIN_POLICY_BASE": "int:1",
+ "CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": "int:5",
+ "CERT_CHAIN_POLICY_EV": "int:8",
+ "CERT_CHAIN_POLICY_MICROSOFT_ROOT": "int:7",
+ "CERT_CHAIN_POLICY_NT_AUTH": "int:6",
+ "CERT_CHAIN_POLICY_SSL": "int:4",
+ "CERT_E_CN_NO_MATCH": "int:2148204815",
+ "CERT_E_EXPIRED": "int:2148204801",
+ "CERT_E_PURPOSE": "int:2148204806",
+ "CERT_E_ROLE": "int:2148204803",
+ "CERT_E_UNTRUSTEDROOT": "int:2148204809",
+ "CERT_STORE_ADD_ALWAYS": "int:4",
+ "CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG": "int:4",
+ "CERT_STORE_PROV_MEMORY": "int:2",
+ "CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT": "int:32768",
+ "CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT": "int:8192",
+ "CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT": "int:16384",
+ "CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT": "int:134217728",
+ "CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT": "int:4096",
+ "CERT_TRUST_INVALID_BASIC_CONSTRAINTS": "int:1024",
+ "CERT_TRUST_INVALID_EXTENSION": "int:256",
+ "CERT_TRUST_INVALID_NAME_CONSTRAINTS": "int:2048",
+ "CERT_TRUST_INVALID_POLICY_CONSTRAINTS": "int:512",
+ "CERT_TRUST_IS_CYCLIC": "int:128",
+ "CERT_TRUST_IS_EXPLICIT_DISTRUST": "int:67108864",
+ "CERT_TRUST_IS_NOT_SIGNATURE_VALID": "int:8",
+ "CERT_TRUST_IS_NOT_TIME_VALID": "int:1",
+ "CERT_TRUST_IS_NOT_VALID_FOR_USAGE": "int:16",
+ "CERT_TRUST_IS_OFFLINE_REVOCATION": "int:16777216",
+ "CERT_TRUST_IS_REVOKED": "int:4",
+ "CERT_TRUST_IS_UNTRUSTED_ROOT": "int:32",
+ "CERT_TRUST_NO_ERROR": "int:0",
+ "CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY": "int:33554432",
+ "CERT_TRUST_REVOCATION_STATUS_UNKNOWN": "int:64",
+ "CREATE_ALWAYS": "int:2",
+ "CREATE_NEW": "int:1",
+ "CREATE_NEW_PROCESS_GROUP": "int:512",
+ "CREATE_UNICODE_ENVIRONMENT": "int:1024",
+ "CRYPT_DEFAULT_CONTAINER_OPTIONAL": "int:128",
+ "CRYPT_DELETEKEYSET": "int:16",
+ "CRYPT_MACHINE_KEYSET": "int:32",
+ "CRYPT_NEWKEYSET": "int:8",
+ "CRYPT_SILENT": "int:64",
+ "CRYPT_VERIFYCONTEXT": "int:4026531840",
+ "CTRL_BREAK_EVENT": "int:1",
+ "CTRL_C_EVENT": "int:0",
+ "DNS_INFO_NO_RECORDS": "int:9501",
+ "DNS_TYPE_A": "int:1",
+ "DNS_TYPE_A6": "int:38",
+ "DNS_TYPE_AAAA": "int:28",
+ "DNS_TYPE_ADDRS": "int:248",
+ "DNS_TYPE_AFSDB": "int:18",
+ "DNS_TYPE_ALL": "int:255",
+ "DNS_TYPE_ANY": "int:255",
+ "DNS_TYPE_ATMA": "int:34",
+ "DNS_TYPE_AXFR": "int:252",
+ "DNS_TYPE_CERT": "int:37",
+ "DNS_TYPE_CNAME": "int:5",
+ "DNS_TYPE_DHCID": "int:49",
+ "DNS_TYPE_DNAME": "int:39",
+ "DNS_TYPE_DNSKEY": "int:48",
+ "DNS_TYPE_DS": "int:43",
+ "DNS_TYPE_EID": "int:31",
+ "DNS_TYPE_GID": "int:102",
+ "DNS_TYPE_GPOS": "int:27",
+ "DNS_TYPE_HINFO": "int:13",
+ "DNS_TYPE_ISDN": "int:20",
+ "DNS_TYPE_IXFR": "int:251",
+ "DNS_TYPE_KEY": "int:25",
+ "DNS_TYPE_KX": "int:36",
+ "DNS_TYPE_LOC": "int:29",
+ "DNS_TYPE_MAILA": "int:254",
+ "DNS_TYPE_MAILB": "int:253",
+ "DNS_TYPE_MB": "int:7",
+ "DNS_TYPE_MD": "int:3",
+ "DNS_TYPE_MF": "int:4",
+ "DNS_TYPE_MG": "int:8",
+ "DNS_TYPE_MINFO": "int:14",
+ "DNS_TYPE_MR": "int:9",
+ "DNS_TYPE_MX": "int:15",
+ "DNS_TYPE_NAPTR": "int:35",
+ "DNS_TYPE_NBSTAT": "int:65281",
+ "DNS_TYPE_NIMLOC": "int:32",
+ "DNS_TYPE_NS": "int:2",
+ "DNS_TYPE_NSAP": "int:22",
+ "DNS_TYPE_NSAPPTR": "int:23",
+ "DNS_TYPE_NSEC": "int:47",
+ "DNS_TYPE_NULL": "int:10",
+ "DNS_TYPE_NXT": "int:30",
+ "DNS_TYPE_OPT": "int:41",
+ "DNS_TYPE_PTR": "int:12",
+ "DNS_TYPE_PX": "int:26",
+ "DNS_TYPE_RP": "int:17",
+ "DNS_TYPE_RRSIG": "int:46",
+ "DNS_TYPE_RT": "int:21",
+ "DNS_TYPE_SIG": "int:24",
+ "DNS_TYPE_SINK": "int:40",
+ "DNS_TYPE_SOA": "int:6",
+ "DNS_TYPE_SRV": "int:33",
+ "DNS_TYPE_TEXT": "int:16",
+ "DNS_TYPE_TKEY": "int:249",
+ "DNS_TYPE_TSIG": "int:250",
+ "DNS_TYPE_UID": "int:101",
+ "DNS_TYPE_UINFO": "int:100",
+ "DNS_TYPE_UNSPEC": "int:103",
+ "DNS_TYPE_WINS": "int:65281",
+ "DNS_TYPE_WINSR": "int:65282",
+ "DNS_TYPE_WKS": "int:11",
+ "DNS_TYPE_X25": "int:19",
+ "DUPLICATE_CLOSE_SOURCE": "int:1",
+ "DUPLICATE_SAME_ACCESS": "int:2",
+ "DnsSectionAdditional": "int:3",
+ "DnsSectionAnswer": "int:1",
+ "DnsSectionAuthority": "int:2",
+ "DnsSectionQuestion": "int:0",
+ "FILE_ACTION_ADDED": "int:1",
+ "FILE_ACTION_MODIFIED": "int:3",
+ "FILE_ACTION_REMOVED": "int:2",
+ "FILE_ACTION_RENAMED_NEW_NAME": "int:5",
+ "FILE_ACTION_RENAMED_OLD_NAME": "int:4",
+ "FILE_APPEND_DATA": "int:4",
+ "FILE_ATTRIBUTE_ARCHIVE": "int:32",
+ "FILE_ATTRIBUTE_DIRECTORY": "int:16",
+ "FILE_ATTRIBUTE_HIDDEN": "int:2",
+ "FILE_ATTRIBUTE_NORMAL": "int:128",
+ "FILE_ATTRIBUTE_READONLY": "int:1",
+ "FILE_ATTRIBUTE_REPARSE_POINT": "int:1024",
+ "FILE_ATTRIBUTE_SYSTEM": "int:4",
+ "FILE_BEGIN": "int:0",
+ "FILE_CURRENT": "int:1",
+ "FILE_END": "int:2",
+ "FILE_FLAG_BACKUP_SEMANTICS": "int:33554432",
+ "FILE_FLAG_OPEN_REPARSE_POINT": "int:2097152",
+ "FILE_FLAG_OVERLAPPED": "int:1073741824",
+ "FILE_LIST_DIRECTORY": "int:1",
+ "FILE_MAP_COPY": "int:1",
+ "FILE_MAP_EXECUTE": "int:32",
+ "FILE_MAP_READ": "int:4",
+ "FILE_MAP_WRITE": "int:2",
+ "FILE_NOTIFY_CHANGE_ATTRIBUTES": "int:4",
+ "FILE_NOTIFY_CHANGE_CREATION": "int:64",
+ "FILE_NOTIFY_CHANGE_DIR_NAME": "int:2",
+ "FILE_NOTIFY_CHANGE_FILE_NAME": "int:1",
+ "FILE_NOTIFY_CHANGE_LAST_ACCESS": "int:32",
+ "FILE_NOTIFY_CHANGE_LAST_WRITE": "int:16",
+ "FILE_NOTIFY_CHANGE_SIZE": "int:8",
+ "FILE_SHARE_DELETE": "int:4",
+ "FILE_SHARE_READ": "int:1",
+ "FILE_SHARE_WRITE": "int:2",
+ "FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": "int:1",
+ "FILE_SKIP_SET_EVENT_ON_HANDLE": "int:2",
+ "FILE_TYPE_CHAR": "int:2",
+ "FILE_TYPE_DISK": "int:1",
+ "FILE_TYPE_PIPE": "int:3",
+ "FILE_TYPE_REMOTE": "int:32768",
+ "FILE_TYPE_UNKNOWN": "int:0",
+ "FILE_WRITE_ATTRIBUTES": "int:256",
+ "FORMAT_MESSAGE_ALLOCATE_BUFFER": "int:256",
+ "FORMAT_MESSAGE_ARGUMENT_ARRAY": "int:8192",
+ "FORMAT_MESSAGE_FROM_HMODULE": "int:2048",
+ "FORMAT_MESSAGE_FROM_STRING": "int:1024",
+ "FORMAT_MESSAGE_FROM_SYSTEM": "int:4096",
+ "FORMAT_MESSAGE_IGNORE_INSERTS": "int:512",
+ "FORMAT_MESSAGE_MAX_WIDTH_MASK": "int:255",
+ "FSCTL_GET_REPARSE_POINT": "int:589992",
+ "GENERIC_ALL": "int:268435456",
+ "GENERIC_EXECUTE": "int:536870912",
+ "GENERIC_READ": "int:2147483648",
+ "GENERIC_WRITE": "int:1073741824",
+ "GetFileExInfoStandard": "int:0",
+ "GetFileExMaxInfoLevel": "int:1",
+ "HANDLE_FLAG_INHERIT": "int:1",
+ "HKEY_CLASSES_ROOT": "int:2147483648",
+ "HKEY_CURRENT_CONFIG": "int:2147483653",
+ "HKEY_CURRENT_USER": "int:2147483649",
+ "HKEY_DYN_DATA": "int:2147483654",
+ "HKEY_LOCAL_MACHINE": "int:2147483650",
+ "HKEY_PERFORMANCE_DATA": "int:2147483652",
+ "HKEY_USERS": "int:2147483651",
+ "IFF_BROADCAST": "int:2",
+ "IFF_LOOPBACK": "int:4",
+ "IFF_MULTICAST": "int:16",
+ "IFF_POINTTOPOINT": "int:8",
+ "IFF_UP": "int:1",
+ "IGNORE": "int:0",
+ "INFINITE": "int:4294967295",
+ "INVALID_FILE_ATTRIBUTES": "int:4294967295",
+ "IOC_IN": "int:2147483648",
+ "IOC_INOUT": "int:3221225472",
+ "IOC_OUT": "int:1073741824",
+ "IOC_VENDOR": "int:402653184",
+ "IOC_WS2": "int:134217728",
+ "IO_REPARSE_TAG_SYMLINK": "int:2684354572",
+ "IPPROTO_IP": "int:0",
+ "IPPROTO_IPV6": "int:41",
+ "IPPROTO_TCP": "int:6",
+ "IPPROTO_UDP": "int:17",
+ "IPV6_JOIN_GROUP": "int:12",
+ "IPV6_LEAVE_GROUP": "int:13",
+ "IPV6_MULTICAST_HOPS": "int:10",
+ "IPV6_MULTICAST_IF": "int:9",
+ "IPV6_MULTICAST_LOOP": "int:11",
+ "IPV6_UNICAST_HOPS": "int:4",
+ "IPV6_V6ONLY": "int:27",
+ "IP_ADD_MEMBERSHIP": "int:12",
+ "IP_DROP_MEMBERSHIP": "int:13",
+ "IP_MULTICAST_IF": "int:9",
+ "IP_MULTICAST_LOOP": "int:11",
+ "IP_MULTICAST_TTL": "int:10",
+ "IP_TOS": "int:3",
+ "IP_TTL": "int:4",
+ "ImplementsGetwd": "bool:true",
+ "KEY_ALL_ACCESS": "int:983103",
+ "KEY_CREATE_LINK": "int:32",
+ "KEY_CREATE_SUB_KEY": "int:4",
+ "KEY_ENUMERATE_SUB_KEYS": "int:8",
+ "KEY_EXECUTE": "int:131097",
+ "KEY_NOTIFY": "int:16",
+ "KEY_QUERY_VALUE": "int:1",
+ "KEY_READ": "int:131097",
+ "KEY_SET_VALUE": "int:2",
+ "KEY_WOW64_32KEY": "int:512",
+ "KEY_WOW64_64KEY": "int:256",
+ "KEY_WRITE": "int:131078",
+ "LANG_ENGLISH": "int:9",
+ "LAYERED_PROTOCOL": "int:0",
+ "MAXIMUM_REPARSE_DATA_BUFFER_SIZE": "int:16384",
+ "MAXLEN_IFDESCR": "int:256",
+ "MAXLEN_PHYSADDR": "int:8",
+ "MAX_ADAPTER_ADDRESS_LENGTH": "int:8",
+ "MAX_ADAPTER_DESCRIPTION_LENGTH": "int:128",
+ "MAX_ADAPTER_NAME_LENGTH": "int:256",
+ "MAX_COMPUTERNAME_LENGTH": "int:15",
+ "MAX_INTERFACE_NAME_LEN": "int:256",
+ "MAX_LONG_PATH": "int:32768",
+ "MAX_PATH": "int:260",
+ "MAX_PROTOCOL_CHAIN": "int:7",
+ "MaxTokenInfoClass": "int:29",
+ "NameCanonical": "int:7",
+ "NameCanonicalEx": "int:9",
+ "NameDisplay": "int:3",
+ "NameDnsDomain": "int:12",
+ "NameFullyQualifiedDN": "int:1",
+ "NameSamCompatible": "int:2",
+ "NameServicePrincipal": "int:10",
+ "NameUniqueId": "int:6",
+ "NameUnknown": "int:0",
+ "NameUserPrincipal": "int:8",
+ "NetSetupDomainName": "int:3",
+ "NetSetupUnjoined": "int:1",
+ "NetSetupUnknownStatus": "int:0",
+ "NetSetupWorkgroupName": "int:2",
+ "OPEN_ALWAYS": "int:4",
+ "OPEN_EXISTING": "int:3",
+ "O_APPEND": "int:1024",
+ "O_ASYNC": "int:8192",
+ "O_CLOEXEC": "int:524288",
+ "O_CREAT": "int:64",
+ "O_EXCL": "int:128",
+ "O_NOCTTY": "int:256",
+ "O_NONBLOCK": "int:2048",
+ "O_RDONLY": "int:0",
+ "O_RDWR": "int:2",
+ "O_SYNC": "int:4096",
+ "O_TRUNC": "int:512",
+ "O_WRONLY": "int:1",
+ "PAGE_EXECUTE_READ": "int:32",
+ "PAGE_EXECUTE_READWRITE": "int:64",
+ "PAGE_EXECUTE_WRITECOPY": "int:128",
+ "PAGE_READONLY": "int:2",
+ "PAGE_READWRITE": "int:4",
+ "PAGE_WRITECOPY": "int:8",
+ "PFL_HIDDEN": "int:4",
+ "PFL_MATCHES_PROTOCOL_ZERO": "int:8",
+ "PFL_MULTIPLE_PROTO_ENTRIES": "int:1",
+ "PFL_NETWORKDIRECT_PROVIDER": "int:16",
+ "PFL_RECOMMENDED_PROTO_ENTRY": "int:2",
+ "PKCS_7_ASN_ENCODING": "int:65536",
+ "PROCESS_QUERY_INFORMATION": "int:1024",
+ "PROCESS_TERMINATE": "int:1",
+ "PROV_DH_SCHANNEL": "int:18",
+ "PROV_DSS": "int:3",
+ "PROV_DSS_DH": "int:13",
+ "PROV_EC_ECDSA_FULL": "int:16",
+ "PROV_EC_ECDSA_SIG": "int:14",
+ "PROV_EC_ECNRA_FULL": "int:17",
+ "PROV_EC_ECNRA_SIG": "int:15",
+ "PROV_FORTEZZA": "int:4",
+ "PROV_INTEL_SEC": "int:22",
+ "PROV_MS_EXCHANGE": "int:5",
+ "PROV_REPLACE_OWF": "int:23",
+ "PROV_RNG": "int:21",
+ "PROV_RSA_AES": "int:24",
+ "PROV_RSA_FULL": "int:1",
+ "PROV_RSA_SCHANNEL": "int:12",
+ "PROV_RSA_SIG": "int:2",
+ "PROV_SPYRUS_LYNKS": "int:20",
+ "PROV_SSL": "int:6",
+ "REG_BINARY": "int:3",
+ "REG_DWORD": "int:4",
+ "REG_DWORD_BIG_ENDIAN": "int:5",
+ "REG_DWORD_LITTLE_ENDIAN": "int:4",
+ "REG_EXPAND_SZ": "int:2",
+ "REG_FULL_RESOURCE_DESCRIPTOR": "int:9",
+ "REG_LINK": "int:6",
+ "REG_MULTI_SZ": "int:7",
+ "REG_NONE": "int:0",
+ "REG_QWORD": "int:11",
+ "REG_QWORD_LITTLE_ENDIAN": "int:11",
+ "REG_RESOURCE_LIST": "int:8",
+ "REG_RESOURCE_REQUIREMENTS_LIST": "int:10",
+ "REG_SZ": "int:1",
+ "SHUT_RD": "int:0",
+ "SHUT_RDWR": "int:2",
+ "SHUT_WR": "int:1",
+ "SIO_GET_EXTENSION_FUNCTION_POINTER": "int:3355443206",
+ "SIO_GET_INTERFACE_LIST": "int:1074033791",
+ "SIO_KEEPALIVE_VALS": "int:2550136836",
+ "SIO_UDP_CONNRESET": "int:2550136844",
+ "SOCK_DGRAM": "int:2",
+ "SOCK_RAW": "int:3",
+ "SOCK_SEQPACKET": "int:5",
+ "SOCK_STREAM": "int:1",
+ "SOL_SOCKET": "int:65535",
+ "SOMAXCONN": "int:2147483647",
+ "SO_BROADCAST": "int:32",
+ "SO_DONTROUTE": "int:16",
+ "SO_KEEPALIVE": "int:8",
+ "SO_LINGER": "int:128",
+ "SO_RCVBUF": "int:4098",
+ "SO_REUSEADDR": "int:4",
+ "SO_SNDBUF": "int:4097",
+ "SO_UPDATE_ACCEPT_CONTEXT": "int:28683",
+ "SO_UPDATE_CONNECT_CONTEXT": "int:28688",
+ "STANDARD_RIGHTS_ALL": "int:2031616",
+ "STANDARD_RIGHTS_EXECUTE": "int:131072",
+ "STANDARD_RIGHTS_READ": "int:131072",
+ "STANDARD_RIGHTS_REQUIRED": "int:983040",
+ "STANDARD_RIGHTS_WRITE": "int:131072",
+ "STARTF_USESHOWWINDOW": "int:1",
+ "STARTF_USESTDHANDLES": "int:256",
+ "STD_ERROR_HANDLE": "int:-12",
+ "STD_INPUT_HANDLE": "int:-10",
+ "STD_OUTPUT_HANDLE": "int:-11",
+ "SUBLANG_ENGLISH_US": "int:1",
+ "SW_FORCEMINIMIZE": "int:11",
+ "SW_HIDE": "int:0",
+ "SW_MAXIMIZE": "int:3",
+ "SW_MINIMIZE": "int:6",
+ "SW_NORMAL": "int:1",
+ "SW_RESTORE": "int:9",
+ "SW_SHOW": "int:5",
+ "SW_SHOWDEFAULT": "int:10",
+ "SW_SHOWMAXIMIZED": "int:3",
+ "SW_SHOWMINIMIZED": "int:2",
+ "SW_SHOWMINNOACTIVE": "int:7",
+ "SW_SHOWNA": "int:8",
+ "SW_SHOWNOACTIVATE": "int:4",
+ "SW_SHOWNORMAL": "int:1",
+ "SYMBOLIC_LINK_FLAG_DIRECTORY": "int:1",
+ "SYNCHRONIZE": "int:1048576",
+ "S_IFBLK": "int:24576",
+ "S_IFCHR": "int:8192",
+ "S_IFDIR": "int:16384",
+ "S_IFIFO": "int:4096",
+ "S_IFLNK": "int:40960",
+ "S_IFMT": "int:126976",
+ "S_IFREG": "int:32768",
+ "S_IFSOCK": "int:49152",
+ "S_IRUSR": "int:256",
+ "S_ISGID": "int:1024",
+ "S_ISUID": "int:2048",
+ "S_ISVTX": "int:512",
+ "S_IWRITE": "int:128",
+ "S_IWUSR": "int:128",
+ "S_IXUSR": "int:64",
+ "SidTypeAlias": "int:4",
+ "SidTypeComputer": "int:9",
+ "SidTypeDeletedAccount": "int:6",
+ "SidTypeDomain": "int:3",
+ "SidTypeGroup": "int:2",
+ "SidTypeInvalid": "int:7",
+ "SidTypeLabel": "int:10",
+ "SidTypeUnknown": "int:8",
+ "SidTypeUser": "int:1",
+ "SidTypeWellKnownGroup": "int:5",
+ "TCP_NODELAY": "int:1",
+ "TF_DISCONNECT": "int:1",
+ "TF_REUSE_SOCKET": "int:2",
+ "TF_USE_DEFAULT_WORKER": "int:0",
+ "TF_USE_KERNEL_APC": "int:32",
+ "TF_USE_SYSTEM_THREAD": "int:16",
+ "TF_WRITE_BEHIND": "int:4",
+ "TH32CS_INHERIT": "int:2147483648",
+ "TH32CS_SNAPALL": "int:15",
+ "TH32CS_SNAPHEAPLIST": "int:1",
+ "TH32CS_SNAPMODULE": "int:8",
+ "TH32CS_SNAPMODULE32": "int:16",
+ "TH32CS_SNAPPROCESS": "int:2",
+ "TH32CS_SNAPTHREAD": "int:4",
+ "TIME_ZONE_ID_DAYLIGHT": "int:2",
+ "TIME_ZONE_ID_STANDARD": "int:1",
+ "TIME_ZONE_ID_UNKNOWN": "int:0",
+ "TOKEN_ADJUST_DEFAULT": "int:128",
+ "TOKEN_ADJUST_GROUPS": "int:64",
+ "TOKEN_ADJUST_PRIVILEGES": "int:32",
+ "TOKEN_ALL_ACCESS": "int:983295",
+ "TOKEN_ASSIGN_PRIMARY": "int:1",
+ "TOKEN_DUPLICATE": "int:2",
+ "TOKEN_EXECUTE": "int:131072",
+ "TOKEN_IMPERSONATE": "int:4",
+ "TOKEN_QUERY": "int:8",
+ "TOKEN_QUERY_SOURCE": "int:16",
+ "TOKEN_READ": "int:131080",
+ "TOKEN_WRITE": "int:131296",
+ "TRUNCATE_EXISTING": "int:5",
+ "TokenAccessInformation": "int:22",
+ "TokenAuditPolicy": "int:16",
+ "TokenDefaultDacl": "int:6",
+ "TokenElevation": "int:20",
+ "TokenElevationType": "int:18",
+ "TokenGroups": "int:2",
+ "TokenGroupsAndPrivileges": "int:13",
+ "TokenHasRestrictions": "int:21",
+ "TokenImpersonationLevel": "int:9",
+ "TokenIntegrityLevel": "int:25",
+ "TokenLinkedToken": "int:19",
+ "TokenLogonSid": "int:28",
+ "TokenMandatoryPolicy": "int:27",
+ "TokenOrigin": "int:17",
+ "TokenOwner": "int:4",
+ "TokenPrimaryGroup": "int:5",
+ "TokenPrivileges": "int:3",
+ "TokenRestrictedSids": "int:11",
+ "TokenSandBoxInert": "int:15",
+ "TokenSessionId": "int:12",
+ "TokenSessionReference": "int:14",
+ "TokenSource": "int:7",
+ "TokenStatistics": "int:10",
+ "TokenType": "int:8",
+ "TokenUIAccess": "int:26",
+ "TokenUser": "int:1",
+ "TokenVirtualizationAllowed": "int:23",
+ "TokenVirtualizationEnabled": "int:24",
+ "USAGE_MATCH_TYPE_AND": "int:0",
+ "USAGE_MATCH_TYPE_OR": "int:1",
+ "WAIT_ABANDONED": "int:128",
+ "WAIT_FAILED": "int:4294967295",
+ "WAIT_OBJECT_0": "int:0",
+ "WAIT_TIMEOUT": "int:258",
+ "WSADESCRIPTION_LEN": "int:256",
+ "WSAPROTOCOL_LEN": "int:255",
+ "WSASYS_STATUS_LEN": "int:128",
+ "X509_ASN_ENCODING": "int:1",
+ "XP1_CONNECTIONLESS": "int:1",
+ "XP1_CONNECT_DATA": "int:128",
+ "XP1_DISCONNECT_DATA": "int:256",
+ "XP1_EXPEDITED_DATA": "int:64",
+ "XP1_GRACEFUL_CLOSE": "int:32",
+ "XP1_GUARANTEED_DELIVERY": "int:2",
+ "XP1_GUARANTEED_ORDER": "int:4",
+ "XP1_IFS_HANDLES": "int:131072",
+ "XP1_MESSAGE_ORIENTED": "int:8",
+ "XP1_MULTIPOINT_CONTROL_PLANE": "int:2048",
+ "XP1_MULTIPOINT_DATA_PLANE": "int:4096",
+ "XP1_PARTIAL_MESSAGE": "int:262144",
+ "XP1_PSEUDO_STREAM": "int:16",
+ "XP1_QOS_SUPPORTED": "int:8192",
+ "XP1_SAN_SUPPORT_SDP": "int:524288",
+ "XP1_SUPPORT_BROADCAST": "int:512",
+ "XP1_SUPPORT_MULTIPOINT": "int:1024",
+ "XP1_UNI_RECV": "int:65536",
+ "XP1_UNI_SEND": "int:32768",
+ },
+ }
+}
+
+// --------------- proxy for syscall.Conn ---------------
+type Conn_syscall struct {
+ Object interface{}
+ SyscallConn_ func(interface{}) (syscall.RawConn, error)
+}
+func (Proxy *Conn_syscall) SyscallConn() (syscall.RawConn, error) {
+ return Proxy.SyscallConn_(Proxy.Object)
+}
+
+// --------------- proxy for syscall.RawConn ---------------
+type RawConn_syscall struct {
+ Object interface{}
+ Control_ func(_proxy_obj_ interface{}, f func(fd uintptr)) error
+ Read_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+ Write_ func(_proxy_obj_ interface{}, f func(fd uintptr) (done bool)) error
+}
+func (Proxy *RawConn_syscall) Control(f func(fd uintptr)) error {
+ return Proxy.Control_(Proxy.Object, f)
+}
+func (Proxy *RawConn_syscall) Read(f func(fd uintptr) (done bool)) error {
+ return Proxy.Read_(Proxy.Object, f)
+}
+func (Proxy *RawConn_syscall) Write(f func(fd uintptr) (done bool)) error {
+ return Proxy.Write_(Proxy.Object, f)
+}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/syscall_windows_amd64.go b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_windows_amd64.go
similarity index 99%
rename from vendor/github.com/cosmos72/gomacro/imports/syscall_windows_amd64.go
rename to vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_windows_amd64.go
index 1553245..919bc90 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/syscall_windows_amd64.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/syscall/syscall_windows_amd64.go
@@ -1,15 +1,16 @@
-// +build !gccgo
+// +build gc
-// this file was generated by gomacro command: import "syscall"
+// this file was generated by gomacro command: import _b "syscall"
// DO NOT EDIT! Any change will be lost when the file is re-generated
-package imports
+package syscall
import (
. "reflect"
"syscall"
)
+// reflection: allow interpreted code to import "syscall"
func init() {
Packages["syscall"] = Package{
Binds: map[string]Value{
diff --git a/vendor/github.com/cosmos72/gomacro/imports/testing.go b/vendor/github.com/cosmos72/gomacro/imports/testing.go
index 2c37fb9..eafacf0 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/testing.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/testing.go
@@ -24,7 +24,7 @@ func init() {
"RunTests": ValueOf(testing.RunTests),
"Short": ValueOf(testing.Short),
"Verbose": ValueOf(testing.Verbose),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"B": TypeOf((*testing.B)(nil)).Elem(),
"BenchmarkResult": TypeOf((*testing.BenchmarkResult)(nil)).Elem(),
"Cover": TypeOf((*testing.Cover)(nil)).Elem(),
@@ -36,9 +36,9 @@ func init() {
"PB": TypeOf((*testing.PB)(nil)).Elem(),
"T": TypeOf((*testing.T)(nil)).Elem(),
"TB": TypeOf((*testing.TB)(nil)).Elem(),
- },Wrappers: map[string][]string{
- "B": []string{"Error","Errorf","Fail","FailNow","Failed","Fatal","Fatalf","Log","Logf","Name","Skip","SkipNow","Skipf","Skipped",},
- "T": []string{"Error","Errorf","Fail","FailNow","Failed","Fatal","Fatalf","Log","Logf","Name","Skip","SkipNow","Skipf","Skipped",},
- },
+ }, Wrappers: map[string][]string{
+ "B": []string{"Error","Errorf","Fail","FailNow","Failed","Fatal","Fatalf","Helper","Log","Logf","Name","Skip","SkipNow","Skipf","Skipped",},
+ "T": []string{"Error","Errorf","Fail","FailNow","Failed","Fatal","Fatalf","Helper","Log","Logf","Name","Skip","SkipNow","Skipf","Skipped",},
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/testing_iotest.go b/vendor/github.com/cosmos72/gomacro/imports/testing_iotest.go
index ac2a8aa..b34dc14 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/testing_iotest.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/testing_iotest.go
@@ -20,6 +20,6 @@ func init() {
"OneByteReader": ValueOf(iotest.OneByteReader),
"TimeoutReader": ValueOf(iotest.TimeoutReader),
"TruncateWriter": ValueOf(iotest.TruncateWriter),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/testing_quick.go b/vendor/github.com/cosmos72/gomacro/imports/testing_quick.go
index a3c5fd2..5e1436b 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/testing_quick.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/testing_quick.go
@@ -17,23 +17,23 @@ func init() {
"Check": ValueOf(quick.Check),
"CheckEqual": ValueOf(quick.CheckEqual),
"Value": ValueOf(quick.Value),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CheckEqualError": TypeOf((*quick.CheckEqualError)(nil)).Elem(),
"CheckError": TypeOf((*quick.CheckError)(nil)).Elem(),
"Config": TypeOf((*quick.Config)(nil)).Elem(),
"Generator": TypeOf((*quick.Generator)(nil)).Elem(),
"SetupError": TypeOf((*quick.SetupError)(nil)).Elem(),
- },Proxies: map[string]Type{
- "Generator": TypeOf((*Generator_testing_quick)(nil)).Elem(),
- },
+ }, Proxies: map[string]Type{
+ "Generator": TypeOf((*P_testing_quick_Generator)(nil)).Elem(),
+ },
}
}
// --------------- proxy for testing/quick.Generator ---------------
-type Generator_testing_quick struct {
+type P_testing_quick_Generator struct {
Object interface{}
Generate_ func(_proxy_obj_ interface{}, rand *rand.Rand, size int) reflect.Value
}
-func (Proxy *Generator_testing_quick) Generate(rand *rand.Rand, size int) reflect.Value {
- return Proxy.Generate_(Proxy.Object, rand, size)
+func (P *P_testing_quick_Generator) Generate(rand *rand.Rand, size int) reflect.Value {
+ return P.Generate_(P.Object, rand, size)
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/text_scanner.go b/vendor/github.com/cosmos72/gomacro/imports/text_scanner.go
index 7fe1419..de638e3 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/text_scanner.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/text_scanner.go
@@ -31,10 +31,10 @@ func init() {
"SkipComments": ValueOf(scanner.SkipComments),
"String": ValueOf(scanner.String),
"TokenString": ValueOf(scanner.TokenString),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Position": TypeOf((*scanner.Position)(nil)).Elem(),
"Scanner": TypeOf((*scanner.Scanner)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"Char": "int:-5",
"Comment": "int:-8",
"EOF": "int:-1",
@@ -53,8 +53,8 @@ func init() {
"ScanStrings": "int:64",
"SkipComments": "int:512",
"String": "int:-6",
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"Scanner": []string{"IsValid","String",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/text_tabwriter.go b/vendor/github.com/cosmos72/gomacro/imports/text_tabwriter.go
index 623fa81..a9c96b8 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/text_tabwriter.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/text_tabwriter.go
@@ -20,10 +20,10 @@ func init() {
"NewWriter": ValueOf(tabwriter.NewWriter),
"StripEscape": ValueOf(tabwriter.StripEscape),
"TabIndent": ValueOf(tabwriter.TabIndent),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Writer": TypeOf((*tabwriter.Writer)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"Escape": "rune:255",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/text_template.go b/vendor/github.com/cosmos72/gomacro/imports/text_template.go
index 6d9324a..358f5ef 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/text_template.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/text_template.go
@@ -24,12 +24,12 @@ func init() {
"ParseFiles": ValueOf(template.ParseFiles),
"ParseGlob": ValueOf(template.ParseGlob),
"URLQueryEscaper": ValueOf(template.URLQueryEscaper),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ExecError": TypeOf((*template.ExecError)(nil)).Elem(),
"FuncMap": TypeOf((*template.FuncMap)(nil)).Elem(),
"Template": TypeOf((*template.Template)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"Template": []string{"Copy","ErrorContext",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/text_template_parse.go b/vendor/github.com/cosmos72/gomacro/imports/text_template_parse.go
index f604512..e478a4e 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/text_template_parse.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/text_template_parse.go
@@ -34,7 +34,7 @@ func init() {
"NodeVariable": ValueOf(parse.NodeVariable),
"NodeWith": ValueOf(parse.NodeWith),
"Parse": ValueOf(parse.Parse),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"ActionNode": TypeOf((*parse.ActionNode)(nil)).Elem(),
"BoolNode": TypeOf((*parse.BoolNode)(nil)).Elem(),
"BranchNode": TypeOf((*parse.BranchNode)(nil)).Elem(),
@@ -58,7 +58,7 @@ func init() {
"Tree": TypeOf((*parse.Tree)(nil)).Elem(),
"VariableNode": TypeOf((*parse.VariableNode)(nil)).Elem(),
"WithNode": TypeOf((*parse.WithNode)(nil)).Elem(),
- },Wrappers: map[string][]string{
+ }, Wrappers: map[string][]string{
"ActionNode": []string{"Position","Type",},
"BoolNode": []string{"Position","Type",},
"BranchNode": []string{"Position","Type",},
@@ -78,6 +78,6 @@ func init() {
"TextNode": []string{"Position","Type",},
"VariableNode": []string{"Position","Type",},
"WithNode": []string{"Position","String","Type",},
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/thirdparty/README.md b/vendor/github.com/cosmos72/gomacro/imports/thirdparty/README.md
new file mode 100644
index 0000000..6a00741
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/thirdparty/README.md
@@ -0,0 +1,8 @@
+The gomacro command `import` will write here import files for third-party
+libraries if they are to be imported and statically linked into gomacro.
+
+This is currently needed on non-Linux systems
+to allow importing third-party libraries at gomacro prompt.
+
+It is safe to remove files in this directory,
+as long as you **keep at least** README.md and a_package.go
diff --git a/vendor/github.com/cosmos72/gomacro/imports/thirdparty/a_package.go b/vendor/github.com/cosmos72/gomacro/imports/thirdparty/a_package.go
new file mode 100644
index 0000000..efc8059
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/imports/thirdparty/a_package.go
@@ -0,0 +1,36 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * a_package.go
+ *
+ * Created on: Apr 09, 2018
+ * Author: Massimiliano Ghilardi
+ */
+
+package thirdparty
+
+import (
+ . "reflect"
+)
+
+type Package = struct { // unnamed
+ Binds map[string]Value
+ Types map[string]Type
+ Proxies map[string]Type
+ // Untypeds contains a string representation of untyped constants,
+ // stored without loss of precision
+ Untypeds map[string]string
+ // Wrappers is the list of wrapper methods for named types.
+ // Stored explicitly because reflect package cannot distinguish
+ // between explicit methods and wrapper methods for embedded fields
+ Wrappers map[string][]string
+}
+
+var Packages = make(map[string]Package)
diff --git a/vendor/github.com/cosmos72/gomacro/imports/time.go b/vendor/github.com/cosmos72/gomacro/imports/time.go
index 0c24cc2..03bc1dc 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/time.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/time.go
@@ -70,7 +70,7 @@ func init() {
"UnixDate": ValueOf(time.UnixDate),
"Until": ValueOf(time.Until),
"Wednesday": ValueOf(time.Wednesday),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"Duration": TypeOf((*time.Duration)(nil)).Elem(),
"Location": TypeOf((*time.Location)(nil)).Elem(),
"Month": TypeOf((*time.Month)(nil)).Elem(),
@@ -79,7 +79,7 @@ func init() {
"Time": TypeOf((*time.Time)(nil)).Elem(),
"Timer": TypeOf((*time.Timer)(nil)).Elem(),
"Weekday": TypeOf((*time.Weekday)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"ANSIC": "string:Mon Jan _2 15:04:05 2006",
"Kitchen": "string:3:04PM",
"RFC1123": "string:Mon, 02 Jan 2006 15:04:05 MST",
@@ -95,6 +95,6 @@ func init() {
"StampMilli": "string:Jan _2 15:04:05.000",
"StampNano": "string:Jan _2 15:04:05.000000000",
"UnixDate": "string:Mon Jan _2 15:04:05 MST 2006",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/unicode.go b/vendor/github.com/cosmos72/gomacro/imports/unicode.go
index c41b77f..1353923 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/unicode.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/unicode.go
@@ -271,13 +271,13 @@ func init() {
"Zl": ValueOf(&unicode.Zl).Elem(),
"Zp": ValueOf(&unicode.Zp).Elem(),
"Zs": ValueOf(&unicode.Zs).Elem(),
- },Types: map[string]Type{
+ }, Types: map[string]Type{
"CaseRange": TypeOf((*unicode.CaseRange)(nil)).Elem(),
"Range16": TypeOf((*unicode.Range16)(nil)).Elem(),
"Range32": TypeOf((*unicode.Range32)(nil)).Elem(),
"RangeTable": TypeOf((*unicode.RangeTable)(nil)).Elem(),
"SpecialCase": TypeOf((*unicode.SpecialCase)(nil)).Elem(),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"LowerCase": "int:1",
"MaxASCII": "rune:127",
"MaxCase": "int:3",
@@ -288,6 +288,6 @@ func init() {
"UpperCase": "int:0",
"UpperLower": "rune:1114112",
"Version": "string:9.0.0",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/unicode_utf16.go b/vendor/github.com/cosmos72/gomacro/imports/unicode_utf16.go
index cb10290..9fb9359 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/unicode_utf16.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/unicode_utf16.go
@@ -17,6 +17,6 @@ func init() {
"Encode": ValueOf(utf16.Encode),
"EncodeRune": ValueOf(utf16.EncodeRune),
"IsSurrogate": ValueOf(utf16.IsSurrogate),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/unicode_utf8.go b/vendor/github.com/cosmos72/gomacro/imports/unicode_utf8.go
index c4d0f1c..61223f1 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/unicode_utf8.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/unicode_utf8.go
@@ -30,11 +30,11 @@ func init() {
"Valid": ValueOf(utf8.Valid),
"ValidRune": ValueOf(utf8.ValidRune),
"ValidString": ValueOf(utf8.ValidString),
- },Untypeds: map[string]string{
+ }, Untypeds: map[string]string{
"MaxRune": "rune:1114111",
"RuneError": "rune:65533",
"RuneSelf": "int:128",
"UTFMax": "int:4",
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/imports/unsafe.go b/vendor/github.com/cosmos72/gomacro/imports/unsafe.go
index 062d03f..26d0705 100644
--- a/vendor/github.com/cosmos72/gomacro/imports/unsafe.go
+++ b/vendor/github.com/cosmos72/gomacro/imports/unsafe.go
@@ -13,6 +13,6 @@ func init() {
Packages["unsafe"] = Package{
Types: map[string]Type{
"Pointer": TypeOf((*unsafe.Pointer)(nil)).Elem(),
- },
+ },
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/main.go b/vendor/github.com/cosmos72/gomacro/main.go
index 4e62746..21b079e 100644
--- a/vendor/github.com/cosmos72/gomacro/main.go
+++ b/vendor/github.com/cosmos72/gomacro/main.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* main.go
@@ -26,89 +17,19 @@
package main
import (
- "fmt"
"os"
- "github.com/cosmos72/gomacro/base"
- "github.com/cosmos72/gomacro/parser"
+ "github.com/cosmos72/gomacro/cmd"
)
func main() {
args := os.Args[1:]
- var cmd Cmd
- cmd.Init()
-
- cmd.Options |= base.OptFastInterpreter // use fast interpreter by default
-
- // cmd.Options |= base.OptShowTime // | base.OptTrapPanic // | base.OptShowAfterMacroExpansion // | base.OptShowAfterParse // | base.OptDebugMacroExpand // | base.OptDebugQuasiquote
-
- cmd.ParserMode |= parser.Trace & 0
+ cmd := cmd.New()
err := cmd.Main(args)
if err != nil {
- fmt.Fprintln(cmd.Stderr, err)
+ g := cmd.Interp.Comp.Globals
+ g.Fprintf(g.Stderr, "%s\n", err)
}
}
-
-/*
- miscellaneous annotations
-
- imports, generated with: find [a-u]* -type f -name \*.go | grep -v internal | grep -v testdata | grep -v cmd/ | grep -v builtin | xargs -d'\n' dirname | sort -u | while read i; do echo -n "_b \"$i\"; "; done
- plus some hand-made tweaks
- import ( _b "archive/tar"; _b "archive/zip"; _b "bufio"; _b "bytes"; _b "compress/bzip2"; _b "compress/flate"; _b "compress/gzip"; _b "compress/lzw"; _b "compress/zlib"; _b "container/heap"; _b "container/list"; _b "container/ring"; _b "context"; _b "crypto"; _b "crypto/aes"; _b "crypto/cipher"; _b "crypto/des"; _b "crypto/dsa"; _b "crypto/ecdsa"; _b "crypto/elliptic"; _b "crypto/hmac"; _b "crypto/md5"; _b "crypto/rand"; _b "crypto/rc4"; _b "crypto/rsa"; _b "crypto/sha1"; _b "crypto/sha256"; _b "crypto/sha512"; _b "crypto/subtle"; _b "crypto/tls"; _b "crypto/x509"; _b "crypto/x509/pkix"; _b "database/sql"; _b "database/sql/driver"; _b "debug/dwarf"; _b "debug/elf"; _b "debug/gosym"; _b "debug/macho"; _b "debug/pe"; _b "debug/plan9obj"; _b "encoding"; _b "encoding/ascii85"; _b "encoding/asn1"; _b "encoding/base32"; _b "encoding/base64"; _b "encoding/binary"; _b "encoding/csv"; _b "encoding/gob"; _b "encoding/hex"; _b "encoding/json"; _b "encoding/pem"; _b "encoding/xml"; _b "errors"; _b "expvar"; _b "flag"; _b "fmt"; _b "go/ast"; _b "go/build"; _b "go/constant"; _b "go/doc"; _b "go/format"; _b "go/importer"; _b "go/parser"; _b "go/printer"; _b "go/scanner"; _b "go/token"; _b "go/types"; _b "hash"; _b "hash/adler32"; _b "hash/crc32"; _b "hash/crc64"; _b "hash/fnv"; _b "html"; _b "html/template"; _b "image"; _b "image/color"; _b "image/color/palette"; _b "image/draw"; _b "image/gif"; _b "image/jpeg"; _b "image/png"; _b "index/suffixarray"; _b "io"; _b "io/ioutil"; _b "log"; _b "log/syslog"; _b "math"; _b "math/big"; _b "math/cmplx"; _b "math/rand"; _b "mime"; _b "mime/multipart"; _b "mime/quotedprintable"; _b "net"; _b "net/http"; _b "net/http/cgi"; _b "net/http/cookiejar"; _b "net/http/fcgi"; _b "net/http/httptest"; _b "net/http/httptrace"; _b "net/http/httputil"; _b "net/http/pprof"; _b "net/mail"; _b "net/rpc"; _b "net/rpc/jsonrpc"; _b "net/smtp"; _b "net/textproto"; _b "net/url"; _b "os"; _b "os/exec"; _b "os/signal"; _b "os/user"; _b "path"; _b "path/filepath"; _b "plugin"; _b "reflect"; _b "regexp"; _b "regexp/syntax"; _b "runtime"; _b "runtime/debug"; _b "runtime/pprof"; _b "runtime/trace"; _b "sort"; _b "strconv"; _b "strings"; _b "sync"; _b "sync/atomic"; _b "syscall"; _b "testing"; _b "testing/iotest"; _b "testing/quick"; _b "text/scanner"; _b "text/tabwriter"; _b "text/template"; _b "text/template/parse"; _b "time"; _b "unicode"; _b "unicode/utf16"; _b "unicode/utf8"; _b "unsafe" )
-
- // test interfaces:
-
- import ( "time"; "fmt" ); var s fmt.Stringer = time.Second // ok
- s.String // ok, s is the interface fmt.Stringer
-
- import ( "os"; "io" ); var in io.Reader = os.Stdin // ok
- import "reflect"; var t = reflect.TypeOf(os.Stdin) // ok
- t.Elem // ok, t is the interface reflect.Type
-
- // test methods-to-functions:
-
- time.Duration.Seconds // easy, time.Duration is a concrete type
- io.Stringer.String // harder, io.Stringer is an interface
-
- // test methods:
-
- type Pair struct { A, B int }; var p Pair
- func (p *Pair) Lhs() int { return p.A }; func (p *Pair) SetLhs(a int) { p.A = a }
- p.SetLhs(2); p.Lhs()
-
- type Triple struct { Pair; C int }; var t Triple
- t.Pair = p
- t.SetLhs(3); t.Lhs()
-
- // test some valid methods:
-
- type Pair2 Pair; var p2 Pair2
- func (p Pair2) Foo() { }
-
- type SPair []Pair; var s SPair
- func (p SPair) Foo() { }; s.Foo()
-
- type Int int; var I Int
- func (x Int) Print() { println(x) }; I.Print; I.Print()
- func (x *Int) Print() { println(*x) }; I.Print; I.Print()
-
- // test some bogus methods:
-
- func (p **Pair) Foo() { }
- type PPair *Pair
- func (p PPair) Foo() { }
- func (p *PPair) Foo() { }
-
- // test type alias:
-
- type iint = int
- type Int int
- var i int = 1
- var ii iint = 2
- var I Int = 3
- func show(x int) { println(x) }
- func Show(x Int) { println(x) }
-
-*/
diff --git a/vendor/github.com/cosmos72/gomacro/parser/global.go b/vendor/github.com/cosmos72/gomacro/parser/global.go
index ac57b73..47561b6 100644
--- a/vendor/github.com/cosmos72/gomacro/parser/global.go
+++ b/vendor/github.com/cosmos72/gomacro/parser/global.go
@@ -27,16 +27,18 @@ const (
Trace // print a trace of parsed productions
DeclarationErrors // report declaration errors
SpuriousErrors // same as AllErrors, for backward-compatibility
+ CopySources // copy source code to FileSet
AllErrors = SpuriousErrors // report all errors (not just the first 10 on different lines)
+
)
type Parser struct {
parser
}
-func (p *parser) Configure(mode Mode, specialChar rune) {
+func (p *parser) Configure(mode Mode, macroChar rune) {
p.mode = mode
- p.specialChar = specialChar
+ p.macroChar = macroChar
}
func (p *parser) Init(fileset *mt.FileSet, filename string, lineOffset int, src []byte) {
@@ -126,18 +128,22 @@ func (p *parser) parsePackage() ast.Node {
}
doc := p.leadComment
pos := p.expect(token.PACKAGE)
-
- var names []*ast.Ident
+ var path string
switch p.tok {
- case token.ILLEGAL, token.EOF, token.SEMICOLON, token.RPAREN, token.RBRACE, token.RBRACK:
- default:
+ case token.IDENT:
ident := p.parseIdent()
- if ident.Name == "_" && p.mode&DeclarationErrors != 0 {
- p.error(p.pos, "invalid package name: _")
- }
- names = []*ast.Ident{ident}
+ path = ident.Name
+ case token.STRING:
+ path = p.lit
+ p.next()
+ default:
+ p.expect(token.IDENT)
+ }
+ if path == "_" && p.mode&DeclarationErrors != 0 {
+ p.error(p.pos, "invalid package name: _")
}
+ npos := p.pos
p.expectSemi()
return &ast.GenDecl{
@@ -145,8 +151,14 @@ func (p *parser) parsePackage() ast.Node {
Tok: token.PACKAGE,
Specs: []ast.Spec{
&ast.ValueSpec{
- Doc: doc,
- Names: names,
+ Doc: doc,
+ Values: []ast.Expr{
+ &ast.BasicLit{
+ ValuePos: npos,
+ Kind: token.STRING,
+ Value: path,
+ },
+ },
},
},
}
diff --git a/vendor/github.com/cosmos72/gomacro/parser/parser.diffs b/vendor/github.com/cosmos72/gomacro/parser/parser.diffs
index 2fc6ac5..403e897 100644
--- a/vendor/github.com/cosmos72/gomacro/parser/parser.diffs
+++ b/vendor/github.com/cosmos72/gomacro/parser/parser.diffs
@@ -1,6 +1,6 @@
---- /usr/local/go/src/go/parser/parser.go 2017-02-16 20:27:47.000000000 +0100
-+++ parser.go 2017-04-22 17:58:50.801987424 +0200
-@@ -19,11 +19,13 @@
+--- go1.10.1/src/go/parser/parser.go 2018-03-29 06:29:01.000000000 +0200
++++ parser.go 2018-04-09 21:20:52.453627706 +0200
+@@ -19,16 +19,18 @@
import (
"fmt"
"go/ast"
@@ -15,34 +15,34 @@
)
// The parser structure holds the parser's internal state.
-@@ -37,11 +39,17 @@
- trace bool // == (mode & Trace != 0)
- indent int // indentation used for tracing output
+ type parser struct {
+- file *token.File
++ file *mt.File
+ errors scanner.ErrorList
+ scanner scanner.Scanner
-+ specialChar rune // patch: prefix for quote operators ' ` , ,@
-+ fileset *token.FileSet
-+
- // Comments
- comments []*ast.CommentGroup
+@@ -42,6 +44,9 @@
leadComment *ast.CommentGroup // last lead comment
lineComment *ast.CommentGroup // last line comment
-+ // Previous token
-+ tok0 token.Token
++ tok0 token.Token // patch: Previous token
++ specialChar rune // patch: prefix for quote operators ' ` , ,@
+
// Next token
pos token.Pos // token position
tok token.Token // one token look-ahead
-@@ -71,16 +79,51 @@
+@@ -70,17 +75,51 @@
+ targetStack [][]*ast.Ident // stack of unresolved labels
}
- func (p *parser) init(fset *token.FileSet, filename string, src []byte, mode Mode) {
+-func (p *parser) init(fset *token.FileSet, filename string, src []byte, mode Mode) {
+- p.file = fset.AddFile(filename, -1, len(src))
++func (p *parser) init(fset *mt.FileSet, filename string, lineOffset int, src []byte, mode Mode) {
+ // Explicitly initialize all private fields since a parser may be reused.
+ if fset == nil {
-+ fset = token.NewFileSet()
++ fset = mt.NewFileSet()
+ }
-+ p.fileset = fset
- p.file = fset.AddFile(filename, -1, len(src))
++ p.file = fset.AddFile(filename, -1, len(src), lineOffset)
+ p.errors = nil
+
var m scanner.Mode
@@ -86,7 +86,7 @@
p.next()
}
-@@ -243,11 +286,13 @@
+@@ -243,11 +282,13 @@
// very first token (!p.pos.IsValid()) is not initialized
// (it is token.ILLEGAL), so don't print it .
if p.trace && p.pos.IsValid() {
@@ -102,16 +102,7 @@
p.printTrace("\"" + s + "\"")
default:
p.printTrace(s)
-@@ -274,7 +319,7 @@
- comment = &ast.Comment{Slash: p.pos, Text: p.lit}
- p.next0()
-
-- return
-+ return comment, endline
- }
-
- // Consume a group of adjacent comments, add it to the parser's
-@@ -317,6 +362,7 @@
+@@ -317,6 +358,7 @@
p.leadComment = nil
p.lineComment = nil
prev := p.pos
@@ -119,7 +110,7 @@
p.next0()
if p.tok == token.COMMENT {
-@@ -378,7 +424,7 @@
+@@ -378,7 +420,7 @@
if p.tok == token.SEMICOLON && p.lit == "\n" {
msg += ", found newline"
} else {
@@ -128,7 +119,7 @@
if p.tok.IsLiteral() {
msg += " " + p.lit
}
-@@ -390,7 +436,7 @@
+@@ -390,7 +432,7 @@
func (p *parser) expect(tok token.Token) token.Pos {
pos := p.pos
if p.tok != tok {
@@ -137,7 +128,7 @@
}
p.next() // make progress
return pos
-@@ -409,7 +455,7 @@
+@@ -409,7 +451,7 @@
func (p *parser) expectSemi() {
// semicolon is optional before a closing ')' or '}'
@@ -146,7 +137,7 @@
switch p.tok {
case token.COMMA:
// permit a ',' instead of a ';' but complain
-@@ -454,7 +500,7 @@
+@@ -454,7 +496,7 @@
case token.BREAK, token.CONST, token.CONTINUE, token.DEFER,
token.FALLTHROUGH, token.FOR, token.GO, token.GOTO,
token.IF, token.RETURN, token.SELECT, token.SWITCH,
@@ -155,7 +146,7 @@
// Return only if parser made some progress since last
// sync or if it has not reached 10 sync calls without
// progress. Otherwise consume at least one token to
-@@ -489,7 +535,7 @@
+@@ -489,7 +531,7 @@
func syncDecl(p *parser) {
for {
switch p.tok {
@@ -164,7 +155,7 @@
// see comments in syncStmt
if p.pos == p.syncPos && p.syncCnt < 10 {
p.syncCnt++
-@@ -912,12 +958,12 @@
+@@ -912,12 +954,12 @@
return
}
@@ -179,7 +170,7 @@
scope := ast.NewScope(p.topScope) // function scope
params, results := p.parseSignature(scope)
-@@ -1026,8 +1072,8 @@
+@@ -1026,8 +1068,8 @@
return p.parseStructType()
case token.MUL:
return p.parsePointerType()
@@ -190,7 +181,7 @@
return typ
case token.INTERFACE:
return p.parseInterfaceType()
-@@ -1041,6 +1087,8 @@
+@@ -1041,6 +1083,8 @@
typ := p.parseType()
rparen := p.expect(token.RPAREN)
return &ast.ParenExpr{Lparen: lparen, X: typ, Rparen: rparen}
@@ -199,7 +190,7 @@
}
// no type found
-@@ -1063,7 +1111,7 @@
+@@ -1063,7 +1107,7 @@
defer un(trace(p, "StatementList"))
}
@@ -208,7 +199,7 @@
list = append(list, p.parseStmt())
}
-@@ -1103,12 +1151,12 @@
+@@ -1103,12 +1147,12 @@
// ----------------------------------------------------------------------------
// Expressions
@@ -223,7 +214,7 @@
if p.tok != token.LBRACE {
// function type only
return typ
-@@ -1152,8 +1200,20 @@
+@@ -1152,8 +1196,20 @@
rparen := p.expect(token.RPAREN)
return &ast.ParenExpr{Lparen: lparen, X: x, Rparen: rparen}
@@ -246,7 +237,7 @@
}
if typ := p.tryIdentOrType(); typ != nil {
-@@ -1432,10 +1492,13 @@
+@@ -1432,10 +1488,13 @@
// If x is of the form (T), unparen returns unparen(T), otherwise it returns x.
func unparen(x ast.Expr) ast.Expr {
@@ -263,7 +254,7 @@
}
// checkExprOrType checks that x is an expression or a type
-@@ -1701,6 +1764,10 @@
+@@ -1701,6 +1760,10 @@
// Go spec: The scope of a label is the body of the function
// in which it is declared and excludes the body of any nested
// function.
@@ -274,7 +265,7 @@
stmt := &ast.LabeledStmt{Label: label, Colon: colon, Stmt: p.parseStmt()}
p.declare(stmt, nil, p.labelScope, ast.Lbl, label)
return stmt, false
-@@ -1884,25 +1951,32 @@
+@@ -1884,25 +1947,37 @@
return
}
@@ -301,9 +292,14 @@
+ } else if p.tok == token.DEFAULT {
p.expect(token.DEFAULT)
+ } else {
-+ // patch: support switch foo { ~,{bar} }
-+ // where bar will expand to case x, y, z: w
-+ return p.parseStmt()
++ switch p.tok {
++ case token.ILLEGAL, token.EOF, token.COLON, token.SEMICOLON, token.RBRACE, token.RBRACK, token.LPAREN:
++ p.errorExpected(p.pos, "'case' or 'default'")
++ default:
++ // patch: support switch foo { ~,{bar} }
++ // where bar will expand to case x, y, z: w
++ return p.parseStmt()
++ }
}
-
colon := p.expect(token.COLON)
@@ -311,7 +307,7 @@
p.openScope()
body := p.parseStmtList()
p.closeScope()
-@@ -1980,7 +2054,8 @@
+@@ -1980,7 +2055,8 @@
typeSwitch := p.isTypeSwitchGuard(s2)
lbrace := p.expect(token.LBRACE)
var list []ast.Stmt
@@ -321,7 +317,7 @@
list = append(list, p.parseCaseClause(typeSwitch))
}
rbrace := p.expect(token.RBRACE)
-@@ -2159,13 +2234,17 @@
+@@ -2159,13 +2235,17 @@
}
switch p.tok {
@@ -341,7 +337,7 @@
s, _ = p.parseSimpleStmt(labelOk)
// because of the required look-ahead, labeled statements are
// parsed by parseSimpleStmt - don't expect a semicolon after
-@@ -2173,6 +2252,8 @@
+@@ -2173,6 +2253,8 @@
if _, isLabeledStmt := s.(*ast.LabeledStmt); !isLabeledStmt {
p.expectSemi()
}
@@ -350,7 +346,21 @@
case token.GO:
s = p.parseGoStmt()
case token.DEFER:
-@@ -2366,17 +2447,41 @@
+@@ -2327,11 +2409,12 @@
+ // (Global identifiers are resolved in a separate phase after parsing.)
+ spec := &ast.TypeSpec{Doc: doc, Name: ident}
+ p.declare(spec, nil, p.topScope, ast.Typ, ident)
++
+ if p.tok == token.ASSIGN {
+ spec.Assign = p.pos
+ p.next()
+ }
+- spec.Type = p.parseType()
++ spec.Type = p.parseType()
+ p.expectSemi() // call before accessing p.linecomment
+ spec.Comment = p.lineComment
+
+@@ -2369,17 +2452,41 @@
}
}
@@ -395,7 +405,7 @@
recv = p.parseParameters(scope, false)
}
-@@ -2429,8 +2534,11 @@
+@@ -2432,8 +2539,11 @@
case token.TYPE:
f = p.parseTypeSpec
@@ -409,7 +419,7 @@
default:
pos := p.pos
-@@ -2473,8 +2581,11 @@
+@@ -2476,8 +2586,11 @@
return nil
}
@@ -423,7 +433,7 @@
var decls []ast.Decl
if p.mode&PackageClauseOnly == 0 {
// import decls
-@@ -2489,9 +2600,11 @@
+@@ -2492,9 +2605,11 @@
}
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/parser/parser.go b/vendor/github.com/cosmos72/gomacro/parser/parser.go
index 34d67bc..39e97bd 100644
--- a/vendor/github.com/cosmos72/gomacro/parser/parser.go
+++ b/vendor/github.com/cosmos72/gomacro/parser/parser.go
@@ -44,8 +44,8 @@ type parser struct {
leadComment *ast.CommentGroup // last lead comment
lineComment *ast.CommentGroup // last line comment
- tok0 token.Token // patch: Previous token
- specialChar rune // patch: prefix for quote operators ' ` , ,@
+ tok0 token.Token // patch: Previous token
+ macroChar rune // patch: prefix for quote operators ' ` , ,@
// Next token
pos token.Pos // token position
@@ -87,11 +87,14 @@ func (p *parser) init(fset *mt.FileSet, filename string, lineOffset int, src []b
if mode&ParseComments != 0 {
m = scanner.ScanComments
}
- if p.specialChar == '\x00' {
- p.specialChar = '~'
+ if mode&CopySources != 0 {
+ p.file.SetSourceForContent(src)
+ }
+ if p.macroChar == '\x00' {
+ p.macroChar = '~'
}
eh := func(pos token.Position, msg string) { p.errors.Add(pos, msg) }
- p.scanner.Init(p.file, src, eh, m, p.specialChar)
+ p.scanner.Init(p.file, src, eh, m, p.macroChar)
p.mode = mode
p.trace = mode&Trace != 0 // for convenience (p.trace is used frequently)
@@ -120,6 +123,7 @@ func (p *parser) init(fset *mt.FileSet, filename string, lineOffset int, src []b
p.labelScope = nil
p.targetStack = nil
+ p.openLabelScope()
p.next()
}
@@ -369,7 +373,7 @@ func (p *parser) next() {
// The comment is on same line as the previous token; it
// cannot be a lead comment but may be a line comment.
comment, endline = p.consumeCommentGroup(0)
- if p.file.Line(p.pos) != endline {
+ if p.file.Line(p.pos) != endline || p.tok == token.EOF {
// The next token is on a different line, thus
// the last comment group is a line comment.
p.lineComment = comment
@@ -1136,6 +1140,7 @@ func (p *parser) parseBlockStmt() *ast.BlockStmt {
}
lbrace := p.expect(token.LBRACE)
+
p.openScope()
list := p.parseStmtList()
p.closeScope()
@@ -1770,8 +1775,8 @@ func (p *parser) parseSimpleStmt(mode int) (ast.Stmt, bool) {
}
// The label declaration typically starts at x[0].Pos(), but the label
// declaration may be erroneous due to a token after that position (and
- // before the ':'). If SpuriousErrors is not set, the (only) error re-
- // ported for the line is the illegal label error instead of the token
+ // before the ':'). If SpuriousErrors is not set, the (only) error
+ // reported for the line is the illegal label error instead of the token
// before the ':' that caused the problem. Thus, use the (latest) colon
// position for error reporting.
p.error(colon, "illegal label declaration")
@@ -2410,14 +2415,11 @@ func (p *parser) parseTypeSpec(doc *ast.CommentGroup, _ token.Token, _ int) ast.
spec := &ast.TypeSpec{Doc: doc, Name: ident}
p.declare(spec, nil, p.topScope, ast.Typ, ident)
- // PATCH: support type aliases
if p.tok == token.ASSIGN {
- pos := p.pos
+ spec.Assign = p.pos
p.next()
- spec.Type = &ast.UnaryExpr{OpPos: pos, Op: token.ASSIGN, X: p.parseType()}
- } else {
- spec.Type = p.parseType()
}
+ spec.Type = p.parseType()
p.expectSemi() // call before accessing p.linecomment
spec.Comment = p.lineComment
diff --git a/vendor/github.com/cosmos72/gomacro/parser/quote.go b/vendor/github.com/cosmos72/gomacro/parser/quote.go
index a5b1450..b34624b 100644
--- a/vendor/github.com/cosmos72/gomacro/parser/quote.go
+++ b/vendor/github.com/cosmos72/gomacro/parser/quote.go
@@ -104,7 +104,8 @@ func (p *parser) parseStmtListQuoted() (list []ast.Stmt) {
return
}
-// MakeQuote creates an ast.UnaryExpr representing quote{node}.
+// MakeQuote creates an ast.UnaryExpr representing op{node}:
+// usually one of quote{node}, quasiquote{node}, unquote{node} or unquote_splice{node}.
// Returns both the unaryexpr and the blockstmt containing its body
func MakeQuote(p_or_nil *parser, op token.Token, pos token.Pos, node ast.Node) (*ast.UnaryExpr, *ast.BlockStmt) {
var body *ast.BlockStmt
@@ -139,7 +140,7 @@ func MakeQuote(p_or_nil *parser, op token.Token, pos token.Pos, node ast.Node) (
// due to go/ast strictly typed model, there is only one mechanism
// to insert a statement inside an expression: use a closure.
- // so we return a unary expression: QUOTE (func() { /*block*/ })
+ // so we return a unary expression: op (func() { /*block*/ })
typ := &ast.FuncType{Func: token.NoPos, Params: &ast.FieldList{}}
fun := &ast.FuncLit{Type: typ, Body: body}
return &ast.UnaryExpr{OpPos: pos, Op: op, X: fun}, body
diff --git a/vendor/github.com/cosmos72/gomacro/scanner/scanner.diffs b/vendor/github.com/cosmos72/gomacro/scanner/scanner.diffs
index 94e6620..84b57e8 100644
--- a/vendor/github.com/cosmos72/gomacro/scanner/scanner.diffs
+++ b/vendor/github.com/cosmos72/gomacro/scanner/scanner.diffs
@@ -1,5 +1,5 @@
---- /usr/local/go/src/go/scanner/scanner.go 2017-02-16 19:27:47.000000000 +0000
-+++ scanner.go 2017-04-02 13:54:30.000000000 +0000
+--- go1.10.1/src/go/scanner/scanner.go 2017-02-16 20:27:47.000000000 +0100
++++ scanner.go 2017-12-06 10:19:32.000000000 +0100
@@ -16,6 +16,8 @@
"strconv"
"unicode"
@@ -9,34 +9,32 @@
)
// An ErrorHandler may be provided to Scanner.Init. If a syntax error is
-@@ -31,11 +33,12 @@
+@@ -31,12 +33,14 @@
//
type Scanner struct {
// immutable state
- file *token.File // source file handle
-- dir string // directory portion of file.Name()
-- src []byte // source
-- err ErrorHandler // error reporting; or nil
-- mode Mode // scanning mode
-+ file *token.File // source file handle
-+ dir string // directory portion of file.Name()
-+ src []byte // source
-+ err ErrorHandler // error reporting; or nil
-+ mode Mode // scanning mode
-+ specialChar rune // prefix of interpreter quoting symbols ' ` , ,@
++ file *mt.File // source file handle
+ dir string // directory portion of file.Name()
+ src []byte // source
+ err ErrorHandler // error reporting; or nil
+ mode Mode // scanning mode
++ specialChar rune // prefix of macro-related keywords and symbols ' ` , ,@
++
// scanning state
ch rune // current character
-@@ -110,7 +113,7 @@
+ offset int // character offset
+@@ -110,7 +114,7 @@
// Note that Init may call err if there is an error in the first character
// of the file.
//
-func (s *Scanner) Init(file *token.File, src []byte, err ErrorHandler, mode Mode) {
-+func (s *Scanner) Init(file *token.File, src []byte, err ErrorHandler, mode Mode, specialChar rune) {
++func (s *Scanner) Init(file *mt.File, src []byte, err ErrorHandler, mode Mode, specialChar rune) {
// Explicitly initialize all fields since a scanner may be reused.
if file.Size() != len(src) {
panic(fmt.Sprintf("file size (%d) does not match src len (%d)", file.Size(), len(src)))
-@@ -120,6 +123,7 @@
+@@ -120,6 +124,7 @@
s.src = src
s.err = err
s.mode = mode
@@ -44,16 +42,16 @@
s.ch = ' '
s.offset = 0
-@@ -613,7 +617,7 @@
+@@ -613,7 +618,7 @@
lit = s.scanIdentifier()
if len(lit) > 1 {
// keywords are longer than one letter - avoid lookup otherwise
- tok = token.Lookup(lit)
-+ tok = mt.Lookup(lit) // patch: support macro, quote and friends
++ tok = mt.Lookup(lit)
switch tok {
case token.IDENT, token.BREAK, token.CONTINUE, token.FALLTHROUGH, token.RETURN:
insertSemi = true
-@@ -699,8 +703,14 @@
+@@ -699,8 +704,14 @@
}
case '*':
tok = s.switch2(token.MUL, token.MUL_ASSIGN)
@@ -70,7 +68,7 @@
// comment
if s.insertSemi && s.findLineEnd() {
// reset position to the beginning of the comment
-@@ -718,8 +728,13 @@
+@@ -718,8 +729,13 @@
}
tok = token.COMMENT
lit = comment
@@ -85,7 +83,7 @@
}
case '%':
tok = s.switch2(token.REM, token.REM_ASSIGN)
-@@ -747,6 +762,37 @@
+@@ -747,6 +763,38 @@
}
case '|':
tok = s.switch3(token.OR, token.OR_ASSIGN, '|', token.LOR)
@@ -102,7 +100,7 @@
+ case '\'':
+ s.next()
+ tok = mt.QUOTE
-+ case '`':
++ case '`', '"': // accept both ~` and ~" as ~quasiquote, because ~` confuses syntax hilighting in IDEs
+ s.next()
+ tok = mt.QUASIQUOTE
+ case ',':
@@ -114,12 +112,13 @@
+ tok = mt.UNQUOTE
+ }
+ default:
-+ tok = token.ILLEGAL
-+ }
-+ if tok != token.ILLEGAL {
-+ break
++ lit = s.scanIdentifier()
++ tok = mt.LookupSpecial(lit)
++ if tok == token.ILLEGAL {
++ s.error(s.file.Offset(pos), fmt.Sprintf("expecting macro-related keyword after '%c', found '%c%s'", s.specialChar, s.specialChar, lit))
++ insertSemi = s.insertSemi // preserve insertSemi info
++ }
+ }
-+ fallthrough
default:
// next reports unexpected BOMs - don't repeat
if ch != bom {
diff --git a/vendor/github.com/cosmos72/gomacro/scanner/scanner.go b/vendor/github.com/cosmos72/gomacro/scanner/scanner.go
index 0799953..2de8b26 100644
--- a/vendor/github.com/cosmos72/gomacro/scanner/scanner.go
+++ b/vendor/github.com/cosmos72/gomacro/scanner/scanner.go
@@ -39,7 +39,7 @@ type Scanner struct {
err ErrorHandler // error reporting; or nil
mode Mode // scanning mode
- specialChar rune // prefix of macro-related keywords and symbols ' ` , ,@
+ macroChar rune // prefix of macro-related keywords and symbols ' ` , ,@
// scanning state
ch rune // current character
@@ -114,7 +114,7 @@ const (
// Note that Init may call err if there is an error in the first character
// of the file.
//
-func (s *Scanner) Init(file *mt.File, src []byte, err ErrorHandler, mode Mode, specialChar rune) {
+func (s *Scanner) Init(file *mt.File, src []byte, err ErrorHandler, mode Mode, macroChar rune) {
// Explicitly initialize all fields since a scanner may be reused.
if file.Size() != len(src) {
panic(fmt.Sprintf("file size (%d) does not match src len (%d)", file.Size(), len(src)))
@@ -124,7 +124,7 @@ func (s *Scanner) Init(file *mt.File, src []byte, err ErrorHandler, mode Mode, s
s.src = src
s.err = err
s.mode = mode
- s.specialChar = specialChar
+ s.macroChar = macroChar
s.ch = ' '
s.offset = 0
@@ -766,12 +766,12 @@ scanAgain:
case '@':
// patch: support macro, quote and friends
tok = mt.SPLICE
- case s.specialChar:
- // patch: support macro, quote and friends. s.specialChar is configurable, default is '~'
- // quote specialChar '
- // quasiquote specialChar `
- // unquote specialChar ,
- // unquote_splice specialChar ,@
+ case s.macroChar:
+ // patch: support macro, quote and friends. s.macroChar is configurable, default is '~'
+ // quote macroChar '
+ // quasiquote macroChar `
+ // unquote macroChar ,
+ // unquote_splice macroChar ,@
switch s.ch {
case '\'':
s.next()
@@ -791,7 +791,7 @@ scanAgain:
lit = s.scanIdentifier()
tok = mt.LookupSpecial(lit)
if tok == token.ILLEGAL {
- s.error(s.file.Offset(pos), fmt.Sprintf("expecting macro-related keyword after '%c', found '%c%s'", s.specialChar, s.specialChar, lit))
+ s.error(s.file.Offset(pos), fmt.Sprintf("expecting macro-related keyword after '%c', found '%c%s'", s.macroChar, s.macroChar, lit))
insertSemi = s.insertSemi // preserve insertSemi info
}
}
diff --git a/vendor/github.com/cosmos72/gomacro/token/fileset.go b/vendor/github.com/cosmos72/gomacro/token/fileset.go
index be15815..f9c8e9f 100644
--- a/vendor/github.com/cosmos72/gomacro/token/fileset.go
+++ b/vendor/github.com/cosmos72/gomacro/token/fileset.go
@@ -6,17 +6,20 @@ package token
import (
"go/token"
+ "sync"
)
// -----------------------------------------------------------------------------
// File
// A File is a handle for a file belonging to a FileSet.
-// A File has a name, size, and line offset table.
+// A File has a name, size, line offset table and optionally source code.
//
type File struct {
*token.File
- line int // starting line of this file
+ mutex sync.Mutex // protects source
+ source []string // optional, used by debugger to show source code. each line does NOT contain the final '\n'
+ line int // starting line of this file
}
// PositionFor returns the Position value for the given file position p.
@@ -39,6 +42,51 @@ func (f *File) Position(p token.Pos) (pos token.Position) {
return f.PositionFor(p, true)
}
+// Source returns the source code for the given file position p, if available.
+//
+func (f *File) Source(p token.Pos) (line string, pos token.Position) {
+ if p != token.NoPos {
+ pos = f.Position(p)
+ if pos.IsValid() {
+ f.mutex.Lock()
+ source := f.source
+ f.mutex.Unlock()
+ line := pos.Line - f.line
+ if line > 0 && line <= len(source) {
+ return source[line-1], pos
+ }
+ }
+ }
+ return "", pos
+}
+
+// SetSource sets the source code for the given file.
+//
+func (f *File) SetSource(source []string) {
+ f.mutex.Lock()
+ f.source = source
+ f.mutex.Unlock()
+}
+
+// SetSourceForContent computes and sets the source code for the given file.
+//
+func (f *File) SetSourceForContent(content []byte) {
+ str := string(content)
+ start, n := 0, len(str)
+ var source []string
+ for i := 0; i < n; i++ {
+ if str[i] == '\n' {
+ source = append(source, str[start:i])
+ // skip '\n'
+ start = i + 1
+ }
+ }
+ if start < n {
+ source = append(source, str[start:])
+ }
+ f.SetSource(source)
+}
+
// -----------------------------------------------------------------------------
// FileSet
@@ -96,3 +144,12 @@ func (s *FileSet) PositionFor(p token.Pos, adjusted bool) (pos token.Position) {
func (s *FileSet) Position(p token.Pos) (pos token.Position) {
return s.PositionFor(p, true)
}
+
+// Source converts a Pos p in the fileset into a line of source code (if available) and a Position value.
+//
+func (s *FileSet) Source(p token.Pos) (line string, pos token.Position) {
+ if f := s.File(p); f != nil {
+ line, pos = f.Source(p)
+ }
+ return
+}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/README.md b/vendor/github.com/cosmos72/gomacro/xreflect/README.md
index 50f45d9..eeb843c 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/README.md
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/README.md
@@ -9,4 +9,4 @@ that **emulates** the missing features of `reflect` package:
## License
-GPL v3+
+MPL v2.0+
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/build_compact.go b/vendor/github.com/cosmos72/gomacro/xreflect/build_compact.go
new file mode 100644
index 0000000..d9e69f6
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/build_compact.go
@@ -0,0 +1,357 @@
+// +build !gomacro_xreflect_easy,!gomacro_xreflect_strict
+
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * build_strict.go
+ *
+ * Created on May 07, 2017
+ * Author Massimiliano Ghilardi
+ */
+
+package xreflect
+
+import (
+ "go/types"
+ "reflect"
+)
+
+type z struct{}
+
+// Type:s must be compared with IdenticalTo, not with ==
+// produce compile-time error on == between Type:s
+type Type func(z) *xtype
+
+// Align returns the alignment in bytes of a value of
+// this type when allocated in memory.
+func (t Type) Align() int {
+ return t(z{}).Align()
+}
+
+// FieldAlign returns the alignment in bytes of a value of
+// this type when used as a field in a struct.
+func (t Type) FieldAlign() int {
+ return t(z{}).FieldAlign()
+}
+
+// Identical reports whether the type is identical to type u.
+func (t Type) IdenticalTo(u Type) bool {
+ return identicalType(t, u)
+}
+
+// AssignableTo reports whether a value of the type is assignable to type u.
+func (t Type) AssignableTo(u Type) bool {
+ return t(z{}).AssignableTo(u)
+}
+
+// ConvertibleTo reports whether a value of the type is convertible to type u.
+func (t Type) ConvertibleTo(u Type) bool {
+ return t(z{}).ConvertibleTo(u)
+}
+
+// Comparable reports whether values of this type are comparable.
+func (t Type) Comparable() bool {
+ return t(z{}).Comparable()
+}
+
+// GoType returns the go/types.Type corresponding to the given type.
+func (t Type) GoType() types.Type {
+ return t(z{}).GoType()
+}
+
+// Implements reports whether the type implements the interface type u.
+// It panics if u's Kind is not Interface
+func (t Type) Implements(u Type) bool {
+ return t(z{}).Implements(u)
+}
+
+// Name returns the type's name within its package.
+// It returns an empty string for unnamed types.
+func (t Type) Name() string {
+ if t == nil {
+ return ""
+ }
+ return t(z{}).Name()
+}
+
+// Named returns whether the type is named.
+// It returns false for unnamed types.
+func (t Type) Named() bool {
+ if t == nil {
+ return false
+ }
+ return t(z{}).Named()
+}
+
+// Pkg returns a named type's package, that is, the package where it was defined.
+// If the type was predeclared (string, error) or unnamed (*T, struct{}, []int),
+// Pkg will return nil.
+func (t Type) Pkg() *Package {
+ return t(z{}).Pkg()
+}
+
+// PkgName returns a named type's package name, that is,
+// the default name that the package provides when imported.
+// If the type was predeclared (string, error) or unnamed (*T, struct{}, []int),
+// the package name will be the empty string.
+func (t Type) PkgName() string {
+ return t(z{}).PkgName()
+}
+
+// PkgPath returns a named type's package path, that is, the import path
+// that uniquely identifies the package, such as "encoding/base64".
+// If the type was predeclared (string, error) or unnamed (*T, struct{}, []int),
+// the package path will be the empty string.
+func (t Type) PkgPath() string {
+ return t(z{}).PkgPath()
+}
+
+// ReflectType returns a best-effort reflect.Type that approximates the type.
+// It may be inexact for the following reasons:
+// 1) missing reflect.NamedOf(): no way to programmatically create named types, or to access the underlying type of a named type
+// 2) missing reflect.InterfaceOf(): interface types created at runtime will be approximated by structs
+// 3) missing reflect.MethodOf(): method types created at runtime will be approximated by functions
+// whose first parameter is the receiver
+// 4) reflect.StructOf() does not support embedded or unexported fields
+// 5) go/reflect lacks the ability to create self-referencing types:
+// references to the type itself will be replaced by interface{}.
+//
+// Examples:
+// after invoking at runtime type2.NewStruct() and type2.NewNamed()
+// to create the following type:
+// type List struct { Elem int; Rest *List }
+// ReflectType will return a reflect.Type equivalent to:
+// struct { Elem int; Rest interface{} }
+// i.e. the type name will be missing due to limitation 1 above,
+// and the field 'Rest' will have type interface{} instead of *List due to limitation 5.
+func (t Type) ReflectType() reflect.Type {
+ return t(z{}).ReflectType()
+}
+
+func (t Type) UnsafeForceReflectType(rtype reflect.Type) {
+ t(z{}).UnsafeForceReflectType(rtype)
+}
+
+// Size returns the number of bytes needed to store
+// a value of the given type; it is analogous to unsafe.Sizeof.
+func (t Type) Size() uintptr {
+ return t(z{}).Size()
+}
+
+// String returns a string representation of a type.
+func (t Type) String() string {
+ if t == nil {
+ return ""
+ }
+ return t(z{}).String()
+}
+
+// AddMethod adds method with given name and signature to type, unless it is already in the method list.
+// It panics if the type is unnamed, or if the signature is not a function-with-receiver type.
+// Returns the method index, or < 0 in case of errors
+func (t Type) AddMethod(name string, signature Type) int {
+ return t(z{}).AddMethod(name, signature)
+}
+
+// Bits returns the size of the type in bits.
+// It panics if the type's Kind is not one of the
+// sized or unsized Int, Uint, Float, or Complex kinds.
+func (t Type) Bits() int {
+ return t(z{}).Bits()
+}
+
+// ChanDir returns a channel type's direction.
+// It panics if the type's Kind is not Chan.
+func (t Type) ChanDir() reflect.ChanDir {
+ return t(z{}).ChanDir()
+}
+
+// Complete marks an interface type as complete and computes wrapper methods for embedded fields.
+// It must be called by users of InterfaceOf after the interface's embedded types are fully defined
+// and before using the interface type in any way other than to form other types.
+// Complete returns the receiver.
+func (t Type) Complete() Type {
+ return t(z{}).Complete()
+}
+
+// Elem returns a type's element type.
+// It panics if the type's Kind is not Array, Chan, Map, Ptr, or Slice.
+func (t Type) Elem() Type {
+ return t(z{}).Elem()
+}
+
+func (t Type) elem() Type {
+ return t(z{}).elem()
+}
+
+// Field returns a struct type's i-th field.
+// It panics if the type's Kind is not Struct.
+// It panics if i is not in the range [0, NumField()).
+func (t Type) Field(i int) StructField {
+ return t(z{}).Field(i)
+}
+
+// FieldByName returns the (possibly embedded) struct field with the given name
+// and the number of fields found at the same (shallowest) depth: 0 if not found.
+// Private fields are returned only if they were declared in pkgpath.
+func (t Type) FieldByName(name, pkgpath string) (field StructField, count int) {
+ return t(z{}).FieldByName(name, pkgpath)
+}
+
+// IsMethod reports whether a function type's contains a receiver, i.e. is a method.
+// If IsMethod returns true, the actual receiver type is available as the first parameter, i.e. Type.In(0)
+// It panics if the type's Kind is not Func.
+func (t Type) IsMethod() bool {
+ return t(z{}).IsMethod()
+}
+
+// IsVariadic reports whether a function type's final input parameter is a "..." parameter.
+// If so, t.In(t.NumIn() - 1) returns the parameter's implicit actual type []T.
+// IsVariadic panics if the type's Kind is not Func.
+func (t Type) IsVariadic() bool {
+ return t(z{}).IsVariadic()
+}
+
+// Key returns a map type's key type.
+// It panics if the type's Kind is not Map.
+func (t Type) Key() Type {
+ return t(z{}).Key()
+}
+
+// Kind returns the specific kind of the type.
+func (t Type) Kind() reflect.Kind {
+ if t == nil {
+ return reflect.Invalid
+ }
+ return t(z{}).Kind()
+}
+
+// Len returns an array type's length.
+// It panics if the type's Kind is not Array.
+func (t Type) Len() int {
+ return t(z{}).Len()
+}
+
+// In returns the type of a function type's i'th input parameter.
+// It panics if the type's Kind is not Func.
+// It panics if i is not in the range [0, NumIn()).
+func (t Type) In(i int) Type {
+ return t(z{}).In(i)
+}
+
+// For interfaces, Method returns the i-th method, including methods from embedded interfaces.
+// For all other named types, Method returns the i-th explicitly declared method, ignoring wrapper methods for embedded fields.
+// It panics if i is outside the range 0 .. NumMethod()-1
+func (t Type) Method(i int) Method {
+ return t(z{}).Method(i)
+}
+
+// MethodByName returns the method with given name (including wrapper methods for embedded fields)
+// and the number of methods found at the same (shallowest) depth: 0 if not found.
+// Private methods are returned only if they were declared in pkgpath.
+func (t Type) MethodByName(name, pkgpath string) (method Method, count int) {
+ return t(z{}).MethodByName(name, pkgpath)
+}
+
+// For interfaces, NumMethod returns *total* number of methods for interface t,
+// including wrapper methods for embedded interfaces.
+// For all other named types, NumMethod returns the number of explicitly declared methods,
+// ignoring wrapper methods for embedded fields.
+// Returns 0 for other unnamed types.
+func (t Type) NumMethod() int {
+ return t(z{}).NumMethod()
+}
+
+// NumExplicitMethod returns the number of explicitly declared methods of named type or interface t.
+// Wrapper methods for embedded fields or embedded interfaces are not counted.
+func (t Type) NumExplicitMethod() int {
+ return t(z{}).NumExplicitMethod()
+}
+
+// NumAllMethod returns the *total* number of methods for interface or named type t,
+// including wrapper methods for embedded fields or embedded interfaces.
+// Note: it has slightly different semantics from go/types.(*Named).NumMethods(),
+// since the latter returns 0 for named interfaces, and callers need to manually invoke
+// goNamedType.Underlying().NumMethods() to retrieve the number of methods
+// of a named interface
+func (t Type) NumAllMethod() int {
+ return t(z{}).NumAllMethod()
+}
+
+// NumField returns a struct type's field count.
+// It panics if the type's Kind is not Struct.
+func (t Type) NumField() int {
+ return t(z{}).NumField()
+}
+
+// NumIn returns a function type's input parameter count.
+// It panics if the type's Kind is not Func.
+func (t Type) NumIn() int {
+ return t(z{}).NumIn()
+}
+
+// NumOut returns a function type's output parameter count.
+// It panics if the type's Kind is not Func.
+func (t Type) NumOut() int {
+ return t(z{}).NumOut()
+}
+
+// Out returns the type of a function type's i'th output parameter.
+// It panics if the type's Kind is not Func.
+// It panics if i is not in the range [0, NumOut()).
+func (t Type) Out(i int) Type {
+ return t(z{}).Out(i)
+}
+
+// RemoveMethods removes given methods from type.
+// It panics if the type is unnamed.
+func (t Type) RemoveMethods(names []string, pkgpath string) {
+ t(z{}).RemoveMethods(names, pkgpath)
+}
+
+// SetUnderlying sets the underlying type of a named type and marks it as complete.
+// It panics if the type is unnamed, or if the underlying type is named,
+// or if SetUnderlying() was already invoked on the named type.
+func (t Type) SetUnderlying(underlying Type) {
+ t(z{}).SetUnderlying(underlying)
+}
+
+// gunderlying returns the underlying types.Type of a type.
+// TODO implement Underlying() Type ?
+// Synthetizing the underlying reflect.Type is not possible for interface types,
+// or for struct types with embedded or unexported fields.
+func (t Type) gunderlying() types.Type {
+ return t(z{}).gunderlying()
+}
+
+func (t Type) Universe() *Universe {
+ return t(z{}).Universe()
+}
+
+// GetMethods returns the pointer to the method values.
+// It panics if the type is unnamed
+func (t Type) GetMethods() *[]reflect.Value {
+ return t(z{}).GetMethods()
+}
+
+func wrap(t *xtype) Type {
+ if t == nil {
+ return nil
+ }
+ return func(z) *xtype {
+ return t
+ }
+}
+
+func unwrap(t Type) *xtype {
+ if t == nil {
+ return nil
+ }
+ return t(z{})
+}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/build_easy.go b/vendor/github.com/cosmos72/gomacro/xreflect/build_easy.go
index ba44557..018fafe 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/build_easy.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/build_easy.go
@@ -3,23 +3,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* build_easy.go
*
@@ -44,6 +32,9 @@ type Type interface {
// this type when used as a field in a struct.
FieldAlign() int
+ // IdenticalTo reports whether the type is identical to type u.
+ IdenticalTo(u Type) bool
+
// AssignableTo reports whether a value of the type is assignable to type u.
AssignableTo(u Type) bool
@@ -170,18 +161,33 @@ type Type interface {
// It panics if the type's Kind is not Func.
// It panics if i is not in the range [0, NumIn()).
In(i int) Type
- // Method return the i-th explicitly declared method of named type or interface t.
- // Wrapper methods for embedded fields or embedded interfaces are not returned.
- // It panics if the type is unnamed, or if the type's Kind is not Interface
+
+ // For interfaces, Method returns the i-th method, including methods from embedded interfaces.
+ // For all other named types, Method returns the i-th explicitly declared method, ignoring wrapper methods for embedded fields.
+ // It panics if i is outside the range 0 .. NumMethod()-1
Method(i int) Method
// MethodByName returns the method with given name (including wrapper methods for embedded fields)
// and the number of methods found at the same (shallowest) depth: 0 if not found.
// Private methods are returned only if they were declared in pkgpath.
MethodByName(name, pkgpath string) (method Method, count int)
- // NumMethod returns the number of explicitly declared methods of named type or interface t.
- // Wrapper methods for embedded fields or embedded interfaces are not counted.
+ // For interfaces, NumMethod returns *total* number of methods for interface t,
+ // including wrapper methods for embedded interfaces.
+ // For all other named types, NumMethod returns the number of explicitly declared methods,
+ // ignoring wrapper methods for embedded fields.
+ // Returns 0 for other unnamed types.
NumMethod() int
+ // NumExplicitMethod returns the number of explicitly declared methods for interface or named type t.
+ // Wrapper methods for embedded fields or embedded interfaces are not counted.
+ NumExplicitMethod() int
+ // NumMethod returns the *total* number of methods for interface or named type t,
+ // including wrapper methods for embedded fields or embedded interfaces.
+ // Note: it has slightly different semantics from go/types.(*Named).NumMethods(),
+ // since the latter returns 0 for named interfaces, and callers need to manually invoke
+ // goNamedType.Underlying().NumMethods() to retrieve the number of methods
+ // of a named interface
+ NumAllMethod() int
+
// NumField returns a struct type's field count.
// It panics if the type's Kind is not Struct.
NumField() int
@@ -212,7 +218,7 @@ type Type interface {
// TODO implement Underlying() Type ?
// Synthetizing the underlying reflect.Type is not possible for interface types,
// or for struct types with embedded or unexported fields.
- underlying() types.Type
+ gunderlying() types.Type
elem() Type
@@ -233,72 +239,3 @@ func unwrap(t Type) *xtype {
func wrap(t *xtype) Type {
return t
}
-
-// Complete marks an interface type as complete and computes wrapper methods for embedded fields.
-// It must be called by users of InterfaceOf after the interface's embedded types are fully defined
-// and before using the interface type in any way other than to form other types.
-func (t *xtype) Complete() Type {
- if t.kind != reflect.Interface {
- xerrorf(t, "Complete of non-interface %v", t)
- }
- gtype := t.gtype.Underlying().(*types.Interface)
- gtype.Complete()
- return wrap(t)
-}
-
-var (
- BasicTypes = universe.BasicTypes
-
- TypeOfBool = BasicTypes[reflect.Bool]
- TypeOfInt = BasicTypes[reflect.Int]
- TypeOfInt8 = BasicTypes[reflect.Int8]
- TypeOfInt16 = BasicTypes[reflect.Int16]
- TypeOfInt32 = BasicTypes[reflect.Int32]
- TypeOfInt64 = BasicTypes[reflect.Int64]
- TypeOfUint = BasicTypes[reflect.Uint]
- TypeOfUint8 = BasicTypes[reflect.Uint8]
- TypeOfUint16 = BasicTypes[reflect.Uint16]
- TypeOfUint32 = BasicTypes[reflect.Uint32]
- TypeOfUint64 = BasicTypes[reflect.Uint64]
- TypeOfUintptr = BasicTypes[reflect.Uintptr]
- TypeOfFloat32 = BasicTypes[reflect.Float32]
- TypeOfFloat64 = BasicTypes[reflect.Float64]
- TypeOfComplex64 = BasicTypes[reflect.Complex64]
- TypeOfComplex128 = BasicTypes[reflect.Complex128]
- TypeOfString = BasicTypes[reflect.String]
- TypeOfUnsafePointer = BasicTypes[reflect.UnsafePointer]
- TypeOfError = universe.TypeOfError
- TypeOfInterface = universe.TypeOfInterface
-)
-
-// TypeOf creates a Type corresponding to reflect.TypeOf() of given value.
-// Note: conversions from Type to reflect.Type and back are not exact,
-// because of the reasons listed in Type.ReflectType()
-// Conversions from reflect.Type to Type and back are not exact for the same reasons.
-func TypeOf(rvalue interface{}) Type {
- return universe.FromReflectType(reflect.TypeOf(rvalue))
-}
-
-// FromReflectType creates a Type corresponding to given reflect.Type
-// Note: conversions from Type to reflect.Type and back are not exact,
-// because of the reasons listed in Type.ReflectType()
-// Conversions from reflect.Type to Type and back are not exact for the same reasons.
-func FromReflectType(rtype reflect.Type) Type {
- return universe.FromReflectType(rtype)
-}
-
-// NamedOf returns a new named type for the given type name and package.
-// Initially, the underlying type is set to interface{} - use SetUnderlying to change it.
-// These two steps are separate to allow creating self-referencing types,
-// as for example type List struct { Elem int; Rest *List }
-func NamedOf(name, pkgpath string) Type {
- return universe.NamedOf(name, pkgpath)
-}
-
-func NewPackage(path, name string) *Package {
- return universe.NewPackage(path, name)
-}
-
-func MakeType(gtype types.Type, rtype reflect.Type) Type {
- return universe.MakeType(gtype, rtype)
-}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/build_strict.go b/vendor/github.com/cosmos72/gomacro/xreflect/build_strict.go
index a689538..5fff59d 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/build_strict.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/build_strict.go
@@ -1,25 +1,13 @@
-// +build !gomacro_xreflect_easy
+// +build gomacro_xreflect_strict
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* build_strict.go
*
@@ -34,7 +22,9 @@ import (
"reflect"
)
-type Type []xtype
+// Type:s must be compared with IdenticalTo, not with ==
+// produce compile-time error on == between Type:s
+type Type []*xtype
// Align returns the alignment in bytes of a value of
// this type when allocated in memory.
@@ -48,6 +38,11 @@ func (t Type) FieldAlign() int {
return t[0].FieldAlign()
}
+// Identical reports whether the type is identical to type u.
+func (t Type) IdenticalTo(u Type) bool {
+ return identicalType(t, u)
+}
+
// AssignableTo reports whether a value of the type is assignable to type u.
func (t Type) AssignableTo(u Type) bool {
return t[0].AssignableTo(u)
@@ -180,8 +175,7 @@ func (t Type) ChanDir() reflect.ChanDir {
// and before using the interface type in any way other than to form other types.
// Complete returns the receiver.
func (t Type) Complete() Type {
- t[0].Complete()
- return t
+ return t[0].Complete()
}
// Elem returns a type's element type.
@@ -249,9 +243,9 @@ func (t Type) In(i int) Type {
return t[0].In(i)
}
-// Method return the i-th explicitly declared method of named type or interface t.
-// Wrapper methods for embedded fields or embedded interfaces are not returned.
-// It panics if the type is unnamed, or if the type's Kind is not Interface
+// For interfaces, Method returns the i-th method, including methods from embedded interfaces.
+// For all other named types, Method returns the i-th explicitly declared method, ignoring wrapper methods for embedded fields.
+// It panics if i is outside the range 0 .. NumMethod()-1
func (t Type) Method(i int) Method {
return t[0].Method(i)
}
@@ -263,12 +257,31 @@ func (t Type) MethodByName(name, pkgpath string) (method Method, count int) {
return t[0].MethodByName(name, pkgpath)
}
-// NumMethod returns the number of explicitly declared methods of named type or interface t.
-// Wrapper methods for embedded fields or embedded interfaces are not counted.
+// For interfaces, NumMethod returns *total* number of methods for interface t,
+// including wrapper methods for embedded interfaces.
+// For all other named types, NumMethod returns the number of explicitly declared methods,
+// ignoring wrapper methods for embedded fields.
+// Returns 0 for other unnamed types.
func (t Type) NumMethod() int {
return t[0].NumMethod()
}
+// NumExplicitMethod returns the number of explicitly declared methods of named type or interface t.
+// Wrapper methods for embedded fields or embedded interfaces are not counted.
+func (t Type) NumExplicitMethod() int {
+ return t[0].NumExplicitMethod()
+}
+
+// NumMethod returns the *total* number of methods for interface or named type t,
+// including wrapper methods for embedded fields or embedded interfaces.
+// Note: it has slightly different semantics from go/types.(*Named).NumMethods(),
+// since the latter returns 0 for named interfaces, and callers need to manually invoke
+// goNamedType.Underlying().NumMethods() to retrieve the number of methods
+// of a named interface
+func (t Type) NumAllMethod() int {
+ return t[0].NumAllMethod()
+}
+
// NumField returns a struct type's field count.
// It panics if the type's Kind is not Struct.
func (t Type) NumField() int {
@@ -307,12 +320,12 @@ func (t Type) SetUnderlying(underlying Type) {
t[0].SetUnderlying(underlying)
}
-// underlying returns the underlying types.Type of a type.
+// gunderlying returns the underlying types.Type of a type.
// TODO implement Underlying() Type ?
// Synthetizing the underlying reflect.Type is not possible for interface types,
// or for struct types with embedded or unexported fields.
-func (t Type) underlying() types.Type {
- return t[0].underlying()
+func (t Type) gunderlying() types.Type {
+ return t[0].gunderlying()
}
func (t Type) Universe() *Universe {
@@ -325,21 +338,16 @@ func (t Type) GetMethods() *[]reflect.Value {
return t[0].GetMethods()
}
-// Complete marks an interface type as complete and computes wrapper methods for embedded fields.
-// It must be called by users of InterfaceOf after the interface's embedded types are fully defined
-// and before using the interface type in any way other than to form other types.
-func (t *xtype) Complete() {
- if t.kind != reflect.Interface {
- xerrorf(t, "Complete of non-interface %v", t)
- }
- gtype := t.gtype.Underlying().(*types.Interface)
- gtype.Complete()
-}
-
func wrap(t *xtype) Type {
- return Type{*t}
+ if t != nil {
+ return Type{t}
+ }
+ return nil
}
func unwrap(t Type) *xtype {
- return &t[0]
+ if len(t) != 0 {
+ return t[0]
+ }
+ return nil
}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/composite.go b/vendor/github.com/cosmos72/gomacro/xreflect/composite.go
index 6b54b9f..308b0ac 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/composite.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/composite.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* composite.go
@@ -50,7 +41,7 @@ func (t *xtype) Elem() Type {
}
func (t *xtype) elem() Type {
- gtype := t.underlying()
+ gtype := t.gunderlying()
rtype := t.rtype
switch gtype := gtype.(type) {
case *types.Array:
@@ -75,7 +66,7 @@ func (t *xtype) Key() Type {
if t.Kind() != reflect.Map {
xerrorf(t, "Key of non-map type %v", t)
}
- gtype := t.underlying().(*types.Map)
+ gtype := t.gunderlying().(*types.Map)
return t.universe.MakeType(gtype.Key(), t.rtype.Key())
}
@@ -118,23 +109,3 @@ func (v *Universe) SliceOf(elem Type) Type {
types.NewSlice(elem.GoType()),
reflect.SliceOf(elem.ReflectType()))
}
-
-func ArrayOf(count int, elem Type) Type {
- return elem.Universe().ArrayOf(count, elem)
-}
-
-func ChanOf(dir reflect.ChanDir, elem Type) Type {
- return elem.Universe().ChanOf(dir, elem)
-}
-
-func MapOf(key, elem Type) Type {
- return key.Universe().MapOf(key, elem)
-}
-
-func PtrTo(elem Type) Type {
- return elem.Universe().PtrTo(elem)
-}
-
-func SliceOf(elem Type) Type {
- return elem.Universe().SliceOf(elem)
-}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/debug.go b/vendor/github.com/cosmos72/gomacro/xreflect/debug.go
new file mode 100644
index 0000000..1f1c81d
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/debug.go
@@ -0,0 +1,53 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * debug.go
+ *
+ * Created on Apr 04, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package xreflect
+
+import "fmt"
+
+func debugf(format string, args ...interface{}) {
+ str := fmt.Sprintf(format, args...)
+ fmt.Printf("// debug: %s\n", str)
+}
+
+func (v *Universe) debugf(format string, args ...interface{}) {
+ depth := v.DebugDepth
+ if depth == 0 {
+ return
+ }
+ depth = depth*2 - 2
+ const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "
+ pad := make([]byte, depth)
+ for i := 0; i < depth; i += depth {
+ copy(pad[i:], dots)
+ }
+ format = "// debug: %s" + format + "\n"
+ args = append([]interface{}{pad}, args...)
+ fmt.Printf(format, args...)
+}
+
+func (v *Universe) debug() bool {
+ return v.DebugDepth != 0
+}
+
+func de(v *Universe) {
+ v.DebugDepth--
+}
+
+func bug(v *Universe) *Universe {
+ v.DebugDepth++
+ return v
+}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/fromreflect.go b/vendor/github.com/cosmos72/gomacro/xreflect/fromreflect.go
index 4893237..8c7fa36 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/fromreflect.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/fromreflect.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* fromreflect.go
@@ -26,16 +17,25 @@
package xreflect
import (
+ "go/ast"
"go/token"
"go/types"
"reflect"
"strings"
)
+// TypeOf creates a Type corresponding to reflect.TypeOf() of given value.
+// Note: conversions from Type to reflect.Type and back are not exact,
+// because of the reasons listed in Type.ReflectType()
+// Conversions from reflect.Type to Type and back are not exact for the same reasons.
func (v *Universe) TypeOf(rvalue interface{}) Type {
return v.FromReflectType(reflect.TypeOf(rvalue))
}
+// FromReflectType creates a Type corresponding to given reflect.Type
+// Note: conversions from Type to reflect.Type and back are not exact,
+// because of the reasons listed in Type.ReflectType()
+// Conversions from reflect.Type to Type and back are not exact for the same reasons.
func (v *Universe) FromReflectType(rtype reflect.Type) Type {
if rtype == nil {
return nil
@@ -43,22 +43,33 @@ func (v *Universe) FromReflectType(rtype reflect.Type) Type {
if v.ThreadSafe {
defer un(lock(v))
}
- return v.fromReflectType(rtype)
+ defer v.partialTypes.clear()
+
+ t := v.fromReflectType(rtype)
+
+ // add methods only after generating all requested types.
+ // reason: cannot add methods to incomplete types,
+ // their t.gunderlying() will often be interface{}
+ v.partialTypes.gmap.Iterate(func(gtype types.Type, i interface{}) {
+ t := i.(Type)
+ v.addmethods(t, t.ReflectType())
+ })
+ return t
}
func (v *Universe) fromReflectType(rtype reflect.Type) Type {
if rtype == nil {
return nil
}
- if v.BasicTypes == nil {
- v.init()
- }
t := v.BasicTypes[rtype.Kind()]
if t != nil && t.ReflectType() == rtype {
return t
}
if t = v.ReflectTypes[rtype]; t != nil {
// debugf("found rtype in cache: %v -> %v (%v)", rtype, t, t.ReflectType())
+ if rtype != t.ReflectType() {
+ v.debugf("warning: mismatched rtype cache: %v -> %v (%v)", rtype, t, t.ReflectType())
+ }
// time.Sleep(100 * time.Millisecond)
return t
}
@@ -70,7 +81,7 @@ func (v *Universe) fromReflectType(rtype reflect.Type) Type {
return t
}
}
- if v.RebuildDepth >= 0 {
+ if v.rebuild() {
// decrement ONLY here and in fromReflectPtr() when calling fromReflectInterfacePtrStruct()
v.RebuildDepth--
defer func() {
@@ -83,14 +94,18 @@ func (v *Universe) fromReflectType(rtype reflect.Type) Type {
// otherwise we may get an infinite recursion
if len(name) != 0 {
if !v.rebuild() {
- if t = v.namedTypeFromImport(rtype); t != nil {
+ if t = v.namedTypeFromImport(rtype); unwrap(t) != nil {
// debugf("found type in import: %v -> %v", t, t.ReflectType())
return t
}
}
- t = v.namedOf(name, rtype.PkgPath())
- v.cache(rtype, t) // support self-refencing types
- // debugf("prepared named type %v", t)
+ // t.gunderlying() will often be interface{}. ugly and dangerous, but no solution
+ t = v.reflectNamedOf(name, rtype.PkgPath(), rtype.Kind(), rtype)
+ v.cache(rtype, t) // support self-referencing types
+ }
+ if v.debug() {
+ v.debugf("%s %v", rtype.Kind(), rtype)
+ defer de(bug(v))
}
var u Type
@@ -128,12 +143,16 @@ func (v *Universe) fromReflectType(rtype reflect.Type) Type {
v.cache(rtype, t)
} else {
t.SetUnderlying(u)
- // t.ReflectType() is now u.ReflectType(). but we can do better... we know the exact rtype to set
+ // t.ReflectType() is now u.ReflectType(). overwrite with the exact rtype instead
if !v.rebuild() {
t.UnsafeForceReflectType(rtype)
}
}
- return v.addmethods(t, rtype)
+ if rtype.NumMethod() != 0 {
+ // FromReflectType() will invoke addmethods(t, t.ReflectType()) on all v.partialTypes
+ v.partialTypes.add(t)
+ }
+ return t
}
func (v *Universe) addmethods(t Type, rtype reflect.Type) Type {
@@ -141,17 +160,32 @@ func (v *Universe) addmethods(t Type, rtype reflect.Type) Type {
if n == 0 {
return t
}
- tm := t
- if !t.Named() && t.Kind() == reflect.Ptr {
- // methods on pointer-to-type. add them to the type itself
- tm = t.elem()
+ xt := unwrap(t)
+ if xt.kind == reflect.Interface {
+ // fromReflectInterface() already added methods to interface.
+ return t
+ }
+ if xt.kind == reflect.Ptr {
+ if xt.Named() {
+ errorf(t, "CANNOT add methods to named pointer %v", t)
+ } else {
+ // methods on pointer-to-type. add them to the type itself
+ xt = unwrap(xt.elem())
+ if xt.kind == reflect.Interface {
+ errorf(t, "CANNOT add methods to pointer to interface %v", t)
+ } else if xt.kind == reflect.Ptr {
+ errorf(t, "CANNOT add methods to pointer to pointer %v", t)
+ }
+ }
}
- xt := unwrap(tm)
if !xt.Named() {
- errorf(t, "cannot add methods to unnamed type %v", t)
+ // debugf("NOT adding methods to unnamed type %v", t)
+ return t
}
- if xt.kind == reflect.Interface {
- // debugf("NOT adding methods to interface %v", tm)
+ if xt.kind != gtypeToKind(xt, xt.gtype) {
+ if v.debug() {
+ debugf("NOT adding methods to incomplete named type %v. call SetUnderlying() first.", xt)
+ }
return t
}
if xt.methodvalues != nil {
@@ -163,14 +197,13 @@ func (v *Universe) addmethods(t Type, rtype reflect.Type) Type {
nilv := reflect.Value{}
if v.rebuild() {
v.RebuildDepth--
-
}
for i := 0; i < n; i++ {
rmethod := rtype.Method(i)
signature := v.fromReflectMethod(rmethod.Type)
- n1 := tm.NumMethod()
- tm.AddMethod(rmethod.Name, signature)
- n2 := tm.NumMethod()
+ n1 := xt.NumExplicitMethod()
+ xt.AddMethod(rmethod.Name, signature)
+ n2 := xt.NumExplicitMethod()
if n1 == n2 {
// method was already present
continue
@@ -189,17 +222,16 @@ func (v *Universe) fromReflectField(rfield *reflect.StructField) StructField {
name := rfield.Name
anonymous := rfield.Anonymous
- if strings.HasPrefix(name, StrGensymEmbedded) {
- // this reflect.StructField emulates embedded field using our own convention.
- // eat our own dogfood and convert it back to an embedded field.
- rtype := rfield.Type
- typename := rtype.Name()
- if len(typename) == 0 {
- typename = name[len(StrGensymEmbedded):]
+ if strings.HasPrefix(name, StrGensymAnonymous) {
+ // this reflect.StructField emulates anonymous field using our own convention.
+ // eat our own dogfood and convert it back to an anonymous field.
+ name = name[len(StrGensymAnonymous):]
+ if len(name) == 0 || name[0] >= '0' && name[0] <= '9' {
+ rtype := rfield.Type
+ name = rtype.Name()
+ // rebuild the type's name and package
+ t = v.rebuildnamed(t, name, rtype.PkgPath())
}
- // rebuild the type's name and package
- t = v.named(t, typename, rtype.PkgPath())
- name = typename
anonymous = true
} else if strings.HasPrefix(name, StrGensymPrivate) {
// this reflect.StructField emulates private (unexported) field using our own convention.
@@ -218,19 +250,15 @@ func (v *Universe) fromReflectField(rfield *reflect.StructField) StructField {
}
}
-func (v *Universe) fromReflectFields(rfields []reflect.StructField) []StructField {
- fields := make([]StructField, len(rfields))
- for i := range rfields {
- fields[i] = v.fromReflectField(&rfields[i])
- }
- return fields
-}
-
-// named creates a new named Type based on t, having the given name and pkgpath
-func (v *Universe) named(t Type, name string, pkgpath string) Type {
+// rebuildnamed re-creates a named Type based on t, having the given name and pkgpath
+func (v *Universe) rebuildnamed(t Type, name string, pkgpath string) Type {
if t.Name() != name || t.PkgPath() != pkgpath {
- t2 := v.namedOf(name, pkgpath)
- t2.SetUnderlying(v.maketype(t.underlying(), t.ReflectType()))
+ t2 := v.namedOf(name, pkgpath, t.Kind())
+ rtype := t.ReflectType()
+ // do not trust v.maketype() detection of reflect.Kind from t.gunderlying():
+ // t may be incomplete, thus t.gunderlying() could be a dummy interface{}
+ t2.SetUnderlying(v.maketype3(t.Kind(), t.gunderlying(), ReflectUnderlying(rtype)))
+ t2.UnsafeForceReflectType(rtype)
t = t2
}
return t
@@ -240,7 +268,7 @@ func (v *Universe) named(t Type, name string, pkgpath string) Type {
func (v *Universe) fromReflectArray(rtype reflect.Type) Type {
count := rtype.Len()
elem := v.fromReflectType(rtype.Elem())
- if v.rebuild() {
+ if true || v.rebuild() { // rtype may be named... clean it
rtype = reflect.ArrayOf(count, elem.ReflectType())
}
return v.maketype(types.NewArray(elem.GoType(), int64(count)), rtype)
@@ -250,7 +278,7 @@ func (v *Universe) fromReflectArray(rtype reflect.Type) Type {
func (v *Universe) fromReflectChan(rtype reflect.Type) Type {
dir := rtype.ChanDir()
elem := v.fromReflectType(rtype.Elem())
- if v.rebuild() {
+ if true || v.rebuild() { // rtype may be named... clean it
rtype = reflect.ChanOf(dir, elem.ReflectType())
}
gdir := dirToGdir(dir)
@@ -272,7 +300,7 @@ func (v *Universe) fromReflectFunc(rtype reflect.Type) Type {
gout := toGoTuple(out)
variadic := rtype.IsVariadic()
- if v.rebuild() {
+ if true || v.rebuild() { // rtype may be named... clean it
rin := toReflectTypes(in)
rout := toReflectTypes(out)
rtype = reflect.FuncOf(rin, rout, variadic)
@@ -303,7 +331,7 @@ func (v *Universe) fromReflectMethod(rtype reflect.Type) Type {
gout := toGoTuple(out)
variadic := rtype.IsVariadic()
- if v.RebuildDepth >= 1 {
+ if v.RebuildDepth > 1 {
rin := toReflectTypes(in)
rout := toReflectTypes(out)
rtype = reflect.FuncOf(rin, rout, variadic)
@@ -317,7 +345,7 @@ func (v *Universe) fromReflectMethod(rtype reflect.Type) Type {
// fromReflectMethod converts a reflect.Type with Kind reflect.Func into a method Type,
// manually adding the given type as receiver
func (v *Universe) fromReflectInterfaceMethod(rtype, rmethod reflect.Type) Type {
- return v.fromReflectMethod(addreceiver(rtype, rmethod))
+ return v.fromReflectMethod(rAddReceiver(rtype, rmethod))
}
// fromReflectInterface converts a reflect.Type with Kind reflect.Interface into a Type
@@ -329,23 +357,23 @@ func (v *Universe) fromReflectInterface(rtype reflect.Type) Type {
gmethods := make([]*types.Func, n)
for i := 0; i < n; i++ {
rmethod := rtype.Method(i)
- method := v.fromReflectInterfaceMethod(rtype, rmethod.Type)
+ method := v.fromReflectFunc(rmethod.Type) // do NOT add a receiver: types.NewInterface() will add it
pkg := v.loadPackage(rmethod.PkgPath)
gmethods[i] = types.NewFunc(token.NoPos, (*types.Package)(pkg), rmethod.Name, method.GoType().(*types.Signature))
}
- // no way to extract embedded interfaces from reflect.Type
+ // no way to extract embedded interfaces from reflect.Type. Just collect all methods
if v.rebuild() {
rfields := make([]reflect.StructField, 1+n)
rfields[0] = approxInterfaceHeader()
for i := 0; i < n; i++ {
rmethod := rtype.Method(i)
rmethodtype := rmethod.Type
- if v.RebuildDepth >= 1 {
+ if v.RebuildDepth > 1 {
// needed? method := v.FromReflectType(rmethod.Type) above
// should already rebuild rmethod.Type.ReflectType()
rmethodtype = v.fromReflectInterfaceMethod(rtype, rmethod.Type).ReflectType()
}
- rfields[i+1] = approxInterfaceMethod(rmethod.Name, rmethodtype)
+ rfields[i+1] = approxInterfaceMethodAsField(rmethod.Name, rmethodtype)
}
// interfaces may have lots of methods, thus a lot of fields in the proxy struct.
// Then use a pointer to the proxy struct: InterfaceOf() does that, and we must behave identically
@@ -360,7 +388,7 @@ func isReflectInterfaceStruct(rtype reflect.Type) bool {
if rtype.Kind() == reflect.Struct {
if n := rtype.NumField(); n != 0 {
rfield := rtype.Field(0)
- return rfield.Name == StrGensymInterface && rfield.Type == reflectTypeOfInterfaceHeader
+ return rfield.Name == StrGensymInterface && rfield.Type == rTypeOfInterfaceHeader
}
}
return false
@@ -386,31 +414,19 @@ func (v *Universe) fromReflectInterfacePtrStruct(rtype reflect.Type) Type {
for i := 1; i < n; i++ {
rfield := rtype.Field(i)
name := rfield.Name
- if strings.HasPrefix(name, StrGensymEmbedded) {
- typename := name[len(StrGensymEmbedded):]
- t := v.fromReflectType(rfield.Type)
- if t.Kind() != reflect.Interface {
- errorf(t, "FromReflectType: reflect.Type <%v> is an emulated interface containing the embedded interface <%v>.\n\tExtracting the latter returned a non-interface: %v", t)
- }
- t = v.named(t, typename, rfield.Type.PkgPath())
- gembeddeds = append(gembeddeds, t.GoType().(*types.Named))
- if rebuild {
- rebuildfields[i] = approxInterfaceEmbedded(t)
- }
- } else {
- if strings.HasPrefix(name, StrGensymPrivate) {
- name = name[len(StrGensymPrivate):]
- }
- t := v.fromReflectFunc(rfield.Type)
- if t.Kind() != reflect.Func {
- errorf(t, "FromReflectType: reflect.Type <%v> is an emulated interface containing the method <%v>.\n\tExtracting the latter returned a non-function: %v", t)
- }
- gtype := t.GoType().Underlying()
- pkg := v.loadPackage(rfield.PkgPath)
- gmethods = append(gmethods, types.NewFunc(token.NoPos, (*types.Package)(pkg), name, gtype.(*types.Signature)))
- if rebuild {
- rebuildfields[i] = approxInterfaceMethod(name, t.ReflectType())
- }
+
+ if strings.HasPrefix(name, StrGensymPrivate) {
+ name = name[len(StrGensymPrivate):]
+ }
+ t := v.fromReflectFunc(rfield.Type)
+ if t.Kind() != reflect.Func {
+ errorf(t, "FromReflectType: reflect.Type <%v> is an emulated interface containing the method <%v>.\n\tExtracting the latter returned a non-function: %v", t)
+ }
+ gtype := t.GoType().Underlying()
+ pkg := v.loadPackage(rfield.PkgPath)
+ gmethods = append(gmethods, types.NewFunc(token.NoPos, (*types.Package)(pkg), name, gtype.(*types.Signature)))
+ if rebuild {
+ rebuildfields[i] = approxInterfaceMethodAsField(name, t.ReflectType())
}
}
if rebuild {
@@ -419,11 +435,30 @@ func (v *Universe) fromReflectInterfacePtrStruct(rtype reflect.Type) Type {
return v.maketype(types.NewInterface(gmethods, gembeddeds).Complete(), rtype)
}
+func (v *Universe) fromReflectInterfaceEmbeddeds(rinterf, rtype reflect.Type) []Type {
+ if rtype.Kind() != reflect.Array || rtype.Len() != 0 || rtype.Elem().Kind() != reflect.Struct {
+ return nil
+ }
+ rtype = rtype.Elem()
+ n := rtype.NumField()
+ ts := make([]Type, n)
+ for i := 0; i < n; i++ {
+ f := rtype.Field(i)
+ t := v.fromReflectInterface(f.Type)
+ if t.Kind() != reflect.Interface {
+ errorf(t, `FromReflectType: reflect.Type <%v> is an emulated interface containing the embedded interface <%v>.
+ Extracting the latter returned a non-interface: %v`, rinterf, f.Type, t)
+ }
+ ts[i] = t
+ }
+ return ts
+}
+
// fromReflectMap converts a reflect.Type with Kind reflect.map into a Type
func (v *Universe) fromReflectMap(rtype reflect.Type) Type {
key := v.fromReflectType(rtype.Key())
elem := v.fromReflectType(rtype.Elem())
- if v.rebuild() {
+ if true || v.rebuild() { // rtype may be named... clean it
rtype = reflect.MapOf(key.ReflectType(), elem.ReflectType())
}
return v.maketype(types.NewMap(key.GoType(), elem.GoType()), rtype)
@@ -450,16 +485,16 @@ func (v *Universe) fromReflectPtr(rtype reflect.Type) Type {
elem := v.fromReflectType(relem)
gtype = types.NewPointer(elem.GoType())
}
- if rebuild {
+ if true || rebuild { // rtype may be named... clean it
rtype = reflect.PtrTo(relem)
}
- return v.maketype(gtype, rtype)
+ return v.maketype3(reflect.Ptr, gtype, rtype)
}
// fromReflectPtr converts a reflect.Type with Kind reflect.Slice into a Type
func (v *Universe) fromReflectSlice(rtype reflect.Type) Type {
elem := v.fromReflectType(rtype.Elem())
- if v.rebuild() {
+ if true || v.rebuild() { // rtype may be named... clean it
rtype = reflect.SliceOf(elem.ReflectType())
}
return v.maketype(types.NewSlice(elem.GoType()), rtype)
@@ -469,19 +504,69 @@ func (v *Universe) fromReflectSlice(rtype reflect.Type) Type {
func (v *Universe) fromReflectStruct(rtype reflect.Type) Type {
n := rtype.NumField()
fields := make([]StructField, n)
+ canrebuildexactly := true
for i := 0; i < n; i++ {
rfield := rtype.Field(i)
fields[i] = v.fromReflectField(&rfield)
+ if canrebuildexactly && (fields[i].Anonymous || !ast.IsExported(fields[i].Name)) {
+ canrebuildexactly = false
+ }
}
vars := toGoFields(fields)
tags := toTags(fields)
- // use reflect.StructOf to recreate reflect.Type only if requested, because it's not 100% accurate:
+ // use reflect.StructOf to recreate reflect.Type only if requested,
+ // or if rtype is named but we can guarantee that result is 100% accurate:
// reflect.StructOf does not support unexported or anonymous fields,
- // and go/reflect cannot create named types, interfaces and self-referencing types
- if v.rebuild() {
- rfields := toReflectFields(fields, true)
- rtype = reflect.StructOf(rfields)
+ // and cannot create self-referencing types from scratch.
+ if v.rebuild() || (canrebuildexactly && len(rtype.Name()) != 0) {
+ rfields := toReflectFields(fields, !v.rebuild())
+ rtype2 := reflect.StructOf(rfields)
+ if v.rebuild() || rtype2.AssignableTo(rtype) {
+ rtype = rtype2
+ }
}
return v.maketype(types.NewStruct(vars, tags), rtype)
}
+
+// best-effort implementation of missing reflect.Type.Underlying()
+func ReflectUnderlying(rtype reflect.Type) reflect.Type {
+ if len(rtype.Name()) == 0 {
+ return rtype
+ }
+ ru := rbasictypes[rtype.Kind()]
+ if ru != nil {
+ return ru
+ }
+ switch rtype.Kind() {
+ case reflect.Array:
+ ru = reflect.ArrayOf(rtype.Len(), rtype.Elem())
+ case reflect.Chan:
+ ru = reflect.ChanOf(rtype.ChanDir(), rtype.Elem())
+ case reflect.Func:
+ rin := make([]reflect.Type, rtype.NumIn())
+ for i := range rin {
+ rin[i] = rtype.In(i)
+ }
+ rout := make([]reflect.Type, rtype.NumOut())
+ for i := range rout {
+ rout[i] = rtype.Out(i)
+ }
+ ru = reflect.FuncOf(rin, rout, rtype.IsVariadic())
+ case reflect.Map:
+ ru = reflect.MapOf(rtype.Key(), rtype.Elem())
+ case reflect.Ptr:
+ ru = reflect.PtrTo(rtype.Elem())
+ case reflect.Slice:
+ ru = reflect.SliceOf(rtype.Elem())
+ case reflect.Struct:
+ f := make([]reflect.StructField, rtype.NumField())
+ for i := range f {
+ f[i] = rtype.Field(i)
+ }
+ ru = reflect.StructOf(f)
+ default:
+ ru = rtype // cannot do better... reflect cannot create interfaces
+ }
+ return ru
+}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/function.go b/vendor/github.com/cosmos72/gomacro/xreflect/function.go
index 512bf6c..79ca124 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/function.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/function.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* type.go
@@ -26,6 +17,7 @@
package xreflect
import (
+ "fmt"
"go/types"
"reflect"
)
@@ -37,7 +29,7 @@ func (t *xtype) IsMethod() bool {
if t.Kind() != reflect.Func {
xerrorf(t, "IsMethod of non-func type %v", t)
}
- gtype := t.underlying().(*types.Signature)
+ gtype := t.gunderlying().(*types.Signature)
return gtype.Recv() != nil
}
@@ -58,9 +50,10 @@ func (t *xtype) In(i int) Type {
if t.Kind() != reflect.Func {
xerrorf(t, "In of non-func type %v", t)
}
- gtype := t.underlying().(*types.Signature)
+ gtype := t.gunderlying().(*types.Signature)
+ recv := gtype.Recv()
var va *types.Var
- if recv := gtype.Recv(); recv != nil {
+ if recv != nil {
// include the receiver as first parameter
if i == 0 {
va = recv
@@ -70,6 +63,7 @@ func (t *xtype) In(i int) Type {
} else {
va = gtype.Params().At(i)
}
+ t.NumIn() // for consistency check
return t.universe.MakeType(va.Type(), t.rtype.In(i))
}
@@ -79,15 +73,26 @@ func (t *xtype) NumIn() int {
if t.Kind() != reflect.Func {
xerrorf(t, "NumIn of non-func type %v", t)
}
- var nparams, nrecv int
- gtype := t.underlying().(*types.Signature)
+ n := 0
+ gtype, ok := t.gunderlying().(*types.Signature)
+ if !ok {
+ xerrorf(t, "NumIn of non-func type %v (gotype = %v)", t, t.gunderlying())
+ }
if gtype.Recv() != nil {
- nrecv = 1
+ n++
}
if params := gtype.Params(); params != nil {
- nparams = params.Len()
+ n += params.Len()
}
- return nparams + nrecv
+ if t.rtype != rTypeOfForward && t.rtype.NumIn() != n {
+ var srecv string
+ if gtype.Recv() != nil {
+ srecv = fmt.Sprintf(" - including receiver type %v", gtype.Recv().Type())
+ }
+ xerrorf(t, `inconsistent function type: %v has %d params%s
+ but its reflect.Type: %v has %d params`, t, n, srecv, t.rtype, t.rtype.NumIn())
+ }
+ return n
}
// NumOut returns a function type's output parameter count.
@@ -96,7 +101,7 @@ func (t *xtype) NumOut() int {
if t.Kind() != reflect.Func {
xerrorf(t, "NumOut of non-func type %v", t)
}
- gtype := t.underlying().(*types.Signature)
+ gtype := t.gunderlying().(*types.Signature)
return gtype.Results().Len()
}
@@ -107,19 +112,20 @@ func (t *xtype) Out(i int) Type {
if t.Kind() != reflect.Func {
xerrorf(t, "Out of non-func type %v", t)
}
- gtype := t.underlying().(*types.Signature)
+ gtype := t.gunderlying().(*types.Signature)
va := gtype.Results().At(i)
return t.universe.MakeType(va.Type(), t.rtype.Out(i))
}
-func FuncOf(in []Type, out []Type, variadic bool) Type {
- return MethodOf(nil, in, out, variadic)
-}
-
func (v *Universe) FuncOf(in []Type, out []Type, variadic bool) Type {
return v.MethodOf(nil, in, out, variadic)
}
+/*
+func FuncOf(in []Type, out []Type, variadic bool) Type {
+ return MethodOf(nil, in, out, variadic)
+}
+
func MethodOf(recv Type, in []Type, out []Type, variadic bool) Type {
v := universe
if recv != nil {
@@ -131,6 +137,7 @@ func MethodOf(recv Type, in []Type, out []Type, variadic bool) Type {
}
return v.MethodOf(recv, in, out, variadic)
}
+*/
func (v *Universe) MethodOf(recv Type, in []Type, out []Type, variadic bool) Type {
gin := toGoTuple(in)
@@ -138,7 +145,7 @@ func (v *Universe) MethodOf(recv Type, in []Type, out []Type, variadic bool) Typ
rin := toReflectTypes(in)
rout := toReflectTypes(out)
var grecv *types.Var
- if recv != nil {
+ if unwrap(recv) != nil {
rin = append([]reflect.Type{recv.ReflectType()}, rin...)
grecv = toGoParam(recv)
}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/gensym.go b/vendor/github.com/cosmos72/gomacro/xreflect/gensym.go
index 3472b33..a76bf3f 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/gensym.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/gensym.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* gensym.go
@@ -31,27 +22,27 @@ import (
// the following constants must match with github.com/cosmos72/gomacro/base/constants.go
const (
- StrGensymInterface = "\u0080" // name of extra struct field needed by the interpreter when creating interpreted interfaces
- StrGensymPrivate = "\u00AD" // prefix to generate names for unexported struct fields.
- StrGensymEmbedded = "\u00BB" // prefix to generate names for embedded struct fields.
+ StrGensymInterface = "\U0001202A" // name of extra struct field needed by the interpreter when creating interpreted interfaces
+ StrGensymPrivate = "\U00012038" // prefix to generate names for unexported struct fields.
+ StrGensymAnonymous = "\U00012039" // prefix to generate names for anonymous struct fields.
)
var gensymn = 0
-func GensymEmbedded(name string) string {
- if len(name) == 0 {
- n := gensymn
- gensymn++
- name = fmt.Sprintf("%d", n)
+func GensymAnonymous(name string) string {
+ if len(name) != 0 {
+ return StrGensymAnonymous + name
}
- return StrGensymEmbedded + name
+ n := gensymn
+ gensymn++
+ return fmt.Sprintf("%s%d", StrGensymAnonymous, n)
}
func GensymPrivate(name string) string {
- if len(name) == 0 {
- n := gensymn
- gensymn++
- name = fmt.Sprintf("%d", n)
+ if len(name) != 0 {
+ return StrGensymPrivate + name
}
- return StrGensymPrivate + name
+ n := gensymn
+ gensymn++
+ return fmt.Sprintf("%s%d", StrGensymPrivate, n)
}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/global.go b/vendor/github.com/cosmos72/gomacro/xreflect/global.go
index 9b8a961..9057d6a 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/global.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/global.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* global.go
@@ -33,6 +24,8 @@ import (
type Package types.Package
+type Forward interface{}
+
// InterfaceHeader is the internal header of interpreted interfaces
type InterfaceHeader struct {
// val and typ must be private! otherwise interpreted code may mess with them and break type safety
@@ -66,7 +59,7 @@ type Method struct {
}
type StructField struct {
- // Name is the field name.
+ // Name is the field name. If empty, it will be computed from Type name, and Anonymous will be set to true
Name string
// Pkg is the package that qualifies a lower case (unexported)
// field name. It may be nil for upper case (exported) field names.
@@ -74,9 +67,9 @@ type StructField struct {
Pkg *Package
Type Type // field type
Tag reflect.StructTag // field tag string
- Offset uintptr // offset within struct, in bytes
+ Offset uintptr // offset within struct, in bytes. meaningful only if all Deref[] are false
Index []int // index sequence for reflect.Type.FieldByIndex or reflect.Value.FieldByIndex
- Anonymous bool // is an embedded field. Note: embedded field's name should be set to the type's name
+ Anonymous bool // is an embedded field. If true, Name should be empty or equal to the type's name
}
type xtype struct {
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/importer.go b/vendor/github.com/cosmos72/gomacro/xreflect/importer.go
index 2682a4f..0c19fe4 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/importer.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/importer.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* importer.go
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/init.go b/vendor/github.com/cosmos72/gomacro/xreflect/init.go
index 46a5e4f..8a7680a 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/init.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/init.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* init.go
@@ -53,7 +44,7 @@ var rbasictypes = []reflect.Type{
reflect.UnsafePointer: reflect.TypeOf(unsafe.Pointer(nil)),
}
-func (v *Universe) makebasictypes() []Type {
+func (v *Universe) makeBasicTypes() []Type {
m := make([]Type, len(rbasictypes))
for gkind := types.Bool; gkind <= types.UnsafePointer; gkind++ {
kind := ToReflectKind(gkind)
@@ -69,7 +60,7 @@ func (v *Universe) makebasictypes() []Type {
return m
}
-func (v *Universe) makeerror() Type {
+func (v *Universe) makeError() Type {
t := wrap(&xtype{
kind: reflect.Interface,
gtype: types.Universe.Lookup("error").Type(),
@@ -80,51 +71,48 @@ func (v *Universe) makeerror() Type {
return t
}
-func (v *Universe) makeinterface() Type {
+func (v *Universe) makeInterface() Type {
t := wrap(&xtype{
kind: reflect.Interface,
gtype: types.NewInterface(nil, nil).Complete(),
- rtype: reflect.TypeOf((*interface{})(nil)).Elem(),
+ rtype: rTypeOfInterface,
universe: v,
})
v.add(t)
return t
}
-func (v *Universe) Init() *Universe {
- if v.ThreadSafe {
- defer un(lock(v))
- }
- return v.init()
+func (v *Universe) makeForward() Type {
+ t := wrap(&xtype{
+ kind: reflect.Invalid,
+ gtype: types.NewInterface(nil, nil).Complete(),
+ rtype: rTypeOfForward,
+ universe: v,
+ })
+ v.add(t)
+ return t
}
-func (v *Universe) init() *Universe {
- v.BasicTypes = v.makebasictypes()
- v.TypeOfError = v.makeerror()
- v.TypeOfInterface = v.makeinterface()
+func NewUniverse() *Universe {
+ v := &Universe{}
+ v.BasicTypes = v.makeBasicTypes()
+ v.TypeOfForward = v.makeForward()
+ v.TypeOfInterface = v.makeInterface()
+ v.TypeOfError = v.makeError()
// critical! trying to rebuild "error" type creates a non-indentical copy... lots of conversions would fail
v.cache(v.TypeOfError.ReflectType(), v.TypeOfError)
v.cache(v.TypeOfInterface.ReflectType(), v.TypeOfInterface)
return v
}
-func NewUniverse() *Universe {
- v := &Universe{}
- return v.init()
-}
-
const MaxDepth = int(^uint(0) >> 1)
var (
- universe = (&Universe{ThreadSafe: true}).Init()
-
- reflectTypeOfInterfaceHeader = reflect.TypeOf(InterfaceHeader{})
+ rTypeOfInterface = reflect.TypeOf((*interface{})(nil)).Elem()
+ rTypeOfInterfaceHeader = reflect.TypeOf(InterfaceHeader{})
+ rTypeOfForward = reflect.TypeOf((*Forward)(nil)).Elem()
)
-func DefaultUniverse() *Universe {
- return universe
-}
-
// Bits returns the size of the type in bits.
// It panics if the type's Kind is not one of the
// sized or unsized Int, Uint, Float, or Complex kinds.
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/interface.go b/vendor/github.com/cosmos72/gomacro/xreflect/interface.go
index e4d5eaf..f279ef0 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/interface.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/interface.go
@@ -1,23 +1,14 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- *
- *
- * struct.go
+ * interface.go
*
* Created on May 07, 2017
* Author Massimiliano Ghilardi
@@ -31,57 +22,73 @@ import (
"reflect"
)
+func IsEmulatedInterface(t Type) bool {
+ xt := unwrap(t)
+ return xt.kind == reflect.Interface && xt.rtype.Kind() == reflect.Ptr
+}
+
+// extract the concrete value and type contained in an emulated interface
+func FromEmulatedInterface(v reflect.Value) (reflect.Value, Type) {
+ h := v.Elem().Field(0).Interface().(InterfaceHeader)
+ return h.val, h.typ
+}
+
+// create an emulated interface from given value, type and method extractors
+// (methods extractors are functions that, given a value, return one of its methods)
+func ToEmulatedInterface(rtypeinterf reflect.Type, v reflect.Value,
+ t Type, obj2methods []func(reflect.Value) reflect.Value) reflect.Value {
+
+ addr := reflect.New(rtypeinterf.Elem())
+ place := addr.Elem()
+ place.Field(0).Set(reflect.ValueOf(InterfaceHeader{v, t}))
+ for i := range obj2methods {
+ place.Field(i + 1).Set(obj2methods[i](v))
+ }
+ return addr
+}
+
+// extract the already-made i-th closure from inside the emulated interface object.
+func EmulatedInterfaceGetMethod(obj reflect.Value, index int) reflect.Value {
+ return obj.Elem().Field(index + 1)
+}
+
+// create []*types.Func suitable for types.NewInterface.
+// makes a copy of each methods[i].gunderlying().(*types.Signature)
+// because types.NewInterface will destructively modify them!
func toGoFuncs(names []string, methods []Type) []*types.Func {
gfuns := make([]*types.Func, len(methods))
for i, t := range methods {
- switch gsig := t.underlying().(type) {
+ switch gsig := t.gunderlying().(type) {
case *types.Signature:
+ gsig = cloneGoSignature(gsig)
gfuns[i] = types.NewFunc(token.NoPos, nil, names[i], gsig)
default:
- errorf(t, "InterfaceOf: %d-th 'method' argument is not a function type: %v", i, t)
+ errorf(t, "interface contains non-function: %s %v", names[i], t)
}
}
return gfuns
}
+func cloneGoSignature(gsig *types.Signature) *types.Signature {
+ return types.NewSignature(gsig.Recv(), gsig.Params(), gsig.Results(), gsig.Variadic())
+}
+
func toGoNamedTypes(ts []Type) []*types.Named {
gnameds := make([]*types.Named, len(ts))
for i, t := range ts {
if gt, ok := t.GoType().(*types.Named); ok {
- gnameds[i] = gt
+ if t.Kind() == reflect.Interface {
+ gnameds[i] = gt
+ } else {
+ errorf(t, "interface contains embedded non-interface: %v", t)
+ }
} else {
- errorf(t, "InterfaceOf: %d-th 'embedded' argument is not a named type: %v", i, t)
+ errorf(t, "interface contains embedded interface without name: %v", t)
}
}
return gnameds
}
-func (v *Universe) InterfaceOf(methodnames []string, methods []Type, embeddeds []Type) Type {
- gmethods := toGoFuncs(methodnames, methods)
- gembeddeds := toGoNamedTypes(embeddeds)
-
- // for reflect.Type, approximate an interface as a struct:
- // one field for the wrapped object: type is interface{},
- // one field for each embedded interface: type is the embedded interface type
- // one field for each method: type is the method type i.e. a function
- nemb := len(embeddeds)
- rfields := make([]reflect.StructField, 1+nemb+len(methods))
- rfields[0] = approxInterfaceHeader()
- for i, emb := range embeddeds {
- rfields[i+1] = approxInterfaceEmbedded(emb)
- }
- for i, method := range methods {
- rfields[i+nemb+1] = approxInterfaceMethod(methodnames[i], method.ReflectType())
- }
- return v.maketype3(
- reflect.Interface,
- types.NewInterface(gmethods, gembeddeds),
- // interfaces may have lots of methods, thus a lot of fields in the proxy struct.
- // Use a pointer to the proxy struct
- reflect.PtrTo(reflect.StructOf(rfields)),
- )
-}
-
// InterfaceOf returns a new interface for the given methods and embedded types.
// After the methods and embeddeds are fully defined, call Complete() to mark
// the interface as complete and compute wrapper methods for embedded fields.
@@ -90,14 +97,54 @@ func (v *Universe) InterfaceOf(methodnames []string, methods []Type, embeddeds [
// i.e. its method set is not computed yet.
// Once you know that methods and embedded interfaces are complete,
// call Complete() to compute the method set and mark this Type as complete.
-func InterfaceOf(methodnames []string, methods []Type, embeddeds []Type) Type {
- v := universe
- if len(embeddeds) != 0 && embeddeds[0] != nil {
- v = embeddeds[0].Universe()
- } else if len(methods) != 0 && methods[0] != nil {
- v = methods[0].Universe()
+func (v *Universe) InterfaceOf(methodnames []string, methodtypes []Type, embeddeds []Type) Type {
+ gmethods := toGoFuncs(methodnames, methodtypes)
+ gembeddeds := toGoNamedTypes(embeddeds)
+
+ gtype := types.NewInterface(gmethods, gembeddeds)
+ gtype.Complete()
+
+ // for reflect.Type, approximate an interface as a pointer-to-struct:
+ // one field for the wrapped object: type is interface{},
+ // one field for each explicit method: type is the method type i.e. a function
+ rfields := make([]reflect.StructField, 1+len(methodtypes), 1+gtype.NumMethods())
+ rfields[0] = approxInterfaceHeader()
+
+ for i, methodtype := range methodtypes {
+ rfields[i+1] = approxInterfaceMethodAsField(methodnames[i], methodtype.ReflectType())
}
- return v.InterfaceOf(methodnames, methods, embeddeds)
+ for _, e := range embeddeds {
+ n := e.NumMethod()
+ for i := 0; i < n; i++ {
+ method := e.Method(i)
+ rtype := rRemoveReceiver(method.Type.ReflectType()) // receiver is the embedded interface, remove it
+ rfields = append(rfields, approxInterfaceMethodAsField(method.Name, rtype))
+ }
+ }
+ // interfaces may have lots of methods, thus a lot of fields in the proxy struct.
+ // Use a pointer to the proxy struct
+ rtype := reflect.PtrTo(reflect.StructOf(rfields))
+ t := v.maketype3(reflect.Interface, gtype, rtype)
+ setInterfaceMethods(t)
+ // debugf("InterfaceOf: new type %v", t)
+ // debugf(" types.Type %v", gtype)
+ // debugf(" reflect.Type %v", rtype)
+ return t
+}
+
+// Complete marks an interface type as complete and computes wrapper methods for embedded fields.
+// It must be called by users of InterfaceOf after the interface's embedded types are fully defined
+// and before using the interface type in any way other than to form other types.
+func (t *xtype) Complete() Type {
+ if t.kind != reflect.Interface {
+ xerrorf(t, "Complete of non-interface %v", t)
+ }
+ return wrap(t)
+}
+
+// return true if t is a named type that still waits for the caller to invoke SetUnderlying() on it
+func (t *xtype) needSetUnderlying() bool {
+ return t.Named() && t.kind != gtypeToKind(t, t.gtype)
}
// utilities for InterfaceOf()
@@ -105,19 +152,11 @@ func InterfaceOf(methodnames []string, methods []Type, embeddeds []Type) Type {
func approxInterfaceHeader() reflect.StructField {
return reflect.StructField{
Name: StrGensymInterface,
- Type: reflectTypeOfInterfaceHeader,
- }
-}
-
-func approxInterfaceEmbedded(t Type) reflect.StructField {
- // embedded interfaces are always anonymous
- return reflect.StructField{
- Name: toExportedFieldName("", t, true),
- Type: t.ReflectType(),
+ Type: rTypeOfInterfaceHeader,
}
}
-func approxInterfaceMethod(name string, rtype reflect.Type) reflect.StructField {
+func approxInterfaceMethodAsField(name string, rtype reflect.Type) reflect.StructField {
// interface methods cannot be anonymous
if len(name) == 0 {
name = "_"
@@ -127,3 +166,29 @@ func approxInterfaceMethod(name string, rtype reflect.Type) reflect.StructField
Type: rtype,
}
}
+
+// fill t.methodvalues[] with wrappers that forward the call to closures stored in the emulated interface struct
+func setInterfaceMethods(t Type) {
+ xt := unwrap(t)
+ n := xt.NumMethod()
+ if n == 0 || xt.Named() || xt.kind != reflect.Interface || xt.methodvalues != nil {
+ return
+ }
+ xt.methodvalues = make([]reflect.Value, n)
+ rtype := xt.rtype
+ for i := 0; i < n; i++ {
+ xt.methodvalues[i] = interfaceMethod(rtype, i)
+ }
+}
+
+// create and return a single wrapper function that forwards the call to the i-th closure
+// stored in the emulated interface struct rtype (that will be received as first parameter)
+func interfaceMethod(rtype reflect.Type, index int) reflect.Value {
+ // rtype is *struct { InterfaceHeader; closures... }
+ index++
+ rclosure := rtype.Elem().Field(index).Type
+ rfunc := rAddReceiver(rtype, rclosure)
+ return reflect.MakeFunc(rfunc, func(args []reflect.Value) []reflect.Value {
+ return args[0].Elem().Field(index).Call(args[1:])
+ })
+}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/lookup.go b/vendor/github.com/cosmos72/gomacro/xreflect/lookup.go
index e6721f0..64813c4 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/lookup.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/lookup.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* lookup.go
@@ -28,8 +19,25 @@ package xreflect
import (
"go/types"
"reflect"
+
+ "github.com/cosmos72/gomacro/typeutil"
)
+type depthMap struct {
+ gmap typeutil.Map
+}
+
+func (m *depthMap) visited(gtype types.Type, depth int) bool {
+ if at := m.gmap.At(gtype); at != nil && at.(int) < depth {
+ // already visited at shallower depth.
+ // avoids infinite loop for self-referencing types
+ // as type X struct { *X }
+ return true
+ }
+ m.gmap.Set(gtype, depth)
+ return false
+}
+
// FieldByName returns the (possibly embedded) struct field with given name,
// and the number of fields found at the same (shallowest) depth: 0 if not found.
// Private fields are returned only if they were declared in pkgpath.
@@ -54,14 +62,14 @@ func (t *xtype) FieldByName(name, pkgpath string) (field StructField, count int)
return field, count
}
var tovisit []StructField
-
- field, count, tovisit = fieldByName(t, qname, 0, nil)
+ var visited depthMap
+ field, count, tovisit = fieldByName(t, qname, 0, nil, &visited)
// breadth-first recursion
for count == 0 && len(tovisit) != 0 {
var next []StructField
for _, f := range tovisit {
- efield, ecount, etovisit := fieldByName(unwrap(f.Type), qname, f.Offset, f.Index)
+ efield, ecount, etovisit := fieldByName(unwrap(f.Type), qname, f.Offset, f.Index, &visited)
if count == 0 {
if ecount > 0 {
field = efield
@@ -80,23 +88,21 @@ func (t *xtype) FieldByName(name, pkgpath string) (field StructField, count int)
return field, count
}
-func fieldByName(t *xtype, qname QName, offset uintptr, index []int) (field StructField, count int, tovisit []StructField) {
+func fieldByName(t *xtype, qname QName, offset uintptr, index []int, m *depthMap) (field StructField, count int, tovisit []StructField) {
// also support embedded fields: they can be named types or pointers to named types
- if t.kind == reflect.Ptr {
- t = unwrap(t.elem())
- }
- gtype, ok := t.gtype.Underlying().(*types.Struct)
- if !ok {
- debugf("fieldByName: type is %s, not struct. bailing out", t.kind)
+ t, gtype := derefStruct(t)
+ if gtype == nil || m.visited(gtype, len(index)) {
return
}
+ // debugf("fieldByName: visiting %v <%v> <%v> at depth %d", t.kind, t.gtype, t.rtype, len(index))
+
n := t.NumField()
for i := 0; i < n; i++ {
gfield := gtype.Field(i)
if matchFieldByName(qname, gfield) {
if count == 0 {
- field = t.field(i) // lock already held
+ field = t.field(i) // lock already held. makes a copy
field.Offset += offset
field.Index = concat(index, field.Index) // make a copy of index
// debugf("fieldByName: %d-th field of <%v> matches: %#v", i, t.rtype, field)
@@ -110,7 +116,21 @@ func fieldByName(t *xtype, qname QName, offset uintptr, index []int) (field Stru
tovisit = append(tovisit, efield)
}
}
- return
+ return field, count, tovisit
+}
+
+func derefStruct(t *xtype) (*xtype, *types.Struct) {
+ switch gtype := t.gtype.Underlying().(type) {
+ case *types.Struct:
+ return t, gtype
+ case *types.Pointer:
+ gelem, ok := gtype.Elem().Underlying().(*types.Struct)
+ if ok {
+ // not t.Elem(), it would acquire Universe lock
+ return unwrap(t.elem()), gelem
+ }
+ }
+ return nil, nil
}
// return true if gfield name matches given name, or if it's anonymous and its *type* name matches given name
@@ -154,22 +174,19 @@ func cacheFieldByName(t *xtype, qname QName, field *StructField, count int) {
t.universe.fieldcache = true
}
-// anonymousFields returns the anonymous fields of a (named or unnamed) struct type
-func anonymousFields(t *xtype, offset uintptr, index []int) []StructField {
- var tovisit []StructField
- gt := t.gtype.Underlying()
- if gptr, ok := gt.(*types.Pointer); ok {
- gt = gptr.Elem().Underlying()
- }
- gtype, ok := gt.(*types.Struct)
- if !ok {
- return tovisit
+// anonymousFields returns the anonymous fields of a struct type (either named or unnamed)
+// also accepts a pointer to a struct type
+func anonymousFields(t *xtype, offset uintptr, index []int, m *depthMap) []StructField {
+ t, gtype := derefStruct(t)
+ if gtype == nil || m.visited(gtype, len(index)) {
+ return nil
}
n := gtype.NumFields()
+ var tovisit []StructField
for i := 0; i < n; i++ {
gfield := gtype.Field(i)
if gfield.Anonymous() {
- field := t.Field(i)
+ field := t.field(i) // not t.Field(), it would acquire Universe lock
field.Offset += offset
field.Index = concat(index, field.Index) // make a copy of index
tovisit = append(tovisit, field)
@@ -203,10 +220,11 @@ func (t *xtype) MethodByName(name, pkgpath string) (method Method, count int) {
}
return method, count
}
+ var visited depthMap
method, count = methodByName(t, qname, nil)
if count == 0 {
- tovisit := anonymousFields(t, 0, nil)
- // breadth-first recursion
+ tovisit := anonymousFields(t, 0, nil, &visited)
+ // breadth-first recursion on struct's anonymous fields
for count == 0 && len(tovisit) != 0 {
var next []StructField
for _, f := range tovisit {
@@ -217,7 +235,7 @@ func (t *xtype) MethodByName(name, pkgpath string) (method Method, count int) {
method = emethod
} else {
// no recursion if we found something
- next = append(next, anonymousFields(et, f.Offset, f.Index)...)
+ next = append(next, anonymousFields(et, f.Offset, f.Index, &visited)...)
}
}
count += ecount
@@ -231,10 +249,19 @@ func (t *xtype) MethodByName(name, pkgpath string) (method Method, count int) {
return method, count
}
+// For interfaces, search in *all* methods including wrapper methods for embedded interfaces
+// For all other named types, only search in explicitly declared methods, ignoring wrapper methods for embedded fields.
func methodByName(t *xtype, qname QName, index []int) (method Method, count int) {
- // also support embedded fields: they can be named types or pointers to named types
+
+ // debugf("methodByName: visiting %v <%v> <%v> at depth %d", t.kind, t.gtype, t.rtype, len(index))
+
+ // also support embedded fields: they can be interfaces, named types, pointers to named types
if t.kind == reflect.Ptr {
- t = unwrap(t.elem())
+ te := unwrap(t.elem())
+ if te.kind == reflect.Interface || te.kind == reflect.Ptr {
+ return
+ }
+ t = te
}
n := t.NumMethod()
for i := 0; i < n; i++ {
@@ -243,7 +270,7 @@ func methodByName(t *xtype, qname QName, index []int) (method Method, count int)
if count == 0 {
method = t.method(i) // lock already held
method.FieldIndex = concat(index, method.FieldIndex) // make a copy of index
- // debugf("methodByName: %d-th method of <%v> matches: %#v", i, t.rtype, method)
+ // debugf("methodByName: %d-th explicit method of <%v> matches: %#v", i, t.rtype, method)
}
count++
}
@@ -269,6 +296,41 @@ func cacheMethodByName(t *xtype, qname QName, method *Method, count int) {
t.universe.methodcache = true
}
+// visit type's direct and embedded fields in breadth-first order
+func (v *Universe) VisitFields(t Type, visitor func(StructField)) {
+ xt := unwrap(t)
+ if xt == nil {
+ return
+ }
+ var curr, tovisit []*xtype
+ curr = []*xtype{xt}
+ var seen typeutil.Map
+
+ for len(curr) != 0 {
+ for _, xt := range curr {
+ if xt == nil {
+ continue
+ }
+ // embedded fields can be named types or pointers to named types
+ xt, _ = derefStruct(xt)
+ if xt.kind != reflect.Struct || seen.At(xt.gtype) != nil {
+ continue
+ }
+ seen.Set(xt.gtype, xt.gtype)
+
+ for i, n := 0, xt.NumField(); i < n; i++ {
+ field := xt.field(i)
+ visitor(field)
+ if field.Anonymous {
+ tovisit = append(tovisit, unwrap(field.Type))
+ }
+ }
+ }
+ curr = tovisit
+ tovisit = nil
+ }
+}
+
func invalidateCache(gtype types.Type, t interface{}) {
if t, ok := t.(Type); ok {
t := unwrap(t)
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/method.go b/vendor/github.com/cosmos72/gomacro/xreflect/method.go
new file mode 100644
index 0000000..0d08c32
--- /dev/null
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/method.go
@@ -0,0 +1,314 @@
+/*
+ * gomacro - A Go interpreter with Lisp-like macros
+ *
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * method.go
+ *
+ * Created on Mar 28, 2018
+ * Author Massimiliano Ghilardi
+ */
+
+package xreflect
+
+import (
+ "bytes"
+ "fmt"
+ "go/ast"
+ "go/types"
+ "reflect"
+)
+
+func (m Method) String() string {
+ gt := m.Type.GoType().(*types.Signature)
+ var buf bytes.Buffer
+ types.WriteSignature(&buf, gt, nil)
+ return fmt.Sprintf("%s%s", m.Name, buf.String())
+}
+
+// For interfaces, NumMethod returns *total* number of methods for interface t,
+// including wrapper methods for embedded interfaces.
+// For all other named types, NumMethod returns the number of explicitly declared methods,
+// ignoring wrapper methods for embedded fields.
+// Returns 0 for other unnamed types.
+func (t *xtype) NumMethod() int {
+ num := 0
+ if gt, ok := t.gtype.Underlying().(*types.Interface); ok {
+ num = gt.NumMethods()
+ } else if gt, ok := t.gtype.(*types.Named); ok {
+ num = gt.NumMethods()
+ }
+ return num
+}
+
+// NumExplicitMethod returns the number of explicitly declared methods of named type or interface t.
+// Wrapper methods for embedded fields or embedded interfaces are not counted.
+func (t *xtype) NumExplicitMethod() int {
+ num := 0
+ if gt, ok := t.gtype.Underlying().(*types.Interface); ok {
+ num = gt.NumExplicitMethods()
+ } else if gt, ok := t.gtype.(*types.Named); ok {
+ num = gt.NumMethods()
+ }
+ return num
+}
+
+// NumAllMethod returns the *total* number of methods for interface or named type t,
+// including wrapper methods for embedded fields or embedded interfaces.
+// Note: it has slightly different semantics from go/types.(*Named).NumMethods(),
+// since the latter returns 0 for named interfaces, and callers need to manually invoke
+// goNamedType.Underlying().NumMethods() to retrieve the number of methods
+// of a named interface
+func (t *xtype) NumAllMethod() int {
+ return goTypeNumAllMethod(t.gtype, make(map[types.Type]struct{}))
+}
+
+// recursively count total number of methods for type t,
+// including wrapper methods for embedded fields or embedded interfaces
+func goTypeNumAllMethod(gt types.Type, visited map[types.Type]struct{}) int {
+ count := 0
+ for {
+ if _, ok := visited[gt]; ok {
+ break
+ }
+ visited[gt] = struct{}{}
+ switch t := gt.(type) {
+ case *types.Named:
+ count += t.NumMethods()
+ u := t.Underlying()
+ if u != gt {
+ gt = u
+ continue
+ }
+ case *types.Interface:
+ count += t.NumMethods()
+ case *types.Struct:
+ n := t.NumFields()
+ for i := 0; i < n; i++ {
+ if f := t.Field(i); f.Anonymous() {
+ count += goTypeNumAllMethod(f.Type(), visited)
+ }
+ }
+ }
+ break
+ }
+ return count
+}
+
+// For interfaces, Method returns the i-th method, including methods from embedded interfaces.
+// For all other named types, Method returns the i-th explicitly declared method, ignoring wrapper methods for embedded fields.
+// It panics if i is outside the range 0 .. NumMethod()-1
+func (t *xtype) Method(i int) Method {
+ checkMethod(t, i)
+ v := t.universe
+ if v.ThreadSafe {
+ defer un(lock(v))
+ }
+ return t.method(i)
+}
+
+func checkMethod(t *xtype, i int) {
+ if t.kind == reflect.Ptr {
+ xerrorf(t, "Method of %s type %v. Invoke Method() on type's Elem() instead", i, t.kind, t)
+ }
+ if !t.Named() && t.kind != reflect.Interface {
+ xerrorf(t, "Method of type %v that cannot have methods", t.kind, t)
+ }
+}
+
+func (t *xtype) method(i int) Method {
+ checkMethod(t, i)
+ gfunc := t.gmethod(i)
+ name := gfunc.Name()
+ resizemethodvalues(t)
+
+ rtype := t.rtype
+ var rfunctype reflect.Type
+ rfunc := t.methodvalues[i]
+ if rfunc.Kind() == reflect.Func {
+ // easy, method is cached already
+ rfunctype = rfunc.Type()
+ } else if _, ok := t.gtype.Underlying().(*types.Interface); ok {
+ if rtype.Kind() == reflect.Ptr && isReflectInterfaceStruct(rtype.Elem()) {
+ // rtype is our emulated interface type,
+ // i.e. a pointer to a struct containing: InterfaceHeader, [0]struct { embeddeds }, methods (without receiver)
+ rfield := rtype.Elem().Field(i + 2)
+ rfunctype = rAddReceiver(rtype, rfield.Type)
+ } else if rtype.Kind() != reflect.Interface {
+ xerrorf(t, "inconsistent interface type <%v>: expecting interface reflect.Type, found <%v>", t, rtype)
+ } else if ast.IsExported(name) {
+ // rtype is an interface type, and reflect only returns exported methods
+ // rtype.MethodByName returns a Method with the following caveats
+ // 1) Type == method signature, without a receiver
+ // 2) Func == nil.
+ rmethod, _ := rtype.MethodByName(name)
+ if rmethod.Type == nil {
+ xerrorf(t, "interface type <%v>: reflect method %q not found", t, name)
+ } else if rmethod.Index != i {
+ xerrorf(t, "inconsistent interface type <%v>: method %q has go/types.Func index=%d but reflect.Method index=%d",
+ t, name, i, rmethod.Index)
+ }
+ rfunctype = rAddReceiver(rtype, rmethod.Type)
+ }
+ } else {
+ rmethod, _ := rtype.MethodByName(gfunc.Name())
+ rfunc = rmethod.Func
+ if rfunc.Kind() != reflect.Func {
+ if rtype.Kind() != reflect.Ptr {
+ // also search in the method set of pointer-to-t
+ rmethod, _ = reflect.PtrTo(rtype).MethodByName(gfunc.Name())
+ rfunc = rmethod.Func
+ }
+ }
+ if rfunc.Kind() != reflect.Func {
+ if ast.IsExported(name) {
+ xerrorf(t, "type <%v>: reflect method %q not found", t, gfunc.Name())
+ }
+ } else {
+ rfunctype = rmethod.Type
+ }
+ t.methodvalues[i] = rfunc
+ }
+ return t.makemethod(i, gfunc, &t.methodvalues, rfunctype) // lock already held
+}
+
+// insert recv as the the first parameter of rtype function type
+func rAddReceiver(recv reflect.Type, rtype reflect.Type) reflect.Type {
+ nin := rtype.NumIn()
+ rin := make([]reflect.Type, nin+1)
+ rin[0] = recv
+ for i := 0; i < nin; i++ {
+ rin[i+1] = rtype.In(i)
+ }
+ nout := rtype.NumOut()
+ rout := make([]reflect.Type, nout)
+ for i := 0; i < nout; i++ {
+ rout[i] = rtype.Out(i)
+ }
+ return reflect.FuncOf(rin, rout, rtype.IsVariadic())
+}
+
+// remove the first parameter of rtype function type
+func rRemoveReceiver(rtype reflect.Type) reflect.Type {
+ nin := rtype.NumIn()
+ if nin == 0 {
+ return rtype
+ }
+ rin := make([]reflect.Type, nin-1)
+ for i := 1; i < nin; i++ {
+ rin[i-1] = rtype.In(i)
+ }
+ nout := rtype.NumOut()
+ rout := make([]reflect.Type, nout)
+ for i := 0; i < nout; i++ {
+ rout[i] = rtype.Out(i)
+ }
+ return reflect.FuncOf(rin, rout, nin > 1 && rtype.IsVariadic())
+}
+
+// remove the first parameter of t function type
+func removeReceiver(t Type) Type {
+ nin := t.NumIn()
+ if nin == 0 {
+ return t
+ }
+ tin := make([]Type, nin-1)
+ for i := 1; i < nin; i++ {
+ tin[i-1] = t.In(i)
+ }
+ nout := t.NumOut()
+ tout := make([]Type, nout)
+ for i := 0; i < nout; i++ {
+ tout[i] = t.Out(i)
+ }
+ return t.Universe().FuncOf(tin, tout, nin > 1 && t.IsVariadic())
+}
+
+func (t *xtype) gmethod(i int) *types.Func {
+ var gfun *types.Func
+ if gtype, ok := t.gtype.Underlying().(*types.Interface); ok {
+ gfun = gtype.Method(i)
+ } else if gtype, ok := t.gtype.(*types.Named); ok {
+ gfun = gtype.Method(i)
+ } else {
+ xerrorf(t, "Method on invalid type %v", t)
+ }
+ return gfun
+}
+
+func (t *xtype) makemethod(index int, gfun *types.Func, rfuns *[]reflect.Value, rfunctype reflect.Type) Method {
+ // sanity checks
+ name := gfun.Name()
+ gsig := gfun.Type().Underlying().(*types.Signature)
+ if rfunctype != nil {
+ nparams := 0
+ if gsig.Params() != nil {
+ nparams = gsig.Params().Len()
+ }
+ if gsig.Recv() != nil {
+ if nparams+1 != rfunctype.NumIn() {
+ xerrorf(t, `type <%v>: inconsistent %d-th method signature:
+ go/types.Type has receiver <%v> and %d parameters: %v
+ reflect.Type has %d parameters: %v`, t, index, gsig.Recv(), nparams, gsig, rfunctype.NumIn(), rfunctype)
+ }
+ } else if nparams != rfunctype.NumIn() {
+ xerrorf(t, `type <%v>: inconsistent %d-th method signature:
+ go/types.Type has no receiver and %d parameters: %v
+ reflect.Type has %d parameters: %v`, t, index, nparams, gsig, rfunctype.NumIn(), rfunctype)
+ }
+ }
+ var tmethod Type
+ if rfunctype != nil {
+ rsig := ReflectUnderlying(rfunctype)
+ tmethod = t.universe.maketype(gsig, rsig) // lock already held
+ }
+ return Method{
+ Name: name,
+ Pkg: (*Package)(gfun.Pkg()),
+ Type: tmethod,
+ Funs: rfuns,
+ Index: index,
+ GoFun: gfun,
+ }
+}
+
+func resizemethodvalues(t *xtype) {
+ n := t.NumMethod()
+ if cap(t.methodvalues) < n {
+ slice := make([]reflect.Value, n, n+n/2+4)
+ copy(slice, t.methodvalues)
+ t.methodvalues = slice
+ } else if len(t.methodvalues) < n {
+ t.methodvalues = t.methodvalues[0:n]
+ }
+}
+
+// return one of the methods defined by interface tinterf but missing from t
+func MissingMethod(t, tinterf Type) *Method {
+ n := tinterf.NumMethod()
+ var mtdinterf Method
+ if t == nil && n > 0 {
+ mtdinterf = tinterf.Method(0)
+ return &mtdinterf
+ }
+ for i := 0; i < n; i++ {
+ mtdinterf = tinterf.Method(i)
+ mtd, count := t.MethodByName(mtdinterf.Name, mtdinterf.Pkg.Name())
+ if count == 1 {
+ tfunc := mtd.Type
+ if t.Kind() != reflect.Interface {
+ tfunc = removeReceiver(tfunc)
+ }
+ if !mtdinterf.Type.IdenticalTo(tfunc) {
+ continue
+ }
+ }
+ return &mtdinterf
+ }
+ return nil
+}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/named.go b/vendor/github.com/cosmos72/gomacro/xreflect/named.go
index 631e602..cc6d837 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/named.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/named.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* named.go
@@ -26,7 +17,6 @@
package xreflect
import (
- "go/ast"
"go/token"
"go/types"
"reflect"
@@ -34,174 +24,41 @@ import (
"unsafe"
)
-// NumMethod returns the number of explicitly declared methods of named type or interface t.
-// Wrapper methods for embedded fields or embedded interfaces are not counted.
-func (t *xtype) NumMethod() int {
- num := 0
- if gtype, ok := t.gtype.Underlying().(*types.Interface); ok {
- num = gtype.NumExplicitMethods()
- } else if gtype, ok := t.gtype.(*types.Named); ok {
- num = gtype.NumMethods()
- }
- return num
-}
-
-// Method return the i-th explicitly declared method of named type or interface t.
-// Wrapper methods for embedded fields are not counted
-func (t *xtype) Method(i int) Method {
- v := t.universe
+// NamedOf returns a new named type for the given type name and package.
+// Initially, the underlying type may be set to interface{} - use SetUnderlying to change it.
+// These two steps are separate to allow creating self-referencing types,
+// as for example type List struct { Elem int; Rest *List }
+func (v *Universe) NamedOf(name, pkgpath string, kind reflect.Kind) Type {
if v.ThreadSafe {
defer un(lock(v))
}
- return t.method(i)
-}
-
-func (t *xtype) method(i int) Method {
- gfunc := t.gmethod(i)
- name := gfunc.Name()
- resizemethodvalues(t)
-
- rtype := t.rtype
- var rfunctype reflect.Type
- rfuncs := &t.methodvalues
- rfunc := t.methodvalues[i]
- if rfunc.Kind() == reflect.Func {
- // easy, method is cached already
- rfunctype = rfunc.Type()
- } else if gtype, ok := t.gtype.Underlying().(*types.Interface); ok {
- if rtype.Kind() == reflect.Ptr && isReflectInterfaceStruct(rtype.Elem()) {
- // rtype is our emulated interface type.
- // it's a pointer to a struct containing: InterfaceHeader, embeddeds, methods (without receiver)
- skip := gtype.NumEmbeddeds() + 1
- rfield := rtype.Elem().Field(i + skip)
- rfunctype = addreceiver(rtype, rfield.Type)
- } else if rtype.Kind() != reflect.Interface {
- xerrorf(t, "inconsistent interface type <%v>: expecting interface reflect.Type, found <%v>", t, rtype)
- } else if ast.IsExported(name) {
- // rtype is an interface type, and reflect only returns exported methods
- // rtype.MethodByName returns a Method with the following caveats
- // 1) Type == method signature, without a receiver
- // 2) Func == nil.
- rmethod, _ := rtype.MethodByName(name)
- if rmethod.Type == nil {
- xerrorf(t, "interface type <%v>: reflect method %q not found", t, name)
- } else if rmethod.Index != i {
- xerrorf(t, "inconsistent interface type <%v>: method %q has go/types.Func index=%d but reflect.Method index=%d",
- t, name, i, rmethod.Index)
- }
- rfunctype = addreceiver(rtype, rmethod.Type)
- }
- } else {
- rmethod, _ := rtype.MethodByName(gfunc.Name())
- rfunc = rmethod.Func
- if rfunc.Kind() != reflect.Func {
- if rtype.Kind() != reflect.Ptr {
- // also search in the method set of pointer-to-t
- rmethod, _ = reflect.PtrTo(rtype).MethodByName(gfunc.Name())
- rfunc = rmethod.Func
- }
- }
- if rfunc.Kind() != reflect.Func {
- if ast.IsExported(name) {
- xerrorf(t, "type <%v>: reflect method %q not found", t, gfunc.Name())
- }
- } else {
- t.methodvalues[i] = rfunc
- rfunctype = rmethod.Type
- }
- }
- return t.makemethod(i, gfunc, rfuncs, rfunctype) // lock already held
-}
-
-func addreceiver(recv reflect.Type, rtype reflect.Type) reflect.Type {
- nin := rtype.NumIn()
- rin := make([]reflect.Type, nin+1)
- rin[0] = recv
- for i := 0; i < nin; i++ {
- rin[i+1] = rtype.In(i)
- }
- nout := rtype.NumOut()
- rout := make([]reflect.Type, nout)
- for i := 0; i < nout; i++ {
- rout[i] = rtype.Out(i)
- }
- return reflect.FuncOf(rin, rout, rtype.IsVariadic())
-}
-
-func (t *xtype) gmethod(i int) *types.Func {
- var gfun *types.Func
- if gtype, ok := t.gtype.Underlying().(*types.Interface); ok {
- gfun = gtype.ExplicitMethod(i)
- } else if gtype, ok := t.gtype.(*types.Named); ok {
- gfun = gtype.Method(i)
- } else {
- xerrorf(t, "Method on invalid type %v", t)
- }
- return gfun
-}
-
-func (t *xtype) makemethod(index int, gfun *types.Func, rfuns *[]reflect.Value, rfunctype reflect.Type) Method {
- // sanity checks
- name := gfun.Name()
- gsig := gfun.Type().Underlying().(*types.Signature)
- if rfunctype != nil {
- nparams := 0
- if gsig.Params() != nil {
- nparams = gsig.Params().Len()
- }
- if gsig.Recv() != nil {
- if nparams+1 != rfunctype.NumIn() {
- xerrorf(t, `type <%v>: inconsistent %d-th method signature:
- go/types.Type has receiver <%v> and %d parameters: %v
- reflect.Type has %d parameters: %v`, t, index, gsig.Recv(), nparams, gsig, rfunctype.NumIn(), rfunctype)
- }
- } else if nparams != rfunctype.NumIn() {
- xerrorf(t, `type <%v>: inconsistent %d-th method signature:
- go/types.Type has no receiver and %d parameters: %v
- reflect.Type has %d parameters: %v`, t, index, nparams, gsig, rfunctype.NumIn(), rfunctype)
- }
- }
- var tmethod Type
- if rfunctype != nil {
- tmethod = t.universe.maketype(gsig, rfunctype) // lock already held
- }
- return Method{
- Name: name,
- Pkg: (*Package)(gfun.Pkg()),
- Type: tmethod,
- Funs: rfuns,
- Index: index,
- GoFun: gfun,
- }
+ return v.namedOf(name, pkgpath, kind)
}
-func resizemethodvalues(t *xtype) {
- n := t.NumMethod()
- if cap(t.methodvalues) < n {
- slice := make([]reflect.Value, n, n+n/2+4)
- copy(slice, t.methodvalues)
- t.methodvalues = slice
- } else if len(t.methodvalues) < n {
- t.methodvalues = t.methodvalues[0:n]
+func (v *Universe) namedOf(name, pkgpath string, kind reflect.Kind) Type {
+ underlying := v.BasicTypes[kind]
+ if underlying == nil {
+ underlying = v.TypeOfForward
}
+ return v.reflectNamedOf(name, pkgpath, kind, underlying.ReflectType())
}
-func (v *Universe) NamedOf(name, pkgpath string) Type {
- if v.ThreadSafe {
- defer un(lock(v))
+// alternate version of namedOf(), to be used when reflect.Type is known
+func (v *Universe) reflectNamedOf(name, pkgpath string, kind reflect.Kind, rtype reflect.Type) Type {
+ underlying := v.BasicTypes[kind]
+ if underlying == nil {
+ underlying = v.TypeOfInterface
}
- return v.namedOf(name, pkgpath)
-}
-
-func (v *Universe) namedOf(name, pkgpath string) Type {
- underlying := v.TypeOfInterface
pkg := v.loadPackage(pkgpath)
- // typename := types.NewTypeName(token.NoPos, (*types.Package)(pkg), name, underlying.GoType())
typename := types.NewTypeName(token.NoPos, (*types.Package)(pkg), name, nil)
return v.maketype3(
- reflect.Invalid, // incomplete type! will be fixed by SetUnderlying
+ // kind may be inaccurate or reflect.Invalid;
+ // underlying.GoType() will often be inaccurate and equal to interface{};
+ // rtype will often be inaccurate and equal to Incomplete.
+ // All these issues will be fixed by Type.SetUnderlying()
+ kind,
types.NewNamed(typename, underlying.GoType(), nil),
- underlying.ReflectType(),
+ rtype,
)
}
@@ -217,10 +74,18 @@ func (t *xtype) SetUnderlying(underlying Type) {
v.InvalidateCache()
// xerrorf(t, "SetUnderlying invoked multiple times on named type %v", t)
}
- gunderlying := underlying.GoType().Underlying() // in case underlying is named
+ tunderlying := unwrap(underlying)
+ gunderlying := tunderlying.gtype.Underlying() // in case underlying is named
t.kind = gtypeToKind(t, gunderlying)
gtype.SetUnderlying(gunderlying)
+ // debugf("SetUnderlying: updated <%v> reflect Type from <%v> to <%v>", gtype, t.rtype, underlying.ReflectType())
t.rtype = underlying.ReflectType()
+ if t.kind == reflect.Interface {
+ // propagate methodvalues from underlying interface to named type
+ t.methodvalues = tunderlying.methodvalues
+ t.methodcache = nil
+ t.fieldcache = nil
+ }
default:
xerrorf(t, "SetUnderlying of unnamed type %v", t)
}
@@ -241,7 +106,7 @@ func (t *xtype) AddMethod(name string, signature Type) int {
if signature.Kind() != reflect.Func {
xerrorf(t, "AddMethod on <%v> of non-function: %v", t, signature)
}
- gsig := signature.underlying().(*types.Signature)
+ gsig := signature.gunderlying().(*types.Signature)
// accept both signatures "non-nil receiver" and "nil receiver, use the first parameter as receiver"
grecv := gsig.Recv()
if grecv == nil && gsig.Params().Len() != 0 {
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/package.go b/vendor/github.com/cosmos72/gomacro/xreflect/package.go
index 08f10c1..2f4a713 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/package.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/package.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* package.go
@@ -35,14 +26,11 @@ func (v *Universe) loadPackage(path string) *Package {
// do not create unnamed packages
return nil
}
- if pkg := v.Packages[path]; pkg != nil {
- return pkg
- }
- // try to import the package first...
- // slower, but creates the correct Typename objects for named types
+ // try the importer and its cache
if pkg := v.importPackage(path); pkg != nil {
return pkg
}
+ // no luck. create and return an empty Package
if v.Packages == nil {
v.Packages = make(map[string]*Package)
}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/struct.go b/vendor/github.com/cosmos72/gomacro/xreflect/struct.go
index 7437f7e..2732330 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/struct.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/struct.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* struct.go
@@ -53,8 +44,29 @@ func (t *xtype) field(i int) StructField {
}
gtype := t.gtype.Underlying().(*types.Struct)
+ if i < 0 || i >= gtype.NumFields() {
+ xerrorf(t, "Field(%v) out of bounds, struct type has %v fields: %v", i, gtype.NumFields(), t)
+ }
va := gtype.Field(i)
- rf := t.rtype.Field(i)
+ var rf reflect.StructField
+ if t.rtype != rTypeOfForward {
+ rf = t.rtype.Field(i)
+ } else {
+ // cannot dig in a forward-declared type,
+ // so try to resolve it
+ it := t.universe.gmap.At(t.gtype)
+ if it != nil {
+ rtype := it.(Type).ReflectType()
+ if rtype.Kind() != t.kind {
+ debugf("mismatched Forward type: <%v> has reflect.Type <%v>", t, rtype)
+ }
+ rf = rtype.Field(i)
+ } else {
+ // populate Field.Index and approximate Field.Type
+ rf.Index = []int{i}
+ rf.Type = rTypeOfForward
+ }
+ }
return StructField{
Name: va.Name(),
@@ -73,7 +85,7 @@ func (t *xtype) NumField() int {
if t.kind != reflect.Struct {
xerrorf(t, "NumField of non-struct type %v", t)
}
- gtype := t.underlying().(*types.Struct)
+ gtype := t.gunderlying().(*types.Struct)
return gtype.NumFields()
}
@@ -87,13 +99,15 @@ func (field *StructField) toReflectField(forceExported bool) reflect.StructField
name = toExportedFieldName(name, field.Type, field.Anonymous)
}
return reflect.StructField{
- Name: name,
- PkgPath: pkgpath,
- Type: field.Type.ReflectType(),
- Tag: field.Tag,
- Offset: field.Offset,
- Index: field.Index,
- Anonymous: field.Anonymous,
+ Name: name,
+ PkgPath: pkgpath,
+ Type: field.Type.ReflectType(),
+ Tag: field.Tag,
+ Offset: field.Offset,
+ Index: field.Index,
+ // reflect.StructOf() has very limited support for anonymous fields,
+ // do not even try to use it.
+ Anonymous: false,
}
}
@@ -115,7 +129,7 @@ func (field *StructField) sanitize(i int) {
name = t.elem().Name()
}
if len(name) == 0 {
- name = StrGensymEmbedded + fmt.Sprintf("%d", i)
+ name = fmt.Sprintf("%s%d", StrGensymAnonymous, i)
}
field.Name = name
field.Anonymous = true
@@ -147,14 +161,14 @@ func toTags(fields []StructField) []string {
}
func toExportedFieldName(name string, t Type, anonymous bool) string {
- if len(name) == 0 && t != nil {
+ if len(name) == 0 && unwrap(t) != nil {
if name = t.Name(); len(name) == 0 && t.Kind() == reflect.Ptr {
name = t.elem().Name()
}
}
if !ast.IsExported(name) {
if anonymous {
- return GensymEmbedded(name)
+ return GensymAnonymous(name)
} else {
return GensymPrivate(name)
}
@@ -171,11 +185,3 @@ func (v *Universe) StructOf(fields []StructField) Type {
reflect.StructOf(rfields),
)
}
-
-func StructOf(fields []StructField) Type {
- v := universe
- if len(fields) != 0 && fields[0].Type != nil {
- v = fields[0].Type.Universe()
- }
- return v.StructOf(fields)
-}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/type.go b/vendor/github.com/cosmos72/gomacro/xreflect/type.go
index 499e352..25992de 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/type.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/type.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* type.go
@@ -28,44 +19,67 @@ package xreflect
import (
"go/types"
"reflect"
+
+ "github.com/cosmos72/gomacro/typeutil"
)
-func SameType(t, u Type) bool {
- xnil := t == nil
- ynil := u == nil
+func identicalType(t, u Type) bool {
+ xt := unwrap(t)
+ yt := unwrap(u)
+ xnil := xt == nil
+ ynil := yt == nil
if xnil || ynil {
return xnil == ynil
}
- xt := unwrap(t)
- yt := unwrap(u)
- return xt == yt || xt.same(yt)
+ return xt == yt || xt.identicalTo(yt)
+}
+
+func debugOnMismatchCache(gtype types.Type, rtype reflect.Type, cached Type) {
+ debugf("overwriting mismatched reflect.Type found in cache for type %v:\n\tnew reflect.Type: %v\n\told reflect.Type: %v",
+ gtype, rtype, cached.ReflectType()) //, debug.Stack())
+}
+
+func (t *xtype) warnOnSuspiciousCache() {
+ // reflect cannot create new interface types or new named types: accept whatever we have.
+ // also, it cannot create unnamed structs containing unexported fields. again, accept whatever we have.
+ // instead complain on mismatch for non-interface, non-named types
+ rt := t.rtype
+ if !t.Named() && len(rt.Name()) != 0 && rt.Kind() != reflect.Interface && rt.Kind() != reflect.Struct {
+ xerrorf(t, "caching suspicious type %v => %v", t.gtype, rt)
+ }
}
-func (t *xtype) same(u *xtype) bool {
- return types.IdenticalIgnoreTags(t.GoType(), u.GoType())
+func (m *Types) clear() {
+ *m = Types{}
}
func (m *Types) add(t Type) {
- if t.Kind() == reflect.Interface {
+ xt := unwrap(t)
+
+ if xt.rtype == rTypeOfForward {
+ if m.gmap.At(xt.gtype) != nil {
+ // debugf("not adding again type to cache: %v <%v> reflect type: <%v>\n%s", xt.kind, xt.gtype, xt.rtype)
+ return
+ }
+ } else {
+ xt.warnOnSuspiciousCache()
+ }
+ switch xt.kind {
+ case reflect.Func:
+ // even function types can be named => they need SetUnderlying() before being complete
+ if !xt.needSetUnderlying() {
+ xt.NumIn() // check consistency
+ }
+ case reflect.Interface:
rtype := t.ReflectType()
rkind := rtype.Kind()
if rkind != reflect.Interface && (rkind != reflect.Ptr || rtype.Elem().Kind() != reflect.Struct) {
- errorf(t, "bug! inconsistent type <%v>: has kind = %s but its Type.Reflect() is %s\n\tinstead of interface or pointer-to-struct: <%v>", t, t.Kind(), rtype.Kind(), t.ReflectType())
+ errorf(t, "bug! inconsistent type <%v>: has kind = %s but its Type.Reflect() is %s\n\tinstead of interface or pointer-to-struct: <%v>",
+ t, t.Kind(), rtype.Kind(), t.ReflectType())
}
}
- m.gmap.Set(t.GoType(), t)
- // debugf("added type to cache: %v <%v> <%v>", t.Kind(), t.GoType(), t.ReflectType())
-}
-
-func (v *Universe) unique(t Type) Type {
- gtype := t.GoType()
- ret := v.Types.gmap.At(gtype)
- if ret != nil {
- // debugf("unique: found type in cache: %v for %v <%v> <%v>", ret, t.Kind(), gtype, t.ReflectType())
- return ret.(Type)
- }
- v.add(t)
- return t
+ m.gmap.Set(xt.gtype, t)
+ // debugf("added type to cache: %v <%v> reflect type: <%v>", xt.kind, xt.gtype, xt.rtype)
}
// all unexported methods assume lock is already held
@@ -78,12 +92,17 @@ func (v *Universe) maketype3(kind reflect.Kind, gtype types.Type, rtype reflect.
ret := v.Types.gmap.At(gtype)
if ret != nil {
t := ret.(Type)
- // debugf("found type in cache:\n\t %v <%v> <%v>\n\tfor %v <%v> <%v>", t.Kind(), t.GoType(), t.ReflectType(), kind, gtype, rtype)
- return t
- }
- if v.BasicTypes == nil {
- // lazy creation of basic types
- v.init()
+ switch t.ReflectType() {
+ case rtype:
+ return t
+ case rTypeOfForward:
+ // update t, do not create a new Type
+ t.UnsafeForceReflectType(rtype)
+ return t
+ }
+ if v.debug() {
+ debugOnMismatchCache(gtype, rtype, t)
+ }
}
t := wrap(&xtype{kind: kind, gtype: gtype, rtype: rtype, universe: v})
v.add(t)
@@ -140,25 +159,27 @@ func (t *xtype) Universe() *Universe {
// Named returns whether the type is named.
// It returns false for unnamed types.
func (t *xtype) Named() bool {
- switch t.gtype.(type) {
- case *types.Basic, *types.Named:
- return true
- default:
- return false
+ if t != nil {
+ switch t.gtype.(type) {
+ case *types.Basic, *types.Named:
+ return true
+ }
}
+ return false
}
// Name returns the type's name within its package.
// It returns an empty string for unnamed types.
func (t *xtype) Name() string {
- switch gtype := t.gtype.(type) {
- case *types.Basic:
- return gtype.Name()
- case *types.Named:
- return gtype.Obj().Name()
- default:
- return ""
+ if t != nil {
+ switch gtype := t.gtype.(type) {
+ case *types.Basic:
+ return gtype.Name()
+ case *types.Named:
+ return gtype.Obj().Name()
+ }
}
+ return ""
}
// Pkg returns a named type's package, that is, the package where it was defined.
@@ -178,12 +199,14 @@ func (t *xtype) Pkg() *Package {
// If the type was predeclared (string, error) or unnamed (*T, struct{}, []int),
// the package name will be the empty string.
func (t *xtype) PkgName() string {
- switch gtype := t.gtype.(type) {
- case *types.Named:
- return gtype.Obj().Pkg().Name()
- default:
- return ""
+ if gtype, ok := t.gtype.(*types.Named); ok {
+ pkg := gtype.Obj().Pkg()
+ // pkg may be nil for builtin named types, as for example 'error'
+ if pkg != nil {
+ return pkg.Name()
+ }
}
+ return ""
}
// PkgPath returns a named type's package path, that is, the import path
@@ -191,12 +214,14 @@ func (t *xtype) PkgName() string {
// If the type was predeclared (string, error) or unnamed (*T, struct{}, []int),
// the package path will be the empty string.
func (t *xtype) PkgPath() string {
- switch gtype := t.gtype.(type) {
- case *types.Named:
- return gtype.Obj().Pkg().Path()
- default:
- return ""
+ if gtype, ok := t.gtype.(*types.Named); ok {
+ pkg := gtype.Obj().Pkg()
+ // pkg may be nil for builtin named types, as for example 'error'
+ if pkg != nil {
+ return pkg.Path()
+ }
}
+ return ""
}
// Size returns the number of bytes needed to store
@@ -208,7 +233,7 @@ func (t *xtype) Size() uintptr {
// String returns a string representation of a type.
func (t *xtype) String() string {
if t == nil {
- return "invalid type"
+ return ""
}
return t.gtype.String()
}
@@ -220,10 +245,15 @@ func (t *xtype) Underlying() Type {
}
*/
-func (t *xtype) underlying() types.Type {
+func (t *xtype) gunderlying() types.Type {
return t.gtype.Underlying()
}
+// best-effort implementation of missing reflect.Type.Underlying()
+func (t *xtype) runderlying() reflect.Type {
+ return ReflectUnderlying(t.rtype)
+}
+
// Kind returns the specific kind of the type.
func (t *xtype) Kind() reflect.Kind {
if t == nil {
@@ -238,18 +268,28 @@ func (t *xtype) Implements(u Type) bool {
if u.Kind() != reflect.Interface {
xerrorf(t, "Type.Implements of non-interface type: %v", u)
}
- return types.Implements(t.gtype, u.GoType().Underlying().(*types.Interface))
+ return t.gtype == u.GoType() || types.Implements(t.gtype, u.GoType().Underlying().(*types.Interface))
+}
+
+// IdenticalTo reports whether the type is identical to type u.
+func (t *xtype) IdenticalTo(u Type) bool {
+ xu := unwrap(u)
+ return t == xu || t.identicalTo(xu)
+}
+
+func (t *xtype) identicalTo(u *xtype) bool {
+ return typeutil.Identical(t.GoType(), u.GoType())
}
// AssignableTo reports whether a value of the type is assignable to type u.
func (t *xtype) AssignableTo(u Type) bool {
// debugf("AssignableTo: <%v> <%v>", t, u)
- return types.AssignableTo(t.gtype, u.GoType())
+ return t.gtype == u.GoType() || types.AssignableTo(t.gtype, u.GoType())
}
// ConvertibleTo reports whether a value of the type is convertible to type u.
func (t *xtype) ConvertibleTo(u Type) bool {
- return types.ConvertibleTo(t.gtype, u.GoType())
+ return t.gtype == u.GoType() || types.ConvertibleTo(t.gtype, u.GoType())
}
// Comparable reports whether values of this type are comparable.
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/type_test.go b/vendor/github.com/cosmos72/gomacro/xreflect/type_test.go
index b7ad78e..38558f2 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/type_test.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/type_test.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* type_test.go
@@ -32,9 +23,11 @@ import (
"reflect"
"testing"
"time"
+
+ "github.com/cosmos72/gomacro/typeutil"
)
-var v = universe
+var u = NewUniverse()
func fail(t *testing.T, actual interface{}, expected interface{}) {
t.Errorf("expecting %v <%T>, found %v <%T>\n", expected, expected, actual, actual)
@@ -62,7 +55,25 @@ func isdeepequal(t *testing.T, actual interface{}, expected interface{}) {
}
}
-func istype(t *testing.T, actual interface{}, expected interface{}) {
+func isfieldequal(t *testing.T, actual StructField, expected StructField) {
+ is(t, actual.Name, expected.Name)
+ is(t, actual.Pkg, expected.Pkg)
+ if !actual.Type.IdenticalTo(expected.Type) {
+ fail(t, actual.Type, expected.Type)
+ }
+ is(t, actual.Tag, expected.Tag)
+ is(t, actual.Offset, expected.Offset)
+ isdeepequal(t, actual.Index, expected.Index)
+ is(t, actual.Anonymous, expected.Anonymous)
+}
+
+func isidenticalgotype(t *testing.T, actual types.Type, expected types.Type) {
+ if !typeutil.Identical(actual, expected) {
+ fail(t, actual, expected)
+ }
+}
+
+func istypeof(t *testing.T, actual interface{}, expected interface{}) {
is(t, reflect.TypeOf(actual), reflect.TypeOf(expected))
}
@@ -72,11 +83,11 @@ func TestBasic(t *testing.T) {
continue
}
kind := reflect.Kind(i)
- typ := v.BasicTypes[kind]
+ typ := u.BasicTypes[kind]
is(t, typ.Kind(), rtype.Kind())
is(t, typ.Name(), rtype.Name())
is(t, typ.ReflectType(), rtype)
- istype(t, typ.GoType(), (*types.Basic)(nil))
+ istypeof(t, typ.GoType(), (*types.Basic)(nil))
basic := typ.GoType().(*types.Basic)
k := ToReflectKind(basic.Kind())
@@ -85,39 +96,39 @@ func TestBasic(t *testing.T) {
}
func TestArray(t *testing.T) {
- typ := ArrayOf(7, v.BasicTypes[reflect.Uint8])
+ typ := u.ArrayOf(7, u.BasicTypes[reflect.Uint8])
rtype := reflect.TypeOf([7]uint8{})
is(t, typ.Kind(), reflect.Array)
is(t, typ.Name(), "")
is(t, typ.ReflectType(), rtype)
- istype(t, typ.GoType(), (*types.Array)(nil))
+ istypeof(t, typ.GoType(), (*types.Array)(nil))
is(t, typ.String(), "[7]uint8")
}
func TestFunction(t *testing.T) {
- typ := FuncOf([]Type{v.BasicTypes[reflect.Bool], v.BasicTypes[reflect.Int16]}, []Type{v.BasicTypes[reflect.String]}, false)
+ typ := u.FuncOf([]Type{u.BasicTypes[reflect.Bool], u.BasicTypes[reflect.Int16]}, []Type{u.BasicTypes[reflect.String]}, false)
rtype := reflect.TypeOf(func(bool, int16) string { return "" })
is(t, typ.Kind(), reflect.Func)
is(t, typ.Name(), "")
is(t, typ.ReflectType(), rtype)
- istype(t, typ.GoType(), (*types.Signature)(nil))
+ istypeof(t, typ.GoType(), (*types.Signature)(nil))
is(t, typ.String(), "func(bool, int16) string")
}
func TestInterface1(t *testing.T) {
- methodtyp := FuncOf(nil, []Type{v.BasicTypes[reflect.Int]}, false)
- typ := InterfaceOf([]string{"Cap", "Len"}, []Type{methodtyp, methodtyp}, nil).Complete()
+ methodtyp := u.FuncOf(nil, []Type{u.BasicTypes[reflect.Int]}, false)
+ typ := u.InterfaceOf([]string{"Cap", "Len"}, []Type{methodtyp, methodtyp}, nil).Complete()
is(t, typ.Kind(), reflect.Interface)
is(t, typ.Name(), "")
- is(t, typ.NumMethod(), 2)
+ is(t, typ.NumExplicitMethod(), 2)
actual := typ.Method(0)
is(t, actual.Name, "Cap")
is(t, true, types.Identical(methodtyp.GoType(), actual.Type.GoType()))
actual = typ.Method(1)
is(t, actual.Name, "Len")
is(t, true, types.Identical(methodtyp.GoType(), actual.Type.GoType()))
- istype(t, typ.GoType(), (*types.Interface)(nil))
+ istypeof(t, typ.GoType(), (*types.Interface)(nil))
rtype := reflect.PtrTo(
reflect.StructOf([]reflect.StructField{
@@ -131,71 +142,86 @@ func TestInterface1(t *testing.T) {
// test implementing 'error' interface
func TestInterfaceError(t *testing.T) {
- methodtyp := FuncOf(nil, []Type{v.BasicTypes[reflect.String]}, false)
- typ := InterfaceOf([]string{"Error"}, []Type{methodtyp}, nil).Complete()
+ methodtyp := u.FuncOf(nil, []Type{u.BasicTypes[reflect.String]}, false)
+ typ := u.InterfaceOf([]string{"Error"}, []Type{methodtyp}, nil).Complete()
is(t, typ.Kind(), reflect.Interface)
is(t, typ.Name(), "")
- is(t, typ.NumMethod(), 1)
+ is(t, typ.NumExplicitMethod(), 1)
+ is(t, typ.NumAllMethod(), 1)
- is(t, typ.Implements(v.TypeOfError), true)
+ methodtyp = typ.Method(0).Type
+ is(t, methodtyp.NumIn(), 1) // one input parameter: the method receiver
+
+ is(t, typ.Implements(u.TypeOfError), true)
}
func TestMap(t *testing.T) {
- typ := MapOf(v.TypeOfInterface, v.BasicTypes[reflect.Bool])
+ typ := u.MapOf(u.TypeOfInterface, u.BasicTypes[reflect.Bool])
rtype := reflect.TypeOf(map[interface{}]bool{})
is(t, typ.Kind(), reflect.Map)
is(t, typ.Name(), "")
is(t, typ.ReflectType(), rtype)
- istype(t, typ.GoType(), (*types.Map)(nil))
+ is(t, typ.NumAllMethod(), 0)
+ istypeof(t, typ.GoType(), (*types.Map)(nil))
}
func TestMethod(t *testing.T) {
- typ := v.NamedOf("MyInt", "main")
- typ.SetUnderlying(v.BasicTypes[reflect.Int])
+ typ := u.NamedOf("MyInt", "main", reflect.Int)
+ typ.SetUnderlying(u.BasicTypes[reflect.Int])
rtype := reflect.TypeOf(int(0))
is(t, typ.Kind(), reflect.Int)
is(t, typ.Name(), "MyInt")
is(t, typ.ReflectType(), rtype)
- istype(t, typ.GoType(), (*types.Named)(nil))
+ is(t, typ.NumAllMethod(), 0)
+ istypeof(t, typ.GoType(), (*types.Named)(nil))
}
func TestNamed(t *testing.T) {
- typ := v.NamedOf("MyMap", "main")
- underlying := MapOf(v.TypeOfInterface, v.BasicTypes[reflect.Bool])
+ typ := u.NamedOf("MyMap", "main", reflect.Map)
+ underlying := u.MapOf(u.TypeOfInterface, u.BasicTypes[reflect.Bool])
typ.SetUnderlying(underlying)
rtype := reflect.TypeOf(map[interface{}]bool{})
is(t, typ.Kind(), reflect.Map)
is(t, typ.Name(), "MyMap")
is(t, typ.ReflectType(), rtype)
- istype(t, typ.GoType(), (*types.Named)(nil))
+ is(t, typ.NumAllMethod(), rtype.NumMethod())
+ istypeof(t, typ.GoType(), (*types.Named)(nil))
}
func TestSelfReference(t *testing.T) {
- typ := v.NamedOf("List", "main")
- underlying := StructOf([]StructField{
- StructField{Name: "First", Type: v.BasicTypes[reflect.Int]},
+ typ := u.NamedOf("List", "main", reflect.Struct)
+
+ is(t, typ.Kind(), reflect.Struct)
+ isidenticalgotype(t, typ.gunderlying(), u.TypeOfForward.GoType())
+
+ underlying := u.StructOf([]StructField{
+ StructField{Name: "First", Type: u.BasicTypes[reflect.Int]},
StructField{Name: "Rest", Type: typ},
})
typ.SetUnderlying(underlying)
+ typ1 := typ.Field(1).Type
rtype := reflect.TypeOf(struct {
First int
- Rest interface{}
+ Rest Forward
}{})
+
is(t, typ.Kind(), reflect.Struct)
is(t, typ.Name(), "List")
+ istypeof(t, typ.GoType(), (*types.Named)(nil))
is(t, typ.ReflectType(), rtype)
- is(t, true, types.Identical(typ.Field(1).Type.GoType(), typ.GoType()))
- istype(t, typ.GoType(), (*types.Named)(nil))
+ is(t, typ.NumAllMethod(), rtype.NumMethod())
+ is(t, typ1.ReflectType(), rTypeOfForward) // Rest is actually xreflect.Incomplete
+ isidenticalgotype(t, typ1.GoType(), typ.GoType()) // but it must pretend to be a main.List
is(t, typ.String(), "main.List")
- is(t, typ.underlying().String(), "struct{First int; Rest main.List}")
+ is(t, typ.gunderlying().String(), "struct{First int; Rest main.List}")
}
func TestStruct(t *testing.T) {
- typ := StructOf([]StructField{
- StructField{Name: "First", Type: v.BasicTypes[reflect.Int]},
- StructField{Name: "Rest", Type: v.TypeOfInterface},
+ typ := u.StructOf([]StructField{
+ StructField{Name: "First", Type: u.BasicTypes[reflect.Int]},
+ StructField{Name: "Rest", Type: u.TypeOfInterface},
})
rtype := reflect.TypeOf(struct {
First int
@@ -204,8 +230,9 @@ func TestStruct(t *testing.T) {
is(t, typ.Kind(), reflect.Struct)
is(t, typ.Name(), "")
is(t, typ.ReflectType(), rtype)
- istype(t, typ.GoType(), (*types.Struct)(nil))
+ istypeof(t, typ.GoType(), (*types.Struct)(nil))
is(t, typ.NumField(), rtype.NumField())
+ is(t, typ.NumAllMethod(), rtype.NumMethod())
for i := 0; i < typ.NumField(); i++ {
field := typ.Field(i)
rfield1 := field.toReflectField(false)
@@ -216,9 +243,9 @@ func TestStruct(t *testing.T) {
}
func TestEmbedded(t *testing.T) {
- etyp := v.NamedOf("Box", "")
- etyp.SetUnderlying(StructOf([]StructField{
- StructField{Name: "Value", Type: v.BasicTypes[reflect.Int]},
+ etyp := u.NamedOf("Box", "", reflect.Struct)
+ etyp.SetUnderlying(u.StructOf([]StructField{
+ StructField{Name: "Value", Type: u.BasicTypes[reflect.Int]},
}))
ertype := reflect.TypeOf(struct {
Value int
@@ -226,12 +253,12 @@ func TestEmbedded(t *testing.T) {
is(t, etyp.Kind(), reflect.Struct)
is(t, etyp.Name(), "Box")
is(t, etyp.ReflectType(), ertype)
- istype(t, etyp.GoType(), (*types.Named)(nil))
- istype(t, etyp.GoType().Underlying(), (*types.Struct)(nil))
+ istypeof(t, etyp.GoType(), (*types.Named)(nil))
+ istypeof(t, etyp.GoType().Underlying(), (*types.Struct)(nil))
- typ := StructOf([]StructField{
- StructField{Name: "Label", Type: v.BasicTypes[reflect.String]},
- StructField{Type: v.PtrTo(etyp)}, // empty name => anonymous, and autodetect name from type
+ typ := u.StructOf([]StructField{
+ StructField{Name: "Label", Type: u.BasicTypes[reflect.String]},
+ StructField{Type: u.PtrTo(etyp)}, // empty name => anonymous, and autodetect name from type
})
is(t, typ.String(), "struct{Label string; *Box}")
field1 := typ.Field(1)
@@ -246,27 +273,28 @@ func TestEmbedded(t *testing.T) {
efield := etyp.Field(0)
field.Index = efield.Index
field.Offset = efield.Offset
- isdeepequal(t, field, efield)
+ isfieldequal(t, field, efield)
// access anonymous field Struct.Box
field, count = typ.FieldByName("Box", "")
is(t, count, 1)
- isdeepequal(t, field, typ.Field(1))
+ isfieldequal(t, field, typ.Field(1))
}
func TestFromReflect0(t *testing.T) {
rtype := reflect.TypeOf((*func(bool, int8, <-chan uint16, []float32, [2]float64, []complex64) map[interface{}]*string)(nil)).Elem()
- v := &Universe{RebuildDepth: MaxDepth}
+ v := NewUniverse()
+ v.RebuildDepth = MaxDepth
typ := v.FromReflectType(rtype)
is(t, typ.ReflectType(), rtype) // recreated 100% accurately?
}
func TestFromReflect1(t *testing.T) {
rtype := reflect.TypeOf(time.Duration(0))
- typ := v.FromReflectType(rtype)
+ typ := u.FromReflectType(rtype)
is(t, typ.ReflectType(), rtype)
is(t, typ.String(), "time.Duration")
- is(t, typ.underlying().String(), "int64")
+ is(t, typ.gunderlying().String(), "int64")
}
func TestFromReflect2(t *testing.T) {
@@ -287,7 +315,8 @@ func TestFromReflect2(t *testing.T) {
G []float64
M map[string]*complex64
}{})
- v := &Universe{RebuildDepth: MaxDepth}
+ v := NewUniverse()
+ v.RebuildDepth = MaxDepth
typ := v.FromReflectType(in)
actual := typ.ReflectType()
is(t, typ.Kind(), reflect.Struct)
@@ -301,7 +330,8 @@ func TestFromReflect2(t *testing.T) {
func TestFromReflect3(t *testing.T) {
rtype := reflect.TypeOf((*io.Reader)(nil)).Elem()
- v := &Universe{RebuildDepth: 1}
+ v := NewUniverse()
+ v.RebuildDepth = 2
typ := v.FromReflectType(rtype)
actual := typ.ReflectType()
@@ -313,10 +343,14 @@ func TestFromReflect3(t *testing.T) {
is(t, typ.Kind(), reflect.Interface)
is(t, actual, expected)
is(t, typ.String(), "io.Reader")
- is(t, typ.underlying().String(), "interface{Read([]uint8) (int, error)}")
+ is(t, typ.gunderlying().String(), "interface{Read([]uint8) (int, error)}")
+ is(t, typ.NumExplicitMethod(), 1)
+ is(t, typ.NumAllMethod(), 1)
+ is(t, rtype.NumMethod(), 1)
for depth := 0; depth <= 3; depth++ {
- v := &Universe{RebuildDepth: depth}
+ v := NewUniverse()
+ v.RebuildDepth = depth
typ = v.FromReflectType(rtype)
// debugf("%v\t-> %v", typ, typ.ReflectType())
}
@@ -329,8 +363,9 @@ func TestFromReflect4(t *testing.T) {
approxInterfaceHeader(),
reflect.StructField{Name: "String", Type: reflect.TypeOf((*ToString)(nil)).Elem()},
}))
- typ := v.NamedOf("Stringer", "io")
- v := &Universe{RebuildDepth: MaxDepth}
+ typ := u.NamedOf("Stringer", "io", reflect.Interface)
+ v := NewUniverse()
+ v.RebuildDepth = MaxDepth
underlying := v.FromReflectType(rtype)
typ.SetUnderlying(underlying)
@@ -342,12 +377,14 @@ func TestFromReflect4(t *testing.T) {
}))
is(t, typ.Kind(), reflect.Interface)
is(t, actual, expected)
+ is(t, typ.NumExplicitMethod(), 1)
+ is(t, typ.NumAllMethod(), 1)
+ is(t, typ.String(), "io.Stringer")
+ is(t, typ.gunderlying().String(), "interface{String() string}")
/*
- is(t, typ.String(), "io.Stringer")
- is(t, typ.underlying().String(), "interface{String() string}")
-
for depth := 0; depth <= 3; depth++ {
- v := &Universe{RebuildDepth: depth}
+ v := NewUniverse()
+ v.RebuildDepth = depth
typ = v.FromReflectType(rtype)
// debugf("%v\t-> %v", typ, typ.ReflectType())
}
@@ -356,40 +393,74 @@ func TestFromReflect4(t *testing.T) {
func TestFromReflect5(t *testing.T) {
rtype := reflect.TypeOf((*reflect.Type)(nil)).Elem()
- typ := v.FromReflectType(rtype)
+ typ := u.FromReflectType(rtype)
is(t, typ.String(), "reflect.Type")
- // importer is more accurate and gives even function param names...
+ // importer is more accurate and gives even function param names... accept both variants
s1 := "interface{Align() int; AssignableTo(reflect.Type) bool; Bits() int; ChanDir() reflect.ChanDir; Comparable() bool; ConvertibleTo(reflect.Type) bool; Elem() reflect.Type; Field(int) reflect.StructField; FieldAlign() int; FieldByIndex([]int) reflect.StructField; FieldByName(string) (reflect.StructField, bool); FieldByNameFunc(func(string) bool) (reflect.StructField, bool); Implements(reflect.Type) bool; In(int) reflect.Type; IsVariadic() bool; Key() reflect.Type; Kind() reflect.Kind; Len() int; Method(int) reflect.Method; MethodByName(string) (reflect.Method, bool); Name() string; NumField() int; NumIn() int; NumMethod() int; NumOut() int; Out(int) reflect.Type; PkgPath() string; Size() uintptr; String() string; common() *reflect.rtype; uncommon() *reflect.uncommonType}"
s2 := "interface{Align() int; AssignableTo(u reflect.Type) bool; Bits() int; ChanDir() reflect.ChanDir; Comparable() bool; ConvertibleTo(u reflect.Type) bool; Elem() reflect.Type; Field(i int) reflect.StructField; FieldAlign() int; FieldByIndex(index []int) reflect.StructField; FieldByName(name string) (reflect.StructField, bool); FieldByNameFunc(match func(string) bool) (reflect.StructField, bool); Implements(u reflect.Type) bool; In(i int) reflect.Type; IsVariadic() bool; Key() reflect.Type; Kind() reflect.Kind; Len() int; Method(int) reflect.Method; MethodByName(string) (reflect.Method, bool); Name() string; NumField() int; NumIn() int; NumMethod() int; NumOut() int; Out(i int) reflect.Type; PkgPath() string; Size() uintptr; String() string; common() *reflect.rtype; uncommon() *reflect.uncommonType}"
- su := typ.underlying().String()
+ su := typ.gunderlying().String()
if su != s1 && su != s2 {
is(t, su, s1)
}
+ is(t, typ.NumExplicitMethod(), rtype.NumMethod())
+ is(t, typ.NumAllMethod(), rtype.NumMethod())
+}
+
+type Request4Test struct {
+ Header map[string]string
+ Response *Response4Test
+}
+type Response4Test struct {
+ HttpStatus int
+ Request *Request4Test
+}
+
+func TestFromReflectMutualRecursion(t *testing.T) {
+ defer de(bug(u))
+
+ rtype1 := reflect.TypeOf(Request4Test{})
+ rtype2 := reflect.TypeOf(Response4Test{})
+
+ typ1 := u.FromReflectType(rtype1)
+ typ2 := typ1.Field(1).Type.Elem()
+ typ1_loop := typ2.Field(1).Type.Elem()
+
+ is(t, typ1.ReflectType(), rtype1)
+ is(t, typ2.ReflectType(), rtype2)
+ is(t, typ1_loop.ReflectType(), rtype1)
+ is(t, typ1.Name(), "Request4Test")
+ is(t, typ2.Name(), "Response4Test")
+ isidenticalgotype(t, typ1.GoType(), typ1_loop.GoType())
+
+ is(t, typ1.gunderlying().String(), "struct{Header map[string]string; Response *github.com/cosmos72/gomacro/xreflect.Response4Test}")
+ is(t, typ2.gunderlying().String(), "struct{HttpStatus int; Request *github.com/cosmos72/gomacro/xreflect.Request4Test}")
}
// test implementing 'io.Reader' interface
func TestInterfaceIoReader(t *testing.T) {
- v.RebuildDepth = 0
+ u.RebuildDepth = 0
- in := []Type{v.SliceOf(v.BasicTypes[reflect.Uint8])}
- out := []Type{v.BasicTypes[reflect.Int], v.TypeOfError}
- methodtyp := v.FuncOf(in, out, false)
- typ := InterfaceOf([]string{"Read"}, []Type{methodtyp}, nil).Complete()
+ in := []Type{u.SliceOf(u.BasicTypes[reflect.Uint8])}
+ out := []Type{u.BasicTypes[reflect.Int], u.TypeOfError}
+ methodtyp := u.FuncOf(in, out, false)
+ typ := u.InterfaceOf([]string{"Read"}, []Type{methodtyp}, nil).Complete()
gtyp := typ.GoType()
is(t, typ.Kind(), reflect.Interface)
is(t, typ.Name(), "")
- is(t, typ.NumMethod(), 1)
+ is(t, typ.NumExplicitMethod(), 1)
+ is(t, typ.NumAllMethod(), 1)
// ---------------------------
- treader := v.TypeOf((*io.Reader)(nil)).Elem()
+ treader := u.TypeOf((*io.Reader)(nil)).Elem()
is(t, treader.Kind(), reflect.Interface)
is(t, treader.Name(), "Reader")
- is(t, treader.NumMethod(), 1)
+ is(t, treader.NumExplicitMethod(), 1)
+ is(t, treader.NumAllMethod(), 1)
istrue(t, typ.Implements(treader))
istrue(t, typ.AssignableTo(treader))
@@ -397,7 +468,7 @@ func TestInterfaceIoReader(t *testing.T) {
istrue(t, types.Identical(gtyp, treader.GoType().Underlying()))
// ---------------------------
- io, err := v.Importer.Import("io")
+ io, err := u.Importer.Import("io")
istrue(t, err == nil)
istrue(t, io != nil)
@@ -414,10 +485,10 @@ func TestInterfaceIoReader(t *testing.T) {
istrue(t, types.AssignableTo(reader, gtyp))
// ---------------------------
- t_file := v.TypeOf((*os.File)(nil))
+ t_file := u.TypeOf((*os.File)(nil))
tfile := t_file.Elem()
- os, err := v.Importer.Import("os")
+ os, err := u.Importer.Import("os")
istrue(t, err == nil)
istrue(t, os != nil)
@@ -429,7 +500,7 @@ func TestInterfaceIoReader(t *testing.T) {
if false {
inspect("error", types.Universe.Lookup("error").Type())
- inspect("Universe.TypeOfError.GoType()", v.TypeOfError.GoType())
+ inspect("Universe.TypeOfError.GoType()", u.TypeOfError.GoType())
inspect("tfile.Read.Results.1.Type", tfileRead.Results().At(1).Type())
inspect("file.Read.Results.1.Type", fileRead.Results().At(1).Type())
inspect("ireader.Read.Results.1.Type", ireaderRead.Results().At(1).Type())
@@ -444,6 +515,59 @@ func TestInterfaceIoReader(t *testing.T) {
}
+// return the Type equivalent to "type io.Reader interface { io.Reader, io.Writer }"
+func makeIoReaderWriterType() Type {
+ in := []Type{u.SliceOf(u.BasicTypes[reflect.Uint8])}
+ out := []Type{u.BasicTypes[reflect.Int], u.TypeOfError}
+ method := u.FuncOf(in, out, false)
+ read_interf := u.InterfaceOf([]string{"Read"}, []Type{method}, nil).Complete()
+ reader := u.NamedOf("Reader", "io", reflect.Interface)
+ reader.SetUnderlying(read_interf)
+ write_interf := u.InterfaceOf([]string{"Write"}, []Type{method}, nil).Complete()
+ writer := u.NamedOf("Writer", "io", reflect.Interface)
+ writer.SetUnderlying(write_interf)
+ rw_interf := u.InterfaceOf(nil, nil, []Type{reader, writer}).Complete()
+ readwriter := u.NamedOf("ReadWriter", "io", reflect.Interface)
+ readwriter.SetUnderlying(rw_interf)
+ return readwriter
+}
+
+// test implementing 'io.ReadWriter' interface
+func TestInterfaceIoReadWriter(t *testing.T) {
+ rw := makeIoReaderWriterType()
+
+ is(t, rw.NumExplicitMethod(), 0)
+ is(t, rw.NumAllMethod(), 2)
+
+ m, count := rw.MethodByName("Read", "")
+ is(t, count, 1)
+ is(t, m.Name, "Read")
+ is(t, m.Type.NumIn(), 2) // receiver and []uint8
+ is(t, m.Type.NumOut(), 2)
+ is(t, m.Type.String(), "func([]uint8) (int, error)")
+ isidenticalgotype(t, m.Type.In(0).GoType(), rw.gunderlying())
+
+ m, count = rw.MethodByName("Write", "")
+ is(t, count, 1)
+ is(t, m.Name, "Write")
+ is(t, m.Type.NumIn(), 2) // receiver and []uint8
+ is(t, m.Type.NumOut(), 2)
+ is(t, m.Type.String(), "func([]uint8) (int, error)")
+ isidenticalgotype(t, m.Type.In(0).GoType(), rw.gunderlying())
+
+ trw := u.TypeOf((*io.ReadWriter)(nil)).Elem()
+
+ is(t, rw.ConvertibleTo(trw), true)
+ is(t, trw.ConvertibleTo(rw), true)
+ is(t, rw.AssignableTo(trw), true)
+ is(t, trw.AssignableTo(rw), true)
+ is(t, rw.Implements(trw), true)
+ is(t, trw.Implements(rw), true)
+ // named types have been redeclared... they cannot be identical
+ is(t, rw.IdenticalTo(trw), false)
+ is(t, trw.IdenticalTo(rw), false)
+}
+
func inspect(label string, t types.Type) {
debugf("%s:\t%v", label, t)
switch t := t.(type) {
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/universe.go b/vendor/github.com/cosmos72/gomacro/xreflect/universe.go
index 6a1f9e0..41ea892 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/universe.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/universe.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* universe.go
@@ -40,14 +31,19 @@ type Types struct {
type Universe struct {
Types
+ // FromReflectType() map of types under construction.
+ // v.addmethods() will be invoked on them once the topmost FromReflectType() finishes.
+ partialTypes Types
ReflectTypes map[reflect.Type]Type
BasicTypes []Type
TypeOfInterface Type
+ TypeOfForward Type
TypeOfError Type
TryResolve func(name, pkgpath string) Type
Packages map[string]*Package
Importer types.ImporterFrom
RebuildDepth int
+ DebugDepth int
mutex sync.Mutex
debugmutex int
ThreadSafe bool
@@ -71,7 +67,7 @@ func un(v *Universe) {
}
func (v *Universe) rebuild() bool {
- return v.RebuildDepth >= 0
+ return v.RebuildDepth > 0
}
func (v *Universe) cache(rt reflect.Type, t Type) Type {
@@ -122,14 +118,34 @@ func (v *Universe) CachePackage(pkg *types.Package) {
v.cachePackage(pkg)
}
+// cacheMissingPackage adds a nil entry to Universe.Packages, if an entry is not present already.
+// Used to cache failures of Importer.Import.
+func (v *Universe) cacheMissingPackage(path string) {
+ if _, cached := v.Packages[path]; cached || len(path) == 0 {
+ return
+ }
+ if v.Packages == nil {
+ v.Packages = make(map[string]*Package)
+ }
+ v.Packages[path] = nil
+}
+
func (v *Universe) importPackage(path string) *Package {
+ cachepkg, cached := v.Packages[path]
+ if cachepkg != nil {
+ return cachepkg
+ }
if v.Importer == nil {
v.Importer = DefaultImporter()
}
pkg, err := v.Importer.Import(path)
if err != nil || pkg == nil {
- // debugf("cannot find metadata to import package %q: %v\n\t%s", path, err, debug.Stack())
- debugf("importer: cannot find package %q metadata, approximating it with reflection", path)
+ if !cached {
+ if v.debug() {
+ debugf("importer: cannot find package %q metadata, approximating it with reflection", path)
+ }
+ v.cacheMissingPackage(path)
+ }
return nil
}
// debugf("imported package %q", path)
@@ -139,14 +155,13 @@ func (v *Universe) importPackage(path string) *Package {
func (v *Universe) namedTypeFromImport(rtype reflect.Type) Type {
t := v.namedTypeFromPackageCache(rtype)
- if t != nil {
+ if unwrap(t) != nil {
return t
}
- pkg := v.importPackage(rtype.PkgPath())
+ pkg := v.loadPackage(rtype.PkgPath())
if pkg == nil {
return nil
}
-
return v.namedTypeFromPackage(rtype, (*types.Package)(pkg))
}
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/util.go b/vendor/github.com/cosmos72/gomacro/xreflect/util.go
index 864372c..e305545 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/util.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/util.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* util.go
@@ -40,11 +31,6 @@ func concat(a, b []int) []int {
return c
}
-func debugf(format string, args ...interface{}) {
- str := fmt.Sprintf(format, args...)
- fmt.Printf("// debug: %s\n", str)
-}
-
type Error struct {
Type Type
format string
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/value.go b/vendor/github.com/cosmos72/gomacro/xreflect/value.go
index 294ae27..c0cdca1 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/value.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/value.go
@@ -1,20 +1,11 @@
/*
* gomacro - A Go interpreter with Lisp-like macros
*
- * Copyright (C) 2017 Massimiliano Ghilardi
+ * Copyright (C) 2017-2018 Massimiliano Ghilardi
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* value.go
diff --git a/vendor/github.com/cosmos72/gomacro/xreflect/x_package.go b/vendor/github.com/cosmos72/gomacro/xreflect/x_package.go
index 00e326f..6bdcfee 100644
--- a/vendor/github.com/cosmos72/gomacro/xreflect/x_package.go
+++ b/vendor/github.com/cosmos72/gomacro/xreflect/x_package.go
@@ -13,29 +13,19 @@ import (
func init() {
imports.Packages["github.com/cosmos72/gomacro/xreflect"] = imports.Package{
Binds: map[string]r.Value{
- "ArrayOf": r.ValueOf(ArrayOf),
- "ChanOf": r.ValueOf(ChanOf),
"DefaultImporter": r.ValueOf(DefaultImporter),
- "DefaultUniverse": r.ValueOf(DefaultUniverse),
- "FuncOf": r.ValueOf(FuncOf),
- "GensymEmbedded": r.ValueOf(GensymEmbedded),
+ "GensymAnonymous": r.ValueOf(GensymAnonymous),
"GensymPrivate": r.ValueOf(GensymPrivate),
- "InterfaceOf": r.ValueOf(InterfaceOf),
- "MapOf": r.ValueOf(MapOf),
- "MaxDepth": r.ValueOf(int64(MaxDepth)),
- "MethodOf": r.ValueOf(MethodOf),
+ "MaxDepth": r.ValueOf(MaxDepth),
+ "MissingMethod": r.ValueOf(MissingMethod),
"NewUniverse": r.ValueOf(NewUniverse),
- "PtrTo": r.ValueOf(PtrTo),
"QName1": r.ValueOf(QName1),
"QName2": r.ValueOf(QName2),
"QNameGo": r.ValueOf(QNameGo),
"QNameGo2": r.ValueOf(QNameGo2),
- "SameType": r.ValueOf(SameType),
- "SliceOf": r.ValueOf(SliceOf),
- "StrGensymEmbedded": r.ValueOf(StrGensymEmbedded),
+ "StrGensymAnonymous": r.ValueOf(StrGensymAnonymous),
"StrGensymInterface": r.ValueOf(StrGensymInterface),
"StrGensymPrivate": r.ValueOf(StrGensymPrivate),
- "StructOf": r.ValueOf(StructOf),
"Zero": r.ValueOf(Zero),
},
Types: map[string]r.Type{
diff --git a/vendor/github.com/mattn/go-runewidth/.travis.yml b/vendor/github.com/mattn/go-runewidth/.travis.yml
new file mode 100644
index 0000000..5c9c2a3
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/.travis.yml
@@ -0,0 +1,8 @@
+language: go
+go:
+ - tip
+before_install:
+ - go get github.com/mattn/goveralls
+ - go get golang.org/x/tools/cmd/cover
+script:
+ - $HOME/gopath/bin/goveralls -repotoken lAKAWPzcGsD3A8yBX3BGGtRUdJ6CaGERL
diff --git a/vendor/github.com/mattn/go-runewidth/LICENSE b/vendor/github.com/mattn/go-runewidth/LICENSE
new file mode 100644
index 0000000..91b5cef
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Yasuhiro Matsumoto
+
+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.
diff --git a/vendor/github.com/mattn/go-runewidth/README.mkd b/vendor/github.com/mattn/go-runewidth/README.mkd
new file mode 100644
index 0000000..66663a9
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/README.mkd
@@ -0,0 +1,27 @@
+go-runewidth
+============
+
+[](https://travis-ci.org/mattn/go-runewidth)
+[](https://coveralls.io/r/mattn/go-runewidth?branch=HEAD)
+[](http://godoc.org/github.com/mattn/go-runewidth)
+[](https://goreportcard.com/report/github.com/mattn/go-runewidth)
+
+Provides functions to get fixed width of the character or string.
+
+Usage
+-----
+
+```go
+runewidth.StringWidth("つのだ☆HIRO") == 12
+```
+
+
+Author
+------
+
+Yasuhiro Matsumoto
+
+License
+-------
+
+under the MIT License: http://mattn.mit-license.org/2013
diff --git a/vendor/github.com/mattn/go-runewidth/runewidth.go b/vendor/github.com/mattn/go-runewidth/runewidth.go
new file mode 100644
index 0000000..2164497
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/runewidth.go
@@ -0,0 +1,1223 @@
+package runewidth
+
+var (
+ // EastAsianWidth will be set true if the current locale is CJK
+ EastAsianWidth = IsEastAsian()
+
+ // DefaultCondition is a condition in current locale
+ DefaultCondition = &Condition{EastAsianWidth}
+)
+
+type interval struct {
+ first rune
+ last rune
+}
+
+type table []interval
+
+func inTables(r rune, ts ...table) bool {
+ for _, t := range ts {
+ if inTable(r, t) {
+ return true
+ }
+ }
+ return false
+}
+
+func inTable(r rune, t table) bool {
+ // func (t table) IncludesRune(r rune) bool {
+ if r < t[0].first {
+ return false
+ }
+
+ bot := 0
+ top := len(t) - 1
+ for top >= bot {
+ mid := (bot + top) / 2
+
+ switch {
+ case t[mid].last < r:
+ bot = mid + 1
+ case t[mid].first > r:
+ top = mid - 1
+ default:
+ return true
+ }
+ }
+
+ return false
+}
+
+var private = table{
+ {0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD},
+}
+
+var nonprint = table{
+ {0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD},
+ {0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F},
+ {0x202A, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF},
+ {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF},
+}
+
+var combining = table{
+ {0x0300, 0x036F}, {0x0483, 0x0489}, {0x0591, 0x05BD},
+ {0x05BF, 0x05BF}, {0x05C1, 0x05C2}, {0x05C4, 0x05C5},
+ {0x05C7, 0x05C7}, {0x0610, 0x061A}, {0x064B, 0x065F},
+ {0x0670, 0x0670}, {0x06D6, 0x06DC}, {0x06DF, 0x06E4},
+ {0x06E7, 0x06E8}, {0x06EA, 0x06ED}, {0x0711, 0x0711},
+ {0x0730, 0x074A}, {0x07A6, 0x07B0}, {0x07EB, 0x07F3},
+ {0x0816, 0x0819}, {0x081B, 0x0823}, {0x0825, 0x0827},
+ {0x0829, 0x082D}, {0x0859, 0x085B}, {0x08D4, 0x08E1},
+ {0x08E3, 0x0903}, {0x093A, 0x093C}, {0x093E, 0x094F},
+ {0x0951, 0x0957}, {0x0962, 0x0963}, {0x0981, 0x0983},
+ {0x09BC, 0x09BC}, {0x09BE, 0x09C4}, {0x09C7, 0x09C8},
+ {0x09CB, 0x09CD}, {0x09D7, 0x09D7}, {0x09E2, 0x09E3},
+ {0x0A01, 0x0A03}, {0x0A3C, 0x0A3C}, {0x0A3E, 0x0A42},
+ {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, {0x0A51, 0x0A51},
+ {0x0A70, 0x0A71}, {0x0A75, 0x0A75}, {0x0A81, 0x0A83},
+ {0x0ABC, 0x0ABC}, {0x0ABE, 0x0AC5}, {0x0AC7, 0x0AC9},
+ {0x0ACB, 0x0ACD}, {0x0AE2, 0x0AE3}, {0x0B01, 0x0B03},
+ {0x0B3C, 0x0B3C}, {0x0B3E, 0x0B44}, {0x0B47, 0x0B48},
+ {0x0B4B, 0x0B4D}, {0x0B56, 0x0B57}, {0x0B62, 0x0B63},
+ {0x0B82, 0x0B82}, {0x0BBE, 0x0BC2}, {0x0BC6, 0x0BC8},
+ {0x0BCA, 0x0BCD}, {0x0BD7, 0x0BD7}, {0x0C00, 0x0C03},
+ {0x0C3E, 0x0C44}, {0x0C46, 0x0C48}, {0x0C4A, 0x0C4D},
+ {0x0C55, 0x0C56}, {0x0C62, 0x0C63}, {0x0C81, 0x0C83},
+ {0x0CBC, 0x0CBC}, {0x0CBE, 0x0CC4}, {0x0CC6, 0x0CC8},
+ {0x0CCA, 0x0CCD}, {0x0CD5, 0x0CD6}, {0x0CE2, 0x0CE3},
+ {0x0D01, 0x0D03}, {0x0D3E, 0x0D44}, {0x0D46, 0x0D48},
+ {0x0D4A, 0x0D4D}, {0x0D57, 0x0D57}, {0x0D62, 0x0D63},
+ {0x0D82, 0x0D83}, {0x0DCA, 0x0DCA}, {0x0DCF, 0x0DD4},
+ {0x0DD6, 0x0DD6}, {0x0DD8, 0x0DDF}, {0x0DF2, 0x0DF3},
+ {0x0E31, 0x0E31}, {0x0E34, 0x0E3A}, {0x0E47, 0x0E4E},
+ {0x0EB1, 0x0EB1}, {0x0EB4, 0x0EB9}, {0x0EBB, 0x0EBC},
+ {0x0EC8, 0x0ECD}, {0x0F18, 0x0F19}, {0x0F35, 0x0F35},
+ {0x0F37, 0x0F37}, {0x0F39, 0x0F39}, {0x0F3E, 0x0F3F},
+ {0x0F71, 0x0F84}, {0x0F86, 0x0F87}, {0x0F8D, 0x0F97},
+ {0x0F99, 0x0FBC}, {0x0FC6, 0x0FC6}, {0x102B, 0x103E},
+ {0x1056, 0x1059}, {0x105E, 0x1060}, {0x1062, 0x1064},
+ {0x1067, 0x106D}, {0x1071, 0x1074}, {0x1082, 0x108D},
+ {0x108F, 0x108F}, {0x109A, 0x109D}, {0x135D, 0x135F},
+ {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753},
+ {0x1772, 0x1773}, {0x17B4, 0x17D3}, {0x17DD, 0x17DD},
+ {0x180B, 0x180D}, {0x1885, 0x1886}, {0x18A9, 0x18A9},
+ {0x1920, 0x192B}, {0x1930, 0x193B}, {0x1A17, 0x1A1B},
+ {0x1A55, 0x1A5E}, {0x1A60, 0x1A7C}, {0x1A7F, 0x1A7F},
+ {0x1AB0, 0x1ABE}, {0x1B00, 0x1B04}, {0x1B34, 0x1B44},
+ {0x1B6B, 0x1B73}, {0x1B80, 0x1B82}, {0x1BA1, 0x1BAD},
+ {0x1BE6, 0x1BF3}, {0x1C24, 0x1C37}, {0x1CD0, 0x1CD2},
+ {0x1CD4, 0x1CE8}, {0x1CED, 0x1CED}, {0x1CF2, 0x1CF4},
+ {0x1CF8, 0x1CF9}, {0x1DC0, 0x1DF5}, {0x1DFB, 0x1DFF},
+ {0x20D0, 0x20F0}, {0x2CEF, 0x2CF1}, {0x2D7F, 0x2D7F},
+ {0x2DE0, 0x2DFF}, {0x302A, 0x302F}, {0x3099, 0x309A},
+ {0xA66F, 0xA672}, {0xA674, 0xA67D}, {0xA69E, 0xA69F},
+ {0xA6F0, 0xA6F1}, {0xA802, 0xA802}, {0xA806, 0xA806},
+ {0xA80B, 0xA80B}, {0xA823, 0xA827}, {0xA880, 0xA881},
+ {0xA8B4, 0xA8C5}, {0xA8E0, 0xA8F1}, {0xA926, 0xA92D},
+ {0xA947, 0xA953}, {0xA980, 0xA983}, {0xA9B3, 0xA9C0},
+ {0xA9E5, 0xA9E5}, {0xAA29, 0xAA36}, {0xAA43, 0xAA43},
+ {0xAA4C, 0xAA4D}, {0xAA7B, 0xAA7D}, {0xAAB0, 0xAAB0},
+ {0xAAB2, 0xAAB4}, {0xAAB7, 0xAAB8}, {0xAABE, 0xAABF},
+ {0xAAC1, 0xAAC1}, {0xAAEB, 0xAAEF}, {0xAAF5, 0xAAF6},
+ {0xABE3, 0xABEA}, {0xABEC, 0xABED}, {0xFB1E, 0xFB1E},
+ {0xFE00, 0xFE0F}, {0xFE20, 0xFE2F}, {0x101FD, 0x101FD},
+ {0x102E0, 0x102E0}, {0x10376, 0x1037A}, {0x10A01, 0x10A03},
+ {0x10A05, 0x10A06}, {0x10A0C, 0x10A0F}, {0x10A38, 0x10A3A},
+ {0x10A3F, 0x10A3F}, {0x10AE5, 0x10AE6}, {0x11000, 0x11002},
+ {0x11038, 0x11046}, {0x1107F, 0x11082}, {0x110B0, 0x110BA},
+ {0x11100, 0x11102}, {0x11127, 0x11134}, {0x11173, 0x11173},
+ {0x11180, 0x11182}, {0x111B3, 0x111C0}, {0x111CA, 0x111CC},
+ {0x1122C, 0x11237}, {0x1123E, 0x1123E}, {0x112DF, 0x112EA},
+ {0x11300, 0x11303}, {0x1133C, 0x1133C}, {0x1133E, 0x11344},
+ {0x11347, 0x11348}, {0x1134B, 0x1134D}, {0x11357, 0x11357},
+ {0x11362, 0x11363}, {0x11366, 0x1136C}, {0x11370, 0x11374},
+ {0x11435, 0x11446}, {0x114B0, 0x114C3}, {0x115AF, 0x115B5},
+ {0x115B8, 0x115C0}, {0x115DC, 0x115DD}, {0x11630, 0x11640},
+ {0x116AB, 0x116B7}, {0x1171D, 0x1172B}, {0x11C2F, 0x11C36},
+ {0x11C38, 0x11C3F}, {0x11C92, 0x11CA7}, {0x11CA9, 0x11CB6},
+ {0x16AF0, 0x16AF4}, {0x16B30, 0x16B36}, {0x16F51, 0x16F7E},
+ {0x16F8F, 0x16F92}, {0x1BC9D, 0x1BC9E}, {0x1D165, 0x1D169},
+ {0x1D16D, 0x1D172}, {0x1D17B, 0x1D182}, {0x1D185, 0x1D18B},
+ {0x1D1AA, 0x1D1AD}, {0x1D242, 0x1D244}, {0x1DA00, 0x1DA36},
+ {0x1DA3B, 0x1DA6C}, {0x1DA75, 0x1DA75}, {0x1DA84, 0x1DA84},
+ {0x1DA9B, 0x1DA9F}, {0x1DAA1, 0x1DAAF}, {0x1E000, 0x1E006},
+ {0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, {0x1E023, 0x1E024},
+ {0x1E026, 0x1E02A}, {0x1E8D0, 0x1E8D6}, {0x1E944, 0x1E94A},
+ {0xE0100, 0xE01EF},
+}
+
+var doublewidth = table{
+ {0x1100, 0x115F}, {0x231A, 0x231B}, {0x2329, 0x232A},
+ {0x23E9, 0x23EC}, {0x23F0, 0x23F0}, {0x23F3, 0x23F3},
+ {0x25FD, 0x25FE}, {0x2614, 0x2615}, {0x2648, 0x2653},
+ {0x267F, 0x267F}, {0x2693, 0x2693}, {0x26A1, 0x26A1},
+ {0x26AA, 0x26AB}, {0x26BD, 0x26BE}, {0x26C4, 0x26C5},
+ {0x26CE, 0x26CE}, {0x26D4, 0x26D4}, {0x26EA, 0x26EA},
+ {0x26F2, 0x26F3}, {0x26F5, 0x26F5}, {0x26FA, 0x26FA},
+ {0x26FD, 0x26FD}, {0x2705, 0x2705}, {0x270A, 0x270B},
+ {0x2728, 0x2728}, {0x274C, 0x274C}, {0x274E, 0x274E},
+ {0x2753, 0x2755}, {0x2757, 0x2757}, {0x2795, 0x2797},
+ {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, {0x2B1B, 0x2B1C},
+ {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x2E80, 0x2E99},
+ {0x2E9B, 0x2EF3}, {0x2F00, 0x2FD5}, {0x2FF0, 0x2FFB},
+ {0x3000, 0x303E}, {0x3041, 0x3096}, {0x3099, 0x30FF},
+ {0x3105, 0x312D}, {0x3131, 0x318E}, {0x3190, 0x31BA},
+ {0x31C0, 0x31E3}, {0x31F0, 0x321E}, {0x3220, 0x3247},
+ {0x3250, 0x32FE}, {0x3300, 0x4DBF}, {0x4E00, 0xA48C},
+ {0xA490, 0xA4C6}, {0xA960, 0xA97C}, {0xAC00, 0xD7A3},
+ {0xF900, 0xFAFF}, {0xFE10, 0xFE19}, {0xFE30, 0xFE52},
+ {0xFE54, 0xFE66}, {0xFE68, 0xFE6B}, {0xFF01, 0xFF60},
+ {0xFFE0, 0xFFE6}, {0x16FE0, 0x16FE0}, {0x17000, 0x187EC},
+ {0x18800, 0x18AF2}, {0x1B000, 0x1B001}, {0x1F004, 0x1F004},
+ {0x1F0CF, 0x1F0CF}, {0x1F18E, 0x1F18E}, {0x1F191, 0x1F19A},
+ {0x1F200, 0x1F202}, {0x1F210, 0x1F23B}, {0x1F240, 0x1F248},
+ {0x1F250, 0x1F251}, {0x1F300, 0x1F320}, {0x1F32D, 0x1F335},
+ {0x1F337, 0x1F37C}, {0x1F37E, 0x1F393}, {0x1F3A0, 0x1F3CA},
+ {0x1F3CF, 0x1F3D3}, {0x1F3E0, 0x1F3F0}, {0x1F3F4, 0x1F3F4},
+ {0x1F3F8, 0x1F43E}, {0x1F440, 0x1F440}, {0x1F442, 0x1F4FC},
+ {0x1F4FF, 0x1F53D}, {0x1F54B, 0x1F54E}, {0x1F550, 0x1F567},
+ {0x1F57A, 0x1F57A}, {0x1F595, 0x1F596}, {0x1F5A4, 0x1F5A4},
+ {0x1F5FB, 0x1F64F}, {0x1F680, 0x1F6C5}, {0x1F6CC, 0x1F6CC},
+ {0x1F6D0, 0x1F6D2}, {0x1F6EB, 0x1F6EC}, {0x1F6F4, 0x1F6F6},
+ {0x1F910, 0x1F91E}, {0x1F920, 0x1F927}, {0x1F930, 0x1F930},
+ {0x1F933, 0x1F93E}, {0x1F940, 0x1F94B}, {0x1F950, 0x1F95E},
+ {0x1F980, 0x1F991}, {0x1F9C0, 0x1F9C0}, {0x20000, 0x2FFFD},
+ {0x30000, 0x3FFFD},
+}
+
+var ambiguous = table{
+ {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8},
+ {0x00AA, 0x00AA}, {0x00AD, 0x00AE}, {0x00B0, 0x00B4},
+ {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6},
+ {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1},
+ {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED},
+ {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA},
+ {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101},
+ {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B},
+ {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133},
+ {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144},
+ {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153},
+ {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE},
+ {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4},
+ {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA},
+ {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261},
+ {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB},
+ {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB},
+ {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0300, 0x036F},
+ {0x0391, 0x03A1}, {0x03A3, 0x03A9}, {0x03B1, 0x03C1},
+ {0x03C3, 0x03C9}, {0x0401, 0x0401}, {0x0410, 0x044F},
+ {0x0451, 0x0451}, {0x2010, 0x2010}, {0x2013, 0x2016},
+ {0x2018, 0x2019}, {0x201C, 0x201D}, {0x2020, 0x2022},
+ {0x2024, 0x2027}, {0x2030, 0x2030}, {0x2032, 0x2033},
+ {0x2035, 0x2035}, {0x203B, 0x203B}, {0x203E, 0x203E},
+ {0x2074, 0x2074}, {0x207F, 0x207F}, {0x2081, 0x2084},
+ {0x20AC, 0x20AC}, {0x2103, 0x2103}, {0x2105, 0x2105},
+ {0x2109, 0x2109}, {0x2113, 0x2113}, {0x2116, 0x2116},
+ {0x2121, 0x2122}, {0x2126, 0x2126}, {0x212B, 0x212B},
+ {0x2153, 0x2154}, {0x215B, 0x215E}, {0x2160, 0x216B},
+ {0x2170, 0x2179}, {0x2189, 0x2189}, {0x2190, 0x2199},
+ {0x21B8, 0x21B9}, {0x21D2, 0x21D2}, {0x21D4, 0x21D4},
+ {0x21E7, 0x21E7}, {0x2200, 0x2200}, {0x2202, 0x2203},
+ {0x2207, 0x2208}, {0x220B, 0x220B}, {0x220F, 0x220F},
+ {0x2211, 0x2211}, {0x2215, 0x2215}, {0x221A, 0x221A},
+ {0x221D, 0x2220}, {0x2223, 0x2223}, {0x2225, 0x2225},
+ {0x2227, 0x222C}, {0x222E, 0x222E}, {0x2234, 0x2237},
+ {0x223C, 0x223D}, {0x2248, 0x2248}, {0x224C, 0x224C},
+ {0x2252, 0x2252}, {0x2260, 0x2261}, {0x2264, 0x2267},
+ {0x226A, 0x226B}, {0x226E, 0x226F}, {0x2282, 0x2283},
+ {0x2286, 0x2287}, {0x2295, 0x2295}, {0x2299, 0x2299},
+ {0x22A5, 0x22A5}, {0x22BF, 0x22BF}, {0x2312, 0x2312},
+ {0x2460, 0x24E9}, {0x24EB, 0x254B}, {0x2550, 0x2573},
+ {0x2580, 0x258F}, {0x2592, 0x2595}, {0x25A0, 0x25A1},
+ {0x25A3, 0x25A9}, {0x25B2, 0x25B3}, {0x25B6, 0x25B7},
+ {0x25BC, 0x25BD}, {0x25C0, 0x25C1}, {0x25C6, 0x25C8},
+ {0x25CB, 0x25CB}, {0x25CE, 0x25D1}, {0x25E2, 0x25E5},
+ {0x25EF, 0x25EF}, {0x2605, 0x2606}, {0x2609, 0x2609},
+ {0x260E, 0x260F}, {0x261C, 0x261C}, {0x261E, 0x261E},
+ {0x2640, 0x2640}, {0x2642, 0x2642}, {0x2660, 0x2661},
+ {0x2663, 0x2665}, {0x2667, 0x266A}, {0x266C, 0x266D},
+ {0x266F, 0x266F}, {0x269E, 0x269F}, {0x26BF, 0x26BF},
+ {0x26C6, 0x26CD}, {0x26CF, 0x26D3}, {0x26D5, 0x26E1},
+ {0x26E3, 0x26E3}, {0x26E8, 0x26E9}, {0x26EB, 0x26F1},
+ {0x26F4, 0x26F4}, {0x26F6, 0x26F9}, {0x26FB, 0x26FC},
+ {0x26FE, 0x26FF}, {0x273D, 0x273D}, {0x2776, 0x277F},
+ {0x2B56, 0x2B59}, {0x3248, 0x324F}, {0xE000, 0xF8FF},
+ {0xFE00, 0xFE0F}, {0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A},
+ {0x1F110, 0x1F12D}, {0x1F130, 0x1F169}, {0x1F170, 0x1F18D},
+ {0x1F18F, 0x1F190}, {0x1F19B, 0x1F1AC}, {0xE0100, 0xE01EF},
+ {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD},
+}
+
+var emoji = table{
+ {0x1F1E6, 0x1F1FF}, {0x1F321, 0x1F321}, {0x1F324, 0x1F32C},
+ {0x1F336, 0x1F336}, {0x1F37D, 0x1F37D}, {0x1F396, 0x1F397},
+ {0x1F399, 0x1F39B}, {0x1F39E, 0x1F39F}, {0x1F3CB, 0x1F3CE},
+ {0x1F3D4, 0x1F3DF}, {0x1F3F3, 0x1F3F5}, {0x1F3F7, 0x1F3F7},
+ {0x1F43F, 0x1F43F}, {0x1F441, 0x1F441}, {0x1F4FD, 0x1F4FD},
+ {0x1F549, 0x1F54A}, {0x1F56F, 0x1F570}, {0x1F573, 0x1F579},
+ {0x1F587, 0x1F587}, {0x1F58A, 0x1F58D}, {0x1F590, 0x1F590},
+ {0x1F5A5, 0x1F5A5}, {0x1F5A8, 0x1F5A8}, {0x1F5B1, 0x1F5B2},
+ {0x1F5BC, 0x1F5BC}, {0x1F5C2, 0x1F5C4}, {0x1F5D1, 0x1F5D3},
+ {0x1F5DC, 0x1F5DE}, {0x1F5E1, 0x1F5E1}, {0x1F5E3, 0x1F5E3},
+ {0x1F5E8, 0x1F5E8}, {0x1F5EF, 0x1F5EF}, {0x1F5F3, 0x1F5F3},
+ {0x1F5FA, 0x1F5FA}, {0x1F6CB, 0x1F6CF}, {0x1F6E0, 0x1F6E5},
+ {0x1F6E9, 0x1F6E9}, {0x1F6F0, 0x1F6F0}, {0x1F6F3, 0x1F6F3},
+}
+
+var notassigned = table{
+ {0x0378, 0x0379}, {0x0380, 0x0383}, {0x038B, 0x038B},
+ {0x038D, 0x038D}, {0x03A2, 0x03A2}, {0x0530, 0x0530},
+ {0x0557, 0x0558}, {0x0560, 0x0560}, {0x0588, 0x0588},
+ {0x058B, 0x058C}, {0x0590, 0x0590}, {0x05C8, 0x05CF},
+ {0x05EB, 0x05EF}, {0x05F5, 0x05FF}, {0x061D, 0x061D},
+ {0x070E, 0x070E}, {0x074B, 0x074C}, {0x07B2, 0x07BF},
+ {0x07FB, 0x07FF}, {0x082E, 0x082F}, {0x083F, 0x083F},
+ {0x085C, 0x085D}, {0x085F, 0x089F}, {0x08B5, 0x08B5},
+ {0x08BE, 0x08D3}, {0x0984, 0x0984}, {0x098D, 0x098E},
+ {0x0991, 0x0992}, {0x09A9, 0x09A9}, {0x09B1, 0x09B1},
+ {0x09B3, 0x09B5}, {0x09BA, 0x09BB}, {0x09C5, 0x09C6},
+ {0x09C9, 0x09CA}, {0x09CF, 0x09D6}, {0x09D8, 0x09DB},
+ {0x09DE, 0x09DE}, {0x09E4, 0x09E5}, {0x09FC, 0x0A00},
+ {0x0A04, 0x0A04}, {0x0A0B, 0x0A0E}, {0x0A11, 0x0A12},
+ {0x0A29, 0x0A29}, {0x0A31, 0x0A31}, {0x0A34, 0x0A34},
+ {0x0A37, 0x0A37}, {0x0A3A, 0x0A3B}, {0x0A3D, 0x0A3D},
+ {0x0A43, 0x0A46}, {0x0A49, 0x0A4A}, {0x0A4E, 0x0A50},
+ {0x0A52, 0x0A58}, {0x0A5D, 0x0A5D}, {0x0A5F, 0x0A65},
+ {0x0A76, 0x0A80}, {0x0A84, 0x0A84}, {0x0A8E, 0x0A8E},
+ {0x0A92, 0x0A92}, {0x0AA9, 0x0AA9}, {0x0AB1, 0x0AB1},
+ {0x0AB4, 0x0AB4}, {0x0ABA, 0x0ABB}, {0x0AC6, 0x0AC6},
+ {0x0ACA, 0x0ACA}, {0x0ACE, 0x0ACF}, {0x0AD1, 0x0ADF},
+ {0x0AE4, 0x0AE5}, {0x0AF2, 0x0AF8}, {0x0AFA, 0x0B00},
+ {0x0B04, 0x0B04}, {0x0B0D, 0x0B0E}, {0x0B11, 0x0B12},
+ {0x0B29, 0x0B29}, {0x0B31, 0x0B31}, {0x0B34, 0x0B34},
+ {0x0B3A, 0x0B3B}, {0x0B45, 0x0B46}, {0x0B49, 0x0B4A},
+ {0x0B4E, 0x0B55}, {0x0B58, 0x0B5B}, {0x0B5E, 0x0B5E},
+ {0x0B64, 0x0B65}, {0x0B78, 0x0B81}, {0x0B84, 0x0B84},
+ {0x0B8B, 0x0B8D}, {0x0B91, 0x0B91}, {0x0B96, 0x0B98},
+ {0x0B9B, 0x0B9B}, {0x0B9D, 0x0B9D}, {0x0BA0, 0x0BA2},
+ {0x0BA5, 0x0BA7}, {0x0BAB, 0x0BAD}, {0x0BBA, 0x0BBD},
+ {0x0BC3, 0x0BC5}, {0x0BC9, 0x0BC9}, {0x0BCE, 0x0BCF},
+ {0x0BD1, 0x0BD6}, {0x0BD8, 0x0BE5}, {0x0BFB, 0x0BFF},
+ {0x0C04, 0x0C04}, {0x0C0D, 0x0C0D}, {0x0C11, 0x0C11},
+ {0x0C29, 0x0C29}, {0x0C3A, 0x0C3C}, {0x0C45, 0x0C45},
+ {0x0C49, 0x0C49}, {0x0C4E, 0x0C54}, {0x0C57, 0x0C57},
+ {0x0C5B, 0x0C5F}, {0x0C64, 0x0C65}, {0x0C70, 0x0C77},
+ {0x0C84, 0x0C84}, {0x0C8D, 0x0C8D}, {0x0C91, 0x0C91},
+ {0x0CA9, 0x0CA9}, {0x0CB4, 0x0CB4}, {0x0CBA, 0x0CBB},
+ {0x0CC5, 0x0CC5}, {0x0CC9, 0x0CC9}, {0x0CCE, 0x0CD4},
+ {0x0CD7, 0x0CDD}, {0x0CDF, 0x0CDF}, {0x0CE4, 0x0CE5},
+ {0x0CF0, 0x0CF0}, {0x0CF3, 0x0D00}, {0x0D04, 0x0D04},
+ {0x0D0D, 0x0D0D}, {0x0D11, 0x0D11}, {0x0D3B, 0x0D3C},
+ {0x0D45, 0x0D45}, {0x0D49, 0x0D49}, {0x0D50, 0x0D53},
+ {0x0D64, 0x0D65}, {0x0D80, 0x0D81}, {0x0D84, 0x0D84},
+ {0x0D97, 0x0D99}, {0x0DB2, 0x0DB2}, {0x0DBC, 0x0DBC},
+ {0x0DBE, 0x0DBF}, {0x0DC7, 0x0DC9}, {0x0DCB, 0x0DCE},
+ {0x0DD5, 0x0DD5}, {0x0DD7, 0x0DD7}, {0x0DE0, 0x0DE5},
+ {0x0DF0, 0x0DF1}, {0x0DF5, 0x0E00}, {0x0E3B, 0x0E3E},
+ {0x0E5C, 0x0E80}, {0x0E83, 0x0E83}, {0x0E85, 0x0E86},
+ {0x0E89, 0x0E89}, {0x0E8B, 0x0E8C}, {0x0E8E, 0x0E93},
+ {0x0E98, 0x0E98}, {0x0EA0, 0x0EA0}, {0x0EA4, 0x0EA4},
+ {0x0EA6, 0x0EA6}, {0x0EA8, 0x0EA9}, {0x0EAC, 0x0EAC},
+ {0x0EBA, 0x0EBA}, {0x0EBE, 0x0EBF}, {0x0EC5, 0x0EC5},
+ {0x0EC7, 0x0EC7}, {0x0ECE, 0x0ECF}, {0x0EDA, 0x0EDB},
+ {0x0EE0, 0x0EFF}, {0x0F48, 0x0F48}, {0x0F6D, 0x0F70},
+ {0x0F98, 0x0F98}, {0x0FBD, 0x0FBD}, {0x0FCD, 0x0FCD},
+ {0x0FDB, 0x0FFF}, {0x10C6, 0x10C6}, {0x10C8, 0x10CC},
+ {0x10CE, 0x10CF}, {0x1249, 0x1249}, {0x124E, 0x124F},
+ {0x1257, 0x1257}, {0x1259, 0x1259}, {0x125E, 0x125F},
+ {0x1289, 0x1289}, {0x128E, 0x128F}, {0x12B1, 0x12B1},
+ {0x12B6, 0x12B7}, {0x12BF, 0x12BF}, {0x12C1, 0x12C1},
+ {0x12C6, 0x12C7}, {0x12D7, 0x12D7}, {0x1311, 0x1311},
+ {0x1316, 0x1317}, {0x135B, 0x135C}, {0x137D, 0x137F},
+ {0x139A, 0x139F}, {0x13F6, 0x13F7}, {0x13FE, 0x13FF},
+ {0x169D, 0x169F}, {0x16F9, 0x16FF}, {0x170D, 0x170D},
+ {0x1715, 0x171F}, {0x1737, 0x173F}, {0x1754, 0x175F},
+ {0x176D, 0x176D}, {0x1771, 0x1771}, {0x1774, 0x177F},
+ {0x17DE, 0x17DF}, {0x17EA, 0x17EF}, {0x17FA, 0x17FF},
+ {0x180F, 0x180F}, {0x181A, 0x181F}, {0x1878, 0x187F},
+ {0x18AB, 0x18AF}, {0x18F6, 0x18FF}, {0x191F, 0x191F},
+ {0x192C, 0x192F}, {0x193C, 0x193F}, {0x1941, 0x1943},
+ {0x196E, 0x196F}, {0x1975, 0x197F}, {0x19AC, 0x19AF},
+ {0x19CA, 0x19CF}, {0x19DB, 0x19DD}, {0x1A1C, 0x1A1D},
+ {0x1A5F, 0x1A5F}, {0x1A7D, 0x1A7E}, {0x1A8A, 0x1A8F},
+ {0x1A9A, 0x1A9F}, {0x1AAE, 0x1AAF}, {0x1ABF, 0x1AFF},
+ {0x1B4C, 0x1B4F}, {0x1B7D, 0x1B7F}, {0x1BF4, 0x1BFB},
+ {0x1C38, 0x1C3A}, {0x1C4A, 0x1C4C}, {0x1C89, 0x1CBF},
+ {0x1CC8, 0x1CCF}, {0x1CF7, 0x1CF7}, {0x1CFA, 0x1CFF},
+ {0x1DF6, 0x1DFA}, {0x1F16, 0x1F17}, {0x1F1E, 0x1F1F},
+ {0x1F46, 0x1F47}, {0x1F4E, 0x1F4F}, {0x1F58, 0x1F58},
+ {0x1F5A, 0x1F5A}, {0x1F5C, 0x1F5C}, {0x1F5E, 0x1F5E},
+ {0x1F7E, 0x1F7F}, {0x1FB5, 0x1FB5}, {0x1FC5, 0x1FC5},
+ {0x1FD4, 0x1FD5}, {0x1FDC, 0x1FDC}, {0x1FF0, 0x1FF1},
+ {0x1FF5, 0x1FF5}, {0x1FFF, 0x1FFF}, {0x2065, 0x2065},
+ {0x2072, 0x2073}, {0x208F, 0x208F}, {0x209D, 0x209F},
+ {0x20BF, 0x20CF}, {0x20F1, 0x20FF}, {0x218C, 0x218F},
+ {0x23FF, 0x23FF}, {0x2427, 0x243F}, {0x244B, 0x245F},
+ {0x2B74, 0x2B75}, {0x2B96, 0x2B97}, {0x2BBA, 0x2BBC},
+ {0x2BC9, 0x2BC9}, {0x2BD2, 0x2BEB}, {0x2BF0, 0x2BFF},
+ {0x2C2F, 0x2C2F}, {0x2C5F, 0x2C5F}, {0x2CF4, 0x2CF8},
+ {0x2D26, 0x2D26}, {0x2D28, 0x2D2C}, {0x2D2E, 0x2D2F},
+ {0x2D68, 0x2D6E}, {0x2D71, 0x2D7E}, {0x2D97, 0x2D9F},
+ {0x2DA7, 0x2DA7}, {0x2DAF, 0x2DAF}, {0x2DB7, 0x2DB7},
+ {0x2DBF, 0x2DBF}, {0x2DC7, 0x2DC7}, {0x2DCF, 0x2DCF},
+ {0x2DD7, 0x2DD7}, {0x2DDF, 0x2DDF}, {0x2E45, 0x2E7F},
+ {0x2E9A, 0x2E9A}, {0x2EF4, 0x2EFF}, {0x2FD6, 0x2FEF},
+ {0x2FFC, 0x2FFF}, {0x3040, 0x3040}, {0x3097, 0x3098},
+ {0x3100, 0x3104}, {0x312E, 0x3130}, {0x318F, 0x318F},
+ {0x31BB, 0x31BF}, {0x31E4, 0x31EF}, {0x321F, 0x321F},
+ {0x32FF, 0x32FF}, {0x4DB6, 0x4DBF}, {0x9FD6, 0x9FFF},
+ {0xA48D, 0xA48F}, {0xA4C7, 0xA4CF}, {0xA62C, 0xA63F},
+ {0xA6F8, 0xA6FF}, {0xA7AF, 0xA7AF}, {0xA7B8, 0xA7F6},
+ {0xA82C, 0xA82F}, {0xA83A, 0xA83F}, {0xA878, 0xA87F},
+ {0xA8C6, 0xA8CD}, {0xA8DA, 0xA8DF}, {0xA8FE, 0xA8FF},
+ {0xA954, 0xA95E}, {0xA97D, 0xA97F}, {0xA9CE, 0xA9CE},
+ {0xA9DA, 0xA9DD}, {0xA9FF, 0xA9FF}, {0xAA37, 0xAA3F},
+ {0xAA4E, 0xAA4F}, {0xAA5A, 0xAA5B}, {0xAAC3, 0xAADA},
+ {0xAAF7, 0xAB00}, {0xAB07, 0xAB08}, {0xAB0F, 0xAB10},
+ {0xAB17, 0xAB1F}, {0xAB27, 0xAB27}, {0xAB2F, 0xAB2F},
+ {0xAB66, 0xAB6F}, {0xABEE, 0xABEF}, {0xABFA, 0xABFF},
+ {0xD7A4, 0xD7AF}, {0xD7C7, 0xD7CA}, {0xD7FC, 0xD7FF},
+ {0xFA6E, 0xFA6F}, {0xFADA, 0xFAFF}, {0xFB07, 0xFB12},
+ {0xFB18, 0xFB1C}, {0xFB37, 0xFB37}, {0xFB3D, 0xFB3D},
+ {0xFB3F, 0xFB3F}, {0xFB42, 0xFB42}, {0xFB45, 0xFB45},
+ {0xFBC2, 0xFBD2}, {0xFD40, 0xFD4F}, {0xFD90, 0xFD91},
+ {0xFDC8, 0xFDEF}, {0xFDFE, 0xFDFF}, {0xFE1A, 0xFE1F},
+ {0xFE53, 0xFE53}, {0xFE67, 0xFE67}, {0xFE6C, 0xFE6F},
+ {0xFE75, 0xFE75}, {0xFEFD, 0xFEFE}, {0xFF00, 0xFF00},
+ {0xFFBF, 0xFFC1}, {0xFFC8, 0xFFC9}, {0xFFD0, 0xFFD1},
+ {0xFFD8, 0xFFD9}, {0xFFDD, 0xFFDF}, {0xFFE7, 0xFFE7},
+ {0xFFEF, 0xFFF8}, {0xFFFE, 0xFFFF}, {0x1000C, 0x1000C},
+ {0x10027, 0x10027}, {0x1003B, 0x1003B}, {0x1003E, 0x1003E},
+ {0x1004E, 0x1004F}, {0x1005E, 0x1007F}, {0x100FB, 0x100FF},
+ {0x10103, 0x10106}, {0x10134, 0x10136}, {0x1018F, 0x1018F},
+ {0x1019C, 0x1019F}, {0x101A1, 0x101CF}, {0x101FE, 0x1027F},
+ {0x1029D, 0x1029F}, {0x102D1, 0x102DF}, {0x102FC, 0x102FF},
+ {0x10324, 0x1032F}, {0x1034B, 0x1034F}, {0x1037B, 0x1037F},
+ {0x1039E, 0x1039E}, {0x103C4, 0x103C7}, {0x103D6, 0x103FF},
+ {0x1049E, 0x1049F}, {0x104AA, 0x104AF}, {0x104D4, 0x104D7},
+ {0x104FC, 0x104FF}, {0x10528, 0x1052F}, {0x10564, 0x1056E},
+ {0x10570, 0x105FF}, {0x10737, 0x1073F}, {0x10756, 0x1075F},
+ {0x10768, 0x107FF}, {0x10806, 0x10807}, {0x10809, 0x10809},
+ {0x10836, 0x10836}, {0x10839, 0x1083B}, {0x1083D, 0x1083E},
+ {0x10856, 0x10856}, {0x1089F, 0x108A6}, {0x108B0, 0x108DF},
+ {0x108F3, 0x108F3}, {0x108F6, 0x108FA}, {0x1091C, 0x1091E},
+ {0x1093A, 0x1093E}, {0x10940, 0x1097F}, {0x109B8, 0x109BB},
+ {0x109D0, 0x109D1}, {0x10A04, 0x10A04}, {0x10A07, 0x10A0B},
+ {0x10A14, 0x10A14}, {0x10A18, 0x10A18}, {0x10A34, 0x10A37},
+ {0x10A3B, 0x10A3E}, {0x10A48, 0x10A4F}, {0x10A59, 0x10A5F},
+ {0x10AA0, 0x10ABF}, {0x10AE7, 0x10AEA}, {0x10AF7, 0x10AFF},
+ {0x10B36, 0x10B38}, {0x10B56, 0x10B57}, {0x10B73, 0x10B77},
+ {0x10B92, 0x10B98}, {0x10B9D, 0x10BA8}, {0x10BB0, 0x10BFF},
+ {0x10C49, 0x10C7F}, {0x10CB3, 0x10CBF}, {0x10CF3, 0x10CF9},
+ {0x10D00, 0x10E5F}, {0x10E7F, 0x10FFF}, {0x1104E, 0x11051},
+ {0x11070, 0x1107E}, {0x110C2, 0x110CF}, {0x110E9, 0x110EF},
+ {0x110FA, 0x110FF}, {0x11135, 0x11135}, {0x11144, 0x1114F},
+ {0x11177, 0x1117F}, {0x111CE, 0x111CF}, {0x111E0, 0x111E0},
+ {0x111F5, 0x111FF}, {0x11212, 0x11212}, {0x1123F, 0x1127F},
+ {0x11287, 0x11287}, {0x11289, 0x11289}, {0x1128E, 0x1128E},
+ {0x1129E, 0x1129E}, {0x112AA, 0x112AF}, {0x112EB, 0x112EF},
+ {0x112FA, 0x112FF}, {0x11304, 0x11304}, {0x1130D, 0x1130E},
+ {0x11311, 0x11312}, {0x11329, 0x11329}, {0x11331, 0x11331},
+ {0x11334, 0x11334}, {0x1133A, 0x1133B}, {0x11345, 0x11346},
+ {0x11349, 0x1134A}, {0x1134E, 0x1134F}, {0x11351, 0x11356},
+ {0x11358, 0x1135C}, {0x11364, 0x11365}, {0x1136D, 0x1136F},
+ {0x11375, 0x113FF}, {0x1145A, 0x1145A}, {0x1145C, 0x1145C},
+ {0x1145E, 0x1147F}, {0x114C8, 0x114CF}, {0x114DA, 0x1157F},
+ {0x115B6, 0x115B7}, {0x115DE, 0x115FF}, {0x11645, 0x1164F},
+ {0x1165A, 0x1165F}, {0x1166D, 0x1167F}, {0x116B8, 0x116BF},
+ {0x116CA, 0x116FF}, {0x1171A, 0x1171C}, {0x1172C, 0x1172F},
+ {0x11740, 0x1189F}, {0x118F3, 0x118FE}, {0x11900, 0x11ABF},
+ {0x11AF9, 0x11BFF}, {0x11C09, 0x11C09}, {0x11C37, 0x11C37},
+ {0x11C46, 0x11C4F}, {0x11C6D, 0x11C6F}, {0x11C90, 0x11C91},
+ {0x11CA8, 0x11CA8}, {0x11CB7, 0x11FFF}, {0x1239A, 0x123FF},
+ {0x1246F, 0x1246F}, {0x12475, 0x1247F}, {0x12544, 0x12FFF},
+ {0x1342F, 0x143FF}, {0x14647, 0x167FF}, {0x16A39, 0x16A3F},
+ {0x16A5F, 0x16A5F}, {0x16A6A, 0x16A6D}, {0x16A70, 0x16ACF},
+ {0x16AEE, 0x16AEF}, {0x16AF6, 0x16AFF}, {0x16B46, 0x16B4F},
+ {0x16B5A, 0x16B5A}, {0x16B62, 0x16B62}, {0x16B78, 0x16B7C},
+ {0x16B90, 0x16EFF}, {0x16F45, 0x16F4F}, {0x16F7F, 0x16F8E},
+ {0x16FA0, 0x16FDF}, {0x16FE1, 0x16FFF}, {0x187ED, 0x187FF},
+ {0x18AF3, 0x1AFFF}, {0x1B002, 0x1BBFF}, {0x1BC6B, 0x1BC6F},
+ {0x1BC7D, 0x1BC7F}, {0x1BC89, 0x1BC8F}, {0x1BC9A, 0x1BC9B},
+ {0x1BCA4, 0x1CFFF}, {0x1D0F6, 0x1D0FF}, {0x1D127, 0x1D128},
+ {0x1D1E9, 0x1D1FF}, {0x1D246, 0x1D2FF}, {0x1D357, 0x1D35F},
+ {0x1D372, 0x1D3FF}, {0x1D455, 0x1D455}, {0x1D49D, 0x1D49D},
+ {0x1D4A0, 0x1D4A1}, {0x1D4A3, 0x1D4A4}, {0x1D4A7, 0x1D4A8},
+ {0x1D4AD, 0x1D4AD}, {0x1D4BA, 0x1D4BA}, {0x1D4BC, 0x1D4BC},
+ {0x1D4C4, 0x1D4C4}, {0x1D506, 0x1D506}, {0x1D50B, 0x1D50C},
+ {0x1D515, 0x1D515}, {0x1D51D, 0x1D51D}, {0x1D53A, 0x1D53A},
+ {0x1D53F, 0x1D53F}, {0x1D545, 0x1D545}, {0x1D547, 0x1D549},
+ {0x1D551, 0x1D551}, {0x1D6A6, 0x1D6A7}, {0x1D7CC, 0x1D7CD},
+ {0x1DA8C, 0x1DA9A}, {0x1DAA0, 0x1DAA0}, {0x1DAB0, 0x1DFFF},
+ {0x1E007, 0x1E007}, {0x1E019, 0x1E01A}, {0x1E022, 0x1E022},
+ {0x1E025, 0x1E025}, {0x1E02B, 0x1E7FF}, {0x1E8C5, 0x1E8C6},
+ {0x1E8D7, 0x1E8FF}, {0x1E94B, 0x1E94F}, {0x1E95A, 0x1E95D},
+ {0x1E960, 0x1EDFF}, {0x1EE04, 0x1EE04}, {0x1EE20, 0x1EE20},
+ {0x1EE23, 0x1EE23}, {0x1EE25, 0x1EE26}, {0x1EE28, 0x1EE28},
+ {0x1EE33, 0x1EE33}, {0x1EE38, 0x1EE38}, {0x1EE3A, 0x1EE3A},
+ {0x1EE3C, 0x1EE41}, {0x1EE43, 0x1EE46}, {0x1EE48, 0x1EE48},
+ {0x1EE4A, 0x1EE4A}, {0x1EE4C, 0x1EE4C}, {0x1EE50, 0x1EE50},
+ {0x1EE53, 0x1EE53}, {0x1EE55, 0x1EE56}, {0x1EE58, 0x1EE58},
+ {0x1EE5A, 0x1EE5A}, {0x1EE5C, 0x1EE5C}, {0x1EE5E, 0x1EE5E},
+ {0x1EE60, 0x1EE60}, {0x1EE63, 0x1EE63}, {0x1EE65, 0x1EE66},
+ {0x1EE6B, 0x1EE6B}, {0x1EE73, 0x1EE73}, {0x1EE78, 0x1EE78},
+ {0x1EE7D, 0x1EE7D}, {0x1EE7F, 0x1EE7F}, {0x1EE8A, 0x1EE8A},
+ {0x1EE9C, 0x1EEA0}, {0x1EEA4, 0x1EEA4}, {0x1EEAA, 0x1EEAA},
+ {0x1EEBC, 0x1EEEF}, {0x1EEF2, 0x1EFFF}, {0x1F02C, 0x1F02F},
+ {0x1F094, 0x1F09F}, {0x1F0AF, 0x1F0B0}, {0x1F0C0, 0x1F0C0},
+ {0x1F0D0, 0x1F0D0}, {0x1F0F6, 0x1F0FF}, {0x1F10D, 0x1F10F},
+ {0x1F12F, 0x1F12F}, {0x1F16C, 0x1F16F}, {0x1F1AD, 0x1F1E5},
+ {0x1F203, 0x1F20F}, {0x1F23C, 0x1F23F}, {0x1F249, 0x1F24F},
+ {0x1F252, 0x1F2FF}, {0x1F6D3, 0x1F6DF}, {0x1F6ED, 0x1F6EF},
+ {0x1F6F7, 0x1F6FF}, {0x1F774, 0x1F77F}, {0x1F7D5, 0x1F7FF},
+ {0x1F80C, 0x1F80F}, {0x1F848, 0x1F84F}, {0x1F85A, 0x1F85F},
+ {0x1F888, 0x1F88F}, {0x1F8AE, 0x1F90F}, {0x1F91F, 0x1F91F},
+ {0x1F928, 0x1F92F}, {0x1F931, 0x1F932}, {0x1F93F, 0x1F93F},
+ {0x1F94C, 0x1F94F}, {0x1F95F, 0x1F97F}, {0x1F992, 0x1F9BF},
+ {0x1F9C1, 0x1FFFF}, {0x2A6D7, 0x2A6FF}, {0x2B735, 0x2B73F},
+ {0x2B81E, 0x2B81F}, {0x2CEA2, 0x2F7FF}, {0x2FA1E, 0xE0000},
+ {0xE0002, 0xE001F}, {0xE0080, 0xE00FF}, {0xE01F0, 0xEFFFF},
+ {0xFFFFE, 0xFFFFF},
+}
+
+var neutral = table{
+ {0x0000, 0x001F}, {0x007F, 0x007F}, {0x0080, 0x009F},
+ {0x00A0, 0x00A0}, {0x00A9, 0x00A9}, {0x00AB, 0x00AB},
+ {0x00B5, 0x00B5}, {0x00BB, 0x00BB}, {0x00C0, 0x00C5},
+ {0x00C7, 0x00CF}, {0x00D1, 0x00D6}, {0x00D9, 0x00DD},
+ {0x00E2, 0x00E5}, {0x00E7, 0x00E7}, {0x00EB, 0x00EB},
+ {0x00EE, 0x00EF}, {0x00F1, 0x00F1}, {0x00F4, 0x00F6},
+ {0x00FB, 0x00FB}, {0x00FD, 0x00FD}, {0x00FF, 0x00FF},
+ {0x0100, 0x0100}, {0x0102, 0x0110}, {0x0112, 0x0112},
+ {0x0114, 0x011A}, {0x011C, 0x0125}, {0x0128, 0x012A},
+ {0x012C, 0x0130}, {0x0134, 0x0137}, {0x0139, 0x013E},
+ {0x0143, 0x0143}, {0x0145, 0x0147}, {0x014C, 0x014C},
+ {0x014E, 0x0151}, {0x0154, 0x0165}, {0x0168, 0x016A},
+ {0x016C, 0x017F}, {0x0180, 0x01BA}, {0x01BB, 0x01BB},
+ {0x01BC, 0x01BF}, {0x01C0, 0x01C3}, {0x01C4, 0x01CD},
+ {0x01CF, 0x01CF}, {0x01D1, 0x01D1}, {0x01D3, 0x01D3},
+ {0x01D5, 0x01D5}, {0x01D7, 0x01D7}, {0x01D9, 0x01D9},
+ {0x01DB, 0x01DB}, {0x01DD, 0x024F}, {0x0250, 0x0250},
+ {0x0252, 0x0260}, {0x0262, 0x0293}, {0x0294, 0x0294},
+ {0x0295, 0x02AF}, {0x02B0, 0x02C1}, {0x02C2, 0x02C3},
+ {0x02C5, 0x02C5}, {0x02C6, 0x02C6}, {0x02C8, 0x02C8},
+ {0x02CC, 0x02CC}, {0x02CE, 0x02CF}, {0x02D1, 0x02D1},
+ {0x02D2, 0x02D7}, {0x02DC, 0x02DC}, {0x02DE, 0x02DE},
+ {0x02E0, 0x02E4}, {0x02E5, 0x02EB}, {0x02EC, 0x02EC},
+ {0x02ED, 0x02ED}, {0x02EE, 0x02EE}, {0x02EF, 0x02FF},
+ {0x0370, 0x0373}, {0x0374, 0x0374}, {0x0375, 0x0375},
+ {0x0376, 0x0377}, {0x037A, 0x037A}, {0x037B, 0x037D},
+ {0x037E, 0x037E}, {0x037F, 0x037F}, {0x0384, 0x0385},
+ {0x0386, 0x0386}, {0x0387, 0x0387}, {0x0388, 0x038A},
+ {0x038C, 0x038C}, {0x038E, 0x0390}, {0x03AA, 0x03B0},
+ {0x03C2, 0x03C2}, {0x03CA, 0x03F5}, {0x03F6, 0x03F6},
+ {0x03F7, 0x03FF}, {0x0400, 0x0400}, {0x0402, 0x040F},
+ {0x0450, 0x0450}, {0x0452, 0x0481}, {0x0482, 0x0482},
+ {0x0483, 0x0487}, {0x0488, 0x0489}, {0x048A, 0x04FF},
+ {0x0500, 0x052F}, {0x0531, 0x0556}, {0x0559, 0x0559},
+ {0x055A, 0x055F}, {0x0561, 0x0587}, {0x0589, 0x0589},
+ {0x058A, 0x058A}, {0x058D, 0x058E}, {0x058F, 0x058F},
+ {0x0591, 0x05BD}, {0x05BE, 0x05BE}, {0x05BF, 0x05BF},
+ {0x05C0, 0x05C0}, {0x05C1, 0x05C2}, {0x05C3, 0x05C3},
+ {0x05C4, 0x05C5}, {0x05C6, 0x05C6}, {0x05C7, 0x05C7},
+ {0x05D0, 0x05EA}, {0x05F0, 0x05F2}, {0x05F3, 0x05F4},
+ {0x0600, 0x0605}, {0x0606, 0x0608}, {0x0609, 0x060A},
+ {0x060B, 0x060B}, {0x060C, 0x060D}, {0x060E, 0x060F},
+ {0x0610, 0x061A}, {0x061B, 0x061B}, {0x061C, 0x061C},
+ {0x061E, 0x061F}, {0x0620, 0x063F}, {0x0640, 0x0640},
+ {0x0641, 0x064A}, {0x064B, 0x065F}, {0x0660, 0x0669},
+ {0x066A, 0x066D}, {0x066E, 0x066F}, {0x0670, 0x0670},
+ {0x0671, 0x06D3}, {0x06D4, 0x06D4}, {0x06D5, 0x06D5},
+ {0x06D6, 0x06DC}, {0x06DD, 0x06DD}, {0x06DE, 0x06DE},
+ {0x06DF, 0x06E4}, {0x06E5, 0x06E6}, {0x06E7, 0x06E8},
+ {0x06E9, 0x06E9}, {0x06EA, 0x06ED}, {0x06EE, 0x06EF},
+ {0x06F0, 0x06F9}, {0x06FA, 0x06FC}, {0x06FD, 0x06FE},
+ {0x06FF, 0x06FF}, {0x0700, 0x070D}, {0x070F, 0x070F},
+ {0x0710, 0x0710}, {0x0711, 0x0711}, {0x0712, 0x072F},
+ {0x0730, 0x074A}, {0x074D, 0x074F}, {0x0750, 0x077F},
+ {0x0780, 0x07A5}, {0x07A6, 0x07B0}, {0x07B1, 0x07B1},
+ {0x07C0, 0x07C9}, {0x07CA, 0x07EA}, {0x07EB, 0x07F3},
+ {0x07F4, 0x07F5}, {0x07F6, 0x07F6}, {0x07F7, 0x07F9},
+ {0x07FA, 0x07FA}, {0x0800, 0x0815}, {0x0816, 0x0819},
+ {0x081A, 0x081A}, {0x081B, 0x0823}, {0x0824, 0x0824},
+ {0x0825, 0x0827}, {0x0828, 0x0828}, {0x0829, 0x082D},
+ {0x0830, 0x083E}, {0x0840, 0x0858}, {0x0859, 0x085B},
+ {0x085E, 0x085E}, {0x08A0, 0x08B4}, {0x08B6, 0x08BD},
+ {0x08D4, 0x08E1}, {0x08E2, 0x08E2}, {0x08E3, 0x08FF},
+ {0x0900, 0x0902}, {0x0903, 0x0903}, {0x0904, 0x0939},
+ {0x093A, 0x093A}, {0x093B, 0x093B}, {0x093C, 0x093C},
+ {0x093D, 0x093D}, {0x093E, 0x0940}, {0x0941, 0x0948},
+ {0x0949, 0x094C}, {0x094D, 0x094D}, {0x094E, 0x094F},
+ {0x0950, 0x0950}, {0x0951, 0x0957}, {0x0958, 0x0961},
+ {0x0962, 0x0963}, {0x0964, 0x0965}, {0x0966, 0x096F},
+ {0x0970, 0x0970}, {0x0971, 0x0971}, {0x0972, 0x097F},
+ {0x0980, 0x0980}, {0x0981, 0x0981}, {0x0982, 0x0983},
+ {0x0985, 0x098C}, {0x098F, 0x0990}, {0x0993, 0x09A8},
+ {0x09AA, 0x09B0}, {0x09B2, 0x09B2}, {0x09B6, 0x09B9},
+ {0x09BC, 0x09BC}, {0x09BD, 0x09BD}, {0x09BE, 0x09C0},
+ {0x09C1, 0x09C4}, {0x09C7, 0x09C8}, {0x09CB, 0x09CC},
+ {0x09CD, 0x09CD}, {0x09CE, 0x09CE}, {0x09D7, 0x09D7},
+ {0x09DC, 0x09DD}, {0x09DF, 0x09E1}, {0x09E2, 0x09E3},
+ {0x09E6, 0x09EF}, {0x09F0, 0x09F1}, {0x09F2, 0x09F3},
+ {0x09F4, 0x09F9}, {0x09FA, 0x09FA}, {0x09FB, 0x09FB},
+ {0x0A01, 0x0A02}, {0x0A03, 0x0A03}, {0x0A05, 0x0A0A},
+ {0x0A0F, 0x0A10}, {0x0A13, 0x0A28}, {0x0A2A, 0x0A30},
+ {0x0A32, 0x0A33}, {0x0A35, 0x0A36}, {0x0A38, 0x0A39},
+ {0x0A3C, 0x0A3C}, {0x0A3E, 0x0A40}, {0x0A41, 0x0A42},
+ {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, {0x0A51, 0x0A51},
+ {0x0A59, 0x0A5C}, {0x0A5E, 0x0A5E}, {0x0A66, 0x0A6F},
+ {0x0A70, 0x0A71}, {0x0A72, 0x0A74}, {0x0A75, 0x0A75},
+ {0x0A81, 0x0A82}, {0x0A83, 0x0A83}, {0x0A85, 0x0A8D},
+ {0x0A8F, 0x0A91}, {0x0A93, 0x0AA8}, {0x0AAA, 0x0AB0},
+ {0x0AB2, 0x0AB3}, {0x0AB5, 0x0AB9}, {0x0ABC, 0x0ABC},
+ {0x0ABD, 0x0ABD}, {0x0ABE, 0x0AC0}, {0x0AC1, 0x0AC5},
+ {0x0AC7, 0x0AC8}, {0x0AC9, 0x0AC9}, {0x0ACB, 0x0ACC},
+ {0x0ACD, 0x0ACD}, {0x0AD0, 0x0AD0}, {0x0AE0, 0x0AE1},
+ {0x0AE2, 0x0AE3}, {0x0AE6, 0x0AEF}, {0x0AF0, 0x0AF0},
+ {0x0AF1, 0x0AF1}, {0x0AF9, 0x0AF9}, {0x0B01, 0x0B01},
+ {0x0B02, 0x0B03}, {0x0B05, 0x0B0C}, {0x0B0F, 0x0B10},
+ {0x0B13, 0x0B28}, {0x0B2A, 0x0B30}, {0x0B32, 0x0B33},
+ {0x0B35, 0x0B39}, {0x0B3C, 0x0B3C}, {0x0B3D, 0x0B3D},
+ {0x0B3E, 0x0B3E}, {0x0B3F, 0x0B3F}, {0x0B40, 0x0B40},
+ {0x0B41, 0x0B44}, {0x0B47, 0x0B48}, {0x0B4B, 0x0B4C},
+ {0x0B4D, 0x0B4D}, {0x0B56, 0x0B56}, {0x0B57, 0x0B57},
+ {0x0B5C, 0x0B5D}, {0x0B5F, 0x0B61}, {0x0B62, 0x0B63},
+ {0x0B66, 0x0B6F}, {0x0B70, 0x0B70}, {0x0B71, 0x0B71},
+ {0x0B72, 0x0B77}, {0x0B82, 0x0B82}, {0x0B83, 0x0B83},
+ {0x0B85, 0x0B8A}, {0x0B8E, 0x0B90}, {0x0B92, 0x0B95},
+ {0x0B99, 0x0B9A}, {0x0B9C, 0x0B9C}, {0x0B9E, 0x0B9F},
+ {0x0BA3, 0x0BA4}, {0x0BA8, 0x0BAA}, {0x0BAE, 0x0BB9},
+ {0x0BBE, 0x0BBF}, {0x0BC0, 0x0BC0}, {0x0BC1, 0x0BC2},
+ {0x0BC6, 0x0BC8}, {0x0BCA, 0x0BCC}, {0x0BCD, 0x0BCD},
+ {0x0BD0, 0x0BD0}, {0x0BD7, 0x0BD7}, {0x0BE6, 0x0BEF},
+ {0x0BF0, 0x0BF2}, {0x0BF3, 0x0BF8}, {0x0BF9, 0x0BF9},
+ {0x0BFA, 0x0BFA}, {0x0C00, 0x0C00}, {0x0C01, 0x0C03},
+ {0x0C05, 0x0C0C}, {0x0C0E, 0x0C10}, {0x0C12, 0x0C28},
+ {0x0C2A, 0x0C39}, {0x0C3D, 0x0C3D}, {0x0C3E, 0x0C40},
+ {0x0C41, 0x0C44}, {0x0C46, 0x0C48}, {0x0C4A, 0x0C4D},
+ {0x0C55, 0x0C56}, {0x0C58, 0x0C5A}, {0x0C60, 0x0C61},
+ {0x0C62, 0x0C63}, {0x0C66, 0x0C6F}, {0x0C78, 0x0C7E},
+ {0x0C7F, 0x0C7F}, {0x0C80, 0x0C80}, {0x0C81, 0x0C81},
+ {0x0C82, 0x0C83}, {0x0C85, 0x0C8C}, {0x0C8E, 0x0C90},
+ {0x0C92, 0x0CA8}, {0x0CAA, 0x0CB3}, {0x0CB5, 0x0CB9},
+ {0x0CBC, 0x0CBC}, {0x0CBD, 0x0CBD}, {0x0CBE, 0x0CBE},
+ {0x0CBF, 0x0CBF}, {0x0CC0, 0x0CC4}, {0x0CC6, 0x0CC6},
+ {0x0CC7, 0x0CC8}, {0x0CCA, 0x0CCB}, {0x0CCC, 0x0CCD},
+ {0x0CD5, 0x0CD6}, {0x0CDE, 0x0CDE}, {0x0CE0, 0x0CE1},
+ {0x0CE2, 0x0CE3}, {0x0CE6, 0x0CEF}, {0x0CF1, 0x0CF2},
+ {0x0D01, 0x0D01}, {0x0D02, 0x0D03}, {0x0D05, 0x0D0C},
+ {0x0D0E, 0x0D10}, {0x0D12, 0x0D3A}, {0x0D3D, 0x0D3D},
+ {0x0D3E, 0x0D40}, {0x0D41, 0x0D44}, {0x0D46, 0x0D48},
+ {0x0D4A, 0x0D4C}, {0x0D4D, 0x0D4D}, {0x0D4E, 0x0D4E},
+ {0x0D4F, 0x0D4F}, {0x0D54, 0x0D56}, {0x0D57, 0x0D57},
+ {0x0D58, 0x0D5E}, {0x0D5F, 0x0D61}, {0x0D62, 0x0D63},
+ {0x0D66, 0x0D6F}, {0x0D70, 0x0D78}, {0x0D79, 0x0D79},
+ {0x0D7A, 0x0D7F}, {0x0D82, 0x0D83}, {0x0D85, 0x0D96},
+ {0x0D9A, 0x0DB1}, {0x0DB3, 0x0DBB}, {0x0DBD, 0x0DBD},
+ {0x0DC0, 0x0DC6}, {0x0DCA, 0x0DCA}, {0x0DCF, 0x0DD1},
+ {0x0DD2, 0x0DD4}, {0x0DD6, 0x0DD6}, {0x0DD8, 0x0DDF},
+ {0x0DE6, 0x0DEF}, {0x0DF2, 0x0DF3}, {0x0DF4, 0x0DF4},
+ {0x0E01, 0x0E30}, {0x0E31, 0x0E31}, {0x0E32, 0x0E33},
+ {0x0E34, 0x0E3A}, {0x0E3F, 0x0E3F}, {0x0E40, 0x0E45},
+ {0x0E46, 0x0E46}, {0x0E47, 0x0E4E}, {0x0E4F, 0x0E4F},
+ {0x0E50, 0x0E59}, {0x0E5A, 0x0E5B}, {0x0E81, 0x0E82},
+ {0x0E84, 0x0E84}, {0x0E87, 0x0E88}, {0x0E8A, 0x0E8A},
+ {0x0E8D, 0x0E8D}, {0x0E94, 0x0E97}, {0x0E99, 0x0E9F},
+ {0x0EA1, 0x0EA3}, {0x0EA5, 0x0EA5}, {0x0EA7, 0x0EA7},
+ {0x0EAA, 0x0EAB}, {0x0EAD, 0x0EB0}, {0x0EB1, 0x0EB1},
+ {0x0EB2, 0x0EB3}, {0x0EB4, 0x0EB9}, {0x0EBB, 0x0EBC},
+ {0x0EBD, 0x0EBD}, {0x0EC0, 0x0EC4}, {0x0EC6, 0x0EC6},
+ {0x0EC8, 0x0ECD}, {0x0ED0, 0x0ED9}, {0x0EDC, 0x0EDF},
+ {0x0F00, 0x0F00}, {0x0F01, 0x0F03}, {0x0F04, 0x0F12},
+ {0x0F13, 0x0F13}, {0x0F14, 0x0F14}, {0x0F15, 0x0F17},
+ {0x0F18, 0x0F19}, {0x0F1A, 0x0F1F}, {0x0F20, 0x0F29},
+ {0x0F2A, 0x0F33}, {0x0F34, 0x0F34}, {0x0F35, 0x0F35},
+ {0x0F36, 0x0F36}, {0x0F37, 0x0F37}, {0x0F38, 0x0F38},
+ {0x0F39, 0x0F39}, {0x0F3A, 0x0F3A}, {0x0F3B, 0x0F3B},
+ {0x0F3C, 0x0F3C}, {0x0F3D, 0x0F3D}, {0x0F3E, 0x0F3F},
+ {0x0F40, 0x0F47}, {0x0F49, 0x0F6C}, {0x0F71, 0x0F7E},
+ {0x0F7F, 0x0F7F}, {0x0F80, 0x0F84}, {0x0F85, 0x0F85},
+ {0x0F86, 0x0F87}, {0x0F88, 0x0F8C}, {0x0F8D, 0x0F97},
+ {0x0F99, 0x0FBC}, {0x0FBE, 0x0FC5}, {0x0FC6, 0x0FC6},
+ {0x0FC7, 0x0FCC}, {0x0FCE, 0x0FCF}, {0x0FD0, 0x0FD4},
+ {0x0FD5, 0x0FD8}, {0x0FD9, 0x0FDA}, {0x1000, 0x102A},
+ {0x102B, 0x102C}, {0x102D, 0x1030}, {0x1031, 0x1031},
+ {0x1032, 0x1037}, {0x1038, 0x1038}, {0x1039, 0x103A},
+ {0x103B, 0x103C}, {0x103D, 0x103E}, {0x103F, 0x103F},
+ {0x1040, 0x1049}, {0x104A, 0x104F}, {0x1050, 0x1055},
+ {0x1056, 0x1057}, {0x1058, 0x1059}, {0x105A, 0x105D},
+ {0x105E, 0x1060}, {0x1061, 0x1061}, {0x1062, 0x1064},
+ {0x1065, 0x1066}, {0x1067, 0x106D}, {0x106E, 0x1070},
+ {0x1071, 0x1074}, {0x1075, 0x1081}, {0x1082, 0x1082},
+ {0x1083, 0x1084}, {0x1085, 0x1086}, {0x1087, 0x108C},
+ {0x108D, 0x108D}, {0x108E, 0x108E}, {0x108F, 0x108F},
+ {0x1090, 0x1099}, {0x109A, 0x109C}, {0x109D, 0x109D},
+ {0x109E, 0x109F}, {0x10A0, 0x10C5}, {0x10C7, 0x10C7},
+ {0x10CD, 0x10CD}, {0x10D0, 0x10FA}, {0x10FB, 0x10FB},
+ {0x10FC, 0x10FC}, {0x10FD, 0x10FF}, {0x1160, 0x11FF},
+ {0x1200, 0x1248}, {0x124A, 0x124D}, {0x1250, 0x1256},
+ {0x1258, 0x1258}, {0x125A, 0x125D}, {0x1260, 0x1288},
+ {0x128A, 0x128D}, {0x1290, 0x12B0}, {0x12B2, 0x12B5},
+ {0x12B8, 0x12BE}, {0x12C0, 0x12C0}, {0x12C2, 0x12C5},
+ {0x12C8, 0x12D6}, {0x12D8, 0x1310}, {0x1312, 0x1315},
+ {0x1318, 0x135A}, {0x135D, 0x135F}, {0x1360, 0x1368},
+ {0x1369, 0x137C}, {0x1380, 0x138F}, {0x1390, 0x1399},
+ {0x13A0, 0x13F5}, {0x13F8, 0x13FD}, {0x1400, 0x1400},
+ {0x1401, 0x166C}, {0x166D, 0x166E}, {0x166F, 0x167F},
+ {0x1680, 0x1680}, {0x1681, 0x169A}, {0x169B, 0x169B},
+ {0x169C, 0x169C}, {0x16A0, 0x16EA}, {0x16EB, 0x16ED},
+ {0x16EE, 0x16F0}, {0x16F1, 0x16F8}, {0x1700, 0x170C},
+ {0x170E, 0x1711}, {0x1712, 0x1714}, {0x1720, 0x1731},
+ {0x1732, 0x1734}, {0x1735, 0x1736}, {0x1740, 0x1751},
+ {0x1752, 0x1753}, {0x1760, 0x176C}, {0x176E, 0x1770},
+ {0x1772, 0x1773}, {0x1780, 0x17B3}, {0x17B4, 0x17B5},
+ {0x17B6, 0x17B6}, {0x17B7, 0x17BD}, {0x17BE, 0x17C5},
+ {0x17C6, 0x17C6}, {0x17C7, 0x17C8}, {0x17C9, 0x17D3},
+ {0x17D4, 0x17D6}, {0x17D7, 0x17D7}, {0x17D8, 0x17DA},
+ {0x17DB, 0x17DB}, {0x17DC, 0x17DC}, {0x17DD, 0x17DD},
+ {0x17E0, 0x17E9}, {0x17F0, 0x17F9}, {0x1800, 0x1805},
+ {0x1806, 0x1806}, {0x1807, 0x180A}, {0x180B, 0x180D},
+ {0x180E, 0x180E}, {0x1810, 0x1819}, {0x1820, 0x1842},
+ {0x1843, 0x1843}, {0x1844, 0x1877}, {0x1880, 0x1884},
+ {0x1885, 0x1886}, {0x1887, 0x18A8}, {0x18A9, 0x18A9},
+ {0x18AA, 0x18AA}, {0x18B0, 0x18F5}, {0x1900, 0x191E},
+ {0x1920, 0x1922}, {0x1923, 0x1926}, {0x1927, 0x1928},
+ {0x1929, 0x192B}, {0x1930, 0x1931}, {0x1932, 0x1932},
+ {0x1933, 0x1938}, {0x1939, 0x193B}, {0x1940, 0x1940},
+ {0x1944, 0x1945}, {0x1946, 0x194F}, {0x1950, 0x196D},
+ {0x1970, 0x1974}, {0x1980, 0x19AB}, {0x19B0, 0x19C9},
+ {0x19D0, 0x19D9}, {0x19DA, 0x19DA}, {0x19DE, 0x19DF},
+ {0x19E0, 0x19FF}, {0x1A00, 0x1A16}, {0x1A17, 0x1A18},
+ {0x1A19, 0x1A1A}, {0x1A1B, 0x1A1B}, {0x1A1E, 0x1A1F},
+ {0x1A20, 0x1A54}, {0x1A55, 0x1A55}, {0x1A56, 0x1A56},
+ {0x1A57, 0x1A57}, {0x1A58, 0x1A5E}, {0x1A60, 0x1A60},
+ {0x1A61, 0x1A61}, {0x1A62, 0x1A62}, {0x1A63, 0x1A64},
+ {0x1A65, 0x1A6C}, {0x1A6D, 0x1A72}, {0x1A73, 0x1A7C},
+ {0x1A7F, 0x1A7F}, {0x1A80, 0x1A89}, {0x1A90, 0x1A99},
+ {0x1AA0, 0x1AA6}, {0x1AA7, 0x1AA7}, {0x1AA8, 0x1AAD},
+ {0x1AB0, 0x1ABD}, {0x1ABE, 0x1ABE}, {0x1B00, 0x1B03},
+ {0x1B04, 0x1B04}, {0x1B05, 0x1B33}, {0x1B34, 0x1B34},
+ {0x1B35, 0x1B35}, {0x1B36, 0x1B3A}, {0x1B3B, 0x1B3B},
+ {0x1B3C, 0x1B3C}, {0x1B3D, 0x1B41}, {0x1B42, 0x1B42},
+ {0x1B43, 0x1B44}, {0x1B45, 0x1B4B}, {0x1B50, 0x1B59},
+ {0x1B5A, 0x1B60}, {0x1B61, 0x1B6A}, {0x1B6B, 0x1B73},
+ {0x1B74, 0x1B7C}, {0x1B80, 0x1B81}, {0x1B82, 0x1B82},
+ {0x1B83, 0x1BA0}, {0x1BA1, 0x1BA1}, {0x1BA2, 0x1BA5},
+ {0x1BA6, 0x1BA7}, {0x1BA8, 0x1BA9}, {0x1BAA, 0x1BAA},
+ {0x1BAB, 0x1BAD}, {0x1BAE, 0x1BAF}, {0x1BB0, 0x1BB9},
+ {0x1BBA, 0x1BBF}, {0x1BC0, 0x1BE5}, {0x1BE6, 0x1BE6},
+ {0x1BE7, 0x1BE7}, {0x1BE8, 0x1BE9}, {0x1BEA, 0x1BEC},
+ {0x1BED, 0x1BED}, {0x1BEE, 0x1BEE}, {0x1BEF, 0x1BF1},
+ {0x1BF2, 0x1BF3}, {0x1BFC, 0x1BFF}, {0x1C00, 0x1C23},
+ {0x1C24, 0x1C2B}, {0x1C2C, 0x1C33}, {0x1C34, 0x1C35},
+ {0x1C36, 0x1C37}, {0x1C3B, 0x1C3F}, {0x1C40, 0x1C49},
+ {0x1C4D, 0x1C4F}, {0x1C50, 0x1C59}, {0x1C5A, 0x1C77},
+ {0x1C78, 0x1C7D}, {0x1C7E, 0x1C7F}, {0x1C80, 0x1C88},
+ {0x1CC0, 0x1CC7}, {0x1CD0, 0x1CD2}, {0x1CD3, 0x1CD3},
+ {0x1CD4, 0x1CE0}, {0x1CE1, 0x1CE1}, {0x1CE2, 0x1CE8},
+ {0x1CE9, 0x1CEC}, {0x1CED, 0x1CED}, {0x1CEE, 0x1CF1},
+ {0x1CF2, 0x1CF3}, {0x1CF4, 0x1CF4}, {0x1CF5, 0x1CF6},
+ {0x1CF8, 0x1CF9}, {0x1D00, 0x1D2B}, {0x1D2C, 0x1D6A},
+ {0x1D6B, 0x1D77}, {0x1D78, 0x1D78}, {0x1D79, 0x1D7F},
+ {0x1D80, 0x1D9A}, {0x1D9B, 0x1DBF}, {0x1DC0, 0x1DF5},
+ {0x1DFB, 0x1DFF}, {0x1E00, 0x1EFF}, {0x1F00, 0x1F15},
+ {0x1F18, 0x1F1D}, {0x1F20, 0x1F45}, {0x1F48, 0x1F4D},
+ {0x1F50, 0x1F57}, {0x1F59, 0x1F59}, {0x1F5B, 0x1F5B},
+ {0x1F5D, 0x1F5D}, {0x1F5F, 0x1F7D}, {0x1F80, 0x1FB4},
+ {0x1FB6, 0x1FBC}, {0x1FBD, 0x1FBD}, {0x1FBE, 0x1FBE},
+ {0x1FBF, 0x1FC1}, {0x1FC2, 0x1FC4}, {0x1FC6, 0x1FCC},
+ {0x1FCD, 0x1FCF}, {0x1FD0, 0x1FD3}, {0x1FD6, 0x1FDB},
+ {0x1FDD, 0x1FDF}, {0x1FE0, 0x1FEC}, {0x1FED, 0x1FEF},
+ {0x1FF2, 0x1FF4}, {0x1FF6, 0x1FFC}, {0x1FFD, 0x1FFE},
+ {0x2000, 0x200A}, {0x200B, 0x200F}, {0x2011, 0x2012},
+ {0x2017, 0x2017}, {0x201A, 0x201A}, {0x201B, 0x201B},
+ {0x201E, 0x201E}, {0x201F, 0x201F}, {0x2023, 0x2023},
+ {0x2028, 0x2028}, {0x2029, 0x2029}, {0x202A, 0x202E},
+ {0x202F, 0x202F}, {0x2031, 0x2031}, {0x2034, 0x2034},
+ {0x2036, 0x2038}, {0x2039, 0x2039}, {0x203A, 0x203A},
+ {0x203C, 0x203D}, {0x203F, 0x2040}, {0x2041, 0x2043},
+ {0x2044, 0x2044}, {0x2045, 0x2045}, {0x2046, 0x2046},
+ {0x2047, 0x2051}, {0x2052, 0x2052}, {0x2053, 0x2053},
+ {0x2054, 0x2054}, {0x2055, 0x205E}, {0x205F, 0x205F},
+ {0x2060, 0x2064}, {0x2066, 0x206F}, {0x2070, 0x2070},
+ {0x2071, 0x2071}, {0x2075, 0x2079}, {0x207A, 0x207C},
+ {0x207D, 0x207D}, {0x207E, 0x207E}, {0x2080, 0x2080},
+ {0x2085, 0x2089}, {0x208A, 0x208C}, {0x208D, 0x208D},
+ {0x208E, 0x208E}, {0x2090, 0x209C}, {0x20A0, 0x20A8},
+ {0x20AA, 0x20AB}, {0x20AD, 0x20BE}, {0x20D0, 0x20DC},
+ {0x20DD, 0x20E0}, {0x20E1, 0x20E1}, {0x20E2, 0x20E4},
+ {0x20E5, 0x20F0}, {0x2100, 0x2101}, {0x2102, 0x2102},
+ {0x2104, 0x2104}, {0x2106, 0x2106}, {0x2107, 0x2107},
+ {0x2108, 0x2108}, {0x210A, 0x2112}, {0x2114, 0x2114},
+ {0x2115, 0x2115}, {0x2117, 0x2117}, {0x2118, 0x2118},
+ {0x2119, 0x211D}, {0x211E, 0x2120}, {0x2123, 0x2123},
+ {0x2124, 0x2124}, {0x2125, 0x2125}, {0x2127, 0x2127},
+ {0x2128, 0x2128}, {0x2129, 0x2129}, {0x212A, 0x212A},
+ {0x212C, 0x212D}, {0x212E, 0x212E}, {0x212F, 0x2134},
+ {0x2135, 0x2138}, {0x2139, 0x2139}, {0x213A, 0x213B},
+ {0x213C, 0x213F}, {0x2140, 0x2144}, {0x2145, 0x2149},
+ {0x214A, 0x214A}, {0x214B, 0x214B}, {0x214C, 0x214D},
+ {0x214E, 0x214E}, {0x214F, 0x214F}, {0x2150, 0x2152},
+ {0x2155, 0x215A}, {0x215F, 0x215F}, {0x216C, 0x216F},
+ {0x217A, 0x2182}, {0x2183, 0x2184}, {0x2185, 0x2188},
+ {0x218A, 0x218B}, {0x219A, 0x219B}, {0x219C, 0x219F},
+ {0x21A0, 0x21A0}, {0x21A1, 0x21A2}, {0x21A3, 0x21A3},
+ {0x21A4, 0x21A5}, {0x21A6, 0x21A6}, {0x21A7, 0x21AD},
+ {0x21AE, 0x21AE}, {0x21AF, 0x21B7}, {0x21BA, 0x21CD},
+ {0x21CE, 0x21CF}, {0x21D0, 0x21D1}, {0x21D3, 0x21D3},
+ {0x21D5, 0x21E6}, {0x21E8, 0x21F3}, {0x21F4, 0x21FF},
+ {0x2201, 0x2201}, {0x2204, 0x2206}, {0x2209, 0x220A},
+ {0x220C, 0x220E}, {0x2210, 0x2210}, {0x2212, 0x2214},
+ {0x2216, 0x2219}, {0x221B, 0x221C}, {0x2221, 0x2222},
+ {0x2224, 0x2224}, {0x2226, 0x2226}, {0x222D, 0x222D},
+ {0x222F, 0x2233}, {0x2238, 0x223B}, {0x223E, 0x2247},
+ {0x2249, 0x224B}, {0x224D, 0x2251}, {0x2253, 0x225F},
+ {0x2262, 0x2263}, {0x2268, 0x2269}, {0x226C, 0x226D},
+ {0x2270, 0x2281}, {0x2284, 0x2285}, {0x2288, 0x2294},
+ {0x2296, 0x2298}, {0x229A, 0x22A4}, {0x22A6, 0x22BE},
+ {0x22C0, 0x22FF}, {0x2300, 0x2307}, {0x2308, 0x2308},
+ {0x2309, 0x2309}, {0x230A, 0x230A}, {0x230B, 0x230B},
+ {0x230C, 0x2311}, {0x2313, 0x2319}, {0x231C, 0x231F},
+ {0x2320, 0x2321}, {0x2322, 0x2328}, {0x232B, 0x237B},
+ {0x237C, 0x237C}, {0x237D, 0x239A}, {0x239B, 0x23B3},
+ {0x23B4, 0x23DB}, {0x23DC, 0x23E1}, {0x23E2, 0x23E8},
+ {0x23ED, 0x23EF}, {0x23F1, 0x23F2}, {0x23F4, 0x23FE},
+ {0x2400, 0x2426}, {0x2440, 0x244A}, {0x24EA, 0x24EA},
+ {0x254C, 0x254F}, {0x2574, 0x257F}, {0x2590, 0x2591},
+ {0x2596, 0x259F}, {0x25A2, 0x25A2}, {0x25AA, 0x25B1},
+ {0x25B4, 0x25B5}, {0x25B8, 0x25BB}, {0x25BE, 0x25BF},
+ {0x25C2, 0x25C5}, {0x25C9, 0x25CA}, {0x25CC, 0x25CD},
+ {0x25D2, 0x25E1}, {0x25E6, 0x25EE}, {0x25F0, 0x25F7},
+ {0x25F8, 0x25FC}, {0x25FF, 0x25FF}, {0x2600, 0x2604},
+ {0x2607, 0x2608}, {0x260A, 0x260D}, {0x2610, 0x2613},
+ {0x2616, 0x261B}, {0x261D, 0x261D}, {0x261F, 0x263F},
+ {0x2641, 0x2641}, {0x2643, 0x2647}, {0x2654, 0x265F},
+ {0x2662, 0x2662}, {0x2666, 0x2666}, {0x266B, 0x266B},
+ {0x266E, 0x266E}, {0x2670, 0x267E}, {0x2680, 0x2692},
+ {0x2694, 0x269D}, {0x26A0, 0x26A0}, {0x26A2, 0x26A9},
+ {0x26AC, 0x26BC}, {0x26C0, 0x26C3}, {0x26E2, 0x26E2},
+ {0x26E4, 0x26E7}, {0x2700, 0x2704}, {0x2706, 0x2709},
+ {0x270C, 0x2727}, {0x2729, 0x273C}, {0x273E, 0x274B},
+ {0x274D, 0x274D}, {0x274F, 0x2752}, {0x2756, 0x2756},
+ {0x2758, 0x2767}, {0x2768, 0x2768}, {0x2769, 0x2769},
+ {0x276A, 0x276A}, {0x276B, 0x276B}, {0x276C, 0x276C},
+ {0x276D, 0x276D}, {0x276E, 0x276E}, {0x276F, 0x276F},
+ {0x2770, 0x2770}, {0x2771, 0x2771}, {0x2772, 0x2772},
+ {0x2773, 0x2773}, {0x2774, 0x2774}, {0x2775, 0x2775},
+ {0x2780, 0x2793}, {0x2794, 0x2794}, {0x2798, 0x27AF},
+ {0x27B1, 0x27BE}, {0x27C0, 0x27C4}, {0x27C5, 0x27C5},
+ {0x27C6, 0x27C6}, {0x27C7, 0x27E5}, {0x27EE, 0x27EE},
+ {0x27EF, 0x27EF}, {0x27F0, 0x27FF}, {0x2800, 0x28FF},
+ {0x2900, 0x297F}, {0x2980, 0x2982}, {0x2983, 0x2983},
+ {0x2984, 0x2984}, {0x2987, 0x2987}, {0x2988, 0x2988},
+ {0x2989, 0x2989}, {0x298A, 0x298A}, {0x298B, 0x298B},
+ {0x298C, 0x298C}, {0x298D, 0x298D}, {0x298E, 0x298E},
+ {0x298F, 0x298F}, {0x2990, 0x2990}, {0x2991, 0x2991},
+ {0x2992, 0x2992}, {0x2993, 0x2993}, {0x2994, 0x2994},
+ {0x2995, 0x2995}, {0x2996, 0x2996}, {0x2997, 0x2997},
+ {0x2998, 0x2998}, {0x2999, 0x29D7}, {0x29D8, 0x29D8},
+ {0x29D9, 0x29D9}, {0x29DA, 0x29DA}, {0x29DB, 0x29DB},
+ {0x29DC, 0x29FB}, {0x29FC, 0x29FC}, {0x29FD, 0x29FD},
+ {0x29FE, 0x29FF}, {0x2A00, 0x2AFF}, {0x2B00, 0x2B1A},
+ {0x2B1D, 0x2B2F}, {0x2B30, 0x2B44}, {0x2B45, 0x2B46},
+ {0x2B47, 0x2B4C}, {0x2B4D, 0x2B4F}, {0x2B51, 0x2B54},
+ {0x2B5A, 0x2B73}, {0x2B76, 0x2B95}, {0x2B98, 0x2BB9},
+ {0x2BBD, 0x2BC8}, {0x2BCA, 0x2BD1}, {0x2BEC, 0x2BEF},
+ {0x2C00, 0x2C2E}, {0x2C30, 0x2C5E}, {0x2C60, 0x2C7B},
+ {0x2C7C, 0x2C7D}, {0x2C7E, 0x2C7F}, {0x2C80, 0x2CE4},
+ {0x2CE5, 0x2CEA}, {0x2CEB, 0x2CEE}, {0x2CEF, 0x2CF1},
+ {0x2CF2, 0x2CF3}, {0x2CF9, 0x2CFC}, {0x2CFD, 0x2CFD},
+ {0x2CFE, 0x2CFF}, {0x2D00, 0x2D25}, {0x2D27, 0x2D27},
+ {0x2D2D, 0x2D2D}, {0x2D30, 0x2D67}, {0x2D6F, 0x2D6F},
+ {0x2D70, 0x2D70}, {0x2D7F, 0x2D7F}, {0x2D80, 0x2D96},
+ {0x2DA0, 0x2DA6}, {0x2DA8, 0x2DAE}, {0x2DB0, 0x2DB6},
+ {0x2DB8, 0x2DBE}, {0x2DC0, 0x2DC6}, {0x2DC8, 0x2DCE},
+ {0x2DD0, 0x2DD6}, {0x2DD8, 0x2DDE}, {0x2DE0, 0x2DFF},
+ {0x2E00, 0x2E01}, {0x2E02, 0x2E02}, {0x2E03, 0x2E03},
+ {0x2E04, 0x2E04}, {0x2E05, 0x2E05}, {0x2E06, 0x2E08},
+ {0x2E09, 0x2E09}, {0x2E0A, 0x2E0A}, {0x2E0B, 0x2E0B},
+ {0x2E0C, 0x2E0C}, {0x2E0D, 0x2E0D}, {0x2E0E, 0x2E16},
+ {0x2E17, 0x2E17}, {0x2E18, 0x2E19}, {0x2E1A, 0x2E1A},
+ {0x2E1B, 0x2E1B}, {0x2E1C, 0x2E1C}, {0x2E1D, 0x2E1D},
+ {0x2E1E, 0x2E1F}, {0x2E20, 0x2E20}, {0x2E21, 0x2E21},
+ {0x2E22, 0x2E22}, {0x2E23, 0x2E23}, {0x2E24, 0x2E24},
+ {0x2E25, 0x2E25}, {0x2E26, 0x2E26}, {0x2E27, 0x2E27},
+ {0x2E28, 0x2E28}, {0x2E29, 0x2E29}, {0x2E2A, 0x2E2E},
+ {0x2E2F, 0x2E2F}, {0x2E30, 0x2E39}, {0x2E3A, 0x2E3B},
+ {0x2E3C, 0x2E3F}, {0x2E40, 0x2E40}, {0x2E41, 0x2E41},
+ {0x2E42, 0x2E42}, {0x2E43, 0x2E44}, {0x303F, 0x303F},
+ {0x4DC0, 0x4DFF}, {0xA4D0, 0xA4F7}, {0xA4F8, 0xA4FD},
+ {0xA4FE, 0xA4FF}, {0xA500, 0xA60B}, {0xA60C, 0xA60C},
+ {0xA60D, 0xA60F}, {0xA610, 0xA61F}, {0xA620, 0xA629},
+ {0xA62A, 0xA62B}, {0xA640, 0xA66D}, {0xA66E, 0xA66E},
+ {0xA66F, 0xA66F}, {0xA670, 0xA672}, {0xA673, 0xA673},
+ {0xA674, 0xA67D}, {0xA67E, 0xA67E}, {0xA67F, 0xA67F},
+ {0xA680, 0xA69B}, {0xA69C, 0xA69D}, {0xA69E, 0xA69F},
+ {0xA6A0, 0xA6E5}, {0xA6E6, 0xA6EF}, {0xA6F0, 0xA6F1},
+ {0xA6F2, 0xA6F7}, {0xA700, 0xA716}, {0xA717, 0xA71F},
+ {0xA720, 0xA721}, {0xA722, 0xA76F}, {0xA770, 0xA770},
+ {0xA771, 0xA787}, {0xA788, 0xA788}, {0xA789, 0xA78A},
+ {0xA78B, 0xA78E}, {0xA78F, 0xA78F}, {0xA790, 0xA7AE},
+ {0xA7B0, 0xA7B7}, {0xA7F7, 0xA7F7}, {0xA7F8, 0xA7F9},
+ {0xA7FA, 0xA7FA}, {0xA7FB, 0xA7FF}, {0xA800, 0xA801},
+ {0xA802, 0xA802}, {0xA803, 0xA805}, {0xA806, 0xA806},
+ {0xA807, 0xA80A}, {0xA80B, 0xA80B}, {0xA80C, 0xA822},
+ {0xA823, 0xA824}, {0xA825, 0xA826}, {0xA827, 0xA827},
+ {0xA828, 0xA82B}, {0xA830, 0xA835}, {0xA836, 0xA837},
+ {0xA838, 0xA838}, {0xA839, 0xA839}, {0xA840, 0xA873},
+ {0xA874, 0xA877}, {0xA880, 0xA881}, {0xA882, 0xA8B3},
+ {0xA8B4, 0xA8C3}, {0xA8C4, 0xA8C5}, {0xA8CE, 0xA8CF},
+ {0xA8D0, 0xA8D9}, {0xA8E0, 0xA8F1}, {0xA8F2, 0xA8F7},
+ {0xA8F8, 0xA8FA}, {0xA8FB, 0xA8FB}, {0xA8FC, 0xA8FC},
+ {0xA8FD, 0xA8FD}, {0xA900, 0xA909}, {0xA90A, 0xA925},
+ {0xA926, 0xA92D}, {0xA92E, 0xA92F}, {0xA930, 0xA946},
+ {0xA947, 0xA951}, {0xA952, 0xA953}, {0xA95F, 0xA95F},
+ {0xA980, 0xA982}, {0xA983, 0xA983}, {0xA984, 0xA9B2},
+ {0xA9B3, 0xA9B3}, {0xA9B4, 0xA9B5}, {0xA9B6, 0xA9B9},
+ {0xA9BA, 0xA9BB}, {0xA9BC, 0xA9BC}, {0xA9BD, 0xA9C0},
+ {0xA9C1, 0xA9CD}, {0xA9CF, 0xA9CF}, {0xA9D0, 0xA9D9},
+ {0xA9DE, 0xA9DF}, {0xA9E0, 0xA9E4}, {0xA9E5, 0xA9E5},
+ {0xA9E6, 0xA9E6}, {0xA9E7, 0xA9EF}, {0xA9F0, 0xA9F9},
+ {0xA9FA, 0xA9FE}, {0xAA00, 0xAA28}, {0xAA29, 0xAA2E},
+ {0xAA2F, 0xAA30}, {0xAA31, 0xAA32}, {0xAA33, 0xAA34},
+ {0xAA35, 0xAA36}, {0xAA40, 0xAA42}, {0xAA43, 0xAA43},
+ {0xAA44, 0xAA4B}, {0xAA4C, 0xAA4C}, {0xAA4D, 0xAA4D},
+ {0xAA50, 0xAA59}, {0xAA5C, 0xAA5F}, {0xAA60, 0xAA6F},
+ {0xAA70, 0xAA70}, {0xAA71, 0xAA76}, {0xAA77, 0xAA79},
+ {0xAA7A, 0xAA7A}, {0xAA7B, 0xAA7B}, {0xAA7C, 0xAA7C},
+ {0xAA7D, 0xAA7D}, {0xAA7E, 0xAA7F}, {0xAA80, 0xAAAF},
+ {0xAAB0, 0xAAB0}, {0xAAB1, 0xAAB1}, {0xAAB2, 0xAAB4},
+ {0xAAB5, 0xAAB6}, {0xAAB7, 0xAAB8}, {0xAAB9, 0xAABD},
+ {0xAABE, 0xAABF}, {0xAAC0, 0xAAC0}, {0xAAC1, 0xAAC1},
+ {0xAAC2, 0xAAC2}, {0xAADB, 0xAADC}, {0xAADD, 0xAADD},
+ {0xAADE, 0xAADF}, {0xAAE0, 0xAAEA}, {0xAAEB, 0xAAEB},
+ {0xAAEC, 0xAAED}, {0xAAEE, 0xAAEF}, {0xAAF0, 0xAAF1},
+ {0xAAF2, 0xAAF2}, {0xAAF3, 0xAAF4}, {0xAAF5, 0xAAF5},
+ {0xAAF6, 0xAAF6}, {0xAB01, 0xAB06}, {0xAB09, 0xAB0E},
+ {0xAB11, 0xAB16}, {0xAB20, 0xAB26}, {0xAB28, 0xAB2E},
+ {0xAB30, 0xAB5A}, {0xAB5B, 0xAB5B}, {0xAB5C, 0xAB5F},
+ {0xAB60, 0xAB65}, {0xAB70, 0xABBF}, {0xABC0, 0xABE2},
+ {0xABE3, 0xABE4}, {0xABE5, 0xABE5}, {0xABE6, 0xABE7},
+ {0xABE8, 0xABE8}, {0xABE9, 0xABEA}, {0xABEB, 0xABEB},
+ {0xABEC, 0xABEC}, {0xABED, 0xABED}, {0xABF0, 0xABF9},
+ {0xD7B0, 0xD7C6}, {0xD7CB, 0xD7FB}, {0xD800, 0xDB7F},
+ {0xDB80, 0xDBFF}, {0xDC00, 0xDFFF}, {0xFB00, 0xFB06},
+ {0xFB13, 0xFB17}, {0xFB1D, 0xFB1D}, {0xFB1E, 0xFB1E},
+ {0xFB1F, 0xFB28}, {0xFB29, 0xFB29}, {0xFB2A, 0xFB36},
+ {0xFB38, 0xFB3C}, {0xFB3E, 0xFB3E}, {0xFB40, 0xFB41},
+ {0xFB43, 0xFB44}, {0xFB46, 0xFB4F}, {0xFB50, 0xFBB1},
+ {0xFBB2, 0xFBC1}, {0xFBD3, 0xFD3D}, {0xFD3E, 0xFD3E},
+ {0xFD3F, 0xFD3F}, {0xFD50, 0xFD8F}, {0xFD92, 0xFDC7},
+ {0xFDF0, 0xFDFB}, {0xFDFC, 0xFDFC}, {0xFDFD, 0xFDFD},
+ {0xFE20, 0xFE2F}, {0xFE70, 0xFE74}, {0xFE76, 0xFEFC},
+ {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFC, 0xFFFC},
+ {0x10000, 0x1000B}, {0x1000D, 0x10026}, {0x10028, 0x1003A},
+ {0x1003C, 0x1003D}, {0x1003F, 0x1004D}, {0x10050, 0x1005D},
+ {0x10080, 0x100FA}, {0x10100, 0x10102}, {0x10107, 0x10133},
+ {0x10137, 0x1013F}, {0x10140, 0x10174}, {0x10175, 0x10178},
+ {0x10179, 0x10189}, {0x1018A, 0x1018B}, {0x1018C, 0x1018E},
+ {0x10190, 0x1019B}, {0x101A0, 0x101A0}, {0x101D0, 0x101FC},
+ {0x101FD, 0x101FD}, {0x10280, 0x1029C}, {0x102A0, 0x102D0},
+ {0x102E0, 0x102E0}, {0x102E1, 0x102FB}, {0x10300, 0x1031F},
+ {0x10320, 0x10323}, {0x10330, 0x10340}, {0x10341, 0x10341},
+ {0x10342, 0x10349}, {0x1034A, 0x1034A}, {0x10350, 0x10375},
+ {0x10376, 0x1037A}, {0x10380, 0x1039D}, {0x1039F, 0x1039F},
+ {0x103A0, 0x103C3}, {0x103C8, 0x103CF}, {0x103D0, 0x103D0},
+ {0x103D1, 0x103D5}, {0x10400, 0x1044F}, {0x10450, 0x1047F},
+ {0x10480, 0x1049D}, {0x104A0, 0x104A9}, {0x104B0, 0x104D3},
+ {0x104D8, 0x104FB}, {0x10500, 0x10527}, {0x10530, 0x10563},
+ {0x1056F, 0x1056F}, {0x10600, 0x10736}, {0x10740, 0x10755},
+ {0x10760, 0x10767}, {0x10800, 0x10805}, {0x10808, 0x10808},
+ {0x1080A, 0x10835}, {0x10837, 0x10838}, {0x1083C, 0x1083C},
+ {0x1083F, 0x1083F}, {0x10840, 0x10855}, {0x10857, 0x10857},
+ {0x10858, 0x1085F}, {0x10860, 0x10876}, {0x10877, 0x10878},
+ {0x10879, 0x1087F}, {0x10880, 0x1089E}, {0x108A7, 0x108AF},
+ {0x108E0, 0x108F2}, {0x108F4, 0x108F5}, {0x108FB, 0x108FF},
+ {0x10900, 0x10915}, {0x10916, 0x1091B}, {0x1091F, 0x1091F},
+ {0x10920, 0x10939}, {0x1093F, 0x1093F}, {0x10980, 0x1099F},
+ {0x109A0, 0x109B7}, {0x109BC, 0x109BD}, {0x109BE, 0x109BF},
+ {0x109C0, 0x109CF}, {0x109D2, 0x109FF}, {0x10A00, 0x10A00},
+ {0x10A01, 0x10A03}, {0x10A05, 0x10A06}, {0x10A0C, 0x10A0F},
+ {0x10A10, 0x10A13}, {0x10A15, 0x10A17}, {0x10A19, 0x10A33},
+ {0x10A38, 0x10A3A}, {0x10A3F, 0x10A3F}, {0x10A40, 0x10A47},
+ {0x10A50, 0x10A58}, {0x10A60, 0x10A7C}, {0x10A7D, 0x10A7E},
+ {0x10A7F, 0x10A7F}, {0x10A80, 0x10A9C}, {0x10A9D, 0x10A9F},
+ {0x10AC0, 0x10AC7}, {0x10AC8, 0x10AC8}, {0x10AC9, 0x10AE4},
+ {0x10AE5, 0x10AE6}, {0x10AEB, 0x10AEF}, {0x10AF0, 0x10AF6},
+ {0x10B00, 0x10B35}, {0x10B39, 0x10B3F}, {0x10B40, 0x10B55},
+ {0x10B58, 0x10B5F}, {0x10B60, 0x10B72}, {0x10B78, 0x10B7F},
+ {0x10B80, 0x10B91}, {0x10B99, 0x10B9C}, {0x10BA9, 0x10BAF},
+ {0x10C00, 0x10C48}, {0x10C80, 0x10CB2}, {0x10CC0, 0x10CF2},
+ {0x10CFA, 0x10CFF}, {0x10E60, 0x10E7E}, {0x11000, 0x11000},
+ {0x11001, 0x11001}, {0x11002, 0x11002}, {0x11003, 0x11037},
+ {0x11038, 0x11046}, {0x11047, 0x1104D}, {0x11052, 0x11065},
+ {0x11066, 0x1106F}, {0x1107F, 0x1107F}, {0x11080, 0x11081},
+ {0x11082, 0x11082}, {0x11083, 0x110AF}, {0x110B0, 0x110B2},
+ {0x110B3, 0x110B6}, {0x110B7, 0x110B8}, {0x110B9, 0x110BA},
+ {0x110BB, 0x110BC}, {0x110BD, 0x110BD}, {0x110BE, 0x110C1},
+ {0x110D0, 0x110E8}, {0x110F0, 0x110F9}, {0x11100, 0x11102},
+ {0x11103, 0x11126}, {0x11127, 0x1112B}, {0x1112C, 0x1112C},
+ {0x1112D, 0x11134}, {0x11136, 0x1113F}, {0x11140, 0x11143},
+ {0x11150, 0x11172}, {0x11173, 0x11173}, {0x11174, 0x11175},
+ {0x11176, 0x11176}, {0x11180, 0x11181}, {0x11182, 0x11182},
+ {0x11183, 0x111B2}, {0x111B3, 0x111B5}, {0x111B6, 0x111BE},
+ {0x111BF, 0x111C0}, {0x111C1, 0x111C4}, {0x111C5, 0x111C9},
+ {0x111CA, 0x111CC}, {0x111CD, 0x111CD}, {0x111D0, 0x111D9},
+ {0x111DA, 0x111DA}, {0x111DB, 0x111DB}, {0x111DC, 0x111DC},
+ {0x111DD, 0x111DF}, {0x111E1, 0x111F4}, {0x11200, 0x11211},
+ {0x11213, 0x1122B}, {0x1122C, 0x1122E}, {0x1122F, 0x11231},
+ {0x11232, 0x11233}, {0x11234, 0x11234}, {0x11235, 0x11235},
+ {0x11236, 0x11237}, {0x11238, 0x1123D}, {0x1123E, 0x1123E},
+ {0x11280, 0x11286}, {0x11288, 0x11288}, {0x1128A, 0x1128D},
+ {0x1128F, 0x1129D}, {0x1129F, 0x112A8}, {0x112A9, 0x112A9},
+ {0x112B0, 0x112DE}, {0x112DF, 0x112DF}, {0x112E0, 0x112E2},
+ {0x112E3, 0x112EA}, {0x112F0, 0x112F9}, {0x11300, 0x11301},
+ {0x11302, 0x11303}, {0x11305, 0x1130C}, {0x1130F, 0x11310},
+ {0x11313, 0x11328}, {0x1132A, 0x11330}, {0x11332, 0x11333},
+ {0x11335, 0x11339}, {0x1133C, 0x1133C}, {0x1133D, 0x1133D},
+ {0x1133E, 0x1133F}, {0x11340, 0x11340}, {0x11341, 0x11344},
+ {0x11347, 0x11348}, {0x1134B, 0x1134D}, {0x11350, 0x11350},
+ {0x11357, 0x11357}, {0x1135D, 0x11361}, {0x11362, 0x11363},
+ {0x11366, 0x1136C}, {0x11370, 0x11374}, {0x11400, 0x11434},
+ {0x11435, 0x11437}, {0x11438, 0x1143F}, {0x11440, 0x11441},
+ {0x11442, 0x11444}, {0x11445, 0x11445}, {0x11446, 0x11446},
+ {0x11447, 0x1144A}, {0x1144B, 0x1144F}, {0x11450, 0x11459},
+ {0x1145B, 0x1145B}, {0x1145D, 0x1145D}, {0x11480, 0x114AF},
+ {0x114B0, 0x114B2}, {0x114B3, 0x114B8}, {0x114B9, 0x114B9},
+ {0x114BA, 0x114BA}, {0x114BB, 0x114BE}, {0x114BF, 0x114C0},
+ {0x114C1, 0x114C1}, {0x114C2, 0x114C3}, {0x114C4, 0x114C5},
+ {0x114C6, 0x114C6}, {0x114C7, 0x114C7}, {0x114D0, 0x114D9},
+ {0x11580, 0x115AE}, {0x115AF, 0x115B1}, {0x115B2, 0x115B5},
+ {0x115B8, 0x115BB}, {0x115BC, 0x115BD}, {0x115BE, 0x115BE},
+ {0x115BF, 0x115C0}, {0x115C1, 0x115D7}, {0x115D8, 0x115DB},
+ {0x115DC, 0x115DD}, {0x11600, 0x1162F}, {0x11630, 0x11632},
+ {0x11633, 0x1163A}, {0x1163B, 0x1163C}, {0x1163D, 0x1163D},
+ {0x1163E, 0x1163E}, {0x1163F, 0x11640}, {0x11641, 0x11643},
+ {0x11644, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166C},
+ {0x11680, 0x116AA}, {0x116AB, 0x116AB}, {0x116AC, 0x116AC},
+ {0x116AD, 0x116AD}, {0x116AE, 0x116AF}, {0x116B0, 0x116B5},
+ {0x116B6, 0x116B6}, {0x116B7, 0x116B7}, {0x116C0, 0x116C9},
+ {0x11700, 0x11719}, {0x1171D, 0x1171F}, {0x11720, 0x11721},
+ {0x11722, 0x11725}, {0x11726, 0x11726}, {0x11727, 0x1172B},
+ {0x11730, 0x11739}, {0x1173A, 0x1173B}, {0x1173C, 0x1173E},
+ {0x1173F, 0x1173F}, {0x118A0, 0x118DF}, {0x118E0, 0x118E9},
+ {0x118EA, 0x118F2}, {0x118FF, 0x118FF}, {0x11AC0, 0x11AF8},
+ {0x11C00, 0x11C08}, {0x11C0A, 0x11C2E}, {0x11C2F, 0x11C2F},
+ {0x11C30, 0x11C36}, {0x11C38, 0x11C3D}, {0x11C3E, 0x11C3E},
+ {0x11C3F, 0x11C3F}, {0x11C40, 0x11C40}, {0x11C41, 0x11C45},
+ {0x11C50, 0x11C59}, {0x11C5A, 0x11C6C}, {0x11C70, 0x11C71},
+ {0x11C72, 0x11C8F}, {0x11C92, 0x11CA7}, {0x11CA9, 0x11CA9},
+ {0x11CAA, 0x11CB0}, {0x11CB1, 0x11CB1}, {0x11CB2, 0x11CB3},
+ {0x11CB4, 0x11CB4}, {0x11CB5, 0x11CB6}, {0x12000, 0x12399},
+ {0x12400, 0x1246E}, {0x12470, 0x12474}, {0x12480, 0x12543},
+ {0x13000, 0x1342E}, {0x14400, 0x14646}, {0x16800, 0x16A38},
+ {0x16A40, 0x16A5E}, {0x16A60, 0x16A69}, {0x16A6E, 0x16A6F},
+ {0x16AD0, 0x16AED}, {0x16AF0, 0x16AF4}, {0x16AF5, 0x16AF5},
+ {0x16B00, 0x16B2F}, {0x16B30, 0x16B36}, {0x16B37, 0x16B3B},
+ {0x16B3C, 0x16B3F}, {0x16B40, 0x16B43}, {0x16B44, 0x16B44},
+ {0x16B45, 0x16B45}, {0x16B50, 0x16B59}, {0x16B5B, 0x16B61},
+ {0x16B63, 0x16B77}, {0x16B7D, 0x16B8F}, {0x16F00, 0x16F44},
+ {0x16F50, 0x16F50}, {0x16F51, 0x16F7E}, {0x16F8F, 0x16F92},
+ {0x16F93, 0x16F9F}, {0x1BC00, 0x1BC6A}, {0x1BC70, 0x1BC7C},
+ {0x1BC80, 0x1BC88}, {0x1BC90, 0x1BC99}, {0x1BC9C, 0x1BC9C},
+ {0x1BC9D, 0x1BC9E}, {0x1BC9F, 0x1BC9F}, {0x1BCA0, 0x1BCA3},
+ {0x1D000, 0x1D0F5}, {0x1D100, 0x1D126}, {0x1D129, 0x1D164},
+ {0x1D165, 0x1D166}, {0x1D167, 0x1D169}, {0x1D16A, 0x1D16C},
+ {0x1D16D, 0x1D172}, {0x1D173, 0x1D17A}, {0x1D17B, 0x1D182},
+ {0x1D183, 0x1D184}, {0x1D185, 0x1D18B}, {0x1D18C, 0x1D1A9},
+ {0x1D1AA, 0x1D1AD}, {0x1D1AE, 0x1D1E8}, {0x1D200, 0x1D241},
+ {0x1D242, 0x1D244}, {0x1D245, 0x1D245}, {0x1D300, 0x1D356},
+ {0x1D360, 0x1D371}, {0x1D400, 0x1D454}, {0x1D456, 0x1D49C},
+ {0x1D49E, 0x1D49F}, {0x1D4A2, 0x1D4A2}, {0x1D4A5, 0x1D4A6},
+ {0x1D4A9, 0x1D4AC}, {0x1D4AE, 0x1D4B9}, {0x1D4BB, 0x1D4BB},
+ {0x1D4BD, 0x1D4C3}, {0x1D4C5, 0x1D505}, {0x1D507, 0x1D50A},
+ {0x1D50D, 0x1D514}, {0x1D516, 0x1D51C}, {0x1D51E, 0x1D539},
+ {0x1D53B, 0x1D53E}, {0x1D540, 0x1D544}, {0x1D546, 0x1D546},
+ {0x1D54A, 0x1D550}, {0x1D552, 0x1D6A5}, {0x1D6A8, 0x1D6C0},
+ {0x1D6C1, 0x1D6C1}, {0x1D6C2, 0x1D6DA}, {0x1D6DB, 0x1D6DB},
+ {0x1D6DC, 0x1D6FA}, {0x1D6FB, 0x1D6FB}, {0x1D6FC, 0x1D714},
+ {0x1D715, 0x1D715}, {0x1D716, 0x1D734}, {0x1D735, 0x1D735},
+ {0x1D736, 0x1D74E}, {0x1D74F, 0x1D74F}, {0x1D750, 0x1D76E},
+ {0x1D76F, 0x1D76F}, {0x1D770, 0x1D788}, {0x1D789, 0x1D789},
+ {0x1D78A, 0x1D7A8}, {0x1D7A9, 0x1D7A9}, {0x1D7AA, 0x1D7C2},
+ {0x1D7C3, 0x1D7C3}, {0x1D7C4, 0x1D7CB}, {0x1D7CE, 0x1D7FF},
+ {0x1D800, 0x1D9FF}, {0x1DA00, 0x1DA36}, {0x1DA37, 0x1DA3A},
+ {0x1DA3B, 0x1DA6C}, {0x1DA6D, 0x1DA74}, {0x1DA75, 0x1DA75},
+ {0x1DA76, 0x1DA83}, {0x1DA84, 0x1DA84}, {0x1DA85, 0x1DA86},
+ {0x1DA87, 0x1DA8B}, {0x1DA9B, 0x1DA9F}, {0x1DAA1, 0x1DAAF},
+ {0x1E000, 0x1E006}, {0x1E008, 0x1E018}, {0x1E01B, 0x1E021},
+ {0x1E023, 0x1E024}, {0x1E026, 0x1E02A}, {0x1E800, 0x1E8C4},
+ {0x1E8C7, 0x1E8CF}, {0x1E8D0, 0x1E8D6}, {0x1E900, 0x1E943},
+ {0x1E944, 0x1E94A}, {0x1E950, 0x1E959}, {0x1E95E, 0x1E95F},
+ {0x1EE00, 0x1EE03}, {0x1EE05, 0x1EE1F}, {0x1EE21, 0x1EE22},
+ {0x1EE24, 0x1EE24}, {0x1EE27, 0x1EE27}, {0x1EE29, 0x1EE32},
+ {0x1EE34, 0x1EE37}, {0x1EE39, 0x1EE39}, {0x1EE3B, 0x1EE3B},
+ {0x1EE42, 0x1EE42}, {0x1EE47, 0x1EE47}, {0x1EE49, 0x1EE49},
+ {0x1EE4B, 0x1EE4B}, {0x1EE4D, 0x1EE4F}, {0x1EE51, 0x1EE52},
+ {0x1EE54, 0x1EE54}, {0x1EE57, 0x1EE57}, {0x1EE59, 0x1EE59},
+ {0x1EE5B, 0x1EE5B}, {0x1EE5D, 0x1EE5D}, {0x1EE5F, 0x1EE5F},
+ {0x1EE61, 0x1EE62}, {0x1EE64, 0x1EE64}, {0x1EE67, 0x1EE6A},
+ {0x1EE6C, 0x1EE72}, {0x1EE74, 0x1EE77}, {0x1EE79, 0x1EE7C},
+ {0x1EE7E, 0x1EE7E}, {0x1EE80, 0x1EE89}, {0x1EE8B, 0x1EE9B},
+ {0x1EEA1, 0x1EEA3}, {0x1EEA5, 0x1EEA9}, {0x1EEAB, 0x1EEBB},
+ {0x1EEF0, 0x1EEF1}, {0x1F000, 0x1F003}, {0x1F005, 0x1F02B},
+ {0x1F030, 0x1F093}, {0x1F0A0, 0x1F0AE}, {0x1F0B1, 0x1F0BF},
+ {0x1F0C1, 0x1F0CE}, {0x1F0D1, 0x1F0F5}, {0x1F10B, 0x1F10C},
+ {0x1F12E, 0x1F12E}, {0x1F16A, 0x1F16B}, {0x1F1E6, 0x1F1FF},
+ {0x1F321, 0x1F32C}, {0x1F336, 0x1F336}, {0x1F37D, 0x1F37D},
+ {0x1F394, 0x1F39F}, {0x1F3CB, 0x1F3CE}, {0x1F3D4, 0x1F3DF},
+ {0x1F3F1, 0x1F3F3}, {0x1F3F5, 0x1F3F7}, {0x1F43F, 0x1F43F},
+ {0x1F441, 0x1F441}, {0x1F4FD, 0x1F4FE}, {0x1F53E, 0x1F54A},
+ {0x1F54F, 0x1F54F}, {0x1F568, 0x1F579}, {0x1F57B, 0x1F594},
+ {0x1F597, 0x1F5A3}, {0x1F5A5, 0x1F5FA}, {0x1F650, 0x1F67F},
+ {0x1F6C6, 0x1F6CB}, {0x1F6CD, 0x1F6CF}, {0x1F6E0, 0x1F6EA},
+ {0x1F6F0, 0x1F6F3}, {0x1F700, 0x1F773}, {0x1F780, 0x1F7D4},
+ {0x1F800, 0x1F80B}, {0x1F810, 0x1F847}, {0x1F850, 0x1F859},
+ {0x1F860, 0x1F887}, {0x1F890, 0x1F8AD}, {0xE0001, 0xE0001},
+ {0xE0020, 0xE007F},
+}
+
+// Condition have flag EastAsianWidth whether the current locale is CJK or not.
+type Condition struct {
+ EastAsianWidth bool
+}
+
+// NewCondition return new instance of Condition which is current locale.
+func NewCondition() *Condition {
+ return &Condition{EastAsianWidth}
+}
+
+// RuneWidth returns the number of cells in r.
+// See http://www.unicode.org/reports/tr11/
+func (c *Condition) RuneWidth(r rune) int {
+ switch {
+ case r < 0 || r > 0x10FFFF ||
+ inTables(r, nonprint, combining, notassigned):
+ return 0
+ case (c.EastAsianWidth && IsAmbiguousWidth(r)) ||
+ inTables(r, doublewidth, emoji):
+ return 2
+ default:
+ return 1
+ }
+}
+
+// StringWidth return width as you can see
+func (c *Condition) StringWidth(s string) (width int) {
+ for _, r := range []rune(s) {
+ width += c.RuneWidth(r)
+ }
+ return width
+}
+
+// Truncate return string truncated with w cells
+func (c *Condition) Truncate(s string, w int, tail string) string {
+ if c.StringWidth(s) <= w {
+ return s
+ }
+ r := []rune(s)
+ tw := c.StringWidth(tail)
+ w -= tw
+ width := 0
+ i := 0
+ for ; i < len(r); i++ {
+ cw := c.RuneWidth(r[i])
+ if width+cw > w {
+ break
+ }
+ width += cw
+ }
+ return string(r[0:i]) + tail
+}
+
+// Wrap return string wrapped with w cells
+func (c *Condition) Wrap(s string, w int) string {
+ width := 0
+ out := ""
+ for _, r := range []rune(s) {
+ cw := RuneWidth(r)
+ if r == '\n' {
+ out += string(r)
+ width = 0
+ continue
+ } else if width+cw > w {
+ out += "\n"
+ width = 0
+ out += string(r)
+ width += cw
+ continue
+ }
+ out += string(r)
+ width += cw
+ }
+ return out
+}
+
+// FillLeft return string filled in left by spaces in w cells
+func (c *Condition) FillLeft(s string, w int) string {
+ width := c.StringWidth(s)
+ count := w - width
+ if count > 0 {
+ b := make([]byte, count)
+ for i := range b {
+ b[i] = ' '
+ }
+ return string(b) + s
+ }
+ return s
+}
+
+// FillRight return string filled in left by spaces in w cells
+func (c *Condition) FillRight(s string, w int) string {
+ width := c.StringWidth(s)
+ count := w - width
+ if count > 0 {
+ b := make([]byte, count)
+ for i := range b {
+ b[i] = ' '
+ }
+ return s + string(b)
+ }
+ return s
+}
+
+// RuneWidth returns the number of cells in r.
+// See http://www.unicode.org/reports/tr11/
+func RuneWidth(r rune) int {
+ return DefaultCondition.RuneWidth(r)
+}
+
+// IsAmbiguousWidth returns whether is ambiguous width or not.
+func IsAmbiguousWidth(r rune) bool {
+ return inTables(r, private, ambiguous)
+}
+
+// IsNeutralWidth returns whether is neutral width or not.
+func IsNeutralWidth(r rune) bool {
+ return inTable(r, neutral)
+}
+
+// StringWidth return width as you can see
+func StringWidth(s string) (width int) {
+ return DefaultCondition.StringWidth(s)
+}
+
+// Truncate return string truncated with w cells
+func Truncate(s string, w int, tail string) string {
+ return DefaultCondition.Truncate(s, w, tail)
+}
+
+// Wrap return string wrapped with w cells
+func Wrap(s string, w int) string {
+ return DefaultCondition.Wrap(s, w)
+}
+
+// FillLeft return string filled in left by spaces in w cells
+func FillLeft(s string, w int) string {
+ return DefaultCondition.FillLeft(s, w)
+}
+
+// FillRight return string filled in left by spaces in w cells
+func FillRight(s string, w int) string {
+ return DefaultCondition.FillRight(s, w)
+}
diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_js.go b/vendor/github.com/mattn/go-runewidth/runewidth_js.go
new file mode 100644
index 0000000..0ce32c5
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/runewidth_js.go
@@ -0,0 +1,8 @@
+// +build js
+
+package runewidth
+
+func IsEastAsian() bool {
+ // TODO: Implement this for the web. Detect east asian in a compatible way, and return true.
+ return false
+}
diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_posix.go b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go
new file mode 100644
index 0000000..c579e9a
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go
@@ -0,0 +1,77 @@
+// +build !windows,!js
+
+package runewidth
+
+import (
+ "os"
+ "regexp"
+ "strings"
+)
+
+var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`)
+
+var mblenTable = map[string]int{
+ "utf-8": 6,
+ "utf8": 6,
+ "jis": 8,
+ "eucjp": 3,
+ "euckr": 2,
+ "euccn": 2,
+ "sjis": 2,
+ "cp932": 2,
+ "cp51932": 2,
+ "cp936": 2,
+ "cp949": 2,
+ "cp950": 2,
+ "big5": 2,
+ "gbk": 2,
+ "gb2312": 2,
+}
+
+func isEastAsian(locale string) bool {
+ charset := strings.ToLower(locale)
+ r := reLoc.FindStringSubmatch(locale)
+ if len(r) == 2 {
+ charset = strings.ToLower(r[1])
+ }
+
+ if strings.HasSuffix(charset, "@cjk_narrow") {
+ return false
+ }
+
+ for pos, b := range []byte(charset) {
+ if b == '@' {
+ charset = charset[:pos]
+ break
+ }
+ }
+ max := 1
+ if m, ok := mblenTable[charset]; ok {
+ max = m
+ }
+ if max > 1 && (charset[0] != 'u' ||
+ strings.HasPrefix(locale, "ja") ||
+ strings.HasPrefix(locale, "ko") ||
+ strings.HasPrefix(locale, "zh")) {
+ return true
+ }
+ return false
+}
+
+// IsEastAsian return true if the current locale is CJK
+func IsEastAsian() bool {
+ locale := os.Getenv("LC_CTYPE")
+ if locale == "" {
+ locale = os.Getenv("LANG")
+ }
+
+ // ignore C locale
+ if locale == "POSIX" || locale == "C" {
+ return false
+ }
+ if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') {
+ return false
+ }
+
+ return isEastAsian(locale)
+}
diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_test.go b/vendor/github.com/mattn/go-runewidth/runewidth_test.go
new file mode 100644
index 0000000..b0378a1
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/runewidth_test.go
@@ -0,0 +1,275 @@
+package runewidth
+
+import (
+ "sort"
+ "testing"
+)
+
+var _ sort.Interface = (*table)(nil)
+
+func (t table) Len() int {
+ return len(t)
+}
+
+func (t table) Less(i, j int) bool {
+ return t[i].first < t[j].first
+}
+
+func (t *table) Swap(i, j int) {
+ (*t)[i], (*t)[j] = (*t)[j], (*t)[i]
+}
+
+var tables = []table{
+ private,
+ nonprint,
+ combining,
+ doublewidth,
+ ambiguous,
+ emoji,
+ notassigned,
+ neutral,
+}
+
+func TestSorted(t *testing.T) {
+ for _, tbl := range tables {
+ if !sort.IsSorted(&tbl) {
+ t.Errorf("not sorted")
+ }
+ }
+}
+
+var runewidthtests = []struct {
+ in rune
+ out int
+ eaout int
+}{
+ {'世', 2, 2},
+ {'界', 2, 2},
+ {'セ', 1, 1},
+ {'カ', 1, 1},
+ {'イ', 1, 1},
+ {'☆', 1, 2}, // double width in ambiguous
+ {'\x00', 0, 0},
+ {'\x01', 0, 0},
+ {'\u0300', 0, 0},
+}
+
+func TestRuneWidth(t *testing.T) {
+ c := NewCondition()
+ for _, tt := range runewidthtests {
+ if out := c.RuneWidth(tt.in); out != tt.out {
+ t.Errorf("RuneWidth(%q) = %d, want %d", tt.in, out, tt.out)
+ }
+ }
+ c.EastAsianWidth = true
+ for _, tt := range runewidthtests {
+ if out := c.RuneWidth(tt.in); out != tt.eaout {
+ t.Errorf("RuneWidth(%q) = %d, want %d", tt.in, out, tt.eaout)
+ }
+ }
+}
+
+var isambiguouswidthtests = []struct {
+ in rune
+ out bool
+}{
+ {'世', false},
+ {'■', true},
+ {'界', false},
+ {'○', true},
+ {'㈱', false},
+ {'①', true},
+ {'②', true},
+ {'③', true},
+ {'④', true},
+ {'⑤', true},
+ {'⑥', true},
+ {'⑦', true},
+ {'⑧', true},
+ {'⑨', true},
+ {'⑩', true},
+ {'⑪', true},
+ {'⑫', true},
+ {'⑬', true},
+ {'⑭', true},
+ {'⑮', true},
+ {'⑯', true},
+ {'⑰', true},
+ {'⑱', true},
+ {'⑲', true},
+ {'⑳', true},
+ {'☆', true},
+}
+
+func TestIsAmbiguousWidth(t *testing.T) {
+ for _, tt := range isambiguouswidthtests {
+ if out := IsAmbiguousWidth(tt.in); out != tt.out {
+ t.Errorf("IsAmbiguousWidth(%q) = %v, want %v", tt.in, out, tt.out)
+ }
+ }
+}
+
+var stringwidthtests = []struct {
+ in string
+ out int
+ eaout int
+}{
+ {"■㈱の世界①", 10, 12},
+ {"スター☆", 7, 8},
+ {"つのだ☆HIRO", 11, 12},
+}
+
+func TestStringWidth(t *testing.T) {
+ c := NewCondition()
+ for _, tt := range stringwidthtests {
+ if out := c.StringWidth(tt.in); out != tt.out {
+ t.Errorf("StringWidth(%q) = %q, want %q", tt.in, out, tt.out)
+ }
+ }
+ c.EastAsianWidth = true
+ for _, tt := range stringwidthtests {
+ if out := c.StringWidth(tt.in); out != tt.eaout {
+ t.Errorf("StringWidth(%q) = %q, want %q", tt.in, out, tt.eaout)
+ }
+ }
+}
+
+func TestStringWidthInvalid(t *testing.T) {
+ s := "こんにちわ\x00世界"
+ if out := StringWidth(s); out != 14 {
+ t.Errorf("StringWidth(%q) = %q, want %q", s, out, 14)
+ }
+}
+
+func TestTruncateSmaller(t *testing.T) {
+ s := "あいうえお"
+ expected := "あいうえお"
+
+ if out := Truncate(s, 10, "..."); out != expected {
+ t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
+ }
+}
+
+func TestTruncate(t *testing.T) {
+ s := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
+ expected := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおお..."
+ out := Truncate(s, 80, "...")
+ if out != expected {
+ t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
+ }
+ width := StringWidth(out)
+ if width != 79 {
+ t.Errorf("width of Truncate(%q) should be %d, but %d", s, 79, width)
+ }
+}
+
+func TestTruncateFit(t *testing.T) {
+ s := "aあいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
+ expected := "aあいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおお..."
+
+ out := Truncate(s, 80, "...")
+ if out != expected {
+ t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
+ }
+ width := StringWidth(out)
+ if width != 80 {
+ t.Errorf("width of Truncate(%q) should be %d, but %d", s, 80, width)
+ }
+}
+
+func TestTruncateJustFit(t *testing.T) {
+ s := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
+ expected := "あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおお"
+
+ out := Truncate(s, 80, "...")
+ if out != expected {
+ t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
+ }
+ width := StringWidth(out)
+ if width != 80 {
+ t.Errorf("width of Truncate(%q) should be %d, but %d", s, 80, width)
+ }
+}
+
+func TestWrap(t *testing.T) {
+ s := `東京特許許可局局長はよく柿喰う客だ/東京特許許可局局長はよく柿喰う客だ
+123456789012345678901234567890
+
+END`
+ expected := `東京特許許可局局長はよく柿喰う
+客だ/東京特許許可局局長はよく
+柿喰う客だ
+123456789012345678901234567890
+
+END`
+
+ if out := Wrap(s, 30); out != expected {
+ t.Errorf("Wrap(%q) = %q, want %q", s, out, expected)
+ }
+}
+
+func TestTruncateNoNeeded(t *testing.T) {
+ s := "あいうえおあい"
+ expected := "あいうえおあい"
+
+ if out := Truncate(s, 80, "..."); out != expected {
+ t.Errorf("Truncate(%q) = %q, want %q", s, out, expected)
+ }
+}
+
+var isneutralwidthtests = []struct {
+ in rune
+ out bool
+}{
+ {'→', false},
+ {'┊', false},
+ {'┈', false},
+ {'~', false},
+ {'└', false},
+ {'⣀', true},
+ {'⣀', true},
+}
+
+func TestIsNeutralWidth(t *testing.T) {
+ for _, tt := range isneutralwidthtests {
+ if out := IsNeutralWidth(tt.in); out != tt.out {
+ t.Errorf("IsNeutralWidth(%q) = %v, want %v", tt.in, out, tt.out)
+ }
+ }
+}
+
+func TestFillLeft(t *testing.T) {
+ s := "あxいうえお"
+ expected := " あxいうえお"
+
+ if out := FillLeft(s, 15); out != expected {
+ t.Errorf("FillLeft(%q) = %q, want %q", s, out, expected)
+ }
+}
+
+func TestFillLeftFit(t *testing.T) {
+ s := "あいうえお"
+ expected := "あいうえお"
+
+ if out := FillLeft(s, 10); out != expected {
+ t.Errorf("FillLeft(%q) = %q, want %q", s, out, expected)
+ }
+}
+
+func TestFillRight(t *testing.T) {
+ s := "あxいうえお"
+ expected := "あxいうえお "
+
+ if out := FillRight(s, 15); out != expected {
+ t.Errorf("FillRight(%q) = %q, want %q", s, out, expected)
+ }
+}
+
+func TestFillRightFit(t *testing.T) {
+ s := "あいうえお"
+ expected := "あいうえお"
+
+ if out := FillRight(s, 10); out != expected {
+ t.Errorf("FillRight(%q) = %q, want %q", s, out, expected)
+ }
+}
diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_windows.go b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go
new file mode 100644
index 0000000..0258876
--- /dev/null
+++ b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go
@@ -0,0 +1,25 @@
+package runewidth
+
+import (
+ "syscall"
+)
+
+var (
+ kernel32 = syscall.NewLazyDLL("kernel32")
+ procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP")
+)
+
+// IsEastAsian return true if the current locale is CJK
+func IsEastAsian() bool {
+ r1, _, _ := procGetConsoleOutputCP.Call()
+ if r1 == 0 {
+ return false
+ }
+
+ switch int(r1) {
+ case 932, 51932, 936, 949, 950:
+ return true
+ }
+
+ return false
+}
diff --git a/vendor/github.com/peterh/liner/.github/CONTRIBUTING.md b/vendor/github.com/peterh/liner/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..e299cf0
--- /dev/null
+++ b/vendor/github.com/peterh/liner/.github/CONTRIBUTING.md
@@ -0,0 +1,15 @@
+#### Liner is a scratch-your-own-itch project
+
+While I try my best to fix any bugs encountered in liner, I do not have
+sufficient time to implement feature requests on your behalf.
+
+If you are opening a feature request, you are implicitly volunteering to
+implement that feature. Obvious feature requests should be made via a pull
+request. Complex feature requests will be interpreted as a
+request-for-comments, and will be closed once comments are given.
+
+#### Liner must remain backwards compatible
+
+The API of Liner must not change in an incompatible way. When making
+changes to liner, please use the [Go 1 Compatibility Promise](https://golang.org/doc/go1compat)
+as a guideline.
diff --git a/vendor/github.com/peterh/liner/.github/ISSUE_TEMPLATE.md b/vendor/github.com/peterh/liner/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..2ddff64
--- /dev/null
+++ b/vendor/github.com/peterh/liner/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,10 @@
+If you have a feature request, please see the Contribution Guidelines before
+proceeding.
+
+If you have a bug report, please supply the following information:
+
+- Operating System (eg. Windows, Linux, Mac)
+- Terminal Emulator (eg. xterm, gnome-terminal, konsole, ConEmu, Terminal.app, Command Prompt)
+- Bug behaviour
+- Expected behaviour
+- Complete sample that reproduces the bug
diff --git a/vendor/github.com/peterh/liner/COPYING b/vendor/github.com/peterh/liner/COPYING
new file mode 100644
index 0000000..9e8c9f2
--- /dev/null
+++ b/vendor/github.com/peterh/liner/COPYING
@@ -0,0 +1,21 @@
+Copyright © 2012 Peter Harris
+
+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 (including the next
+paragraph) 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.
+
diff --git a/vendor/github.com/peterh/liner/README.md b/vendor/github.com/peterh/liner/README.md
new file mode 100644
index 0000000..9148b24
--- /dev/null
+++ b/vendor/github.com/peterh/liner/README.md
@@ -0,0 +1,100 @@
+Liner
+=====
+
+Liner is a command line editor with history. It was inspired by linenoise;
+everything Unix-like is a VT100 (or is trying very hard to be). If your
+terminal is not pretending to be a VT100, change it. Liner also support
+Windows.
+
+Liner is released under the X11 license (which is similar to the new BSD
+license).
+
+Line Editing
+------------
+
+The following line editing commands are supported on platforms and terminals
+that Liner supports:
+
+Keystroke | Action
+--------- | ------
+Ctrl-A, Home | Move cursor to beginning of line
+Ctrl-E, End | Move cursor to end of line
+Ctrl-B, Left | Move cursor one character left
+Ctrl-F, Right| Move cursor one character right
+Ctrl-Left, Alt-B | Move cursor to previous word
+Ctrl-Right, Alt-F | Move cursor to next word
+Ctrl-D, Del | (if line is *not* empty) Delete character under cursor
+Ctrl-D | (if line *is* empty) End of File - usually quits application
+Ctrl-C | Reset input (create new empty prompt)
+Ctrl-L | Clear screen (line is unmodified)
+Ctrl-T | Transpose previous character with current character
+Ctrl-H, BackSpace | Delete character before cursor
+Ctrl-W | Delete word leading up to cursor
+Ctrl-K | Delete from cursor to end of line
+Ctrl-U | Delete from start of line to cursor
+Ctrl-P, Up | Previous match from history
+Ctrl-N, Down | Next match from history
+Ctrl-R | Reverse Search history (Ctrl-S forward, Ctrl-G cancel)
+Ctrl-Y | Paste from Yank buffer (Alt-Y to paste next yank instead)
+Tab | Next completion
+Shift-Tab | (after Tab) Previous completion
+
+Getting started
+-----------------
+
+```go
+package main
+
+import (
+ "log"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "github.com/peterh/liner"
+)
+
+var (
+ history_fn = filepath.Join(os.TempDir(), ".liner_example_history")
+ names = []string{"john", "james", "mary", "nancy"}
+)
+
+func main() {
+ line := liner.NewLiner()
+ defer line.Close()
+
+ line.SetCtrlCAborts(true)
+
+ line.SetCompleter(func(line string) (c []string) {
+ for _, n := range names {
+ if strings.HasPrefix(n, strings.ToLower(line)) {
+ c = append(c, n)
+ }
+ }
+ return
+ })
+
+ if f, err := os.Open(history_fn); err == nil {
+ line.ReadHistory(f)
+ f.Close()
+ }
+
+ if name, err := line.Prompt("What is your name? "); err == nil {
+ log.Print("Got: ", name)
+ line.AppendHistory(name)
+ } else if err == liner.ErrPromptAborted {
+ log.Print("Aborted")
+ } else {
+ log.Print("Error reading line: ", err)
+ }
+
+ if f, err := os.Create(history_fn); err != nil {
+ log.Print("Error writing history file: ", err)
+ } else {
+ line.WriteHistory(f)
+ f.Close()
+ }
+}
+```
+
+For documentation, see http://godoc.org/github.com/peterh/liner
diff --git a/vendor/github.com/peterh/liner/bsdinput.go b/vendor/github.com/peterh/liner/bsdinput.go
new file mode 100644
index 0000000..3593398
--- /dev/null
+++ b/vendor/github.com/peterh/liner/bsdinput.go
@@ -0,0 +1,41 @@
+// +build openbsd freebsd netbsd
+
+package liner
+
+import "syscall"
+
+const (
+ getTermios = syscall.TIOCGETA
+ setTermios = syscall.TIOCSETA
+)
+
+const (
+ // Input flags
+ inpck = 0x010
+ istrip = 0x020
+ icrnl = 0x100
+ ixon = 0x200
+
+ // Output flags
+ opost = 0x1
+
+ // Control flags
+ cs8 = 0x300
+
+ // Local flags
+ isig = 0x080
+ icanon = 0x100
+ iexten = 0x400
+)
+
+type termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]byte
+ Ispeed int32
+ Ospeed int32
+}
+
+const cursorColumn = false
diff --git a/vendor/github.com/peterh/liner/common.go b/vendor/github.com/peterh/liner/common.go
new file mode 100644
index 0000000..e16ecbc
--- /dev/null
+++ b/vendor/github.com/peterh/liner/common.go
@@ -0,0 +1,255 @@
+/*
+Package liner implements a simple command line editor, inspired by linenoise
+(https://github.com/antirez/linenoise/). This package supports WIN32 in
+addition to the xterm codes supported by everything else.
+*/
+package liner
+
+import (
+ "bufio"
+ "container/ring"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+ "sync"
+ "unicode/utf8"
+)
+
+type commonState struct {
+ terminalSupported bool
+ outputRedirected bool
+ inputRedirected bool
+ history []string
+ historyMutex sync.RWMutex
+ completer WordCompleter
+ columns int
+ killRing *ring.Ring
+ ctrlCAborts bool
+ r *bufio.Reader
+ tabStyle TabStyle
+ multiLineMode bool
+ cursorRows int
+ maxRows int
+ shouldRestart ShouldRestart
+ needRefresh bool
+}
+
+// TabStyle is used to select how tab completions are displayed.
+type TabStyle int
+
+// Two tab styles are currently available:
+//
+// TabCircular cycles through each completion item and displays it directly on
+// the prompt
+//
+// TabPrints prints the list of completion items to the screen after a second
+// tab key is pressed. This behaves similar to GNU readline and BASH (which
+// uses readline)
+const (
+ TabCircular TabStyle = iota
+ TabPrints
+)
+
+// ErrPromptAborted is returned from Prompt or PasswordPrompt when the user presses Ctrl-C
+// if SetCtrlCAborts(true) has been called on the State
+var ErrPromptAborted = errors.New("prompt aborted")
+
+// ErrNotTerminalOutput is returned from Prompt or PasswordPrompt if the
+// platform is normally supported, but stdout has been redirected
+var ErrNotTerminalOutput = errors.New("standard output is not a terminal")
+
+// ErrInvalidPrompt is returned from Prompt or PasswordPrompt if the
+// prompt contains any unprintable runes (including substrings that could
+// be colour codes on some platforms).
+var ErrInvalidPrompt = errors.New("invalid prompt")
+
+// ErrInternal is returned when liner experiences an error that it cannot
+// handle. For example, if the number of colums becomes zero during an
+// active call to Prompt
+var ErrInternal = errors.New("liner: internal error")
+
+// KillRingMax is the max number of elements to save on the killring.
+const KillRingMax = 60
+
+// HistoryLimit is the maximum number of entries saved in the scrollback history.
+const HistoryLimit = 1000
+
+// ReadHistory reads scrollback history from r. Returns the number of lines
+// read, and any read error (except io.EOF).
+func (s *State) ReadHistory(r io.Reader) (num int, err error) {
+ s.historyMutex.Lock()
+ defer s.historyMutex.Unlock()
+
+ in := bufio.NewReader(r)
+ num = 0
+ for {
+ line, part, err := in.ReadLine()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ return num, err
+ }
+ if part {
+ return num, fmt.Errorf("line %d is too long", num+1)
+ }
+ if !utf8.Valid(line) {
+ return num, fmt.Errorf("invalid string at line %d", num+1)
+ }
+ num++
+ s.history = append(s.history, string(line))
+ if len(s.history) > HistoryLimit {
+ s.history = s.history[1:]
+ }
+ }
+ return num, nil
+}
+
+// WriteHistory writes scrollback history to w. Returns the number of lines
+// successfully written, and any write error.
+//
+// Unlike the rest of liner's API, WriteHistory is safe to call
+// from another goroutine while Prompt is in progress.
+// This exception is to facilitate the saving of the history buffer
+// during an unexpected exit (for example, due to Ctrl-C being invoked)
+func (s *State) WriteHistory(w io.Writer) (num int, err error) {
+ s.historyMutex.RLock()
+ defer s.historyMutex.RUnlock()
+
+ for _, item := range s.history {
+ _, err := fmt.Fprintln(w, item)
+ if err != nil {
+ return num, err
+ }
+ num++
+ }
+ return num, nil
+}
+
+// AppendHistory appends an entry to the scrollback history. AppendHistory
+// should be called iff Prompt returns a valid command.
+func (s *State) AppendHistory(item string) {
+ s.historyMutex.Lock()
+ defer s.historyMutex.Unlock()
+
+ if len(s.history) > 0 {
+ if item == s.history[len(s.history)-1] {
+ return
+ }
+ }
+ s.history = append(s.history, item)
+ if len(s.history) > HistoryLimit {
+ s.history = s.history[1:]
+ }
+}
+
+// ClearHistory clears the scroollback history.
+func (s *State) ClearHistory() {
+ s.historyMutex.Lock()
+ defer s.historyMutex.Unlock()
+ s.history = nil
+}
+
+// Returns the history lines starting with prefix
+func (s *State) getHistoryByPrefix(prefix string) (ph []string) {
+ for _, h := range s.history {
+ if strings.HasPrefix(h, prefix) {
+ ph = append(ph, h)
+ }
+ }
+ return
+}
+
+// Returns the history lines matching the intelligent search
+func (s *State) getHistoryByPattern(pattern string) (ph []string, pos []int) {
+ if pattern == "" {
+ return
+ }
+ for _, h := range s.history {
+ if i := strings.Index(h, pattern); i >= 0 {
+ ph = append(ph, h)
+ pos = append(pos, i)
+ }
+ }
+ return
+}
+
+// Completer takes the currently edited line content at the left of the cursor
+// and returns a list of completion candidates.
+// If the line is "Hello, wo!!!" and the cursor is before the first '!', "Hello, wo" is passed
+// to the completer which may return {"Hello, world", "Hello, Word"} to have "Hello, world!!!".
+type Completer func(line string) []string
+
+// WordCompleter takes the currently edited line with the cursor position and
+// returns the completion candidates for the partial word to be completed.
+// If the line is "Hello, wo!!!" and the cursor is before the first '!', ("Hello, wo!!!", 9) is passed
+// to the completer which may returns ("Hello, ", {"world", "Word"}, "!!!") to have "Hello, world!!!".
+type WordCompleter func(line string, pos int) (head string, completions []string, tail string)
+
+// SetCompleter sets the completion function that Liner will call to
+// fetch completion candidates when the user presses tab.
+func (s *State) SetCompleter(f Completer) {
+ if f == nil {
+ s.completer = nil
+ return
+ }
+ s.completer = func(line string, pos int) (string, []string, string) {
+ return "", f(string([]rune(line)[:pos])), string([]rune(line)[pos:])
+ }
+}
+
+// SetWordCompleter sets the completion function that Liner will call to
+// fetch completion candidates when the user presses tab.
+func (s *State) SetWordCompleter(f WordCompleter) {
+ s.completer = f
+}
+
+// SetTabCompletionStyle sets the behvavior when the Tab key is pressed
+// for auto-completion. TabCircular is the default behavior and cycles
+// through the list of candidates at the prompt. TabPrints will print
+// the available completion candidates to the screen similar to BASH
+// and GNU Readline
+func (s *State) SetTabCompletionStyle(tabStyle TabStyle) {
+ s.tabStyle = tabStyle
+}
+
+// ModeApplier is the interface that wraps a representation of the terminal
+// mode. ApplyMode sets the terminal to this mode.
+type ModeApplier interface {
+ ApplyMode() error
+}
+
+// SetCtrlCAborts sets whether Prompt on a supported terminal will return an
+// ErrPromptAborted when Ctrl-C is pressed. The default is false (will not
+// return when Ctrl-C is pressed). Unsupported terminals typically raise SIGINT
+// (and Prompt does not return) regardless of the value passed to SetCtrlCAborts.
+func (s *State) SetCtrlCAborts(aborts bool) {
+ s.ctrlCAborts = aborts
+}
+
+// SetMultiLineMode sets whether line is auto-wrapped. The default is false (single line).
+func (s *State) SetMultiLineMode(mlmode bool) {
+ s.multiLineMode = mlmode
+}
+
+// ShouldRestart is passed the error generated by readNext and returns true if
+// the the read should be restarted or false if the error should be returned.
+type ShouldRestart func(err error) bool
+
+// SetShouldRestart sets the restart function that Liner will call to determine
+// whether to retry the call to, or return the error returned by, readNext.
+func (s *State) SetShouldRestart(f ShouldRestart) {
+ s.shouldRestart = f
+}
+
+func (s *State) promptUnsupported(p string) (string, error) {
+ if !s.inputRedirected || !s.terminalSupported {
+ fmt.Print(p)
+ }
+ linebuf, _, err := s.r.ReadLine()
+ if err != nil {
+ return "", err
+ }
+ return string(linebuf), nil
+}
diff --git a/vendor/github.com/peterh/liner/fallbackinput.go b/vendor/github.com/peterh/liner/fallbackinput.go
new file mode 100644
index 0000000..043fb33
--- /dev/null
+++ b/vendor/github.com/peterh/liner/fallbackinput.go
@@ -0,0 +1,59 @@
+// +build !windows,!linux,!darwin,!openbsd,!freebsd,!netbsd
+
+package liner
+
+import (
+ "bufio"
+ "errors"
+ "os"
+)
+
+// State represents an open terminal
+type State struct {
+ commonState
+}
+
+// Prompt displays p, and then waits for user input. Prompt does not support
+// line editing on this operating system.
+func (s *State) Prompt(p string) (string, error) {
+ return s.promptUnsupported(p)
+}
+
+// PasswordPrompt is not supported in this OS.
+func (s *State) PasswordPrompt(p string) (string, error) {
+ return "", errors.New("liner: function not supported in this terminal")
+}
+
+// NewLiner initializes a new *State
+//
+// Note that this operating system uses a fallback mode without line
+// editing. Patches welcome.
+func NewLiner() *State {
+ var s State
+ s.r = bufio.NewReader(os.Stdin)
+ return &s
+}
+
+// Close returns the terminal to its previous mode
+func (s *State) Close() error {
+ return nil
+}
+
+// TerminalSupported returns false because line editing is not
+// supported on this platform.
+func TerminalSupported() bool {
+ return false
+}
+
+type noopMode struct{}
+
+func (n noopMode) ApplyMode() error {
+ return nil
+}
+
+// TerminalMode returns a noop InputModeSetter on this platform.
+func TerminalMode() (ModeApplier, error) {
+ return noopMode{}, nil
+}
+
+const cursorColumn = true
diff --git a/vendor/github.com/peterh/liner/input.go b/vendor/github.com/peterh/liner/input.go
new file mode 100644
index 0000000..cdb8330
--- /dev/null
+++ b/vendor/github.com/peterh/liner/input.go
@@ -0,0 +1,367 @@
+// +build linux darwin openbsd freebsd netbsd
+
+package liner
+
+import (
+ "bufio"
+ "errors"
+ "os"
+ "os/signal"
+ "strconv"
+ "strings"
+ "syscall"
+ "time"
+)
+
+type nexter struct {
+ r rune
+ err error
+}
+
+// State represents an open terminal
+type State struct {
+ commonState
+ origMode termios
+ defaultMode termios
+ next <-chan nexter
+ winch chan os.Signal
+ pending []rune
+ useCHA bool
+}
+
+// NewLiner initializes a new *State, and sets the terminal into raw mode. To
+// restore the terminal to its previous state, call State.Close().
+func NewLiner() *State {
+ var s State
+ s.r = bufio.NewReader(os.Stdin)
+
+ s.terminalSupported = TerminalSupported()
+ if m, err := TerminalMode(); err == nil {
+ s.origMode = *m.(*termios)
+ } else {
+ s.inputRedirected = true
+ }
+ if _, err := getMode(syscall.Stdout); err != 0 {
+ s.outputRedirected = true
+ }
+ if s.inputRedirected && s.outputRedirected {
+ s.terminalSupported = false
+ }
+ if s.terminalSupported && !s.inputRedirected && !s.outputRedirected {
+ mode := s.origMode
+ mode.Iflag &^= icrnl | inpck | istrip | ixon
+ mode.Cflag |= cs8
+ mode.Lflag &^= syscall.ECHO | icanon | iexten
+ mode.ApplyMode()
+
+ winch := make(chan os.Signal, 1)
+ signal.Notify(winch, syscall.SIGWINCH)
+ s.winch = winch
+
+ s.checkOutput()
+ }
+
+ if !s.outputRedirected {
+ s.outputRedirected = !s.getColumns()
+ }
+
+ return &s
+}
+
+var errTimedOut = errors.New("timeout")
+
+func (s *State) startPrompt() {
+ if s.terminalSupported {
+ if m, err := TerminalMode(); err == nil {
+ s.defaultMode = *m.(*termios)
+ mode := s.defaultMode
+ mode.Lflag &^= isig
+ mode.ApplyMode()
+ }
+ }
+ s.restartPrompt()
+}
+
+func (s *State) inputWaiting() bool {
+ return len(s.next) > 0
+}
+
+func (s *State) restartPrompt() {
+ next := make(chan nexter, 200)
+ go func() {
+ for {
+ var n nexter
+ n.r, _, n.err = s.r.ReadRune()
+ next <- n
+ // Shut down nexter loop when an end condition has been reached
+ if n.err != nil || n.r == '\n' || n.r == '\r' || n.r == ctrlC || n.r == ctrlD {
+ close(next)
+ return
+ }
+ }
+ }()
+ s.next = next
+}
+
+func (s *State) stopPrompt() {
+ if s.terminalSupported {
+ s.defaultMode.ApplyMode()
+ }
+}
+
+func (s *State) nextPending(timeout <-chan time.Time) (rune, error) {
+ select {
+ case thing, ok := <-s.next:
+ if !ok {
+ return 0, ErrInternal
+ }
+ if thing.err != nil {
+ return 0, thing.err
+ }
+ s.pending = append(s.pending, thing.r)
+ return thing.r, nil
+ case <-timeout:
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, errTimedOut
+ }
+}
+
+func (s *State) readNext() (interface{}, error) {
+ if len(s.pending) > 0 {
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, nil
+ }
+ var r rune
+ select {
+ case thing, ok := <-s.next:
+ if !ok {
+ return 0, ErrInternal
+ }
+ if thing.err != nil {
+ return nil, thing.err
+ }
+ r = thing.r
+ case <-s.winch:
+ s.getColumns()
+ return winch, nil
+ }
+ if r != esc {
+ return r, nil
+ }
+ s.pending = append(s.pending, r)
+
+ // Wait at most 50 ms for the rest of the escape sequence
+ // If nothing else arrives, it was an actual press of the esc key
+ timeout := time.After(50 * time.Millisecond)
+ flag, err := s.nextPending(timeout)
+ if err != nil {
+ if err == errTimedOut {
+ return flag, nil
+ }
+ return unknown, err
+ }
+
+ switch flag {
+ case '[':
+ code, err := s.nextPending(timeout)
+ if err != nil {
+ if err == errTimedOut {
+ return code, nil
+ }
+ return unknown, err
+ }
+ switch code {
+ case 'A':
+ s.pending = s.pending[:0] // escape code complete
+ return up, nil
+ case 'B':
+ s.pending = s.pending[:0] // escape code complete
+ return down, nil
+ case 'C':
+ s.pending = s.pending[:0] // escape code complete
+ return right, nil
+ case 'D':
+ s.pending = s.pending[:0] // escape code complete
+ return left, nil
+ case 'F':
+ s.pending = s.pending[:0] // escape code complete
+ return end, nil
+ case 'H':
+ s.pending = s.pending[:0] // escape code complete
+ return home, nil
+ case 'Z':
+ s.pending = s.pending[:0] // escape code complete
+ return shiftTab, nil
+ case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ num := []rune{code}
+ for {
+ code, err := s.nextPending(timeout)
+ if err != nil {
+ if err == errTimedOut {
+ return code, nil
+ }
+ return nil, err
+ }
+ switch code {
+ case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ num = append(num, code)
+ case ';':
+ // Modifier code to follow
+ // This only supports Ctrl-left and Ctrl-right for now
+ x, _ := strconv.ParseInt(string(num), 10, 32)
+ if x != 1 {
+ // Can't be left or right
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, nil
+ }
+ num = num[:0]
+ for {
+ code, err = s.nextPending(timeout)
+ if err != nil {
+ if err == errTimedOut {
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, nil
+ }
+ return nil, err
+ }
+ switch code {
+ case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ num = append(num, code)
+ case 'C', 'D':
+ // right, left
+ mod, _ := strconv.ParseInt(string(num), 10, 32)
+ if mod != 5 {
+ // Not bare Ctrl
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, nil
+ }
+ s.pending = s.pending[:0] // escape code complete
+ if code == 'C' {
+ return wordRight, nil
+ }
+ return wordLeft, nil
+ default:
+ // Not left or right
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, nil
+ }
+ }
+ case '~':
+ s.pending = s.pending[:0] // escape code complete
+ x, _ := strconv.ParseInt(string(num), 10, 32)
+ switch x {
+ case 2:
+ return insert, nil
+ case 3:
+ return del, nil
+ case 5:
+ return pageUp, nil
+ case 6:
+ return pageDown, nil
+ case 7:
+ return home, nil
+ case 8:
+ return end, nil
+ case 15:
+ return f5, nil
+ case 17:
+ return f6, nil
+ case 18:
+ return f7, nil
+ case 19:
+ return f8, nil
+ case 20:
+ return f9, nil
+ case 21:
+ return f10, nil
+ case 23:
+ return f11, nil
+ case 24:
+ return f12, nil
+ default:
+ return unknown, nil
+ }
+ default:
+ // unrecognized escape code
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, nil
+ }
+ }
+ }
+
+ case 'O':
+ code, err := s.nextPending(timeout)
+ if err != nil {
+ if err == errTimedOut {
+ return code, nil
+ }
+ return nil, err
+ }
+ s.pending = s.pending[:0] // escape code complete
+ switch code {
+ case 'c':
+ return wordRight, nil
+ case 'd':
+ return wordLeft, nil
+ case 'H':
+ return home, nil
+ case 'F':
+ return end, nil
+ case 'P':
+ return f1, nil
+ case 'Q':
+ return f2, nil
+ case 'R':
+ return f3, nil
+ case 'S':
+ return f4, nil
+ default:
+ return unknown, nil
+ }
+ case 'b':
+ s.pending = s.pending[:0] // escape code complete
+ return altB, nil
+ case 'd':
+ s.pending = s.pending[:0] // escape code complete
+ return altD, nil
+ case 'f':
+ s.pending = s.pending[:0] // escape code complete
+ return altF, nil
+ case 'y':
+ s.pending = s.pending[:0] // escape code complete
+ return altY, nil
+ default:
+ rv := s.pending[0]
+ s.pending = s.pending[1:]
+ return rv, nil
+ }
+
+ // not reached
+ return r, nil
+}
+
+// Close returns the terminal to its previous mode
+func (s *State) Close() error {
+ signal.Stop(s.winch)
+ if !s.inputRedirected {
+ s.origMode.ApplyMode()
+ }
+ return nil
+}
+
+// TerminalSupported returns true if the current terminal supports
+// line editing features, and false if liner will use the 'dumb'
+// fallback for input.
+// Note that TerminalSupported does not check all factors that may
+// cause liner to not fully support the terminal (such as stdin redirection)
+func TerminalSupported() bool {
+ bad := map[string]bool{"": true, "dumb": true, "cons25": true}
+ return !bad[strings.ToLower(os.Getenv("TERM"))]
+}
diff --git a/vendor/github.com/peterh/liner/input_darwin.go b/vendor/github.com/peterh/liner/input_darwin.go
new file mode 100644
index 0000000..e98ab4a
--- /dev/null
+++ b/vendor/github.com/peterh/liner/input_darwin.go
@@ -0,0 +1,43 @@
+// +build darwin
+
+package liner
+
+import "syscall"
+
+const (
+ getTermios = syscall.TIOCGETA
+ setTermios = syscall.TIOCSETA
+)
+
+const (
+ // Input flags
+ inpck = 0x010
+ istrip = 0x020
+ icrnl = 0x100
+ ixon = 0x200
+
+ // Output flags
+ opost = 0x1
+
+ // Control flags
+ cs8 = 0x300
+
+ // Local flags
+ isig = 0x080
+ icanon = 0x100
+ iexten = 0x400
+)
+
+type termios struct {
+ Iflag uintptr
+ Oflag uintptr
+ Cflag uintptr
+ Lflag uintptr
+ Cc [20]byte
+ Ispeed uintptr
+ Ospeed uintptr
+}
+
+// Terminal.app needs a column for the cursor when the input line is at the
+// bottom of the window.
+const cursorColumn = true
diff --git a/vendor/github.com/peterh/liner/input_linux.go b/vendor/github.com/peterh/liner/input_linux.go
new file mode 100644
index 0000000..56ed185
--- /dev/null
+++ b/vendor/github.com/peterh/liner/input_linux.go
@@ -0,0 +1,28 @@
+// +build linux
+
+package liner
+
+import "syscall"
+
+const (
+ getTermios = syscall.TCGETS
+ setTermios = syscall.TCSETS
+)
+
+const (
+ icrnl = syscall.ICRNL
+ inpck = syscall.INPCK
+ istrip = syscall.ISTRIP
+ ixon = syscall.IXON
+ opost = syscall.OPOST
+ cs8 = syscall.CS8
+ isig = syscall.ISIG
+ icanon = syscall.ICANON
+ iexten = syscall.IEXTEN
+)
+
+type termios struct {
+ syscall.Termios
+}
+
+const cursorColumn = false
diff --git a/vendor/github.com/peterh/liner/input_test.go b/vendor/github.com/peterh/liner/input_test.go
new file mode 100644
index 0000000..e515a48
--- /dev/null
+++ b/vendor/github.com/peterh/liner/input_test.go
@@ -0,0 +1,61 @@
+// +build !windows
+
+package liner
+
+import (
+ "bufio"
+ "bytes"
+ "testing"
+)
+
+func (s *State) expectRune(t *testing.T, r rune) {
+ item, err := s.readNext()
+ if err != nil {
+ t.Fatalf("Expected rune '%c', got error %s\n", r, err)
+ }
+ if v, ok := item.(rune); !ok {
+ t.Fatalf("Expected rune '%c', got non-rune %v\n", r, v)
+ } else {
+ if v != r {
+ t.Fatalf("Expected rune '%c', got rune '%c'\n", r, v)
+ }
+ }
+}
+
+func (s *State) expectAction(t *testing.T, a action) {
+ item, err := s.readNext()
+ if err != nil {
+ t.Fatalf("Expected Action %d, got error %s\n", a, err)
+ }
+ if v, ok := item.(action); !ok {
+ t.Fatalf("Expected Action %d, got non-Action %v\n", a, v)
+ } else {
+ if v != a {
+ t.Fatalf("Expected Action %d, got Action %d\n", a, v)
+ }
+ }
+}
+
+func TestTypes(t *testing.T) {
+ input := []byte{'A', 27, 'B', 27, 91, 68, 27, '[', '1', ';', '5', 'D', 'e'}
+ var s State
+ s.r = bufio.NewReader(bytes.NewBuffer(input))
+
+ next := make(chan nexter)
+ go func() {
+ for {
+ var n nexter
+ n.r, _, n.err = s.r.ReadRune()
+ next <- n
+ }
+ }()
+ s.next = next
+
+ s.expectRune(t, 'A')
+ s.expectRune(t, 27)
+ s.expectRune(t, 'B')
+ s.expectAction(t, left)
+ s.expectAction(t, wordLeft)
+
+ s.expectRune(t, 'e')
+}
diff --git a/vendor/github.com/peterh/liner/input_windows.go b/vendor/github.com/peterh/liner/input_windows.go
new file mode 100644
index 0000000..36e9516
--- /dev/null
+++ b/vendor/github.com/peterh/liner/input_windows.go
@@ -0,0 +1,364 @@
+package liner
+
+import (
+ "bufio"
+ "os"
+ "syscall"
+ "unicode/utf16"
+ "unsafe"
+)
+
+var (
+ kernel32 = syscall.NewLazyDLL("kernel32.dll")
+
+ procGetStdHandle = kernel32.NewProc("GetStdHandle")
+ procReadConsoleInput = kernel32.NewProc("ReadConsoleInputW")
+ procGetNumberOfConsoleInputEvents = kernel32.NewProc("GetNumberOfConsoleInputEvents")
+ procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
+ procSetConsoleMode = kernel32.NewProc("SetConsoleMode")
+ procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition")
+ procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
+ procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW")
+)
+
+// These names are from the Win32 api, so they use underscores (contrary to
+// what golint suggests)
+const (
+ std_input_handle = uint32(-10 & 0xFFFFFFFF)
+ std_output_handle = uint32(-11 & 0xFFFFFFFF)
+ std_error_handle = uint32(-12 & 0xFFFFFFFF)
+ invalid_handle_value = ^uintptr(0)
+)
+
+type inputMode uint32
+
+// State represents an open terminal
+type State struct {
+ commonState
+ handle syscall.Handle
+ hOut syscall.Handle
+ origMode inputMode
+ defaultMode inputMode
+ key interface{}
+ repeat uint16
+}
+
+const (
+ enableEchoInput = 0x4
+ enableInsertMode = 0x20
+ enableLineInput = 0x2
+ enableMouseInput = 0x10
+ enableProcessedInput = 0x1
+ enableQuickEditMode = 0x40
+ enableWindowInput = 0x8
+)
+
+// NewLiner initializes a new *State, and sets the terminal into raw mode. To
+// restore the terminal to its previous state, call State.Close().
+func NewLiner() *State {
+ var s State
+ hIn, _, _ := procGetStdHandle.Call(uintptr(std_input_handle))
+ s.handle = syscall.Handle(hIn)
+ hOut, _, _ := procGetStdHandle.Call(uintptr(std_output_handle))
+ s.hOut = syscall.Handle(hOut)
+
+ s.terminalSupported = true
+ if m, err := TerminalMode(); err == nil {
+ s.origMode = m.(inputMode)
+ mode := s.origMode
+ mode &^= enableEchoInput
+ mode &^= enableInsertMode
+ mode &^= enableLineInput
+ mode &^= enableMouseInput
+ mode |= enableWindowInput
+ mode.ApplyMode()
+ } else {
+ s.inputRedirected = true
+ s.r = bufio.NewReader(os.Stdin)
+ }
+
+ s.getColumns()
+ s.outputRedirected = s.columns <= 0
+
+ return &s
+}
+
+// These names are from the Win32 api, so they use underscores (contrary to
+// what golint suggests)
+const (
+ focus_event = 0x0010
+ key_event = 0x0001
+ menu_event = 0x0008
+ mouse_event = 0x0002
+ window_buffer_size_event = 0x0004
+)
+
+type input_record struct {
+ eventType uint16
+ pad uint16
+ blob [16]byte
+}
+
+type key_event_record struct {
+ KeyDown int32
+ RepeatCount uint16
+ VirtualKeyCode uint16
+ VirtualScanCode uint16
+ Char uint16
+ ControlKeyState uint32
+}
+
+// These names are from the Win32 api, so they use underscores (contrary to
+// what golint suggests)
+const (
+ vk_tab = 0x09
+ vk_menu = 0x12 // ALT key
+ vk_prior = 0x21
+ vk_next = 0x22
+ vk_end = 0x23
+ vk_home = 0x24
+ vk_left = 0x25
+ vk_up = 0x26
+ vk_right = 0x27
+ vk_down = 0x28
+ vk_insert = 0x2d
+ vk_delete = 0x2e
+ vk_f1 = 0x70
+ vk_f2 = 0x71
+ vk_f3 = 0x72
+ vk_f4 = 0x73
+ vk_f5 = 0x74
+ vk_f6 = 0x75
+ vk_f7 = 0x76
+ vk_f8 = 0x77
+ vk_f9 = 0x78
+ vk_f10 = 0x79
+ vk_f11 = 0x7a
+ vk_f12 = 0x7b
+ bKey = 0x42
+ dKey = 0x44
+ fKey = 0x46
+ yKey = 0x59
+)
+
+const (
+ shiftPressed = 0x0010
+ leftAltPressed = 0x0002
+ leftCtrlPressed = 0x0008
+ rightAltPressed = 0x0001
+ rightCtrlPressed = 0x0004
+
+ modKeys = shiftPressed | leftAltPressed | rightAltPressed | leftCtrlPressed | rightCtrlPressed
+)
+
+// inputWaiting only returns true if the next call to readNext will return immediately.
+func (s *State) inputWaiting() bool {
+ var num uint32
+ ok, _, _ := procGetNumberOfConsoleInputEvents.Call(uintptr(s.handle), uintptr(unsafe.Pointer(&num)))
+ if ok == 0 {
+ // call failed, so we cannot guarantee a non-blocking readNext
+ return false
+ }
+
+ // during a "paste" input events are always an odd number, and
+ // the last one results in a blocking readNext, so return false
+ // when num is 1 or 0.
+ return num > 1
+}
+
+func (s *State) readNext() (interface{}, error) {
+ if s.repeat > 0 {
+ s.repeat--
+ return s.key, nil
+ }
+
+ var input input_record
+ pbuf := uintptr(unsafe.Pointer(&input))
+ var rv uint32
+ prv := uintptr(unsafe.Pointer(&rv))
+
+ var surrogate uint16
+
+ for {
+ ok, _, err := procReadConsoleInput.Call(uintptr(s.handle), pbuf, 1, prv)
+
+ if ok == 0 {
+ return nil, err
+ }
+
+ if input.eventType == window_buffer_size_event {
+ xy := (*coord)(unsafe.Pointer(&input.blob[0]))
+ s.columns = int(xy.x)
+ return winch, nil
+ }
+ if input.eventType != key_event {
+ continue
+ }
+ ke := (*key_event_record)(unsafe.Pointer(&input.blob[0]))
+ if ke.KeyDown == 0 {
+ if ke.VirtualKeyCode == vk_menu && ke.Char > 0 {
+ // paste of unicode (eg. via ALT-numpad)
+ if surrogate > 0 {
+ return utf16.DecodeRune(rune(surrogate), rune(ke.Char)), nil
+ } else if utf16.IsSurrogate(rune(ke.Char)) {
+ surrogate = ke.Char
+ continue
+ } else {
+ return rune(ke.Char), nil
+ }
+ }
+ continue
+ }
+
+ if ke.VirtualKeyCode == vk_tab && ke.ControlKeyState&modKeys == shiftPressed {
+ s.key = shiftTab
+ } else if ke.VirtualKeyCode == bKey && (ke.ControlKeyState&modKeys == leftAltPressed ||
+ ke.ControlKeyState&modKeys == rightAltPressed) {
+ s.key = altB
+ } else if ke.VirtualKeyCode == dKey && (ke.ControlKeyState&modKeys == leftAltPressed ||
+ ke.ControlKeyState&modKeys == rightAltPressed) {
+ s.key = altD
+ } else if ke.VirtualKeyCode == fKey && (ke.ControlKeyState&modKeys == leftAltPressed ||
+ ke.ControlKeyState&modKeys == rightAltPressed) {
+ s.key = altF
+ } else if ke.VirtualKeyCode == yKey && (ke.ControlKeyState&modKeys == leftAltPressed ||
+ ke.ControlKeyState&modKeys == rightAltPressed) {
+ s.key = altY
+ } else if ke.Char > 0 {
+ if surrogate > 0 {
+ s.key = utf16.DecodeRune(rune(surrogate), rune(ke.Char))
+ } else if utf16.IsSurrogate(rune(ke.Char)) {
+ surrogate = ke.Char
+ continue
+ } else {
+ s.key = rune(ke.Char)
+ }
+ } else {
+ switch ke.VirtualKeyCode {
+ case vk_prior:
+ s.key = pageUp
+ case vk_next:
+ s.key = pageDown
+ case vk_end:
+ s.key = end
+ case vk_home:
+ s.key = home
+ case vk_left:
+ s.key = left
+ if ke.ControlKeyState&(leftCtrlPressed|rightCtrlPressed) != 0 {
+ if ke.ControlKeyState&modKeys == ke.ControlKeyState&(leftCtrlPressed|rightCtrlPressed) {
+ s.key = wordLeft
+ }
+ }
+ case vk_right:
+ s.key = right
+ if ke.ControlKeyState&(leftCtrlPressed|rightCtrlPressed) != 0 {
+ if ke.ControlKeyState&modKeys == ke.ControlKeyState&(leftCtrlPressed|rightCtrlPressed) {
+ s.key = wordRight
+ }
+ }
+ case vk_up:
+ s.key = up
+ case vk_down:
+ s.key = down
+ case vk_insert:
+ s.key = insert
+ case vk_delete:
+ s.key = del
+ case vk_f1:
+ s.key = f1
+ case vk_f2:
+ s.key = f2
+ case vk_f3:
+ s.key = f3
+ case vk_f4:
+ s.key = f4
+ case vk_f5:
+ s.key = f5
+ case vk_f6:
+ s.key = f6
+ case vk_f7:
+ s.key = f7
+ case vk_f8:
+ s.key = f8
+ case vk_f9:
+ s.key = f9
+ case vk_f10:
+ s.key = f10
+ case vk_f11:
+ s.key = f11
+ case vk_f12:
+ s.key = f12
+ default:
+ // Eat modifier keys
+ // TODO: return Action(Unknown) if the key isn't a
+ // modifier.
+ continue
+ }
+ }
+
+ if ke.RepeatCount > 1 {
+ s.repeat = ke.RepeatCount - 1
+ }
+ return s.key, nil
+ }
+}
+
+// Close returns the terminal to its previous mode
+func (s *State) Close() error {
+ s.origMode.ApplyMode()
+ return nil
+}
+
+func (s *State) startPrompt() {
+ if m, err := TerminalMode(); err == nil {
+ s.defaultMode = m.(inputMode)
+ mode := s.defaultMode
+ mode &^= enableProcessedInput
+ mode.ApplyMode()
+ }
+}
+
+func (s *State) restartPrompt() {
+}
+
+func (s *State) stopPrompt() {
+ s.defaultMode.ApplyMode()
+}
+
+// TerminalSupported returns true because line editing is always
+// supported on Windows.
+func TerminalSupported() bool {
+ return true
+}
+
+func (mode inputMode) ApplyMode() error {
+ hIn, _, err := procGetStdHandle.Call(uintptr(std_input_handle))
+ if hIn == invalid_handle_value || hIn == 0 {
+ return err
+ }
+ ok, _, err := procSetConsoleMode.Call(hIn, uintptr(mode))
+ if ok != 0 {
+ err = nil
+ }
+ return err
+}
+
+// TerminalMode returns the current terminal input mode as an InputModeSetter.
+//
+// This function is provided for convenience, and should
+// not be necessary for most users of liner.
+func TerminalMode() (ModeApplier, error) {
+ var mode inputMode
+ hIn, _, err := procGetStdHandle.Call(uintptr(std_input_handle))
+ if hIn == invalid_handle_value || hIn == 0 {
+ return nil, err
+ }
+ ok, _, err := procGetConsoleMode.Call(hIn, uintptr(unsafe.Pointer(&mode)))
+ if ok != 0 {
+ err = nil
+ }
+ return mode, err
+}
+
+const cursorColumn = true
diff --git a/vendor/github.com/peterh/liner/line.go b/vendor/github.com/peterh/liner/line.go
new file mode 100644
index 0000000..c01cba1
--- /dev/null
+++ b/vendor/github.com/peterh/liner/line.go
@@ -0,0 +1,1171 @@
+// +build windows linux darwin openbsd freebsd netbsd
+
+package liner
+
+import (
+ "bufio"
+ "container/ring"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+)
+
+type action int
+
+const (
+ left action = iota
+ right
+ up
+ down
+ home
+ end
+ insert
+ del
+ pageUp
+ pageDown
+ f1
+ f2
+ f3
+ f4
+ f5
+ f6
+ f7
+ f8
+ f9
+ f10
+ f11
+ f12
+ altB
+ altD
+ altF
+ altY
+ shiftTab
+ wordLeft
+ wordRight
+ winch
+ unknown
+)
+
+const (
+ ctrlA = 1
+ ctrlB = 2
+ ctrlC = 3
+ ctrlD = 4
+ ctrlE = 5
+ ctrlF = 6
+ ctrlG = 7
+ ctrlH = 8
+ tab = 9
+ lf = 10
+ ctrlK = 11
+ ctrlL = 12
+ cr = 13
+ ctrlN = 14
+ ctrlO = 15
+ ctrlP = 16
+ ctrlQ = 17
+ ctrlR = 18
+ ctrlS = 19
+ ctrlT = 20
+ ctrlU = 21
+ ctrlV = 22
+ ctrlW = 23
+ ctrlX = 24
+ ctrlY = 25
+ ctrlZ = 26
+ esc = 27
+ bs = 127
+)
+
+const (
+ beep = "\a"
+)
+
+type tabDirection int
+
+const (
+ tabForward tabDirection = iota
+ tabReverse
+)
+
+func (s *State) refresh(prompt []rune, buf []rune, pos int) error {
+ if s.columns == 0 {
+ return ErrInternal
+ }
+
+ s.needRefresh = false
+ if s.multiLineMode {
+ return s.refreshMultiLine(prompt, buf, pos)
+ }
+ return s.refreshSingleLine(prompt, buf, pos)
+}
+
+func (s *State) refreshSingleLine(prompt []rune, buf []rune, pos int) error {
+ s.cursorPos(0)
+ _, err := fmt.Print(string(prompt))
+ if err != nil {
+ return err
+ }
+
+ pLen := countGlyphs(prompt)
+ bLen := countGlyphs(buf)
+ // on some OS / terminals extra column is needed to place the cursor char
+ if cursorColumn {
+ bLen++
+ }
+ pos = countGlyphs(buf[:pos])
+ if pLen+bLen < s.columns {
+ _, err = fmt.Print(string(buf))
+ s.eraseLine()
+ s.cursorPos(pLen + pos)
+ } else {
+ // Find space available
+ space := s.columns - pLen
+ space-- // space for cursor
+ start := pos - space/2
+ end := start + space
+ if end > bLen {
+ end = bLen
+ start = end - space
+ }
+ if start < 0 {
+ start = 0
+ end = space
+ }
+ pos -= start
+
+ // Leave space for markers
+ if start > 0 {
+ start++
+ }
+ if end < bLen {
+ end--
+ }
+ startRune := len(getPrefixGlyphs(buf, start))
+ line := getPrefixGlyphs(buf[startRune:], end-start)
+
+ // Output
+ if start > 0 {
+ fmt.Print("{")
+ }
+ fmt.Print(string(line))
+ if end < bLen {
+ fmt.Print("}")
+ }
+
+ // Set cursor position
+ s.eraseLine()
+ s.cursorPos(pLen + pos)
+ }
+ return err
+}
+
+func (s *State) refreshMultiLine(prompt []rune, buf []rune, pos int) error {
+ promptColumns := countMultiLineGlyphs(prompt, s.columns, 0)
+ totalColumns := countMultiLineGlyphs(buf, s.columns, promptColumns)
+ // on some OS / terminals extra column is needed to place the cursor char
+ // if cursorColumn {
+ // totalColumns++
+ // }
+
+ // it looks like Multiline mode always assume that a cursor need an extra column,
+ // and always emit a newline if we are at the screen end, so no worarounds needed there
+
+ totalRows := (totalColumns + s.columns - 1) / s.columns
+ maxRows := s.maxRows
+ if totalRows > s.maxRows {
+ s.maxRows = totalRows
+ }
+ cursorRows := s.cursorRows
+ if cursorRows == 0 {
+ cursorRows = 1
+ }
+
+ /* First step: clear all the lines used before. To do so start by
+ * going to the last row. */
+ if maxRows-cursorRows > 0 {
+ s.moveDown(maxRows - cursorRows)
+ }
+
+ /* Now for every row clear it, go up. */
+ for i := 0; i < maxRows-1; i++ {
+ s.cursorPos(0)
+ s.eraseLine()
+ s.moveUp(1)
+ }
+
+ /* Clean the top line. */
+ s.cursorPos(0)
+ s.eraseLine()
+
+ /* Write the prompt and the current buffer content */
+ if _, err := fmt.Print(string(prompt)); err != nil {
+ return err
+ }
+ if _, err := fmt.Print(string(buf)); err != nil {
+ return err
+ }
+
+ /* If we are at the very end of the screen with our prompt, we need to
+ * emit a newline and move the prompt to the first column. */
+ cursorColumns := countMultiLineGlyphs(buf[:pos], s.columns, promptColumns)
+ if cursorColumns == totalColumns && totalColumns%s.columns == 0 {
+ s.emitNewLine()
+ s.cursorPos(0)
+ totalRows++
+ if totalRows > s.maxRows {
+ s.maxRows = totalRows
+ }
+ }
+
+ /* Move cursor to right position. */
+ cursorRows = (cursorColumns + s.columns) / s.columns
+ if s.cursorRows > 0 && totalRows-cursorRows > 0 {
+ s.moveUp(totalRows - cursorRows)
+ }
+ /* Set column. */
+ s.cursorPos(cursorColumns % s.columns)
+
+ s.cursorRows = cursorRows
+ return nil
+}
+
+func (s *State) resetMultiLine(prompt []rune, buf []rune, pos int) {
+ columns := countMultiLineGlyphs(prompt, s.columns, 0)
+ columns = countMultiLineGlyphs(buf[:pos], s.columns, columns)
+ columns += 2 // ^C
+ cursorRows := (columns + s.columns) / s.columns
+ if s.maxRows-cursorRows > 0 {
+ for i := 0; i < s.maxRows-cursorRows; i++ {
+ fmt.Println() // always moves the cursor down or scrolls the window up as needed
+ }
+ }
+ s.maxRows = 1
+ s.cursorRows = 0
+}
+
+func longestCommonPrefix(strs []string) string {
+ if len(strs) == 0 {
+ return ""
+ }
+ longest := strs[0]
+
+ for _, str := range strs[1:] {
+ for !strings.HasPrefix(str, longest) {
+ longest = longest[:len(longest)-1]
+ }
+ }
+ // Remove trailing partial runes
+ longest = strings.TrimRight(longest, "\uFFFD")
+ return longest
+}
+
+func (s *State) circularTabs(items []string) func(tabDirection) (string, error) {
+ item := -1
+ return func(direction tabDirection) (string, error) {
+ if direction == tabForward {
+ if item < len(items)-1 {
+ item++
+ } else {
+ item = 0
+ }
+ } else if direction == tabReverse {
+ if item > 0 {
+ item--
+ } else {
+ item = len(items) - 1
+ }
+ }
+ return items[item], nil
+ }
+}
+
+func calculateColumns(screenWidth int, items []string) (numColumns, numRows, maxWidth int) {
+ for _, item := range items {
+ if len(item) >= screenWidth {
+ return 1, len(items), screenWidth - 1
+ }
+ if len(item) >= maxWidth {
+ maxWidth = len(item) + 1
+ }
+ }
+
+ numColumns = screenWidth / maxWidth
+ numRows = len(items) / numColumns
+ if len(items)%numColumns > 0 {
+ numRows++
+ }
+
+ if len(items) <= numColumns {
+ maxWidth = 0
+ }
+
+ return
+}
+
+func (s *State) printedTabs(items []string) func(tabDirection) (string, error) {
+ numTabs := 1
+ prefix := longestCommonPrefix(items)
+ return func(direction tabDirection) (string, error) {
+ if len(items) == 1 {
+ return items[0], nil
+ }
+
+ if numTabs == 2 {
+ if len(items) > 100 {
+ fmt.Printf("\nDisplay all %d possibilities? (y or n) ", len(items))
+ prompt:
+ for {
+ next, err := s.readNext()
+ if err != nil {
+ return prefix, err
+ }
+
+ if key, ok := next.(rune); ok {
+ switch key {
+ case 'n', 'N':
+ return prefix, nil
+ case 'y', 'Y':
+ break prompt
+ case ctrlC, ctrlD, cr, lf:
+ s.restartPrompt()
+ }
+ }
+ }
+ }
+ fmt.Println("")
+
+ numColumns, numRows, maxWidth := calculateColumns(s.columns, items)
+
+ for i := 0; i < numRows; i++ {
+ for j := 0; j < numColumns*numRows; j += numRows {
+ if i+j < len(items) {
+ if maxWidth > 0 {
+ fmt.Printf("%-*.[1]*s", maxWidth, items[i+j])
+ } else {
+ fmt.Printf("%v ", items[i+j])
+ }
+ }
+ }
+ fmt.Println("")
+ }
+ } else {
+ numTabs++
+ }
+ return prefix, nil
+ }
+}
+
+func (s *State) tabComplete(p []rune, line []rune, pos int) ([]rune, int, interface{}, error) {
+ if s.completer == nil {
+ return line, pos, rune(esc), nil
+ }
+ head, list, tail := s.completer(string(line), pos)
+ if len(list) <= 0 {
+ return line, pos, rune(esc), nil
+ }
+ hl := utf8.RuneCountInString(head)
+ if len(list) == 1 {
+ err := s.refresh(p, []rune(head+list[0]+tail), hl+utf8.RuneCountInString(list[0]))
+ return []rune(head + list[0] + tail), hl + utf8.RuneCountInString(list[0]), rune(esc), err
+ }
+
+ direction := tabForward
+ tabPrinter := s.circularTabs(list)
+ if s.tabStyle == TabPrints {
+ tabPrinter = s.printedTabs(list)
+ }
+
+ for {
+ pick, err := tabPrinter(direction)
+ if err != nil {
+ return line, pos, rune(esc), err
+ }
+ err = s.refresh(p, []rune(head+pick+tail), hl+utf8.RuneCountInString(pick))
+ if err != nil {
+ return line, pos, rune(esc), err
+ }
+
+ next, err := s.readNext()
+ if err != nil {
+ return line, pos, rune(esc), err
+ }
+ if key, ok := next.(rune); ok {
+ if key == tab {
+ direction = tabForward
+ continue
+ }
+ if key == esc {
+ return line, pos, rune(esc), nil
+ }
+ }
+ if a, ok := next.(action); ok && a == shiftTab {
+ direction = tabReverse
+ continue
+ }
+ return []rune(head + pick + tail), hl + utf8.RuneCountInString(pick), next, nil
+ }
+}
+
+// reverse intelligent search, implements a bash-like history search.
+func (s *State) reverseISearch(origLine []rune, origPos int) ([]rune, int, interface{}, error) {
+ p := "(reverse-i-search)`': "
+ err := s.refresh([]rune(p), origLine, origPos)
+ if err != nil {
+ return origLine, origPos, rune(esc), err
+ }
+
+ line := []rune{}
+ pos := 0
+ foundLine := string(origLine)
+ foundPos := origPos
+
+ getLine := func() ([]rune, []rune, int) {
+ search := string(line)
+ prompt := "(reverse-i-search)`%s': "
+ return []rune(fmt.Sprintf(prompt, search)), []rune(foundLine), foundPos
+ }
+
+ history, positions := s.getHistoryByPattern(string(line))
+ historyPos := len(history) - 1
+
+ for {
+ next, err := s.readNext()
+ if err != nil {
+ return []rune(foundLine), foundPos, rune(esc), err
+ }
+
+ switch v := next.(type) {
+ case rune:
+ switch v {
+ case ctrlR: // Search backwards
+ if historyPos > 0 && historyPos < len(history) {
+ historyPos--
+ foundLine = history[historyPos]
+ foundPos = positions[historyPos]
+ } else {
+ fmt.Print(beep)
+ }
+ case ctrlS: // Search forward
+ if historyPos < len(history)-1 && historyPos >= 0 {
+ historyPos++
+ foundLine = history[historyPos]
+ foundPos = positions[historyPos]
+ } else {
+ fmt.Print(beep)
+ }
+ case ctrlH, bs: // Backspace
+ if pos <= 0 {
+ fmt.Print(beep)
+ } else {
+ n := len(getSuffixGlyphs(line[:pos], 1))
+ line = append(line[:pos-n], line[pos:]...)
+ pos -= n
+
+ // For each char deleted, display the last matching line of history
+ history, positions := s.getHistoryByPattern(string(line))
+ historyPos = len(history) - 1
+ if len(history) > 0 {
+ foundLine = history[historyPos]
+ foundPos = positions[historyPos]
+ } else {
+ foundLine = ""
+ foundPos = 0
+ }
+ }
+ case ctrlG: // Cancel
+ return origLine, origPos, rune(esc), err
+
+ case tab, cr, lf, ctrlA, ctrlB, ctrlD, ctrlE, ctrlF, ctrlK,
+ ctrlL, ctrlN, ctrlO, ctrlP, ctrlQ, ctrlT, ctrlU, ctrlV, ctrlW, ctrlX, ctrlY, ctrlZ:
+ fallthrough
+ case 0, ctrlC, esc, 28, 29, 30, 31:
+ return []rune(foundLine), foundPos, next, err
+ default:
+ line = append(line[:pos], append([]rune{v}, line[pos:]...)...)
+ pos++
+
+ // For each keystroke typed, display the last matching line of history
+ history, positions = s.getHistoryByPattern(string(line))
+ historyPos = len(history) - 1
+ if len(history) > 0 {
+ foundLine = history[historyPos]
+ foundPos = positions[historyPos]
+ } else {
+ foundLine = ""
+ foundPos = 0
+ }
+ }
+ case action:
+ return []rune(foundLine), foundPos, next, err
+ }
+ err = s.refresh(getLine())
+ if err != nil {
+ return []rune(foundLine), foundPos, rune(esc), err
+ }
+ }
+}
+
+// addToKillRing adds some text to the kill ring. If mode is 0 it adds it to a
+// new node in the end of the kill ring, and move the current pointer to the new
+// node. If mode is 1 or 2 it appends or prepends the text to the current entry
+// of the killRing.
+func (s *State) addToKillRing(text []rune, mode int) {
+ // Don't use the same underlying array as text
+ killLine := make([]rune, len(text))
+ copy(killLine, text)
+
+ // Point killRing to a newNode, procedure depends on the killring state and
+ // append mode.
+ if mode == 0 { // Add new node to killRing
+ if s.killRing == nil { // if killring is empty, create a new one
+ s.killRing = ring.New(1)
+ } else if s.killRing.Len() >= KillRingMax { // if killring is "full"
+ s.killRing = s.killRing.Next()
+ } else { // Normal case
+ s.killRing.Link(ring.New(1))
+ s.killRing = s.killRing.Next()
+ }
+ } else {
+ if s.killRing == nil { // if killring is empty, create a new one
+ s.killRing = ring.New(1)
+ s.killRing.Value = []rune{}
+ }
+ if mode == 1 { // Append to last entry
+ killLine = append(s.killRing.Value.([]rune), killLine...)
+ } else if mode == 2 { // Prepend to last entry
+ killLine = append(killLine, s.killRing.Value.([]rune)...)
+ }
+ }
+
+ // Save text in the current killring node
+ s.killRing.Value = killLine
+}
+
+func (s *State) yank(p []rune, text []rune, pos int) ([]rune, int, interface{}, error) {
+ if s.killRing == nil {
+ return text, pos, rune(esc), nil
+ }
+
+ lineStart := text[:pos]
+ lineEnd := text[pos:]
+ var line []rune
+
+ for {
+ value := s.killRing.Value.([]rune)
+ line = make([]rune, 0)
+ line = append(line, lineStart...)
+ line = append(line, value...)
+ line = append(line, lineEnd...)
+
+ pos = len(lineStart) + len(value)
+ err := s.refresh(p, line, pos)
+ if err != nil {
+ return line, pos, 0, err
+ }
+
+ next, err := s.readNext()
+ if err != nil {
+ return line, pos, next, err
+ }
+
+ switch v := next.(type) {
+ case rune:
+ return line, pos, next, nil
+ case action:
+ switch v {
+ case altY:
+ s.killRing = s.killRing.Prev()
+ default:
+ return line, pos, next, nil
+ }
+ }
+ }
+}
+
+// Prompt displays p and returns a line of user input, not including a trailing
+// newline character. An io.EOF error is returned if the user signals end-of-file
+// by pressing Ctrl-D. Prompt allows line editing if the terminal supports it.
+func (s *State) Prompt(prompt string) (string, error) {
+ return s.PromptWithSuggestion(prompt, "", 0)
+}
+
+// PromptWithSuggestion displays prompt and an editable text with cursor at
+// given position. The cursor will be set to the end of the line if given position
+// is negative or greater than length of text. Returns a line of user input, not
+// including a trailing newline character. An io.EOF error is returned if the user
+// signals end-of-file by pressing Ctrl-D.
+func (s *State) PromptWithSuggestion(prompt string, text string, pos int) (string, error) {
+ for _, r := range prompt {
+ if unicode.Is(unicode.C, r) {
+ return "", ErrInvalidPrompt
+ }
+ }
+ if s.inputRedirected || !s.terminalSupported {
+ return s.promptUnsupported(prompt)
+ }
+ p := []rune(prompt)
+ const minWorkingSpace = 10
+ if s.columns < countGlyphs(p)+minWorkingSpace {
+ return s.tooNarrow(prompt)
+ }
+ if s.outputRedirected {
+ return "", ErrNotTerminalOutput
+ }
+
+ s.historyMutex.RLock()
+ defer s.historyMutex.RUnlock()
+
+ fmt.Print(prompt)
+ var line = []rune(text)
+ historyEnd := ""
+ var historyPrefix []string
+ historyPos := 0
+ historyStale := true
+ historyAction := false // used to mark history related actions
+ killAction := 0 // used to mark kill related actions
+
+ defer s.stopPrompt()
+
+ if pos < 0 || len(text) < pos {
+ pos = len(text)
+ }
+ if len(line) > 0 {
+ err := s.refresh(p, line, pos)
+ if err != nil {
+ return "", err
+ }
+ }
+
+restart:
+ s.startPrompt()
+ s.getColumns()
+
+mainLoop:
+ for {
+ next, err := s.readNext()
+ haveNext:
+ if err != nil {
+ if s.shouldRestart != nil && s.shouldRestart(err) {
+ goto restart
+ }
+ return "", err
+ }
+
+ historyAction = false
+ switch v := next.(type) {
+ case rune:
+ switch v {
+ case cr, lf:
+ if s.needRefresh {
+ err := s.refresh(p, line, pos)
+ if err != nil {
+ return "", err
+ }
+ }
+ if s.multiLineMode {
+ s.resetMultiLine(p, line, pos)
+ }
+ fmt.Println()
+ break mainLoop
+ case ctrlA: // Start of line
+ pos = 0
+ s.needRefresh = true
+ case ctrlE: // End of line
+ pos = len(line)
+ s.needRefresh = true
+ case ctrlB: // left
+ if pos > 0 {
+ pos -= len(getSuffixGlyphs(line[:pos], 1))
+ s.needRefresh = true
+ } else {
+ fmt.Print(beep)
+ }
+ case ctrlF: // right
+ if pos < len(line) {
+ pos += len(getPrefixGlyphs(line[pos:], 1))
+ s.needRefresh = true
+ } else {
+ fmt.Print(beep)
+ }
+ case ctrlD: // del
+ if pos == 0 && len(line) == 0 {
+ // exit
+ return "", io.EOF
+ }
+
+ // ctrlD is a potential EOF, so the rune reader shuts down.
+ // Therefore, if it isn't actually an EOF, we must re-startPrompt.
+ s.restartPrompt()
+
+ if pos >= len(line) {
+ fmt.Print(beep)
+ } else {
+ n := len(getPrefixGlyphs(line[pos:], 1))
+ line = append(line[:pos], line[pos+n:]...)
+ s.needRefresh = true
+ }
+ case ctrlK: // delete remainder of line
+ if pos >= len(line) {
+ fmt.Print(beep)
+ } else {
+ if killAction > 0 {
+ s.addToKillRing(line[pos:], 1) // Add in apend mode
+ } else {
+ s.addToKillRing(line[pos:], 0) // Add in normal mode
+ }
+
+ killAction = 2 // Mark that there was a kill action
+ line = line[:pos]
+ s.needRefresh = true
+ }
+ case ctrlP: // up
+ historyAction = true
+ if historyStale {
+ historyPrefix = s.getHistoryByPrefix(string(line))
+ historyPos = len(historyPrefix)
+ historyStale = false
+ }
+ if historyPos > 0 {
+ if historyPos == len(historyPrefix) {
+ historyEnd = string(line)
+ }
+ historyPos--
+ line = []rune(historyPrefix[historyPos])
+ pos = len(line)
+ s.needRefresh = true
+ } else {
+ fmt.Print(beep)
+ }
+ case ctrlN: // down
+ historyAction = true
+ if historyStale {
+ historyPrefix = s.getHistoryByPrefix(string(line))
+ historyPos = len(historyPrefix)
+ historyStale = false
+ }
+ if historyPos < len(historyPrefix) {
+ historyPos++
+ if historyPos == len(historyPrefix) {
+ line = []rune(historyEnd)
+ } else {
+ line = []rune(historyPrefix[historyPos])
+ }
+ pos = len(line)
+ s.needRefresh = true
+ } else {
+ fmt.Print(beep)
+ }
+ case ctrlT: // transpose prev glyph with glyph under cursor
+ if len(line) < 2 || pos < 1 {
+ fmt.Print(beep)
+ } else {
+ if pos == len(line) {
+ pos -= len(getSuffixGlyphs(line, 1))
+ }
+ prev := getSuffixGlyphs(line[:pos], 1)
+ next := getPrefixGlyphs(line[pos:], 1)
+ scratch := make([]rune, len(prev))
+ copy(scratch, prev)
+ copy(line[pos-len(prev):], next)
+ copy(line[pos-len(prev)+len(next):], scratch)
+ pos += len(next)
+ s.needRefresh = true
+ }
+ case ctrlL: // clear screen
+ s.eraseScreen()
+ s.needRefresh = true
+ case ctrlC: // reset
+ fmt.Println("^C")
+ if s.multiLineMode {
+ s.resetMultiLine(p, line, pos)
+ }
+ if s.ctrlCAborts {
+ return "", ErrPromptAborted
+ }
+ line = line[:0]
+ pos = 0
+ fmt.Print(prompt)
+ s.restartPrompt()
+ case ctrlH, bs: // Backspace
+ if pos <= 0 {
+ fmt.Print(beep)
+ } else {
+ n := len(getSuffixGlyphs(line[:pos], 1))
+ line = append(line[:pos-n], line[pos:]...)
+ pos -= n
+ s.needRefresh = true
+ }
+ case ctrlU: // Erase line before cursor
+ if killAction > 0 {
+ s.addToKillRing(line[:pos], 2) // Add in prepend mode
+ } else {
+ s.addToKillRing(line[:pos], 0) // Add in normal mode
+ }
+
+ killAction = 2 // Mark that there was some killing
+ line = line[pos:]
+ pos = 0
+ s.needRefresh = true
+ case ctrlW: // Erase word
+ if pos == 0 {
+ fmt.Print(beep)
+ break
+ }
+ // Remove whitespace to the left
+ var buf []rune // Store the deleted chars in a buffer
+ for {
+ if pos == 0 || !unicode.IsSpace(line[pos-1]) {
+ break
+ }
+ buf = append(buf, line[pos-1])
+ line = append(line[:pos-1], line[pos:]...)
+ pos--
+ }
+ // Remove non-whitespace to the left
+ for {
+ if pos == 0 || unicode.IsSpace(line[pos-1]) {
+ break
+ }
+ buf = append(buf, line[pos-1])
+ line = append(line[:pos-1], line[pos:]...)
+ pos--
+ }
+ // Invert the buffer and save the result on the killRing
+ var newBuf []rune
+ for i := len(buf) - 1; i >= 0; i-- {
+ newBuf = append(newBuf, buf[i])
+ }
+ if killAction > 0 {
+ s.addToKillRing(newBuf, 2) // Add in prepend mode
+ } else {
+ s.addToKillRing(newBuf, 0) // Add in normal mode
+ }
+ killAction = 2 // Mark that there was some killing
+
+ s.needRefresh = true
+ case ctrlY: // Paste from Yank buffer
+ line, pos, next, err = s.yank(p, line, pos)
+ goto haveNext
+ case ctrlR: // Reverse Search
+ line, pos, next, err = s.reverseISearch(line, pos)
+ s.needRefresh = true
+ goto haveNext
+ case tab: // Tab completion
+ line, pos, next, err = s.tabComplete(p, line, pos)
+ goto haveNext
+ // Catch keys that do nothing, but you don't want them to beep
+ case esc:
+ // DO NOTHING
+ // Unused keys
+ case ctrlG, ctrlO, ctrlQ, ctrlS, ctrlV, ctrlX, ctrlZ:
+ fallthrough
+ // Catch unhandled control codes (anything <= 31)
+ case 0, 28, 29, 30, 31:
+ fmt.Print(beep)
+ default:
+ if pos == len(line) && !s.multiLineMode &&
+ len(p)+len(line) < s.columns*4 && // Avoid countGlyphs on large lines
+ countGlyphs(p)+countGlyphs(line) < s.columns-1 {
+ line = append(line, v)
+ fmt.Printf("%c", v)
+ pos++
+ } else {
+ line = append(line[:pos], append([]rune{v}, line[pos:]...)...)
+ pos++
+ s.needRefresh = true
+ }
+ }
+ case action:
+ switch v {
+ case del:
+ if pos >= len(line) {
+ fmt.Print(beep)
+ } else {
+ n := len(getPrefixGlyphs(line[pos:], 1))
+ line = append(line[:pos], line[pos+n:]...)
+ }
+ case left:
+ if pos > 0 {
+ pos -= len(getSuffixGlyphs(line[:pos], 1))
+ } else {
+ fmt.Print(beep)
+ }
+ case wordLeft, altB:
+ if pos > 0 {
+ var spaceHere, spaceLeft, leftKnown bool
+ for {
+ pos--
+ if pos == 0 {
+ break
+ }
+ if leftKnown {
+ spaceHere = spaceLeft
+ } else {
+ spaceHere = unicode.IsSpace(line[pos])
+ }
+ spaceLeft, leftKnown = unicode.IsSpace(line[pos-1]), true
+ if !spaceHere && spaceLeft {
+ break
+ }
+ }
+ } else {
+ fmt.Print(beep)
+ }
+ case right:
+ if pos < len(line) {
+ pos += len(getPrefixGlyphs(line[pos:], 1))
+ } else {
+ fmt.Print(beep)
+ }
+ case wordRight, altF:
+ if pos < len(line) {
+ var spaceHere, spaceLeft, hereKnown bool
+ for {
+ pos++
+ if pos == len(line) {
+ break
+ }
+ if hereKnown {
+ spaceLeft = spaceHere
+ } else {
+ spaceLeft = unicode.IsSpace(line[pos-1])
+ }
+ spaceHere, hereKnown = unicode.IsSpace(line[pos]), true
+ if spaceHere && !spaceLeft {
+ break
+ }
+ }
+ } else {
+ fmt.Print(beep)
+ }
+ case up:
+ historyAction = true
+ if historyStale {
+ historyPrefix = s.getHistoryByPrefix(string(line))
+ historyPos = len(historyPrefix)
+ historyStale = false
+ }
+ if historyPos > 0 {
+ if historyPos == len(historyPrefix) {
+ historyEnd = string(line)
+ }
+ historyPos--
+ line = []rune(historyPrefix[historyPos])
+ pos = len(line)
+ } else {
+ fmt.Print(beep)
+ }
+ case down:
+ historyAction = true
+ if historyStale {
+ historyPrefix = s.getHistoryByPrefix(string(line))
+ historyPos = len(historyPrefix)
+ historyStale = false
+ }
+ if historyPos < len(historyPrefix) {
+ historyPos++
+ if historyPos == len(historyPrefix) {
+ line = []rune(historyEnd)
+ } else {
+ line = []rune(historyPrefix[historyPos])
+ }
+ pos = len(line)
+ } else {
+ fmt.Print(beep)
+ }
+ case home: // Start of line
+ pos = 0
+ case end: // End of line
+ pos = len(line)
+ case altD: // Delete next word
+ if pos == len(line) {
+ fmt.Print(beep)
+ break
+ }
+ // Remove whitespace to the right
+ var buf []rune // Store the deleted chars in a buffer
+ for {
+ if pos == len(line) || !unicode.IsSpace(line[pos]) {
+ break
+ }
+ buf = append(buf, line[pos])
+ line = append(line[:pos], line[pos+1:]...)
+ }
+ // Remove non-whitespace to the right
+ for {
+ if pos == len(line) || unicode.IsSpace(line[pos]) {
+ break
+ }
+ buf = append(buf, line[pos])
+ line = append(line[:pos], line[pos+1:]...)
+ }
+ // Save the result on the killRing
+ if killAction > 0 {
+ s.addToKillRing(buf, 2) // Add in prepend mode
+ } else {
+ s.addToKillRing(buf, 0) // Add in normal mode
+ }
+ killAction = 2 // Mark that there was some killing
+ case winch: // Window change
+ if s.multiLineMode {
+ if s.maxRows-s.cursorRows > 0 {
+ s.moveDown(s.maxRows - s.cursorRows)
+ }
+ for i := 0; i < s.maxRows-1; i++ {
+ s.cursorPos(0)
+ s.eraseLine()
+ s.moveUp(1)
+ }
+ s.maxRows = 1
+ s.cursorRows = 1
+ }
+ }
+ s.needRefresh = true
+ }
+ if s.needRefresh && !s.inputWaiting() {
+ err := s.refresh(p, line, pos)
+ if err != nil {
+ return "", err
+ }
+ }
+ if !historyAction {
+ historyStale = true
+ }
+ if killAction > 0 {
+ killAction--
+ }
+ }
+ return string(line), nil
+}
+
+// PasswordPrompt displays p, and then waits for user input. The input typed by
+// the user is not displayed in the terminal.
+func (s *State) PasswordPrompt(prompt string) (string, error) {
+ for _, r := range prompt {
+ if unicode.Is(unicode.C, r) {
+ return "", ErrInvalidPrompt
+ }
+ }
+ if !s.terminalSupported || s.columns == 0 {
+ return "", errors.New("liner: function not supported in this terminal")
+ }
+ if s.inputRedirected {
+ return s.promptUnsupported(prompt)
+ }
+ if s.outputRedirected {
+ return "", ErrNotTerminalOutput
+ }
+
+ p := []rune(prompt)
+ const minWorkingSpace = 1
+ if s.columns < countGlyphs(p)+minWorkingSpace {
+ return s.tooNarrow(prompt)
+ }
+
+ defer s.stopPrompt()
+
+restart:
+ s.startPrompt()
+ s.getColumns()
+
+ fmt.Print(prompt)
+ var line []rune
+ pos := 0
+
+mainLoop:
+ for {
+ next, err := s.readNext()
+ if err != nil {
+ if s.shouldRestart != nil && s.shouldRestart(err) {
+ goto restart
+ }
+ return "", err
+ }
+
+ switch v := next.(type) {
+ case rune:
+ switch v {
+ case cr, lf:
+ if s.needRefresh {
+ err := s.refresh(p, line, pos)
+ if err != nil {
+ return "", err
+ }
+ }
+ if s.multiLineMode {
+ s.resetMultiLine(p, line, pos)
+ }
+ fmt.Println()
+ break mainLoop
+ case ctrlD: // del
+ if pos == 0 && len(line) == 0 {
+ // exit
+ return "", io.EOF
+ }
+
+ // ctrlD is a potential EOF, so the rune reader shuts down.
+ // Therefore, if it isn't actually an EOF, we must re-startPrompt.
+ s.restartPrompt()
+ case ctrlL: // clear screen
+ s.eraseScreen()
+ err := s.refresh(p, []rune{}, 0)
+ if err != nil {
+ return "", err
+ }
+ case ctrlH, bs: // Backspace
+ if pos <= 0 {
+ fmt.Print(beep)
+ } else {
+ n := len(getSuffixGlyphs(line[:pos], 1))
+ line = append(line[:pos-n], line[pos:]...)
+ pos -= n
+ }
+ case ctrlC:
+ fmt.Println("^C")
+ if s.multiLineMode {
+ s.resetMultiLine(p, line, pos)
+ }
+ if s.ctrlCAborts {
+ return "", ErrPromptAborted
+ }
+ line = line[:0]
+ pos = 0
+ fmt.Print(prompt)
+ s.restartPrompt()
+ // Unused keys
+ case esc, tab, ctrlA, ctrlB, ctrlE, ctrlF, ctrlG, ctrlK, ctrlN, ctrlO, ctrlP, ctrlQ, ctrlR, ctrlS,
+ ctrlT, ctrlU, ctrlV, ctrlW, ctrlX, ctrlY, ctrlZ:
+ fallthrough
+ // Catch unhandled control codes (anything <= 31)
+ case 0, 28, 29, 30, 31:
+ fmt.Print(beep)
+ default:
+ line = append(line[:pos], append([]rune{v}, line[pos:]...)...)
+ pos++
+ }
+ }
+ }
+ return string(line), nil
+}
+
+func (s *State) tooNarrow(prompt string) (string, error) {
+ // Docker and OpenWRT and etc sometimes return 0 column width
+ // Reset mode temporarily. Restore baked mode in case the terminal
+ // is wide enough for the next Prompt attempt.
+ m, merr := TerminalMode()
+ s.origMode.ApplyMode()
+ if merr == nil {
+ defer m.ApplyMode()
+ }
+ if s.r == nil {
+ // Windows does not always set s.r
+ s.r = bufio.NewReader(os.Stdin)
+ defer func() { s.r = nil }()
+ }
+ return s.promptUnsupported(prompt)
+}
diff --git a/vendor/github.com/peterh/liner/line_test.go b/vendor/github.com/peterh/liner/line_test.go
new file mode 100644
index 0000000..6324a75
--- /dev/null
+++ b/vendor/github.com/peterh/liner/line_test.go
@@ -0,0 +1,146 @@
+package liner
+
+import (
+ "bytes"
+ "fmt"
+ "strings"
+ "testing"
+)
+
+func TestAppend(t *testing.T) {
+ var s State
+ s.AppendHistory("foo")
+ s.AppendHistory("bar")
+
+ var out bytes.Buffer
+ num, err := s.WriteHistory(&out)
+ if err != nil {
+ t.Fatal("Unexpected error writing history", err)
+ }
+ if num != 2 {
+ t.Fatalf("Expected 2 history entries, got %d", num)
+ }
+
+ s.AppendHistory("baz")
+ num, err = s.WriteHistory(&out)
+ if err != nil {
+ t.Fatal("Unexpected error writing history", err)
+ }
+ if num != 3 {
+ t.Fatalf("Expected 3 history entries, got %d", num)
+ }
+
+ s.AppendHistory("baz")
+ num, err = s.WriteHistory(&out)
+ if err != nil {
+ t.Fatal("Unexpected error writing history", err)
+ }
+ if num != 3 {
+ t.Fatalf("Expected 3 history entries after duplicate append, got %d", num)
+ }
+
+ s.AppendHistory("baz")
+
+}
+
+func TestHistory(t *testing.T) {
+ input := `foo
+bar
+baz
+quux
+dingle`
+
+ var s State
+ num, err := s.ReadHistory(strings.NewReader(input))
+ if err != nil {
+ t.Fatal("Unexpected error reading history", err)
+ }
+ if num != 5 {
+ t.Fatal("Wrong number of history entries read")
+ }
+
+ var out bytes.Buffer
+ num, err = s.WriteHistory(&out)
+ if err != nil {
+ t.Fatal("Unexpected error writing history", err)
+ }
+ if num != 5 {
+ t.Fatal("Wrong number of history entries written")
+ }
+ if strings.TrimSpace(out.String()) != input {
+ t.Fatal("Round-trip failure")
+ }
+
+ // clear the history and re-write
+ s.ClearHistory()
+ num, err = s.WriteHistory(&out)
+ if err != nil {
+ t.Fatal("Unexpected error writing history", err)
+ }
+ if num != 0 {
+ t.Fatal("Wrong number of history entries written, expected none")
+ }
+ // Test reading with a trailing newline present
+ var s2 State
+ num, err = s2.ReadHistory(&out)
+ if err != nil {
+ t.Fatal("Unexpected error reading history the 2nd time", err)
+ }
+ if num != 5 {
+ t.Fatal("Wrong number of history entries read the 2nd time")
+ }
+
+ num, err = s.ReadHistory(strings.NewReader(input + "\n\xff"))
+ if err == nil {
+ t.Fatal("Unexpected success reading corrupted history", err)
+ }
+ if num != 5 {
+ t.Fatal("Wrong number of history entries read the 3rd time")
+ }
+}
+
+func TestColumns(t *testing.T) {
+ list := []string{"foo", "food", "This entry is quite a bit longer than the typical entry"}
+
+ output := []struct {
+ width, columns, rows, maxWidth int
+ }{
+ {80, 1, 3, len(list[2]) + 1},
+ {120, 2, 2, len(list[2]) + 1},
+ {800, 14, 1, 0},
+ {8, 1, 3, 7},
+ }
+
+ for i, o := range output {
+ col, row, max := calculateColumns(o.width, list)
+ if col != o.columns {
+ t.Fatalf("Wrong number of columns, %d != %d, in TestColumns %d\n", col, o.columns, i)
+ }
+ if row != o.rows {
+ t.Fatalf("Wrong number of rows, %d != %d, in TestColumns %d\n", row, o.rows, i)
+ }
+ if max != o.maxWidth {
+ t.Fatalf("Wrong column width, %d != %d, in TestColumns %d\n", max, o.maxWidth, i)
+ }
+ }
+}
+
+// This example demonstrates a way to retrieve the current
+// history buffer without using a file.
+func ExampleState_WriteHistory() {
+ var s State
+ s.AppendHistory("foo")
+ s.AppendHistory("bar")
+
+ buf := new(bytes.Buffer)
+ _, err := s.WriteHistory(buf)
+ if err == nil {
+ history := strings.Split(strings.TrimSpace(buf.String()), "\n")
+ for i, line := range history {
+ fmt.Println("History entry", i, ":", line)
+ }
+ }
+ // Output:
+ // History entry 0 : foo
+ // History entry 1 : bar
+}
diff --git a/vendor/github.com/peterh/liner/output.go b/vendor/github.com/peterh/liner/output.go
new file mode 100644
index 0000000..db0641c
--- /dev/null
+++ b/vendor/github.com/peterh/liner/output.go
@@ -0,0 +1,76 @@
+// +build linux darwin openbsd freebsd netbsd
+
+package liner
+
+import (
+ "fmt"
+ "os"
+ "strings"
+ "syscall"
+ "unsafe"
+)
+
+func (s *State) cursorPos(x int) {
+ if s.useCHA {
+ // 'G' is "Cursor Character Absolute (CHA)"
+ fmt.Printf("\x1b[%dG", x+1)
+ } else {
+ // 'C' is "Cursor Forward (CUF)"
+ fmt.Print("\r")
+ if x > 0 {
+ fmt.Printf("\x1b[%dC", x)
+ }
+ }
+}
+
+func (s *State) eraseLine() {
+ fmt.Print("\x1b[0K")
+}
+
+func (s *State) eraseScreen() {
+ fmt.Print("\x1b[H\x1b[2J")
+}
+
+func (s *State) moveUp(lines int) {
+ fmt.Printf("\x1b[%dA", lines)
+}
+
+func (s *State) moveDown(lines int) {
+ fmt.Printf("\x1b[%dB", lines)
+}
+
+func (s *State) emitNewLine() {
+ fmt.Print("\n")
+}
+
+type winSize struct {
+ row, col uint16
+ xpixel, ypixel uint16
+}
+
+func (s *State) getColumns() bool {
+ var ws winSize
+ ok, _, _ := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdout),
+ syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&ws)))
+ if int(ok) < 0 {
+ return false
+ }
+ s.columns = int(ws.col)
+ return true
+}
+
+func (s *State) checkOutput() {
+ // xterm is known to support CHA
+ if strings.Contains(strings.ToLower(os.Getenv("TERM")), "xterm") {
+ s.useCHA = true
+ return
+ }
+
+ // The test for functional ANSI CHA is unreliable (eg the Windows
+ // telnet command does not support reading the cursor position with
+ // an ANSI DSR request, despite setting TERM=ansi)
+
+ // Assume CHA isn't supported (which should be safe, although it
+ // does result in occasional visible cursor jitter)
+ s.useCHA = false
+}
diff --git a/vendor/github.com/peterh/liner/output_windows.go b/vendor/github.com/peterh/liner/output_windows.go
new file mode 100644
index 0000000..45cd978
--- /dev/null
+++ b/vendor/github.com/peterh/liner/output_windows.go
@@ -0,0 +1,72 @@
+package liner
+
+import (
+ "unsafe"
+)
+
+type coord struct {
+ x, y int16
+}
+type smallRect struct {
+ left, top, right, bottom int16
+}
+
+type consoleScreenBufferInfo struct {
+ dwSize coord
+ dwCursorPosition coord
+ wAttributes int16
+ srWindow smallRect
+ dwMaximumWindowSize coord
+}
+
+func (s *State) cursorPos(x int) {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ procSetConsoleCursorPosition.Call(uintptr(s.hOut),
+ uintptr(int(x)&0xFFFF|int(sbi.dwCursorPosition.y)<<16))
+}
+
+func (s *State) eraseLine() {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ var numWritten uint32
+ procFillConsoleOutputCharacter.Call(uintptr(s.hOut), uintptr(' '),
+ uintptr(sbi.dwSize.x-sbi.dwCursorPosition.x),
+ uintptr(int(sbi.dwCursorPosition.x)&0xFFFF|int(sbi.dwCursorPosition.y)<<16),
+ uintptr(unsafe.Pointer(&numWritten)))
+}
+
+func (s *State) eraseScreen() {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ var numWritten uint32
+ procFillConsoleOutputCharacter.Call(uintptr(s.hOut), uintptr(' '),
+ uintptr(sbi.dwSize.x)*uintptr(sbi.dwSize.y),
+ 0,
+ uintptr(unsafe.Pointer(&numWritten)))
+ procSetConsoleCursorPosition.Call(uintptr(s.hOut), 0)
+}
+
+func (s *State) moveUp(lines int) {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ procSetConsoleCursorPosition.Call(uintptr(s.hOut),
+ uintptr(int(sbi.dwCursorPosition.x)&0xFFFF|(int(sbi.dwCursorPosition.y)-lines)<<16))
+}
+
+func (s *State) moveDown(lines int) {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ procSetConsoleCursorPosition.Call(uintptr(s.hOut),
+ uintptr(int(sbi.dwCursorPosition.x)&0xFFFF|(int(sbi.dwCursorPosition.y)+lines)<<16))
+}
+
+func (s *State) emitNewLine() {
+ // windows doesn't need to omit a new line
+}
+
+func (s *State) getColumns() {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ s.columns = int(sbi.dwSize.x)
+}
diff --git a/vendor/github.com/peterh/liner/prefix_test.go b/vendor/github.com/peterh/liner/prefix_test.go
new file mode 100644
index 0000000..c826d6c
--- /dev/null
+++ b/vendor/github.com/peterh/liner/prefix_test.go
@@ -0,0 +1,37 @@
+// +build windows linux darwin openbsd freebsd netbsd
+
+package liner
+
+import "testing"
+
+type testItem struct {
+ list []string
+ prefix string
+}
+
+func TestPrefix(t *testing.T) {
+ list := []testItem{
+ {[]string{"food", "foot"}, "foo"},
+ {[]string{"foo", "foot"}, "foo"},
+ {[]string{"food", "foo"}, "foo"},
+ {[]string{"food", "foe", "foot"}, "fo"},
+ {[]string{"food", "foot", "barbeque"}, ""},
+ {[]string{"cafeteria", "café"}, "caf"},
+ {[]string{"cafe", "café"}, "caf"},
+ {[]string{"cafè", "café"}, "caf"},
+ {[]string{"cafés", "café"}, "café"},
+ {[]string{"áéíóú", "áéíóú"}, "áéíóú"},
+ {[]string{"éclairs", "éclairs"}, "éclairs"},
+ {[]string{"éclairs are the best", "éclairs are great", "éclairs"}, "éclairs"},
+ {[]string{"éclair", "éclairs"}, "éclair"},
+ {[]string{"éclairs", "éclair"}, "éclair"},
+ {[]string{"éclair", "élan"}, "é"},
+ }
+
+ for _, test := range list {
+ lcp := longestCommonPrefix(test.list)
+ if lcp != test.prefix {
+ t.Errorf("%s != %s for %+v", lcp, test.prefix, test.list)
+ }
+ }
+}
diff --git a/vendor/github.com/peterh/liner/race_test.go b/vendor/github.com/peterh/liner/race_test.go
new file mode 100644
index 0000000..e320849
--- /dev/null
+++ b/vendor/github.com/peterh/liner/race_test.go
@@ -0,0 +1,44 @@
+// +build race
+
+package liner
+
+import (
+ "io/ioutil"
+ "os"
+ "sync"
+ "testing"
+)
+
+func TestWriteHistory(t *testing.T) {
+ oldout := os.Stdout
+ defer func() { os.Stdout = oldout }()
+ oldin := os.Stdout
+ defer func() { os.Stdin = oldin }()
+
+ newinr, newinw, err := os.Pipe()
+ if err != nil {
+ t.Fatal(err)
+ }
+ os.Stdin = newinr
+ newoutr, newoutw, err := os.Pipe()
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer newoutr.Close()
+ os.Stdout = newoutw
+
+ var wait sync.WaitGroup
+ wait.Add(1)
+ s := NewLiner()
+ go func() {
+ s.AppendHistory("foo")
+ s.AppendHistory("bar")
+ s.Prompt("")
+ wait.Done()
+ }()
+
+ s.WriteHistory(ioutil.Discard)
+
+ newinw.Close()
+ wait.Wait()
+}
diff --git a/vendor/github.com/peterh/liner/unixmode.go b/vendor/github.com/peterh/liner/unixmode.go
new file mode 100644
index 0000000..9838923
--- /dev/null
+++ b/vendor/github.com/peterh/liner/unixmode.go
@@ -0,0 +1,37 @@
+// +build linux darwin freebsd openbsd netbsd
+
+package liner
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func (mode *termios) ApplyMode() error {
+ _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdin), setTermios, uintptr(unsafe.Pointer(mode)))
+
+ if errno != 0 {
+ return errno
+ }
+ return nil
+}
+
+// TerminalMode returns the current terminal input mode as an InputModeSetter.
+//
+// This function is provided for convenience, and should
+// not be necessary for most users of liner.
+func TerminalMode() (ModeApplier, error) {
+ mode, errno := getMode(syscall.Stdin)
+
+ if errno != 0 {
+ return nil, errno
+ }
+ return mode, nil
+}
+
+func getMode(handle int) (*termios, syscall.Errno) {
+ var mode termios
+ _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(handle), getTermios, uintptr(unsafe.Pointer(&mode)))
+
+ return &mode, errno
+}
diff --git a/vendor/github.com/peterh/liner/width.go b/vendor/github.com/peterh/liner/width.go
new file mode 100644
index 0000000..0395f3a
--- /dev/null
+++ b/vendor/github.com/peterh/liner/width.go
@@ -0,0 +1,90 @@
+package liner
+
+import (
+ "unicode"
+
+ "github.com/mattn/go-runewidth"
+)
+
+// These character classes are mostly zero width (when combined).
+// A few might not be, depending on the user's font. Fixing this
+// is non-trivial, given that some terminals don't support
+// ANSI DSR/CPR
+var zeroWidth = []*unicode.RangeTable{
+ unicode.Mn,
+ unicode.Me,
+ unicode.Cc,
+ unicode.Cf,
+}
+
+// countGlyphs considers zero-width characters to be zero glyphs wide,
+// and members of Chinese, Japanese, and Korean scripts to be 2 glyphs wide.
+func countGlyphs(s []rune) int {
+ n := 0
+ for _, r := range s {
+ // speed up the common case
+ if r < 127 {
+ n++
+ continue
+ }
+
+ n += runewidth.RuneWidth(r)
+ }
+ return n
+}
+
+func countMultiLineGlyphs(s []rune, columns int, start int) int {
+ n := start
+ for _, r := range s {
+ if r < 127 {
+ n++
+ continue
+ }
+ switch runewidth.RuneWidth(r) {
+ case 0:
+ case 1:
+ n++
+ case 2:
+ n += 2
+ // no room for a 2-glyphs-wide char in the ending
+ // so skip a column and display it at the beginning
+ if n%columns == 1 {
+ n++
+ }
+ }
+ }
+ return n
+}
+
+func getPrefixGlyphs(s []rune, num int) []rune {
+ p := 0
+ for n := 0; n < num && p < len(s); p++ {
+ // speed up the common case
+ if s[p] < 127 {
+ n++
+ continue
+ }
+ if !unicode.IsOneOf(zeroWidth, s[p]) {
+ n++
+ }
+ }
+ for p < len(s) && unicode.IsOneOf(zeroWidth, s[p]) {
+ p++
+ }
+ return s[:p]
+}
+
+func getSuffixGlyphs(s []rune, num int) []rune {
+ p := len(s)
+ for n := 0; n < num && p > 0; p-- {
+ // speed up the common case
+ if s[p-1] < 127 {
+ n++
+ continue
+ }
+ if !unicode.IsOneOf(zeroWidth, s[p-1]) {
+ n++
+ }
+ }
+ return s[p:]
+}
diff --git a/vendor/github.com/peterh/liner/width_test.go b/vendor/github.com/peterh/liner/width_test.go
new file mode 100644
index 0000000..081306d
--- /dev/null
+++ b/vendor/github.com/peterh/liner/width_test.go
@@ -0,0 +1,102 @@
+package liner
+
+import (
+ "strconv"
+ "testing"
+)
+
+func accent(in []rune) []rune {
+ var out []rune
+ for _, r := range in {
+ out = append(out, r)
+ out = append(out, '\u0301')
+ }
+ return out
+}
+
+type testCase struct {
+ s []rune
+ glyphs int
+}
+
+var testCases = []testCase{
+ {[]rune("query"), 5},
+ {[]rune("私"), 2},
+ {[]rune("hello『世界』"), 13},
+}
+
+func TestCountGlyphs(t *testing.T) {
+ for _, testCase := range testCases {
+ count := countGlyphs(testCase.s)
+ if count != testCase.glyphs {
+ t.Errorf("ASCII count incorrect. %d != %d", count, testCase.glyphs)
+ }
+ count = countGlyphs(accent(testCase.s))
+ if count != testCase.glyphs {
+ t.Errorf("Accent count incorrect. %d != %d", count, testCase.glyphs)
+ }
+ }
+}
+
+func compare(a, b []rune, name string, t *testing.T) {
+ if len(a) != len(b) {
+ t.Errorf(`"%s" != "%s" in %s"`, string(a), string(b), name)
+ return
+ }
+ for i := range a {
+ if a[i] != b[i] {
+ t.Errorf(`"%s" != "%s" in %s"`, string(a), string(b), name)
+ return
+ }
+ }
+}
+
+func TestPrefixGlyphs(t *testing.T) {
+ for _, testCase := range testCases {
+ for i := 0; i <= len(testCase.s); i++ {
+ iter := strconv.Itoa(i)
+ out := getPrefixGlyphs(testCase.s, i)
+ compare(out, testCase.s[:i], "ascii prefix "+iter, t)
+ out = getPrefixGlyphs(accent(testCase.s), i)
+ compare(out, accent(testCase.s[:i]), "accent prefix "+iter, t)
+ }
+ out := getPrefixGlyphs(testCase.s, 999)
+ compare(out, testCase.s, "ascii prefix overflow", t)
+ out = getPrefixGlyphs(accent(testCase.s), 999)
+ compare(out, accent(testCase.s), "accent prefix overflow", t)
+
+ out = getPrefixGlyphs(testCase.s, -3)
+ if len(out) != 0 {
+ t.Error("ascii prefix negative")
+ }
+ out = getPrefixGlyphs(accent(testCase.s), -3)
+ if len(out) != 0 {
+ t.Error("accent prefix negative")
+ }
+ }
+}
+
+func TestSuffixGlyphs(t *testing.T) {
+ for _, testCase := range testCases {
+ for i := 0; i <= len(testCase.s); i++ {
+ iter := strconv.Itoa(i)
+ out := getSuffixGlyphs(testCase.s, i)
+ compare(out, testCase.s[len(testCase.s)-i:], "ascii suffix "+iter, t)
+ out = getSuffixGlyphs(accent(testCase.s), i)
+ compare(out, accent(testCase.s[len(testCase.s)-i:]), "accent suffix "+iter, t)
+ }
+ out := getSuffixGlyphs(testCase.s, 999)
+ compare(out, testCase.s, "ascii suffix overflow", t)
+ out = getSuffixGlyphs(accent(testCase.s), 999)
+ compare(out, accent(testCase.s), "accent suffix overflow", t)
+
+ out = getSuffixGlyphs(testCase.s, -3)
+ if len(out) != 0 {
+ t.Error("ascii suffix negative")
+ }
+ out = getSuffixGlyphs(accent(testCase.s), -3)
+ if len(out) != 0 {
+ t.Error("accent suffix negative")
+ }
+ }
+}
diff --git a/vendor/golang.org/x/sync/AUTHORS b/vendor/golang.org/x/sync/AUTHORS
deleted file mode 100644
index 15167cd..0000000
--- a/vendor/golang.org/x/sync/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/sync/CONTRIBUTING.md b/vendor/golang.org/x/sync/CONTRIBUTING.md
deleted file mode 100644
index 88dff59..0000000
--- a/vendor/golang.org/x/sync/CONTRIBUTING.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Contributing to Go
-
-Go is an open source project.
-
-It is the work of hundreds of contributors. We appreciate your help!
-
-
-## Filing issues
-
-When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
-
-1. What version of Go are you using (`go version`)?
-2. What operating system and processor architecture are you using?
-3. What did you do?
-4. What did you expect to see?
-5. What did you see instead?
-
-General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
-The gophers there will answer or ask you to file an issue if you've tripped over a bug.
-
-## Contributing code
-
-Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
-before sending patches.
-
-**We do not accept GitHub pull requests**
-(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
-
-Unless otherwise noted, the Go source files are distributed under
-the BSD-style license found in the LICENSE file.
-
diff --git a/vendor/golang.org/x/sync/CONTRIBUTORS b/vendor/golang.org/x/sync/CONTRIBUTORS
deleted file mode 100644
index 1c4577e..0000000
--- a/vendor/golang.org/x/sync/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE
deleted file mode 100644
index 6a66aea..0000000
--- a/vendor/golang.org/x/sync/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/sync/PATENTS b/vendor/golang.org/x/sync/PATENTS
deleted file mode 100644
index 7330990..0000000
--- a/vendor/golang.org/x/sync/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/sync/README b/vendor/golang.org/x/sync/README
deleted file mode 100644
index 59c9dcb..0000000
--- a/vendor/golang.org/x/sync/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This repository provides Go concurrency primitives in addition to the
-ones provided by the language and "sync" and "sync/atomic" packages.
diff --git a/vendor/golang.org/x/sync/codereview.cfg b/vendor/golang.org/x/sync/codereview.cfg
deleted file mode 100644
index 3f8b14b..0000000
--- a/vendor/golang.org/x/sync/codereview.cfg
+++ /dev/null
@@ -1 +0,0 @@
-issuerepo: golang/go
diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go
deleted file mode 100644
index 533438d..0000000
--- a/vendor/golang.org/x/sync/errgroup/errgroup.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2016 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 errgroup provides synchronization, error propagation, and Context
-// cancelation for groups of goroutines working on subtasks of a common task.
-package errgroup
-
-import (
- "sync"
-
- "golang.org/x/net/context"
-)
-
-// A Group is a collection of goroutines working on subtasks that are part of
-// the same overall task.
-//
-// A zero Group is valid and does not cancel on error.
-type Group struct {
- cancel func()
-
- wg sync.WaitGroup
-
- errOnce sync.Once
- err error
-}
-
-// WithContext returns a new Group and an associated Context derived from ctx.
-//
-// The derived Context is canceled the first time a function passed to Go
-// returns a non-nil error or the first time Wait returns, whichever occurs
-// first.
-func WithContext(ctx context.Context) (*Group, context.Context) {
- ctx, cancel := context.WithCancel(ctx)
- return &Group{cancel: cancel}, ctx
-}
-
-// Wait blocks until all function calls from the Go method have returned, then
-// returns the first non-nil error (if any) from them.
-func (g *Group) Wait() error {
- g.wg.Wait()
- if g.cancel != nil {
- g.cancel()
- }
- return g.err
-}
-
-// Go calls the given function in a new goroutine.
-//
-// The first call to return a non-nil error cancels the group; its error will be
-// returned by Wait.
-func (g *Group) Go(f func() error) {
- g.wg.Add(1)
-
- go func() {
- defer g.wg.Done()
-
- if err := f(); err != nil {
- g.errOnce.Do(func() {
- g.err = err
- if g.cancel != nil {
- g.cancel()
- }
- })
- }
- }()
-}
diff --git a/vendor/golang.org/x/sync/errgroup/errgroup_example_md5all_test.go b/vendor/golang.org/x/sync/errgroup/errgroup_example_md5all_test.go
deleted file mode 100644
index 714b5ae..0000000
--- a/vendor/golang.org/x/sync/errgroup/errgroup_example_md5all_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2016 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 errgroup_test
-
-import (
- "crypto/md5"
- "fmt"
- "io/ioutil"
- "log"
- "os"
- "path/filepath"
-
- "golang.org/x/net/context"
- "golang.org/x/sync/errgroup"
-)
-
-// Pipeline demonstrates the use of a Group to implement a multi-stage
-// pipeline: a version of the MD5All function with bounded parallelism from
-// https://blog.golang.org/pipelines.
-func ExampleGroup_pipeline() {
- m, err := MD5All(context.Background(), ".")
- if err != nil {
- log.Fatal(err)
- }
-
- for k, sum := range m {
- fmt.Printf("%s:\t%x\n", k, sum)
- }
-}
-
-type result struct {
- path string
- sum [md5.Size]byte
-}
-
-// MD5All reads all the files in the file tree rooted at root and returns a map
-// from file path to the MD5 sum of the file's contents. If the directory walk
-// fails or any read operation fails, MD5All returns an error.
-func MD5All(ctx context.Context, root string) (map[string][md5.Size]byte, error) {
- // ctx is canceled when g.Wait() returns. When this version of MD5All returns
- // - even in case of error! - we know that all of the goroutines have finished
- // and the memory they were using can be garbage-collected.
- g, ctx := errgroup.WithContext(ctx)
- paths := make(chan string)
-
- g.Go(func() error {
- defer close(paths)
- return filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
- if !info.Mode().IsRegular() {
- return nil
- }
- select {
- case paths <- path:
- case <-ctx.Done():
- return ctx.Err()
- }
- return nil
- })
- })
-
- // Start a fixed number of goroutines to read and digest files.
- c := make(chan result)
- const numDigesters = 20
- for i := 0; i < numDigesters; i++ {
- g.Go(func() error {
- for path := range paths {
- data, err := ioutil.ReadFile(path)
- if err != nil {
- return err
- }
- select {
- case c <- result{path, md5.Sum(data)}:
- case <-ctx.Done():
- return ctx.Err()
- }
- }
- return nil
- })
- }
- go func() {
- g.Wait()
- close(c)
- }()
-
- m := make(map[string][md5.Size]byte)
- for r := range c {
- m[r.path] = r.sum
- }
- // Check whether any of the goroutines failed. Since g is accumulating the
- // errors, we don't need to send them (or check for them) in the individual
- // results sent on the channel.
- if err := g.Wait(); err != nil {
- return nil, err
- }
- return m, nil
-}
diff --git a/vendor/golang.org/x/sync/errgroup/errgroup_test.go b/vendor/golang.org/x/sync/errgroup/errgroup_test.go
deleted file mode 100644
index 6a9696e..0000000
--- a/vendor/golang.org/x/sync/errgroup/errgroup_test.go
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright 2016 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 errgroup_test
-
-import (
- "errors"
- "fmt"
- "net/http"
- "os"
- "testing"
-
- "golang.org/x/net/context"
- "golang.org/x/sync/errgroup"
-)
-
-var (
- Web = fakeSearch("web")
- Image = fakeSearch("image")
- Video = fakeSearch("video")
-)
-
-type Result string
-type Search func(ctx context.Context, query string) (Result, error)
-
-func fakeSearch(kind string) Search {
- return func(_ context.Context, query string) (Result, error) {
- return Result(fmt.Sprintf("%s result for %q", kind, query)), nil
- }
-}
-
-// JustErrors illustrates the use of a Group in place of a sync.WaitGroup to
-// simplify goroutine counting and error handling. This example is derived from
-// the sync.WaitGroup example at https://golang.org/pkg/sync/#example_WaitGroup.
-func ExampleGroup_justErrors() {
- var g errgroup.Group
- var urls = []string{
- "http://www.golang.org/",
- "http://www.google.com/",
- "http://www.somestupidname.com/",
- }
- for _, url := range urls {
- // Launch a goroutine to fetch the URL.
- url := url // https://golang.org/doc/faq#closures_and_goroutines
- g.Go(func() error {
- // Fetch the URL.
- resp, err := http.Get(url)
- if err == nil {
- resp.Body.Close()
- }
- return err
- })
- }
- // Wait for all HTTP fetches to complete.
- if err := g.Wait(); err == nil {
- fmt.Println("Successfully fetched all URLs.")
- }
-}
-
-// Parallel illustrates the use of a Group for synchronizing a simple parallel
-// task: the "Google Search 2.0" function from
-// https://talks.golang.org/2012/concurrency.slide#46, augmented with a Context
-// and error-handling.
-func ExampleGroup_parallel() {
- Google := func(ctx context.Context, query string) ([]Result, error) {
- g, ctx := errgroup.WithContext(ctx)
-
- searches := []Search{Web, Image, Video}
- results := make([]Result, len(searches))
- for i, search := range searches {
- i, search := i, search // https://golang.org/doc/faq#closures_and_goroutines
- g.Go(func() error {
- result, err := search(ctx, query)
- if err == nil {
- results[i] = result
- }
- return err
- })
- }
- if err := g.Wait(); err != nil {
- return nil, err
- }
- return results, nil
- }
-
- results, err := Google(context.Background(), "golang")
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- return
- }
- for _, result := range results {
- fmt.Println(result)
- }
-
- // Output:
- // web result for "golang"
- // image result for "golang"
- // video result for "golang"
-}
-
-func TestZeroGroup(t *testing.T) {
- err1 := errors.New("errgroup_test: 1")
- err2 := errors.New("errgroup_test: 2")
-
- cases := []struct {
- errs []error
- }{
- {errs: []error{}},
- {errs: []error{nil}},
- {errs: []error{err1}},
- {errs: []error{err1, nil}},
- {errs: []error{err1, nil, err2}},
- }
-
- for _, tc := range cases {
- var g errgroup.Group
-
- var firstErr error
- for i, err := range tc.errs {
- err := err
- g.Go(func() error { return err })
-
- if firstErr == nil && err != nil {
- firstErr = err
- }
-
- if gErr := g.Wait(); gErr != firstErr {
- t.Errorf("after %T.Go(func() error { return err }) for err in %v\n"+
- "g.Wait() = %v; want %v",
- g, tc.errs[:i+1], err, firstErr)
- }
- }
- }
-}
-
-func TestWithContext(t *testing.T) {
- errDoom := errors.New("group_test: doomed")
-
- cases := []struct {
- errs []error
- want error
- }{
- {want: nil},
- {errs: []error{nil}, want: nil},
- {errs: []error{errDoom}, want: errDoom},
- {errs: []error{errDoom, nil}, want: errDoom},
- }
-
- for _, tc := range cases {
- g, ctx := errgroup.WithContext(context.Background())
-
- for _, err := range tc.errs {
- err := err
- g.Go(func() error { return err })
- }
-
- if err := g.Wait(); err != tc.want {
- t.Errorf("after %T.Go(func() error { return err }) for err in %v\n"+
- "g.Wait() = %v; want %v",
- g, tc.errs, err, tc.want)
- }
-
- canceled := false
- select {
- case <-ctx.Done():
- canceled = true
- default:
- }
- if !canceled {
- t.Errorf("after %T.Go(func() error { return err }) for err in %v\n"+
- "ctx.Done() was not closed",
- g, tc.errs)
- }
- }
-}
diff --git a/vendor/golang.org/x/sync/semaphore/semaphore.go b/vendor/golang.org/x/sync/semaphore/semaphore.go
deleted file mode 100644
index e9d2d79..0000000
--- a/vendor/golang.org/x/sync/semaphore/semaphore.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2017 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 semaphore provides a weighted semaphore implementation.
-package semaphore // import "golang.org/x/sync/semaphore"
-
-import (
- "container/list"
- "sync"
-
- // Use the old context because packages that depend on this one
- // (e.g. cloud.google.com/go/...) must run on Go 1.6.
- // TODO(jba): update to "context" when possible.
- "golang.org/x/net/context"
-)
-
-type waiter struct {
- n int64
- ready chan<- struct{} // Closed when semaphore acquired.
-}
-
-// NewWeighted creates a new weighted semaphore with the given
-// maximum combined weight for concurrent access.
-func NewWeighted(n int64) *Weighted {
- w := &Weighted{size: n}
- return w
-}
-
-// Weighted provides a way to bound concurrent access to a resource.
-// The callers can request access with a given weight.
-type Weighted struct {
- size int64
- cur int64
- mu sync.Mutex
- waiters list.List
-}
-
-// Acquire acquires the semaphore with a weight of n, blocking only until ctx
-// is done. On success, returns nil. On failure, returns ctx.Err() and leaves
-// the semaphore unchanged.
-//
-// If ctx is already done, Acquire may still succeed without blocking.
-func (s *Weighted) Acquire(ctx context.Context, n int64) error {
- s.mu.Lock()
- if s.size-s.cur >= n && s.waiters.Len() == 0 {
- s.cur += n
- s.mu.Unlock()
- return nil
- }
-
- if n > s.size {
- // Don't make other Acquire calls block on one that's doomed to fail.
- s.mu.Unlock()
- <-ctx.Done()
- return ctx.Err()
- }
-
- ready := make(chan struct{})
- w := waiter{n: n, ready: ready}
- elem := s.waiters.PushBack(w)
- s.mu.Unlock()
-
- select {
- case <-ctx.Done():
- err := ctx.Err()
- s.mu.Lock()
- select {
- case <-ready:
- // Acquired the semaphore after we were canceled. Rather than trying to
- // fix up the queue, just pretend we didn't notice the cancelation.
- err = nil
- default:
- s.waiters.Remove(elem)
- }
- s.mu.Unlock()
- return err
-
- case <-ready:
- return nil
- }
-}
-
-// TryAcquire acquires the semaphore with a weight of n without blocking.
-// On success, returns true. On failure, returns false and leaves the semaphore unchanged.
-func (s *Weighted) TryAcquire(n int64) bool {
- s.mu.Lock()
- success := s.size-s.cur >= n && s.waiters.Len() == 0
- if success {
- s.cur += n
- }
- s.mu.Unlock()
- return success
-}
-
-// Release releases the semaphore with a weight of n.
-func (s *Weighted) Release(n int64) {
- s.mu.Lock()
- s.cur -= n
- if s.cur < 0 {
- s.mu.Unlock()
- panic("semaphore: bad release")
- }
- for {
- next := s.waiters.Front()
- if next == nil {
- break // No more waiters blocked.
- }
-
- w := next.Value.(waiter)
- if s.size-s.cur < w.n {
- // Not enough tokens for the next waiter. We could keep going (to try to
- // find a waiter with a smaller request), but under load that could cause
- // starvation for large requests; instead, we leave all remaining waiters
- // blocked.
- //
- // Consider a semaphore used as a read-write lock, with N tokens, N
- // readers, and one writer. Each reader can Acquire(1) to obtain a read
- // lock. The writer can Acquire(N) to obtain a write lock, excluding all
- // of the readers. If we allow the readers to jump ahead in the queue,
- // the writer will starve — there is always one token available for every
- // reader.
- break
- }
-
- s.cur += w.n
- s.waiters.Remove(next)
- close(w.ready)
- }
- s.mu.Unlock()
-}
diff --git a/vendor/golang.org/x/sync/semaphore/semaphore_bench_test.go b/vendor/golang.org/x/sync/semaphore/semaphore_bench_test.go
deleted file mode 100644
index 5bb2fb3..0000000
--- a/vendor/golang.org/x/sync/semaphore/semaphore_bench_test.go
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2017 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.
-
-// +build go1.7
-
-package semaphore
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/net/context"
-)
-
-// weighted is an interface matching a subset of *Weighted. It allows
-// alternate implementations for testing and benchmarking.
-type weighted interface {
- Acquire(context.Context, int64) error
- TryAcquire(int64) bool
- Release(int64)
-}
-
-// semChan implements Weighted using a channel for
-// comparing against the condition variable-based implementation.
-type semChan chan struct{}
-
-func newSemChan(n int64) semChan {
- return semChan(make(chan struct{}, n))
-}
-
-func (s semChan) Acquire(_ context.Context, n int64) error {
- for i := int64(0); i < n; i++ {
- s <- struct{}{}
- }
- return nil
-}
-
-func (s semChan) TryAcquire(n int64) bool {
- if int64(len(s))+n > int64(cap(s)) {
- return false
- }
-
- for i := int64(0); i < n; i++ {
- s <- struct{}{}
- }
- return true
-}
-
-func (s semChan) Release(n int64) {
- for i := int64(0); i < n; i++ {
- <-s
- }
-}
-
-// acquireN calls Acquire(size) on sem N times and then calls Release(size) N times.
-func acquireN(b *testing.B, sem weighted, size int64, N int) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- for j := 0; j < N; j++ {
- sem.Acquire(context.Background(), size)
- }
- for j := 0; j < N; j++ {
- sem.Release(size)
- }
- }
-}
-
-// tryAcquireN calls TryAcquire(size) on sem N times and then calls Release(size) N times.
-func tryAcquireN(b *testing.B, sem weighted, size int64, N int) {
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- for j := 0; j < N; j++ {
- if !sem.TryAcquire(size) {
- b.Fatalf("TryAcquire(%v) = false, want true", size)
- }
- }
- for j := 0; j < N; j++ {
- sem.Release(size)
- }
- }
-}
-
-func BenchmarkNewSeq(b *testing.B) {
- for _, cap := range []int64{1, 128} {
- b.Run(fmt.Sprintf("Weighted-%d", cap), func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- _ = NewWeighted(cap)
- }
- })
- b.Run(fmt.Sprintf("semChan-%d", cap), func(b *testing.B) {
- for i := 0; i < b.N; i++ {
- _ = newSemChan(cap)
- }
- })
- }
-}
-
-func BenchmarkAcquireSeq(b *testing.B) {
- for _, c := range []struct {
- cap, size int64
- N int
- }{
- {1, 1, 1},
- {2, 1, 1},
- {16, 1, 1},
- {128, 1, 1},
- {2, 2, 1},
- {16, 2, 8},
- {128, 2, 64},
- {2, 1, 2},
- {16, 8, 2},
- {128, 64, 2},
- } {
- for _, w := range []struct {
- name string
- w weighted
- }{
- {"Weighted", NewWeighted(c.cap)},
- {"semChan", newSemChan(c.cap)},
- } {
- b.Run(fmt.Sprintf("%s-acquire-%d-%d-%d", w.name, c.cap, c.size, c.N), func(b *testing.B) {
- acquireN(b, w.w, c.size, c.N)
- })
- b.Run(fmt.Sprintf("%s-tryAcquire-%d-%d-%d", w.name, c.cap, c.size, c.N), func(b *testing.B) {
- tryAcquireN(b, w.w, c.size, c.N)
- })
- }
- }
-}
diff --git a/vendor/golang.org/x/sync/semaphore/semaphore_test.go b/vendor/golang.org/x/sync/semaphore/semaphore_test.go
deleted file mode 100644
index 3f3bc9f..0000000
--- a/vendor/golang.org/x/sync/semaphore/semaphore_test.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright 2017 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 semaphore
-
-import (
- "math/rand"
- "runtime"
- "sync"
- "testing"
- "time"
-
- "golang.org/x/net/context"
- "golang.org/x/sync/errgroup"
-)
-
-const maxSleep = 1 * time.Millisecond
-
-func HammerWeighted(sem *Weighted, n int64, loops int) {
- for i := 0; i < loops; i++ {
- sem.Acquire(context.Background(), n)
- time.Sleep(time.Duration(rand.Int63n(int64(maxSleep/time.Nanosecond))) * time.Nanosecond)
- sem.Release(n)
- }
-}
-
-func TestWeighted(t *testing.T) {
- t.Parallel()
-
- n := runtime.GOMAXPROCS(0)
- loops := 10000 / n
- sem := NewWeighted(int64(n))
- var wg sync.WaitGroup
- wg.Add(n)
- for i := 0; i < n; i++ {
- i := i
- go func() {
- defer wg.Done()
- HammerWeighted(sem, int64(i), loops)
- }()
- }
- wg.Wait()
-}
-
-func TestWeightedPanic(t *testing.T) {
- t.Parallel()
-
- defer func() {
- if recover() == nil {
- t.Fatal("release of an unacquired weighted semaphore did not panic")
- }
- }()
- w := NewWeighted(1)
- w.Release(1)
-}
-
-func TestWeightedTryAcquire(t *testing.T) {
- t.Parallel()
-
- ctx := context.Background()
- sem := NewWeighted(2)
- tries := []bool{}
- sem.Acquire(ctx, 1)
- tries = append(tries, sem.TryAcquire(1))
- tries = append(tries, sem.TryAcquire(1))
-
- sem.Release(2)
-
- tries = append(tries, sem.TryAcquire(1))
- sem.Acquire(ctx, 1)
- tries = append(tries, sem.TryAcquire(1))
-
- want := []bool{true, false, true, false}
- for i := range tries {
- if tries[i] != want[i] {
- t.Errorf("tries[%d]: got %t, want %t", i, tries[i], want[i])
- }
- }
-}
-
-func TestWeightedAcquire(t *testing.T) {
- t.Parallel()
-
- ctx := context.Background()
- sem := NewWeighted(2)
- tryAcquire := func(n int64) bool {
- ctx, cancel := context.WithTimeout(ctx, 10*time.Millisecond)
- defer cancel()
- return sem.Acquire(ctx, n) == nil
- }
-
- tries := []bool{}
- sem.Acquire(ctx, 1)
- tries = append(tries, tryAcquire(1))
- tries = append(tries, tryAcquire(1))
-
- sem.Release(2)
-
- tries = append(tries, tryAcquire(1))
- sem.Acquire(ctx, 1)
- tries = append(tries, tryAcquire(1))
-
- want := []bool{true, false, true, false}
- for i := range tries {
- if tries[i] != want[i] {
- t.Errorf("tries[%d]: got %t, want %t", i, tries[i], want[i])
- }
- }
-}
-
-func TestWeightedDoesntBlockIfTooBig(t *testing.T) {
- t.Parallel()
-
- const n = 2
- sem := NewWeighted(n)
- {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- go sem.Acquire(ctx, n+1)
- }
-
- g, ctx := errgroup.WithContext(context.Background())
- for i := n * 3; i > 0; i-- {
- g.Go(func() error {
- err := sem.Acquire(ctx, 1)
- if err == nil {
- time.Sleep(1 * time.Millisecond)
- sem.Release(1)
- }
- return err
- })
- }
- if err := g.Wait(); err != nil {
- t.Errorf("NewWeighted(%v) failed to AcquireCtx(_, 1) with AcquireCtx(_, %v) pending", n, n+1)
- }
-}
-
-// TestLargeAcquireDoesntStarve times out if a large call to Acquire starves.
-// Merely returning from the test function indicates success.
-func TestLargeAcquireDoesntStarve(t *testing.T) {
- t.Parallel()
-
- ctx := context.Background()
- n := int64(runtime.GOMAXPROCS(0))
- sem := NewWeighted(n)
- running := true
-
- var wg sync.WaitGroup
- wg.Add(int(n))
- for i := n; i > 0; i-- {
- sem.Acquire(ctx, 1)
- go func() {
- defer func() {
- sem.Release(1)
- wg.Done()
- }()
- for running {
- time.Sleep(1 * time.Millisecond)
- sem.Release(1)
- sem.Acquire(ctx, 1)
- }
- }()
- }
-
- sem.Acquire(ctx, n)
- running = false
- sem.Release(n)
- wg.Wait()
-}
diff --git a/vendor/golang.org/x/sync/singleflight/singleflight.go b/vendor/golang.org/x/sync/singleflight/singleflight.go
deleted file mode 100644
index 9a4f8d5..0000000
--- a/vendor/golang.org/x/sync/singleflight/singleflight.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2013 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 singleflight provides a duplicate function call suppression
-// mechanism.
-package singleflight // import "golang.org/x/sync/singleflight"
-
-import "sync"
-
-// call is an in-flight or completed singleflight.Do call
-type call struct {
- wg sync.WaitGroup
-
- // These fields are written once before the WaitGroup is done
- // and are only read after the WaitGroup is done.
- val interface{}
- err error
-
- // These fields are read and written with the singleflight
- // mutex held before the WaitGroup is done, and are read but
- // not written after the WaitGroup is done.
- dups int
- chans []chan<- Result
-}
-
-// Group represents a class of work and forms a namespace in
-// which units of work can be executed with duplicate suppression.
-type Group struct {
- mu sync.Mutex // protects m
- m map[string]*call // lazily initialized
-}
-
-// Result holds the results of Do, so they can be passed
-// on a channel.
-type Result struct {
- Val interface{}
- Err error
- Shared bool
-}
-
-// Do executes and returns the results of the given function, making
-// sure that only one execution is in-flight for a given key at a
-// time. If a duplicate comes in, the duplicate caller waits for the
-// original to complete and receives the same results.
-// The return value shared indicates whether v was given to multiple callers.
-func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
- g.mu.Lock()
- if g.m == nil {
- g.m = make(map[string]*call)
- }
- if c, ok := g.m[key]; ok {
- c.dups++
- g.mu.Unlock()
- c.wg.Wait()
- return c.val, c.err, true
- }
- c := new(call)
- c.wg.Add(1)
- g.m[key] = c
- g.mu.Unlock()
-
- g.doCall(c, key, fn)
- return c.val, c.err, c.dups > 0
-}
-
-// DoChan is like Do but returns a channel that will receive the
-// results when they are ready.
-func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
- ch := make(chan Result, 1)
- g.mu.Lock()
- if g.m == nil {
- g.m = make(map[string]*call)
- }
- if c, ok := g.m[key]; ok {
- c.dups++
- c.chans = append(c.chans, ch)
- g.mu.Unlock()
- return ch
- }
- c := &call{chans: []chan<- Result{ch}}
- c.wg.Add(1)
- g.m[key] = c
- g.mu.Unlock()
-
- go g.doCall(c, key, fn)
-
- return ch
-}
-
-// doCall handles the single call for a key.
-func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
- c.val, c.err = fn()
- c.wg.Done()
-
- g.mu.Lock()
- delete(g.m, key)
- for _, ch := range c.chans {
- ch <- Result{c.val, c.err, c.dups > 0}
- }
- g.mu.Unlock()
-}
-
-// Forget tells the singleflight to forget about a key. Future calls
-// to Do for this key will call the function rather than waiting for
-// an earlier call to complete.
-func (g *Group) Forget(key string) {
- g.mu.Lock()
- delete(g.m, key)
- g.mu.Unlock()
-}
diff --git a/vendor/golang.org/x/sync/singleflight/singleflight_test.go b/vendor/golang.org/x/sync/singleflight/singleflight_test.go
deleted file mode 100644
index 5e6f1b3..0000000
--- a/vendor/golang.org/x/sync/singleflight/singleflight_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2013 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 singleflight
-
-import (
- "errors"
- "fmt"
- "sync"
- "sync/atomic"
- "testing"
- "time"
-)
-
-func TestDo(t *testing.T) {
- var g Group
- v, err, _ := g.Do("key", func() (interface{}, error) {
- return "bar", nil
- })
- if got, want := fmt.Sprintf("%v (%T)", v, v), "bar (string)"; got != want {
- t.Errorf("Do = %v; want %v", got, want)
- }
- if err != nil {
- t.Errorf("Do error = %v", err)
- }
-}
-
-func TestDoErr(t *testing.T) {
- var g Group
- someErr := errors.New("Some error")
- v, err, _ := g.Do("key", func() (interface{}, error) {
- return nil, someErr
- })
- if err != someErr {
- t.Errorf("Do error = %v; want someErr %v", err, someErr)
- }
- if v != nil {
- t.Errorf("unexpected non-nil value %#v", v)
- }
-}
-
-func TestDoDupSuppress(t *testing.T) {
- var g Group
- var wg1, wg2 sync.WaitGroup
- c := make(chan string, 1)
- var calls int32
- fn := func() (interface{}, error) {
- if atomic.AddInt32(&calls, 1) == 1 {
- // First invocation.
- wg1.Done()
- }
- v := <-c
- c <- v // pump; make available for any future calls
-
- time.Sleep(10 * time.Millisecond) // let more goroutines enter Do
-
- return v, nil
- }
-
- const n = 10
- wg1.Add(1)
- for i := 0; i < n; i++ {
- wg1.Add(1)
- wg2.Add(1)
- go func() {
- defer wg2.Done()
- wg1.Done()
- v, err, _ := g.Do("key", fn)
- if err != nil {
- t.Errorf("Do error: %v", err)
- return
- }
- if s, _ := v.(string); s != "bar" {
- t.Errorf("Do = %T %v; want %q", v, v, "bar")
- }
- }()
- }
- wg1.Wait()
- // At least one goroutine is in fn now and all of them have at
- // least reached the line before the Do.
- c <- "bar"
- wg2.Wait()
- if got := atomic.LoadInt32(&calls); got <= 0 || got >= n {
- t.Errorf("number of calls = %d; want over 0 and less than %d", got, n)
- }
-}
diff --git a/vendor/golang.org/x/sync/syncmap/map.go b/vendor/golang.org/x/sync/syncmap/map.go
deleted file mode 100644
index 80e1584..0000000
--- a/vendor/golang.org/x/sync/syncmap/map.go
+++ /dev/null
@@ -1,372 +0,0 @@
-// Copyright 2016 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 syncmap provides a concurrent map implementation.
-// It is a prototype for a proposed addition to the sync package
-// in the standard library.
-// (https://golang.org/issue/18177)
-package syncmap
-
-import (
- "sync"
- "sync/atomic"
- "unsafe"
-)
-
-// Map is a concurrent map with amortized-constant-time loads, stores, and deletes.
-// It is safe for multiple goroutines to call a Map's methods concurrently.
-//
-// The zero Map is valid and empty.
-//
-// A Map must not be copied after first use.
-type Map struct {
- mu sync.Mutex
-
- // read contains the portion of the map's contents that are safe for
- // concurrent access (with or without mu held).
- //
- // The read field itself is always safe to load, but must only be stored with
- // mu held.
- //
- // Entries stored in read may be updated concurrently without mu, but updating
- // a previously-expunged entry requires that the entry be copied to the dirty
- // map and unexpunged with mu held.
- read atomic.Value // readOnly
-
- // dirty contains the portion of the map's contents that require mu to be
- // held. To ensure that the dirty map can be promoted to the read map quickly,
- // it also includes all of the non-expunged entries in the read map.
- //
- // Expunged entries are not stored in the dirty map. An expunged entry in the
- // clean map must be unexpunged and added to the dirty map before a new value
- // can be stored to it.
- //
- // If the dirty map is nil, the next write to the map will initialize it by
- // making a shallow copy of the clean map, omitting stale entries.
- dirty map[interface{}]*entry
-
- // misses counts the number of loads since the read map was last updated that
- // needed to lock mu to determine whether the key was present.
- //
- // Once enough misses have occurred to cover the cost of copying the dirty
- // map, the dirty map will be promoted to the read map (in the unamended
- // state) and the next store to the map will make a new dirty copy.
- misses int
-}
-
-// readOnly is an immutable struct stored atomically in the Map.read field.
-type readOnly struct {
- m map[interface{}]*entry
- amended bool // true if the dirty map contains some key not in m.
-}
-
-// expunged is an arbitrary pointer that marks entries which have been deleted
-// from the dirty map.
-var expunged = unsafe.Pointer(new(interface{}))
-
-// An entry is a slot in the map corresponding to a particular key.
-type entry struct {
- // p points to the interface{} value stored for the entry.
- //
- // If p == nil, the entry has been deleted and m.dirty == nil.
- //
- // If p == expunged, the entry has been deleted, m.dirty != nil, and the entry
- // is missing from m.dirty.
- //
- // Otherwise, the entry is valid and recorded in m.read.m[key] and, if m.dirty
- // != nil, in m.dirty[key].
- //
- // An entry can be deleted by atomic replacement with nil: when m.dirty is
- // next created, it will atomically replace nil with expunged and leave
- // m.dirty[key] unset.
- //
- // An entry's associated value can be updated by atomic replacement, provided
- // p != expunged. If p == expunged, an entry's associated value can be updated
- // only after first setting m.dirty[key] = e so that lookups using the dirty
- // map find the entry.
- p unsafe.Pointer // *interface{}
-}
-
-func newEntry(i interface{}) *entry {
- return &entry{p: unsafe.Pointer(&i)}
-}
-
-// Load returns the value stored in the map for a key, or nil if no
-// value is present.
-// The ok result indicates whether value was found in the map.
-func (m *Map) Load(key interface{}) (value interface{}, ok bool) {
- read, _ := m.read.Load().(readOnly)
- e, ok := read.m[key]
- if !ok && read.amended {
- m.mu.Lock()
- // Avoid reporting a spurious miss if m.dirty got promoted while we were
- // blocked on m.mu. (If further loads of the same key will not miss, it's
- // not worth copying the dirty map for this key.)
- read, _ = m.read.Load().(readOnly)
- e, ok = read.m[key]
- if !ok && read.amended {
- e, ok = m.dirty[key]
- // Regardless of whether the entry was present, record a miss: this key
- // will take the slow path until the dirty map is promoted to the read
- // map.
- m.missLocked()
- }
- m.mu.Unlock()
- }
- if !ok {
- return nil, false
- }
- return e.load()
-}
-
-func (e *entry) load() (value interface{}, ok bool) {
- p := atomic.LoadPointer(&e.p)
- if p == nil || p == expunged {
- return nil, false
- }
- return *(*interface{})(p), true
-}
-
-// Store sets the value for a key.
-func (m *Map) Store(key, value interface{}) {
- read, _ := m.read.Load().(readOnly)
- if e, ok := read.m[key]; ok && e.tryStore(&value) {
- return
- }
-
- m.mu.Lock()
- read, _ = m.read.Load().(readOnly)
- if e, ok := read.m[key]; ok {
- if e.unexpungeLocked() {
- // The entry was previously expunged, which implies that there is a
- // non-nil dirty map and this entry is not in it.
- m.dirty[key] = e
- }
- e.storeLocked(&value)
- } else if e, ok := m.dirty[key]; ok {
- e.storeLocked(&value)
- } else {
- if !read.amended {
- // We're adding the first new key to the dirty map.
- // Make sure it is allocated and mark the read-only map as incomplete.
- m.dirtyLocked()
- m.read.Store(readOnly{m: read.m, amended: true})
- }
- m.dirty[key] = newEntry(value)
- }
- m.mu.Unlock()
-}
-
-// tryStore stores a value if the entry has not been expunged.
-//
-// If the entry is expunged, tryStore returns false and leaves the entry
-// unchanged.
-func (e *entry) tryStore(i *interface{}) bool {
- p := atomic.LoadPointer(&e.p)
- if p == expunged {
- return false
- }
- for {
- if atomic.CompareAndSwapPointer(&e.p, p, unsafe.Pointer(i)) {
- return true
- }
- p = atomic.LoadPointer(&e.p)
- if p == expunged {
- return false
- }
- }
-}
-
-// unexpungeLocked ensures that the entry is not marked as expunged.
-//
-// If the entry was previously expunged, it must be added to the dirty map
-// before m.mu is unlocked.
-func (e *entry) unexpungeLocked() (wasExpunged bool) {
- return atomic.CompareAndSwapPointer(&e.p, expunged, nil)
-}
-
-// storeLocked unconditionally stores a value to the entry.
-//
-// The entry must be known not to be expunged.
-func (e *entry) storeLocked(i *interface{}) {
- atomic.StorePointer(&e.p, unsafe.Pointer(i))
-}
-
-// LoadOrStore returns the existing value for the key if present.
-// Otherwise, it stores and returns the given value.
-// The loaded result is true if the value was loaded, false if stored.
-func (m *Map) LoadOrStore(key, value interface{}) (actual interface{}, loaded bool) {
- // Avoid locking if it's a clean hit.
- read, _ := m.read.Load().(readOnly)
- if e, ok := read.m[key]; ok {
- actual, loaded, ok := e.tryLoadOrStore(value)
- if ok {
- return actual, loaded
- }
- }
-
- m.mu.Lock()
- read, _ = m.read.Load().(readOnly)
- if e, ok := read.m[key]; ok {
- if e.unexpungeLocked() {
- m.dirty[key] = e
- }
- actual, loaded, _ = e.tryLoadOrStore(value)
- } else if e, ok := m.dirty[key]; ok {
- actual, loaded, _ = e.tryLoadOrStore(value)
- m.missLocked()
- } else {
- if !read.amended {
- // We're adding the first new key to the dirty map.
- // Make sure it is allocated and mark the read-only map as incomplete.
- m.dirtyLocked()
- m.read.Store(readOnly{m: read.m, amended: true})
- }
- m.dirty[key] = newEntry(value)
- actual, loaded = value, false
- }
- m.mu.Unlock()
-
- return actual, loaded
-}
-
-// tryLoadOrStore atomically loads or stores a value if the entry is not
-// expunged.
-//
-// If the entry is expunged, tryLoadOrStore leaves the entry unchanged and
-// returns with ok==false.
-func (e *entry) tryLoadOrStore(i interface{}) (actual interface{}, loaded, ok bool) {
- p := atomic.LoadPointer(&e.p)
- if p == expunged {
- return nil, false, false
- }
- if p != nil {
- return *(*interface{})(p), true, true
- }
-
- // Copy the interface after the first load to make this method more amenable
- // to escape analysis: if we hit the "load" path or the entry is expunged, we
- // shouldn't bother heap-allocating.
- ic := i
- for {
- if atomic.CompareAndSwapPointer(&e.p, nil, unsafe.Pointer(&ic)) {
- return i, false, true
- }
- p = atomic.LoadPointer(&e.p)
- if p == expunged {
- return nil, false, false
- }
- if p != nil {
- return *(*interface{})(p), true, true
- }
- }
-}
-
-// Delete deletes the value for a key.
-func (m *Map) Delete(key interface{}) {
- read, _ := m.read.Load().(readOnly)
- e, ok := read.m[key]
- if !ok && read.amended {
- m.mu.Lock()
- read, _ = m.read.Load().(readOnly)
- e, ok = read.m[key]
- if !ok && read.amended {
- delete(m.dirty, key)
- }
- m.mu.Unlock()
- }
- if ok {
- e.delete()
- }
-}
-
-func (e *entry) delete() (hadValue bool) {
- for {
- p := atomic.LoadPointer(&e.p)
- if p == nil || p == expunged {
- return false
- }
- if atomic.CompareAndSwapPointer(&e.p, p, nil) {
- return true
- }
- }
-}
-
-// Range calls f sequentially for each key and value present in the map.
-// If f returns false, range stops the iteration.
-//
-// Range does not necessarily correspond to any consistent snapshot of the Map's
-// contents: no key will be visited more than once, but if the value for any key
-// is stored or deleted concurrently, Range may reflect any mapping for that key
-// from any point during the Range call.
-//
-// Range may be O(N) with the number of elements in the map even if f returns
-// false after a constant number of calls.
-func (m *Map) Range(f func(key, value interface{}) bool) {
- // We need to be able to iterate over all of the keys that were already
- // present at the start of the call to Range.
- // If read.amended is false, then read.m satisfies that property without
- // requiring us to hold m.mu for a long time.
- read, _ := m.read.Load().(readOnly)
- if read.amended {
- // m.dirty contains keys not in read.m. Fortunately, Range is already O(N)
- // (assuming the caller does not break out early), so a call to Range
- // amortizes an entire copy of the map: we can promote the dirty copy
- // immediately!
- m.mu.Lock()
- read, _ = m.read.Load().(readOnly)
- if read.amended {
- read = readOnly{m: m.dirty}
- m.read.Store(read)
- m.dirty = nil
- m.misses = 0
- }
- m.mu.Unlock()
- }
-
- for k, e := range read.m {
- v, ok := e.load()
- if !ok {
- continue
- }
- if !f(k, v) {
- break
- }
- }
-}
-
-func (m *Map) missLocked() {
- m.misses++
- if m.misses < len(m.dirty) {
- return
- }
- m.read.Store(readOnly{m: m.dirty})
- m.dirty = nil
- m.misses = 0
-}
-
-func (m *Map) dirtyLocked() {
- if m.dirty != nil {
- return
- }
-
- read, _ := m.read.Load().(readOnly)
- m.dirty = make(map[interface{}]*entry, len(read.m))
- for k, e := range read.m {
- if !e.tryExpungeLocked() {
- m.dirty[k] = e
- }
- }
-}
-
-func (e *entry) tryExpungeLocked() (isExpunged bool) {
- p := atomic.LoadPointer(&e.p)
- for p == nil {
- if atomic.CompareAndSwapPointer(&e.p, nil, expunged) {
- return true
- }
- p = atomic.LoadPointer(&e.p)
- }
- return p == expunged
-}
diff --git a/vendor/golang.org/x/sync/syncmap/map_bench_test.go b/vendor/golang.org/x/sync/syncmap/map_bench_test.go
deleted file mode 100644
index b279b4f..0000000
--- a/vendor/golang.org/x/sync/syncmap/map_bench_test.go
+++ /dev/null
@@ -1,216 +0,0 @@
-// Copyright 2016 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 syncmap_test
-
-import (
- "fmt"
- "reflect"
- "sync/atomic"
- "testing"
-
- "golang.org/x/sync/syncmap"
-)
-
-type bench struct {
- setup func(*testing.B, mapInterface)
- perG func(b *testing.B, pb *testing.PB, i int, m mapInterface)
-}
-
-func benchMap(b *testing.B, bench bench) {
- for _, m := range [...]mapInterface{&DeepCopyMap{}, &RWMutexMap{}, &syncmap.Map{}} {
- b.Run(fmt.Sprintf("%T", m), func(b *testing.B) {
- m = reflect.New(reflect.TypeOf(m).Elem()).Interface().(mapInterface)
- if bench.setup != nil {
- bench.setup(b, m)
- }
-
- b.ResetTimer()
-
- var i int64
- b.RunParallel(func(pb *testing.PB) {
- id := int(atomic.AddInt64(&i, 1) - 1)
- bench.perG(b, pb, id*b.N, m)
- })
- })
- }
-}
-
-func BenchmarkLoadMostlyHits(b *testing.B) {
- const hits, misses = 1023, 1
-
- benchMap(b, bench{
- setup: func(_ *testing.B, m mapInterface) {
- for i := 0; i < hits; i++ {
- m.LoadOrStore(i, i)
- }
- // Prime the map to get it into a steady state.
- for i := 0; i < hits*2; i++ {
- m.Load(i % hits)
- }
- },
-
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- for ; pb.Next(); i++ {
- m.Load(i % (hits + misses))
- }
- },
- })
-}
-
-func BenchmarkLoadMostlyMisses(b *testing.B) {
- const hits, misses = 1, 1023
-
- benchMap(b, bench{
- setup: func(_ *testing.B, m mapInterface) {
- for i := 0; i < hits; i++ {
- m.LoadOrStore(i, i)
- }
- // Prime the map to get it into a steady state.
- for i := 0; i < hits*2; i++ {
- m.Load(i % hits)
- }
- },
-
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- for ; pb.Next(); i++ {
- m.Load(i % (hits + misses))
- }
- },
- })
-}
-
-func BenchmarkLoadOrStoreBalanced(b *testing.B) {
- const hits, misses = 128, 128
-
- benchMap(b, bench{
- setup: func(b *testing.B, m mapInterface) {
- if _, ok := m.(*DeepCopyMap); ok {
- b.Skip("DeepCopyMap has quadratic running time.")
- }
- for i := 0; i < hits; i++ {
- m.LoadOrStore(i, i)
- }
- // Prime the map to get it into a steady state.
- for i := 0; i < hits*2; i++ {
- m.Load(i % hits)
- }
- },
-
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- for ; pb.Next(); i++ {
- j := i % (hits + misses)
- if j < hits {
- if _, ok := m.LoadOrStore(j, i); !ok {
- b.Fatalf("unexpected miss for %v", j)
- }
- } else {
- if v, loaded := m.LoadOrStore(i, i); loaded {
- b.Fatalf("failed to store %v: existing value %v", i, v)
- }
- }
- }
- },
- })
-}
-
-func BenchmarkLoadOrStoreUnique(b *testing.B) {
- benchMap(b, bench{
- setup: func(b *testing.B, m mapInterface) {
- if _, ok := m.(*DeepCopyMap); ok {
- b.Skip("DeepCopyMap has quadratic running time.")
- }
- },
-
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- for ; pb.Next(); i++ {
- m.LoadOrStore(i, i)
- }
- },
- })
-}
-
-func BenchmarkLoadOrStoreCollision(b *testing.B) {
- benchMap(b, bench{
- setup: func(_ *testing.B, m mapInterface) {
- m.LoadOrStore(0, 0)
- },
-
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- for ; pb.Next(); i++ {
- m.LoadOrStore(0, 0)
- }
- },
- })
-}
-
-func BenchmarkRange(b *testing.B) {
- const mapSize = 1 << 10
-
- benchMap(b, bench{
- setup: func(_ *testing.B, m mapInterface) {
- for i := 0; i < mapSize; i++ {
- m.Store(i, i)
- }
- },
-
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- for ; pb.Next(); i++ {
- m.Range(func(_, _ interface{}) bool { return true })
- }
- },
- })
-}
-
-// BenchmarkAdversarialAlloc tests performance when we store a new value
-// immediately whenever the map is promoted to clean and otherwise load a
-// unique, missing key.
-//
-// This forces the Load calls to always acquire the map's mutex.
-func BenchmarkAdversarialAlloc(b *testing.B) {
- benchMap(b, bench{
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- var stores, loadsSinceStore int64
- for ; pb.Next(); i++ {
- m.Load(i)
- if loadsSinceStore++; loadsSinceStore > stores {
- m.LoadOrStore(i, stores)
- loadsSinceStore = 0
- stores++
- }
- }
- },
- })
-}
-
-// BenchmarkAdversarialDelete tests performance when we periodically delete
-// one key and add a different one in a large map.
-//
-// This forces the Load calls to always acquire the map's mutex and periodically
-// makes a full copy of the map despite changing only one entry.
-func BenchmarkAdversarialDelete(b *testing.B) {
- const mapSize = 1 << 10
-
- benchMap(b, bench{
- setup: func(_ *testing.B, m mapInterface) {
- for i := 0; i < mapSize; i++ {
- m.Store(i, i)
- }
- },
-
- perG: func(b *testing.B, pb *testing.PB, i int, m mapInterface) {
- for ; pb.Next(); i++ {
- m.Load(i)
-
- if i%mapSize == 0 {
- m.Range(func(k, _ interface{}) bool {
- m.Delete(k)
- return false
- })
- m.Store(i, i)
- }
- }
- },
- })
-}
diff --git a/vendor/golang.org/x/sync/syncmap/map_reference_test.go b/vendor/golang.org/x/sync/syncmap/map_reference_test.go
deleted file mode 100644
index 923c51b..0000000
--- a/vendor/golang.org/x/sync/syncmap/map_reference_test.go
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright 2016 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 syncmap_test
-
-import (
- "sync"
- "sync/atomic"
-)
-
-// This file contains reference map implementations for unit-tests.
-
-// mapInterface is the interface Map implements.
-type mapInterface interface {
- Load(interface{}) (interface{}, bool)
- Store(key, value interface{})
- LoadOrStore(key, value interface{}) (actual interface{}, loaded bool)
- Delete(interface{})
- Range(func(key, value interface{}) (shouldContinue bool))
-}
-
-// RWMutexMap is an implementation of mapInterface using a sync.RWMutex.
-type RWMutexMap struct {
- mu sync.RWMutex
- dirty map[interface{}]interface{}
-}
-
-func (m *RWMutexMap) Load(key interface{}) (value interface{}, ok bool) {
- m.mu.RLock()
- value, ok = m.dirty[key]
- m.mu.RUnlock()
- return
-}
-
-func (m *RWMutexMap) Store(key, value interface{}) {
- m.mu.Lock()
- if m.dirty == nil {
- m.dirty = make(map[interface{}]interface{})
- }
- m.dirty[key] = value
- m.mu.Unlock()
-}
-
-func (m *RWMutexMap) LoadOrStore(key, value interface{}) (actual interface{}, loaded bool) {
- m.mu.Lock()
- actual, loaded = m.dirty[key]
- if !loaded {
- actual = value
- if m.dirty == nil {
- m.dirty = make(map[interface{}]interface{})
- }
- m.dirty[key] = value
- }
- m.mu.Unlock()
- return actual, loaded
-}
-
-func (m *RWMutexMap) Delete(key interface{}) {
- m.mu.Lock()
- delete(m.dirty, key)
- m.mu.Unlock()
-}
-
-func (m *RWMutexMap) Range(f func(key, value interface{}) (shouldContinue bool)) {
- m.mu.RLock()
- keys := make([]interface{}, 0, len(m.dirty))
- for k := range m.dirty {
- keys = append(keys, k)
- }
- m.mu.RUnlock()
-
- for _, k := range keys {
- v, ok := m.Load(k)
- if !ok {
- continue
- }
- if !f(k, v) {
- break
- }
- }
-}
-
-// DeepCopyMap is an implementation of mapInterface using a Mutex and
-// atomic.Value. It makes deep copies of the map on every write to avoid
-// acquiring the Mutex in Load.
-type DeepCopyMap struct {
- mu sync.Mutex
- clean atomic.Value
-}
-
-func (m *DeepCopyMap) Load(key interface{}) (value interface{}, ok bool) {
- clean, _ := m.clean.Load().(map[interface{}]interface{})
- value, ok = clean[key]
- return value, ok
-}
-
-func (m *DeepCopyMap) Store(key, value interface{}) {
- m.mu.Lock()
- dirty := m.dirty()
- dirty[key] = value
- m.clean.Store(dirty)
- m.mu.Unlock()
-}
-
-func (m *DeepCopyMap) LoadOrStore(key, value interface{}) (actual interface{}, loaded bool) {
- clean, _ := m.clean.Load().(map[interface{}]interface{})
- actual, loaded = clean[key]
- if loaded {
- return actual, loaded
- }
-
- m.mu.Lock()
- // Reload clean in case it changed while we were waiting on m.mu.
- clean, _ = m.clean.Load().(map[interface{}]interface{})
- actual, loaded = clean[key]
- if !loaded {
- dirty := m.dirty()
- dirty[key] = value
- actual = value
- m.clean.Store(dirty)
- }
- m.mu.Unlock()
- return actual, loaded
-}
-
-func (m *DeepCopyMap) Delete(key interface{}) {
- m.mu.Lock()
- dirty := m.dirty()
- delete(dirty, key)
- m.clean.Store(dirty)
- m.mu.Unlock()
-}
-
-func (m *DeepCopyMap) Range(f func(key, value interface{}) (shouldContinue bool)) {
- clean, _ := m.clean.Load().(map[interface{}]interface{})
- for k, v := range clean {
- if !f(k, v) {
- break
- }
- }
-}
-
-func (m *DeepCopyMap) dirty() map[interface{}]interface{} {
- clean, _ := m.clean.Load().(map[interface{}]interface{})
- dirty := make(map[interface{}]interface{}, len(clean)+1)
- for k, v := range clean {
- dirty[k] = v
- }
- return dirty
-}
diff --git a/vendor/golang.org/x/sync/syncmap/map_test.go b/vendor/golang.org/x/sync/syncmap/map_test.go
deleted file mode 100644
index c883f17..0000000
--- a/vendor/golang.org/x/sync/syncmap/map_test.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright 2016 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 syncmap_test
-
-import (
- "math/rand"
- "reflect"
- "runtime"
- "sync"
- "testing"
- "testing/quick"
-
- "golang.org/x/sync/syncmap"
-)
-
-type mapOp string
-
-const (
- opLoad = mapOp("Load")
- opStore = mapOp("Store")
- opLoadOrStore = mapOp("LoadOrStore")
- opDelete = mapOp("Delete")
-)
-
-var mapOps = [...]mapOp{opLoad, opStore, opLoadOrStore, opDelete}
-
-// mapCall is a quick.Generator for calls on mapInterface.
-type mapCall struct {
- op mapOp
- k, v interface{}
-}
-
-func (c mapCall) apply(m mapInterface) (interface{}, bool) {
- switch c.op {
- case opLoad:
- return m.Load(c.k)
- case opStore:
- m.Store(c.k, c.v)
- return nil, false
- case opLoadOrStore:
- return m.LoadOrStore(c.k, c.v)
- case opDelete:
- m.Delete(c.k)
- return nil, false
- default:
- panic("invalid mapOp")
- }
-}
-
-type mapResult struct {
- value interface{}
- ok bool
-}
-
-func randValue(r *rand.Rand) interface{} {
- b := make([]byte, r.Intn(4))
- for i := range b {
- b[i] = 'a' + byte(rand.Intn(26))
- }
- return string(b)
-}
-
-func (mapCall) Generate(r *rand.Rand, size int) reflect.Value {
- c := mapCall{op: mapOps[rand.Intn(len(mapOps))], k: randValue(r)}
- switch c.op {
- case opStore, opLoadOrStore:
- c.v = randValue(r)
- }
- return reflect.ValueOf(c)
-}
-
-func applyCalls(m mapInterface, calls []mapCall) (results []mapResult, final map[interface{}]interface{}) {
- for _, c := range calls {
- v, ok := c.apply(m)
- results = append(results, mapResult{v, ok})
- }
-
- final = make(map[interface{}]interface{})
- m.Range(func(k, v interface{}) bool {
- final[k] = v
- return true
- })
-
- return results, final
-}
-
-func applyMap(calls []mapCall) ([]mapResult, map[interface{}]interface{}) {
- return applyCalls(new(syncmap.Map), calls)
-}
-
-func applyRWMutexMap(calls []mapCall) ([]mapResult, map[interface{}]interface{}) {
- return applyCalls(new(RWMutexMap), calls)
-}
-
-func applyDeepCopyMap(calls []mapCall) ([]mapResult, map[interface{}]interface{}) {
- return applyCalls(new(DeepCopyMap), calls)
-}
-
-func TestMapMatchesRWMutex(t *testing.T) {
- if err := quick.CheckEqual(applyMap, applyRWMutexMap, nil); err != nil {
- t.Error(err)
- }
-}
-
-func TestMapMatchesDeepCopy(t *testing.T) {
- if err := quick.CheckEqual(applyMap, applyDeepCopyMap, nil); err != nil {
- t.Error(err)
- }
-}
-
-func TestConcurrentRange(t *testing.T) {
- const mapSize = 1 << 10
-
- m := new(syncmap.Map)
- for n := int64(1); n <= mapSize; n++ {
- m.Store(n, int64(n))
- }
-
- done := make(chan struct{})
- var wg sync.WaitGroup
- defer func() {
- close(done)
- wg.Wait()
- }()
- for g := int64(runtime.GOMAXPROCS(0)); g > 0; g-- {
- r := rand.New(rand.NewSource(g))
- wg.Add(1)
- go func(g int64) {
- defer wg.Done()
- for i := int64(0); ; i++ {
- select {
- case <-done:
- return
- default:
- }
- for n := int64(1); n < mapSize; n++ {
- if r.Int63n(mapSize) == 0 {
- m.Store(n, n*i*g)
- } else {
- m.Load(n)
- }
- }
- }
- }(g)
- }
-
- iters := 1 << 10
- if testing.Short() {
- iters = 16
- }
- for n := iters; n > 0; n-- {
- seen := make(map[int64]bool, mapSize)
-
- m.Range(func(ki, vi interface{}) bool {
- k, v := ki.(int64), vi.(int64)
- if v%k != 0 {
- t.Fatalf("while Storing multiples of %v, Range saw value %v", k, v)
- }
- if seen[k] {
- t.Fatalf("Range visited key %v twice", k)
- }
- seen[k] = true
- return true
- })
-
- if len(seen) != mapSize {
- t.Fatalf("Range visited %v elements of %v-element Map", len(seen), mapSize)
- }
- }
-}