Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Sep 12, 2023
1 parent cd5845a commit 6b7e4e7
Show file tree
Hide file tree
Showing 202 changed files with 408 additions and 401 deletions.
7 changes: 7 additions & 0 deletions builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,18 @@ func (interp *Interp) callBuiltinByStack(caller *frame, fn string, ssaArgs []ssa
panic(err)
}
caller.setReg(ir, uintptr(offset))
case "clear":
arg0 := caller.reg(ia[0])
valueClear(reflect.ValueOf(arg0))
default:
panic("unknown built-in: " + fn)
}
}

func valueClear(v reflect.Value) {
reflect.ValueOf(v).MethodByName("Clear").Call(nil)
}

const ptrSize = 4 << (^uintptr(0) >> 63)

const maxUintptr = ^uintptr(0)
Expand Down
4 changes: 2 additions & 2 deletions pkg/archive/tar/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package tar

Expand Down
4 changes: 2 additions & 2 deletions pkg/archive/zip/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package zip

Expand Down
4 changes: 2 additions & 2 deletions pkg/bufio/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package bufio

Expand Down
4 changes: 2 additions & 2 deletions pkg/bytes/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package bytes

Expand Down
4 changes: 2 additions & 2 deletions pkg/compress/bzip2/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package bzip2

Expand Down
4 changes: 2 additions & 2 deletions pkg/compress/flate/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package flate

Expand Down
4 changes: 2 additions & 2 deletions pkg/compress/gzip/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package gzip

Expand Down
4 changes: 2 additions & 2 deletions pkg/compress/lzw/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package lzw

Expand Down
4 changes: 2 additions & 2 deletions pkg/compress/zlib/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package zlib

Expand Down
4 changes: 2 additions & 2 deletions pkg/container/heap/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package heap

Expand Down
4 changes: 2 additions & 2 deletions pkg/container/list/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package list

Expand Down
4 changes: 2 additions & 2 deletions pkg/container/ring/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package ring

Expand Down
4 changes: 2 additions & 2 deletions pkg/context/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package context

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/aes/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package aes

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/cipher/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package cipher

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/des/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package des

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/dsa/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package dsa

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/ecdh/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package ecdh

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/ecdsa/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package ecdsa

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/ed25519/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package ed25519

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/elliptic/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package elliptic

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package crypto

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/hmac/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package hmac

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/md5/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package md5

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/rand/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package rand

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/rc4/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package rc4

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/rsa/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package rsa

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/sha1/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package sha1

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/sha256/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package sha256

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/sha512/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package sha512

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/subtle/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package subtle

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/tls/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package tls

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/x509/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package x509

Expand Down
4 changes: 2 additions & 2 deletions pkg/crypto/x509/pkix/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package pkix

Expand Down
4 changes: 2 additions & 2 deletions pkg/database/sql/driver/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package driver

Expand Down
4 changes: 2 additions & 2 deletions pkg/database/sql/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package sql

Expand Down
4 changes: 2 additions & 2 deletions pkg/debug/buildinfo/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package buildinfo

Expand Down
4 changes: 2 additions & 2 deletions pkg/debug/dwarf/go120_export.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export by github.com/goplus/igop/cmd/qexp

//go:build go1.20 && !go1.20
// +build go1.20,!go1.20
//go:build go1.20 && !go1.21
// +build go1.20,!go1.21

package dwarf

Expand Down
Loading

0 comments on commit 6b7e4e7

Please sign in to comment.