- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for HasSideEffects (0.35 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/assign/assign.go
// If LHS and RHS have different cardinality, they can't be the same. return } for i, lhs := range stmt.Lhs { rhs := stmt.Rhs[i] if analysisutil.HasSideEffects(pass.TypesInfo, lhs) || analysisutil.HasSideEffects(pass.TypesInfo, rhs) || isMapIndex(pass.TypesInfo, lhs) { continue // expressions may not be equal } if reflect.TypeOf(lhs) != reflect.TypeOf(rhs) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 2.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/internal/analysisutil/util.go
func Format(fset *token.FileSet, x ast.Expr) string { var b bytes.Buffer printer.Fprint(&b, fset, x) return b.String() } // HasSideEffects reports whether evaluation of e has side effects. func HasSideEffects(info *types.Info, e ast.Expr) bool { safe := true ast.Inspect(e, func(node ast.Node) bool { switch n := node.(type) { case *ast.CallExpr: typVal := info.Types[n.Fun]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 3.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/bools/bools.go
exprs := op.split(e, seen) // Partition the slice of expressions into commutative sets. i := 0 var sets [][]ast.Expr for j := 0; j <= len(exprs); j++ { if j == len(exprs) || analysisutil.HasSideEffects(info, exprs[j]) { if i < j { sets = append(sets, exprs[i:j]) } i = j + 1 } } return sets } // checkRedundant checks for expressions of the form // // e && e
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 4.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/fuse.go
return true } // isEmpty reports whether b contains any live values. // There may be false positives. func isEmpty(b *Block) bool { for _, v := range b.Values { if v.Uses > 0 || v.Op.IsCall() || v.Op.HasSideEffects() || v.Type.IsVoid() || opcodeTable[v.Op].nilCheck { return false } } return true } // fuseBlockPlain handles a run of blocks with length >= 2,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 20:45:54 UTC 2023 - 9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/deadcode.go
q = append(q, v) if v.Pos.IsStmt() != src.PosNotStmt { liveOrderStmts = append(liveOrderStmts, v) } } } for _, v := range b.Values { if (opcodeTable[v.Op].call || opcodeTable[v.Op].hasSideEffects || opcodeTable[v.Op].nilCheck) && !live[v.ID] { live[v.ID] = true q = append(q, v) if v.Pos.IsStmt() != src.PosNotStmt { liveOrderStmts = append(liveOrderStmts, v) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 00:29:01 UTC 2023 - 9.2K bytes - Viewed (0)