Branch: Tag:

2014-12-04

2014-12-04 19:24:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Installation: Fixed dumping of classes inheriting C classes.

Also fixes master()->Encoder::nameof() for module classes.

Fixes dumping of eg 7.8::Stdio.File.

1063:    pop_stack();    if( (p->flags & PROGRAM_HAS_C_METHODS) || p->event_handler )    { +  int has_local_c_methods = 0; +  for (d = 0; d < p->num_identifiers; d++) { +  if (IDENTIFIER_IS_C_FUNCTION(p->identifiers[d].identifier_flags)) { +  has_local_c_methods = 1; +  break; +  } +  } +  if (has_local_c_methods) {    if(p->parent)    {    /* We have to remove ourselves from the cache for now */    struct svalue tmp = entry_id; -  +  EDB(1, fprintf(stderr, +  "%*sencode: encoding C program via parent.\n", +  data->depth, ""));    map_delete(data->encoded, val);       code_entry(TAG_PROGRAM, 2, data);
1092: Inside #if 0
  #if 0    Pike_error("Cannot encode C programs.\n");   #endif +  } else { +  EDB(1, fprintf(stderr, +  "%*sencode: encoding program overloading a C program.\n", +  data->depth, ""));    } -  +  }      #ifdef OLD_PIKE_ENCODE_PROGRAM   
1888:    struct svalue str_sval;    SET_SVAL(str_sval, T_STRING, 0, string, NULL);    +  EDB(2, +  fprintf(stderr, "%*sencode: encoding constants\n", +  data->depth, "")); +     /* constants */    for(d=0;d<p->num_constants;d++)    { -  +  EDB(5, +  fprintf(stderr, "%*sencode: encoding constant #%d\n", +  data->depth, "", d)); +    #ifdef PIKE_PORTABLE_BYTECODE    if (((TYPEOF(p->constants[d].sval) == T_FUNCTION) &&    (SUBTYPEOF(p->constants[d].sval) == FUNCTION_BUILTIN)) ||