pike.git/
src/
interpret_functions.h
Branch:
Tag:
Non-build tags
All tags
No tags
2003-02-15
2003-02-15 14:59:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>
f7f14eb8b340a7de48e5e55a23b1c5f4dadc4766 (
26
lines) (+
5
/-
21
)
[
Show
|
Annotate
]
Branch:
7.9
F_GLOBAL_LVALUE no longer uses GLOBAL_FROM_INT().
Rev: src/interpret_functions.h:1.137
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: interpret_functions.h,v 1.
136
2003/02/15 14:
14
:
28
grubba Exp $
+
|| $Id: interpret_functions.h,v 1.
137
2003/02/15 14:
59
:
35
grubba Exp $
*/ /*
722:
}); OPCODE1(F_GLOBAL_LVALUE, "& global", 0, {
-
struct identifier *i;
-
INT32 tmp=arg1 + Pike
_
fp->context.identifier
_
level;
-
if
(
!
Pike_fp->current_object
->prog
)
-
Pike
_
error
(
"Cannot
access
global variables in destructed object.\n");
-
i=ID_FROM_INT(
Pike_fp->
current_object->prog, tmp);
-
-
if(!IDENTIFIER_IS_VARIABLE(i->
identifier_
flags
)
)
-
Pike_error("Cannot re-assign functions or constants.\n")
;
-
-
if(i->run_time_type == PIKE_T_MIXED)
-
{
-
Pike_sp[
0
].type
=T_LVALUE;
-
Pike_sp[0].u.lval
=
(struct
svalue *)GLOBAL_FROM_INT(tmp);
-
}else{
-
Pike_sp[0].type=
T_
SHORT_
LVALUE;
-
Pike_sp[0].u.short_lval= (union anything *)GLOBAL_FROM_INT(tmp);
-
Pike_sp[0].subtype=i->run_time_type;
-
}
-
Pike_sp[1].type=T_VOID;
-
Pike_sp+=2;
+
ref
_
push
_
object
(Pike_fp->current_object)
;
+
push
_
int
(
arg1
+
Pike_fp->
context.
identifier_
level
);
+
Pike_sp[
-1
].type = T_LVALUE;
}); OPCODE0(F_INC, "++x", 0, {