Module: YTLJit::VM::TypeCodeGen::ArrayTypeBoxedCodeGen
- Includes:
- AbsArch
- Defined in:
- lib/ytljit/vm_type_gen.rb
Constant Summary
Constants included
from AbsArch
AbsArch::AL, AbsArch::BL, AbsArch::CL, AbsArch::DL, AbsArch::FUNC_ARG, AbsArch::FUNC_ARG_YTL, AbsArch::FUNC_FLOAT_ARG, AbsArch::FUNC_FLOAT_ARG_YTL, AbsArch::INDIRECT_BPR, AbsArch::INDIRECT_RETR, AbsArch::INDIRECT_SPR, AbsArch::INDIRECT_TMPR, AbsArch::INDIRECT_TMPR2, AbsArch::INDIRECT_TMPR3
Constants included
from SSE
SSE::XMM0, SSE::XMM1, SSE::XMM2, SSE::XMM3, SSE::XMM4, SSE::XMM5, SSE::XMM6, SSE::XMM7
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#element_type ⇒ Object
Returns the value of attribute element_type.
141
142
143
|
# File 'lib/ytljit/vm_type_gen.rb', line 141
def element_type
@element_type
end
|
Instance Method Details
#==(other) ⇒ Object
166
167
168
169
170
|
# File 'lib/ytljit/vm_type_gen.rb', line 166
def ==(other)
other.is_a?(self.class) and
self.class == other.class and
@element_type == other.element_type
end
|
#eql?(other) ⇒ Boolean
172
173
174
175
176
|
# File 'lib/ytljit/vm_type_gen.rb', line 172
def eql?(other)
other.is_a?(self.class) and
self.class == other.class and
@element_type == other.element_type
end
|
#gen_copy(context) ⇒ Object
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
# File 'lib/ytljit/vm_type_gen.rb', line 147
def gen_copy(context)
asm = context.assembler
val = context.ret_reg
context.start_using_reg(TMPR2)
context.start_using_reg(TMPR3)
context.start_using_reg(FUNC_ARG[0])
rbarydup = OpMemAddress.new(address_of("rb_ary_dup"))
asm.with_retry do
asm.mov(FUNC_ARG[0], val)
asm.call_with_arg(rbarydup, 1)
end
context.end_using_reg(FUNC_ARG[0])
context.end_using_reg(TMPR3)
context.end_using_reg(TMPR2)
context.ret_reg = RETR
context
end
|
#have_element? ⇒ Boolean
143
144
145
|
# File 'lib/ytljit/vm_type_gen.rb', line 143
def have_element?
true
end
|
137
138
139
|
# File 'lib/ytljit/vm_type_gen.rb', line 137
def init
@element_type = nil
end
|
130
131
132
133
134
135
|
# File 'lib/ytljit/vm_type_gen.rb', line 130
def instance
ni = self.dup
ni.instance_eval { extend ArrayTypeBoxedCodeGen }
ni.init
ni
end
|