add openssl sha1,sha256,sha512
This commit is contained in:
10
ssa/expr.go
10
ssa/expr.go
@@ -1022,6 +1022,10 @@ func (b Builder) Do(da DoAction, fn Expr, args ...Expr) (ret Expr) {
|
||||
// Go spec (excluding "make" and "new").
|
||||
func (b Builder) BuiltinCall(fn string, args ...Expr) (ret Expr) {
|
||||
switch fn {
|
||||
case "max":
|
||||
fallthrough
|
||||
case "min":
|
||||
return b.max(args...)
|
||||
case "len":
|
||||
if len(args) == 1 {
|
||||
arg := args[0]
|
||||
@@ -1128,6 +1132,12 @@ func (b Builder) BuiltinCall(fn string, args ...Expr) (ret Expr) {
|
||||
panic("todo: " + fn)
|
||||
}
|
||||
|
||||
// max return the max value for the args
|
||||
func (b Builder) max(args ...Expr) (ret Expr) {
|
||||
//todo
|
||||
return args[len(args)-1]
|
||||
}
|
||||
|
||||
// Println prints the arguments to stderr, followed by a newline.
|
||||
func (b Builder) Println(args ...Expr) (ret Expr) {
|
||||
return b.PrintEx(true, args...)
|
||||
|
||||
Reference in New Issue
Block a user