diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-10 16:49:47 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-10 16:49:47 +0000 |
commit | e34920575d6dac353cb3d8a5d1b9c11ae05c5a8c (patch) | |
tree | f708c8a5535065b7011319655af8af8bd82b8405 /js/src/jit/MCallOptimize.cpp | |
parent | ba9e648ce2705ad1c4679325a9326c47263e2a3e (diff) | |
download | UXP-e34920575d6dac353cb3d8a5d1b9c11ae05c5a8c.tar UXP-e34920575d6dac353cb3d8a5d1b9c11ae05c5a8c.tar.gz UXP-e34920575d6dac353cb3d8a5d1b9c11ae05c5a8c.tar.lz UXP-e34920575d6dac353cb3d8a5d1b9c11ae05c5a8c.tar.xz UXP-e34920575d6dac353cb3d8a5d1b9c11ae05c5a8c.zip |
Inline combined methods for NativeObject and UnboxedArrayObject accesses.
Diffstat (limited to 'js/src/jit/MCallOptimize.cpp')
-rw-r--r-- | js/src/jit/MCallOptimize.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp index 748a70973..0d5779cee 100644 --- a/js/src/jit/MCallOptimize.cpp +++ b/js/src/jit/MCallOptimize.cpp @@ -522,7 +522,7 @@ IonBuilder::inlineArray(CallInfo& callInfo) // Make sure initLength matches the template object's length. This is // not guaranteed to be the case, for instance if we're inlining the // MConstant may come from an outer script. - if (initLength != GetAnyBoxedOrUnboxedArrayLength(templateObject)) + if (initLength != templateObject->as<ArrayObject>().length()) return InliningStatus_NotInlined; // Don't inline large allocations. @@ -1396,7 +1396,7 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo) // Check if exist a template object in stub. JSString* stringStr = nullptr; JSString* stringSep = nullptr; - JSObject* templateObject = nullptr; + ArrayObject* templateObject = nullptr; if (!inspector->isOptimizableCallStringSplit(pc, &stringStr, &stringSep, &templateObject)) return InliningStatus_NotInlined; @@ -1422,13 +1422,13 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo) if (!key.maybeTypes()->hasType(TypeSet::StringType())) return InliningStatus_NotInlined; - uint32_t initLength = GetAnyBoxedOrUnboxedArrayLength(templateObject); - if (GetAnyBoxedOrUnboxedInitializedLength(templateObject) != initLength) + uint32_t initLength = templateObject->length(); + if (templateObject->getDenseInitializedLength() != initLength) return InliningStatus_NotInlined; Vector<MConstant*, 0, SystemAllocPolicy> arrayValues; for (uint32_t i = 0; i < initLength; i++) { - Value str = GetAnyBoxedOrUnboxedDenseElement(templateObject, i); + Value str = templateObject->getDenseElement(i); MOZ_ASSERT(str.toString()->isAtom()); MConstant* value = MConstant::New(alloc().fallible(), str, constraints()); if (!value) |