[Top][All Lists]

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

[Help-smalltalk] STInST can compile TCP (and other primitives)

From: Stephen Compall
Subject: [Help-smalltalk] STInST can compile TCP (and other primitives)
Date: Sun, 08 Apr 2007 05:03:28 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: Gecko/20070221 SeaMonkey/1.1.1

Back in the thread "method attribute compilation from files" I posted a fix for an off-by-one that was blocking compiling primitive definitions with the STCompiler. That was, however, only one of the blocking issues. smalltalk--backstage--2.2--patch-17 or the attached fixes both remaining issues.

Compiler can now load TCP, and files with more than one FFI method, for example. This also handles an environment/shared pool variable resolution problem, though perhaps not ideally (which I will discuss separately).

;;; Stephen Compall ** **
Failure to imagine vast possibilities usually stems from a lack of
imagination, not a lack of possibility.
2007-04-08  Stephen Compall  <address@hidden>

        * compiler/ Add superclass environments and shared
        pools to global variable search.

        * compiler/ Reset `tags' instance variable before each
        method parse in a method definition list.

--- orig/compiler/
+++ mod/compiler/
@@ -323,6 +323,7 @@
           and: [ currentToken value == $! ] ] ] whileFalse: [
        start := currentToken start - 1.
+        tags := nil.
         node := self parseMethod.
         "One -1 accounts for base-1 vs. base-0 (as above), the
--- orig/compiler/
+++ mod/compiler/
@@ -188,14 +188,14 @@
     behavior withAllSuperclassesDo: [ :class |
-       self addPool: behavior environment.
+       self addPool: class environment.
        class classPool isEmpty ifFalse: [
            pools add: class classPool
     behavior withAllSuperclassesDo: [ :class || dicts |
-       dicts := behavior sharedPoolDictionaries.
+       dicts := class sharedPoolDictionaries.
        dicts isNil ifFalse: [
            dicts do: [ :sp | self addPool: sp ]

reply via email to

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