X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fexpr-opt.c;h=40358a77e76108159ef41e45467b1e4e0a5260f8;hb=6f972e0ef93c3a7e00fd5335ea22af2c878f4589;hp=e221d4e2e0c0373234079243ad2ca5abbbfd54a8;hpb=4944c86a9318bc5b5578ab145a95c116ffd2c9fd;p=pspp diff --git a/src/expr-opt.c b/src/expr-opt.c index e221d4e2e0..40358a77e7 100644 --- a/src/expr-opt.c +++ b/src/expr-opt.c @@ -18,6 +18,8 @@ 02111-1307, USA. */ #include +#include "expr.h" +#include "exprP.h" #include #include #include @@ -27,10 +29,9 @@ #include "approx.h" #include "data-in.h" #include "error.h" -#include "expr.h" -#include "exprP.h" #include "julcal/julcal.h" #include "misc.h" +#include "pool.h" #include "stats.h" #include "str.h" #include "var.h" @@ -834,6 +835,7 @@ evaluate_tree (struct nonterm_node * n) f.d = (int) n->arg[3]; v.f = n0; + assert ((formats[f.type].cat & FCAT_STRING) == 0); data_out (strbuf, &f, &v); n = repl_str_con (n, strbuf, f.w); } @@ -884,12 +886,6 @@ evaluate_tree (struct nonterm_node * n) } rnc (n0); break; - -#if __CHECKER__ - /* This case prevents Checker from choking. */ - case 42000: - assert (0); -#endif } return n; } @@ -1027,19 +1023,13 @@ dump_expression (union any_node * n, struct expression * expr) max_height = height; } - /* ANSI says we have to waste space for one `value' since pointers - are not guaranteed to be able to point to a spot *before* a - block. If only all the world were a VAX... */ + /* We waste space for one `value' since pointers are not + guaranteed to be able to point to a spot before a block. */ max_height++; e->stack = xmalloc (max_height * sizeof *e->stack); -#if PAGED_STACK - e->str_stack = e->type == EX_STRING ? xmalloc (256) : NULL; -#else - e->str_stack = xmalloc (256); - e->str_size = 256; -#endif + e->pool = pool_create (); } static void