Class: Rubycc::Front::AST::BuiltinBitScan

Inherits:
Data
  • Object
show all
Defined in:
lib/rubycc/front/ast.rb

Overview

"__builtin_ctz/ctzll/clz/clzll ( x )": counts the trailing (ctz) or leading (clz) zero bits of an integer, typed int. operand is the value scanned, direction is :forward for ctz or :reverse for clz, and width is the operand's byte width (4 for the plain form, 8 for the "ll" form). x == 0 is undefined behavior (gcc), so no zero handling is implied. token is the builtin keyword.

Instance Attribute Summary collapse

Instance Attribute Details

#directionObject (readonly)

Returns the value of attribute direction

Returns:

  • (Object)

    the current value of direction



403
404
405
# File 'lib/rubycc/front/ast.rb', line 403

def direction
  @direction
end

#operandObject (readonly)

Returns the value of attribute operand

Returns:

  • (Object)

    the current value of operand



403
404
405
# File 'lib/rubycc/front/ast.rb', line 403

def operand
  @operand
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



403
404
405
# File 'lib/rubycc/front/ast.rb', line 403

def token
  @token
end

#widthObject (readonly)

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



403
404
405
# File 'lib/rubycc/front/ast.rb', line 403

def width
  @width
end