Class: Rubex::SymbolTable::Scope::Klass
- Inherits:
-
Object
- Object
- Rubex::SymbolTable::Scope::Klass
- Includes:
- Rubex::SymbolTable::Scope
- Defined in:
- lib/rubex/symbol_table/scope.rb
Instance Attribute Summary collapse
-
#begin_block_callbacks ⇒ Object
Stores callbacks for begin blocks since they cannot be a part of the statements of a class.
-
#include_files ⇒ Object
TODO: this should probably not be here.
-
#no_gil_block_callbacks ⇒ Object
Similar to begin_block_callbacks.
Attributes included from Rubex::SymbolTable::Scope
#arg_entries, #c_method_entries, #carray_entries, #entries, #free_temp_entries, #global_entries, #klass_name, #name, #outer_scope, #ruby_class_entries, #ruby_constant_entries, #ruby_method_entries, #ruby_obj_entries, #self_name, #sue_entries, #temp_entries, #type, #type_entries, #var_entries
Instance Method Summary collapse
-
#add_begin_block_callback(func) ⇒ Object
Stores CFunctionDef nodes that represent begin block callbacks.
-
#add_no_gil_block_callback(func) ⇒ Object
Stores CFunctionDef nodes that represent no_gil block callbacks.
-
#initialize(name, outer_scope) ⇒ Klass
constructor
A new instance of Klass.
- #object_scope ⇒ Object
Methods included from Rubex::SymbolTable::Scope
#[], #add_c_method, #add_carray, #add_ruby_class, #add_ruby_method, #add_ruby_obj, #allocate_temp, #check_entry, #declare_sue, #declare_type, #declare_var, #find, #has_entry?, #release_temp
Constructor Details
#initialize(name, outer_scope) ⇒ Klass
Returns a new instance of Klass.
200 201 202 203 204 205 206 207 |
# File 'lib/rubex/symbol_table/scope.rb', line 200 def initialize name, outer_scope super(outer_scope) @name = name @klass_name = @name @include_files = [] @begin_block_callbacks = [] @no_gil_block_callbacks = [] end |
Instance Attribute Details
#begin_block_callbacks ⇒ Object
Stores callbacks for begin blocks since they cannot be a part of the
statements of a class.
196 197 198 |
# File 'lib/rubex/symbol_table/scope.rb', line 196 def begin_block_callbacks @begin_block_callbacks end |
#include_files ⇒ Object
TODO: this should probably not be here.
193 194 195 |
# File 'lib/rubex/symbol_table/scope.rb', line 193 def include_files @include_files end |
#no_gil_block_callbacks ⇒ Object
Similar to begin_block_callbacks
198 199 200 |
# File 'lib/rubex/symbol_table/scope.rb', line 198 def no_gil_block_callbacks @no_gil_block_callbacks end |
Instance Method Details
#add_begin_block_callback(func) ⇒ Object
Stores CFunctionDef nodes that represent begin block callbacks.
219 220 221 |
# File 'lib/rubex/symbol_table/scope.rb', line 219 def add_begin_block_callback func @begin_block_callbacks << func end |
#add_no_gil_block_callback(func) ⇒ Object
Stores CFunctionDef nodes that represent no_gil block callbacks.
224 225 226 |
# File 'lib/rubex/symbol_table/scope.rb', line 224 def add_no_gil_block_callback func @no_gil_block_callbacks << func end |
#object_scope ⇒ Object
209 210 211 212 213 214 215 216 |
# File 'lib/rubex/symbol_table/scope.rb', line 209 def object_scope temp = self while temp.outer_scope != nil temp = temp.outer_scope end temp end |