Ticket #1366 (closed patch: fixed)

Opened 5 years ago

Last modified 5 years ago

[patch]removed unused codes from PCCMETHOD.pm and consting

Reported by: jimmy Owned by:
Priority: normal Milestone:
Component: none Version: 1.8.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

removed unused codes from PCCMETHOD.pm and consting. notice: _caller_ctx was not used.

Index: lib/Parrot/Pmc2c/PCCMETHOD.pm
===================================================================
--- lib/Parrot/Pmc2c/PCCMETHOD.pm	(版本 42954)
+++ lib/Parrot/Pmc2c/PCCMETHOD.pm	(工作副本)
@@ -412,14 +412,10 @@
     rewrite_pccinvoke( $self, $pmc );
 
     $e->emit( <<"END", __FILE__, __LINE__ + 1 );
-    PMC *_caller_ctx, *_ctx;
-    PMC *_ccont, *_call_object;
+    PMC * const _ctx         = CURRENT_CONTEXT(interp);
+    PMC * const _ccont       = Parrot_pcc_get_continuation(interp, _ctx);
+    PMC * const _call_object = Parrot_pcc_get_signature(interp, _ctx);
 
-    _ctx = CURRENT_CONTEXT(interp);
-    _ccont = Parrot_pcc_get_continuation(interp, _ctx);
-
-    _caller_ctx = Parrot_pcc_get_caller_ctx(interp, _ctx);
-    _call_object = Parrot_pcc_get_signature(interp, _ctx);
     Parrot_pcc_set_signature(interp, _ctx, NULL);
 
     { /* BEGIN PARMS SCOPE */
@@ -429,7 +425,7 @@
 END
     if ($params_signature) {
         $e->emit( <<"END", __FILE__, __LINE__ + 1 );
-    Parrot_pcc_fill_params_from_c_args(interp, _call_object, "$params_signature",
+        Parrot_pcc_fill_params_from_c_args(interp, _call_object, "$params_signature",
             $params_varargs);
 END
     }
@@ -441,7 +437,7 @@
 
     } /* END PMETHOD BODY */
     } /* END PARAMS SCOPE */
-    no_return:
+  no_return:
     return;
 END
     $self->return_type('void');

Attachments

PCCMETHOD.pm.patch Download (1.3 KB) - added by jimmy 5 years ago.

Change History

Changed 5 years ago by jimmy

Changed 5 years ago by cotto

Nothing breaks and the patch looks good. Thanks for clearing out some unused code. I applied the patch without changes as r42959.

Changed 5 years ago by cotto

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.