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.
122
2001/06/
23
21
:
52
:
09
hubbe Exp $");
+
RCSID("$Id: docode.c,v 1.
123
2001/06/
29
19
:
48
:
22
hubbe Exp $");
#include "las.h" #include "program.h" #include "pike_types.h" #include "stralloc.h" #include "interpret.h" #include "constants.h" #include "array.h" #include "pike_macros.h" #include "pike_error.h" #include "pike_memory.h"
pike.git/src/docode.c:775:
if(!IDENTIFIER_IS_VARIABLE( ID_FROM_INT(Pike_compiler->new_program, CDR(n)->u.id.number)->identifier_flags)) { yyerror("Cannot assign functions or constants.\n"); }else{ code_expression(CAR(n), 0, "RHS"); emit1(flags & DO_POP ? F_ASSIGN_GLOBAL_AND_POP:F_ASSIGN_GLOBAL, CDR(n)->u.id.number); } break;
+
case F_EXTERNAL:
+
/* Check that it is in this context */
+
if(Pike_compiler ->new_program->id == CDR(n)->u.integer.a)
+
{
+
/* Check that it is a variable */
+
if(IDENTIFIER_IS_VARIABLE( ID_FROM_INT(Pike_compiler->new_program, CDR(n)->u.integer.b)->identifier_flags))
+
{
+
code_expression(CAR(n), 0, "RHS");
+
emit1(flags & DO_POP ? F_ASSIGN_GLOBAL_AND_POP:F_ASSIGN_GLOBAL,
+
CDR(n)->u.integer.b);
+
break;
+
}
+
}
+
/* fall through */
+
default: normal_assign: tmp1=do_docode(CDR(n),DO_LVALUE); if(do_docode(CAR(n),0)!=1) yyerror("RHS is void!"); emit0(flags & DO_POP ? F_ASSIGN_AND_POP:F_ASSIGN); break; } return flags & DO_POP ? 0 : 1; }