Branch: Tag:

2003-02-08

2003-02-08 03:49:23 by Martin Stjernholm <mast@lysator.liu.se>

Replaced MAKE_SHARED_CONSTANT_STRING with either MAKE_CONST_STRING or
REF_MAKE_CONST_STRING as appropriate.

Rev: src/builtin.cmod:1.115
Rev: src/interpret.h:1.126
Rev: src/iterators.cmod:1.34
Rev: src/language.yacc:1.315
Rev: src/las.c:1.324
Rev: src/opcodes.c:1.135
Rev: src/program.c:1.479
Rev: src/treeopt.in:1.73

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.478 2003/02/04 17:29:19 mast Exp $ + || $Id: program.c,v 1.479 2003/02/08 03:49:22 mast Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.478 2003/02/04 17:29:19 mast Exp $"); + RCSID("$Id: program.c,v 1.479 2003/02/08 03:49:22 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
2564:    debug_malloc_touch(Pike_compiler->fake_object);    debug_malloc_touch(Pike_compiler->fake_object->storage);    -  MAKE_CONSTANT_SHARED_STRING(s,"__INIT"); +  MAKE_CONST_STRING(s,"__INIT");          /* Collect references to inherited __INIT functions */
2607:    }    Pike_compiler->new_program->lfuns[LFUN___INIT]=e;    -  free_string(s); -  +     pop_compiler_frame(); /* Pop __INIT local variables */       if(Pike_compiler->num_parse_error > 0)
5092:    struct pike_string *res = low_get_program_line(prog, linep);    if (!res) {    struct pike_string *dash; -  MAKE_CONSTANT_SHARED_STRING(dash, "-"); +  REF_MAKE_CONST_STRING(dash, "-");    return dash;    }    return res;
5231:       if (prog == 0) {    struct pike_string *unknown_program; -  MAKE_CONSTANT_SHARED_STRING(unknown_program, "Unknown program"); +  REF_MAKE_CONST_STRING(unknown_program, "Unknown program");    linep[0] = 0;    return unknown_program;    }
5239:    res = low_get_line(pc, prog, linep);    if (!res) {    struct pike_string *not_found; -  MAKE_CONSTANT_SHARED_STRING(not_found, "Line not found"); +  REF_MAKE_CONST_STRING(not_found, "Line not found");    return not_found;    }    return res;
6298:    struct svalue id;    init_program_blocks();    -  MAKE_CONSTANT_SHARED_STRING(this_program_string,"this_program"); -  MAKE_CONSTANT_SHARED_STRING(this_string,"this"); -  MAKE_CONSTANT_SHARED_STRING(UNDEFINED_string,"UNDEFINED"); +  MAKE_CONST_STRING(this_program_string,"this_program"); +  MAKE_CONST_STRING(this_string,"this"); +  MAKE_CONST_STRING(UNDEFINED_string,"UNDEFINED");       lfun_ids = allocate_mapping(NUM_LFUNS);    lfun_types = allocate_mapping(NUM_LFUNS);
6363:   {    int e;    -  free_string(UNDEFINED_string); -  free_string(this_string); -  free_string(this_program_string); -  +     free_mapping(lfun_types);    free_mapping(lfun_ids);    for (e=0; e < NUM_LFUNS; e++) {
6734: Inside #if 1
   for(;level<Pike_compiler->compiler_frame->min_number_of_locals;level++)    {    free_string(Pike_compiler->compiler_frame->variable[level].name); -  MAKE_CONSTANT_SHARED_STRING(Pike_compiler->compiler_frame->variable[level].name,""); +  copy_shared_string(Pike_compiler->compiler_frame->variable[level].name, +  empty_pike_string);    }    }   #endif