Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
cmd /
compile /
internal /
gc /
[ HOME SHELL ]
Name
Size
Permission
Action
builtin
[ DIR ]
drwxr-xr-x
testdata
[ DIR ]
drwxr-xr-x
alg.go
16.28
KB
-rw-r--r--
align.go
9.85
KB
-rw-r--r--
bexport.go
4.41
KB
-rw-r--r--
bimport.go
667
B
-rw-r--r--
bitset.go
1.15
KB
-rw-r--r--
bootstrap.go
311
B
-rw-r--r--
builtin.go
16.41
KB
-rw-r--r--
builtin_test.go
622
B
-rw-r--r--
bv.go
5.5
KB
-rw-r--r--
class_string.go
712
B
-rw-r--r--
closure.go
15.57
KB
-rw-r--r--
const.go
27.21
KB
-rw-r--r--
constFold_test.go
322.99
KB
-rw-r--r--
dcl.go
28.37
KB
-rw-r--r--
dep_test.go
587
B
-rw-r--r--
dump.go
6.37
KB
-rw-r--r--
dwinl.go
10.07
KB
-rw-r--r--
esc.go
12.22
KB
-rw-r--r--
escape.go
37.37
KB
-rw-r--r--
export.go
5.33
KB
-rw-r--r--
fixedbugs_test.go
2.23
KB
-rw-r--r--
float_test.go
11.51
KB
-rw-r--r--
fmt.go
41.71
KB
-rw-r--r--
gen.go
2.33
KB
-rw-r--r--
global_test.go
2.57
KB
-rw-r--r--
go.go
7.4
KB
-rw-r--r--
gsubr.go
9.08
KB
-rw-r--r--
iexport.go
31.65
KB
-rw-r--r--
iface_test.go
1.92
KB
-rw-r--r--
iimport.go
22.79
KB
-rw-r--r--
init.go
3.29
KB
-rw-r--r--
initorder.go
9.84
KB
-rw-r--r--
inl.go
35.08
KB
-rw-r--r--
inl_test.go
6.64
KB
-rw-r--r--
lang_test.go
1.46
KB
-rw-r--r--
lex.go
5.96
KB
-rw-r--r--
lex_test.go
3.63
KB
-rw-r--r--
logic_test.go
11.08
KB
-rw-r--r--
main.go
43.75
KB
-rw-r--r--
mapfile_mmap.go
1.21
KB
-rw-r--r--
mapfile_read.go
485
B
-rw-r--r--
mkbuiltin.go
5.34
KB
-rw-r--r--
mpfloat.go
6.56
KB
-rw-r--r--
mpint.go
5.34
KB
-rw-r--r--
noder.go
37.65
KB
-rw-r--r--
obj.go
11.44
KB
-rw-r--r--
op_string.go
4.88
KB
-rw-r--r--
order.go
37.39
KB
-rw-r--r--
pgen.go
21.66
KB
-rw-r--r--
pgen_test.go
6.01
KB
-rw-r--r--
phi.go
14.72
KB
-rw-r--r--
plive.go
44.51
KB
-rw-r--r--
pprof.go
274
B
-rw-r--r--
racewalk.go
2.61
KB
-rw-r--r--
range.go
13.72
KB
-rw-r--r--
reflect.go
48.07
KB
-rw-r--r--
reproduciblebuilds_test.go
1.46
KB
-rw-r--r--
scc.go
4.18
KB
-rw-r--r--
scope.go
2.8
KB
-rw-r--r--
scope_test.go
13.67
KB
-rw-r--r--
select.go
9.16
KB
-rw-r--r--
shift_test.go
21.46
KB
-rw-r--r--
sinit.go
26.75
KB
-rw-r--r--
sizeof_test.go
844
B
-rw-r--r--
ssa.go
224.4
KB
-rw-r--r--
ssa_test.go
5.1
KB
-rw-r--r--
subr.go
43.73
KB
-rw-r--r--
swt.go
18.51
KB
-rw-r--r--
syntax.go
36.41
KB
-rw-r--r--
timings.go
5.75
KB
-rw-r--r--
trace.go
494
B
-rw-r--r--
truncconst_test.go
1.76
KB
-rw-r--r--
typecheck.go
87.11
KB
-rw-r--r--
types.go
1.19
KB
-rw-r--r--
types_acc.go
491
B
-rw-r--r--
universe.go
10.88
KB
-rw-r--r--
unsafe.go
1.8
KB
-rw-r--r--
util.go
2.18
KB
-rw-r--r--
walk.go
101.89
KB
-rw-r--r--
zerorange_test.go
1.89
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : select.go
// Copyright 2009 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 gc import "cmd/compile/internal/types" // select func typecheckselect(sel *Node) { var def *Node lno := setlineno(sel) typecheckslice(sel.Ninit.Slice(), ctxStmt) for _, ncase := range sel.List.Slice() { if ncase.Op != OCASE { setlineno(ncase) Fatalf("typecheckselect %v", ncase.Op) } if ncase.List.Len() == 0 { // default if def != nil { yyerrorl(ncase.Pos, "multiple defaults in select (first at %v)", def.Line()) } else { def = ncase } } else if ncase.List.Len() > 1 { yyerrorl(ncase.Pos, "select cases cannot be lists") } else { ncase.List.SetFirst(typecheck(ncase.List.First(), ctxStmt)) n := ncase.List.First() ncase.Left = n ncase.List.Set(nil) switch n.Op { default: pos := n.Pos if n.Op == ONAME { // We don't have the right position for ONAME nodes (see #15459 and // others). Using ncase.Pos for now as it will provide the correct // line number (assuming the expression follows the "case" keyword // on the same line). This matches the approach before 1.10. pos = ncase.Pos } yyerrorl(pos, "select case must be receive, send or assign recv") // convert x = <-c into OSELRECV(x, <-c). // remove implicit conversions; the eventual assignment // will reintroduce them. case OAS: if (n.Right.Op == OCONVNOP || n.Right.Op == OCONVIFACE) && n.Right.Implicit() { n.Right = n.Right.Left } if n.Right.Op != ORECV { yyerrorl(n.Pos, "select assignment must have receive on right hand side") break } n.Op = OSELRECV // convert x, ok = <-c into OSELRECV2(x, <-c) with ntest=ok case OAS2RECV: if n.Right.Op != ORECV { yyerrorl(n.Pos, "select assignment must have receive on right hand side") break } n.Op = OSELRECV2 n.Left = n.List.First() n.List.Set1(n.List.Second()) // convert <-c into OSELRECV(N, <-c) case ORECV: n = nodl(n.Pos, OSELRECV, nil, n) n.SetTypecheck(1) ncase.Left = n case OSEND: break } } typecheckslice(ncase.Nbody.Slice(), ctxStmt) } lineno = lno } func walkselect(sel *Node) { lno := setlineno(sel) if sel.Nbody.Len() != 0 { Fatalf("double walkselect") } init := sel.Ninit.Slice() sel.Ninit.Set(nil) init = append(init, walkselectcases(&sel.List)...) sel.List.Set(nil) sel.Nbody.Set(init) walkstmtlist(sel.Nbody.Slice()) lineno = lno } func walkselectcases(cases *Nodes) []*Node { n := cases.Len() sellineno := lineno // optimization: zero-case select if n == 0 { return []*Node{mkcall("block", nil, nil)} } // optimization: one-case select: single op. // TODO(rsc): Reenable optimization once order.go can handle it. // golang.org/issue/7672. if n == 1 { cas := cases.First() setlineno(cas) l := cas.Ninit.Slice() if cas.Left != nil { // not default: n := cas.Left l = append(l, n.Ninit.Slice()...) n.Ninit.Set(nil) var ch *Node switch n.Op { default: Fatalf("select %v", n.Op) // ok already case OSEND: ch = n.Left case OSELRECV, OSELRECV2: ch = n.Right.Left if n.Op == OSELRECV || n.List.Len() == 0 { if n.Left == nil { n = n.Right } else { n.Op = OAS } break } if n.Left == nil { nblank = typecheck(nblank, ctxExpr|ctxAssign) n.Left = nblank } n.Op = OAS2 n.List.Prepend(n.Left) n.Rlist.Set1(n.Right) n.Right = nil n.Left = nil n.SetTypecheck(0) n = typecheck(n, ctxStmt) } // if ch == nil { block() }; n; a := nod(OIF, nil, nil) a.Left = nod(OEQ, ch, nodnil()) var ln Nodes ln.Set(l) a.Nbody.Set1(mkcall("block", nil, &ln)) l = ln.Slice() a = typecheck(a, ctxStmt) l = append(l, a, n) } l = append(l, cas.Nbody.Slice()...) l = append(l, nod(OBREAK, nil, nil)) return l } // convert case value arguments to addresses. // this rewrite is used by both the general code and the next optimization. for _, cas := range cases.Slice() { setlineno(cas) n := cas.Left if n == nil { continue } switch n.Op { case OSEND: n.Right = nod(OADDR, n.Right, nil) n.Right = typecheck(n.Right, ctxExpr) case OSELRECV, OSELRECV2: if n.Op == OSELRECV2 && n.List.Len() == 0 { n.Op = OSELRECV } if n.Left != nil { n.Left = nod(OADDR, n.Left, nil) n.Left = typecheck(n.Left, ctxExpr) } } } // optimization: two-case select but one is default: single non-blocking op. if n == 2 && (cases.First().Left == nil || cases.Second().Left == nil) { var cas *Node var dflt *Node if cases.First().Left == nil { cas = cases.Second() dflt = cases.First() } else { dflt = cases.Second() cas = cases.First() } n := cas.Left setlineno(n) r := nod(OIF, nil, nil) r.Ninit.Set(cas.Ninit.Slice()) switch n.Op { default: Fatalf("select %v", n.Op) case OSEND: // if selectnbsend(c, v) { body } else { default body } ch := n.Left r.Left = mkcall1(chanfn("selectnbsend", 2, ch.Type), types.Types[TBOOL], &r.Ninit, ch, n.Right) case OSELRECV: // if selectnbrecv(&v, c) { body } else { default body } r = nod(OIF, nil, nil) r.Ninit.Set(cas.Ninit.Slice()) ch := n.Right.Left elem := n.Left if elem == nil { elem = nodnil() } r.Left = mkcall1(chanfn("selectnbrecv", 2, ch.Type), types.Types[TBOOL], &r.Ninit, elem, ch) case OSELRECV2: // if selectnbrecv2(&v, &received, c) { body } else { default body } r = nod(OIF, nil, nil) r.Ninit.Set(cas.Ninit.Slice()) ch := n.Right.Left elem := n.Left if elem == nil { elem = nodnil() } receivedp := nod(OADDR, n.List.First(), nil) receivedp = typecheck(receivedp, ctxExpr) r.Left = mkcall1(chanfn("selectnbrecv2", 2, ch.Type), types.Types[TBOOL], &r.Ninit, elem, receivedp, ch) } r.Left = typecheck(r.Left, ctxExpr) r.Nbody.Set(cas.Nbody.Slice()) r.Rlist.Set(append(dflt.Ninit.Slice(), dflt.Nbody.Slice()...)) return []*Node{r, nod(OBREAK, nil, nil)} } var init []*Node // generate sel-struct lineno = sellineno selv := temp(types.NewArray(scasetype(), int64(n))) r := nod(OAS, selv, nil) r = typecheck(r, ctxStmt) init = append(init, r) order := temp(types.NewArray(types.Types[TUINT16], 2*int64(n))) r = nod(OAS, order, nil) r = typecheck(r, ctxStmt) init = append(init, r) // register cases for i, cas := range cases.Slice() { setlineno(cas) init = append(init, cas.Ninit.Slice()...) cas.Ninit.Set(nil) // Keep in sync with runtime/select.go. const ( caseNil = iota caseRecv caseSend caseDefault ) var c, elem *Node var kind int64 = caseDefault if n := cas.Left; n != nil { init = append(init, n.Ninit.Slice()...) switch n.Op { default: Fatalf("select %v", n.Op) case OSEND: kind = caseSend c = n.Left elem = n.Right case OSELRECV, OSELRECV2: kind = caseRecv c = n.Right.Left elem = n.Left } } setField := func(f string, val *Node) { r := nod(OAS, nodSym(ODOT, nod(OINDEX, selv, nodintconst(int64(i))), lookup(f)), val) r = typecheck(r, ctxStmt) init = append(init, r) } setField("kind", nodintconst(kind)) if c != nil { c = convnop(c, types.Types[TUNSAFEPTR]) setField("c", c) } if elem != nil { elem = convnop(elem, types.Types[TUNSAFEPTR]) setField("elem", elem) } // TODO(mdempsky): There should be a cleaner way to // handle this. if instrumenting { r = mkcall("selectsetpc", nil, nil, bytePtrToIndex(selv, int64(i))) init = append(init, r) } } // run the select lineno = sellineno chosen := temp(types.Types[TINT]) recvOK := temp(types.Types[TBOOL]) r = nod(OAS2, nil, nil) r.List.Set2(chosen, recvOK) fn := syslook("selectgo") r.Rlist.Set1(mkcall1(fn, fn.Type.Results(), nil, bytePtrToIndex(selv, 0), bytePtrToIndex(order, 0), nodintconst(int64(n)))) r = typecheck(r, ctxStmt) init = append(init, r) // selv and order are no longer alive after selectgo. init = append(init, nod(OVARKILL, selv, nil)) init = append(init, nod(OVARKILL, order, nil)) // dispatch cases for i, cas := range cases.Slice() { setlineno(cas) cond := nod(OEQ, chosen, nodintconst(int64(i))) cond = typecheck(cond, ctxExpr) cond = defaultlit(cond, nil) r = nod(OIF, cond, nil) if n := cas.Left; n != nil && n.Op == OSELRECV2 { x := nod(OAS, n.List.First(), recvOK) x = typecheck(x, ctxStmt) r.Nbody.Append(x) } r.Nbody.AppendNodes(&cas.Nbody) r.Nbody.Append(nod(OBREAK, nil, nil)) init = append(init, r) } return init } // bytePtrToIndex returns a Node representing "(*byte)(&n[i])". func bytePtrToIndex(n *Node, i int64) *Node { s := nod(OADDR, nod(OINDEX, n, nodintconst(i)), nil) t := types.NewPtr(types.Types[TUINT8]) return convnop(s, t) } var scase *types.Type // Keep in sync with src/runtime/select.go. func scasetype() *types.Type { if scase == nil { scase = tostruct([]*Node{ namedfield("c", types.Types[TUNSAFEPTR]), namedfield("elem", types.Types[TUNSAFEPTR]), namedfield("kind", types.Types[TUINT16]), namedfield("pc", types.Types[TUINTPTR]), namedfield("releasetime", types.Types[TINT64]), }) scase.SetNoalg(true) } return scase }
Close