Non-existent category "Debugger" for JSOP_DEBUGAFTERYIELD.

RESOLVED FIXED in mozilla36

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: arai, Assigned: arai)

Tracking

Trunk
mozilla36
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
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
(Assignee)

Updated

4 years ago
Blocks: 1032869
(Assignee)

Comment 1

4 years ago
Created attachment 8525886 [details] [diff] [review]
Fix category/type of JSOP_DEBUGAFTERYIELD for bytecode documentation.

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+
(Assignee)

Comment 3

4 years ago
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.
(Assignee)

Comment 5

4 years ago
filed as bug 1102315.
https://hg.mozilla.org/mozilla-central/rev/ee52bc098176
Assignee: nobody → arai_a
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.