summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-10 08:04:52 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-10 08:04:52 +0000
commita6e3d19f3ac344613da68dff705fb411d9120d63 (patch)
tree7f16e466dd79c5750c740d3aac7a4704b924885e /insns.def
parentd4662d49d925484f673969693f47cd4ac4338206 (diff)
* vm.c, insnhelper.ci: fix svar interface.
* compile.c (iseq_compile_each), yarvcore.h: fix to use new svar interface for flip flop. * eval.c: ditto. * insns.def: ditto. * include/ruby/intern.h: remove "rb_svar()" declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def15
1 files changed, 7 insertions, 8 deletions
diff --git a/insns.def b/insns.def
index e1b28766cb..be67ab09e4 100644
--- a/insns.def
+++ b/insns.def
@@ -80,16 +80,16 @@ setlocal
*/
DEFINE_INSN
getspecial
-(rb_num_t idx, rb_num_t type)
+(VALUE key, rb_num_t type)
()
(VALUE val)
{
if (type == 0) {
- VALUE *pv = lfp_svar(GET_LFP(), idx);
- val = *pv;
+ val = lfp_svar_get(th, GET_LFP(), key);
}
else {
- VALUE backref = *lfp_svar(GET_LFP(), 1);
+ VALUE backref = lfp_svar_get(th, GET_LFP(), 1);
+
if (type & 0x01) {
switch (type >> 1) {
case '&':
@@ -121,12 +121,11 @@ getspecial
*/
DEFINE_INSN
setspecial
-(rb_num_t idx)
+(VALUE key)
(VALUE obj)
()
{
- VALUE *pv = lfp_svar(GET_LFP(), idx);
- *pv = obj;
+ lfp_svar_set(th, GET_LFP(), key, obj);
}
/**
@@ -939,7 +938,7 @@ defined
}
case DEFINED_REF:{
int nth = FIX2INT(obj);
- VALUE backref = *lfp_svar(GET_LFP(), 1);
+ VALUE backref = lfp_svar_get(th, GET_LFP(), 1);
if (rb_reg_nth_match(nth, backref) != Qnil) {
snprintf(buf, 0x10, "$%d", nth);