Skip to content
Snippets Groups Projects
Commit dad12d76 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Now generates code to support run-time checks of soft casts.

Rev: src/docode.c:1.58
parent 831bd09d
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
\*/
/**/
#include "global.h"
RCSID("$Id: docode.c,v 1.57 1999/11/23 22:37:14 grubba Exp $");
RCSID("$Id: docode.c,v 1.58 1999/11/25 16:39:31 grubba Exp $");
#include "las.h"
#include "program.h"
#include "language.h"
......@@ -706,7 +706,20 @@ static int do_docode2(node *n,int flags)
return 1;
case F_SOFT_CAST:
return do_docode(CAR(n), flags);
#ifdef PIKE_DEBUG
if (d_flag) {
tmp1 = store_prog_string(n->type);
emit(F_STRING, tmp1);
tmp1 = do_docode(CAR(n), 0);
if (!tmp1) { emit2(F_CONST0); tmp1 = 1; }
if (tmp1 > 1) do_pop(tmp1 - 1);
emit2(F_SOFT_CAST);
return 1;
}
#endif /* PIKE_DEBUG */
tmp1 = do_docode(CAR(n), flags);
if (tmp1 > 1) do_pop(tmp1 - 1);
return !!tmp1;
case F_APPLY:
if(CAR(n)->token == F_CONSTANT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment