Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 52 for typecheck (0.2 sec)

  1. src/cmd/compile/internal/walk/order.go

    								init = init[1:]
    							}
    						}
    						dcl := typecheck.Stmt(ir.NewDecl(base.Pos, ir.ODCL, n.(*ir.Name)))
    						ncas.PtrInit().Append(dcl)
    					}
    					tmp := o.newTemp(t, t.HasPointers())
    					as := typecheck.Stmt(ir.NewAssignStmt(base.Pos, n, typecheck.Conv(tmp, n.Type())))
    					ncas.PtrInit().Append(as)
    					r.Lhs[i] = tmp
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/expr.go

    	et := n.X.Type().Kind()
    
    	if types.IsComplex[et] && n.Op() == ir.ODIV {
    		t := n.Type()
    		call := mkcall("complex128div", types.Types[types.TCOMPLEX128], init, typecheck.Conv(n.X, types.Types[types.TCOMPLEX128]), typecheck.Conv(n.Y, types.Types[types.TCOMPLEX128]))
    		return typecheck.Conv(call, t)
    	}
    
    	// Nothing to do for float divisions.
    	if types.IsFloat[et] {
    		return n
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssagen/abi.go

    	// TODO(mdempsky): Means we can't set sym.Def in Declfunc, ugh.
    	fn := ir.NewFunc(pos, pos, f.Sym(), types.NewSignature(nil,
    		typecheck.NewFuncParams(ft.Params()),
    		typecheck.NewFuncParams(ft.Results())))
    	fn.ABI = wrapperABI
    	typecheck.DeclFunc(fn)
    
    	fn.SetABIWrapper(true)
    	fn.SetDupok(true)
    
    	// ABI0-to-ABIInternal wrappers will be mainly loading params from
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/func.go

    // To be called by typecheck, not directly.
    // (Call typecheck.Func instead.)
    func tcFunc(n *ir.Func) {
    	if base.EnableTrace && base.Flag.LowerT {
    		defer tracePrint("tcFunc", n)(nil)
    	}
    
    	if name := n.Nname; name.Typecheck() == 0 {
    		base.AssertfAt(name.Type() != nil, n.Pos(), "missing type: %v", name)
    		name.SetTypecheck(1)
    	}
    }
    
    // tcCall typechecks an OCALL node.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/stmt.go

    		}
    		checkassign(n.Value)
    	}
    
    	// second half of dance
    	n.SetTypecheck(1)
    	if n.Key != nil && n.Key.Typecheck() == 0 {
    		n.Key = AssignExpr(n.Key)
    	}
    	if n.Value != nil && n.Value.Typecheck() == 0 {
    		n.Value = AssignExpr(n.Value)
    	}
    
    	Stmts(n.Body)
    }
    
    // tcReturn typechecks an ORETURN node.
    func tcReturn(n *ir.ReturnStmt) ir.Node {
    	if ir.CurFunc == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/staticinit/sched.go

    	// Don't use LookupNum; it interns the resulting string, but these are all unique.
    	sym := typecheck.Lookup(fmt.Sprintf("%s%d", obj.StaticNamePref, statuniqgen))
    	statuniqgen++
    
    	n := ir.NewNameAt(base.Pos, sym, t)
    	sym.Def = n
    
    	n.Class = ir.PEXTERN
    	typecheck.Target.Externs = append(typecheck.Target.Externs, n)
    
    	n.Linksym().Set(obj.AttrStatic, true)
    	return n
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/go/types/issues_test.go

    	const src = `
    package p
    
    func f[T any]() {}
    func _()        { f() }
    `
    	// no error handler provided (this issue)
    	var conf Config
    	typecheck(src, &conf, nil) // must not panic
    
    	// with error handler (sanity check)
    	conf.Error = func(error) {}
    	typecheck(src, &conf, nil) // must not panic
    }
    
    func TestIssue63260(t *testing.T) {
    	const src = `
    package p
    
    func _() {
            use(f[*string])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/issues_test.go

    	const src = `
    package p
    
    func f[T any]() {}
    func _()        { f() }
    `
    	// no error handler provided (this issue)
    	var conf Config
    	typecheck(src, &conf, nil) // must not panic
    
    	// with error handler (sanity check)
    	conf.Error = func(error) {}
    	typecheck(src, &conf, nil) // must not panic
    }
    
    func TestIssue63260(t *testing.T) {
    	const src = `
    package p
    
    func _() {
            use(f[*string])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  9. src/go/types/stdlib_test.go

    // Copyright 2013 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.
    
    // This file tests types.Check by using it to
    // typecheck the standard library and tests.
    
    package types_test
    
    import (
    	"errors"
    	"fmt"
    	"go/ast"
    	"go/build"
    	"go/importer"
    	"go/parser"
    	"go/scanner"
    	"go/token"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 04:39:56 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/stdlib_test.go

    // Copyright 2013 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.
    
    // This file tests types2.Check by using it to
    // typecheck the standard library and tests.
    
    package types2_test
    
    import (
    	"bytes"
    	"cmd/compile/internal/syntax"
    	"errors"
    	"fmt"
    	"go/build"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"runtime"
    	"strings"
    	"sync"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:18:33 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top