summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-04 04:57:50 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-04 04:57:50 +0000
commitd3842de5c9baa2962e01d02b2499eac49d9065a6 (patch)
tree9c077a93d188457f2fc83c092b880482854c72cf /insns.def
parent51ee08fd7128639ecb82997612b028ba94ba8c3d (diff)
* 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.def12
1 files changed, 7 insertions, 5 deletions
diff --git a/insns.def b/insns.def
index dc7a0137d4..ea099060c7 100644
--- a/insns.def
+++ b/insns.def
@@ -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;