Class: Rubex::SymbolTable::Entry
- Inherits:
-
Object
- Object
- Rubex::SymbolTable::Entry
- Defined in:
- lib/rubex/symbol_table/entry.rb
Instance Attribute Summary collapse
-
#c_name ⇒ Object
Equivalent name in C code.
-
#extern ⇒ Object
Is an extern entry.
-
#name ⇒ Object
Original name.
-
#no_gil ⇒ Object
Whether this entry has a no_gil tag or not.
-
#singleton ⇒ Object
Is a Ruby singleton method.
-
#times_called ⇒ Object
Number of times this entry is called in a function.
-
#type ⇒ Object
Ctype of the the entry.
-
#value ⇒ Object
Default value of the entry, if any.
Instance Method Summary collapse
- #c_code(local_scope) ⇒ Object
- #extern? ⇒ Boolean
-
#initialize(name, c_name, type, value) ⇒ Entry
constructor
A new instance of Entry.
- #singleton? ⇒ Boolean
Constructor Details
#initialize(name, c_name, type, value) ⇒ Entry
Returns a new instance of Entry.
21 22 23 24 25 |
# File 'lib/rubex/symbol_table/entry.rb', line 21 def initialize name, c_name, type, value @name, @c_name, @type, @value = name, c_name, type, value @times_called = 0 @no_gil = false end |
Instance Attribute Details
#c_name ⇒ Object
Equivalent name in C code.
7 8 9 |
# File 'lib/rubex/symbol_table/entry.rb', line 7 def c_name @c_name end |
#extern ⇒ Object
Is an extern entry
13 14 15 |
# File 'lib/rubex/symbol_table/entry.rb', line 13 def extern @extern end |
#name ⇒ Object
Original name.
5 6 7 |
# File 'lib/rubex/symbol_table/entry.rb', line 5 def name @name end |
#no_gil ⇒ Object
Whether this entry has a no_gil tag or not. Applicable for C functions.
19 20 21 |
# File 'lib/rubex/symbol_table/entry.rb', line 19 def no_gil @no_gil end |
#singleton ⇒ Object
Is a Ruby singleton method
15 16 17 |
# File 'lib/rubex/symbol_table/entry.rb', line 15 def singleton @singleton end |
#times_called ⇒ Object
Number of times this entry is called in a function. Useful for Ruby methods.
17 18 19 |
# File 'lib/rubex/symbol_table/entry.rb', line 17 def times_called @times_called end |
#type ⇒ Object
Ctype of the the entry.
9 10 11 |
# File 'lib/rubex/symbol_table/entry.rb', line 9 def type @type end |
#value ⇒ Object
Default value of the entry, if any.
11 12 13 |
# File 'lib/rubex/symbol_table/entry.rb', line 11 def value @value end |
Instance Method Details
#c_code(local_scope) ⇒ Object
27 28 29 |
# File 'lib/rubex/symbol_table/entry.rb', line 27 def c_code local_scope c_name end |
#singleton? ⇒ Boolean
33 |
# File 'lib/rubex/symbol_table/entry.rb', line 33 def singleton?; @singleton; end |