summaryrefslogtreecommitdiff
path: root/js/src/jit/BaselineCompiler.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-12 03:19:09 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-12 03:19:09 +0000
commited227c628b7e940c092bbe98dfe65f0f177fc90f (patch)
tree38c9c7a6b5f482d81bdfec1cf81ebc7bbb234800 /js/src/jit/BaselineCompiler.cpp
parentf9dff37d4efb5c623b11a2a804861639b0cb4019 (diff)
downloaduxp-ed227c628b7e940c092bbe98dfe65f0f177fc90f.tar.gz
Make use of ArrayObjects in favor of generic JS objects.
ArrayObjects has been a thing for years but been under-used. About time they are used where prudent.
Diffstat (limited to 'js/src/jit/BaselineCompiler.cpp')
-rw-r--r--js/src/jit/BaselineCompiler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/src/jit/BaselineCompiler.cpp b/js/src/jit/BaselineCompiler.cpp
index 3fa5a80ed6..93e3759b91 100644
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -2055,7 +2055,7 @@ BaselineCompiler::emit_JSOP_SPREADCALLARRAY()
return emit_JSOP_NEWARRAY();
}
-typedef JSObject* (*NewArrayCopyOnWriteFn)(JSContext*, HandleArrayObject, gc::InitialHeap);
+typedef ArrayObject* (*NewArrayCopyOnWriteFn)(JSContext*, HandleArrayObject, gc::InitialHeap);
const VMFunction jit::NewArrayCopyOnWriteInfo =
FunctionInfo<NewArrayCopyOnWriteFn>(js::NewDenseCopyOnWriteArray, "NewDenseCopyOnWriteArray");
@@ -4136,14 +4136,14 @@ BaselineCompiler::emit_JSOP_REST()
{
frame.syncStack(0);
- JSObject* templateObject =
+ ArrayObject* templateObject =
ObjectGroup::newArrayObject(cx, nullptr, 0, TenuredObject,
ObjectGroup::NewArrayKind::UnknownIndex);
if (!templateObject)
return false;
// Call IC.
- ICRest_Fallback::Compiler compiler(cx, &templateObject->as<ArrayObject>());
+ ICRest_Fallback::Compiler compiler(cx, templateObject);
if (!emitOpIC(compiler.getStub(&stubSpace_)))
return false;