Class: AdLint::Cc1::PhantomVariable
- Inherits:
-
AliasVariable
- Object
- Object
- TypedObject
- Variable
- ScopedVariable
- OuterVariable
- NamedVariable
- AliasVariable
- AdLint::Cc1::PhantomVariable
- Defined in:
- lib/adlint/cc1/ctrlexpr.rb
Instance Attribute Summary
Attributes included from Nameable
Attributes inherited from OuterVariable
Attributes inherited from ScopedVariable
Attributes inherited from TypedObject
Attributes inherited from Object
Attributes included from Bindable
Instance Method Summary collapse
- #assign!(val) ⇒ Object
-
#initialize(named_var, phantom_val = nil) ⇒ PhantomVariable
constructor
A new instance of PhantomVariable.
- #pretty_print(pp) ⇒ Object
- #to_named_variable ⇒ Object
- #value ⇒ Object
Methods inherited from NamedVariable
#designated_by_lvalue?, #temporary?
Methods included from Nameable
Methods inherited from OuterVariable
#begin_value_versioning, #end_value_versioning, #enter_value_versioning_group, #inner?, #inner_variable_at, #inner_variable_named, #leave_value_versioning_group, #rollback_all_value_versions!, #thin_latest_value_version!
Methods inherited from ScopedVariable
#declared_as_auto?, #declared_as_extern?
Methods inherited from Variable
#begin_value_versioning, #end_value_versioning, #enter_value_versioning_group, #function?, #inner?, #leave_value_versioning_group, #name, #named?, #narrow_value_domain!, #outer?, #rollback_all_value_versions!, #thin_latest_value_version!, #uninitialize!, #variable?, #widen_value_domain!
Methods inherited from TypedObject
#to_pointer, #to_pointer_value, #to_value, #to_variable
Methods inherited from Object
#declared_as_auto?, #declared_as_extern?, #declared_as_register?, #declared_as_static?, #designated_by_lvalue?, #function?, #named?, #storage_class_specifiers, #temporary?, #variable?
Methods included from Bindable
Constructor Details
#initialize(named_var, phantom_val = nil) ⇒ PhantomVariable
Returns a new instance of PhantomVariable.
916 917 918 919 920 |
# File 'lib/adlint/cc1/ctrlexpr.rb', line 916 def initialize(named_var, phantom_val = nil) super(named_var) @base_var = named_var @phantom_val = phantom_val ? phantom_val : named_var.memory.read.dup end |
Instance Method Details
#assign!(val) ⇒ Object
926 927 928 |
# File 'lib/adlint/cc1/ctrlexpr.rb', line 926 def assign!(val, *) @phantom_val = val end |
#pretty_print(pp) ⇒ Object
934 935 936 |
# File 'lib/adlint/cc1/ctrlexpr.rb', line 934 def pretty_print(pp) Summary.new(object_id, name, type, @phantom_val).pretty_print(pp) end |
#to_named_variable ⇒ Object
930 931 932 |
# File 'lib/adlint/cc1/ctrlexpr.rb', line 930 def to_named_variable @base_var.to_named_variable end |
#value ⇒ Object
922 923 924 |
# File 'lib/adlint/cc1/ctrlexpr.rb', line 922 def value @phantom_val end |