v8/test/inspector
franzih 6cf880f4b8 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-Commit-Position: refs/heads/master@{#43791}
Committed: 0332bebde9
Review-Url: https://codereview.chromium.org/2707873002
Cr-Commit-Position: refs/heads/master@{#43804}
2017-03-14 21:08:56 +00:00
..
console [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
cpu-profiler [inspector] do not translate offset to line/column for coverage. 2017-03-10 05:19:04 +00:00
debugger [debugger] correctly find inner function scope. 2017-03-14 16:35:19 +00:00
heap-profiler [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
runtime [inspector] added createContextGroup for tests 2017-03-07 22:30:05 +00:00
type-profile Collect type profile for DevTools 2017-03-14 21:08:56 +00:00
BUILD.gn Properly define v8_enable_inspector and its override in GN. 2016-11-21 19:29:38 +00:00
DEPS [inspector] introduce limit for amount of stored async stacks 2016-12-18 17:04:40 +00:00
inspector-impl.cc [inspector] added createContextGroup for tests 2017-03-07 22:30:05 +00:00
inspector-impl.h [inspector] added createContextGroup for tests 2017-03-07 22:30:05 +00:00
inspector-test.cc [inspector] added createContextGroup for tests 2017-03-07 22:30:05 +00:00
inspector.gyp Fix inspector test in components build 2016-10-18 20:08:12 +00:00
inspector.isolate [inspector] conditionally copy files for inspector test. 2016-10-24 10:57:37 +00:00
inspector.status [inspector] Enable debugger/pause-on-oom test with larger heap limit. 2017-03-02 17:49:15 +00:00
json-parse-expected.txt [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
json-parse.js [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
OWNERS [inspector] added inspector test runner [part 1] 2016-09-30 15:52:46 +00:00
protocol-test.js [debugger] correctly find inner function scope. 2017-03-14 16:35:19 +00:00
task-runner.cc [inspector] added createContextGroup for tests 2017-03-07 22:30:05 +00:00
task-runner.h [inspector] added createContextGroup for tests 2017-03-07 22:30:05 +00:00
testcfg.py [inspector] added master test for break locations 2017-02-27 20:20:39 +00:00