Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for positiveAtoi (0.07 sec)

  1. src/cmd/asm/internal/asm/asm.go

    		negative = true
    		op = op[1:]
    	}
    	if len(op) == 0 || op[0].ScanToken != scanner.Int {
    		p.errorf("TEXT %s: frame size must be an immediate constant", name)
    		return
    	}
    	frameSize := p.positiveAtoi(op[0].String())
    	if negative {
    		frameSize = -frameSize
    	}
    	op = op[1:]
    	argSize := int64(abi.ArgsSizeUnknown)
    	if len(op) > 0 {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Oct 21 14:11:44 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/asm/parse.go

    			p.errorf("missing closing paren")
    		}
    		return v
    	}
    	p.errorf("unexpected %s evaluating expression", tok)
    	return 0
    }
    
    // positiveAtoi returns an int64 that must be >= 0.
    func (p *Parser) positiveAtoi(str string) int64 {
    	value, err := strconv.ParseInt(str, 0, 64)
    	if err != nil {
    		p.errorf("%s", err)
    	}
    	if value < 0 {
    		p.errorf("%s overflows int64", str)
    	}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Sep 04 18:16:59 UTC 2024
    - 36.9K bytes
    - Viewed (0)
Back to top