<commit_before><?php
/* This class is part of the XP framework's experiments
 *
 * $Id$
 */
 
  uses(
    'io.File',
    'io.FileUtil',
    'util.profiling.Timer',
    'net.xp_framework.tools.vm.Lexer',
    'net.xp_framework.tools.vm.Parser',
    'net.xp_framework.tools.vm.emit.Emitter'
  );
  
  define('PACKAGE_SEPARATOR', '.');
  define('DEFAULT_PACKAGE',   'main'.PACKAGE_SEPARATOR);
 
  /**
   * Emits PHP5 compatible sourcecode
   *
   * @purpose  Emitter
   */
  class Php5Emitter extends Emitter {
    public
      $bytes        = '',
      $context      = array(),
      $overloadable = array(
        '*' => 'times',
        '+' => 'plus',
        '-' => 'minus',
        '/' => 'divide',
        '~' => 'concat',
        '%' => 'modulo',
      );
    
    protected static 
      $builtin= array();
    
    static function __static() {
      foreach (get_declared_classes() as $name) {
        $r= new ReflectionClass($name);
        if ($r->isInternal()) {
          self::$builtin[$name]= array();
        }
      }
      self::$builtin['langObject']= array();
    }
      
    /**
     * Constructor
     *
     */
    public function __construct() {
      static $langImported= FALSE;
      
      $this->context['package']= DEFAULT_PACKAGE;
      $this->context['imports']= array();
      $this->context['uses']= array();
      $this->context['types']= array();
      $this->context['overloaded']= array();
      $this->context['default']= array();
      $this->context['operators']= array();
      $this->context['class']= $this->context['method']= '<main>';<commit_msg>- Fix "Interface ArrayAccess implemented by ArrayList does not exist"<commit_after><?php
/* This class is part of the XP framework's experiments
 *
 * $Id$
 */
 
  uses(
    'io.File',
    'io.FileUtil',
    'util.profiling.Timer',
    'net.xp_framework.tools.vm.Lexer',
    'net.xp_framework.tools.vm.Parser',
    'net.xp_framework.tools.vm.emit.Emitter'
  );
  
  define('PACKAGE_SEPARATOR', '.');
  define('DEFAULT_PACKAGE',   'main'.PACKAGE_SEPARATOR);
 
  /**
   * Emits PHP5 compatible sourcecode
   *
   * @purpose  Emitter
   */
  class Php5Emitter extends Emitter {
    public
      $bytes        = '',
      $context      = array(),
      $overloadable = array(
        '*' => 'times',
        '+' => 'plus',
        '-' => 'minus',
        '/' => 'divide',
        '~' => 'concat',
        '%' => 'modulo',
      );
    
    protected static 
      $builtin= array();
    
    static function __static() {
      foreach (array_merge(get_declared_classes(), get_declared_interfaces()) as $name) {
        $r= new ReflectionClass($name);
        if ($r->isInternal()) {
          self::$builtin[$name]= array();
        }
      }
      self::$builtin['langObject']= array();
    }
      
    /**
     * Constructor
     *
     */
    public function __construct() {
      static $langImported= FALSE;
      
      $this->context['package']= DEFAULT_PACKAGE;
      $this->context['imports']= array();
      $this->context['uses']= array();
      $this->context['types']= array();
      $this->context['overloaded']= array();
      $this->context['default']= array();
      $this->context['operators']= array();
      $this->context['class']= $this->context['method']= '<main>';
{'fraction_non_alphanumeric': 0.18753817959682345, 'fraction_numerical': 0.0012217470983506415, 'mean_word_length': 2.3418367346938775, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2020098', 'n_tokens_mistral': 1057, 'n_tokens_neox': 1051, 'n_words': 183}