[svn:parrot] r40408 - in trunk: . src
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Wed Aug 5 10:44:21 UTC 2009
Author: NotFound
Date: Wed Aug 5 10:44:14 2009
New Revision: 40408
URL: https://trac.parrot.org/parrot/changeset/40408
Log:
Deprecate PASM1 pseudocompiler and PDB_compile, TT #872
Modified:
trunk/DEPRECATED.pod
trunk/src/debug.c
Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod Wed Aug 5 10:20:56 2009 (r40407)
+++ trunk/DEPRECATED.pod Wed Aug 5 10:44:14 2009 (r40408)
@@ -210,10 +210,34 @@
These items and related helper functions are added as experimental support
for TT #895
+=item PDB_compile and PDB_eval [eligible in 2.1]
+
+The function PDB_compile doesn't work since some time, and his implementation
+was a hack. His functionality may be reimplemented in another way. Until the
+end of deprecation cycle it just throws an excpetion.
+
+The PDB_eval function, that used in the debugger to support the eval
+command, was using PDB_compile. His functionality must be reimplemented
+in another way and with a name that follows current conventions, in the
+meantime and until the end of the deprecation cycle it just shows a
+diagnostic message.
+
+L<https://trac.parrot.org/parrot/ticket/872>
+
=back
=head1 Compiler tools
+=head2 PASM1 compiler
+
+=over 4
+
+=item C<PASM1 compiler> [eligible in 2.1]
+
+See PDB_compile.
+
+=back
+
=head2 Parrot Grammar Engine (PGE)
=over 4
Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c Wed Aug 5 10:20:56 2009 (r40407)
+++ trunk/src/debug.c Wed Aug 5 10:44:14 2009 (r40408)
@@ -3242,22 +3242,14 @@
void
PDB_eval(PARROT_INTERP, ARGIN(const char *command))
{
- opcode_t *run;
ASSERT_ARGS(PDB_eval)
- TRACEDEB_MSG("PDB_eval");
- /* This code is almost certainly wrong. The Parrot debugger needs love. */
-
- if(!strlen(command)) {
- fprintf(stderr, "Must give a command to eval\n");
- return;
- }
- TRACEDEB_MSG("PDB_eval compiling code");
- run = PDB_compile(interp, command);
- if (run) {
- TRACEDEB_MSG("PDB_eval running compiled code");
- DO_OP(run, interp);
- }
+ PDB_t *pdb = interp->pdb;
+ Interp *warninterp = (interp->pdb && interp->pdb->debugger) ?
+ interp->pdb->debugger : interp;
+ TRACEDEB_MSG("PDB_eval");
+ UNUSED(command);
+ Parrot_eprintf(warninterp, "The eval command is currently unimplemeneted\n");
}
/*
@@ -3280,24 +3272,11 @@
PDB_compile(PARROT_INTERP, ARGIN(const char *command))
{
ASSERT_ARGS(PDB_compile)
- STRING *buf;
- const char *end = "\nend\n";
- STRING *key = CONST_STRING(interp, "PASM");
- PMC *compreg_hash = VTABLE_get_pmc_keyed_int(interp,
- interp->iglobals, IGLOBALS_COMPREG_HASH);
- PMC *compiler = VTABLE_get_pmc_keyed_str(interp, compreg_hash, key);
-
- TRACEDEB_MSG("PDB_compile");
- if (!VTABLE_defined(interp, compiler)) {
- fprintf(stderr, "Couldn't find PASM compiler");
- return NULL;
- }
-
- TRACEDEB_MSG("PDB_compile creating code string");
- buf = Parrot_sprintf_c(interp, "%s%s", command, end);
- TRACEDEB_MSG("PDB_compile invoking code");
- return VTABLE_invoke(interp, compiler, buf);
+ UNUSED(command);
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_UNIMPLEMENTED,
+ "PDB_compile ('PASM1' compiler) has been deprecated");
}
/*
More information about the parrot-commits
mailing list