v8/test/unittests/interpreter
rmcilroy e5ac75c635 [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter.
This CL optimizes the code in BytecodeArrayBuilder and
BytecodeArrayWriter by making the following main changes:

 - Move operand scale calculation out of BytecodeArrayWriter to the
BytecodeNode constructor, where the decision on which operands are
scalable can generally be statically decided by the compiler.
 - Move the maximum register calculation out of BytecodeArrayWriter
and into BytecodeRegisterOptimizer (which is the only place outside
BytecodeGenerator which updates which registers are used). This
avoids the BytecodeArrayWriter needing to know the operand types
of a node as it writes it.
 - Modify EmitBytecodes to use individual push_backs rather than
building a buffer and calling insert, since this turns out to be faster.
 - Initialize BytecodeArrayWriter's bytecode vector by reserving 512
bytes,
 - Make common functions in Bytecodes constexpr so that they
can be statically calculated by the compiler.
 - Move common functions and constructors in Bytecodes and
BytecodeNode to the header so that they can be inlined.
 - Change large static switch statements in Bytecodes to const array
lookups, and move to the header to allow inlining.

I also took the opportunity to remove a number of unused helper
functions, and rework some others for consistency.

This reduces the percentage of time spent in making BytecodeArrays
 in  CodeLoad from ~15% to ~11% according to perf. The
CoadLoad score increase by around 2%.

BUG=v8:4280

Committed: https://crrev.com/b11a8b4d41bf09d6b3d6cf214fe3fb61faf01a64
Review-Url: https://codereview.chromium.org/2351763002
Cr-Original-Commit-Position: refs/heads/master@{#39599}
Cr-Commit-Position: refs/heads/master@{#39637}
2016-09-22 16:34:31 +00:00
..
bytecode-array-builder-unittest.cc [interpreter] Add fast path for dynamic global lookups 2016-09-20 10:31:52 +00:00
bytecode-array-iterator-unittest.cc [Interpreter] Avoid accessing Isolate from during bytecode generation. 2016-08-18 13:42:22 +00:00
bytecode-array-writer-unittest.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-22 16:34:31 +00:00
bytecode-dead-code-optimizer-unittest.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-22 16:34:31 +00:00
bytecode-decoder-unittest.cc [interpreter] Add register output to ObjectLiteral 2016-08-09 10:30:29 +00:00
bytecode-peephole-optimizer-unittest.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-22 16:34:31 +00:00
bytecode-pipeline-unittest.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-22 16:34:31 +00:00
bytecode-register-allocator-unittest.cc [interpreter] Add support for scalable operands. 2016-03-21 17:09:49 +00:00
bytecode-register-optimizer-unittest.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-22 16:34:31 +00:00
bytecode-utils.h [interpreter] Introduce bytecode generation pipeline. 2016-05-12 19:20:04 +00:00
bytecodes-unittest.cc [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. 2016-09-22 16:34:31 +00:00
constant-array-builder-unittest.cc [Interpreter] Avoid accessing Isolate from during bytecode generation. 2016-08-18 13:42:22 +00:00
interpreter-assembler-unittest.cc [Interpreter] Add an unsigned immediate operand type 2016-09-13 14:49:10 +00:00
interpreter-assembler-unittest.h [compiler] Remove compiler internals from CodeAssembler. 2016-08-12 12:57:48 +00:00