haikuwebkit/JSTests/stress/argument-intrinsic-inlining...

24 lines
454 B
JavaScript
Raw Permalink Normal View History

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: Canonical link: https://commits.webkit.org/195997@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-24 10:58:16 +00:00
var createBuiltin = $vm.createBuiltin;
[JSC] Avoid cloned arguments allocation in ArrayPrototype methods https://bugs.webkit.org/show_bug.cgi?id=164502 Reviewed by Saam Barati. JSTests: * stress/argument-intrinsic-basic.js: Added. (shouldBe): (builtin.createBuiltin): * stress/argument-intrinsic-inlining-with-result-escape.js: Added. (shouldBe): (builtin.createBuiltin): (escape): * stress/argument-intrinsic-nested-inlining.js: Added. (shouldBe): (builtin.createBuiltin): (builtinCaller1): (builtinCaller2): (escape): * stress/argument-intrinsic-not-convert-to-get-argument.js: Added. (shouldBe): (builtin.createBuiltin): * stress/argument-intrinsic-with-stack-write.js: Added. (shouldBe): (builtin.createBuiltin): Source/JavaScriptCore: In many builtin functions, we use `arguments` to just get optional parameters. While FTL argument elimination can drop `arguments` allocations, it leaves the allocations in LLInt, Baseline, and DFG. And we found that DFG compiled Array#map is heavily used in ES6SampleBench/Basic. And it always creates a meaningless ClonedArguments. Using ES6 default parameter here is not a solution. It increases the number of parameters of the CodeBlock (not `function.length`). And the optional parameters in Array.prototype.xxx methods are not typically passed. For example, we typically do not pass `thisArg` to `Array.prototype.map` function. In this case, the arity check frequently fails. It requires the additional C call to fixup arguments and it becomes pure overhead. To solve this problem, this patch introduces a new bytecode intrinsic @argument(). This offers the way to retrieve the argument value without increasing the arity of the function. And if the argument is not passed (out of bounds), it just returns `undefined`. The semantics of this intrinsic is the same to the C++ ExecState::argument(). This operation does not require `arguments` object. And we can drop the `argument` references even in lower 3 tiers. We implement op_get_argument for this intrinsic. And later this will be converted to DFG GetArgument node. All the tiers handles this feature. This patch improves ES6SampleBench/Basic 13.8% in steady state. And in summary, it improves 4.5%. In the future, we can improve the implementation of the default parameters. Currently, the default parameter always increases the arity of the function. So if you do not pass the argument, the arity check fails. But since it is the default parameter, it is likely that we don't pass the argument. Using op_get_argument to implement the default parameter can decrease the case in which the arity check frequently fails. And it can change the builtin implementation to use the ES6 default parameters instead of using the special @argument() intrinsic in the future. And at that case, the user code also receives the benefit. ES6SampleBench/Basic. Baseline: Running... Basic ( 1 to go) firstIteration: 39.38 ms +- 4.48 ms averageWorstCase: 20.79 ms +- 0.96 ms steadyState: 1959.22 ms +- 65.55 ms Patched: Running... Basic ( 1 to go) firstIteration: 37.85 ms +- 4.09 ms averageWorstCase: 18.60 ms +- 0.76 ms steadyState: 1721.89 ms +- 57.58 ms All summary. Baseline: summary: 164.34 ms +- 5.01 ms Patched: summary: 157.26 ms +- 5.96 ms * builtins/ArrayConstructor.js: * builtins/ArrayPrototype.js: (reduce): (reduceRight): (every): (forEach): (filter): (map): (some): (fill): (find): (findIndex): (includes): (copyWithin): * builtins/DatePrototype.js: (toLocaleString): (toLocaleDateString): (toLocaleTimeString): * builtins/MapPrototype.js: (forEach): * builtins/NumberPrototype.js: (toLocaleString): * builtins/SetPrototype.js: (forEach): * builtins/StringPrototype.js: (padStart): (padEnd): (localeCompare): * builtins/TypedArrayConstructor.js: * builtins/TypedArrayPrototype.js: (every): (fill): (find): (findIndex): (forEach): (some): (reduce): (reduceRight): (map): (filter): * bytecode/BytecodeIntrinsicRegistry.h: * bytecode/BytecodeList.json: * bytecode/BytecodeUseDef.h: (JSC::computeUsesForBytecodeOffset): (JSC::computeDefsForBytecodeOffset): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dumpBytecode): (JSC::CodeBlock::finishCreation): * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitGetArgument): * bytecompiler/BytecodeGenerator.h: * bytecompiler/NodesCodegen.cpp: (JSC::BytecodeIntrinsicNode::emit_intrinsic_argument): * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): * dfg/DFGCapabilities.cpp: (JSC::DFG::capabilityLevel): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGNode.h: (JSC::DFG::Node::hasHeapPrediction): (JSC::DFG::Node::hasArgumentIndex): (JSC::DFG::Node::argumentIndex): * dfg/DFGNodeType.h: * dfg/DFGPreciseLocalClobberize.h: (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop): * dfg/DFGPredictionPropagationPhase.cpp: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileGetArgument): * dfg/DFGSpeculativeJIT.h: * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileGetArgument): * jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): * jit/JIT.h: * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_get_argument): * jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_get_argument): * llint/LowLevelInterpreter32_64.asm: * llint/LowLevelInterpreter64.asm: Canonical link: https://commits.webkit.org/182249@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-10 06:34:05 +00:00
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var builtin = createBuiltin(`(function (a) {
return @argument(0);
})`);
function escape(value)
{
return value;
}
noInline(escape);
(function () {
for (var i = 0; i < 1e4; ++i) {
shouldBe(escape(builtin()), undefined);
shouldBe(escape(builtin(42)), 42);
}
}());