Move unsafe jsc shell test functions to the $vm object.
https://bugs.webkit.org/show_bug.cgi?id=179980
Reviewed by Yusuke Suzuki.
JSTests:
* controlFlowProfiler/driver/driver.js:
* controlFlowProfiler/execution-count.js:
* controlFlowProfiler/if-statement.js:
* controlFlowProfiler/loop-statements.js:
* controlFlowProfiler/switch-statements.js:
* controlFlowProfiler/test-jit.js:
* exceptionFuzz/3d-cube.js:
* exceptionFuzz/date-format-xparb.js:
* exceptionFuzz/earley-boyer.js:
* heapProfiler/basic-edges.js:
* heapProfiler/property-edge-types.js:
* microbenchmarks/try-get-by-id-basic.js:
* microbenchmarks/try-get-by-id-polymorphic.js:
* modules/namespace-object-try-get.js:
* stress/argument-count-bytecode.js:
* stress/argument-intrinsic-basic.js:
* stress/argument-intrinsic-inlining-use-caller-arg.js:
* stress/argument-intrinsic-inlining-with-result-escape.js:
* stress/argument-intrinsic-inlining-with-vararg-with-enough-arguments.js:
* stress/argument-intrinsic-inlining-with-vararg.js:
* stress/argument-intrinsic-nested-inlining.js:
* stress/argument-intrinsic-not-convert-to-get-argument.js:
* stress/argument-intrinsic-with-stack-write.js:
* stress/arity-mismatch-get-argument.js:
* stress/array-message-passing.js:
* stress/array-push-with-force-exit.js:
* stress/check-dom-with-signature.js:
* stress/check-sub-class.js:
* stress/compare-eq-incomplete-profile.js:
* stress/custom-get-set-inline-caching-one-level-up-proto-chain.js:
* stress/do-eval-virtual-call-correctly.js:
* stress/dom-jit-with-poly-proto.js:
* stress/domjit-exception-ic.js:
* stress/domjit-exception.js:
* stress/domjit-getter-complex-with-incorrect-object.js:
* stress/domjit-getter-complex.js:
* stress/domjit-getter-poly.js:
* stress/domjit-getter-proto.js:
* stress/domjit-getter-super-poly.js:
* stress/domjit-getter-try-catch-getter-as-get-by-id-register-restoration.js:
* stress/domjit-getter-type-check.js:
* stress/domjit-getter.js:
* stress/exit-during-inlined-arity-fixup-recover-proper-frame.js:
* stress/for-in-proxy-target-changed-structure.js:
* stress/for-in-proxy.js:
* stress/generational-opaque-roots.js:
* stress/global-const-redeclaration-setting-2.js:
* stress/global-const-redeclaration-setting-3.js:
* stress/global-const-redeclaration-setting-4.js:
* stress/global-const-redeclaration-setting-5.js:
* stress/global-const-redeclaration-setting.js:
* stress/import-basic.js:
* stress/import-from-eval.js:
* stress/import-reject-with-exception.js:
* stress/import-syntax.js:
* stress/impure-get-own-property-slot-inline-cache.js:
* stress/is-constructor.js:
* stress/istypedarrayview-intrinsic.js:
* stress/jsc-setImpureGetterDelegate-on-bad-type.js:
* stress/jsc-test-functions-should-be-more-robust.js:
* stress/object-toString-with-proxy.js:
* stress/poly-proto-custom-value-and-accessor.js:
* stress/proxy-inline-cache.js:
* stress/re-execute-error-module.js:
* stress/regress-150532.js:
* stress/regress-156992.js:
* stress/regress-179619.js:
* stress/resources/shadow-chicken-support.js:
* stress/runtime-array.js:
* stress/sampling-profiler-microtasks.js:
* stress/shadow-chicken-enabled.js:
* stress/spread-correct-global-object-on-exception.js:
* stress/super-get-by-id.js:
* stress/tailCallForwardArguments.js:
* stress/to-object-intrinsic-boolean-edge.js:
* stress/to-object-intrinsic-null-or-undefined-edge.js:
* stress/to-object-intrinsic-number-edge.js:
* stress/to-object-intrinsic-object-edge.js:
* stress/to-object-intrinsic-string-edge.js:
* stress/to-object-intrinsic-symbol-edge.js:
* stress/to-object-intrinsic.js:
* stress/try-catch-custom-getter-as-get-by-id.js:
* stress/try-get-by-id-poly-proto.js:
* stress/try-get-by-id-should-spill-registers-dfg.js:
* stress/try-get-by-id.js:
* typeProfiler/arrow-functions.js:
* typeProfiler/basic.js:
* typeProfiler/captured.js:
* typeProfiler/classes.js:
* typeProfiler/dfg-jit-optimizations.js:
* typeProfiler/dictionary-mode.js:
* typeProfiler/es6-block-scoping.js:
* typeProfiler/es6-classes.js:
* typeProfiler/inheritance.js:
* typeProfiler/int52-dfg.js:
* typeProfiler/loop.js:
* typeProfiler/optional-fields.js:
* typeProfiler/overflow.js:
* typeProfiler/return.js:
* typeProfiler/symbol.js:
* typeProfiler/weird-prototype-chain.js:
Source/JavaScriptCore:
Also removed setElementRoot() which was not used.
* jsc.cpp:
(GlobalObject::finishCreation):
(WTF::Element::Element): Deleted.
(WTF::Element::root const): Deleted.
(WTF::Element::setRoot): Deleted.
(WTF::Element::create): Deleted.
(WTF::Element::visitChildren): Deleted.
(WTF::Element::createStructure): Deleted.
(WTF::Root::Root): Deleted.
(WTF::Root::element): Deleted.
(WTF::Root::setElement): Deleted.
(WTF::Root::create): Deleted.
(WTF::Root::createStructure): Deleted.
(WTF::Root::visitChildren): Deleted.
(WTF::ImpureGetter::ImpureGetter): Deleted.
(WTF::ImpureGetter::createStructure): Deleted.
(WTF::ImpureGetter::create): Deleted.
(WTF::ImpureGetter::finishCreation): Deleted.
(WTF::ImpureGetter::getOwnPropertySlot): Deleted.
(WTF::ImpureGetter::visitChildren): Deleted.
(WTF::ImpureGetter::setDelegate): Deleted.
(WTF::CustomGetter::CustomGetter): Deleted.
(WTF::CustomGetter::createStructure): Deleted.
(WTF::CustomGetter::create): Deleted.
(WTF::CustomGetter::getOwnPropertySlot): Deleted.
(WTF::CustomGetter::customGetter): Deleted.
(WTF::CustomGetter::customGetterAcessor): Deleted.
(WTF::RuntimeArray::create): Deleted.
(WTF::RuntimeArray::~RuntimeArray): Deleted.
(WTF::RuntimeArray::destroy): Deleted.
(WTF::RuntimeArray::getOwnPropertySlot): Deleted.
(WTF::RuntimeArray::getOwnPropertySlotByIndex): Deleted.
(WTF::RuntimeArray::put): Deleted.
(WTF::RuntimeArray::deleteProperty): Deleted.
(WTF::RuntimeArray::getLength const): Deleted.
(WTF::RuntimeArray::createPrototype): Deleted.
(WTF::RuntimeArray::createStructure): Deleted.
(WTF::RuntimeArray::finishCreation): Deleted.
(WTF::RuntimeArray::RuntimeArray): Deleted.
(WTF::RuntimeArray::lengthGetter): Deleted.
(WTF::SimpleObject::SimpleObject): Deleted.
(WTF::SimpleObject::create): Deleted.
(WTF::SimpleObject::visitChildren): Deleted.
(WTF::SimpleObject::createStructure): Deleted.
(WTF::SimpleObject::hiddenValue): Deleted.
(WTF::SimpleObject::setHiddenValue): Deleted.
(WTF::DOMJITNode::DOMJITNode): Deleted.
(WTF::DOMJITNode::createStructure): Deleted.
(WTF::DOMJITNode::checkSubClassSnippet): Deleted.
(WTF::DOMJITNode::create): Deleted.
(WTF::DOMJITNode::value const): Deleted.
(WTF::DOMJITNode::offsetOfValue): Deleted.
(WTF::DOMJITGetter::DOMJITGetter): Deleted.
(WTF::DOMJITGetter::createStructure): Deleted.
(WTF::DOMJITGetter::create): Deleted.
(WTF::DOMJITGetter::DOMJITAttribute::DOMJITAttribute): Deleted.
(WTF::DOMJITGetter::DOMJITAttribute::slowCall): Deleted.
(WTF::DOMJITGetter::DOMJITAttribute::callDOMGetter): Deleted.
(WTF::DOMJITGetter::customGetter): Deleted.
(WTF::DOMJITGetter::finishCreation): Deleted.
(WTF::DOMJITGetterComplex::DOMJITGetterComplex): Deleted.
(WTF::DOMJITGetterComplex::createStructure): Deleted.
(WTF::DOMJITGetterComplex::create): Deleted.
(WTF::DOMJITGetterComplex::DOMJITAttribute::DOMJITAttribute): Deleted.
(WTF::DOMJITGetterComplex::DOMJITAttribute::slowCall): Deleted.
(WTF::DOMJITGetterComplex::DOMJITAttribute::callDOMGetter): Deleted.
(WTF::DOMJITGetterComplex::functionEnableException): Deleted.
(WTF::DOMJITGetterComplex::customGetter): Deleted.
(WTF::DOMJITGetterComplex::finishCreation): Deleted.
(WTF::DOMJITFunctionObject::DOMJITFunctionObject): Deleted.
(WTF::DOMJITFunctionObject::createStructure): Deleted.
(WTF::DOMJITFunctionObject::create): Deleted.
(WTF::DOMJITFunctionObject::safeFunction): Deleted.
(WTF::DOMJITFunctionObject::unsafeFunction): Deleted.
(WTF::DOMJITFunctionObject::checkSubClassSnippet): Deleted.
(WTF::DOMJITFunctionObject::finishCreation): Deleted.
(WTF::DOMJITCheckSubClassObject::DOMJITCheckSubClassObject): Deleted.
(WTF::DOMJITCheckSubClassObject::createStructure): Deleted.
(WTF::DOMJITCheckSubClassObject::create): Deleted.
(WTF::DOMJITCheckSubClassObject::safeFunction): Deleted.
(WTF::DOMJITCheckSubClassObject::unsafeFunction): Deleted.
(WTF::DOMJITCheckSubClassObject::finishCreation): Deleted.
(WTF::DOMJITGetterBaseJSObject::DOMJITGetterBaseJSObject): Deleted.
(WTF::DOMJITGetterBaseJSObject::createStructure): Deleted.
(WTF::DOMJITGetterBaseJSObject::create): Deleted.
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::DOMJITAttribute): Deleted.
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::slowCall): Deleted.
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::callDOMGetter): Deleted.
(WTF::DOMJITGetterBaseJSObject::customGetter): Deleted.
(WTF::DOMJITGetterBaseJSObject::finishCreation): Deleted.
(WTF::Element::handleOwner): Deleted.
(WTF::Element::finishCreation): Deleted.
(JSTestCustomGetterSetter::JSTestCustomGetterSetter): Deleted.
(JSTestCustomGetterSetter::create): Deleted.
(JSTestCustomGetterSetter::createStructure): Deleted.
(customGetAccessor): Deleted.
(customGetValue): Deleted.
(customSetAccessor): Deleted.
(customSetValue): Deleted.
(JSTestCustomGetterSetter::finishCreation): Deleted.
(GlobalObject::addConstructableFunction): Deleted.
(functionCreateRoot): Deleted.
(functionCreateElement): Deleted.
(functionGetElement): Deleted.
(functionSetElementRoot): Deleted.
(functionCreateSimpleObject): Deleted.
(functionGetHiddenValue): Deleted.
(functionSetHiddenValue): Deleted.
(functionCreateProxy): Deleted.
(functionCreateRuntimeArray): Deleted.
(functionCreateImpureGetter): Deleted.
(functionCreateCustomGetterObject): Deleted.
(functionCreateDOMJITNodeObject): Deleted.
(functionCreateDOMJITGetterObject): Deleted.
(functionCreateDOMJITGetterComplexObject): Deleted.
(functionCreateDOMJITFunctionObject): Deleted.
(functionCreateDOMJITCheckSubClassObject): Deleted.
(functionCreateDOMJITGetterBaseJSObject): Deleted.
(functionSetImpureGetterDelegate): Deleted.
(functionGetGetterSetter): Deleted.
(functionShadowChickenFunctionsOnStack): Deleted.
(functionSetGlobalConstRedeclarationShouldNotThrow): Deleted.
(functionGlobalObjectForObject): Deleted.
(functionLoadGetterFromGetterSetter): Deleted.
(functionCreateCustomTestGetterSetter): Deleted.
(functionAbort): Deleted.
(functionFindTypeForExpression): Deleted.
(functionReturnTypeFor): Deleted.
(functionDumpBasicBlockExecutionRanges): Deleted.
(functionHasBasicBlockExecuted): Deleted.
(functionBasicBlockExecutionCount): Deleted.
(functionEnableExceptionFuzz): Deleted.
(functionCreateBuiltin): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tools/JSDollarVM.cpp:
(WTF::Element::Element):
(WTF::Element::root const):
(WTF::Element::setRoot):
(WTF::Element::create):
(WTF::Element::visitChildren):
(WTF::Element::createStructure):
(WTF::Root::Root):
(WTF::Root::element):
(WTF::Root::setElement):
(WTF::Root::create):
(WTF::Root::createStructure):
(WTF::Root::visitChildren):
(WTF::SimpleObject::SimpleObject):
(WTF::SimpleObject::create):
(WTF::SimpleObject::visitChildren):
(WTF::SimpleObject::createStructure):
(WTF::SimpleObject::hiddenValue):
(WTF::SimpleObject::setHiddenValue):
(WTF::ImpureGetter::ImpureGetter):
(WTF::ImpureGetter::createStructure):
(WTF::ImpureGetter::create):
(WTF::ImpureGetter::finishCreation):
(WTF::ImpureGetter::getOwnPropertySlot):
(WTF::ImpureGetter::visitChildren):
(WTF::ImpureGetter::setDelegate):
(WTF::CustomGetter::CustomGetter):
(WTF::CustomGetter::createStructure):
(WTF::CustomGetter::create):
(WTF::CustomGetter::getOwnPropertySlot):
(WTF::CustomGetter::customGetter):
(WTF::CustomGetter::customGetterAcessor):
(WTF::RuntimeArray::create):
(WTF::RuntimeArray::~RuntimeArray):
(WTF::RuntimeArray::destroy):
(WTF::RuntimeArray::getOwnPropertySlot):
(WTF::RuntimeArray::getOwnPropertySlotByIndex):
(WTF::RuntimeArray::put):
(WTF::RuntimeArray::deleteProperty):
(WTF::RuntimeArray::getLength const):
(WTF::RuntimeArray::createPrototype):
(WTF::RuntimeArray::createStructure):
(WTF::RuntimeArray::finishCreation):
(WTF::RuntimeArray::RuntimeArray):
(WTF::RuntimeArray::lengthGetter):
(WTF::DOMJITNode::DOMJITNode):
(WTF::DOMJITNode::createStructure):
(WTF::DOMJITNode::checkSubClassSnippet):
(WTF::DOMJITNode::create):
(WTF::DOMJITNode::value const):
(WTF::DOMJITNode::offsetOfValue):
(WTF::DOMJITGetter::DOMJITGetter):
(WTF::DOMJITGetter::createStructure):
(WTF::DOMJITGetter::create):
(WTF::DOMJITGetter::DOMJITAttribute::DOMJITAttribute):
(WTF::DOMJITGetter::DOMJITAttribute::slowCall):
(WTF::DOMJITGetter::DOMJITAttribute::callDOMGetter):
(WTF::DOMJITGetter::customGetter):
(WTF::DOMJITGetter::finishCreation):
(WTF::DOMJITGetterComplex::DOMJITGetterComplex):
(WTF::DOMJITGetterComplex::createStructure):
(WTF::DOMJITGetterComplex::create):
(WTF::DOMJITGetterComplex::DOMJITAttribute::DOMJITAttribute):
(WTF::DOMJITGetterComplex::DOMJITAttribute::slowCall):
(WTF::DOMJITGetterComplex::DOMJITAttribute::callDOMGetter):
(WTF::DOMJITGetterComplex::functionEnableException):
(WTF::DOMJITGetterComplex::customGetter):
(WTF::DOMJITGetterComplex::finishCreation):
(WTF::DOMJITFunctionObject::DOMJITFunctionObject):
(WTF::DOMJITFunctionObject::createStructure):
(WTF::DOMJITFunctionObject::create):
(WTF::DOMJITFunctionObject::safeFunction):
(WTF::DOMJITFunctionObject::unsafeFunction):
(WTF::DOMJITFunctionObject::checkSubClassSnippet):
(WTF::DOMJITFunctionObject::finishCreation):
(WTF::DOMJITCheckSubClassObject::DOMJITCheckSubClassObject):
(WTF::DOMJITCheckSubClassObject::createStructure):
(WTF::DOMJITCheckSubClassObject::create):
(WTF::DOMJITCheckSubClassObject::safeFunction):
(WTF::DOMJITCheckSubClassObject::unsafeFunction):
(WTF::DOMJITCheckSubClassObject::finishCreation):
(WTF::DOMJITGetterBaseJSObject::DOMJITGetterBaseJSObject):
(WTF::DOMJITGetterBaseJSObject::createStructure):
(WTF::DOMJITGetterBaseJSObject::create):
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::DOMJITAttribute):
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::slowCall):
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::callDOMGetter):
(WTF::DOMJITGetterBaseJSObject::customGetter):
(WTF::DOMJITGetterBaseJSObject::finishCreation):
(WTF::Message::releaseContents):
(WTF::Message::index const):
(WTF::JSTestCustomGetterSetter::JSTestCustomGetterSetter):
(WTF::JSTestCustomGetterSetter::create):
(WTF::JSTestCustomGetterSetter::createStructure):
(WTF::customGetAccessor):
(WTF::customGetValue):
(WTF::customSetAccessor):
(WTF::customSetValue):
(WTF::JSTestCustomGetterSetter::finishCreation):
(WTF::Element::handleOwner):
(WTF::Element::finishCreation):
(JSC::functionCrash):
(JSC::functionCreateProxy):
(JSC::functionCreateRuntimeArray):
(JSC::functionCreateImpureGetter):
(JSC::functionCreateCustomGetterObject):
(JSC::functionCreateDOMJITNodeObject):
(JSC::functionCreateDOMJITGetterObject):
(JSC::functionCreateDOMJITGetterComplexObject):
(JSC::functionCreateDOMJITFunctionObject):
(JSC::functionCreateDOMJITCheckSubClassObject):
(JSC::functionCreateDOMJITGetterBaseJSObject):
(JSC::functionSetImpureGetterDelegate):
(JSC::functionCreateBuiltin):
(JSC::functionCreateRoot):
(JSC::functionCreateElement):
(JSC::functionGetElement):
(JSC::functionCreateSimpleObject):
(JSC::functionGetHiddenValue):
(JSC::functionSetHiddenValue):
(JSC::functionShadowChickenFunctionsOnStack):
(JSC::functionSetGlobalConstRedeclarationShouldNotThrow):
(JSC::functionFindTypeForExpression):
(JSC::functionReturnTypeFor):
(JSC::functionDumpBasicBlockExecutionRanges):
(JSC::functionHasBasicBlockExecuted):
(JSC::functionBasicBlockExecutionCount):
(JSC::functionEnableExceptionFuzz):
(JSC::functionGlobalObjectForObject):
(JSC::functionGetGetterSetter):
(JSC::functionLoadGetterFromGetterSetter):
(JSC::functionCreateCustomTestGetterSetter):
(JSC::JSDollarVM::finishCreation):
(JSC::JSDollarVM::addFunction):
(JSC::JSDollarVM::addConstructibleFunction):
* tools/JSDollarVM.h:
(JSC::JSDollarVM::create):
Tools:
Always set --useDollarVM=true for jsc runs of benchmarks. This is needed because
some microbenchmarks relies on createBuiltin().
Also set --useDollarVM=true for runExceptionFuzz and runExecutableAllocationFuzz.
* Scripts/run-jsc-benchmarks:
* Scripts/run-jsc-stress-tests:
LayoutTests:
* js/script-tests/stack-trace.js:
* js/stack-trace-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@225129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JSTests/heapProfiler/basic-edges.js b/JSTests/heapProfiler/basic-edges.js
index 985b7a2..aacf5bc 100644
--- a/JSTests/heapProfiler/basic-edges.js
+++ b/JSTests/heapProfiler/basic-edges.js
@@ -1,3 +1,6 @@
+var SimpleObject = $vm.SimpleObject;
+var setHiddenValue = $vm.setHiddenValue;
+
load("./driver/driver.js");
function excludeStructure(edges) {