Branch: Tag:

2013-08-20

2013-08-20 14:29:08 by Per Hedbor <ph@opera.com>

Added an optional second argument to Program.defined().

When passed it will give you the filename and line number a specific identifier
in a program is defined on.

This is very useful for profiling output, as an example.

4:   constant inherit_list = __builtin.inherit_list;   constant inherits = __builtin.program_inherits;   constant implements = __builtin.program_implements; - constant defined = __builtin.program_defined; +     -  + // documented in the C-code. + string defined(program x,string|void y) + { +  if( !y ) +  return __builtin.program_defined(x); +  return __builtin.program_identifier_defined(x,y); + } +  +    //! @fixme   //! Document this function.   array(program) all_inherits(program p)