Class: Lignite::Lt32
- Inherits:
-
Object
- Object
- Lignite::Lt32
- Defined in:
- lib/lignite/body_compiler.rb
Overview
Less-than (32 bit)
Instance Method Summary collapse
-
#initialize(a, b) ⇒ Lt32
constructor
< Condition.
- #jump_back(compiler, body_size, self_size = nil) ⇒ Object
- #jump_forward(compiler, body_size) ⇒ Object
- #not ⇒ Object
Constructor Details
#initialize(a, b) ⇒ Lt32
< Condition
4 5 6 7 |
# File 'lib/lignite/body_compiler.rb', line 4 def initialize(a, b) @a = a @b = b end |
Instance Method Details
#jump_back(compiler, body_size, self_size = nil) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/lignite/body_compiler.rb', line 17 def jump_back(compiler, body_size, self_size = nil) if self_size.nil? fake = compiler.clone_context jump_back(fake, body_size, 0) self_size = fake.bytes.bytesize end compiler.jr_lt32(@a, @b, Complex(- (body_size + self_size), 2)) end |
#jump_forward(compiler, body_size) ⇒ Object
13 14 15 |
# File 'lib/lignite/body_compiler.rb', line 13 def jump_forward(compiler, body_size) compiler.jr_lt32(@a, @b, Complex(body_size, 2)) end |
#not ⇒ Object
9 10 11 |
# File 'lib/lignite/body_compiler.rb', line 9 def not Ge32.new(@a, @b) end |