Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for fprintFunc (0.43 sec)

  1. src/cmd/compile/internal/ssa/print.go

    	"cmd/internal/notsha256"
    	"cmd/internal/src"
    )
    
    func printFunc(f *Func) {
    	f.Logf("%s", f)
    }
    
    func hashFunc(f *Func) []byte {
    	h := notsha256.New()
    	p := stringFuncPrinter{w: h, printDead: true}
    	fprintFunc(p, f)
    	return h.Sum(nil)
    }
    
    func (f *Func) String() string {
    	var buf strings.Builder
    	p := stringFuncPrinter{w: &buf, printDead: true}
    	fprintFunc(p, f)
    	return buf.String()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/html.go

    	buf := new(strings.Builder)
    	if dot != nil {
    		dot.writeFuncSVG(buf, phase, f)
    	}
    	fmt.Fprint(buf, "<code>")
    	p := htmlFuncPrinter{w: buf}
    	fprintFunc(p, f)
    
    	// fprintFunc(&buf, f) // TODO: HTML, not text, <br> for line breaks, etc.
    	fmt.Fprint(buf, "</code>")
    	return buf.String()
    }
    
    func (d *dotWriter) writeFuncSVG(w io.Writer, phase string, f *Func) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 04 15:11:40 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/compile.go

    // Dumping is done to files to avoid buffering huge strings before
    // output.
    func (f *Func) dumpFile(phaseName string) {
    	fi := f.DumpFileForPhase(phaseName)
    	if fi != nil {
    		p := stringFuncPrinter{w: fi}
    		fprintFunc(p, f)
    		fi.Close()
    	}
    }
    
    type pass struct {
    	name     string
    	fn       func(*Func)
    	required bool
    	disabled bool
    	time     bool            // report time to run pass
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  4. internal/color/color.go

    			return color.New(color.FgGreen).SprintFunc()
    		}
    		return fmt.Sprint
    	}()
    
    	Greenf = func() func(format string, a ...interface{}) string {
    		if IsTerminal() {
    			return color.New(color.FgGreen).SprintfFunc()
    		}
    		return fmt.Sprintf
    	}()
    
    	GreenBold = func() func(a ...interface{}) string {
    		if IsTerminal() {
    			return color.New(color.FgGreen, color.Bold).SprintFunc()
    		}
    		return fmt.Sprint
    	}()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 17:57:52 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  5. pkg/printers/tablegenerator.go

    // match the number of columns defined for that printer function.
    func ValidateRowPrintHandlerFunc(printFunc reflect.Value) error {
    	if printFunc.Kind() != reflect.Func {
    		return fmt.Errorf("invalid print handler. %#v is not a function", printFunc)
    	}
    	funcType := printFunc.Type()
    	if funcType.NumIn() != 2 || funcType.NumOut() != 2 {
    		return fmt.Errorf("invalid print handler." +
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/cli-runtime/pkg/printers/tableprinter.go

    )
    
    var _ ResourcePrinter = &HumanReadablePrinter{}
    
    type printHandler struct {
    	columnDefinitions []metav1.TableColumnDefinition
    	printFunc         reflect.Value
    }
    
    var (
    	statusHandlerEntry = &printHandler{
    		columnDefinitions: statusColumnDefinitions,
    		printFunc:         reflect.ValueOf(printStatus),
    	}
    
    	statusColumnDefinitions = []metav1.TableColumnDefinition{
    		{Name: "Status", Type: "string"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Oct 30 15:08:43 UTC 2022
    - 16.7K bytes
    - Viewed (0)
  7. src/cmd/go/internal/work/shell.go

    		workDir:   workDir,
    		printFunc: print,
    	}
    	return &Shell{shellShared: shared}
    }
    
    // Print emits a to this Shell's output stream, formatting it like fmt.Print.
    // It is safe to call concurrently.
    func (sh *Shell) Print(a ...any) {
    	sh.printLock.Lock()
    	defer sh.printLock.Unlock()
    	sh.printFunc(a...)
    }
    
    func (sh *Shell) printLocked(a ...any) {
    	sh.printFunc(a...)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/schedule_test.go

    				Goto("exit")),
    			Bloc("exit",
    				Exit("mem3"))),
    	}
    	for _, c := range cases {
    		schedule(c.f)
    		if !isSingleLiveMem(c.f) {
    			t.Error("single-live-mem restriction not enforced by schedule for func:")
    			printFunc(c.f)
    		}
    	}
    }
    
    func isSingleLiveMem(f *Func) bool {
    	for _, b := range f.Blocks {
    		var liveMem *Value
    		for _, v := range b.Values {
    			for _, w := range v.Args {
    				if w.Type.IsMemory() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 08 01:46:00 UTC 2022
    - 5.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/func.go

    func (f *Func) Fatalf(msg string, args ...interface{}) {
    	stats := "crashed"
    	if f.Log() {
    		f.Logf("  pass %s end %s\n", f.pass.name, stats)
    		printFunc(f)
    	}
    	if f.HTMLWriter != nil {
    		f.HTMLWriter.WritePhase(f.pass.name, fmt.Sprintf("%s <span class=\"stats\">%s</span>", f.pass.name, stats))
    		f.HTMLWriter.flushPhases()
    	}
    	f.fe.Fatalf(f.Entry.Pos, msg, args...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  10. pkg/printers/internalversion/printers_test.go

    		}
    	}
    }
    
    type TestPrintHandler struct {
    	numCalls int
    }
    
    func (t *TestPrintHandler) TableHandler(columnDefinitions []metav1.TableColumnDefinition, printFunc interface{}) error {
    	t.numCalls++
    	return nil
    }
    
    func (t *TestPrintHandler) getNumCalls() int {
    	return t.numCalls
    }
    
    func TestAllHandlers(t *testing.T) {
    	h := &TestPrintHandler{numCalls: 0}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 14:04:15 UTC 2024
    - 218.6K bytes
    - Viewed (0)
Back to top