v8/test
Alexey Kozyatinskiy 0896586083 [inspector] improve return position of explicit return in non-async function
Goal of this CL: explicit return from non-async function has position after
return expression as return position (will unblock [1]).

BytecodeArrayBuilder has SetStatementPosition and SetExpressionPosition methods.
If one of these methods is called then next generated bytecode will get passed
position. It's general treatment for most cases.
Unfortunately it doesn't work for Returns:
- debugger requires source positions exactly on kReturn bytecode in stepping
  implementation,
- BytecodeGenerator::BuildReturn and BytecodeGenerator::BuildAsyncReturn
  generates more then one bytecode and general solution will put return position
  on first generated bytecode,
- it's not easy to split BuildReturn function into two parts to allow something
  like following in BytecodeGenerator::VisitReturnStatement since generated
  bytecodes are actually controlled by execution_control().
..->BuildReturnPrologue();
..->SetReturnPosition(stmt);
..->Return();

In this CL we pass ReturnStatement through ExecutionControl and use it for
position when we emit return bytecode right here.

So this CL only will improve return position for returns inside of non-async
functions, I'll address async functions later.

[1] https://chromium-review.googlesource.com/c/543161/

Change-Id: Iede512c120b00c209990bf50c20e7d23dc0d65db
Reviewed-on: https://chromium-review.googlesource.com/560738
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46687}
2017-07-14 19:10:13 +00:00
..
benchmarks Use --opt instead of --crankshaft in tests. 2017-04-28 14:20:39 +00:00
cctest [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
common Reland "[wasm] Don't store global handles in the interpreter" 2017-07-14 14:37:22 +00:00
debugger [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
fuzzer [wasm] [fuzzer] Also test validation 2017-07-11 13:43:32 +00:00
inspector [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
intl [tests] Fix timezone dependence in an intl test 2017-07-12 12:23:22 +00:00
js-perf-test Add micro-benchmark for Proxy call and constructor to the suite 2017-07-14 10:28:10 +00:00
memory [snapshot] support multiple contexts in the same snapshot. 2016-06-15 15:39:06 +00:00
message [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
mjsunit [wasm] Reduce run-time of GC stress test. 2017-07-14 16:02:42 +00:00
mkgrokdump Fix compilation failure due to overload of virtual function 2017-05-24 21:19:48 +00:00
mozilla [test] Fix test status file simulator_run not evaluate to boolean error 2017-06-28 21:32:19 +00:00
preparser [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
promises-aplus Make test262 test runner check for which exception is thrown 2016-03-14 21:20:37 +00:00
test262 [parser] Update {Binding,Assignment}RestPattern 2017-07-14 00:10:06 +00:00
unittests [generators] remove SuspendFlags enum and related code 2017-07-14 16:09:53 +00:00
wasm-spec-tests [wasm][x64] Add an additional stack check for functions with big frames 2017-07-13 13:43:04 +00:00
webkit [runtime] Create only one instance of %ThrowTypeError%. 2017-07-10 08:26:02 +00:00
bot_default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
bot_default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
BUILD.gn [wasm] Remove the wasm-asmjs fuzzer 2017-06-21 10:59:35 +00:00
default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +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 Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00