Mercurial > octave-nkf
diff src/ov-base.h @ 14903:54ea692b8ab5
Reworking JIT implementation
src/TEMPLATE-INST/Array-jit.cc: New file.
src/TEMPLATE-INST/module.mk: Add Array-jit.cc.
src/ov-base.h (octave_base_value::grab,
octave_base_value::release): New functions.
src/pt-jit.cc: Rewrite.
src/pt-jit.h: Rewrite.
author | Max Brister <max@2bass.com> |
---|---|
date | Sat, 12 May 2012 19:24:32 -0600 |
parents | e8e86ae3abbc |
children | 466cb8673653 |
line wrap: on
line diff
--- a/src/ov-base.h Wed May 09 12:53:41 2012 -0600 +++ b/src/ov-base.h Sat May 12 19:24:32 2012 -0600 @@ -755,6 +755,21 @@ virtual bool fast_elem_insert_self (void *where, builtin_type_t btyp) const; + // Grab the reference count. For use by jit. + void + grab (void) + { + ++count; + } + + // Release the reference count. For use by jit. + void + release (void) + { + if (--count == 0) + delete this; + } + protected: // This should only be called for derived types.