[JSC] Implement $vm.ftlTrue function for FTL testing
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Feb 2018 17:54:06 +0000 (17:54 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Feb 2018 17:54:06 +0000 (17:54 +0000)
commit883253a84b37f0d8058dcf46a829c6455d43b661
treee35e325ca0f81051d6a9f4436164197794ed2e89
parente7b2528918fd5045fe204f371620d799f583c043
[JSC] Implement $vm.ftlTrue function for FTL testing
https://bugs.webkit.org/show_bug.cgi?id=183071

Reviewed by Mark Lam.

JSTests:

* stress/dead-fiat-value-to-int52-then-exit-not-double.js:
(foo):
* stress/dead-fiat-value-to-int52-then-exit-not-int52.js:
(foo):
* stress/dead-fiat-value-to-int52.js:
(foo):
* stress/dead-osr-entry-value.js:
(foo):
* stress/fiat-value-to-int52-then-exit-not-double.js:
(foo):
* stress/fiat-value-to-int52-then-exit-not-int52.js:
(foo):
* stress/fiat-value-to-int52-then-fail-to-fold.js:
(foo):
* stress/fiat-value-to-int52-then-fold.js:
(foo):
* stress/fiat-value-to-int52.js:
(foo):
* stress/fold-based-on-int32-proof-mul-branch.js:
(foo):
* stress/fold-profiled-call-to-call.js:
(foo):
* stress/fold-to-double-constant-then-exit.js:
(foo):
* stress/fold-to-int52-constant-then-exit.js:
(foo):
* stress/fold-to-primitive-in-cfa.js:
(foo):
* stress/fold-to-primitive-to-identity-in-cfa.js:
(foo):
* stress/has-indexed-property-array-storage-ftl.js: Added.
(shouldBe):
(test1):
(test2):
* stress/has-indexed-property-slow-put-array-storage-ftl.js: Added.
(shouldBe):
(test1):
(test2):
* stress/int52-ai-add-then-filter-int32.js:
(foo):
* stress/int52-ai-mul-and-clean-neg-zero-then-filter-int32.js:
(foo):
* stress/int52-ai-mul-then-filter-int32.js:
(foo):
* stress/int52-ai-neg-then-filter-int32.js:
(foo):
* stress/int52-ai-sub-then-filter-int32.js:
(foo):
* stress/licm-pre-header-cannot-exit-nested.js:
(foo):
* stress/licm-pre-header-cannot-exit.js:
(foo):
* stress/sparse-array-entry-update-144067.js:
(useMemoryToTriggerGCs):
* stress/test-spec-misc.js:
(foo):
* stress/tricky-array-bounds-checks.js:
(foo):

Source/JavaScriptCore:

Add $vm.ftlTrue, which becomes true if the caller is compiled in FTL.
This is useful for testing whether the caller function is compiled in FTL.

We also remove duplicate DFGTrue function in jsc.cpp. We have $vm.dfgTrue.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionFalse1):
(functionFalse2): Deleted.
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* tools/JSDollarVM.cpp:
(JSC::functionFTLTrue):
(JSC::JSDollarVM::finishCreation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
JSTests/ChangeLog
JSTests/stress/dead-fiat-value-to-int52-then-exit-not-double.js
JSTests/stress/dead-fiat-value-to-int52-then-exit-not-int52.js
JSTests/stress/dead-fiat-value-to-int52.js
JSTests/stress/dead-osr-entry-value.js
JSTests/stress/fiat-value-to-int52-then-exit-not-double.js
JSTests/stress/fiat-value-to-int52-then-exit-not-int52.js
JSTests/stress/fiat-value-to-int52-then-fail-to-fold.js
JSTests/stress/fiat-value-to-int52-then-fold.js
JSTests/stress/fiat-value-to-int52.js
JSTests/stress/fold-based-on-int32-proof-mul-branch.js
JSTests/stress/fold-profiled-call-to-call.js
JSTests/stress/fold-to-double-constant-then-exit.js
JSTests/stress/fold-to-int52-constant-then-exit.js
JSTests/stress/fold-to-primitive-in-cfa.js
JSTests/stress/fold-to-primitive-to-identity-in-cfa.js
JSTests/stress/has-indexed-property-array-storage-ftl.js [new file with mode: 0644]
JSTests/stress/has-indexed-property-slow-put-array-storage-ftl.js [new file with mode: 0644]
JSTests/stress/int52-ai-add-then-filter-int32.js
JSTests/stress/int52-ai-mul-and-clean-neg-zero-then-filter-int32.js
JSTests/stress/int52-ai-mul-then-filter-int32.js
JSTests/stress/int52-ai-neg-then-filter-int32.js
JSTests/stress/int52-ai-sub-then-filter-int32.js
JSTests/stress/licm-pre-header-cannot-exit-nested.js
JSTests/stress/licm-pre-header-cannot-exit.js
JSTests/stress/sparse-array-entry-update-144067.js
JSTests/stress/test-spec-misc.js
JSTests/stress/tricky-array-bounds-checks.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/Intrinsic.cpp
Source/JavaScriptCore/runtime/Intrinsic.h
Source/JavaScriptCore/tools/JSDollarVM.cpp