Version: 0.0.1-pre0.0.10.0.20.0.30.0.40.0.50.0.60.0.70.0.80.0.100.0.110.0.120.0.140.0.150.0.160.0.180.0.190.1.00.1.10.1.20.1.30.1.40.1.50.1.60.1.70.1.80.1.90.1.100.1.110.1.120.1.130.2.00.2.10.2.30.3.00.3.10.3.20.3.30.3.40.3.50.3.60.3.70.3.80.4.00.4.10.4.20.4.30.4.40.4.50.4.60.4.70.4.80.4.90.4.100.4.110.4.120.4.130.4.140.4.150.4.160.5.00.5.10.5.20.5.30.5.40.5.50.5.60.5.70.6.00.6.10.6.20.6.30.6.40.6.50.6.60.6.70.6.80.6.90.6.100.6.110.7.00.7.10.7.20.7.30.7.40.7.50.8.00.8.10.8.20.8.30.8.40.9.00.9.10.9.20.10.00.11.00.11.10.11.20.11.30.11.40.11.50.11.60.11.70.11.80.11.90.11.100.11.110.11.120.11.130.11.140.11.150.11.160.11.170.11.180.11.190.11.200.11.210.11.220.11.230.11.240.12.00.12.10.12.20.12.30.13.00.13.10.13.20.13.30.13.40.13.50.13.60.13.70.14.00.14.10.14.20.15.00.15.10.16.00.16.10.16.20.16.30.16.40.17.00.17.10.17.20.17.30.18.00.18.10.19.00.19.10.20.00.20.10.20.20.20.30.20.40.20.50.20.60.20.70.20.80.20.90.20.100.20.110.20.120.21.00.22.00.22.10.22.2
"use strict";
let fastProto = null;
// Creates an object with permanently fast properties in V8. See Toon Verwaest's
// post https://medium.com/@tverwaes/setting-up-prototypes-in-v8-ec9c9491dfe2#5f62
// for more details. Use %HasFastProperties(object) and the Node flag
// --allow-natives-syntax to check whether an object has fast properties.
function FastObject() {
// A prototype object will have "fast properties" enabled once it is checked
// against the inline property cache of a function, e.g. fastProto.property:
// https://github.com/v8/v8/blob/6.0.122/test/mjsunit/fast-prototype.js#L48-L63
if (fastProto !== null && typeof fastProto.property) {
const result = fastProto;
fastProto = FastObject.prototype = null;
return result;
}
fastProto = FastObject.prototype = Object.create(null);
return new FastObject;
// Initialize the inline property cache of FastObject.
FastObject();
module.exports = FastObject;