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 ** http://scompall.nocandysw.com/blog **
Failure to imagine vast possibilities usually stems from a lack of
imagination, not a lack of possibility.
2007-04-08 Stephen Compall <[EMAIL PROTECTED]>
* compiler/STSymTable.st: Add superclass environments and shared
pools to global variable search.
* compiler/RBParser.st: Reset `tags' instance variable before each
method parse in a method definition list.
--- orig/compiler/RBParser.st
+++ mod/compiler/RBParser.st
@@ -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/STSymTable.st
+++ mod/compiler/STSymTable.st
@@ -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 ]
]
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk