Differences From Artifact [7110e96fc2a7a412]:
- File
polemy/runtime.d
- 2010-11-23 10:09:03 - part of checkin [36c517dfc4] on branch trunk - refactored d-value and polemy-value conversion (user: kinaba) [annotate]
To Artifact [6af5a0863b67aa85]:
- File
polemy/runtime.d
- 2010-11-23 10:37:54 - part of checkin [5e924caac9] on branch trunk - added AST-rewriting macro sample. (user: kinaba) [annotate]
16 void enrollRuntimeLibrary( Evaluator e ) 16 void enrollRuntimeLibrary( Evaluator e )
17 { 17 {
18 e.addPrimitive("+", ValueLayer, (IntValue lhs, IntValue rhs){return new 18 e.addPrimitive("+", ValueLayer, (IntValue lhs, IntValue rhs){return new
19 e.addPrimitive("-", ValueLayer, (IntValue lhs, IntValue rhs){return new 19 e.addPrimitive("-", ValueLayer, (IntValue lhs, IntValue rhs){return new
20 e.addPrimitive("*", ValueLayer, (IntValue lhs, IntValue rhs){return new 20 e.addPrimitive("*", ValueLayer, (IntValue lhs, IntValue rhs){return new
21 e.addPrimitive("/", ValueLayer, (IntValue lhs, IntValue rhs){return new 21 e.addPrimitive("/", ValueLayer, (IntValue lhs, IntValue rhs){return new
22 e.addPrimitive("%", ValueLayer, (IntValue lhs, IntValue rhs){return new 22 e.addPrimitive("%", ValueLayer, (IntValue lhs, IntValue rhs){return new
> 23 e.addPrimitive("~", ValueLayer, (Value lhs, Value rhs){return new StrVa
23 e.addPrimitive("||", ValueLayer, (IntValue lhs, IntValue rhs){return new 24 e.addPrimitive("||", ValueLayer, (IntValue lhs, IntValue rhs){return new
24 e.addPrimitive("&&", ValueLayer, (IntValue lhs, IntValue rhs){return new 25 e.addPrimitive("&&", ValueLayer, (IntValue lhs, IntValue rhs){return new
25 e.addPrimitive("<", ValueLayer, (Value lhs, Value rhs){return new IntVa 26 e.addPrimitive("<", ValueLayer, (Value lhs, Value rhs){return new IntVa
26 e.addPrimitive(">", ValueLayer, (Value lhs, Value rhs){return new IntVa 27 e.addPrimitive(">", ValueLayer, (Value lhs, Value rhs){return new IntVa
27 e.addPrimitive("<=", ValueLayer, (Value lhs, Value rhs){return new IntVa 28 e.addPrimitive("<=", ValueLayer, (Value lhs, Value rhs){return new IntVa
28 e.addPrimitive(">=", ValueLayer, (Value lhs, Value rhs){return new IntVa 29 e.addPrimitive(">=", ValueLayer, (Value lhs, Value rhs){return new IntVa
29 e.addPrimitive("==", ValueLayer, (Value lhs, Value rhs){return new IntVa 30 e.addPrimitive("==", ValueLayer, (Value lhs, Value rhs){return new IntVa