Class: Rubycc::Front::AST::BuiltinAtomic
- Inherits:
-
Data
- Object
- Data
- Rubycc::Front::AST::BuiltinAtomic
- Defined in:
- lib/rubycc/front/ast.rb
Overview
One of gcc's _atomic* builtins. kind names the operation — :load,
:store, :exchange, :compare_exchange, :fetch_add, :fetch_sub,
:add_fetch, :sub_fetch, :or_fetch or :fence — and args
holds the argument expressions exactly as written, including the trailing
memory-order argument(s) and __atomic_compare_exchange_n's weak flag.
The parser checks only the argument count here; the operand types (and
the 4-or-8-byte width restriction) are the generator's to diagnose, since
they need the resolved types. token is the builtin keyword.
The memory-order arguments are carried through but never inspected: every operation is lowered at the strongest order (see IR::Generator#gen_builtin_atomic), which is why they need no constant folding here.
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
432 433 434 |
# File 'lib/rubycc/front/ast.rb', line 432 def args @args end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
432 433 434 |
# File 'lib/rubycc/front/ast.rb', line 432 def kind @kind end |
#token ⇒ Object (readonly)
Returns the value of attribute token
432 433 434 |
# File 'lib/rubycc/front/ast.rb', line 432 def token @token end |