v8/test/unittests
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
..
api Don't mark remote contexts as callable or constructible. 2017-02-24 16:08:11 +00:00
base Fix CHECK_OP implementation in Release builds 2017-01-20 15:28:54 +00:00
compiler [turbofan] Enable complex memory operands for binops on ia32/x64 2017-03-13 08:50:54 +00:00
compiler-dispatcher Disable other background modules while testing the CompilerDispatcher 2017-03-14 14:01:03 +00:00
heap [heap] Add atomics to mark bit operations. 2017-03-08 16:31:18 +00:00
interpreter Collect type profile for DevTools 2017-03-14 21:08:56 +00:00
libplatform Make idle tasks optional in the default platform. 2017-03-07 13:37:41 +00:00
wasm [iwyu, wasm] Remove unallowed includes to objects-inl.h from wasm. 2017-02-13 15:05:37 +00:00
zone Ensure we align zone memory at 8 byte boundaries on all platforms 2017-02-06 11:14:56 +00:00
BUILD.gn Always early return from HandleApiCallHelper on access check failure. 2017-02-20 10:07:05 +00:00
cancelable-tasks-unittest.cc Implement async AbortAll for the compiler dispatcher 2017-01-04 13:45:56 +00:00
char-predicates-unittest.cc [unibrow] remove mongolian vowel separator as white space. 2017-02-28 13:42:29 +00:00
counters-unittest.cc [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters 2016-11-24 10:05:37 +00:00
DEPS Move unit tests to test/unittests. 2014-10-01 08:34:25 +00:00
eh-frame-iterator-unittest.cc [turbofan] Fix more -Wsign-compare warnings. 2016-11-11 12:01:08 +00:00
eh-frame-writer-unittest.cc [turbofan] Fix more -Wsign-compare warnings. 2016-11-11 12:01:08 +00:00
locked-queue-unittest.cc Add lock-based unbounded queue 2015-11-18 10:54:13 +00:00
object-unittest.cc Add unittests to keep InstanceType lists in sync 2016-12-19 12:50:30 +00:00
register-configuration-unittest.cc [Turbofan] Add concept of FP register aliasing on ARM 32. 2016-10-26 16:04:33 +00:00
run-all-unittests.cc Make idle tasks optional in the default platform. 2017-03-07 13:37:41 +00:00
source-position-table-unittest.cc This CL enables precise source positions for all V8 compilers. It merges compiler::SourcePosition and internal::SourcePosition to a single class used throughout the codebase. The new internal::SourcePosition instances store an id identifying an inlined function in addition to a script offset. 2016-11-14 17:22:32 +00:00
test-utils.cc Disable other background modules while testing the CompilerDispatcher 2017-03-14 14:01:03 +00:00
test-utils.h Disable other background modules while testing the CompilerDispatcher 2017-03-14 14:01:03 +00:00
unicode-unittest.cc Fix out-of-range access in unibrow::Utf8::CalculateValue. 2016-11-22 09:27:59 +00:00
unittests.gyp Allow C++11 in unittests. 2017-03-10 06:35:51 +00:00
unittests.isolate Reland [swarming] Isolate v8 testing. 2015-10-05 09:48:42 +00:00
unittests.status [tests] Skip RuntimeCallStatsTest due to flaky timers 2016-11-28 10:51:20 +00:00
value-serializer-unittest.cc Fix unused lambda captures for big endian targets. 2017-03-01 12:16:09 +00:00