v8/test
tebbi c3a6ca68d0 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.
SourcePosition::InliningId() refers to a the new table DeoptimizationInputData::InliningPositions(), which provides the following data for every inlining id:
 - The inlined SharedFunctionInfo as an offset into DeoptimizationInfo::LiteralArray
 - The SourcePosition of the inlining. Recursively, this yields the full inlining stack.
Before the Code object is created, the same information can be found in CompilationInfo::inlined_functions().

If SourcePosition::InliningId() is SourcePosition::kNotInlined, it refers to the outer (non-inlined) function.
So every SourcePosition has full information about its inlining stack, as long as the corresponding Code object is known. The internal represenation of a source position is a positive 64bit integer.

All compilers create now appropriate source positions for inlined functions. In the case of Turbofan, this required using AstGraphBuilderWithPositions for inlined functions too. So this class is now moved to a header file.

At the moment, the additional information in source positions is only used in --trace-deopt and --code-comments. The profiler needs to be updated, at the moment it gets the correct script offsets from the deopt info, but the wrong script id from the reconstructed deopt stack, which can lead to wrong outputs. This should be resolved by making the profiler use the new inlining information for deopts.

I activated the inlined deoptimization tests in test-cpu-profiler.cc for Turbofan, changing them to a case where the deopt stack and the inlining position agree. It is currently still broken for other cases.

The following additional changes were necessary:
 - The source position table (internal::SourcePositionTableBuilder etc.) supports now 64bit source positions. Encoding source positions in a single 64bit int together with the difference encoding in the source position table results in very little overhead for the inlining id, since only 12% of the source positions in Octane have a changed inlining id.
 - The class HPositionInfo was effectively dead code and is now removed.
 - SourcePosition has new printing and information facilities, including computing a full inlining stack.
 - I had to rename compiler/source-position.{h,cc} to compiler/compiler-source-position-table.{h,cc} to avoid clashes with the new src/source-position.cc file.
 - I wrote the new wrapper PodArray for ByteArray. It is a template working with any POD-type. This is used in DeoptimizationInputData::InliningPositions().
 - I removed HInlinedFunctionInfo and HGraph::inlined_function_infos, because they were only used for the now obsolete Crankshaft inlining ids.
 - Crankshaft managed a list of inlined functions in Lithium: LChunk::inlined_functions. This is an analog structure to CompilationInfo::inlined_functions. So I removed LChunk::inlined_functions and made Crankshaft use CompilationInfo::inlined_functions instead, because this was necessary to register the offsets into the literal array in a uniform way. This is a safe change because LChunk::inlined_functions has no other uses and the functions in CompilationInfo::inlined_functions have a strictly longer lifespan, being created earlier (in Hydrogen already).

BUG=v8:5432

Review-Url: https://codereview.chromium.org/2451853002
Cr-Commit-Position: refs/heads/master@{#40975}
2016-11-14 17:22:32 +00:00
..
benchmarks [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
cctest 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
common [wasm] Move all heap-allocated WASM structures into wasm-objects.h. 2016-11-11 11:13:17 +00:00
debugger [debugger,compiler] do not recompile already compiled inner functions. 2016-11-11 15:53:33 +00:00
fuzzer [wasm] Fix -Wsign-compare warnings. 2016-11-10 12:51:05 +00:00
inspector Compiling an array literal should be context-independent. 2016-11-14 10:46:33 +00:00
intl [wasm] asm.js: Add asm_wasm variant to test asm.js->wasm pipeline. 2016-09-19 23:57:13 +00:00
js-perf-test Add spread call micro-benchmarks. 2016-11-08 14:17:18 +00:00
memory [snapshot] support multiple contexts in the same snapshot. 2016-06-15 15:39:06 +00:00
message [parsing] When failing due to variable redeclaration, point at the variable. 2016-10-27 11:03:47 +00:00
mjsunit [tests] skip es6/array-iterator-turbo on deopt_fuzzer 2016-11-14 17:16:59 +00:00
mozilla Skip some mozilla tests on turbofan_opt as they consistently timeout 2016-10-07 22:41:42 +00:00
preparser [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
promises-aplus
simdjs [test] Deprecate test data download for most test suites 2016-08-08 12:39:48 +00:00
test262 Stage harmony trailing commas 2016-11-11 23:42:55 +00:00
unittests 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
webkit Remove always-true --harmony-restrictive-declarations flag 2016-11-04 18:50:41 +00:00
bot_default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
bot_default.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
BUILD.gn Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
default.isolate Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
optimize_for_size.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
optimize_for_size.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
perf.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
perf.isolate [test] Isolate files the perf runner depends on 2016-11-08 10:25:13 +00:00