<commit_before>var assert = require("assert");
var getChildCache = require("private").makeAccessor();
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var toString = Op.toString;
var arrayToString = toString.call([]);
var Ap = Array.prototype;
var slice = Ap.slice;
var map = Ap.map;

function Path(value, parentPath, name) {
    assert.ok(this instanceof Path);

    if (parentPath) {
        assert.ok(parentPath instanceof Path);
    } else {
        parentPath = null;
        name = null;
    }

    Object.defineProperties(this, {
        // The value encapsulated by this Path, generally equal to
        // parentPath.value[name] if we have a parentPath.
        value: { value: value },

        // The immediate parent Path of this Path.
        parentPath: { value: parentPath },

        // The name of the property of parentPath.value through which this
        // Path's value was reached.
        name: {
            value: name,
            configurable: true
        }
    });
}

var Pp = Path.prototype;

function getChildPath(path, name) {
    var cache = getChildCache(path);
    return hasOwn.call(cache, name)
        ? cache[name]<commit_msg>Stop using Object.defineProperties in the Path constructor.<commit_after>var assert = require("assert");
var getChildCache = require("private").makeAccessor();
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var toString = Op.toString;
var arrayToString = toString.call([]);
var Ap = Array.prototype;
var slice = Ap.slice;
var map = Ap.map;

function Path(value, parentPath, name) {
    assert.ok(this instanceof Path);

    if (parentPath) {
        assert.ok(parentPath instanceof Path);
    } else {
        parentPath = null;
        name = null;
    }

    // The value encapsulated by this Path, generally equal to
    // parentPath.value[name] if we have a parentPath.
    this.value = value;

    // The immediate parent Path of this Path.
    this.parentPath = parentPath;

    // The name of the property of parentPath.value through which this
    // Path's value was reached.
    this.name = name;
}

var Pp = Path.prototype;

function getChildPath(path, name) {
    var cache = getChildCache(path);
    return hasOwn.call(cache, name)
        ? cache[name]
{'fraction_non_alphanumeric': 0.10736468500443656, 'fraction_numerical': 0.0, 'mean_word_length': 2.7962962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4755020', 'n_tokens_mistral': 644, 'n_tokens_neox': 635, 'n_words': 209}