YARV�A�[�L�e�N�`��
by ���{ Ruby �̉� �������������� / Fri Mar 04 16:17:04 2005
- 2005-03-03(Thu) 00:31:12 +0900 ���낢��Ə�������
����́H
YARV: Yet Another RubyVM �� �v�����ł��B
YARV �́ARuby �v���O�����̂��߂̎��̋@�\����܂��B
- Compiler
- VM Generator
- VM (Virtual Machine)
- Assembler
- Dis-Assembler
- (experimental) JIT Compiler
- (experimental) AOT Compiler
���݂� YARV �� Ruby �C���^�v���^�̊g�����C�u�����Ƃ��Ď������Ă��܂��B��
��ɂ��ARuby �C���^�v���^�̕K�v�ȋ@�\�i�p�[�T�A�I�u�W�F�N�g�Ǘ��A����
�̊g�����C�u�����j�Ȃǂ��قڂ��̂܂ܗ��p�ł��܂��B
�������A�������̃p�b�`�� Ruby �C���^�v���^�ɓ��ĂȂ���Ȃ�܂���B
����́ARuby �{�̂̃C���^�v���^�����ieval.c�j��u�������邱�Ƃ�ڎw����
�J�����p������\��ł��B
Compiler (compile.h, compile.c)
�R���p�C���́ARuby �C���^�v���^�̃p�[�T�ɂ���Đ������ꂽ�\���iRNode
�f�[�^�ɂ��j�� YARV ���ߗ�ɕϊ����܂��BYARV ���߂ɂ��Ă͌�q����
���B
�Ƃ��ɓ�����Ƃ͂��Ă��܂��A�X�R�[�v�Ȃǂ̊J�n���Ƀ��[�J���ϐ��̏�
�����Ȃǂ��s���A���Ƃ͍\����H��ϊ����Ă����܂��B
�ϊ����� Ruby �� Array �I�u�W�F�N�g�� YARV ���߃I�u�W�F�N�g�A����уI�y
�����h���i�[���Ă����A�Ō�Ɏ��s�ł���`�ɕϊ����܂��B�R���p�C���ł́A�R
���p�C�����ɐ������郁�����̈�̊Ǘ������ɂȂ邱�Ƃ�����܂����AYARV
�̏ꍇ�ARuby �C���^�v���^�����ׂĖʓ|���݂Ă����̂ł��̕����͔��Ɋy
�ɍ�邱�Ƃ��ł��܂����i�K�[�x�[�W�R���N�^�ɂ���Ď����I�Ƀ������Ǘ�����
�Ă���邽�߁j�B
YARV ���߂́A���߂��������ʎq�A�I�y�����h�ȂǁA���ׂ� 1 word �i�}�V����
�\���ł��鎩�R�Ȓl�BC ����ł̓|�C���^�̃T�C�Y�BRuby �C���^�v���^�p���
�� VALUE �̃T�C�Y�j�ŕ\������܂��B���̂��߁AYARV ���߂͂�����u�o�C�g
�R�[�h�v�ł͂���܂���B���̂��߁AYARV �̐����Ȃǂł́u���ߗ�v�Ƃ����p
����g���Ă��܂��B
1 word �ł��邽�߁A�������̗��p�����͑��������Ȃ�܂����A�A�N�Z�X���x��
�ǂ��l������ƁA�{��������Ԃ����ƍl���Ă���܂��B���Ƃ��I�y�����h���R
���X�^���g�v�[���Ɋi�[���A�C���f�b�N�X�݂̂��I�y�����h�Ŏ������Ƃ��\��
�����A�ԐڃA�N�Z�X�ɂȂ��Ă��܂��̂Ő��\�ɉe�����o�邽�߁A�p�����܂����B
VM Generator (rb/insns2vm.rb, insns.def)
rb/insns2vm.rb �Ƃ����X�N���v�g�́Ainsns.def �Ƃ����t�@�C����ǂݍ��݁A
VM �̂��߂ɕK�v�ȃt�@�C�������܂��B��̓I�ɂ́A���߂����s���镔����
�������܂����A�ق��ɂ��R���p�C���ɕK�v�ȏ��A�œK���ɕK�v�ȏ��A��A�Z
���u���A�t�A�Z���u���ɕK�v�ȏ��������t�@�C�����������܂��B
���ߋL�q
insns.def �ɂ́A�e���߂��ǂ̂悤�Ȗ��߂ł��邩���L�q���܂��B��̓I�ɂ͎�
�̏����L�q���܂��B
- ���߂̖��O
- ���̖��߂̃J�e�S���A�R�����g�i�p��A���{��j
- �I�y�����h�̖��O
- ���̖��ߎ��s�O�ɃX�^�b�N����|�b�v����l
- ���̖��ߎ��s��ɃX�^�b�N�Ƀv�b�V������l
- ���̖��߂̃��W�b�N�iC ����ŋL�q�j
���Ƃ��A�X�^�b�N�� self ������ putself �Ƃ������߂͎��̂悤�ɋL�q����
���B
/**
@c put
@e put self.
@j self ��u���B
*/
DEFINE_INSN
putself
()
()
(VALUE val)
{
val = GET_SELF();
}
���̏ꍇ�A�I�y�����h�ƁA�X�^�b�N����|�b�v����l�͖������ƂɂȂ�܂��B��
�ߏI����Aself ���X�^�b�N�g�b�v�ɒu�������킯�ł����A����� val �Ƃ����A
�X�^�b�N�Ƀv�b�V������l�Ƃ��Đ錾���Ă������ϐ��ɑ�����Ă������ƂŁA��
���ϊ�����ƃX�^�b�N�g�b�v�ɒu�� C �v���O��������������܂��B
�ׂ����t�H�[�}�b�g�� insns.def �̖`�����Q�Ƃ��Ă��������B����Ȃɓ��
�Ȃ��Ǝv���܂��B
insnhelper.h �Ƃ����t�@�C���ɁA���߃��W�b�N���L�q���邽�߂ɕK�v�ȃ}�N��
����`����Ă��܂��B�܂��AVM �̓����\���Ɋւ����`�� vm.h �Ƃ����t�@�C
���ɂ���܂��B
VM (Virtual Machine, vm.h, vm.c)
VM �́A���ۂɃR���p�C���������ʐ�������� YARV ���ߗ�����s���܂��B�܂�
�ɁA���̕����� YARV �̃L���ɂȂ�A�����I�ɂ� eval.c ������ VM �Œu������
�����ƍl���Ă��܂��B
���݂� Ruby �C���^�v���^�Ŏ��s�ł��邷�ׂĂ̂��Ƃ��A���� VM �Ŏ����ł���
�悤�ɍ���Ă��܂��i���i�K�ł͂܂����S�ł͂���܂��A�����Ȃ�ׂ��ł��j�B
VM �́A�P���ȃX�^�b�N�}�V���Ƃ��Ď������Ă��܂��B�X���b�h�ЂƂɃX�^�b
�N�ЂƂ�ێ����܂��B�X�^�b�N�̗̈�̓q�[�v����擾����̂ŁA�_��ȗ̈�
�ݒ肪�\�ł��B
���W�X�^
VM �� 5 �̉��z�I�ȃ��W�X�^�ɂ���Đ��䂳��܂��B
- PC (Program Counter)
- SP (Stack Pointer)
- CFP (Control Frame Pointer)
- LFP (Local Frame Pointer)
- DFP (Dynamic Frame Pointer)
PC �͌��ݎ��s���̖��ߗ�̈ʒu�������܂��BSP �̓X�^�b�N�g�b�v�̈ʒu������
�܂��BCFP�ALFP�ADFP �͂��ꂼ��t���[���̏��������܂��B�ڍׂ͌�q���܂��B
�X�^�b�N�t���[��
�ϐ��X�R�[�v��ʁX�ɂ��邽�߁A�������邽�߁A�������̎�ނ̃X�^�b�N�t��
�[�������܂��B�Ȃ��A���ߗ�̓X�R�[�v�P�ʂŕʁX�̃I�u�W�F�N�g�Ƃ��č�
���܂��B
�X�^�b�N�t���[���̎�ނ͎��� 3 ��ނł��B
- ���\�b�h�t���[��
- �u���b�N�t���[��
- �N���X�t���[��
���\�b�h�t���[���̓��\�b�h���N�����邲�Ƃɐ�������܂��B�Ɨ������X�R�[�v
�������܂��B�u���b�N�t���[���̓u���b�N���N���������Ƃɐ�������܂��B�u��
�b�N�̃X�R�[�v�́A�������ʂ̃X�R�[�v�����邱�Ƃ��ł��܂��B�N���X�t��
�[���̓N���X��`�A���W���[����`�̏ꍇ�ɐ�������܂��B���̃X�R�[�v���Ɨ�
���Ă��܂��B
���\�b�h�t���[���ƃN���X�t���[���͂قړ����ł��B
�e�t���[���̍\���͂����������̂悤�ɂȂ��Ă��܂��B
�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@ �@�@�@�@<- �p���t���[�� ----->
<- ���� -> <- �ϐ� -> <- ����t���[���@---------------->
-------------------------------+-----+-----------+----------------------+----
self a1 a2 ... aM l1 l2 ... lN | XXX | self iseq | MAGIC pc cfp lfp dfp | ...
-------------------------------+-----+-----------+----------------------+----
^
cfp
--> �X�^�b�N�[��
XXXX �̕����́A�X�R�[�v�̃^�C�v�ɂ��B
���\�b�h�t���[���̏ꍇ: �u���b�N
�u���b�N�t���[���̏ꍇ: ���O�̃t���[���ւ̃|�C���^
�N���X�t���[���̏ꍇ : nil
����t���[���́A���̃t���[�����Ǘ����邽�߂̏�i�[����Ă��܂��B
iseq �͖��ߗ�̏��ł��BMAGIC �͂��̃t���[���̎�ނ����߂��l�iFixnum�j
���i�[����Ă��܂��B�����I�� YARV �����肵���炱����O�����Ƃ��������Ă�
�܂��B
�p���t���[���͑O�̃t���[���̏�����Ă���A���̃X�R�[�v���甲����Ƃ�
�Ɍp���t���[���̏������W�X�^�Ɍ����߂��܂��B
cfp[0] �ł͂ǂ̃t���[���ł� self ���擾���邱�Ƃ��ł��܂��B�܂��A���l��
cfp[1] �� iseq �i���ݎ��s���Ă��閽�ߗ�̏��j�邱�Ƃ��ł��܂��B
���\�b�h���[�J���t���[��
���\�b�h�f�B�X�p�b�`���� send �����s����ƁA���\�b�h�t���[��������܂��B
-------------------------------+-----+-----------+----------------------+----
self a1 a2 ... aM l1 l2 ... lN | blo | self iseq | MAGIC pc cfp lfp dfp | ...
-------------------------------+-----+-----------+----------------------+----
^ ^
lfp cfp
dfp
a1 ���� aM �� M�̃��\�b�h�̈����ŁAl1 ���� lN �� N�̃��\�b�h���[�J��
�ϐ��������܂��B�����̈����� callee ���z�u���Ă����܂��i���m�ɂ́Asend
���� rest �����Ȃǂ����肵�܂��j�B
self �͂��̃��\�b�h�̃��V�[�o�ł��B�u���b�N�͂��̃��\�b�h�Ăяo���Ƀu��
�b�N���w�肳��Ă��邩�ǂ����A����Ă���Ȃ�ǂ̂悤�ȃu���b�N���w�肳��
�����̏��������܂��B
���[�J���ϐ��ɂ́Alfp[-X] �Ƃ����`�ŃA�N�Z�X���܂��B�����̃C���f�b�N�X
�̓R���p�C�����i���m�ɂ� parse ���j�Ɍ��肵�܂��B
�u���b�N���[�J���t���[��
�u���b�N�� Proc#call��yield �Ȃǂɂ��N�����ꂽ�Ƃ��ɂł���X�R�[�v��\
�����邽�߂̃t���[���\���ł��B�p���t���[���Ƃ��킹�Ď��̂悤�Ȕz�u�ɂȂ�
�܂��B
�i���[�J�����\�b�h�t���[���j
-------------------------------+-----+-----------+----------------------+----
self a1 a2 ... aM l1 l2 ... lN | blo | self iseq | MAGIC pc cfp lfp dfp | ...
-------------------------------+-----+-----------+----------------------+----
^
lfp
�i�u���b�N���[�J���t���[���P�j
-------------------------------+-----+-----------+----------------------+----
self a1 a2 ... aM l1 l2 ... lN | pre | self iseq | MAGIC pc cfp lfp dfp | ...
-------------------------------+-----+-----------+----------------------+----
�i�u���b�N���[�J���t���[���Q�j
-------------------------------+-----+-----------+----------------------+----
self a1 a2 ... aM l1 l2 ... lN | pre | self iseq | MAGIC pc cfp lfp dfp | ...
-------------------------------+-----+-----------+----------------------+----
^ ^
dfp cfp
����́A���̂悤�� Ruby �v���O���������s�����Ƃ��ɑ������܂��B
def m(a1, ..., aM)
l1 = ...; ...; lN = ...;
method_foo(){|...|
# Block1
method_bar(){|...|
# Block2
...(running)...
}
}
end
LFP �̓��\�b�h���[�J���ϐ���K���A�N�Z�X���邱�Ƃ��ł��܂��Bdfp �̓u���b
�N���[�J���ϐ����A�N�Z�X���邱�Ƃ��ł��܂��Bpre �𗘗p���Ă������̃t��
�[���������̂ڂ邱�Ƃ��o���܂��B
�N���X�t���[��
�N���X�E���W���[�����`���̃X�R�[�v��\�����邽�߂̃t���[���\���ŁA�p��
�t���[���Ƃ��킹�Ď��̂悤�ɂȂ�܂��B
-------------+-----+-----------+----------------------+----
l1 l2 ... lN | nil | self iseq | MAGIC pc cfp lfp dfp | ...
-------------+-----+-----------+----------------------+----
^ ^
lfp cfp
dfp
���\�b�h���[�J���t���[���ƈႢ�A�����ƃu���b�N������܂���B
self �͂��̒�`���̃N���X�E���W���[���̃C���X�^���X���i�[����Ă��܂��B
�t���[���f�U�C���ɂ��Ă̕⑫
Lisp �̏����n�Ȃǂ�������ƁA�킴�킴�u���b�N���[�J���t���[���ƃ��\
�b�h���[�J���t���[���̂悤�Ȃ��̂�p�ӂ���̂͊�قɌ����邩������܂���B
����t���[�����A����q�\���ɂ��āA���[�J���ϐ��̃A�N�Z�X�͂��̓���q���O
���ɒH��ΕK�����ǂ蒅�����Ƃ��ł��邩��ł��i�܂�Alfp �͕K�v�Ȃ��j�B
�������ARuby �ł͂��������Ⴂ�܂��B�܂��A���\�b�h���[�J���ȏ��
���邱�ƁA��̓I�ɂ̓u���b�N��self�icallee ����݂�� reciever�j�ł��B��
�̏������ꂼ��̃t���[���ɂ�������͖̂��ʂł��B
�܂��ARuby2.0 ����̓u���b�N���[�J���ϐ��͂Ȃ��Ȃ�܂��i�u���b�N���[�J��
�����͎c��̂ŁA�\�����̂͂��܂�ς��܂���j�B���̂��߁A���\�b�h���[�J
���ϐ��ւ̃A�N�Z�X���p�����邱�Ƃ��\�z����܂��B
���̂Ƃ��A���\�b�h���[�J���ϐ��ւ̃A�N�Z�X�̂��тɃt���[���i�X�R�[�v�j��
���X�g�����ǂ�͖̂��ʂł���Ɣ��f���A�����I�Ƀ��\�b�h���[�J���X�R�[�v��
�u���b�N�t���[�������A�u���b�N�t���[������̓��\�b�h���[�J���t���[��
�� lfp���W�X�^�ɂ���ėe�ՂɃA�N�Z�X�ł���悤�ɂ��܂����B
���\�b�h�Ăяo���ɂ���
���\�b�h�Ăяo���́AYARV ���ߗ�ŋL�q���ꂽ���\�b�h���AC �ŋL�q���ꂽ��
�\�b�h���ɂ���ăf�B�X�p�b�`��@���ς��܂��B
YARV ���ߗ�ł������ꍇ�A��q�����X�^�b�N�t���[�����쐬���Ė��߂��p����
�܂��B�Ƃ��� VM �̊����ċA�Ăяo�����邱�Ƃ͍s�Ȃ��܂���B
C �ŋL�q���ꂽ���\�b�h�������ꍇ�A�P���ɂ��̊����Ăяo���܂��i�������A
�o�b�N�g���[�X�𐳂����������邽�߂Ƀ��\�b�h�Ăяo���̏���t�����Ă���
�s�Ȃ��܂��j�B
���̂��߁AVM �p�X�^�b�N��ʓr�p�ӂ������̂́A�v���O�����ɂ���Ă̓}�V��
�X�^�b�N���g�����Ă��܂��\��������܂��iC -> Ruby -> C -> ... �Ƃ���
�Ăяo�����������ꍇ�j�B����́A���݂ł͔������Ȃ��d�l�ƂȂ��Ă��܂��B
��O
��O�́AJava �� JVM �Ɠ��l�ɗ�O�e�[�u����p�ӂ��邱�ƂŎ������܂��B��O
������������A���Y�t���[�����A��O�e�[�u�����������܂��B�����ŁA��O����
�������Ƃ��� PC �̒l�ɍ��v����G���g�����������ꍇ�A���̃G���g���ɏ]����
���삵�܂��B�����G���g����������Ȃ������ꍇ�A�X�^�b�N���T���߂��Ă܂�
���l�ɂ��̃X�R�[�v�̗�O�e�[�u�����������܂��B
�܂��Abreak�Areturn�i�u���b�N���j�Aretry �Ȃǂ����l�̎d�g�݂Ŏ������܂��B
��O�e�[�u��
��O�e�[�u���G���g���͋�̓I�ɂ͎��̏�i�[����Ă��܂��B
- �ΏۂƂ��� PC �͈̔�
- �ΏۂƂ����O�̎��
- �����ΏۂƂȂ����Ƃ��ɃW�����v�����i��ނɂ��j
- �����ΏۂƂȂ����Ƃ��ɋN������u���b�N�� iseq
rescue
rescue �߂̓u���b�N�Ƃ��Ď������Ă��܂��B$! �̒l��B��̈����Ƃ��Ď�����
���B
begin
rescue A
rescue B
rescue C
end
�́A���̂悤�� Ruby �X�N���v�g�ɕϊ�����܂��B
{|err|
case err
when A === err
when B === err
when C === err
else
raise # yarv �̖��߂ł� throw
end
}
ensure
����n�i��O���������Ȃ������ꍇ�j�ƈُ�n�i��O�����������Ƃ��Ȃǁj��2
��ނ̖��ߗ�������܂��B����n�ł́A�����̘A�������R�[�h�̈�Ƃ��ăR
���p�C������܂��B�܂��A�ُ�n�ł̓u���b�N�Ƃ��Ď������܂��B�Ō�͕K��
throw ���߂Œ��߂邱�ƂɂȂ�܂��B
break, return�i�u���b�N���j�Aretry
break ���A�u���b�N���� return ���Aretry ���� throw ���߂Ƃ��ăR���p�C��
����܂��B�ǂ��܂Ŗ߂邩�́Abreak ���t�b�N�����O�e�[�u���̃G���g������
�f���܂��B
�萔�̌���
�萔�Ƃ������O�Ȃ̂ɁARuby �ł̓R���p�C�����Ɍ��肵�܂���B�Ƃ������A��
�܂ł��Ē�`�\�ɂȂ��Ă��܂��B
�萔�A�N�Z�X�̂��߂�Ruby�L�q�͎��̂悤�ɂȂ�܂��B
Ruby�\��:
expr::ID::...::ID
����́Ayarv���߃Z�b�g�ł͎��̂悤�ɂȂ�܂��B
(expr)
getconstant ID
...
getconstant ID
�萔�����p�X
���� expr �� nil �������ꍇ�A�萔�����p�X�ɏ]���Ē萔���������܂��B����
�����͍��� Ruby 2.0 �Ɍ����ĕύX�����ꍇ������܂��B
- �N���X�A���W���[���̓��I�l�X�g�W�i�v���O�����̎��ʏ�j�����[�g�܂ŒH��
- �p���W�����[�g�iObject�j�܂ŒH��
���̂��߁A�N���X�A���W���[���̓��I�l�X�g�W��ۑ����Ȃ���Ȃ�܂���B
���̂��߂ɁAthread_object �ɂ� klass_nest_stack �Ƃ������̂�p�ӂ��܂����B
����́A���݂̃l�X�g�̏���ۑ����܂��B
���\�b�h��`���A���̌��݂̃l�X�g�������\�b�h��`���Ɂidup���āj������
���ƂŁA���̃��\�b�h�̎��s���A���̃l�X�g�����Q�Ƃ��邱�Ƃ��\�ɂȂ��
���B
�g�b�v���x���ł́A���̏��͂Ȃ����ƂɂȂ�܂��B
�N���X/���W���[����`�����s���́A���݂̏�̂��̂��Q�Ƃ��邱�ƂɂȂ�
�܂��B����́A�N���X�X�R�[�v�˓����A���̏����N���X��`���ɃR�s�[���܂�
�i���łɃR�s�[����Ă���A������s���܂���j�B
����ɂ��A���I�ȃl�X�g����I�Ɉ������Ƃ��ł��܂��B
�œK����@
YARV �ł͍�������ړI�Ƃ��Ă���̂ŁA���܂��܂ȍœK����@�𗘗p���Ă���
���B�ڍׂ͊������܂����A�ȉ��ɏq�ׂ�œK���Ȃǂ��s�Ȃ��Ă���܂��B
threaded code
GCC �� C ����g���ł���l�Ƃ��Ẵ��x���𗘗p���� direct threaded code
���������Ă��܂��B
Peephole optimization
�������̊ȒP�ȍœK�������Ă��܂��B
inline method cache
���ߗ�̒��Ƀ��\�b�h�������ʂߍ��݂܂��B
inline constant cache
���ߗ�̒��ɒ萔�������ʂߍ��݂܂��B
�u���b�N�� Proc �I�u�W�F�N�g�̕���
�u���b�N�t�����\�b�h�Ăяo�����s�Ȃ�ꂽ�Ƃ��ɂ͂����ɂ̓u���b�N�� Proc
�I�u�W�F�N�g�Ƃ��Đ������܂���B����ɂ��A�K�v�Ȃ� Proc �I�u�W�F�N�g��
������}���Ă��܂��B
Proc ���\�b�h�́A���ۂɕK�v�ɂȂ������_�ō���A���̂Ƃ��Ɋ��i�X�R�[
�v��Ɋm�ۂ��ꂽ�ϐ��Ȃǁj���q�[�v�ɕۑ����܂��B
��������
Fixnum ���m�̉��Z�Ȃǂ𐳒��Ɋ��Ăяo���ɂ���čs�Ȃ��ƁA�R�X�g������
��̂ŁA�����̃v���~�e�B�u�ȑ�����s�Ȃ����߂̃��\�b�h�Ăяo���͐�p��
�߂�p�ӂ��܂����B
���ߗZ��
�����̖��߂� 1 ���߂ɕϊ����܂��B�Z�����߂� opt_insn_unif.def �̋L�q�ɂ�
�莩���I�ɐ�������܂��B
�I�y�����h�Z��
�����̃I�y�����h���܂߂����߂����܂��B�Z�����߂� opt_operand.def ��
�L�q�ɂ���Ď����I�ɐ�������܂��B
stack caching
�X�^�b�N�g�b�v�����z���W�X�^�ɕێ�����悤�ɂ��܂��B���݂� 2 �̉��z��
�W�X�^��z�肵�A5��Ԃ̃X�^�b�N�L���b�V���O���s�Ȃ��܂��B�X�^�b�N�L���b
�V���O���閽�߂͎����I�ɐ�������܂��B
JIT Compile
�@�B����\�肵�܂��B���Ɏ����I�ȃR�[�h���̂�������Ă���܂���B��
�Ƃ�ǂ̃v���O�����͓����܂���B
AOT Compile
YARV ���ߗ�� C ����ɕϊ����܂��B�܂��\���ȍœK�����s�Ȃ��Ă���܂��A
����Ȃ�ɓ����܂��Brb/aotc.rb ���R���p�C���ł��B
Assembler (rb/yasm.rb)
YARV ���ߗ�̃A�Z���u����p�ӂ��܂����B�g������ rb/yasm.rb ���Q�Ƃ��Ă�
�������i�܂��A�Ꭶ���Ă��鐶����@�̂��ׂĂ��T�|�[�g���Ă���킯�ł͂���
�܂���j�B
Dis-Assembler (disasm.c)
YARV ���ߗ�������I�u�W�F�N�g YARVCore::InstructionSequence �ɂ� disasm
���\�b�h������܂��B����́A���ߗ���t�A�Z���u�������������Ԃ��܂��B
YARV ���߃Z�b�g
nop
nop
nop
- instruction sequence
- 0x00
- stack
- =>
variable
getlocal
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x01 idx
- stack
- => val
setlocal
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x02 idx
- stack
- val =>
getspecial
����ȃ��[�J���ϐ��̒l��
- instruction sequence
- 0x03 idx type
- stack
- => val
setspecial
���ʂȃ��[�J���ϐ���ݒ肷��
- instruction sequence
- 0x04 idx type
- stack
- obj =>
getdynamic
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x05 idx level
- stack
- => val
setdynamic
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l�� val �ɂ���B
- instruction sequence
- 0x06 idx level
- stack
- val =>
getinstancevariable
obj �̃C���X�^���X�ϐ� id ��B
- instruction sequence
- 0x07 id
- stack
- => val
setinstancevariable
obj �̃C���X�^���X�ϐ��� val �ɂ���B
- instruction sequence
- 0x08 id
- stack
- val =>
getclassvariable
klass �̃N���X�ϐ� id ��B
- instruction sequence
- 0x09 id
- stack
- => val
setclassvariable
klass �̃N���X�ϐ� id �� val �ɂ���B
- instruction sequence
- 0x0a id declp
- stack
- val =>
getconstant
- instruction sequence
- 0x0b id
- stack
- klass => val
setconstant
- instruction sequence
- 0x0c id
- stack
- val klass =>
getglobal
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x0d entry
- stack
- => val
setglobal
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x0e entry
- stack
- val =>
put
putnil
put nil
- instruction sequence
- 0x0f
- stack
- => val
putself
self ��u���B
- instruction sequence
- 0x10
- stack
- => val
putobject
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x11 val
- stack
- => val
putstring
�������u���B������̓R�s�[���Ƃ��B
- instruction sequence
- 0x12 val
- stack
- => val
concatstrings
�������A�����Ēu���B
- instruction sequence
- 0x13 num
- stack
- ... => val
tostring
to_str
- instruction sequence
- 0x14
- stack
- val => val
toregexp
to Regexp
- instruction sequence
- 0x15 flag
- stack
- str => val
newarray
�V�����z����X�^�b�N��� num �̒l�ŏ��������Ēu���B
- instruction sequence
- 0x16 num
- stack
- ... => val
duparray
�z��� dup ���ăX�^�b�N�ɒu��
- instruction sequence
- 0x17 ary
- stack
- => val
expandarray
�X�^�b�N�g�b�v�̃I�u�W�F�N�g���z��ł���A�����W�J����B
- instruction sequence
- 0x18 num flag
- stack
- ... ary => ...
newhash
Hash.new
- instruction sequence
- 0x19 num
- stack
- ... => val
newrange
Range.new(low, high, flag) �̂悤�ȃI�u�W�F�N�g��u���B
- instruction sequence
- 0x1a flag
- stack
- low high => val
putnot
!val �ł���I�u�W�F�N�g��u���B
- instruction sequence
- 0x1b
- stack
- obj => val
stack
pop
�X�^�b�N�����|�b�v����B
- instruction sequence
- 0x1c
- stack
- val =>
dup
�X�^�b�N�g�b�v���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0x1d
- stack
- val => val1 val2
dupn
�X�^�b�N�g�b�v���� n ���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0x1e n
- stack
- ... => ...
swap
�X�^�b�N�g�b�v��2����������B
- instruction sequence
- 0x1f
- stack
- val obj => obj val
reput
- instruction sequence
- 0x20
- stack
- ... val => val
topn
�X�^�b�N�g�b�v���� n �ڂ��X�^�b�N�g�b�v�ɃR�s�[
- instruction sequence
- 0x21 n
- stack
- ... => val
setting
methoddef
���\�b�h m �� body �Ƃ��Ē�`����B
- instruction sequence
- 0x22 id body
- stack
- =>
singletonmethoddef
���ك��\�b�h m �� body �Ƃ��� obj �ɒ�`����B
- instruction sequence
- 0x23 id body
- stack
- obj =>
alias
alias �����B���� v_p �� Qtrue �Ȃ�Avalias (global variable) �����
- instruction sequence
- 0x24 v_p id1 id2
- stack
- =>
undef
undef
- instruction sequence
- 0x25 id
- stack
- =>
defined
defined?
- instruction sequence
- 0x26 type obj needstr
- stack
- ... => val
class/module
classdef
- instruction sequence
- 0x27 id klass_iseq
- stack
- cbase super => val
singletonclassdef
���كN���X��`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x28 sclass_iseq
- stack
- obj => val
moduledef
���W���[����`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x29 id module_iseq
- stack
- mbase => val
popcref
�N���X�̃l�X�g�W�����ЂƂ|�b�v����
- instruction sequence
- 0x2a
- stack
- =>
method/iterator
send
obj.send(id, args) # args.size => num
- instruction sequence
- 0x2b id argc block flag ic
- stack
- ... => val
super
super(args) # args.size => num
- instruction sequence
- 0x2c num flag
- stack
- ... => val
zsuper
super
- instruction sequence
- 0x2d
- stack
- ... => val
yield
yield(args) # args.size => num
- instruction sequence
- 0x2e num flag
- stack
- ... => val
end
���̃X�R�[�v���甲����B
- instruction sequence
- 0x2f idx
- stack
- val => val
exception
throw
longjump
- instruction sequence
- 0x30 throw_state
- stack
- throwobj =>
jump
jump
PC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x31 dst
- stack
- =>
if
���� val �� false �� nil �łȂ���APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x32 dst
- stack
- val =>
unless
���� val �� false �� nil �Ȃ�APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x33 dst
- stack
- val =>
optimize
getinlinecache
inline cache
- instruction sequence
- 0x34 ic dst
- stack
- => val
setinlinecache
set inline cahce
- instruction sequence
- 0x35 dst
- stack
- val => val
opt_plus
�œK�����ꂽ X+Y�B
- instruction sequence
- 0x36
- stack
- recv obj => val
opt_minus
�œK�����ꂽ X-Y�B
- instruction sequence
- 0x37
- stack
- recv obj => val
opt_lt
�œK�����ꂽ X<Y�B
- instruction sequence
- 0x38
- stack
- recv obj => val
opt_ltlt
<<
- instruction sequence
- 0x39
- stack
- recv obj => val
opt_regexpmatch1
�œK�����ꂽ���K�\���}�b�`
- instruction sequence
- 0x3a r
- stack
- obj => val
opt_regexpmatch2
�œK�����ꂽ���K�\���}�b�` 2
- instruction sequence
- 0x3b
- stack
- obj2 obj1 => val
opt_call_native_compiled
�l�C�e�B�u�R���p�C���������\�b�h�� kick
- instruction sequence
- 0x3c
- stack
- =>
getlocal_OP_1
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x3d
- stack
- => val
setlocal_OP_1
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x3e
- stack
- val =>
getlocal_OP_2
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x3f
- stack
- => val
setlocal_OP_2
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x40
- stack
- val =>
getdynamic_OP__WC__0
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x41 idx
- stack
- => val
getdynamic_OP_1_0
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x42
- stack
- => val
putobject_OP_INT2FIX_O_0_C_
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x43
- stack
- => val
putobject_OP_INT2FIX_O_1_C_
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x44
- stack
- => val
putobject_OP_Qtrue
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x45
- stack
- => val
putobject_OP_Qfalse
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x46
- stack
- => val
send_OP__WC___WC__Qfalse_0__WC_
obj.send(id, args) # args.size => num
- instruction sequence
- 0x47 id argc ic
- stack
- ... => val
UNIFIED_putobject_putobject
unified insn
- instruction sequence
- 0x48 val_0 val_1
- stack
- => val_0 val_1
UNIFIED_putstring_putstring
unified insn
- instruction sequence
- 0x49 val_0 val_1
- stack
- => val_0 val_1
UNIFIED_putstring_putobject
unified insn
- instruction sequence
- 0x4a val_0 val_1
- stack
- => val_0 val_1
UNIFIED_putobject_putstring
unified insn
- instruction sequence
- 0x4b val_0 val_1
- stack
- => val_0 val_1
optimize(sc)
nop_SC_xx_xx
nop
- instruction sequence
- 0x4c
- stack
- =>
nop_SC_ax_ax
nop
- instruction sequence
- 0x4d
- stack
- =>
nop_SC_bx_bx
nop
- instruction sequence
- 0x4e
- stack
- =>
nop_SC_ab_ab
nop
- instruction sequence
- 0x4f
- stack
- =>
nop_SC_ba_ba
nop
- instruction sequence
- 0x50
- stack
- =>
getlocal_SC_xx_ax
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x51 idx
- stack
- => val
getlocal_SC_ax_ab
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x52 idx
- stack
- => val
getlocal_SC_bx_ba
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x53 idx
- stack
- => val
getlocal_SC_ab_ba
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x54 idx
- stack
- => val
getlocal_SC_ba_ab
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x55 idx
- stack
- => val
setlocal_SC_xx_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x56 idx
- stack
- val =>
setlocal_SC_ax_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x57 idx
- stack
- val =>
setlocal_SC_bx_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x58 idx
- stack
- val =>
setlocal_SC_ab_ax
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x59 idx
- stack
- val =>
setlocal_SC_ba_bx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x5a idx
- stack
- val =>
getspecial_SC_xx_ax
����ȃ��[�J���ϐ��̒l��
- instruction sequence
- 0x5b idx type
- stack
- => val
getspecial_SC_ax_ab
����ȃ��[�J���ϐ��̒l��
- instruction sequence
- 0x5c idx type
- stack
- => val
getspecial_SC_bx_ba
����ȃ��[�J���ϐ��̒l��
- instruction sequence
- 0x5d idx type
- stack
- => val
getspecial_SC_ab_ba
����ȃ��[�J���ϐ��̒l��
- instruction sequence
- 0x5e idx type
- stack
- => val
getspecial_SC_ba_ab
����ȃ��[�J���ϐ��̒l��
- instruction sequence
- 0x5f idx type
- stack
- => val
setspecial_SC_xx_xx
���ʂȃ��[�J���ϐ���ݒ肷��
- instruction sequence
- 0x60 idx type
- stack
- obj =>
setspecial_SC_ax_xx
���ʂȃ��[�J���ϐ���ݒ肷��
- instruction sequence
- 0x61 idx type
- stack
- obj =>
setspecial_SC_bx_xx
���ʂȃ��[�J���ϐ���ݒ肷��
- instruction sequence
- 0x62 idx type
- stack
- obj =>
setspecial_SC_ab_ax
���ʂȃ��[�J���ϐ���ݒ肷��
- instruction sequence
- 0x63 idx type
- stack
- obj =>
setspecial_SC_ba_bx
���ʂȃ��[�J���ϐ���ݒ肷��
- instruction sequence
- 0x64 idx type
- stack
- obj =>
getdynamic_SC_xx_ax
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x65 idx level
- stack
- => val
getdynamic_SC_ax_ab
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x66 idx level
- stack
- => val
getdynamic_SC_bx_ba
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x67 idx level
- stack
- => val
getdynamic_SC_ab_ba
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x68 idx level
- stack
- => val
getdynamic_SC_ba_ab
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x69 idx level
- stack
- => val
setdynamic_SC_xx_xx
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l�� val �ɂ���B
- instruction sequence
- 0x6a idx level
- stack
- val =>
setdynamic_SC_ax_xx
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l�� val �ɂ���B
- instruction sequence
- 0x6b idx level
- stack
- val =>
setdynamic_SC_bx_xx
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l�� val �ɂ���B
- instruction sequence
- 0x6c idx level
- stack
- val =>
setdynamic_SC_ab_ax
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l�� val �ɂ���B
- instruction sequence
- 0x6d idx level
- stack
- val =>
setdynamic_SC_ba_bx
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l�� val �ɂ���B
- instruction sequence
- 0x6e idx level
- stack
- val =>
getinstancevariable_SC_xx_ax
obj �̃C���X�^���X�ϐ� id ��B
- instruction sequence
- 0x6f id
- stack
- => val
getinstancevariable_SC_ax_ab
obj �̃C���X�^���X�ϐ� id ��B
- instruction sequence
- 0x70 id
- stack
- => val
getinstancevariable_SC_bx_ba
obj �̃C���X�^���X�ϐ� id ��B
- instruction sequence
- 0x71 id
- stack
- => val
getinstancevariable_SC_ab_ba
obj �̃C���X�^���X�ϐ� id ��B
- instruction sequence
- 0x72 id
- stack
- => val
getinstancevariable_SC_ba_ab
obj �̃C���X�^���X�ϐ� id ��B
- instruction sequence
- 0x73 id
- stack
- => val
setinstancevariable_SC_xx_xx
obj �̃C���X�^���X�ϐ��� val �ɂ���B
- instruction sequence
- 0x74 id
- stack
- val =>
setinstancevariable_SC_ax_xx
obj �̃C���X�^���X�ϐ��� val �ɂ���B
- instruction sequence
- 0x75 id
- stack
- val =>
setinstancevariable_SC_bx_xx
obj �̃C���X�^���X�ϐ��� val �ɂ���B
- instruction sequence
- 0x76 id
- stack
- val =>
setinstancevariable_SC_ab_ax
obj �̃C���X�^���X�ϐ��� val �ɂ���B
- instruction sequence
- 0x77 id
- stack
- val =>
setinstancevariable_SC_ba_bx
obj �̃C���X�^���X�ϐ��� val �ɂ���B
- instruction sequence
- 0x78 id
- stack
- val =>
getclassvariable_SC_xx_ax
klass �̃N���X�ϐ� id ��B
- instruction sequence
- 0x79 id
- stack
- => val
getclassvariable_SC_ax_ab
klass �̃N���X�ϐ� id ��B
- instruction sequence
- 0x7a id
- stack
- => val
getclassvariable_SC_bx_ba
klass �̃N���X�ϐ� id ��B
- instruction sequence
- 0x7b id
- stack
- => val
getclassvariable_SC_ab_ba
klass �̃N���X�ϐ� id ��B
- instruction sequence
- 0x7c id
- stack
- => val
getclassvariable_SC_ba_ab
klass �̃N���X�ϐ� id ��B
- instruction sequence
- 0x7d id
- stack
- => val
setclassvariable_SC_xx_xx
klass �̃N���X�ϐ� id �� val �ɂ���B
- instruction sequence
- 0x7e id declp
- stack
- val =>
setclassvariable_SC_ax_xx
klass �̃N���X�ϐ� id �� val �ɂ���B
- instruction sequence
- 0x7f id declp
- stack
- val =>
setclassvariable_SC_bx_xx
klass �̃N���X�ϐ� id �� val �ɂ���B
- instruction sequence
- 0x80 id declp
- stack
- val =>
setclassvariable_SC_ab_ax
klass �̃N���X�ϐ� id �� val �ɂ���B
- instruction sequence
- 0x81 id declp
- stack
- val =>
setclassvariable_SC_ba_bx
klass �̃N���X�ϐ� id �� val �ɂ���B
- instruction sequence
- 0x82 id declp
- stack
- val =>
getconstant_SC_xx_ax
- instruction sequence
- 0x83 id
- stack
- klass => val
getconstant_SC_ax_ax
- instruction sequence
- 0x84 id
- stack
- klass => val
getconstant_SC_bx_ax
- instruction sequence
- 0x85 id
- stack
- klass => val
getconstant_SC_ab_ab
- instruction sequence
- 0x86 id
- stack
- klass => val
getconstant_SC_ba_ba
- instruction sequence
- 0x87 id
- stack
- klass => val
setconstant_SC_xx_xx
- instruction sequence
- 0x88 id
- stack
- val klass =>
setconstant_SC_ax_xx
- instruction sequence
- 0x89 id
- stack
- val klass =>
setconstant_SC_bx_xx
- instruction sequence
- 0x8a id
- stack
- val klass =>
setconstant_SC_ab_xx
- instruction sequence
- 0x8b id
- stack
- val klass =>
setconstant_SC_ba_xx
- instruction sequence
- 0x8c id
- stack
- val klass =>
getglobal_SC_xx_ax
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x8d entry
- stack
- => val
getglobal_SC_ax_ab
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x8e entry
- stack
- => val
getglobal_SC_bx_ba
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x8f entry
- stack
- => val
getglobal_SC_ab_ba
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x90 entry
- stack
- => val
getglobal_SC_ba_ab
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x91 entry
- stack
- => val
setglobal_SC_xx_xx
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x92 entry
- stack
- val =>
setglobal_SC_ax_xx
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x93 entry
- stack
- val =>
setglobal_SC_bx_xx
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x94 entry
- stack
- val =>
setglobal_SC_ab_ax
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x95 entry
- stack
- val =>
setglobal_SC_ba_bx
�O���[�o���ϐ� id ��B
- instruction sequence
- 0x96 entry
- stack
- val =>
putnil_SC_xx_ax
put nil
- instruction sequence
- 0x97
- stack
- => val
putnil_SC_ax_ab
put nil
- instruction sequence
- 0x98
- stack
- => val
putnil_SC_bx_ba
put nil
- instruction sequence
- 0x99
- stack
- => val
putnil_SC_ab_ba
put nil
- instruction sequence
- 0x9a
- stack
- => val
putnil_SC_ba_ab
put nil
- instruction sequence
- 0x9b
- stack
- => val
putself_SC_xx_ax
self ��u���B
- instruction sequence
- 0x9c
- stack
- => val
putself_SC_ax_ab
self ��u���B
- instruction sequence
- 0x9d
- stack
- => val
putself_SC_bx_ba
self ��u���B
- instruction sequence
- 0x9e
- stack
- => val
putself_SC_ab_ba
self ��u���B
- instruction sequence
- 0x9f
- stack
- => val
putself_SC_ba_ab
self ��u���B
- instruction sequence
- 0xa0
- stack
- => val
putobject_SC_xx_ax
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0xa1 val
- stack
- => val
putobject_SC_ax_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0xa2 val
- stack
- => val
putobject_SC_bx_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0xa3 val
- stack
- => val
putobject_SC_ab_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0xa4 val
- stack
- => val
putobject_SC_ba_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0xa5 val
- stack
- => val
putstring_SC_xx_ax
�������u���B������̓R�s�[���Ƃ��B
- instruction sequence
- 0xa6 val
- stack
- => val
putstring_SC_ax_ab
�������u���B������̓R�s�[���Ƃ��B
- instruction sequence
- 0xa7 val
- stack
- => val
putstring_SC_bx_ba
�������u���B������̓R�s�[���Ƃ��B
- instruction sequence
- 0xa8 val
- stack
- => val
putstring_SC_ab_ba
�������u���B������̓R�s�[���Ƃ��B
- instruction sequence
- 0xa9 val
- stack
- => val
putstring_SC_ba_ab
�������u���B������̓R�s�[���Ƃ��B
- instruction sequence
- 0xaa val
- stack
- => val
concatstrings_SC_xx_ax
�������A�����Ēu���B
- instruction sequence
- 0xab num
- stack
- ... => val
concatstrings_SC_ax_ax
�������A�����Ēu���B
- instruction sequence
- 0xac num
- stack
- ... => val
concatstrings_SC_bx_ax
�������A�����Ēu���B
- instruction sequence
- 0xad num
- stack
- ... => val
concatstrings_SC_ab_ax
�������A�����Ēu���B
- instruction sequence
- 0xae num
- stack
- ... => val
concatstrings_SC_ba_ax
�������A�����Ēu���B
- instruction sequence
- 0xaf num
- stack
- ... => val
tostring_SC_xx_ax
to_str
- instruction sequence
- 0xb0
- stack
- val => val
tostring_SC_ax_ax
to_str
- instruction sequence
- 0xb1
- stack
- val => val
tostring_SC_bx_ax
to_str
- instruction sequence
- 0xb2
- stack
- val => val
tostring_SC_ab_ab
to_str
- instruction sequence
- 0xb3
- stack
- val => val
tostring_SC_ba_ba
to_str
- instruction sequence
- 0xb4
- stack
- val => val
toregexp_SC_xx_ax
to Regexp
- instruction sequence
- 0xb5 flag
- stack
- str => val
toregexp_SC_ax_ax
to Regexp
- instruction sequence
- 0xb6 flag
- stack
- str => val
toregexp_SC_bx_ax
to Regexp
- instruction sequence
- 0xb7 flag
- stack
- str => val
toregexp_SC_ab_ab
to Regexp
- instruction sequence
- 0xb8 flag
- stack
- str => val
toregexp_SC_ba_ba
to Regexp
- instruction sequence
- 0xb9 flag
- stack
- str => val
newarray_SC_xx_ax
�V�����z����X�^�b�N��� num �̒l�ŏ��������Ēu���B
- instruction sequence
- 0xba num
- stack
- ... => val
newarray_SC_ax_ax
�V�����z����X�^�b�N��� num �̒l�ŏ��������Ēu���B
- instruction sequence
- 0xbb num
- stack
- ... => val
newarray_SC_bx_ax
�V�����z����X�^�b�N��� num �̒l�ŏ��������Ēu���B
- instruction sequence
- 0xbc num
- stack
- ... => val
newarray_SC_ab_ax
�V�����z����X�^�b�N��� num �̒l�ŏ��������Ēu���B
- instruction sequence
- 0xbd num
- stack
- ... => val
newarray_SC_ba_ax
�V�����z����X�^�b�N��� num �̒l�ŏ��������Ēu���B
- instruction sequence
- 0xbe num
- stack
- ... => val
duparray_SC_xx_ax
�z��� dup ���ăX�^�b�N�ɒu��
- instruction sequence
- 0xbf ary
- stack
- => val
duparray_SC_ax_ab
�z��� dup ���ăX�^�b�N�ɒu��
- instruction sequence
- 0xc0 ary
- stack
- => val
duparray_SC_bx_ba
�z��� dup ���ăX�^�b�N�ɒu��
- instruction sequence
- 0xc1 ary
- stack
- => val
duparray_SC_ab_ba
�z��� dup ���ăX�^�b�N�ɒu��
- instruction sequence
- 0xc2 ary
- stack
- => val
duparray_SC_ba_ab
�z��� dup ���ăX�^�b�N�ɒu��
- instruction sequence
- 0xc3 ary
- stack
- => val
expandarray_SC_xx_xx
�X�^�b�N�g�b�v�̃I�u�W�F�N�g���z��ł���A�����W�J����B
- instruction sequence
- 0xc4 num flag
- stack
- ... ary => ...
expandarray_SC_ax_xx
�X�^�b�N�g�b�v�̃I�u�W�F�N�g���z��ł���A�����W�J����B
- instruction sequence
- 0xc5 num flag
- stack
- ... ary => ...
expandarray_SC_bx_xx
�X�^�b�N�g�b�v�̃I�u�W�F�N�g���z��ł���A�����W�J����B
- instruction sequence
- 0xc6 num flag
- stack
- ... ary => ...
expandarray_SC_ab_xx
�X�^�b�N�g�b�v�̃I�u�W�F�N�g���z��ł���A�����W�J����B
- instruction sequence
- 0xc7 num flag
- stack
- ... ary => ...
expandarray_SC_ba_xx
�X�^�b�N�g�b�v�̃I�u�W�F�N�g���z��ł���A�����W�J����B
- instruction sequence
- 0xc8 num flag
- stack
- ... ary => ...
newhash_SC_xx_ax
Hash.new
- instruction sequence
- 0xc9 num
- stack
- ... => val
newhash_SC_ax_ax
Hash.new
- instruction sequence
- 0xca num
- stack
- ... => val
newhash_SC_bx_ax
Hash.new
- instruction sequence
- 0xcb num
- stack
- ... => val
newhash_SC_ab_ax
Hash.new
- instruction sequence
- 0xcc num
- stack
- ... => val
newhash_SC_ba_ax
Hash.new
- instruction sequence
- 0xcd num
- stack
- ... => val
newrange_SC_xx_ax
Range.new(low, high, flag) �̂悤�ȃI�u�W�F�N�g��u���B
- instruction sequence
- 0xce flag
- stack
- low high => val
newrange_SC_ax_ax
Range.new(low, high, flag) �̂悤�ȃI�u�W�F�N�g��u���B
- instruction sequence
- 0xcf flag
- stack
- low high => val
newrange_SC_bx_ax
Range.new(low, high, flag) �̂悤�ȃI�u�W�F�N�g��u���B
- instruction sequence
- 0xd0 flag
- stack
- low high => val
newrange_SC_ab_ax
Range.new(low, high, flag) �̂悤�ȃI�u�W�F�N�g��u���B
- instruction sequence
- 0xd1 flag
- stack
- low high => val
newrange_SC_ba_ax
Range.new(low, high, flag) �̂悤�ȃI�u�W�F�N�g��u���B
- instruction sequence
- 0xd2 flag
- stack
- low high => val
putnot_SC_xx_ax
!val �ł���I�u�W�F�N�g��u���B
- instruction sequence
- 0xd3
- stack
- obj => val
putnot_SC_ax_ax
!val �ł���I�u�W�F�N�g��u���B
- instruction sequence
- 0xd4
- stack
- obj => val
putnot_SC_bx_ax
!val �ł���I�u�W�F�N�g��u���B
- instruction sequence
- 0xd5
- stack
- obj => val
putnot_SC_ab_ab
!val �ł���I�u�W�F�N�g��u���B
- instruction sequence
- 0xd6
- stack
- obj => val
putnot_SC_ba_ba
!val �ł���I�u�W�F�N�g��u���B
- instruction sequence
- 0xd7
- stack
- obj => val
pop_SC_xx_xx
�X�^�b�N�����|�b�v����B
- instruction sequence
- 0xd8
- stack
- val =>
pop_SC_ax_xx
�X�^�b�N�����|�b�v����B
- instruction sequence
- 0xd9
- stack
- val =>
pop_SC_bx_xx
�X�^�b�N�����|�b�v����B
- instruction sequence
- 0xda
- stack
- val =>
pop_SC_ab_ax
�X�^�b�N�����|�b�v����B
- instruction sequence
- 0xdb
- stack
- val =>
pop_SC_ba_bx
�X�^�b�N�����|�b�v����B
- instruction sequence
- 0xdc
- stack
- val =>
dup_SC_xx_ab
�X�^�b�N�g�b�v���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xdd
- stack
- val => val2 val1
dup_SC_ax_ab
�X�^�b�N�g�b�v���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xde
- stack
- val => val2 val1
dup_SC_bx_ab
�X�^�b�N�g�b�v���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xdf
- stack
- val => val2 val1
dup_SC_ab_ba
�X�^�b�N�g�b�v���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xe0
- stack
- val => val2 val1
dup_SC_ba_ab
�X�^�b�N�g�b�v���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xe1
- stack
- val => val2 val1
dupn_SC_xx_xx
�X�^�b�N�g�b�v���� n ���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xe2 n
- stack
- ... => ...
dupn_SC_ax_xx
�X�^�b�N�g�b�v���� n ���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xe3 n
- stack
- ... => ...
dupn_SC_bx_xx
�X�^�b�N�g�b�v���� n ���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xe4 n
- stack
- ... => ...
dupn_SC_ab_xx
�X�^�b�N�g�b�v���� n ���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xe5 n
- stack
- ... => ...
dupn_SC_ba_xx
�X�^�b�N�g�b�v���� n ���R�s�[���ăX�^�b�N�ɂ���
- instruction sequence
- 0xe6 n
- stack
- ... => ...
swap_SC_xx_ab
�X�^�b�N�g�b�v��2����������B
- instruction sequence
- 0xe7
- stack
- val obj => val obj
swap_SC_ax_ab
�X�^�b�N�g�b�v��2����������B
- instruction sequence
- 0xe8
- stack
- val obj => val obj
swap_SC_bx_ab
�X�^�b�N�g�b�v��2����������B
- instruction sequence
- 0xe9
- stack
- val obj => val obj
swap_SC_ab_ab
�X�^�b�N�g�b�v��2����������B
- instruction sequence
- 0xea
- stack
- val obj => val obj
swap_SC_ba_ab
�X�^�b�N�g�b�v��2����������B
- instruction sequence
- 0xeb
- stack
- val obj => val obj
reput_SC_xx_ax
- instruction sequence
- 0xec
- stack
- ... val => val
reput_SC_ax_ax
- instruction sequence
- 0xed
- stack
- ... val => val
reput_SC_bx_ax
- instruction sequence
- 0xee
- stack
- ... val => val
reput_SC_ab_ax
- instruction sequence
- 0xef
- stack
- ... val => val
reput_SC_ba_ax
- instruction sequence
- 0xf0
- stack
- ... val => val
topn_SC_xx_ax
�X�^�b�N�g�b�v���� n �ڂ��X�^�b�N�g�b�v�ɃR�s�[
- instruction sequence
- 0xf1 n
- stack
- ... => val
topn_SC_ax_ax
�X�^�b�N�g�b�v���� n �ڂ��X�^�b�N�g�b�v�ɃR�s�[
- instruction sequence
- 0xf2 n
- stack
- ... => val
topn_SC_bx_ax
�X�^�b�N�g�b�v���� n �ڂ��X�^�b�N�g�b�v�ɃR�s�[
- instruction sequence
- 0xf3 n
- stack
- ... => val
topn_SC_ab_ax
�X�^�b�N�g�b�v���� n �ڂ��X�^�b�N�g�b�v�ɃR�s�[
- instruction sequence
- 0xf4 n
- stack
- ... => val
topn_SC_ba_ax
�X�^�b�N�g�b�v���� n �ڂ��X�^�b�N�g�b�v�ɃR�s�[
- instruction sequence
- 0xf5 n
- stack
- ... => val
methoddef_SC_xx_xx
���\�b�h m �� body �Ƃ��Ē�`����B
- instruction sequence
- 0xf6 id body
- stack
- =>
methoddef_SC_ax_ax
���\�b�h m �� body �Ƃ��Ē�`����B
- instruction sequence
- 0xf7 id body
- stack
- =>
methoddef_SC_bx_bx
���\�b�h m �� body �Ƃ��Ē�`����B
- instruction sequence
- 0xf8 id body
- stack
- =>
methoddef_SC_ab_ab
���\�b�h m �� body �Ƃ��Ē�`����B
- instruction sequence
- 0xf9 id body
- stack
- =>
methoddef_SC_ba_ba
���\�b�h m �� body �Ƃ��Ē�`����B
- instruction sequence
- 0xfa id body
- stack
- =>
singletonmethoddef_SC_xx_xx
���ك��\�b�h m �� body �Ƃ��� obj �ɒ�`����B
- instruction sequence
- 0xfb id body
- stack
- obj =>
singletonmethoddef_SC_ax_xx
���ك��\�b�h m �� body �Ƃ��� obj �ɒ�`����B
- instruction sequence
- 0xfc id body
- stack
- obj =>
singletonmethoddef_SC_bx_xx
���ك��\�b�h m �� body �Ƃ��� obj �ɒ�`����B
- instruction sequence
- 0xfd id body
- stack
- obj =>
singletonmethoddef_SC_ab_ax
���ك��\�b�h m �� body �Ƃ��� obj �ɒ�`����B
- instruction sequence
- 0xfe id body
- stack
- obj =>
singletonmethoddef_SC_ba_bx
���ك��\�b�h m �� body �Ƃ��� obj �ɒ�`����B
- instruction sequence
- 0xff id body
- stack
- obj =>
alias_SC_xx_xx
alias �����B���� v_p �� Qtrue �Ȃ�Avalias (global variable) �����
- instruction sequence
- 0x100 v_p id1 id2
- stack
- =>
alias_SC_ax_ax
alias �����B���� v_p �� Qtrue �Ȃ�Avalias (global variable) �����
- instruction sequence
- 0x101 v_p id1 id2
- stack
- =>
alias_SC_bx_bx
alias �����B���� v_p �� Qtrue �Ȃ�Avalias (global variable) �����
- instruction sequence
- 0x102 v_p id1 id2
- stack
- =>
alias_SC_ab_ab
alias �����B���� v_p �� Qtrue �Ȃ�Avalias (global variable) �����
- instruction sequence
- 0x103 v_p id1 id2
- stack
- =>
alias_SC_ba_ba
alias �����B���� v_p �� Qtrue �Ȃ�Avalias (global variable) �����
- instruction sequence
- 0x104 v_p id1 id2
- stack
- =>
undef_SC_xx_xx
undef
- instruction sequence
- 0x105 id
- stack
- =>
undef_SC_ax_ax
undef
- instruction sequence
- 0x106 id
- stack
- =>
undef_SC_bx_bx
undef
- instruction sequence
- 0x107 id
- stack
- =>
undef_SC_ab_ab
undef
- instruction sequence
- 0x108 id
- stack
- =>
undef_SC_ba_ba
undef
- instruction sequence
- 0x109 id
- stack
- =>
defined_SC_xx_ax
defined?
- instruction sequence
- 0x10a type obj needstr
- stack
- ... => val
defined_SC_ax_ax
defined?
- instruction sequence
- 0x10b type obj needstr
- stack
- ... => val
defined_SC_bx_ax
defined?
- instruction sequence
- 0x10c type obj needstr
- stack
- ... => val
defined_SC_ab_ax
defined?
- instruction sequence
- 0x10d type obj needstr
- stack
- ... => val
defined_SC_ba_ax
defined?
- instruction sequence
- 0x10e type obj needstr
- stack
- ... => val
classdef_SC_xx_ax
- instruction sequence
- 0x10f id klass_iseq
- stack
- cbase super => val
classdef_SC_ax_ax
- instruction sequence
- 0x110 id klass_iseq
- stack
- cbase super => val
classdef_SC_bx_ax
- instruction sequence
- 0x111 id klass_iseq
- stack
- cbase super => val
classdef_SC_ab_ax
- instruction sequence
- 0x112 id klass_iseq
- stack
- cbase super => val
classdef_SC_ba_ax
- instruction sequence
- 0x113 id klass_iseq
- stack
- cbase super => val
singletonclassdef_SC_xx_ax
���كN���X��`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x114 sclass_iseq
- stack
- obj => val
singletonclassdef_SC_ax_ax
���كN���X��`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x115 sclass_iseq
- stack
- obj => val
singletonclassdef_SC_bx_ax
���كN���X��`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x116 sclass_iseq
- stack
- obj => val
singletonclassdef_SC_ab_ab
���كN���X��`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x117 sclass_iseq
- stack
- obj => val
singletonclassdef_SC_ba_ba
���كN���X��`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x118 sclass_iseq
- stack
- obj => val
moduledef_SC_xx_ax
���W���[����`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x119 id module_iseq
- stack
- mbase => val
moduledef_SC_ax_ax
���W���[����`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x11a id module_iseq
- stack
- mbase => val
moduledef_SC_bx_ax
���W���[����`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x11b id module_iseq
- stack
- mbase => val
moduledef_SC_ab_ax
���W���[����`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x11c id module_iseq
- stack
- mbase => val
moduledef_SC_ba_ax
���W���[����`�X�R�[�v�ֈڍs����B
- instruction sequence
- 0x11d id module_iseq
- stack
- mbase => val
popcref_SC_xx_xx
�N���X�̃l�X�g�W�����ЂƂ|�b�v����
- instruction sequence
- 0x11e
- stack
- =>
popcref_SC_ax_ax
�N���X�̃l�X�g�W�����ЂƂ|�b�v����
- instruction sequence
- 0x11f
- stack
- =>
popcref_SC_bx_bx
�N���X�̃l�X�g�W�����ЂƂ|�b�v����
- instruction sequence
- 0x120
- stack
- =>
popcref_SC_ab_ab
�N���X�̃l�X�g�W�����ЂƂ|�b�v����
- instruction sequence
- 0x121
- stack
- =>
popcref_SC_ba_ba
�N���X�̃l�X�g�W�����ЂƂ|�b�v����
- instruction sequence
- 0x122
- stack
- =>
send_SC_xx_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x123 id argc block flag ic
- stack
- ... => val
send_SC_ax_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x124 id argc block flag ic
- stack
- ... => val
send_SC_bx_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x125 id argc block flag ic
- stack
- ... => val
send_SC_ab_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x126 id argc block flag ic
- stack
- ... => val
send_SC_ba_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x127 id argc block flag ic
- stack
- ... => val
super_SC_xx_ax
super(args) # args.size => num
- instruction sequence
- 0x128 num flag
- stack
- ... => val
super_SC_ax_ax
super(args) # args.size => num
- instruction sequence
- 0x129 num flag
- stack
- ... => val
super_SC_bx_ax
super(args) # args.size => num
- instruction sequence
- 0x12a num flag
- stack
- ... => val
super_SC_ab_ax
super(args) # args.size => num
- instruction sequence
- 0x12b num flag
- stack
- ... => val
super_SC_ba_ax
super(args) # args.size => num
- instruction sequence
- 0x12c num flag
- stack
- ... => val
zsuper_SC_xx_ax
super
- instruction sequence
- 0x12d
- stack
- ... => val
zsuper_SC_ax_ax
super
- instruction sequence
- 0x12e
- stack
- ... => val
zsuper_SC_bx_ax
super
- instruction sequence
- 0x12f
- stack
- ... => val
zsuper_SC_ab_ax
super
- instruction sequence
- 0x130
- stack
- ... => val
zsuper_SC_ba_ax
super
- instruction sequence
- 0x131
- stack
- ... => val
yield_SC_xx_ax
yield(args) # args.size => num
- instruction sequence
- 0x132 num flag
- stack
- ... => val
yield_SC_ax_ax
yield(args) # args.size => num
- instruction sequence
- 0x133 num flag
- stack
- ... => val
yield_SC_bx_ax
yield(args) # args.size => num
- instruction sequence
- 0x134 num flag
- stack
- ... => val
yield_SC_ab_ax
yield(args) # args.size => num
- instruction sequence
- 0x135 num flag
- stack
- ... => val
yield_SC_ba_ax
yield(args) # args.size => num
- instruction sequence
- 0x136 num flag
- stack
- ... => val
end_SC_xx_ax
���̃X�R�[�v���甲����B
- instruction sequence
- 0x137 idx
- stack
- val => val
end_SC_ax_ax
���̃X�R�[�v���甲����B
- instruction sequence
- 0x138 idx
- stack
- val => val
end_SC_bx_ax
���̃X�R�[�v���甲����B
- instruction sequence
- 0x139 idx
- stack
- val => val
end_SC_ab_ax
���̃X�R�[�v���甲����B
- instruction sequence
- 0x13a idx
- stack
- val => val
end_SC_ba_ax
���̃X�R�[�v���甲����B
- instruction sequence
- 0x13b idx
- stack
- val => val
throw_SC_xx_xx
longjump
- instruction sequence
- 0x13c throw_state
- stack
- throwobj =>
throw_SC_ax_xx
longjump
- instruction sequence
- 0x13d throw_state
- stack
- throwobj =>
throw_SC_bx_xx
longjump
- instruction sequence
- 0x13e throw_state
- stack
- throwobj =>
throw_SC_ab_ax
longjump
- instruction sequence
- 0x13f throw_state
- stack
- throwobj =>
throw_SC_ba_bx
longjump
- instruction sequence
- 0x140 throw_state
- stack
- throwobj =>
jump_SC_xx_xx
PC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x141 dst
- stack
- =>
jump_SC_ax_ax
PC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x142 dst
- stack
- =>
jump_SC_bx_bx
PC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x143 dst
- stack
- =>
jump_SC_ab_ab
PC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x144 dst
- stack
- =>
jump_SC_ba_ba
PC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x145 dst
- stack
- =>
if_SC_xx_xx
���� val �� false �� nil �łȂ���APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x146 dst
- stack
- val =>
if_SC_ax_xx
���� val �� false �� nil �łȂ���APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x147 dst
- stack
- val =>
if_SC_bx_xx
���� val �� false �� nil �łȂ���APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x148 dst
- stack
- val =>
if_SC_ab_ax
���� val �� false �� nil �łȂ���APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x149 dst
- stack
- val =>
if_SC_ba_bx
���� val �� false �� nil �łȂ���APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x14a dst
- stack
- val =>
unless_SC_xx_xx
���� val �� false �� nil �Ȃ�APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x14b dst
- stack
- val =>
unless_SC_ax_xx
���� val �� false �� nil �Ȃ�APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x14c dst
- stack
- val =>
unless_SC_bx_xx
���� val �� false �� nil �Ȃ�APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x14d dst
- stack
- val =>
unless_SC_ab_ax
���� val �� false �� nil �Ȃ�APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x14e dst
- stack
- val =>
unless_SC_ba_bx
���� val �� false �� nil �Ȃ�APC �� (PC + dst) �ɂ���B
- instruction sequence
- 0x14f dst
- stack
- val =>
getinlinecache_SC_xx_ax
inline cache
- instruction sequence
- 0x150 ic dst
- stack
- => val
getinlinecache_SC_ax_ab
inline cache
- instruction sequence
- 0x151 ic dst
- stack
- => val
getinlinecache_SC_bx_ba
inline cache
- instruction sequence
- 0x152 ic dst
- stack
- => val
getinlinecache_SC_ab_ba
inline cache
- instruction sequence
- 0x153 ic dst
- stack
- => val
getinlinecache_SC_ba_ab
inline cache
- instruction sequence
- 0x154 ic dst
- stack
- => val
setinlinecache_SC_xx_ax
set inline cahce
- instruction sequence
- 0x155 dst
- stack
- val => val
setinlinecache_SC_ax_ax
set inline cahce
- instruction sequence
- 0x156 dst
- stack
- val => val
setinlinecache_SC_bx_ax
set inline cahce
- instruction sequence
- 0x157 dst
- stack
- val => val
setinlinecache_SC_ab_ab
set inline cahce
- instruction sequence
- 0x158 dst
- stack
- val => val
setinlinecache_SC_ba_ba
set inline cahce
- instruction sequence
- 0x159 dst
- stack
- val => val
opt_plus_SC_xx_ax
�œK�����ꂽ X+Y�B
- instruction sequence
- 0x15a
- stack
- recv obj => val
opt_plus_SC_ax_ax
�œK�����ꂽ X+Y�B
- instruction sequence
- 0x15b
- stack
- recv obj => val
opt_plus_SC_bx_ax
�œK�����ꂽ X+Y�B
- instruction sequence
- 0x15c
- stack
- recv obj => val
opt_plus_SC_ab_ax
�œK�����ꂽ X+Y�B
- instruction sequence
- 0x15d
- stack
- recv obj => val
opt_plus_SC_ba_ax
�œK�����ꂽ X+Y�B
- instruction sequence
- 0x15e
- stack
- recv obj => val
opt_minus_SC_xx_ax
�œK�����ꂽ X-Y�B
- instruction sequence
- 0x15f
- stack
- recv obj => val
opt_minus_SC_ax_ax
�œK�����ꂽ X-Y�B
- instruction sequence
- 0x160
- stack
- recv obj => val
opt_minus_SC_bx_ax
�œK�����ꂽ X-Y�B
- instruction sequence
- 0x161
- stack
- recv obj => val
opt_minus_SC_ab_ax
�œK�����ꂽ X-Y�B
- instruction sequence
- 0x162
- stack
- recv obj => val
opt_minus_SC_ba_ax
�œK�����ꂽ X-Y�B
- instruction sequence
- 0x163
- stack
- recv obj => val
opt_lt_SC_xx_ax
�œK�����ꂽ X<Y�B
- instruction sequence
- 0x164
- stack
- recv obj => val
opt_lt_SC_ax_ax
�œK�����ꂽ X<Y�B
- instruction sequence
- 0x165
- stack
- recv obj => val
opt_lt_SC_bx_ax
�œK�����ꂽ X<Y�B
- instruction sequence
- 0x166
- stack
- recv obj => val
opt_lt_SC_ab_ax
�œK�����ꂽ X<Y�B
- instruction sequence
- 0x167
- stack
- recv obj => val
opt_lt_SC_ba_ax
�œK�����ꂽ X<Y�B
- instruction sequence
- 0x168
- stack
- recv obj => val
opt_ltlt_SC_xx_ax
<<
- instruction sequence
- 0x169
- stack
- recv obj => val
opt_ltlt_SC_ax_ax
<<
- instruction sequence
- 0x16a
- stack
- recv obj => val
opt_ltlt_SC_bx_ax
<<
- instruction sequence
- 0x16b
- stack
- recv obj => val
opt_ltlt_SC_ab_ax
<<
- instruction sequence
- 0x16c
- stack
- recv obj => val
opt_ltlt_SC_ba_ax
<<
- instruction sequence
- 0x16d
- stack
- recv obj => val
opt_regexpmatch1_SC_xx_ax
�œK�����ꂽ���K�\���}�b�`
- instruction sequence
- 0x16e r
- stack
- obj => val
opt_regexpmatch1_SC_ax_ax
�œK�����ꂽ���K�\���}�b�`
- instruction sequence
- 0x16f r
- stack
- obj => val
opt_regexpmatch1_SC_bx_ax
�œK�����ꂽ���K�\���}�b�`
- instruction sequence
- 0x170 r
- stack
- obj => val
opt_regexpmatch1_SC_ab_ab
�œK�����ꂽ���K�\���}�b�`
- instruction sequence
- 0x171 r
- stack
- obj => val
opt_regexpmatch1_SC_ba_ba
�œK�����ꂽ���K�\���}�b�`
- instruction sequence
- 0x172 r
- stack
- obj => val
opt_regexpmatch2_SC_xx_ax
�œK�����ꂽ���K�\���}�b�` 2
- instruction sequence
- 0x173
- stack
- obj2 obj1 => val
opt_regexpmatch2_SC_ax_ax
�œK�����ꂽ���K�\���}�b�` 2
- instruction sequence
- 0x174
- stack
- obj2 obj1 => val
opt_regexpmatch2_SC_bx_ax
�œK�����ꂽ���K�\���}�b�` 2
- instruction sequence
- 0x175
- stack
- obj2 obj1 => val
opt_regexpmatch2_SC_ab_ax
�œK�����ꂽ���K�\���}�b�` 2
- instruction sequence
- 0x176
- stack
- obj2 obj1 => val
opt_regexpmatch2_SC_ba_ax
�œK�����ꂽ���K�\���}�b�` 2
- instruction sequence
- 0x177
- stack
- obj2 obj1 => val
opt_call_native_compiled_SC_xx_xx
�l�C�e�B�u�R���p�C���������\�b�h�� kick
- instruction sequence
- 0x178
- stack
- =>
opt_call_native_compiled_SC_ax_ax
�l�C�e�B�u�R���p�C���������\�b�h�� kick
- instruction sequence
- 0x179
- stack
- =>
opt_call_native_compiled_SC_bx_bx
�l�C�e�B�u�R���p�C���������\�b�h�� kick
- instruction sequence
- 0x17a
- stack
- =>
opt_call_native_compiled_SC_ab_ab
�l�C�e�B�u�R���p�C���������\�b�h�� kick
- instruction sequence
- 0x17b
- stack
- =>
opt_call_native_compiled_SC_ba_ba
�l�C�e�B�u�R���p�C���������\�b�h�� kick
- instruction sequence
- 0x17c
- stack
- =>
getlocal_OP_1_SC_xx_ax
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x17d
- stack
- => val
getlocal_OP_1_SC_ax_ab
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x17e
- stack
- => val
getlocal_OP_1_SC_bx_ba
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x17f
- stack
- => val
getlocal_OP_1_SC_ab_ba
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x180
- stack
- => val
getlocal_OP_1_SC_ba_ab
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x181
- stack
- => val
setlocal_OP_1_SC_xx_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x182
- stack
- val =>
setlocal_OP_1_SC_ax_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x183
- stack
- val =>
setlocal_OP_1_SC_bx_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x184
- stack
- val =>
setlocal_OP_1_SC_ab_ax
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x185
- stack
- val =>
setlocal_OP_1_SC_ba_bx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x186
- stack
- val =>
getlocal_OP_2_SC_xx_ax
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x187
- stack
- => val
getlocal_OP_2_SC_ax_ab
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x188
- stack
- => val
getlocal_OP_2_SC_bx_ba
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x189
- stack
- => val
getlocal_OP_2_SC_ab_ba
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x18a
- stack
- => val
getlocal_OP_2_SC_ba_ab
idx �Ŏw�肳�ꂽ���[�J���ϐ����X�^�b�N�ɒu���B
- instruction sequence
- 0x18b
- stack
- => val
setlocal_OP_2_SC_xx_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x18c
- stack
- val =>
setlocal_OP_2_SC_ax_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x18d
- stack
- val =>
setlocal_OP_2_SC_bx_xx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x18e
- stack
- val =>
setlocal_OP_2_SC_ab_ax
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x18f
- stack
- val =>
setlocal_OP_2_SC_ba_bx
idx �Ŏw�肳�ꂽ���[�J���ϐ��� val �ɂ���B
- instruction sequence
- 0x190
- stack
- val =>
getdynamic_OP__WC__0_SC_xx_ax
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x191 idx
- stack
- => val
getdynamic_OP__WC__0_SC_ax_ab
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x192 idx
- stack
- => val
getdynamic_OP__WC__0_SC_bx_ba
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x193 idx
- stack
- => val
getdynamic_OP__WC__0_SC_ab_ba
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x194 idx
- stack
- => val
getdynamic_OP__WC__0_SC_ba_ab
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x195 idx
- stack
- => val
getdynamic_OP_1_0_SC_xx_ax
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x196
- stack
- => val
getdynamic_OP_1_0_SC_ax_ab
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x197
- stack
- => val
getdynamic_OP_1_0_SC_bx_ba
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x198
- stack
- => val
getdynamic_OP_1_0_SC_ab_ba
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x199
- stack
- => val
getdynamic_OP_1_0_SC_ba_ab
level, idx �Ŏw�肳�ꂽ�u���b�N���[�J���ϐ��̒l���X�^�b�N�ɒu���B
- instruction sequence
- 0x19a
- stack
- => val
putobject_OP_INT2FIX_O_0_C__SC_xx_ax
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x19b
- stack
- => val
putobject_OP_INT2FIX_O_0_C__SC_ax_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x19c
- stack
- => val
putobject_OP_INT2FIX_O_0_C__SC_bx_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x19d
- stack
- => val
putobject_OP_INT2FIX_O_0_C__SC_ab_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x19e
- stack
- => val
putobject_OP_INT2FIX_O_0_C__SC_ba_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x19f
- stack
- => val
putobject_OP_INT2FIX_O_1_C__SC_xx_ax
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a0
- stack
- => val
putobject_OP_INT2FIX_O_1_C__SC_ax_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a1
- stack
- => val
putobject_OP_INT2FIX_O_1_C__SC_bx_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a2
- stack
- => val
putobject_OP_INT2FIX_O_1_C__SC_ab_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a3
- stack
- => val
putobject_OP_INT2FIX_O_1_C__SC_ba_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a4
- stack
- => val
putobject_OP_Qtrue_SC_xx_ax
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a5
- stack
- => val
putobject_OP_Qtrue_SC_ax_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a6
- stack
- => val
putobject_OP_Qtrue_SC_bx_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a7
- stack
- => val
putobject_OP_Qtrue_SC_ab_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a8
- stack
- => val
putobject_OP_Qtrue_SC_ba_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1a9
- stack
- => val
putobject_OP_Qfalse_SC_xx_ax
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1aa
- stack
- => val
putobject_OP_Qfalse_SC_ax_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1ab
- stack
- => val
putobject_OP_Qfalse_SC_bx_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1ac
- stack
- => val
putobject_OP_Qfalse_SC_ab_ba
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1ad
- stack
- => val
putobject_OP_Qfalse_SC_ba_ab
�I�u�W�F�N�g��u���Bi.e. Fixnum, true, false, nil, and so on.
- instruction sequence
- 0x1ae
- stack
- => val
send_OP__WC___WC__Qfalse_0__WC__SC_xx_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x1af id argc ic
- stack
- ... => val
send_OP__WC___WC__Qfalse_0__WC__SC_ax_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x1b0 id argc ic
- stack
- ... => val
send_OP__WC___WC__Qfalse_0__WC__SC_bx_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x1b1 id argc ic
- stack
- ... => val
send_OP__WC___WC__Qfalse_0__WC__SC_ab_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x1b2 id argc ic
- stack
- ... => val
send_OP__WC___WC__Qfalse_0__WC__SC_ba_ax
obj.send(id, args) # args.size => num
- instruction sequence
- 0x1b3 id argc ic
- stack
- ... => val
UNIFIED_putobject_putobject_SC_xx_ab
unified insn
- instruction sequence
- 0x1b4 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putobject_SC_ax_ba
unified insn
- instruction sequence
- 0x1b5 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putobject_SC_bx_ab
unified insn
- instruction sequence
- 0x1b6 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putobject_SC_ab_ab
unified insn
- instruction sequence
- 0x1b7 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putobject_SC_ba_ba
unified insn
- instruction sequence
- 0x1b8 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putstring_SC_xx_ab
unified insn
- instruction sequence
- 0x1b9 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putstring_SC_ax_ba
unified insn
- instruction sequence
- 0x1ba val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putstring_SC_bx_ab
unified insn
- instruction sequence
- 0x1bb val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putstring_SC_ab_ab
unified insn
- instruction sequence
- 0x1bc val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putstring_SC_ba_ba
unified insn
- instruction sequence
- 0x1bd val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putobject_SC_xx_ab
unified insn
- instruction sequence
- 0x1be val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putobject_SC_ax_ba
unified insn
- instruction sequence
- 0x1bf val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putobject_SC_bx_ab
unified insn
- instruction sequence
- 0x1c0 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putobject_SC_ab_ab
unified insn
- instruction sequence
- 0x1c1 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putstring_putobject_SC_ba_ba
unified insn
- instruction sequence
- 0x1c2 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putstring_SC_xx_ab
unified insn
- instruction sequence
- 0x1c3 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putstring_SC_ax_ba
unified insn
- instruction sequence
- 0x1c4 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putstring_SC_bx_ab
unified insn
- instruction sequence
- 0x1c5 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putstring_SC_ab_ab
unified insn
- instruction sequence
- 0x1c6 val_0 val_1
- stack
- => val_1 val_0
UNIFIED_putobject_putstring_SC_ba_ba
unified insn
- instruction sequence
- 0x1c7 val_0 val_1
- stack
- => val_1 val_0
���̑�
�e�X�g
test/test_* ���e�X�g�P�[�X�ł��B�ꉞ�A�~�X�Ȃ������͂��ł��B�t�ɂ����ƁA
���̃e�X�g�ɋL�q����Ă����ł͂�����Ɠ��삷��Ƃ������Ƃł��B
�x���`�}�[�N
benchmark/bm_* �Ƀx���`�}�[�N�v���O�����������Ă���܂��B
����̗\��
�܂��܂����Ȃ�������Ȃ����ƁA��������������������܂���ł����
�����Ȃ���Ȃ�܂���B��ԑ傫�ȖڕW�� eval.c ��u�������邱�Ƃł��傤
���B
Verifier
YARV ���ߗ�́A�~�X�������Ă��������Ă��܂����ߊ댯�ł���\���������
���B���̂��߁A�X�^�b�N�̗��p��Ԃ�������Ǝ��O�Ɍ�����悤�ȃx���t�@�C
�A��p�ӂ��Ȃ���Ȃ�Ȃ��ƍl���Ă��܂��B
Compiled File �̍\�z
Ruby �v���O���������̖��߃Z�b�g�ɃV���A���C�Y�����f�[�^�\�����t�@�C����
�o�͂ł���悤�ɂ������ƍl���Ă��܂��B����𗘗p���Ĉ�x�R���p�C��������
�ߗ���t�@�C���ɕۑ����Ă����A���[�h���ɂ̓R���p�C���̎�ԁA�R�X�g
���Ȃ����Ƃ��ł��܂��B
�S�̍\��
���̂悤�ȃt�@�C���\�����l���Ă��܂����A�܂�����ł��B
u4 : 4 byte unsigned storage
u2 : 2 byte unsigned storage
u1 : 1 byte unsigned storage
every storages are little endian :-)
CompiledFile{
u4 magic;
u2 major;
u2 minor;
u4 character_code;
u4 constants_pool_count;
ConstantEntry constants_pool[constants_pool_count];
u4 block_count;
blockEntry blocks[block_count];
u4 method_count;
MethodEntry methods[method_count];
}
Java classfile �̃p�N���B