diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-04 04:57:50 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-04 04:57:50 +0000 |
commit | d3842de5c9baa2962e01d02b2499eac49d9065a6 (patch) | |
tree | 9c077a93d188457f2fc83c092b880482854c72cf /insns.def | |
parent | 51ee08fd7128639ecb82997612b028ba94ba8c3d (diff) | |
download | ruby-d3842de5c9baa2962e01d02b2499eac49d9065a6.tar.gz |
* vm_opts.h: enable optimization - operand unifications.
Operand unification technique enable to combine
an instruction and specific operands and make new
instruction.
* defs/opt_operand.def: add several configuration
of operand unifications.
* insns.def: use `int' instead to suppress warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -57,10 +57,11 @@ getlocal () (VALUE val) { - rb_num_t i; + int i, lev = (int)level; VALUE *ep = GET_EP(); - for (i = 0; i < level; i++) { - ep = GET_PREV_EP(ep); + + for (i = 0; i < lev; i++) { + ep = GET_PREV_EP(ep); } val = *(ep - idx); } @@ -78,9 +79,10 @@ setlocal (VALUE val) () { - rb_num_t i; + int i, lev = (int)level; VALUE *ep = GET_EP(); - for (i = 0; i < level; i++) { + + for (i = 0; i < lev; i++) { ep = GET_PREV_EP(ep); } *(ep - idx) = val; |