Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for newdefer (0.16 sec)

  1. src/runtime/panic.go

    	// deferreturn.
    	p.lr, p.fp = pc, sp
    	p.nextFrame()
    }
    
    // nextDefer returns the next deferred function to invoke, if any.
    //
    // Note: The "ok bool" result is necessary to correctly handle when
    // the deferred function itself was nil (e.g., "defer (func())(nil)").
    func (p *_panic) nextDefer() (func(), bool) {
    	gp := getg()
    
    	if !p.deferreturn {
    		if gp._panic != p {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/shufflesharding/shufflesharding_test.go

    		},
    		{
    			"deckSize: 1024 handSize: 6",
    			1024,
    			6,
    			nil,
    		},
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			_, err := NewDealer(test.deckSize, test.handSize)
    			if !reflect.DeepEqual(err, test.err) {
    				t.Errorf("test %s fails: expected %v but got %v", test.name, test.err, err)
    				return
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 25 06:44:08 UTC 2021
    - 6.7K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/lex/lex.go

    	case scanner.RawString:
    		return "raw string constant"
    	case scanner.Comment:
    		return "comment"
    	default:
    		return fmt.Sprintf("%q", rune(t))
    	}
    }
    
    // NewLexer returns a lexer for the named file and the given link context.
    func NewLexer(name string) TokenReader {
    	input := NewInput(name)
    	fd, err := os.Open(name)
    	if err != nil {
    		log.Fatalf("%s\n", err)
    	}
    	input.Push(NewTokenizer(name, fd, fd))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 18:31:05 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  4. src/main/webapp/js/admin/jquery-3.6.3.min.map

    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Fri Feb 17 12:13:41 UTC 2023
    - 135.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/shufflesharding/shufflesharding.go

    	deckSize int
    	handSize int
    }
    
    // NewDealer will create a Dealer with the given deckSize and handSize, will return error when
    // deckSize or handSize is invalid as below.
    // 1. deckSize or handSize is not positive
    // 2. handSize is greater than deckSize
    // 3. deckSize is impractically large (greater than 1<<26)
    // 4. required entropy bits of deckSize and handSize is greater than MaxHashBits
    func NewDealer(deckSize, handSize int) (*Dealer, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 23 08:38:03 UTC 2019
    - 4K bytes
    - Viewed (0)
  6. src/main/webapp/js/jquery-3.6.3.min.map

    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Fri Feb 17 12:13:41 UTC 2023
    - 135.2K bytes
    - Viewed (0)
  7. src/cmd/asm/main.go

    		for _, exp := range buildcfg.Experiment.Enabled() {
    			flags.D = append(flags.D, "GOEXPERIMENT_"+exp)
    		}
    	}
    
    	var ok, diag bool
    	var failedFile string
    	for _, f := range flag.Args() {
    		lexer := lex.NewLexer(f)
    		parser := asm.NewParser(ctxt, architecture, lexer)
    		ctxt.DiagFunc = func(format string, args ...interface{}) {
    			diag = true
    			log.Printf(format, args...)
    		}
    		if *flags.SymABIs {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/asm/endtoend_test.go

    // result against a golden file.
    
    func testEndToEnd(t *testing.T, goarch, file string) {
    	input := filepath.Join("testdata", file+".s")
    	architecture, ctxt := setArch(goarch)
    	architecture.Init(ctxt)
    	lexer := lex.NewLexer(input)
    	parser := NewParser(ctxt, architecture, lexer)
    	pList := new(obj.Plist)
    	var ok bool
    	testOut = new(strings.Builder) // The assembler writes test output to this buffer.
    	ctxt.Bso = bufio.NewWriter(os.Stdout)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 18:42:59 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  9. src/go/printer/printer_test.go

    		out := buf.String()
    		if out != src {
    			t.Errorf("\ngot : %q\nwant: %q\n", out, src)
    		}
    	}
    }
    
    var stmts = []string{
    	"i := 0",
    	"select {}\nvar a, b = 1, 2\nreturn a + b",
    	"go f()\ndefer func() {}()",
    }
    
    func TestStmtLists(t *testing.T) {
    	for _, src := range stmts {
    		file, err := parser.ParseFile(fset, "", "package p; func _() {"+src+"}", parser.ParseComments)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go

    // invalid.
    func checkConfig(qCfg fq.QueuingConfig) (*shufflesharding.Dealer, error) {
    	if qCfg.DesiredNumQueues <= 0 {
    		return nil, nil
    	}
    	dealer, err := shufflesharding.NewDealer(qCfg.DesiredNumQueues, qCfg.HandSize)
    	if err != nil {
    		err = fmt.Errorf("the QueueSetConfig implies an invalid shuffle sharding config (DesiredNumQueues is deckSize): %w", err)
    	}
    	return dealer, err
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 04 16:59:21 UTC 2024
    - 42.4K bytes
    - Viewed (0)
Back to top