develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35591 - trunk/languages/pipp/docs

January 15, 2009 06:00
[svn:parrot] r35591 - trunk/languages/pipp/docs
Message ID:
Author: bernhard
Date: Thu Jan 15 06:00:11 2009
New Revision: 35591


[Pipp] Mention plan to implement constanst as package vars.

Modified: trunk/languages/pipp/docs/internals.pod
--- trunk/languages/pipp/docs/internals.pod	(original)
+++ trunk/languages/pipp/docs/internals.pod	Thu Jan 15 06:00:11 2009
@@ -23,7 +23,7 @@
 =head1 Bytecode generation
 The parse tree is transformed to a Parrot Abstrace Syntax Tree.
-PIR und Bytecode is theb generated from the PAST.
+PIR und Bytecode is then generated from the PAST.
 =head1 Variables
@@ -31,14 +31,37 @@
 =item globals in top file
+Lexical. Might need extra treatment.
 =item globals in included files
-=item class scope
+Lexical in scope of the included file.
+=item Class constants
+=item Class members
 =item function and method scope
+Lexical is scope of the function or method.
+=item $this
+Bound to register C<self>.
 =item constants
+Currently constants are stored in the hash ['pipp'; 'php_constants'].
+The functions C<define> and C<defined> access this package scoped hash.
+This approach works good enough for constants in the global namespace.
+For namespaced constants the above approach could be extended to
+consider the namespace part of the constant, the current namespace and
+the active namespace aliases.
+Another approach is to treat constants as namespaced variables and
+work with standard PAST techniques.
+Experiments using that approach are underway.
 =head1 Functions and closures
@@ -47,6 +70,8 @@
 =head2 Closures
+TODO: see C<t/php/closures.t>
 =head2 Internal functions
 =head1 Object orientation Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About