aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2023-04-29 12:12:31 +0900
committerShinya Sato <shinnya.sato@gmail.com>2023-04-29 12:12:31 +0900
commita67df32aa0bd577c37f27b879fc33fd23612e711 (patch)
tree275a0b729ea52e61884f5fc8ad3ac00e86c64f6e /src
parent20b4adbdb3e4f89a1891b992c8a7a802f08d8e67 (diff)
downloadinpla-a67df32aa0bd577c37f27b879fc33fd23612e711.tar.gz
inpla-a67df32aa0bd577c37f27b879fc33fd23612e711.zip
v0.10.8
Diffstat (limited to 'src')
-rw-r--r--src/inpla.y12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/inpla.y b/src/inpla.y
index 7bf496d..c0833c3 100644
--- a/src/inpla.y
+++ b/src/inpla.y
@@ -22,8 +22,8 @@
// ----------------------------------------------
-#define VERSION "0.10.7"
-#define BUILT_DATE "11 March 2023"
+#define VERSION "0.10.8"
+#define BUILT_DATE "29 April 2023"
// ------------------------------------------------------------------
@@ -6457,7 +6457,7 @@ int Compile_term_on_ast(Ast *ptr, int target) {
IMCode_genCode3(OP_LOADP, alloc[0], 0, result);
IMCode_genCode3(OP_LOADP, alloc[1], 1, result);
IMCode_genCode3(OP_LOADP, alloc[2], 2, result);
- IMCode_genCode3(OP_LOADP, alloc[2], 3, result);
+ IMCode_genCode3(OP_LOADP, alloc[3], 3, result);
#endif
} else {
mkagent = OP_REUSEAGENT4;
@@ -8084,12 +8084,14 @@ int make_rule(Ast *ast) {
ast->left->left = ast_remove_tuple1(ruleAgent_L);
ast->left->right = ast_remove_tuple1(ruleAgent_R);
+
Ast *rule_mainbody = ast->right;
Ast_remove_tuple1_in_mainbody(rule_mainbody);
set_annotation_LR(VM_OFFSET_ANNOTATE_L, VM_OFFSET_ANNOTATE_R);
+
if (!make_rule_oneway(ast)) {
return 0;
}
@@ -8104,7 +8106,7 @@ int make_rule(Ast *ast) {
ruleAgent_R = ast->left->right;
ast->left->left = ruleAgent_R;
- ast->left->right = ruleAgent_L;;
+ ast->left->right = ruleAgent_L;
set_annotation_LR(VM_OFFSET_ANNOTATE_R, VM_OFFSET_ANNOTATE_L);
// ast_puts(ast);puts("");
@@ -9785,7 +9787,7 @@ loop_agent_a1_a2_this_order:
default:
for (int i=1; i<arity; i++) {
- VALUE a2port = AGENT(a2)->port[1];
+ VALUE a2port = AGENT(a2)->port[i];
VALUE eps = make_Agent(vm, ID_ERASER);
PUSH(vm, eps, a2port);
}