Class: Java::OrgJrubyAst::LocalVarNode

Inherits:
Object
  • Object
show all
Defined in:
lib/duby/old/compiler_old.rb,
lib/duby/old/typer_old.rb

Instance Method Summary collapse

Instance Method Details

#compile(builder) ⇒ Object



670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/duby/old/compiler_old.rb', line 670

def compile(builder)
  local_index = builder.local(name)
  case type(builder)
  when Jboolean
    builder.biload(local_index)
  when Jint
    builder.iload(local_index)
  when Jlong
    builder.lload(local_index)
  when Jfloat
    builder.fload(local_index)
  when Jdouble
    builder.dload(local_index)
  else
    builder.aload(local_index)
  end
end

#type(builder) ⇒ Object



132
133
134
# File 'lib/duby/old/typer_old.rb', line 132

def type(builder)
  @type ||= builder.local_type(name)
end