[Pixelle-commit] SF.net SVN: pixelle:[234] trunk/pixelle
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-02-16 08:47:52
|
Revision: 234
http://pixelle.svn.sourceforge.net/pixelle/?rev=234&view=rev
Author: dbrosius
Date: 2009-02-16 08:47:49 +0000 (Mon, 16 Feb 2009)
Log Message:
-----------
allow p(s)[x,y] where s is the input selector
Modified Paths:
--------------
trunk/pixelle/etc/Pixelle.g
trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java
Modified: trunk/pixelle/etc/Pixelle.g
===================================================================
--- trunk/pixelle/etc/Pixelle.g 2009-02-16 08:09:42 UTC (rev 233)
+++ trunk/pixelle/etc/Pixelle.g 2009-02-16 08:47:49 UTC (rev 234)
@@ -296,10 +296,6 @@
| factor ;
factor
- @init
- {
- int sourceSelector = 0;
- }
: NUMBER
{
mv.visitLdcInsn(Double.valueOf($NUMBER.text));
@@ -309,9 +305,13 @@
{
mv.visitVarInsn(Opcodes.ALOAD, 1);
}
- // Put in source selector code, for now use 0
+ ( '(' selector=expr ')' )?
{
- mv.visitLdcInsn(Integer.valueOf(sourceSelector));
+ if ($selector.text == null)
+ mv.visitInsn(Opcodes.ICONST_0);
+ else
+ mv.visitInsn(Opcodes.D2I);
+
mv.visitVarInsn(Opcodes.ILOAD, 4);
mv.visitInsn(Opcodes.IREM);
mv.visitInsn(Opcodes.AALOAD);
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java 2009-02-16 08:09:42 UTC (rev 233)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java 2009-02-16 08:47:49 UTC (rev 234)
@@ -125,7 +125,7 @@
pp.pixelle();
byte[] bytes = pp.getClassBytes();
- dump(bytes, clsName.substring(clsName.lastIndexOf('.') + 1) + ".class");
+ //dump(bytes, clsName.substring(clsName.lastIndexOf('.') + 1) + ".class");
pcl.addClass(clsName, bytes);
Class<?> cl = pcl.loadClass(clsName);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|