Linux SoftwareProgrammingLibrariesParrot::OpTrans 0.4.5

Parrot::OpTrans 0.4.5


Parrot::OpTrans is a Perl module that can transform Ops to C Code. Parrot::OpTrans is the abstract superclass for the Parrot op to
Developer:   The Parrot Project Team
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   3171K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Parrot::OpTrans is a Perl module that can transform Ops to C Code.

Parrot::OpTrans is the abstract superclass for the Parrot op to C transforms. Each transform contains various bits of information needed to generate the C code, and creates a different type of run loop. The methods defined here supply various default values and behaviour common to all transforms.

The subclass hierarchy is as follows:

OpTrans
|_________________________
| | |
C CGoto Compiled
| |
CPrederef |
| | |
| |_________|
| |
CSwitch CGP

Class Methods

new()

Returns a new instance.

Instance Methods

prefix()

Returns the default 'Parrot_' prefix.

Used by Parrot::Op's func_name() to individuate op function names.

suffix()

Implemented in subclasses to return a suffix with which to individuate variable names. This default implementation returns an empty string.

defines()

Implemented in subclasses to return the C #define macros required.

opsarraytype()

Returns the type for the array of opcodes. By default here it's an array opcode_t, but the prederef runops core uses an array of void* to do its clever tricks.

core_type()

Implemented in subclasses to return the type of core created by the transform. This default implementation raises an exception indicating that the core type is missing. See the Parrot_Run_core_t enum in include/parrot/interpreter.h for a list of the core types.

core_prefix()

Implemented in subclasses to return a short prefix indicating the core type used to individuate core function names.

run_core_func_decl($base)

Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the name of the main ops file minus the .ops extension.

ops_addr_decl($base_suffix)

Optionally implemented in subclasses to return the C code for the ops address declaration. $base_suffix is the name of the main ops file minus the .ops extension with suffix() and an underscore appended.

run_core_func_decl($base)

Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the same as for run_core_func_decl().

run_core_func_start()

Implemented in subclasses, if run_core_func_decl() is implemented, to return the C code prior to the run core function.

run_core_after_addr_table($base_suffix)

Optionally implemented in subclasses to return the run core C code for section after the address table. $base_suffix is the same as for ops_addr_decl().

run_core_finish($base)

Implemented in subclasses to return the C code following the run core function. $base is the same as for run_core_func_decl().

init_func_init1($base)

Optionally implemented in subclasses to return the C code for the core's init function. $base is the same as for run_core_func_decl().

init_set_dispatch($base_suffix)

Optionally implemented in subclasses to return the C code for initializing the dispatch mechanism within the core's init function. $base_suffix is the same as for ops_addr_decl().

Macro Substitutions

The following methods are called by Parrot::OpFile to perform ops file macro substitutions.

access_arg($type, $value, $op)

Implemented in subclasses to return the C code for the specified op argument type and value. $op is an instance of Parrot::Op.

gen_goto($where)

The various goto_X methods below call this method with the return value of an expr_X method (implemented in subclass).

restart_address($address)

Implemented in subclasses to return the C code for restart ADDRESS($address).

restart_offset($offset)

Implemented in subclasses to return the C code for restart OFFSET($offset).

goto_address($address)

Transforms the goto ADDRESS($address) macro in an ops file into the relevant C code.

goto_offset($offset)

Transforms the goto OFFSET($offset) macro in an ops file into the relevant C code.

goto_pop()

Transforms the goto POP($address) macro in an ops file into the relevant C code.

expr_offset($offset)

Implemented in subclasses to return the C code for OFFSET($offset). Called by goto_offset().

expr_address($address)

Implemented in subclasses to return the C code for ADDRESS($address). Called by goto_address().

Requirements:
  • Perl
    tags run core  return the  code for  core func  for the  offset offset  func decl  address address  optionally implemented  ops file  base suffix  the same  the run  

    Download Parrot::OpTrans 0.4.5


     http://mirrors.evolva.ro/CPAN/authors/id/L/LT/LTOETSCH/parrot-0.4.5.tar.gz


    Authors software

    Parrot::Pmc2c 0.4.5 (by The Parrot Project Team)
    Parrot::Pmc2c is a PMC to C Code Generation.

    SYNOPSIS

    use Parrot::Pmc2c;

    Parrot::Pmc2c (and the subclasses defined i

    Parrot::OpTrans 0.4.5 (by The Parrot Project Team)
    Parrot::OpTrans is a Perl module that can transform Ops to C Code.

    Parrot::OpTrans is the abstract superclass for the Parrot op to


    Similar software

    Parrot::OpTrans 0.4.5 (by The Parrot Project Team)
    Parrot::OpTrans is a Perl module that can transform Ops to C Code.

    Parrot::OpTrans is the abstract superclass for the Parrot op to

    Parrot::OpTrans::C 0.4.5 (by The Parrot Team)
    Parrot::OpTrans::C is a Perl module for Ops to C Code Generation.

    DESCRIPTION

    Parrot::OpTrans::C inherits from Parrot::OpTrans

    Parrot::Pmc2c 0.4.5 (by The Parrot Project Team)
    Parrot::Pmc2c is a PMC to C Code Generation.

    SYNOPSIS

    use Parrot::Pmc2c;

    Parrot::Pmc2c (and the subclasses defined i

    Audio::File::AudioProperties 0.10 (by Florian Ragwitz)
    Audio::File::AudioProperties is a Perl module that can abstract an audio file's audio properties.

    Audio::File::AudioProperties is

    Audio::TagLib::File 1.42 (by Dongxu Ma)
    Audio::TagLib::File is a file class with some useful methods for tag manipulation.

    This class is a basic file class with some meth

    Audio::File::Type 0.10 (by Florian Ragwitz)
    Audio::File::Type represents an audio filetype.

    An instance of an object inherited from Audio::File::Type is returned by the const

    XML::Generator::DOM 0.99 (by XML::Generator::DOM Team)
    XML::Generator::DOM is an XML::Generator subclass for producing DOM trees instead of strings.

    SYNOPSIS

    use XML::Generat

    Data::Faker::StreetAddress 0.07 (by Jason Kohles)
    Data::Faker::StreetAddress is a Data::Faker plugin.

    DATA PROVIDERS

    us_zip_code

    Return a random zip or zip+4 zip code in the

    Parrot::Docs::Section::C 0.4.5 (by The Parrot Team)
    Parrot::Docs::Section::C is a C source code documentation section.

    SYNOPSIS

    use Parrot::Docs::Section::C;

    A documentatio

    CompBio::DB 0.47 (by Sean Quinlan)
    CompBio::DB is a Perl module with methods for accessing data stored according to the CompBio base schema.

    SYNOPSIS

    use CompBi


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags