WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159786
DFG and FTL should support op_call_eval
https://bugs.webkit.org/show_bug.cgi?id=159786
Summary
DFG and FTL should support op_call_eval
Filip Pizlo
Reported
2016-07-14 14:49:24 PDT
Because it's part of the language.
Attachments
work in progress
(23.42 KB, patch)
2016-07-14 14:51 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
maybe it's done
(30.43 KB, patch)
2016-07-14 15:07 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
it just did an eval!
(34.80 KB, patch)
2016-07-14 16:23 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
now it works in FTL, too
(39.77 KB, patch)
2016-07-14 17:30 PDT
,
Filip Pizlo
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-yosemite
(1.10 MB, application/zip)
2016-07-14 18:13 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2
(845.84 KB, application/zip)
2016-07-14 18:24 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews126 for ios-simulator-wk2
(702.47 KB, application/zip)
2016-07-14 18:32 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews117 for mac-yosemite
(1.73 MB, application/zip)
2016-07-14 18:33 PDT
,
Build Bot
no flags
Details
new and improved!
(42.21 KB, patch)
2016-07-14 21:25 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
maybe it's done
(50.92 KB, patch)
2016-07-14 22:13 PDT
,
Filip Pizlo
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews114 for mac-yosemite
(1.49 MB, application/zip)
2016-07-15 00:08 PDT
,
Build Bot
no flags
Details
the patch
(51.77 KB, patch)
2016-07-15 20:00 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(51.14 KB, patch)
2016-07-15 20:21 PDT
,
Filip Pizlo
saam
: review+
Details
Formatted Diff
Diff
performance
(78.84 KB, text/plain)
2016-07-15 23:10 PDT
,
Filip Pizlo
no flags
Details
Show Obsolete
(12)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2016-07-14 14:51:12 PDT
Created
attachment 283688
[details]
work in progress
Filip Pizlo
Comment 2
2016-07-14 15:07:55 PDT
Created
attachment 283690
[details]
maybe it's done
Filip Pizlo
Comment 3
2016-07-14 16:23:14 PDT
Created
attachment 283700
[details]
it just did an eval!
Filip Pizlo
Comment 4
2016-07-14 17:30:01 PDT
Created
attachment 283715
[details]
now it works in FTL, too Still haven't run all tests though.
WebKit Commit Bot
Comment 5
2016-07-14 17:31:11 PDT
Attachment 283715
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5563: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5588: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:885: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/jit/AssemblyHelpers.cpp:622: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:842: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 5 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 6
2016-07-14 18:13:41 PDT
Comment on
attachment 283715
[details]
now it works in FTL, too
Attachment 283715
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1682847
New failing tests: js/regress/eval-not-eval-compute-args.html js/regress/eval-not-eval-compute.html
Build Bot
Comment 7
2016-07-14 18:13:44 PDT
Created
attachment 283723
[details]
Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 8
2016-07-14 18:23:59 PDT
Comment on
attachment 283715
[details]
now it works in FTL, too
Attachment 283715
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1682886
New failing tests: js/regress/eval-not-eval-compute-args.html js/regress/eval-not-eval-compute.html
Build Bot
Comment 9
2016-07-14 18:24:02 PDT
Created
attachment 283724
[details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 10
2016-07-14 18:32:54 PDT
Comment on
attachment 283715
[details]
now it works in FTL, too
Attachment 283715
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1682893
New failing tests: js/regress/eval-not-eval-compute-args.html js/regress/eval-not-eval-compute.html
Build Bot
Comment 11
2016-07-14 18:32:56 PDT
Comment on
attachment 283715
[details]
now it works in FTL, too
Attachment 283715
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1682888
New failing tests: js/regress/function-with-eval.html js/regress/eval-not-eval-compute-args.html js/regress/eval-not-eval-compute.html
Build Bot
Comment 12
2016-07-14 18:32:58 PDT
Created
attachment 283727
[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.5
Build Bot
Comment 13
2016-07-14 18:33:01 PDT
Created
attachment 283728
[details]
Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Filip Pizlo
Comment 14
2016-07-14 21:25:21 PDT
Created
attachment 283734
[details]
new and improved!
WebKit Commit Bot
Comment 15
2016-07-14 21:27:01 PDT
Attachment 283734
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5563: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5588: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:885: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/jit/AssemblyHelpers.cpp:622: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:842: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 5 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 16
2016-07-14 22:13:49 PDT
Created
attachment 283736
[details]
maybe it's done
WebKit Commit Bot
Comment 17
2016-07-14 22:17:19 PDT
Attachment 283736
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5563: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5588: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:885: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/jit/AssemblyHelpers.cpp:622: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:842: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 5 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 18
2016-07-15 00:08:21 PDT
Comment on
attachment 283736
[details]
maybe it's done
Attachment 283736
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1684171
New failing tests: js/regress/function-with-eval.html
Build Bot
Comment 19
2016-07-15 00:08:25 PDT
Created
attachment 283743
[details]
Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Filip Pizlo
Comment 20
2016-07-15 20:00:49 PDT
Created
attachment 283833
[details]
the patch
WebKit Commit Bot
Comment 21
2016-07-15 20:03:26 PDT
Attachment 283833
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5563: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5588: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:885: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/jit/AssemblyHelpers.cpp:622: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:842: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 5 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 22
2016-07-15 20:21:10 PDT
Created
attachment 283836
[details]
the patch
WebKit Commit Bot
Comment 23
2016-07-15 20:22:22 PDT
Attachment 283836
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5563: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5588: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:885: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/jit/AssemblyHelpers.cpp:622: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:842: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 5 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 24
2016-07-15 23:10:54 PDT
Created
attachment 283843
[details]
performance Big speed-up on micro benchmarks. Interestingly, it's also a speed-up on a few old JSRegress tests. That's reassuring.
Saam Barati
Comment 25
2016-07-16 15:42:23 PDT
Comment on
attachment 283836
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=283836&action=review
r=me with questions and suggestions
> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:458 > + else if (m_graph.needsScopeRegister() && operand == m_codeBlock->scopeRegister())
A suggestion: To match the name needsFlushedThis(), you could call this "needsFlushedScope()"
> Source/JavaScriptCore/dfg/DFGClobberize.h:484 > + read(AbstractHeap(Stack, virtualRegisterForArgument(0)));
Out of curiosity, why do we need this if we read(World)?
> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5582 > + patchpoint->clobberLate(RegisterSet::volatileRegistersForJSCall());
Is it wrong to say this since the returnValueGPR should be in this set?
> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5603 > + jit.addPtr(CCallHelpers::TrustedImm32(-static_cast<ptrdiff_t>(sizeof(CallerFrameAndPC))), CCallHelpers::stackPointerRegister, GPRInfo::regT1);
Are regT0 and regT1 guaranteed to be volatile on all platforms?
Filip Pizlo
Comment 26
2016-07-16 15:46:11 PDT
(In reply to
comment #25
)
> Comment on
attachment 283836
[details]
> the patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=283836&action=review
> > r=me with questions and suggestions > > > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:458 > > + else if (m_graph.needsScopeRegister() && operand == m_codeBlock->scopeRegister()) > > A suggestion: To match the name needsFlushedThis(), you could call this > "needsFlushedScope()"
I don't like that, since needsScopeRegister() also tells us if we need to do CodeBlock::setScopeRegister(). This is quite different from just flushing.
> > > Source/JavaScriptCore/dfg/DFGClobberize.h:484 > > + read(AbstractHeap(Stack, virtualRegisterForArgument(0))); > > Out of curiosity, why do we need this if we read(World)?
Yeah that's kinda dirty. PreciseLocalClobberize turns read(World) into reads of locals that it thinks are escaping at that node. It leaves read(Stack(specific location)) untouched. So, having this extra read() has the effect of bypassing PreciseLocalClobberize's cleverness. I could alternatively move this logic to PreciseLocalClobberize, but I'm not sure it matters that much. It's kinda dirty either way.
> > > Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5582 > > + patchpoint->clobberLate(RegisterSet::volatileRegistersForJSCall()); > > Is it wrong to say this since the returnValueGPR should be in this set?
No, because when you pin the result to a specific register then this is the final register selection and Air will not care if that register interferes with anything else in the instruction. It'll just trust you.
> > > Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:5603 > > + jit.addPtr(CCallHelpers::TrustedImm32(-static_cast<ptrdiff_t>(sizeof(CallerFrameAndPC))), CCallHelpers::stackPointerRegister, GPRInfo::regT1); > > Are regT0 and regT1 guaranteed to be volatile on all platforms?
Yes because they are temporary registers.
Filip Pizlo
Comment 27
2016-07-18 12:34:10 PDT
Landed in
https://trac.webkit.org/changeset/203364
Csaba Osztrogonác
Comment 28
2016-07-19 07:32:20 PDT
(In reply to
comment #27
)
> Landed in
https://trac.webkit.org/changeset/203364
This one or
r203365
made many tests crash on Apple Mac 32 bit bots: -
https://build.webkit.org/builders/Apple%20Yosemite%2032-bit%20JSC%20%28BuildAndTest%29/builds/9824
-
https://build.webkit.org/builders/Apple%20El%20Capitan%2032-bit%20JSC%20%28BuildAndTest%29/builds/2948
( Last known good revision:
r203363
, first known bad revision:
r203368
)
Csaba Osztrogonác
Comment 29
2016-07-19 07:35:27 PDT
(In reply to
comment #28
)
> (In reply to
comment #27
) > > Landed in
https://trac.webkit.org/changeset/203364
> > This one or
r203365
made many tests crash on Apple Mac 32 bit bots: > - >
https://build.webkit.org/builders/Apple%20Yosemite%2032
- > bit%20JSC%20%28BuildAndTest%29/builds/9824 > - >
https://build.webkit.org/builders/Apple%20El%20Capitan%2032
- > bit%20JSC%20%28BuildAndTest%29/builds/2948 > > ( Last known good revision:
r203363
, first known bad revision:
r203368
)
The backtrace seems to be related to eval, so probably this bug is the culprit.
Csaba Osztrogonác
Comment 30
2016-07-19 07:39:43 PDT
bisecting on the bot is in progress: -
r203364
:
https://build.webkit.org/builders/Apple%20El%20Capitan%2032-bit%20JSC%20%28BuildAndTest%29/builds/2956
-
r203365
:
https://build.webkit.org/builders/Apple%20Yosemite%2032-bit%20JSC%20%28BuildAndTest%29/builds/9834
Csaba Osztrogonác
Comment 31
2016-07-19 09:31:38 PDT
(In reply to
comment #30
)
> bisecting on the bot is in progress: > -
r203364
: >
https://build.webkit.org/builders/Apple%20El%20Capitan%2032
- > bit%20JSC%20%28BuildAndTest%29/builds/2956 > -
r203365
: >
https://build.webkit.org/builders/Apple%20Yosemite%2032
- > bit%20JSC%20%28BuildAndTest%29/builds/9834
Now it's sure, this bug is the culprit for the regression.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug