diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-07-14 19:04:52 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:46 -0400 |
commit | 85aeff765ea921ea2c947fa9d68756eb989b6287 (patch) | |
tree | 827d8b39cfe8bfd8a972ef1fa92fa07bd5a8415c /js/src/jit/MCallOptimize.cpp | |
parent | 449ea84dcc7dffb2f042fc414eb7238ae842d596 (diff) | |
download | UXP-85aeff765ea921ea2c947fa9d68756eb989b6287.tar UXP-85aeff765ea921ea2c947fa9d68756eb989b6287.tar.gz UXP-85aeff765ea921ea2c947fa9d68756eb989b6287.tar.lz UXP-85aeff765ea921ea2c947fa9d68756eb989b6287.tar.xz UXP-85aeff765ea921ea2c947fa9d68756eb989b6287.zip |
1344477 - Part 2: Optimize Array.prototype.splice with JSOP_NORVCALL.
Diffstat (limited to 'js/src/jit/MCallOptimize.cpp')
-rw-r--r-- | js/src/jit/MCallOptimize.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp index 359f04639..5eee30e49 100644 --- a/js/src/jit/MCallOptimize.cpp +++ b/js/src/jit/MCallOptimize.cpp @@ -85,8 +85,6 @@ IonBuilder::inlineNativeCall(CallInfo& callInfo, JSFunction* target) return inlineArrayPush(callInfo); case InlinableNative::ArraySlice: return inlineArraySlice(callInfo); - case InlinableNative::ArraySplice: - return inlineArraySplice(callInfo); // Atomic natives. case InlinableNative::AtomicsCompareExchange: @@ -654,46 +652,6 @@ IonBuilder::inlineArrayPopShift(CallInfo& callInfo, MArrayPopShift::Mode mode) } IonBuilder::InliningStatus -IonBuilder::inlineArraySplice(CallInfo& callInfo) -{ - if (callInfo.argc() != 2 || callInfo.constructing()) { - trackOptimizationOutcome(TrackedOutcome::CantInlineNativeBadForm); - return InliningStatus_NotInlined; - } - - // Ensure |this|, argument and result are objects. - if (getInlineReturnType() != MIRType::Object) - return InliningStatus_NotInlined; - if (callInfo.thisArg()->type() != MIRType::Object) - return InliningStatus_NotInlined; - if (callInfo.getArg(0)->type() != MIRType::Int32) - return InliningStatus_NotInlined; - if (callInfo.getArg(1)->type() != MIRType::Int32) - return InliningStatus_NotInlined; - - callInfo.setImplicitlyUsedUnchecked(); - - // Specialize arr.splice(start, deleteCount) with unused return value and - // avoid creating the result array in this case. - if (!BytecodeIsPopped(pc)) { - trackOptimizationOutcome(TrackedOutcome::CantInlineGeneric); - return InliningStatus_NotInlined; - } - - MArraySplice* ins = MArraySplice::New(alloc(), - callInfo.thisArg(), - callInfo.getArg(0), - callInfo.getArg(1)); - - current->add(ins); - pushConstant(UndefinedValue()); - - if (!resumeAfter(ins)) - return InliningStatus_Error; - return InliningStatus_Inlined; -} - -IonBuilder::InliningStatus IonBuilder::inlineArrayJoin(CallInfo& callInfo) { if (callInfo.argc() != 1 || callInfo.constructing()) { |