From ffdf34999edea7fdc176ab4ac36bd3993f5d1061 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Sun, 9 Nov 2014 16:20:20 -0500 Subject: immediately new/deref the parser in parse statements This forces the parser to exist on the heap, where we can clean it up with the new object downref machinery. --- src/synthesis.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/synthesis.cc') diff --git a/src/synthesis.cc b/src/synthesis.cc index 0d4e947c..10c09b4c 100644 --- a/src/synthesis.cc +++ b/src/synthesis.cc @@ -1221,6 +1221,8 @@ UniqueType *LangTerm::evaluateParse( Compiler *pd, CodeVect &code, /* Construct the parser. */ code.append( IN_CONS_GENERIC ); code.appendHalf( parserUT->langEl->generic->id ); + code.append( IN_TREE_NEW ); + code.append( IN_PTR_DEREF_R ); /* Dup for the finish operation. */ code.append( IN_DUP_TOP ); -- cgit v1.2.1