Class: Fisk::CFG::BasicBlock

Inherits:
Struct
  • Object
show all
Defined in:
lib/fisk/basic_block.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#defObject

Returns the value of attribute def

Returns:

  • (Object)

    the current value of def



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def def
  @def
end

#end_pointObject

Returns the value of attribute end_point

Returns:

  • (Object)

    the current value of end_point



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def end_point
  @end_point
end

#fallObject

Returns the value of attribute fall

Returns:

  • (Object)

    the current value of fall



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def fall
  @fall
end

#inObject

Returns the value of attribute in

Returns:

  • (Object)

    the current value of in



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def in
  @in
end

#insnsObject

Returns the value of attribute insns

Returns:

  • (Object)

    the current value of insns



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def insns
  @insns
end

#jumpObject

Returns the value of attribute jump

Returns:

  • (Object)

    the current value of jump



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def jump
  @jump
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def name
  @name
end

#outObject

Returns the value of attribute out

Returns:

  • (Object)

    the current value of out



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def out
  @out
end

#predObject

Returns the value of attribute pred

Returns:

  • (Object)

    the current value of pred



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def pred
  @pred
end

#start_pointObject

Returns the value of attribute start_point

Returns:

  • (Object)

    the current value of start_point



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def start_point
  @start_point
end

#useObject

Returns the value of attribute use

Returns:

  • (Object)

    the current value of use



3
4
5
# File 'lib/fisk/basic_block.rb', line 3

def use
  @use
end

Instance Method Details

#jump?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/fisk/basic_block.rb', line 4

def jump?
  insns.last.jump?
end

#jump_nameObject



8
9
10
# File 'lib/fisk/basic_block.rb', line 8

def jump_name
  insns.last.target
end

#liveObject



19
# File 'lib/fisk/basic_block.rb', line 19

def live; self.def | self.use | self.out; end

#succObject



12
13
14
15
16
17
# File 'lib/fisk/basic_block.rb', line 12

def succ
  list = []
  list << fall if fall
  list << jump if jump
  list
end