From 905ce70eb6a609ebeaee0e72577c214783e7dd75 Mon Sep 17 00:00:00 2001 From: Eric Faust Date: Sat, 10 Aug 2013 22:20:36 -0700 Subject: [PATCH] Bug 875452 - Part 6.5: Fix const correctness issues in IonCaches.h (r=shu) --- js/src/jit/IonCaches.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/src/jit/IonCaches.h b/js/src/jit/IonCaches.h index 5110d307461b..bbd79d36ff53 100644 --- a/js/src/jit/IonCaches.h +++ b/js/src/jit/IonCaches.h @@ -143,8 +143,8 @@ class IonCache bool is##ickind() const { \ return kind() == Cache_##ickind; \ } \ - inline ickind##IC &to##ickind(); - + inline ickind##IC &to##ickind(); \ + inline const ickind##IC &to##ickind() const; IONCACHE_KIND_LIST(CACHEKIND_CASTS) # undef CACHEKIND_CASTS @@ -248,7 +248,7 @@ class IonCache } #endif - bool pure() { + bool pure() const { return pure_; } bool idempotent() const { @@ -1049,6 +1049,11 @@ class GetElementParIC : public ParallelIonCache { \ JS_ASSERT(is##ickind()); \ return *static_cast(this); \ + } \ + const ickind##IC &IonCache::to##ickind() const \ + { \ + JS_ASSERT(is##ickind()); \ + return *static_cast(this); \ } IONCACHE_KIND_LIST(CACHE_CASTS) #undef OPCODE_CASTS