v8/test/unittests/interpreter
franzih 5c32287390 Collect type profile for DevTools
Collect type information for JavaScript variables and display it
in Chrome DevTools.
Design Doc: https://docs.google.com/a/google.com/document/d/1O1uepXZXBI6IwiawTrYC3ohhiNgzkyTdjn3R8ysbYgk/edit?usp=sharing

When debugging JavaScript, it’s helpful to know the type of
a variable, parameter, and return values. JavaScript is
dynamically typed, and for complex
source code it’s often hard to infer types. With type profiling, we
can provide type information to JavaScript developers.

This CL is a proof of concept. It collects type profile for
assignments and simply prints the types to stdout.

The output looks something like this:

#my_var1
  #Object
  #number
  #string
  #number
  #undefined
  #string
  #Object
  #Object

We use an extra slot in the feedback vector of assignments to
carry the list of types for that assignment. The extra slot is
only added when the flag --type-profile is given.

Missing work:
* Collect data for parameters and return values (currently only assignments).
* Remove duplicates from the list of collected types and use a common base class.
* Add line numbers or source position instead of the variable name.

BUG=v8:5935

Review-Url: https://codereview.chromium.org/2707873002
Cr-Original-Original-Commit-Position: refs/heads/master@{#43791}
Committed: 0332bebde9
Review-Url: https://codereview.chromium.org/2707873002
Cr-Original-Commit-Position: refs/heads/master@{#43804}
Committed: 6cf880f4b8
Review-Url: https://codereview.chromium.org/2707873002
Cr-Commit-Position: refs/heads/master@{#43846}
2017-03-16 08:42:40 +00:00
..
bytecode-array-builder-unittest.cc Collect type profile for DevTools 2017-03-16 08:42:40 +00:00
bytecode-array-iterator-unittest.cc [ignition] Remove handles from bytecode generation 2017-02-10 17:52:39 +00:00
bytecode-array-random-iterator-unittest.cc [ignition] Remove handles from bytecode generation 2017-02-10 17:52:39 +00:00
bytecode-array-writer-unittest.cc [ignition] Remove handles from bytecode generation 2017-02-10 17:52:39 +00:00
bytecode-dead-code-optimizer-unittest.cc [Interpreter] Optimize the Register Optimizer. 2016-10-24 20:47:53 +00:00
bytecode-decoder-unittest.cc [interpreter] Teach --print-bytecode the names of runtime functions and intrinsics. 2017-02-23 14:25:45 +00:00
bytecode-operands-unittest.cc [Interpreter] Templatize AccumulatorUsage and OperandType for bytecode creation. 2016-12-15 07:56:21 +00:00
bytecode-peephole-optimizer-unittest.cc [Interpreter] Templatize AccumulatorUsage and OperandType for bytecode creation. 2016-12-15 07:56:21 +00:00
bytecode-pipeline-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] Templatize AccumulatorUsage and OperandType for bytecode creation. 2016-12-15 07:56:21 +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 [iwyu] Pre-work for removing unallowed include macro-assembler.h -> assembler-inl.h 2017-02-23 12:10:21 +00:00
interpreter-assembler-unittest.h [turbofan] Remove virtual methods from CodeAssembler. 2016-12-28 15:47:34 +00:00