v8/test/unittests/interpreter
Benedikt Meurer 79ac69b83c [es2015] Introduce dedicated GetTemplateObject bytecode.
Tagged templates were previously desugared during parsing using some
combination of runtime support written in JavaScript and C++, which
prevented some optimizations from happening, namely the constant folding
of the template object in TurboFan optimized code. This CL adds a new
bytecode GetTemplateObject (with a corresponding GetTemplateObject AST
node), which represents the abstract operation in the ES6 specification
and allows TurboFan to simply constant-fold template objects at compile
time (which is explicitly supported by the specification).

This also pays down some technical debt by removing the template.js
runtime support and therefore should reduce the size of the native
context (snapshot) a bit.

With this change in-place the ES6 version microbenchmark in the
referenced tracking bug is now faster than the transpiled Babel
code, it goes from

  templateStringTagES5: 4552 ms.
  templateStringTagES6: 14185 ms.
  templateStringTagBabel: 7626 ms.

to

  templateStringTagES5: 4515 ms.
  templateStringTagES6: 7491 ms.
  templateStringTagBabel: 7639 ms.

which corresponds to a solid 45% reduction in execution time. With some
further optimizations the ES6 version should be able to outperform the
ES5 version. This micro-benchmark should be fairly representative of the
six-speed-templatestringtag-es6 benchmark, and as such that benchmark
should also improve by around 50%.

Bug: v8:6819,v8:6820
Tbr: mlippautz@chromium.org
Change-Id: I821085e3794717fc7f52b5c306fcb93ba03345dc
Reviewed-on: https://chromium-review.googlesource.com/677462
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48126}
2017-09-22 19:52:30 +00:00
..
bytecode-array-builder-unittest.cc [es2015] Introduce dedicated GetTemplateObject bytecode. 2017-09-22 19:52:30 +00:00
bytecode-array-iterator-unittest.cc [turbofan] Optimize fast enum cache driven for..in. 2017-09-01 11:27:37 +00:00
bytecode-array-random-iterator-unittest.cc [turbofan] Optimize fast enum cache driven for..in. 2017-09-01 11:27:37 +00:00
bytecode-array-writer-unittest.cc [turbofan] Optimize fast enum cache driven for..in. 2017-09-01 11:27:37 +00:00
bytecode-decoder-unittest.cc [interpreter] printing: output the native context index as string 2017-09-05 12:57:09 +00:00
bytecode-node-unittest.cc Revert "[ignition] Merge bytecode array builder and writer" 2017-06-27 09:10:18 +00:00
bytecode-operands-unittest.cc [Interpreter] Templatize AccumulatorUsage and OperandType for bytecode creation. 2016-12-15 07:56:21 +00:00
bytecode-register-allocator-unittest.cc include fixing: api.h shouldn't include objects-inl.h 2017-01-09 13:43:28 +00:00
bytecode-register-optimizer-unittest.cc [Interpreter] Remove BytecodePipeline. 2017-04-12 15:18:50 +00:00
bytecode-source-info-unittest.cc [Interpreter] Remove BytecodePipeline. 2017-04-12 15:18:50 +00:00
bytecode-utils.h [interpreter] Introduce bytecode generation pipeline. 2016-05-12 19:20:04 +00:00
bytecodes-unittest.cc [ignition] Optimize jump checks to range checks 2016-12-05 18:26:26 +00:00
constant-array-builder-unittest.cc [ignition] Remove handles from bytecode generation 2017-02-10 17:52:39 +00:00
interpreter-assembler-unittest.cc [csa] Add constant folding more universally to CodeAssembler operators 2017-09-12 10:03:10 +00:00
interpreter-assembler-unittest.h [turbofan] Remove virtual methods from CodeAssembler. 2016-12-28 15:47:34 +00:00