pike.git / src / las.c

version» Context lines:

pike.git/src/las.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: las.c,v 1.42 1998/01/19 18:38:46 hubbe Exp $"); + RCSID("$Id: las.c,v 1.43 1998/01/25 08:25:08 hubbe Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:117:       case F_PUSH_ARRAY:    return -1;       default:    if(n->type == void_type_string) return 0;    return 1;    }   }    + struct pike_string *find_return_type(node *n) + { +  struct pike_string *a,*b;    -  +  if(!n) return 0; +  if(!(n->tree_info & OPT_RETURN)) return 0; +  if(car_is_node(n)) +  a=find_return_type(CAR(n)); +  else +  a=0; +  +  if(cdr_is_node(n)) +  b=find_return_type(CDR(n)); +  else +  b=0; +  +  if(a) +  { +  if(b && a!=b) return mixed_type_string; +  return a; +  } +  return b; + } +  +    #define NODES 256      struct node_chunk   {    struct node_chunk *next;    node nodes[NODES];   };      static struct node_chunk *node_chunks=0;   static node *free_nodes=0;
pike.git/src/las.c:528:    {    push_svalue(PROG_FROM_INT(new_program, numid)->constants +    i->func.offset);    }else{    yyerror("Identifier is not a constant");    push_int(0);    }    }   }    + void resolv_program(node *n) + { +  resolv_constant(n); +  switch(sp[-1].type) +  { +  case T_OBJECT: +  if(!sp[-1].u.object->prog) +  { +  pop_stack(); +  push_int(0); +  }else{ +  f_object_program(1); +  } +  break; +  +  case T_FUNCTION: +  if(program_from_function(sp-1)) +  break; +  +  default: +  yyerror("Illegal program identifier"); +  pop_stack(); +  push_int(0); +  +  case T_PROGRAM: +  break; +  } + } +  +  +    node *index_node(node *n, struct pike_string * id)   {    node *ret;    JMP_BUF tmp;    if(SETJMP(tmp))    {    ONERROR tmp;    SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!");    assign_svalue_no_free(sp++, & throw_value);    APPLY_MASTER("handle_error", 1);