<commit_before>window.addEventListener( 'load', function __window_onload( event ) {
"use strict";

var out = ( text )=>( document.body.appendChild( document.createElement( 'pre' ) ).innerText = text );
out.json = ( value, space )=>( out( JSON.stringify( value, undefined, space ) ) );

var HidingClass = ( function __module() {
    var scopes = new Map();
    var initializing = false;

    class Scope {
        constructor() {
            this.scope = this;
        }
        get( instance ) {
            return {
                priv: this.priv.get( instance ),
                prot: this.prot.get( instance ),
            }
        };
    }

    class HidingClass {
        constructor( scope, clazz ) {
            // optional argument 'scope'
            if ( clazz === undefined ) {
                // create package scope
                if ( scope === null ) {
                    scope = new Scope();
                    scope.priv = new WeakMap();
                    scope.prot = new WeakMap();
                    return scope;
                }
                clazz = scope;
                scope = undefined;
            }
            // reuse package scope
            if ( scope instanceof Scope ) {
                let newScope = new Scope()
                newScope.priv = scope.priv;
                scope = newScope;
            } else {
                scope = new Scope();
                scope.priv = new WeakMap();
            }
            scope.prot = (()=>{
                var base = clazz;
                for (;;) {
                    let tmp = Object.getPrototypeOf( base );
                    if ( tmp === Function.prototype ) {
                        break;
                    }
                    base = tmp;
                }
                var baseScope = scopes.get( base );
                if ( baseScope === undefined ) {
                    baseScope = { priv: null, prot: new WeakMap() };
                    if ( clazz !== base ) {
                        scopes.set( base, baseScope );
                    }
                }
                return baseScope.prot;
            })();
            var className = clazz.prototype.constructor.name;
            scopes.set( clazz, scope );
            scope.clazz = scope[ className ] = eval([
                '( class ' + className + ' extends clazz {',
                '    constructor() {',
                '        if  ( !initializing ) {',
                '            initializing = true;',
                '            super( ...arguments );',
                '            scope.priv.set( this, {} );',
                '            scope.prot.set( this, {} );',
                '            this.__init__( ...arguments );',
                '            initializing = false;',
                '        } else {',
                '            super( ...arguments );',
                '            scope.priv.set( this, {} );',
                '            scope.prot.set( this, {} );',
                '        }',
                '    }',
                '})',
                ].join( '\n' ) );
            return scope;
        }
    }

    return HidingClass;
})();
<commit_msg>[IMP] Use name of baseclass in evaled constructor.<commit_after>window.addEventListener( 'load', function __window_onload( event ) {
"use strict";

var out = ( text )=>( document.body.appendChild( document.createElement( 'pre' ) ).innerText = text );
out.json = ( value, space )=>( out( JSON.stringify( value, undefined, space ) ) );

var HidingClass = ( function __module() {
    var scopes = new Map();
    var initializing = false;

    class Scope {
        constructor() {
            this.scope = this;
        }
        get( instance ) {
            return {
                priv: this.priv.get( instance ),
                prot: this.prot.get( instance ),
            }
        };
    }

    class HidingClass {
        constructor( scope, clazz ) {
            // optional argument 'scope'
            if ( clazz === undefined ) {
                // create package scope
                if ( scope === null ) {
                    scope = new Scope();
                    scope.priv = new WeakMap();
                    scope.prot = new WeakMap();
                    return scope;
                }
                clazz = scope;
                scope = undefined;
            }
            // reuse package scope
            if ( scope instanceof Scope ) {
                let newScope = new Scope()
                newScope.priv = scope.priv;
                scope = newScope;
            } else {
                scope = new Scope();
                scope.priv = new WeakMap();
            }
            scope.prot = (()=>{
                var rootClass = clazz;
                for (;;) {
                    let tmp = Object.getPrototypeOf( rootClass );
                    if ( tmp === Function.prototype ) {
                        break;
                    }
                    rootClass = tmp;
                }
                var rootScope = scopes.get( rootClass );
                if ( rootScope === undefined ) {
                    rootScope = new Scope();
                    rootScope.priv = null;
                    rootScope.prot = new WeakMap();
                    if ( clazz !== rootClass ) {
                        scopes.set( rootClass, rootScope );
                    }
                }
                return rootScope.prot;
            })();
            scopes.set( clazz, scope );
            var className = clazz.prototype.constructor.name;
            var baseClassName = Object.getPrototypeOf( clazz ).name;
            scope.clazz = scope[ className ] = eval([
                '( ' + baseClassName + ' )=>{',
                'return class ' + className + ' extends ' + baseClassName + ' {',
                '    constructor() {',
                '        if  ( !initializing ) {',
                '            initializing = true;',
                '            super( ...arguments );',
                '            scope.priv.set( this, {} );',
                '            scope.prot.set( this, {} );',
                '            this.__init__( ...arguments );',
                '            initializing = false;',
                '        } else {',
                '            super( ...arguments );',
                '            scope.priv.set( this, {} );',
                '            scope.prot.set( this, {} );',
                '        }',
                '    }',
                '}}',
                ].join( '\n' ) )( clazz );
            return scope;
        }
    }

    return HidingClass;
})();

{'fraction_non_alphanumeric': 0.12099804599428829, 'fraction_numerical': 0.0, 'mean_word_length': 0.986268656716418, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '4223544', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1556, 'n_words': 377}