Class: YTLJit::VM::Node::SendInstanceMemoryNode
- Defined in:
- lib/ytl/accmem.rb
Instance Method Summary collapse
Methods inherited from SendNode
Instance Method Details
#collect_candidate_type_regident(context, slf) ⇒ Object
302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/ytl/accmem.rb', line 302 def collect_candidate_type_regident(context, slf) if YTL::Memory.is_a?(slf.ruby_type) then slfcls = @arguments[2].get_constant_value if slfcls then tt = RubyType::BaseType.from_ruby_class(slfcls[0]) add_type(context.to_signature, tt) end return context end super end |
#compile(context) ⇒ Object
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'lib/ytl/accmem.rb', line 316 def compile(context) @arguments[2].decide_type_once(context.to_signature) rtype = @arguments[2].type rrtype = rtype.ruby_type if YTL::Memory.is_a?(rrtype) then objadd = lambda { YTL::TheMemory.address } context.ret_reg = OpVarImmidiateAddress.new(objadd) context.ret_node = self context else super end end |