Class: Maglev::Reflection::StackFrameMirror
Defined Under Namespace
Classes: FrameHash
Instance Attribute Summary collapse
#reflection
Instance Method Summary
collapse
#binding, #ip_offset
#mirrors?, #reflectee
#included, #mirror_class, #new, #reflect, #reflect!, #reflects?, #register_mirror
#target_class, #variables
#class_variables, #instance_eval, #objects_with_references, #path_to, #target_class, #transitive_closure, #variables
Constructor Details
Returns a new instance of StackFrameMirror.
9
10
11
12
13
14
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 9
def initialize(obj)
super
@method = obj.method
@index = obj.index
@thread = obj.thread
end
|
Instance Attribute Details
Returns the value of attribute method.
7
8
9
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 7
def method
@method
end
|
Instance Method Details
#arguments ⇒ Object
32
33
34
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 32
def arguments
args_and_temps(0, num_args - 1)
end
|
68
69
70
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 68
def inspect
"#<#{self.class}: #{@index}: #{@method.defining_class}##{@method.name}>"
end
|
36
37
38
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 36
def locals
args_and_temps(num_args, -1)
end
|
16
17
18
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 16
def name
@method.selector
end
|
58
59
60
61
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 58
def pop
@thread.reflectee.__trim_stack_to_level(@index + 1)
true
end
|
20
21
22
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 20
def receiver
reflection.reflect detailed_report[1]
end
|
53
54
55
56
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 53
def restart
@thread.reflectee.__trim_stack_to_level(@index)
true
end
|
28
29
30
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 28
def selector
reflection.reflect detailed_report[3].to_s
end
|
24
25
26
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 24
def self
reflection.reflect detailed_report[2]
end
|
#source_offset ⇒ Object
44
45
46
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 44
def source_offset
detailed_report[5][step_offset - 1]
end
|
#step(*args) ⇒ Object
63
64
65
66
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 63
def step(*args)
@thread.step(*args)
true
end
|
#step_offset ⇒ Object
40
41
42
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 40
def step_offset
detailed_report[4]
end
|
#variable_context ⇒ Object
48
49
50
51
|
# File 'lib/maglev/reflection/stack_frame_mirror.rb', line 48
def variable_context
raise NotImplementedError, "TODO"
@thread.reflectee.__frame_contents_at(@index)[3]
end
|