Closed Bug 875912 Opened 11 years ago Closed 11 years ago

Unnecessary or with 0 in IonMacroAssembler.cpp

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: sunfish, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

MacroAssembler::performOsr bitwise-ors the value of CalleeToken_Function into the calleeToken register, however, the value is zero, so this is a no-op.
Attached patch a proposed fix (obsolete) — Splinter Review
Attachment #753930 - Flags: review?(davidanderson)
Attachment #753930 - Flags: review?(davidanderson) → review?(dvander)
Comment on attachment 753930 [details] [diff] [review]
a proposed fix

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

I think you meant to type ":dvander" in the review field?

::: js/src/ion/IonMacroAssembler.cpp
@@ +691,5 @@
>      {
>          // Function - create the callee token, then get the script.
> +
> +        // Skip the or here since CalleeToken_Function is zero.
> +        JS_ASSERT(CalleeToken_Function == 0);

nit: You can get rid of the comment, the assertion is clear enough.

@@ +692,5 @@
>          // Function - create the callee token, then get the script.
> +
> +        // Skip the or here since CalleeToken_Function is zero.
> +        JS_ASSERT(CalleeToken_Function == 0);
> +        //orPtr(Imm32(CalleeToken_Function), calleeToken);

nit: add a space between // and orPtr.
Attachment #753930 - Flags: review?(dvander) → feedback+
Attachment #753930 - Flags: review?(dvander)
Attached patch an updated patchSplinter Review
Updated per nbp's comments.
Attachment #753930 - Attachment is obsolete: true
Attachment #753930 - Flags: review?(dvander)
Attachment #753969 - Flags: review?(dvander)
dvander, ping?
Comment on attachment 753969 [details] [diff] [review]
an updated patch

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

::: js/src/ion/IonMacroAssembler.cpp
@@ +692,5 @@
>          // Function - create the callee token, then get the script.
> +
> +        JS_ASSERT(CalleeToken_Function == 0);
> +        // orPtr(Imm32(CalleeToken_Function), calleeToken);
> +

nit: you can remove the line, no need to comment it out
Attachment #753969 - Flags: review?(dvander) → review+
https://hg.mozilla.org/mozilla-central/rev/ef21d8d6f037
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: