• R/O
  • SSH
  • HTTPS

jpl: 提交


Commit MetaInfo

修订版1091 (tree)
时间2021-01-28 03:30:55
作者jakobthomsen

Log Message

test return-from-block

更改概述

差异

--- trunk/jpl_compiler_pragmatic/compiler.compiled.c (revision 1090)
+++ trunk/jpl_compiler_pragmatic/compiler.compiled.c (revision 1091)
@@ -13213,8 +13213,8 @@
1321313213 }
1321413214 case 837LLU: // completed if-then-else
1321513215 {
13216-//#define copy 36
13217- stack[base + 36/*copy*/] = 0; // init
13216+//#define copy 37
13217+ stack[base + 37/*copy*/] = 0; // init
1321813218 uint64_t *newstack = (uint64_t *)Calloc(13LLU + 1, sizeof(uint64_t));
1321913219 newstack[13LLU] = 9876543210LLU; // overflow-marker
1322013220 // call copytype from PROCCALL
@@ -13234,7 +13234,7 @@
1323413234 uint64_t *oldstack = (uint64_t *)stack[0];
1323513235 // copy mutable arguments back from call to copytype
1323613236 // copy back results provided by call to copytype
13237- oldstack[base + 36] = stack[3LLU];
13237+ oldstack[base + 37] = stack[3LLU];
1323813238 if(stack[13LLU] != 9876543210LLU)
1323913239 {
1324013240 fprintf(stderr, "INTERNAL ERROR - OVERFLOW (in recursive call to copytype)!");
@@ -13242,13 +13242,11 @@
1324213242 }
1324313243 Free(13LLU + 1, sizeof(uint64_t), stack);
1324413244 stack = oldstack;
13245-//#define typeidx 37
13246- stack[base + 37/*typeidx*/] = 0; // init
1324713245 // call mktypeidx from PROCCALL
1324813246 stack[base + 38LLU] = base;
1324913247 stack[base + 39LLU] = 847LLU;
1325013248 // arguments for call to mktypeidx
13251- stack[base + 41LLU] = stack[base + 36]/*copy*/;
13249+ stack[base + 41LLU] = stack[base + 37]/*copy*/;
1325213250 stack[base + 42LLU] = stack[base + 34]/*INDEX*/;
1325313251 // set stack-base & callee-address
1325413252 base += 40LLU;
@@ -13259,12 +13257,12 @@
1325913257 {
1326013258 // copy mutable arguments back from call to mktypeidx
1326113259 // copy back results provided by call to mktypeidx
13262- stack[base + 37] = stack[base + 40LLU];
13260+ stack[base + 36] = stack[base + 40LLU];
1326313261 {
1326413262 struct listnode *list = (struct listnode *)Calloc(1, sizeof(struct listnode));
1326513263 list->next = (struct listnode *)stack[base + 14]/*dsttypeidx*/;
1326613264 stack[base + 14]/*dsttypeidx*/ = (uint64_t)list;
13267- list->data = stack[base + 37]/*typeidx*/;
13265+ list->data = stack[base + 36]/*typeidx*/;
1326813266 }
1326913267 // releasing RESULT
1327013268 Free(4, sizeof(uint64_t), ((uint64_t **)stack[base + 27]/*RESULT*/)[1]);
--- trunk/jpl_compiler_pragmatic/compiler.source.c (revision 1090)
+++ trunk/jpl_compiler_pragmatic/compiler.source.c (revision 1091)
@@ -2950,10 +2950,17 @@
29502950 {
29512951 }
29522952
2953- NEW mut type copy
2954- (copy) = copytype(type)
2955- NEW mut typeidx typeidx
2956- (typeidx) = mktypeidx(copy, INDEX)
2953+ //NEW mut type copy
2954+ //(copy) = copytype(type)
2955+ //NEW mut typeidx typeidx
2956+ //(typeidx) = mktypeidx(copy, INDEX)
2957+ //push(dsttypeidx, typeidx)
2958+ let (mut typeidx typeidx) =
2959+ {
2960+ NEW mut type copy
2961+ (copy) = copytype(type)
2962+ return mktypeidx(copy, INDEX)
2963+ }
29572964 push(dsttypeidx, typeidx)
29582965 }
29592966 else
Show on old repository browser