Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 422 for if (0.25 sec)

  1. src/cmd/compile/internal/types2/typeparam.go

    	switch u := under(bound).(type) {
    	case *Basic:
    		if !isValid(u) {
    			// error is reported elsewhere
    			return &emptyInterface
    		}
    	case *Interface:
    		if isTypeParam(bound) {
    			// error is reported in Checker.collectTypeParams
    			return &emptyInterface
    		}
    		ityp = u
    	}
    
    	// If we don't have an interface, wrap constraint into an implicit interface.
    	if ityp == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/test/pgo_devirtualize_test.go

    		m := devirtualizedLine.FindStringSubmatch(line)
    		if m == nil {
    			continue
    		}
    
    		d := devirtualization{
    			pos:    m[1],
    			callee: m[2],
    		}
    		got[d] = struct{}{}
    	}
    	if err := cmd.Wait(); err != nil {
    		t.Fatalf("error running go test: %v", err)
    	}
    	if err := scanner.Err(); err != nil {
    		t.Fatalf("error reading go test output: %v", err)
    	}
    
    	if len(got) != len(want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 15 21:30:35 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/fuse_test.go

    			If("bool1", "then", "else")),
    		Bloc("then",
    			Goto("exit")),
    		Bloc("else",
    			Goto("exit")),
    		Bloc("exit",
    			Exit("mem")))
    
    	CheckFunc(fun.f)
    	fuseLate(fun.f)
    
    	for _, b := range fun.f.Blocks {
    		if b == fun.blocks["then"] && b.Kind != BlockInvalid {
    			t.Errorf("then was not eliminated, but should have")
    		}
    		if b == fun.blocks["else"] && b.Kind != BlockInvalid {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/issue50182_test.go

    func genericSorted[T sort.Interface](data T) bool {
    	n := data.Len()
    	for i := n - 1; i > 0; i-- {
    		if data.Less(i, i-1) {
    			return false
    		}
    	}
    	return true
    }
    func TestGenericSorted(t *testing.T) {
    	var data = sort.IntSlice{-10, -5, 0, 1, 2, 3, 5, 7, 11, 100, 100, 100, 1000, 10000}
    	f := func() {
    		genericSorted(data)
    	}
    	if n := testing.AllocsPerRun(10, f); n > 0 {
    		t.Errorf("got %f allocs, want 0", n)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 13 23:35:37 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/errsupport.go

    	var alt string // alternative spelling of selector; if any
    	if obj != nil {
    		alt = obj.Name()
    		if obj.Pkg() == check.pkg {
    			assert(alt != sel) // otherwise there is no lookup error
    			e = misspelled
    		} else if isExported(sel) {
    			if isExported(alt) {
    				e = misspelled
    			} else if tail(sel) == tail(alt) {
    				e = unexported
    			}
    		} else if isExported(alt) {
    			if tail(sel) == tail(alt) {
    				e = misspelled
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 07 16:41:56 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/sccp_test.go

    			Valu("t30", OpIsSliceInBounds, c.config.Types.Int64, 0, nil, "v2", "v1"),
    			Goto("b2")),
    		Bloc("b2",
    			Exit("mem")))
    	sccp(fun.f)
    	CheckFunc(fun.f)
    	for name, value := range fun.values {
    		if strings.HasPrefix(name, "t") {
    			if !isConst(value) {
    				t.Errorf("Must be constant: %v", value.LongString())
    			}
    		}
    	}
    }
    
    func TestSCCPIf(t *testing.T) {
    	c := testConfig(t)
    	fun := c.Fun("b1",
    		Bloc("b1",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 21:01:50 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/sizes_test.go

        b bool
        s string
        n int
    }
    `
    	ts := findStructType(t, src)
    	sizes := types2.StdSizes{WordSize: 4, MaxAlign: 4}
    	if got := sizes.Sizeof(ts); got != 20 {
    		t.Errorf("Sizeof(%v) with WordSize 4 = %d want 20", ts, got)
    	}
    	sizes = types2.StdSizes{WordSize: 8, MaxAlign: 8}
    	if got := sizes.Sizeof(ts); got != 40 {
    		t.Errorf("Sizeof(%v) with WordSize 8 = %d want 40", ts, got)
    	}
    }
    
    // go.dev/issue/16464
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 21:00:48 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/flags/flags.go

    	fmt.Fprintf(os.Stderr, "Flags:\n")
    	flag.PrintDefaults()
    	os.Exit(2)
    }
    
    func Parse() {
    	objabi.Flagparse(Usage)
    	if flag.NArg() == 0 {
    		flag.Usage()
    	}
    
    	// Flag refinement.
    	if *OutputFile == "" {
    		if flag.NArg() != 1 {
    			flag.Usage()
    		}
    		input := filepath.Base(flag.Arg(0))
    		input = strings.TrimSuffix(input, ".s")
    		*OutputFile = fmt.Sprintf("%s.o", input)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:18:23 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/layout.go

    					if !exit.contains(s.b.ID) {
    						continue NextPred
    					}
    				}
    				// All Succs are in exit; add p.
    				exit.add(p.ID)
    				changed = true
    			}
    		}
    		if !changed {
    			break
    		}
    	}
    
    	// Initialize indegree of each block
    	for _, b := range f.Blocks {
    		if exit.contains(b.ID) {
    			// exit blocks are always scheduled last
    			continue
    		}
    		indegree[b.ID] = len(b.Preds)
    		if len(b.Preds) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/test/reproduciblebuilds_test.go

    				if err != nil {
    					t.Fatalf("failed to compile: %v\n%s", err, out)
    				}
    				obj, err := os.ReadFile(tmp.Name())
    				if err != nil {
    					t.Fatalf("failed to read object file: %v", err)
    				}
    				if i == 0 {
    					want = obj
    				} else {
    					if !bytes.Equal(want, obj) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 18:07:35 UTC 2023
    - 2.8K bytes
    - Viewed (0)
Back to top