Mercurial > hg > octave-nkf
comparison libinterp/interp-core/pt-jit.h @ 15592:6fc163b59746
Correctly handle break/continue for some corner cases in JIT
* pt-jit.cc (jit_break_exception): New class.
(jit_convert::jit_convert, jit_convert::visit_simple_for_command, jit_convert::visit_if_command_list, jit_convert::visit_while_command): Handle breaks/continues correctly.
(jit_convert::visit_break_command, jit_convert::visit_continue_command): Throw
instead of setting breaking.
(jit_convert::visit_statement_list): Do not check breaking.
(jit_convert::initialize): Do not initialize breaking.
* pt-jit.h (jit_convert::breaking): Remove variable.
author | Max Brister <max@2bass.com> |
---|---|
date | Sun, 04 Nov 2012 15:38:48 -0700 |
parents | 52df2e7baabe |
children | 896cf5769537 e2de3c8882be |
comparison
equal
deleted
inserted
replaced
15591:8be22193532b | 15592:6fc163b59746 |
---|---|
229 | 229 |
230 jit_value *visit (tree *tee) { return visit (*tee); } | 230 jit_value *visit (tree *tee) { return visit (*tee); } |
231 | 231 |
232 jit_value *visit (tree& tee); | 232 jit_value *visit (tree& tee); |
233 | 233 |
234 bool breaking; // true if we are breaking OR continuing | |
235 | |
236 typedef std::list<jit_block *> block_list; | 234 typedef std::list<jit_block *> block_list; |
237 block_list breaks; | 235 block_list breaks; |
238 block_list continues; | 236 block_list continues; |
239 | 237 |
240 void finish_breaks (jit_block *dest, const block_list& lst); | 238 void finish_breaks (jit_block *dest, const block_list& lst); |