lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] Porting GNU Smalltalk to lightning 2


From: Holger Hans Peter Freyther
Subject: Re: [Lightning] Porting GNU Smalltalk to lightning 2
Date: Sun, 26 Oct 2014 12:32:26 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, Oct 26, 2014 at 12:05:09PM +0100, Holger Hans Peter Freyther wrote:

> oh wow. In regard to the inline caches. Maybe you can think of a
> better way to invalidate them. You should invalidate your ICs from
> _gst_reset_inline_caches as well. _gst_invalidate_method_cache will
> be called from Smalltalk code (e.g. when a new method is added to
> the method dictionary).

disabling the inlining of super (or forcing it?) will get us
through most of the Ansi tests. This leaves the DebugTools
error but that is an issue with the testcase (it assumes that
a step will be a single bytecode.)


diff --git a/libgst/files.c b/libgst/files.c
index a38fb1a..f6a7973 100644
--- a/libgst/files.c
+++ b/libgst/files.c
@@ -177,13 +177,13 @@ static const char standard_files[] = {
   "Date.st\0"
   "Time.st\0"
   "Number.st\0"
+  "SmallInt.st\0"
   "Float.st\0"
   "FloatD.st\0"
   "FloatE.st\0"
   "FloatQ.st\0"
   "Fraction.st\0"
   "LargeInt.st\0"
-  "SmallInt.st\0"
   "Character.st\0"
   "UniChar.st\0"
   "Link.st\0"
diff --git a/libgst/xlat.c b/libgst/xlat.c
index 4955c24..ce56bc2 100644
--- a/libgst/xlat.c
+++ b/libgst/xlat.c
@@ -1345,7 +1345,7 @@ defer_send (code_tree *tree, mst_Boolean isBool, 
jit_node_t *jump, int reg0, int
 
 /* Don't inline if doing a send to super */
 #define DONT_INLINE_SUPER do {                                         \
-  if(ic->is_super) {                                                   \
+  if(1 || ic->is_super) {                                                      
\
     gen_send(tree);                                                    \
     return;                                                            \
   }                                                                    \
@@ -4109,6 +4109,8 @@ _gst_reset_inline_caches ()
          ic->cachedIP = ic->is_super ? do_super_code : do_send_code;
         while ((ic++)->more);
       }
+
+  reset_invalidated_inline_caches();
 }
 
 void
@@ -4119,7 +4121,7 @@ _gst_free_released_native_code (void)
   if (!released)
     return;
 
-  reset_invalidated_inline_caches ();
+  _gst_reset_inline_caches();
   _gst_validate_method_cache_entries ();
 
   /* now free the list */




reply via email to

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