Version 2 (modified by whiteknight, 13 years ago)

add two changes from Coke++

This page is going to talk about steps involved in fixing the Parrot API.

Function Renaming

All API functions should be renamed Parrot_<subsys>_<funcname>. Where <subsys> will be one of these two- or three-letter codes:

  • gc: Garbage collector (in src/gc/*)
  • ex: Exceptions
  • pmc: PMC system
  • oo: Object system
  • io: IO system (in src/io/*)
  • str: String system (in src/string/*)
  • pcc: calling conventions (in src/call/*)
  • int: Parrot interpreter (in src/interp/*)
  • pf: Packfiles (in src/packfile/*)
  • rc: Runcores (in src/runcore/*)
  • jit: Just In Time compiler (in src/jit/*)
  • ee: Extending and Embedding
  • hll: High Level Languages
  • mmd: multiple dispatch
  • nci: native call interface
  • cx: concurrency scheduler
  • thr: Parrot threads

File Moving

Some files from src/* need to be moved into subdirectories and broken up into separate systems. For example, System "Foo" needs to be moved to /src/foo/*, where src/foo/api.c is the main public interface to the subsystem, src/foo/foo_private.h is the private header file for the subsystem, and other files are named src/foo/foo_*.c. Big files in src/* have priority for moving and breaking up into multiple files. Here are a list of some of the biggest (> 50kb) source files in src/:

  • debug.c
  • jit.c
  • list.c
  • packfile.c (could be moved together with packdump.c and packout.c)
  • pmc_freeze.c
  • thread.c