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.

fix segfault when import does not exist

+6 -6
+1 -1
meson.build
··· 44 44 build_date = run_command('date', '+%Y-%m-%d', check: true).stdout().strip() 45 45 46 46 version_conf = configuration_data() 47 - version_conf.set('ANT_VERSION', '0.0.6.16') 47 + version_conf.set('ANT_VERSION', '0.0.6.17') 48 48 version_conf.set('ANT_GIT_HASH', git_hash) 49 49 version_conf.set('ANT_BUILD_DATE', build_date) 50 50
+2 -2
src/ant.c
··· 577 577 return i; 578 578 } 579 579 580 - // Circular reference tracking for stringification 581 580 #define MAX_STRINGIFY_DEPTH 64 582 581 static jsval_t stringify_stack[MAX_STRINGIFY_DEPTH]; 583 582 static int stringify_depth = 0; ··· 928 927 if (is_err(value)) return js->errmsg; 929 928 if (js->brk + sizeof(jsoff_t) >= js->size) return ""; 930 929 931 - // Reset stringify depth for each new stringification 932 930 stringify_depth = 0; 933 931 len = tostr(js, value, buf, available); 934 932 js_mkstr(js, NULL, len); ··· 2910 2908 if (lookahead(js) == TOK_ARROW) return res; 2911 2909 if (lookahead(js) == TOK_TEMPLATE) { 2912 2910 jsval_t tag_func = lookup(js, &js->code[coderefoff(res)], codereflen(res)); 2911 + if (is_err(tag_func)) return tag_func; 2913 2912 if (!(js->flags & F_NOEXEC) && !is_err(tag_func)) tag_func = resolveprop(js, tag_func); 2914 2913 js->consumed = 1; 2915 2914 next(js); ··· 2922 2921 while (next(js) == TOK_LPAREN || next(js) == TOK_DOT || next(js) == TOK_OPTIONAL_CHAIN || next(js) == TOK_LBRACKET || next(js) == TOK_TEMPLATE) { 2923 2922 if (js->tok == TOK_TEMPLATE) { 2924 2923 if (vtype(res) == T_PROP) res = resolveprop(js, res); 2924 + if (is_err(res)) return res; 2925 2925 js->consumed = 1; 2926 2926 return js_tagged_template(js, res); 2927 2927 } else if (js->tok == TOK_DOT || js->tok == TOK_OPTIONAL_CHAIN) {
+3 -3
tests/test_shell.js
··· 35 35 } 36 36 37 37 console.log('\n=== Test 3: ls command ==='); 38 - const result3 = await $`ls tests/test_shell_dollar.cjs`; 38 + const result3 = await $`ls tests/test_shell.js`; 39 39 const text3 = result3.text(); 40 40 console.log('Output:', text3); 41 - if (!text3.includes('test_shell_dollar.cjs')) { 42 - throw new Error('Expected output to contain test_shell_dollar.cjs'); 41 + if (!text3.includes('test_shell.js')) { 42 + throw new Error('Expected output to contain test_shell.js'); 43 43 } 44 44 45 45 console.log('\n=== Test 4: pwd command ===');