• bmeurer's avatar
    [turbofan] Constant-fold certain JSOrdinaryHasInstance nodes. · c9c7dd0d
    bmeurer authored
    Move JSOrdinaryHasInstance lowering to JSNativeContextSpecialization,
    which was previously mostly done in JSTypedLowering (for no reason).
    Add new logic to the lowering to constant-fold OrdinaryHasInstance
    checks when the map of the left-hand side and the "prototype" of the
    right-hand side is known. This address the performance issue with the
    (base) class constructors generated by Babel, i.e.:
    
      function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
          throw new TypeError("Cannot call a class as a function");
        }
      }
    
      var C = function C() { _classCallCheck(this, C); };
    
    for
    
      class C {}
    
    Also ensure that a known constructor being used inside an instanceof
    get's a proper initial map on-demand.
    
    BUG=v8:6275
    R=mstarzinger@chromium.org
    
    Review-Url: https://codereview.chromium.org/2827013002
    Cr-Commit-Position: refs/heads/master@{#44727}
    c9c7dd0d
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...