[DFG] Reduce OSRExit for Kraken/crypto-aes due to CoW array
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jun 2018 16:33:58 +0000 (16:33 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jun 2018 16:33:58 +0000 (16:33 +0000)
commit4359d85122f63329c3d52862d5b3cfc8815a1687
tree383ed9e4f5aa10ff294c68ee745145bcb29be443
parentb5b372cbac962404c79c60dbb550108cce6cc6c4
[DFG] Reduce OSRExit for Kraken/crypto-aes due to CoW array
https://bugs.webkit.org/show_bug.cgi?id=186721

Reviewed by Keith Miller.

JSTests:

* stress/array-slice-cow.js: Added.
(shouldBe):
(testInt32):
(testDouble):
(testContiguous):

Source/JavaScriptCore:

We still have several other OSRExits, but this patch reduces that.

1. While ArraySlice code accepts CoW arrays, it always emits CheckStructure without CoW Array structures.
So DFG emits ArraySlice onto CoW arrays, and always performs OSRExits.

2. The CoW patch removed ArrayAllocationProfile updates. This makes allocated JSImmutableButterfly
non-appropriate.

These changes a bit fix Kraken/crypto-aes regression.

                              baseline                  patched

stanford-crypto-aes        63.718+-2.312      ^      56.140+-0.966         ^ definitely 1.1350x faster

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/array-slice-cow.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/ftl/FTLOperations.cpp
Source/JavaScriptCore/runtime/CommonSlowPaths.cpp