Class: Rubycc::Front::AST::BuiltinSync
- Inherits:
-
Data
- Object
- Data
- Rubycc::Front::AST::BuiltinSync
- Defined in:
- lib/rubycc/front/ast.rb
Overview
One of gcc's legacy _sync* builtins. kind names the operation —
:fetch_add, :fetch_sub, :add_fetch, :sub_fetch, :or_fetch, :exchange,
:release, :fence, :bool_compare_and_swap or :val_compare_and_swap — and
args holds the argument expressions exactly as written. As with
BuiltinAtomic the parser checks only the argument count; the operand
types and the width restriction need resolved types and belong to the
generator. token is the builtin keyword.
This is a node of its own rather than a flag on BuiltinAtomic because the two families' argument layouts differ: the _sync* forms are full barriers by definition and so carry no memory-order argument at all, while the compare-and-swap pair takes its expected value directly instead of through a pointer. Sharing a node would invite lowering code written for one layout to read the other's arguments by index.
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args
448 449 450 |
# File 'lib/rubycc/front/ast.rb', line 448 def args @args end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
448 449 450 |
# File 'lib/rubycc/front/ast.rb', line 448 def kind @kind end |
#token ⇒ Object (readonly)
Returns the value of attribute token
448 449 450 |
# File 'lib/rubycc/front/ast.rb', line 448 def token @token end |