diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-14 11:33:28 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-14 11:33:28 +0000 |
commit | 7d93d4989f49bfcb1aa6b87f81332332a750c49c (patch) | |
tree | 902bb1f380bbc98145df691536aa652b216c1bfe /js/src/jit/VMFunctions.cpp | |
parent | e913687dc585606e50550ad77e2d8a744b5e6493 (diff) | |
download | UXP-7d93d4989f49bfcb1aa6b87f81332332a750c49c.tar UXP-7d93d4989f49bfcb1aa6b87f81332332a750c49c.tar.gz UXP-7d93d4989f49bfcb1aa6b87f81332332a750c49c.tar.lz UXP-7d93d4989f49bfcb1aa6b87f81332332a750c49c.tar.xz UXP-7d93d4989f49bfcb1aa6b87f81332332a750c49c.zip |
Replace SetOrExtendBoxedOrUnboxedDenseElements with direct calls.
Diffstat (limited to 'js/src/jit/VMFunctions.cpp')
-rw-r--r-- | js/src/jit/VMFunctions.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 7b1e1cad6..297357b1e 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -337,12 +337,11 @@ ArrayPopDense(JSContext* cx, HandleObject obj, MutableHandleValue rval) } bool -ArrayPushDense(JSContext* cx, HandleObject obj, HandleValue v, uint32_t* length) +ArrayPushDense(JSContext* cx, HandleArrayObject arr, HandleValue v, uint32_t* length) { - *length = obj->as<ArrayObject>().length(); - DenseElementResult result = - SetOrExtendBoxedOrUnboxedDenseElements(cx, obj, *length, v.address(), 1, - ShouldUpdateTypes::DontUpdate); + *length = arr->length(); + DenseElementResult result = arr->setOrExtendDenseElements(cx, *length, v.address(), 1, + ShouldUpdateTypes::DontUpdate); if (result != DenseElementResult::Incomplete) { (*length)++; return result == DenseElementResult::Success; @@ -350,7 +349,7 @@ ArrayPushDense(JSContext* cx, HandleObject obj, HandleValue v, uint32_t* length) JS::AutoValueArray<3> argv(cx); argv[0].setUndefined(); - argv[1].setObject(*obj); + argv[1].setObject(*arr); argv[2].set(v); if (!js::array_push(cx, 1, argv.begin())) return false; @@ -1143,16 +1142,14 @@ Recompile(JSContext* cx) } bool -SetDenseOrUnboxedArrayElement(JSContext* cx, HandleObject obj, int32_t index, - HandleValue value, bool strict) +SetDenseElement(JSContext* cx, HandleNativeObject obj, int32_t index, HandleValue value, bool strict) { // This function is called from Ion code for StoreElementHole's OOL path. - // In this case we know the object is native or an unboxed array and that - // no type changes are needed. + // In this case we know the object is native and that no type changes are + // needed. - DenseElementResult result = - SetOrExtendBoxedOrUnboxedDenseElements(cx, obj, index, value.address(), 1, - ShouldUpdateTypes::DontUpdate); + DenseElementResult result = obj->setOrExtendDenseElements(cx, index, value.address(), 1, + ShouldUpdateTypes::DontUpdate); if (result != DenseElementResult::Incomplete) return result == DenseElementResult::Success; |