Open Bug 1109052 Opened 10 years ago Updated 1 year ago

IonMonkey: Implement RToString Recover Instruction

Categories

(Core :: JavaScript Engine: JIT, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: nbp, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Implement RToString in js/src/jit/Recover.cpp.
See Bug 1003801 comment 0 for explanation.
I would like to work on this if no one is assigned yet.
I will assign you on this bug as soon as you attach a patch.
Attached patch bug1109052.patchSplinter Review
Hi!
This is my first bug.

I created a pach for this bug, but I'm not confident at 100% that is all right. 
Can you tell me what is wrong? 

Thanks.
Attachment #8543179 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8543179 [details] [diff] [review]
bug1109052.patch

Review of attachment 8543179 [details] [diff] [review]:
-----------------------------------------------------------------

This patch looks good, but I think the following test case will fail:


var uceFault_rtostring_object = eval(uneval(uceFault).replace('uceFault', 'uceFault_rtostring_object'));
function rtostring_object(i) {
    var t = i;
    var o = { toString: function () { return "" + t; } };
    var x = "" + o; /* computed with t == i, not 1000 */
    t = 1000;
    if (uceFault_rtostring_object(i) || uceFault_rtostring_object(i))
        assertEq(x, "99");
    return i;
}

::: js/src/jit/MIR.h
@@ +4660,5 @@
>          return input()->mightBeType(MIRType_Object);
>      }
>  
> +    bool writeRecoverData(CompactBufferWriter &writer) const;
> +    

nit: remove trailing white space.
Attachment #8543179 - Flags: review?(nicolas.b.pierron) → feedback+
Assignee: nobody → dev.siroibaf
Status: NEW → ASSIGNED
I've added the rtostring_object test to the dce-with-rinstructions file.

If I understood correctly in the graph the function toString should be grey and not blue, but in both files they are blue. Did I forget something?
Flags: needinfo?(nicolas.b.pierron)
(In reply to Fabio Buso[:SirOibaf] from comment #7)
> If I understood correctly in the graph the function toString should be grey
> and not blue, but in both files they are blue. Did I forget something?

Indeed they should be grey, but only after the DCE (Eliminate Dead Code) is done.  In which case the branches disappear and the ToString instructions are no longer used except by the resume point of the blocks.

Also, I have no idea why MCallOptimize did not inline the call to toString in rtostring_number, can you investigate as well?
Flags: needinfo?(nicolas.b.pierron)
Fabio, are you still interested in finishing this?
Flags: needinfo?(dev.siroibaf)
Priority: -- → P5
Unassigning after not hearing anything for a month.
Assignee: dev.siroibaf → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(dev.siroibaf)
Type: defect → enhancement

Is this bug still valid ? If so, I would like to take a shot at fixing it.

(In reply to Abhishek Sharma from comment #11)

Is this bug still valid ? If so, I would like to take a shot at fixing it.

Yes, this bug is still valid.

Assignee: nobody → abhishekcs
Severity: normal → S3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: abhishekcs → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: