comparison runtime/builtin.c @ 99:e09c2d1d6d5b

Got dataflow graph code working in compiler (nworker_c.rhope)
author Mike Pavone <pavone@retrodev.com>
date Fri, 06 Aug 2010 01:42:37 -0400
parents a844c623c7df
children c14698c512f1
comparison
equal deleted inserted replaced
98:a34a982ecd32 99:e09c2d1d6d5b
4 #include "bool.h" 4 #include "bool.h"
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 #include <stdarg.h>
10 #include <stdint.h>
9 11
10 void register_builtin_type(uint32_t type) 12 void register_builtin_type(uint32_t type)
11 { 13 {
12 blueprint * bp; 14 blueprint * bp;
13 switch(type) 15 switch(type)
123 worker->payload.Index = index; 125 worker->payload.Index = index;
124 worker->payload.Count = initialcount; 126 worker->payload.Count = initialcount;
125 return (object *)worker; 127 return (object *)worker;
126 } 128 }
127 129
130 object * make_List(int32_t numels,...)
131 {
132 int32_t idx, elidx;
133 object * inout[3];
134 va_list args;
135
136 va_start(args, numels);
137 rhope(FUNC_List, inout, 0, 1);
138
139 for (idx = 0; idx < numels; ++idx)
140 {
141 elidx = va_arg(args, int32_t);
142 inout[1] = make_Int32(elidx);
143 inout[2] = va_arg(args, object *);
144 }
145 return inout[0];
146 }
147
148