v8/test/debugger/debug/es6
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
..
debug-promises [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
regress [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-blockscopes.js Use --opt instead of --crankshaft in tests. 2017-04-28 14:20:39 +00:00
debug-break-default-constructor.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
debug-evaluate-arrow-function-receiver.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-evaluate-blockscopes.js [debugger] remove debugger statement support from FCG/CS. 2017-02-22 08:45:09 +00:00
debug-evaluate-receiver-before-super.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-exception-generators.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-function-scopes.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-liveedit-new-target-1.js [liveedit] reimplement frame restarting. 2017-01-27 07:31:03 +00:00
debug-liveedit-new-target-2.js [liveedit] reimplement frame restarting. 2017-01-27 07:31:03 +00:00
debug-liveedit-new-target-3.js [liveedit] reimplement frame restarting. 2017-01-27 07:31:03 +00:00
debug-scope-default-param-with-eval.js [debug-wrapper] Adapt tests, breakpoint.actual_location 2016-11-21 09:29:17 +00:00
debug-step-destructuring-assignment.js [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
debug-step-destructuring-bind.js [inspector] moved var initialization break location before init expression (reland) 2017-05-30 12:54:49 +00:00
debug-step-into-class-extends.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
debug-step-into-constructor.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
debug-step-into-regexp-subclass.js [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
debug-stepin-collections-foreach.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
debug-stepin-default-parameters.js [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
debug-stepin-generators.js [debugger] step-next across yield should not leave the generator. 2016-11-21 11:05:08 +00:00
debug-stepin-microtasks.js [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
debug-stepin-proxies.js [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
debug-stepin-string-template.js [inspector] improve return position of explicit return in non-async function 2017-07-14 19:10:13 +00:00
debug-stepnext-for.js [inspector] removed call break location from for-of loop 2017-05-24 12:12:53 +00:00
debug-stepnext-generators.js [debugger] step-next across yield should not leave the generator. 2016-11-21 11:05:08 +00:00
default-parameters-debug.js [ignition/turbo] Perform liveness analysis on the bytecodes 2016-11-29 12:27:15 +00:00
generators-debug-liveedit.js [liveedit] reimplement frame restarting. 2017-01-27 07:31:03 +00:00
generators-debug-scopes.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
generators-relocation.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00