2014-12-04
2014-12-04 19:27:12 by Per Hedbor <ph@opera.com>
-
fe4aae4e3c1546ed57b5246ac02fb55c440b55e1
(92 lines)
(+2/-90)
[
Show
| Annotate
]
Branch: bill/master_archive_support
Removed F_IDENTIFIER: It was never generated.
This lessens the confusion and code-duplication somewhat.
53:
{
case F_EXTERNAL:
case F_GET_SET:
- case F_IDENTIFIER:
+
case F_TRAMPOLINE:
case F_CONSTANT:
case F_LOCAL:
72:
{
case F_EXTERNAL:
case F_GET_SET:
- case F_IDENTIFIER:
+
case F_TRAMPOLINE:
case F_CONSTANT:
case F_LOCAL:
91:
{
case F_EXTERNAL:
case F_GET_SET:
- case F_IDENTIFIER:
+
case F_TRAMPOLINE:
case F_CONSTANT:
case F_LOCAL:
754: Inside #if defined(PIKE_DEBUG)
Pike_fatal("Attempt to create an F_CONSTANT-node with mknode()!\n");
case F_LOCAL:
Pike_fatal("Attempt to create an F_LOCAL-node with mknode()!\n");
- case F_IDENTIFIER:
- Pike_fatal("Attempt to create an F_IDENTIFIER-node with mknode()!\n");
+
case F_TRAMPOLINE:
Pike_fatal("Attempt to create an F_TRAMPOLINE-node with mknode()!\n");
case F_EXTERNAL:
1113:
node *debug_mkidentifiernode(int i)
{
- #if 1
+
node *res = mkexternalnode(Pike_compiler->new_program, i);
check_tree(res,0);
return res;
- #else
- node *res = mkemptynode();
- res->token = F_IDENTIFIER;
- copy_shared_string(res->type, ID_FROM_INT(Pike_compiler->new_program, i)->type);
-
- /* FIXME */
- if(IDENTIFIER_IS_CONSTANT(ID_FROM_INT(Pike_compiler->new_program, i)->identifier_flags))
- {
- res->node_info = OPT_EXTERNAL_DEPEND;
- }else{
- res->node_info = OPT_NOT_CONST;
+
}
- res->tree_info=res->node_info;
+
- #ifdef __CHECKER__
- _CDR(res) = 0;
- #endif
- res->u.id.number = i;
- #ifdef SHARED_NODES
- res->u.id.prog = Pike_compiler->new_program;
- #endif /* SHARED_NODES */
-
- check_tree(res,0);
- return res;
- #endif
- }
-
+
node *debug_mktrampolinenode(int i, struct compiler_frame *frame)
{
struct compiler_frame *f;
1459:
}
break;
- case F_IDENTIFIER:
- p=Pike_compiler->new_program;
- numid=n->u.id.number;
- break;
-
+
case F_LOCAL:
/* FIXME: Ought to have the name of the identifier in the message. */
yyerror("Expected constant, got local variable.");
1836:
return a->u.integer.a == b->u.integer.a &&
a->u.integer.b == b->u.integer.b;
- case F_IDENTIFIER:
- return a->u.id.number == b->u.id.number;
-
+
case F_CAST:
case F_SOFT_CAST:
return a->type == b->type && node_is_eq(CAR(a), CAR(b));
1982:
switch(n->token)
{
case F_LOCAL:
- case F_IDENTIFIER:
+
case F_TRAMPOLINE:
b=mknewintnode(0);
if(b->type) free_type(b->type);
2187:
fputc(')', stderr);
break;
- case F_IDENTIFIER:
- if(needlval) fputc('&', stderr);
- if (Pike_compiler->new_program) {
- fprintf(stderr, "id(%s)",ID_FROM_INT(Pike_compiler->new_program, foo->u.id.number)->name->str);
- } else {
- fputs("unknown identifier", stderr);
- }
- break;
-
+
case F_EXTERNAL:
case F_GET_SET:
if(needlval) fputc('&', stderr);
2608: Inside #if defined(PIKE_DEBUG)
n->u.integer.a, n->u.integer.b);
}
#endif /* PIKE_DEBUG */
- goto set_pointer;
-
- case F_IDENTIFIER:
- q = find_q(&(p->externals), n->u.id.number,
- Pike_compiler->new_program->id);
- if(n->u.id.number > MAX_GLOBAL)
- {
- p->err=1;
- return 0;
- }
- #ifdef PIKE_DEBUG
- if (l_flag > 2) {
- fprintf(stderr, "external %d:%d is ",
- Pike_compiler->new_program->id, n->u.id.number);
- }
- #endif /* PIKE_DEBUG */
-
+
set_pointer:
if(overwrite)
{
2752:
}
break;
- case F_IDENTIFIER:
- if(lvalue)
- {
- if(n->u.id.number >= MAX_VAR)
- {
- p->err=1;
- return;
- }
- #ifdef PIKE_DEBUG
- if (l_flag > 2) {
- fprintf(stderr, "external %d:%d is written\n",
- Pike_compiler->new_program->id, n->u.id.number);
- }
- #endif /* PIKE_DEBUG */
- *find_q(&(p->externals), n->u.id.number,
- Pike_compiler->new_program->id) = VAR_USED;
- }
- break;
-
+
case F_APPLY:
case F_AUTO_MAP:
if(n->tree_info & OPT_SIDE_EFFECT) {
3070: Inside #if 0 /* FIXME */
#if 0 /* FIXME */
case F_TRAMPOLINE:
#endif
- case F_IDENTIFIER:
- name = ID_FROM_INT(Pike_compiler->new_program, n->u.id.number)->name;
- break;
-
+
case F_ARROW:
case F_INDEX:
if(!CDR(n))