MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cleanup

+1 -76
+1 -1
meson.build
··· 74 74 build_date = run_command('date', '+%Y-%m-%d', check: true).stdout().strip() 75 75 76 76 version_conf = configuration_data() 77 - version_conf.set('ANT_VERSION', '0.1.1.16') 77 + version_conf.set('ANT_VERSION', '0.1.1.17') 78 78 version_conf.set('ANT_GIT_HASH', git_hash) 79 79 version_conf.set('ANT_BUILD_DATE', build_date) 80 80
-75
src/ant.c
··· 24 24 #include "modules/fs.h" 25 25 #include "modules/timer.h" 26 26 #include "modules/fetch.h" 27 - #include "modules/symbol.h" 28 27 29 28 #define MINICORO_IMPL 30 29 #include "minicoro.h" ··· 7190 7189 res = v; 7191 7190 goto done; 7192 7191 } 7193 - } 7194 - } else if (itype == T_OBJ) { 7195 - const char *iter_sym_key = get_iterator_sym_key(); 7196 - jsoff_t iter_off = iter_sym_key ? lkp(js, iterable, iter_sym_key, strlen(iter_sym_key)) : 0; 7197 - if (!iter_off) iter_off = lkp_proto(js, iterable, iter_sym_key, strlen(iter_sym_key)); 7198 - 7199 - if (iter_off) { 7200 - jsval_t iter_fn = loadval(js, iter_off + sizeof(jsoff_t) * 2); 7201 - if (vtype(iter_fn) == T_FUNC) { 7202 - push_this(iterable); 7203 - jsval_t iterator = call_js_with_args(js, iter_fn, NULL, 0); 7204 - pop_this(); 7205 - 7206 - if (is_err(iterator)) { 7207 - res = iterator; 7208 - goto done; 7209 - } 7210 - 7211 - while (true) { 7212 - jsoff_t next_off = lkp(js, iterator, "next", 4); 7213 - if (!next_off) { 7214 - res = js_mkerr(js, "iterator has no next method"); 7215 - goto done; 7216 - } 7217 - jsval_t next_fn = loadval(js, next_off + sizeof(jsoff_t) * 2); 7218 - 7219 - push_this(iterator); 7220 - jsval_t result_obj = call_js_with_args(js, next_fn, NULL, 0); 7221 - pop_this(); 7222 - 7223 - if (is_err(result_obj)) { 7224 - res = result_obj; 7225 - goto done; 7226 - } 7227 - 7228 - jsval_t done_val = js_get(js, result_obj, "done"); 7229 - if (js_truthy(js, done_val)) break; 7230 - 7231 - jsval_t value = js_get(js, result_obj, "value"); 7232 - 7233 - const char *var_name = &js->code[var_name_off]; 7234 - jsoff_t existing = lkp(js, js->scope, var_name, var_name_len); 7235 - if (existing > 0) { 7236 - saveval(js, existing + sizeof(jsoff_t) * 2, value); 7237 - } else { 7238 - jsval_t x = mkprop(js, js->scope, js_mkstr(js, var_name, var_name_len), value, is_const_var); 7239 - if (is_err(x)) { 7240 - res = x; 7241 - goto done; 7242 - } 7243 - } 7244 - 7245 - js->pos = body_start; 7246 - js->consumed = 1; 7247 - js->flags = (flags & ~F_NOEXEC) | F_LOOP; 7248 - v = js_block_or_stmt(js); 7249 - if (is_err(v)) { 7250 - res = v; 7251 - goto done; 7252 - } 7253 - 7254 - if (js->flags & F_BREAK) break; 7255 - if (js->flags & F_RETURN) { 7256 - res = v; 7257 - goto done; 7258 - } 7259 - } 7260 - } else { 7261 - res = js_mkerr(js, "for-of requires iterable"); 7262 - goto done; 7263 - } 7264 - } else { 7265 - res = js_mkerr(js, "for-of requires iterable"); 7266 - goto done; 7267 7192 } 7268 7193 } else { 7269 7194 res = js_mkerr(js, "for-of requires iterable");