2008-05-16
2008-05-16 18:20:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
865d659ae136c7a4c602b73e5d0ccaad73f2b72f
(19 lines)
(+9/-10)
[
Show
| Annotate
]
Branch: 7.9
{en,de}code_value() now know about location information for identifiers.
Moved the filename storage for identifiers to the string table.
encode_value() now knows about new-style getters and setters.
Unified the encoding of identifiers to reduce the amount of code duplication.
Bumped the version to Pike 7.7.47 since the dump format has changed.
Rev: src/encode.c:1.266
Rev: src/program.c:1.697
Rev: src/program.h:1.246
Rev: src/version.h:1.401
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: program.c,v 1.696 2008/05/16 13:28:08 grubba Exp $
+ || $Id: program.c,v 1.697 2008/05/16 18:20:07 grubba Exp $
*/
#include "global.h"
2734:
free_string(p->identifiers[e].name);
if(p->identifiers[e].type)
free_type(p->identifiers[e].type);
- if(p->identifiers[e].filename)
- free_string(p->identifiers[e].filename);
+
}
}
3008: Inside #if defined(PIKE_DEBUG)
ref->identifier_offset,
id->name->size_shift ? "(wide)" : id->name->str,
indent, "",
- id->filename?id->filename:"-", id->linenumber);
+ p->num_strings?p->strings[id->filename_strno]->str:"-", id->linenumber);
if (IDENTIFIER_IS_ALIAS(id->identifier_flags)) {
fprintf (stderr, "%*s Alias for %d:%d\n",
indent, "", id->func.ext_ref.depth, id->func.ext_ref.id);
3074: Inside #if defined(PIKE_DEBUG)
d, id->identifier_flags, id->func.offset,
id->run_time_type, id->name->str,
indent, "",
- id->filename?id->filename:"-", id->linenumber);
+ p->num_strings?p->strings[id->filename_strno]->str:"-", id->linenumber);
}
fprintf(stderr, "\n"
4652:
} else {
copy_pike_type(dummy.type, id->type);
}
- copy_shared_string(dummy.filename, c->lex.current_file);
+ dummy.filename_strno = store_prog_string(c->lex.current_file);
dummy.linenumber = c->lex.current_line;
dummy.identifier_flags = id->identifier_flags | IDENTIFIER_ALIAS;
dummy.run_time_type = id->run_time_type; /* Not actually used. */
4780:
copy_shared_string(dummy.name, name);
copy_pike_type(dummy.type, type);
- copy_shared_string(dummy.filename, c->lex.current_file);
+ dummy.filename_strno = store_prog_string(c->lex.current_file);
dummy.linenumber = c->lex.current_line;
dummy.identifier_flags = IDENTIFIER_VARIABLE;
dummy.run_time_type=run_time_type;
5193:
copy_shared_string(dummy.name, name);
dummy.identifier_flags = IDENTIFIER_CONSTANT;
- copy_shared_string(dummy.filename, cc->lex.current_file);
+ dummy.filename_strno = store_prog_string(cc->lex.current_file);
dummy.linenumber = cc->lex.current_line;
#if 1
5677:
copy_shared_string(fun.name, name);
copy_pike_type(fun.type, type);
- copy_shared_string(fun.filename, c->lex.current_file);
+ fun.filename_strno = store_prog_string(c->lex.current_file);
fun.linenumber = c->lex.current_line;
fun.run_time_type = run_time_type;
5741:
copy_shared_string(fun.name, name);
copy_pike_type(fun.type, type);
- copy_shared_string(fun.filename, c->lex.current_file);
+ fun.filename_strno = store_prog_string(c->lex.current_file);
fun.linenumber = c->lex.current_line;
fun.identifier_flags=function_flags;