File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ def write_alloc_c_function(code)
131131 # TODO: modify for supporting inheritance
132132 def member_struct_allocations
133133 c_name = @scope . find ( @attached_type ) . c_name
134- binding . pry
134+ # binding.pry
135135 "data->#{ Rubex ::POINTER_PREFIX + @attached_type } = (#{ c_name } *)xmalloc(sizeof(#{ c_name } ));\n "
136136 end
137137
Original file line number Diff line number Diff line change @@ -270,11 +270,14 @@ def initialize name, outer_scope
270270 def upgrade_symbols_to_global
271271 @block_entries . uniq!
272272 @block_entries . each do |entry |
273- entry . c_name = Rubex ::GLOBAL_PREFIX + @name + entry . c_name
274273 @outer_scope . global_entries << entry
275274 end
276275
277276 remove_global_from_local_entries
277+
278+ @outer_scope . global_entries . each do |entry |
279+ entry . c_name = Rubex ::GLOBAL_PREFIX + @name + entry . c_name
280+ end
278281 end
279282
280283 # IMPORTANT NOTE TO PROGRAMMER:
@@ -306,7 +309,7 @@ def upgrade_symbols_to_global
306309 # of @outer_scope get carried forward into this begin block callback.
307310 # Therefore these variables get declared inside the begin block callback
308311 # as well. So whenever one of these Arrays is called for this particular
309- # scope, we return an empty array so that nothing gets declared.
312+ # scope, we preturn an empty array so that nothing gets declared.
310313 def method_missing meth , *args , &block
311314 return [ ] if meth == :var_entries
312315 ret = @outer_scope . send ( meth , *args , &block )
You can’t perform that action at this time.
0 commit comments