Matt S Trout > Rakudo-Star-2012.08_001 > POST::Compiler

Download:
Rakudo-Star-2012.08_001.tar.gz

Annotate this POD

Source  

NAME ^

POST::Compiler - Compiler for POST trees

DESCRIPTION ^

POST::Compiler defines a compiler that converts a POST tree into PIR or an Eval PMC (bytecode).

METHODS ^

escape(string str)

Returns an escaped value of str suitable for including in PIR. If the string contains any non-ASCII characters, then it's prefixed with 'unicode:'. (This method just delegates to PAST::Compiler.escape, which does the same thing.)

key_pir( string name1 [, string name2, ...] )

Constructs a PIR key using the strings passed as arguments. For example, key('Foo', 'Bar') returns ["Foo";"Bar"].

pir_children(node)

Return generated PIR for node and all of its children.

pir(Any node)

Return generated pir for any POST::Node. Returns the generated pir of node's children.

pir(POST::Op node)

Return pir for an operation node.

pir(POST::Label node)

Generate a label.

pir(POST::Sub node)

Generate PIR for node, storing the result into the compiler's $!code attribute and returning any code needed to look up the sub.

AUTHOR ^

Patrick Michaud <pmichaud@pobox.com> is the author and maintainer. Please send patches and suggestions to the Parrot porters or Perl 6 compilers mailing lists.

HISTORY ^

2007-11-21 Significant refactor as part of Parrot Compiler Toolkit

COPYRIGHT ^

Copyright (C) 2006-2008, Parrot Foundation.

syntax highlighting: