Closed Bug 1099517 Opened 10 years ago Closed 10 years ago

Non-existent category "Debugger" for JSOP_DEBUGAFTERYIELD.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

JSOP_DEBUGAFTERYIELD has "Category: Debugger" in its documentation comment, but it's not listed in categorization comment at the top of Opcodes.h.
http://hg.mozilla.org/mozilla-central/file/acbd7b68fa8c/js/src/vm/Opcodes.h#l1622
>    /*
>     * Bytecode emitted after 'yield' statements to help the Debugger
>     * fix up the frame in the JITs. No-op in the interpreter.
>     *
>     *   Category: Debugger
>     *   Operands:
>     *   Stack: =>
>     */ \
>    macro(JSOP_DEBUGAFTERYIELD,  208, "debugafteryield",  NULL,  1,  0,  0,  JOF_BYTE) \

I guess it's "Category: Statements" and "Type: Debugger".

I updated documentation with those category/type for now.
  https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/Bytecode
Blocks: 1032869
Simple comment only fix.
Attachment #8525886 - Flags: review?(jdemooij)
Comment on attachment 8525886 [details] [diff] [review]
Fix category/type of JSOP_DEBUGAFTERYIELD for bytecode documentation.

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

Thanks!

::: js/src/vm/Opcodes.h
@@ +1619,5 @@
>       */ \
>      macro(JSOP_FORCEINTERPRETER, 207, "forceinterpreter", NULL,  1,  0,  0,  JOF_BYTE) \
>      \
>      /*
>       * Bytecode emitted after 'yield' statements to help the Debugger

Can you s/statements/expressions/ while you're here? See below.

@@ +1622,5 @@
>      /*
>       * Bytecode emitted after 'yield' statements to help the Debugger
>       * fix up the frame in the JITs. No-op in the interpreter.
>       *
> +     *   Category: Statements

To be pedantic, `yield` is not a statement but an expression, it can return the value you pass to next(): function*() { print(yield 3); }

So maybe it should be "Operators"?
Attachment #8525886 - Flags: review?(jdemooij) → review+
Thank you for reviewing!

Okay, I added "Type: Debugger" to "Category: Operator".
Actually, it should be "Operators" as you wrote, but other opcodes and the list uses "Operator" by my mistake...
I'll file a bug for it.
filed as bug 1102315.
https://hg.mozilla.org/mozilla-central/rev/ee52bc098176
Assignee: nobody → arai_a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.