Closed Bug 924649 Opened 6 years ago Closed 6 years ago

Add extraName() to more LInstruction subclasses

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: sunfish, Assigned: sunfish)

Details

Attachments

(2 files)

When reading debugging output, it's often handy to know what kind of LShiftI something is, what type is being Boxed, or what math function is being called.
Attachment #814587 - Flags: review?(jdemooij)
Attachment #814588 - Flags: review?(jdemooij)
Component: JavaScript Engine → JavaScript Engine: JIT
Comment on attachment 814587 [details] [diff] [review]
lir-extranames.patch

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

::: js/src/jit/CodeGenerator.cpp
@@ +2767,5 @@
>          perfSpewer->startBasicBlock(current->mir(), masm);
>  #endif
>  
>          for (; iter != current->end(); iter++) {
> +            if (const char *extra = iter->extraName())

Nit: can you wrap this "if" in an #ifdef DEBUG?
Attachment #814587 - Flags: review?(jdemooij) → review+
Comment on attachment 814588 [details] [diff] [review]
math-function-names.patch

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

::: js/src/jit/MIR.h
@@ +3671,5 @@
>      }
> +
> +    void printOpcode(FILE *fp) const;
> +
> +    static const char *functionName(Function function);

Nit: static method so FunctionName
Attachment #814588 - Flags: review?(jdemooij) → review+
(In reply to Jan de Mooij [:jandem] from comment #2)
> @@ +2767,5 @@
> >          perfSpewer->startBasicBlock(current->mir(), masm);
> >  #endif
> >  
> >          for (; iter != current->end(); iter++) {
> > +            if (const char *extra = iter->extraName())
> 
> Nit: can you wrap this "if" in an #ifdef DEBUG?

Done.

(In reply to Jan de Mooij [:jandem] from comment #3)
> @@ +3671,5 @@
> >      }
> > +
> > +    void printOpcode(FILE *fp) const;
> > +
> > +    static const char *functionName(Function function);
> 
> Nit: static method so FunctionName

Done.

https://hg.mozilla.org/integration/mozilla-inbound/rev/06a14dd30924
https://hg.mozilla.org/integration/mozilla-inbound/rev/66369a6578f7
You need to log in before you can comment on or make changes to this bug.