@@ -712,6 +712,7 @@ lambda_body(mrc_codegen_scope *s, mrc_node *tree, mrc_node *body, pm_constant_id
712
712
// mandatory
713
713
for (i = 0 ; i < ma; i++) {
714
714
if (nint (parameters->requireds .nodes [i]) == PM_MULTI_TARGET_NODE) {
715
+ mrc_constant_id_list_append (s, lv, null_mark);
715
716
} else {
716
717
mrc_constant_id_list_append (s, lv, ((pm_required_parameter_node_t *)parameters->requireds .nodes [i])->name );
717
718
}
@@ -732,6 +733,7 @@ lambda_body(mrc_codegen_scope *s, mrc_node *tree, mrc_node *body, pm_constant_id
732
733
// post
733
734
for (i = 0 ; i < pa; i++) {
734
735
if (nint (parameters->posts .nodes [i]) == PM_MULTI_TARGET_NODE) {
736
+ mrc_constant_id_list_append (s, lv, null_mark);
735
737
} else {
736
738
mrc_constant_id_list_append (s, lv, ((pm_required_parameter_node_t *)parameters->posts .nodes [i])->name );
737
739
}
@@ -748,6 +750,7 @@ lambda_body(mrc_codegen_scope *s, mrc_node *tree, mrc_node *body, pm_constant_id
748
750
case PM_KEYWORD_REST_PARAMETER_NODE: {
749
751
if (((pm_keyword_rest_parameter_node_t *)parameters->keyword_rest )->name ) {
750
752
mrc_constant_id_list_append (s, lv, ((pm_keyword_rest_parameter_node_t *)parameters->keyword_rest )->name );
753
+ write_dastr = false ;
751
754
}
752
755
break ;
753
756
}
@@ -945,9 +948,9 @@ lambda_body(mrc_codegen_scope *s, mrc_node *tree, mrc_node *body, pm_constant_id
945
948
// Enabling the following three lines would generate VM code equivalent to mruby-compiler,
946
949
// but it would not work in mruby/c.
947
950
// It appears to work correctly even when commented out, so it is left commented out
948
- // uint16_t n = ((pm_multi_target_node_t *)margs[i])->lefts.size;
949
- // gen_move(s, cursp(), pos, 0);
950
- // genop_3(s, OP_APOST, cursp(), n, 0);
951
+ uint16_t n = ((pm_multi_target_node_t *)margs[i])->lefts .size ;
952
+ gen_move (s, cursp (), pos, 0 );
953
+ genop_3 (s, OP_APOST, cursp (), n, 0 );
951
954
}
952
955
pos++;
953
956
}
@@ -960,9 +963,9 @@ lambda_body(mrc_codegen_scope *s, mrc_node *tree, mrc_node *body, pm_constant_id
960
963
// Enabling the following three lines would generate VM code equivalent to mruby-compiler,
961
964
// but it would not work in mruby/c.
962
965
// It appears to work correctly even when commented out, so it is left commented out
963
- // uint16_t n = ((pm_multi_target_node_t *)pargs[i])->lefts.size;
964
- // gen_move(s, cursp(), pos, 0);
965
- // genop_3(s, OP_APOST, cursp(), n, 0);
966
+ uint16_t n = ((pm_multi_target_node_t *)pargs[i])->lefts .size ;
967
+ gen_move (s, cursp (), pos, 0 );
968
+ genop_3 (s, OP_APOST, cursp (), n, 0 );
966
969
}
967
970
pos++;
968
971
}
0 commit comments