NEW153626
Web Inspector: Possible unexpected tail call optimization issue, sourceURL lost from eval() source
https://bugs.webkit.org/show_bug.cgi?id=153626
Summary Web Inspector: Possible unexpected tail call optimization issue, sourceURL lo...
Joseph Pecoraro
Reported 2016-01-28 17:31:30 PST
* SUMMARY Possible unexpected tail call optimization issue, sourceURL lost from eval() source * STEPS TO REPRODUCE 1. Attach the attached patch containing (LayoutTests/inspector/sampling-profiler/eval-source-url-2.html) 2. shell> run-webkit-tests LayoutTests/inspector/sampling-profiler/eval-source-url-2.html => FAIL * NOTES - Compare inspector/sampling-profiler/eval-source-url-2.html to inspector/sampling-profiler/eval-source-url.html - The only difference is bar(): inspector/sampling-profiler/eval-source-url-2.html: > function bar() { > for (let i = 0; i < 2; i++) > eval("//# sourceURL=eval.js\nfoo();"); > } inspector/sampling-profiler/eval-source-url.html: > function bar() { > eval("//# sourceURL=eval.js\nfoo();"); > } For some reason, the Sampling Profiler doesn't see the "eval.js" sourceURL for the eval executable. This showed up after no longer enabling the legacy profiling. One of the things that did was flip this bit: bytecompiler/BytecodeGenerator.cpp // FIXME: We should be able to have tail call elimination with the profiler // enabled. This is currently not possible because the profiler expects // op_will_call / op_did_call pairs before and after a call, which are not // compatible with tail calls (we have no way of emitting op_did_call). // https://bugs.webkit.org/show_bug.cgi?id=148819 , m_inTailPosition(Options::useTailCalls() && !isConstructor() && constructorKind() == ConstructorKind::None && isStrictMode() && !m_shouldEmitProfileHooks) Toggling that did in fact make the test pass again.
Attachments
[ISSUE] Patch with new test that fails (2.75 KB, patch)
2016-01-28 17:32 PST, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2016-01-28 17:32:17 PST
Created attachment 270167 [details] [ISSUE] Patch with new test that fails
Radar WebKit Bug Importer
Comment 2 2016-04-04 15:57:19 PDT
Note You need to log in before you can comment on or make changes to this bug.