changeset 20825:d35201e5ce5d

Fix compilation of jit broken by dd6345fd8a97 (bug #46191). * jit-typeinfo.cc (octave_jit_compute_nelem): Use rng.numel() rather than deprecated nelem(). * jit-typeinfo.cc (octave_jit_ginvalid_index): Call gripe_invalid_index (-1) now that 0-argument form of function has been removed. * jit-typeinfo.h (jit_range): Use numel() rather than nelem() for Range. * pt-jit.cc (trip_count): Use numel() rather than nelem() for Range.
author Rik <rik@octave.org>
date Mon, 12 Oct 2015 16:08:12 -0700
parents 27c091f4b66d
children 93d96da9ff3e
files libinterp/corefcn/jit-typeinfo.cc libinterp/corefcn/jit-typeinfo.h libinterp/corefcn/pt-jit.cc
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/jit-typeinfo.cc
+++ b/libinterp/corefcn/jit-typeinfo.cc
@@ -115,7 +115,7 @@
 octave_jit_compute_nelem (double base, double limit, double inc)
 {
   Range rng = Range (base, limit, inc);
-  return rng.nelem ();
+  return rng.numel ();
 }
 
 extern "C" void
@@ -221,7 +221,9 @@
 extern "C" void
 octave_jit_ginvalid_index (void)
 {
-  gripe_invalid_index ();
+  // FIXME: 0-argument form of gripe_invalid_index removed in cset dd6345fd8a97 
+  //        Report -1 as the bad index for all occurrences.
+  gripe_invalid_index (-1);
 }
 
 extern "C" void
--- a/libinterp/corefcn/jit-typeinfo.h
+++ b/libinterp/corefcn/jit-typeinfo.h
@@ -45,7 +45,7 @@
 jit_range
 {
   jit_range (const Range& from) : base (from.base ()), limit (from.limit ()),
-                                  inc (from.inc ()), nelem (from.nelem ())
+                                  inc (from.inc ()), nelem (from.numel ())
   { }
 
   operator Range () const
--- a/libinterp/corefcn/pt-jit.cc
+++ b/libinterp/corefcn/pt-jit.cc
@@ -2170,7 +2170,7 @@
   if (bounds.is_range ())
     {
       Range rng = bounds.range_value ();
-      return rng.nelem ();
+      return rng.numel ();
     }
 
   // unsupported type