help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] [PATCH 2/2] libgst: Do not flush the cache twice when a


From: Holger Hans Peter Freyther
Subject: [Help-smalltalk] [PATCH 2/2] libgst: Do not flush the cache twice when adding a new method
Date: Sun, 22 Dec 2013 12:23:54 +0100

install_method was flushing the cache twice. Once by calling
>>#at:put: on the MethodDictionary and once by install_method
itself. Only do that when the kernel is not initialized yet.

2013-12-22  Holger Hans Peter Freyther  <address@hidden>

        * comp.c: Only flush the cache once when adding a new
        CompiledMethod.
---
 libgst/ChangeLog | 5 +++++
 libgst/comp.c    | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libgst/ChangeLog b/libgst/ChangeLog
index 03287b1..6e48372 100644
--- a/libgst/ChangeLog
+++ b/libgst/ChangeLog
@@ -1,5 +1,10 @@
 2013-12-22  Holger Hans Peter Freyther  <address@hidden>
 
+       * comp.c: Only flush the cache once when adding a new
+       CompiledMethod.
+
+2013-12-22  Holger Hans Peter Freyther  <address@hidden>
+
        * interp.c: Do not flush the cache when creating a new
        process.
 
diff --git a/libgst/comp.c b/libgst/comp.c
index 0efcae1..040994c 100644
--- a/libgst/comp.c
+++ b/libgst/comp.c
@@ -2553,7 +2553,8 @@ install_method (OOP methodOOP, OOP classOOP)
 #ifdef VERIFY_COMPILED_METHODS
   _gst_verify_sent_method (methodOOP);
 #endif
-  _gst_invalidate_method_cache ();
+  if (!_gst_kernel_initialized)
+    _gst_invalidate_method_cache ();
 }
 
 OOP
-- 
1.8.5.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]