Class: BiteScript::MethodBuilder
- Inherits:
-
Object
- Object
- BiteScript::MethodBuilder
- Defined in:
- lib/duby/jvm/types/intrinsics.rb,
lib/duby/jvm/types/integers.rb
Instance Method Summary collapse
Instance Method Details
#inot ⇒ Object
2 3 4 5 |
# File 'lib/duby/jvm/types/integers.rb', line 2 def inot iconst_m1 ixor end |
#lnot ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/duby/jvm/types/integers.rb', line 7 def lnot # TODO would any of these be faster? # iconst_m1; i2l # lconst_1; lneg ldc_long(-1) ixor end |
#op_to_bool {|true_label| ... } ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/duby/jvm/types/intrinsics.rb', line 5 def op_to_bool done_label = label true_label = label yield(true_label) iconst_0 goto(done_label) true_label.set! iconst_1 done_label.set! end |