Permalink
Browse files

- n-ary implementations for is, car, cdr, cons, sref and for ref func…

…tions of string, hash, and list

- new "reduce" concept on IfClause to shrink sub-optimal expressions to more efficient ones
- fix tetris and welder for new slightly stricter arg count checking
- bundle arc3.1
- new special-case binding classes - extending the ZeroArgs, SimpleArgs and ComplexArgs concept to more cases
  • Loading branch information...
1 parent 6d67a83 commit bd623e56c20855a1023b3870726cc0b0fef0d425 conan committed Aug 21, 2009
Showing with 1,189 additions and 624 deletions.
  1. +13 −3 build.xml
  2. +218 −161 src/arc/ac.scm
  3. +35 −21 src/arc/app.arc
  4. +18 −6 src/arc/arc.arc
  5. +1 −5 src/arc/copyright
  6. +5 −4 src/arc/how-to-run-news
  7. +42 −38 src/arc/html.arc
  8. +5 −1 src/arc/lib/tests/core-maths-test.arc
  9. +51 −44 src/arc/news.arc
  10. +43 −8 src/arc/rainbow/build/optimisers.arc
  11. +7 −6 src/arc/rainbow/tetris.arc
  12. +1 −1 src/arc/rainbow/welder.arc
  13. +34 −46 src/arc/srv.arc
  14. BIN src/arc/static/arc.png
  15. +10 −1 src/arc/strings.arc
  16. +1 −1 src/java/rainbow/Console.java
  17. +12 −0 src/java/rainbow/functions/Builtin.java
  18. +13 −0 src/java/rainbow/functions/Closure.java
  19. +10 −1 src/java/rainbow/functions/Maths.java
  20. +19 −1 src/java/rainbow/functions/eval/Apply.java
  21. +18 −18 src/java/rainbow/{vm/continuations/NamespaceBuilder.java → functions/interpreted/ComplexArgs.java}
  22. +20 −53 src/java/rainbow/functions/{ → interpreted}/InterpretedFunction.java
  23. +35 −0 src/java/rainbow/functions/interpreted/SimpleArgs.java
  24. +23 −0 src/java/rainbow/functions/interpreted/ZeroArgs.java
  25. +31 −0 src/java/rainbow/functions/interpreted/optimise/Bind_A.java
  26. +40 −0 src/java/rainbow/functions/interpreted/optimise/Bind_AA.java
  27. +32 −0 src/java/rainbow/functions/interpreted/optimise/Bind_AAR.java
  28. +27 −0 src/java/rainbow/functions/interpreted/optimise/Bind_AR.java
  29. +21 −0 src/java/rainbow/functions/interpreted/optimise/Bind_R.java
  30. +6 −6 src/java/rainbow/functions/lists/Car.java
  31. +6 −6 src/java/rainbow/functions/lists/Cdr.java
  32. +5 −0 src/java/rainbow/functions/lists/Cons.java
  33. +5 −0 src/java/rainbow/functions/lists/Scar.java
  34. +11 −1 src/java/rainbow/functions/predicates/Bound.java
  35. +14 −0 src/java/rainbow/functions/predicates/Is.java
  36. +19 −0 src/java/rainbow/functions/tables/Sref.java
  37. +16 −0 src/java/rainbow/types/ArcObject.java
  38. +9 −5 src/java/rainbow/types/ArcString.java
  39. +5 −8 src/java/rainbow/types/Hash.java
  40. +2 −2 src/java/rainbow/types/JavaObject.java
  41. +1 −1 src/java/rainbow/types/JavaProxy.java
  42. +64 −30 src/java/rainbow/types/Pair.java
  43. +0 −34 src/java/rainbow/vm/DebugInterceptor.java
  44. +0 −10 src/java/rainbow/vm/KillInterceptor.java
  45. +0 −9 src/java/rainbow/vm/NullInterceptor.java
  46. +75 −64 src/java/rainbow/vm/VM.java
  47. +54 −8 src/java/rainbow/vm/VMInterceptor.java
  48. +23 −4 src/java/rainbow/vm/compiler/FunctionBodyBuilder.java
  49. +3 −3 src/java/rainbow/vm/compiler/FunctionParameterListBuilder.java
  50. +1 −1 src/java/rainbow/vm/instructions/Append.java
  51. +1 −1 src/java/rainbow/vm/instructions/AppendAll.java
  52. +1 −1 src/java/rainbow/vm/instructions/AppendDot.java
  53. +1 −1 src/java/rainbow/vm/instructions/Close.java
  54. +1 −1 src/java/rainbow/vm/instructions/FinishList.java
  55. +37 −0 src/java/rainbow/vm/instructions/ListBuilder.java
  56. +1 −1 src/java/rainbow/vm/instructions/NewList.java
  57. +1 −0 src/java/rainbow/vm/interpreter/Conditional.java
  58. +4 −0 src/java/rainbow/vm/interpreter/Else.java
  59. +1 −0 src/java/rainbow/vm/interpreter/IfClause.java
  60. +22 −0 src/java/rainbow/vm/interpreter/IfThen.java
  61. +11 −8 src/java/rainbow/vm/interpreter/Invocation.java
  62. +4 −0 src/java/rainbow/vm/interpreter/LastIfThen.java
View
@@ -5,6 +5,7 @@
<property name="compiler-src" value="src/cc"/>
<property name="arc-src" value="src/arc"/>
<property name="opt-dir" value="/rainbow/vm/instructions/invoke/optimise"/>
+ <property name="opt-script" value="rainbow/build/optimisers.arc"/>
<property name="sh-src" value="src/sh"/>
<property name="test-src" value="src/test"/>
@@ -14,6 +15,15 @@
<property name="classes" value="${build}/classes"/>
<property name="jarfile" value="${arc-src}/rainbow.jar"/>
+ <condition property="do-generate-optimisations">
+ <and>
+ <available file="${jarfile}"/>
+ <not>
+ <uptodate srcfile="${arc-src}/${opt-script}" targetfile="${src}${opt-dir}/Invoke_bound.java"/>
+ </not>
+ </and>
+ </condition>
+
<condition property="rainbow-available"><available file="${jarfile}"/></condition>
<target name="clean">
@@ -32,10 +42,10 @@
<echo>rebuild rainbow in order to generate and compile optimised invocation classes</echo>
</target>
- <target name="generate-optimisations" if="rainbow-available">
- <java classpath="${jarfile}" classname="rainbow.Console" dir="src/arc" fork="true">
+ <target name="generate-optimisations" if="do-generate-optimisations">
+ <java classpath="${jarfile}" classname="rainbow.Console" dir="${arc-src}" fork="true">
<arg value="-f"/>
- <arg value="rainbow/build/optimisers.arc"/>
+ <arg value="${opt-script}"/>
<arg value="-e"/>
<arg value="(optimiser-generator)"/>
<arg value="-q"/>
Oops, something went wrong.

0 comments on commit bd623e5

Please sign in to comment.