@@ -1817,7 +1817,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
18171817 }
18181818 YARVINSN_newarray => {
18191819 let count = get_arg ( pc, 0 ) . as_usize ( ) ;
1820- let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state. clone ( ) } ) ;
1820+ let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
18211821 let mut elements = vec ! [ ] ;
18221822 for _ in 0 ..count {
18231823 elements. push ( state. stack_pop ( ) ?) ;
@@ -1833,7 +1833,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
18331833 elements. push ( state. stack_pop ( ) ?) ;
18341834 }
18351835 elements. reverse ( ) ;
1836- let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state. clone ( ) } ) ;
1836+ let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
18371837 let ( bop, insn) = match method {
18381838 VM_OPT_NEWARRAY_SEND_MAX => ( BOP_MAX , Insn :: ArrayMax { elements, state : exit_id } ) ,
18391839 VM_OPT_NEWARRAY_SEND_MIN => return Err ( ParseError :: UnknownNewArraySend ( "min" . into ( ) ) ) ,
@@ -1847,7 +1847,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
18471847 }
18481848 YARVINSN_duparray => {
18491849 let val = fun. push_insn ( block, Insn :: Const { val : Const :: Value ( get_arg ( pc, 0 ) ) } ) ;
1850- let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state. clone ( ) } ) ;
1850+ let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
18511851 let insn_id = fun. push_insn ( block, Insn :: ArrayDup { val, state : exit_id } ) ;
18521852 state. stack_push ( insn_id) ;
18531853 }
@@ -1971,7 +1971,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
19711971 args. reverse ( ) ;
19721972
19731973 let recv = state. stack_pop ( ) ?;
1974- let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state. clone ( ) } ) ;
1974+ let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
19751975 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, call_info : CallInfo { method_name } , cd, args, state : exit_id } ) ;
19761976 state. stack_push ( send) ;
19771977 }
@@ -2014,7 +2014,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
20142014 args. reverse ( ) ;
20152015
20162016 let recv = state. stack_pop ( ) ?;
2017- let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state. clone ( ) } ) ;
2017+ let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
20182018 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, call_info : CallInfo { method_name } , cd, args, state : exit_id } ) ;
20192019 state. stack_push ( send) ;
20202020 }
@@ -2036,7 +2036,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
20362036 args. reverse ( ) ;
20372037
20382038 let recv = state. stack_pop ( ) ?;
2039- let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state. clone ( ) } ) ;
2039+ let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
20402040 let send = fun. push_insn ( block, Insn :: Send { self_val : recv, call_info : CallInfo { method_name } , cd, blockiseq, args, state : exit_id } ) ;
20412041 state. stack_push ( send) ;
20422042 }
0 commit comments