Branch: Tag:

1998-11-22

1998-11-22 11:08:52 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

New module: Perl

Rev: src/ChangeLog:1.157
Rev: src/README:1.8
Rev: src/acconfig.h:1.35
Rev: src/array.c:1.42
Rev: src/array.h:1.14
Rev: src/backend.c:1.40
Rev: src/builtin_functions.c:1.140
Rev: src/callback.c:1.15
Rev: src/compilation.h:1.13
Rev: src/configure.in:1.254
Rev: src/cpp.c:1.30
Rev: src/docode.c:1.42
Rev: src/dynamic_buffer.c:1.9
Rev: src/encode.c:1.26
Rev: src/error.c:1.22
Rev: src/error.h:1.25
Rev: src/fd_control.c:1.22
Rev: src/fdlib.h:1.21
Rev: src/gc.c:1.39
Rev: src/gc.h:1.20
Rev: src/global.h:1.26
Rev: src/hashtable.c:1.5
Rev: src/interpret.c:1.111
Rev: src/interpret.h:1.24
Rev: src/language.yacc:1.108
Rev: src/las.c:1.71
Rev: src/las.h:1.17
Rev: src/lex.c:1.58
Rev: src/lex.h:1.12
Rev: src/main.c:1.60
Rev: src/mapping.c:1.37
Rev: src/modules/Odbc/odbc.c:1.12
Rev: src/modules/Perl/.cvsignore:1.1
Rev: src/modules/Perl/Makefile.in:1.1
Rev: src/modules/Perl/configure.in:1.1
Rev: src/modules/Perl/perlmod.c:1.1
Rev: src/modules/Perl/testsuite.in:1.1
Rev: src/modules/Postgres/postgres.c:1.10
Rev: src/modules/Regexp/pike_regexp.c:1.13
Rev: src/modules/call_out/call_out.c:1.23
Rev: src/modules/files/file.c:1.128
Rev: src/modules/files/socket.c:1.40
Rev: src/modules/spider/spider.c:1.76
Rev: src/modules/sprintf/sprintf.c:1.31
Rev: src/multiset.c:1.12
Rev: src/object.c:1.53
Rev: src/opcodes.c:1.32
Rev: src/operators.c:1.44
Rev: src/peep.c:1.25
Rev: src/pike_memory.c:1.28
Rev: src/pike_types.c:1.49
Rev: src/pike_types.h:1.16
Rev: src/port.c:1.18
Rev: src/port.h:1.20
Rev: src/program.c:1.105
Rev: src/program.h:1.46
Rev: src/signal_handler.c:1.89
Rev: src/stralloc.c:1.50
Rev: src/stralloc.h:1.26
Rev: src/svalue.c:1.39
Rev: src/svalue.h:1.19
Rev: src/threads.c:1.85
Rev: src/threads.h:1.60

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: las.c,v 1.70 1998/11/17 23:16:39 hubbe Exp $"); + RCSID("$Id: las.c,v 1.71 1998/11/22 11:02:56 hubbe Exp $");      #include "language.h"   #include "interpret.h"
74:    }   }    - #ifdef DEBUG + #ifdef PIKE_DEBUG   void check_tree(node *n, int depth)   {    if(!d_flag) return;
210:    struct node_chunk *tmp2;    int e=0;    - #ifndef DEBUG + #ifndef PIKE_DEBUG    if(cumulative_parse_error)    {   #endif
231:    if(!tmp)    {    tmp=tmp2->nodes+e; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(!cumulative_parse_error)    {    fprintf(stderr,"Free node at %p, (%s:%d) (token=%d).\n",tmp, tmp->current_file->str, tmp->line_number, tmp->token);
251:    }    }    } - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(!cumulative_parse_error)    fatal("Failed to free %d nodes when compiling!\n",e2);   #endif    } - #ifndef DEBUG + #ifndef PIKE_DEBUG    }   #endif    while(node_chunks)
273:   void free_node(node *n)   {    if(!n) return; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(l_flag>9)    print_tree(n);   #endif
294:    }    n->token=USHRT_MAX;    if(n->type) free_string(n->type); - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(n->current_file) free_string(n->current_file);   #endif    CAR(n)=free_nodes;
322:    free_nodes=CAR(res);    res->token=0;    res->line_number=lex.current_line; - #ifdef DEBUG + #ifdef PIKE_DEBUG    copy_shared_string(res->current_file, lex.current_file);   #endif    res->type=0;
335:   node *mknode(short token,node *a,node *b)   {    node *res; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a && a==b)    fatal("mknode: a and be are the same!\n");   #endif
414:    res->type = 0;       - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(d_flag > 3)    verify_shared_strings_tables();   #endif
426:    check_tree(res,0);    }    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(d_flag > 3)    verify_shared_strings_tables();   #endif
1427:    return depend_p2(a,b);   }    - #ifdef DEBUG + #ifdef PIKE_DEBUG   static int depend_p(node *a,node *b)   {    int ret;
1785:    fix_type_field(n);    debug_malloc_touch(n->type);    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(l_flag > 3 && n)    {    fprintf(stderr,"Optimizing (tree info=%x):",n->tree_info);
2159:    if(tmp1) tmp1->parent = n->parent;    free_node(n);    n=tmp1; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(l_flag > 3)    {    fprintf(stderr,"Result: ");
2198:    struct svalue *save_sp = sp;    int ret;    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(l_flag > 3 && n)    {    fprintf(stderr,"Evaluating (tree info=%x):",n->tree_info);
2410:       check_tree(n,0);    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 1)    fprintf(stderr,"Doing function '%s' at %x\n",name->str,PC);   #endif
2426:    if(compiler_pass==1)    {    tmp.offset=-1; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 4)    {    fprintf(stderr,"Making prototype (pass 1) for: ");
2447:    IDENTIFIER_C_FUNCTION | vargs,    &tmp);    free_node(n); - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 1)    fprintf(stderr,"Identifer (C) = %d\n",ret);   #endif
2459:    add_to_program(compiler_frame->max_number_of_locals);    add_to_program(args);    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 2)    {    fprintf(stderr,"Coding: ");
2483:    &tmp);       - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 1)    fprintf(stderr,"Identifer = %d\n",ret);   #endif