Ticket #104 (closed bug: fixed)

Opened 6 years ago

Last modified 4 years ago

interpinfo.pasm constants don't match docs in core.ops

Reported by: coke Owned by:
Priority: minor Milestone:
Component: docs Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

The constants in this generated file (presumably correct) need to be documented, and the old ones removed.

Attachments

current_runcore.patch Download (0.5 KB) - added by jkeenan 4 years ago.
.RUNCORE -> .CURRENT_RUNCORE

Change History

Changed 5 years ago by jkeenan

Some info. Here's what I get for generated file runtime/parrot/include/interpinfo.pasm:

.macro_const INTERPINFO_TOTAL_MEM_ALLOC 1
.macro_const INTERPINFO_GC_MARK_RUNS    2
.macro_const INTERPINFO_GC_COLLECT_RUNS 3
.macro_const INTERPINFO_ACTIVE_PMCS     4
.macro_const INTERPINFO_ACTIVE_BUFFERS  5
.macro_const INTERPINFO_TOTAL_PMCS      6
.macro_const INTERPINFO_TOTAL_BUFFERS   7
.macro_const INTERPINFO_HEADER_ALLOCS_SINCE_COLLECT     8
.macro_const INTERPINFO_MEM_ALLOCS_SINCE_COLLECT        9
.macro_const INTERPINFO_TOTAL_COPIED    10
.macro_const INTERPINFO_IMPATIENT_PMCS  11
.macro_const INTERPINFO_GC_LAZY_MARK_RUNS       12
.macro_const INTERPINFO_EXTENDED_PMCS   13
.macro_const INTERPINFO_CURRENT_RUNCORE 14
.macro_const INTERPINFO_CURRENT_SUB     15
.macro_const INTERPINFO_CURRENT_CONT    16
.macro_const INTERPINFO_CURRENT_OBJECT  17
.macro_const INTERPINFO_CURRENT_LEXPAD  18
.macro_const INTERPINFO_EXECUTABLE_FULLNAME     19
.macro_const INTERPINFO_EXECUTABLE_BASENAME     20
.macro_const INTERPINFO_RUNTIME_PREFIX  21

And here's the relevant docs from src/ops/core.ops:

       interpinfo
           Fetch some piece of information about the interpreter and put it in
           $1.  Possible values for $2 are defined in
           runtime/parrot/include/interpinfo.pasm.  The valid constants for
           each return value are:

           interpinfo(out INT, in INT)
               .TOTAL_MEM_ALLOC, .GC_MARK_RUNS, .GC_COLLECT_RUNS,
               .ACTIVE_PMCS, .ACTIVE_BUFFERS, .TOTAL_PMCS, .TOTAL_BUFFERS,
               .HEADER_ALLOCS_SINCE_COLLECT, .MEM_ALLOCS_SINCE_COLLECT,
               .TOTAL_COPIED, .IMPATIENT_PMCS, .GC_LAZY_MARK_RUNS,
               .EXTENDED_PMCS, .RUNCORE

           interpinfo(out PMC, in INT)
               .CURRENT_SUB, .CURRENT_CONT, .CURRENT_OBJECT, .CURRENT_LEXPAD

           interpinfo(out STR, in INT)
               .EXECUTABLE_FULLNAME, .EXECUTABLE_BASENAME, .RUNTIME_PREFIX

Stripping off .macro_constant INTERPINFO_ from the former and doing some word processing on the latter, then diff-ing, I get:

diff -w firstcolumn.interpinfo.pasm interpinfo.txt 
14c14
< CURRENT_RUNCORE
---
> RUNCORE

as the only difference apparent to the naive observer.

Where do we go from here?

Thank you very much.
kid51

Changed 4 years ago by jkeenan

Would the patch attached partially satisfy the objectives of this ticket?

kid51

Changed 4 years ago by jkeenan

.RUNCORE -> .CURRENT_RUNCORE

Changed 4 years ago by cotto

I've updated the inline pod in src/ops/core.ops in r49522 with jkeenan's patch. Is this enough to close this ticket?

Changed 4 years ago by NotFound

  • status changed from new to closed
  • resolution set to fixed

Drop the pointless dots that doesn't make sense if the INTERPINFO_PREFIX is omitted and added a minimal explanation in  https://github.com/parrot/parrot/commit/7059420b7dd60bed4dff875a1510e4ad78adaf43

Closing.

Note: See TracTickets for help on using tickets.