My working unpac space for OCaml projects in development
0
fork

Configure Feed

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

slightly faster lexical variable assignment

+15 -1
+1
vendor/git/quickjs-c/quickjs-opcode.h
··· 168 168 DEF(set_loc_uninitialized, 3, 0, 0, loc) 169 169 DEF( get_loc_check, 3, 0, 1, loc) 170 170 DEF( put_loc_check, 3, 1, 0, loc) /* must come after get_loc_check */ 171 + DEF( set_loc_check, 3, 1, 1, loc) /* must come after put_loc_check */ 171 172 DEF( put_loc_check_init, 3, 1, 0, loc) 172 173 DEF(get_loc_checkthis, 3, 0, 1, loc) 173 174 DEF(get_var_ref_check, 3, 0, 1, var_ref)
+14 -1
vendor/git/quickjs-c/quickjs.c
··· 18346 18346 sp--; 18347 18347 } 18348 18348 BREAK; 18349 + CASE(OP_set_loc_check): 18350 + { 18351 + int idx; 18352 + idx = get_u16(pc); 18353 + pc += 2; 18354 + if (unlikely(JS_IsUninitialized(var_buf[idx]))) { 18355 + JS_ThrowReferenceErrorUninitialized2(ctx, b, idx, FALSE); 18356 + goto exception; 18357 + } 18358 + set_value(ctx, &var_buf[idx], JS_DupValue(ctx, sp[-1])); 18359 + } 18360 + BREAK; 18349 18361 CASE(OP_put_loc_check_init): 18350 18362 { 18351 18363 int idx; ··· 34757 34769 /* Transformation: dup put_x(n) drop -> put_x(n) */ 34758 34770 int op1, line2 = -1; 34759 34771 /* Transformation: dup put_x(n) -> set_x(n) */ 34760 - if (code_match(&cc, pos_next, M3(OP_put_loc, OP_put_arg, OP_put_var_ref), -1, -1)) { 34772 + if (code_match(&cc, pos_next, M4(OP_put_loc, OP_put_loc_check, OP_put_arg, OP_put_var_ref), -1, -1)) { 34761 34773 if (cc.line_num >= 0) line_num = cc.line_num; 34762 34774 op1 = cc.op + 1; /* put_x -> set_x */ 34763 34775 pos_next = cc.pos; ··· 34865 34877 goto no_change; 34866 34878 #endif 34867 34879 case OP_put_loc: 34880 + case OP_put_loc_check: 34868 34881 case OP_put_arg: 34869 34882 case OP_put_var_ref: 34870 34883 if (OPTIMIZE) {