pike.git
/
src
/
docode.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/docode.c:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ /**/ #include "global.h"
-
RCSID("$Id: docode.c,v 1.
69
2003
/
09
/
19
13
:
54
:
25
grubba Exp $");
+
RCSID("$Id: docode.c,v 1.
70
2006
/
03
/
02
10
:
37
:
58
grubba Exp $");
#include "las.h" #include "program.h" #include "language.h" #include "pike_types.h" #include "stralloc.h" #include "interpret.h" #include "constants.h" #include "array.h" #include "pike_macros.h" #include "error.h"
pike.git/src/docode.c:430:
default: switch(CDR(n)->token) { case F_LOCAL: if(CDR(n)->u.integer.a >= find_local_frame(CDR(n)->u.integer.b)->max_number_of_locals) yyerror("Illegal to use local variable here."); if(CDR(n)->u.integer.b) goto normal_assign;
+
if (CDR(n)->node_info & OPT_ASSIGNMENT) {
+
/* Initialize. */
+
emit0(F_CONST0);
+
emit1(F_ASSIGN_LOCAL_AND_POP, CDR(n)->u.integer.a);
+
}
code_expression(CAR(n), 0, "RHS"); emit(flags & DO_POP ? F_ASSIGN_LOCAL_AND_POP:F_ASSIGN_LOCAL, CDR(n)->u.integer.a ); break; case F_IDENTIFIER: if(!IDENTIFIER_IS_VARIABLE( ID_FROM_INT(new_program, CDR(n)->u.id.number)->identifier_flags)) { yyerror("Cannot assign functions or constants.\n"); }else{
pike.git/src/docode.c:1261:
{ emit(F_LEXICAL_LOCAL_LVALUE,n->u.id.number); return 2; }else{ emit(F_LEXICAL_LOCAL,n->u.id.number); return 1; } }else{ if(flags & WANT_LVALUE) {
+
if (n->node_info & OPT_ASSIGNMENT) {
+
/* Initialize the variable. */
+
emit0(F_CONST0);
+
emit1(F_ASSIGN_LOCAL_AND_POP, n->u.integer.a);
+
}
emit(F_LOCAL_LVALUE,n->u.id.number); return 2; }else{
-
emit
(F_LOCAL,n->u.
id
.
number
);
+
if
(
n->node_info & OPT_ASSIGNMENT) {
+
/* Initialize the variable. */
+
emit0(
F_
CONST0);
+
emit1(F_ASSIGN_
LOCAL,
n->u.
integer
.
a
);
+
} else {
+
emit1(F_LOCAL, n->u.integer.a);
+
}
return 1; } } case F_TRAMPOLINE: emit(F_TRAMPOLINE,n->u.id.number); return 1; case F_IDENTIFIER: if(IDENTIFIER_IS_FUNCTION(ID_FROM_INT(new_program, n->u.id.number)->identifier_flags))