Closed
Bug 842264
Opened 12 years ago
Closed 12 years ago
BaselineCompiler: Add SETELEM stub for typed arrays
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
djvj
:
review+
|
Details | Diff | Splinter Review |
Looking at some Emscripten benchmarks, we are currently spending most time in SETELEM VM calls.
Assignee | ||
Comment 1•12 years ago
|
||
Adds a stub which handles storing int32 and doubles values to typed arrays. With this patch we spend most time in JIT code on Emscripten-generated code.
Attachment #715148 -
Flags: review?(kvijayan)
Comment 2•12 years ago
|
||
Comment on attachment 715148 [details] [diff] [review]
Patch
Review of attachment 715148 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/BaselineIC.cpp
@@ +3053,5 @@
> + Register key = masm.extractInt32(R1, ExtractTemp1);
> +
> + // Bounds check.
> + masm.unboxInt32(Address(obj, TypedArray::lengthOffset()), scratchReg);
> + masm.branch32(Assembler::BelowOrEqual, scratchReg, key, &failure);
Add jump to failure on key < 0.
Attachment #715148 -
Flags: review?(kvijayan) → review+
Assignee | ||
Comment 3•12 years ago
|
||
https://hg.mozilla.org/projects/ionmonkey/rev/fc9de695de03
(In reply to Kannan Vijayan [:djvj] from comment #2)
> Add jump to failure on key < 0.
The bounds check is unsigned, so it handles this case. See also the dense array stubs and the other JITs.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•