From 1cd2408a7f738e8f3ec224f7840715ceefbecd48 Mon Sep 17 00:00:00 2001 From: "Brian T. Rice" Date: Tue, 1 Feb 2011 20:34:38 -0800 Subject: [PATCH] Bug-fixes for Symbol interning. --- src/core/symbol.slate | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/symbol.slate b/src/core/symbol.slate index 8ae2beb..45670bd 100644 --- a/src/core/symbol.slate +++ b/src/core/symbol.slate @@ -42,17 +42,17 @@ s@(Symbol traits) replaceFrom: _ to: _ with: _ startingAt: _ "Set up the table for interned strings, or Symbols in general." (lobby globals Symbols is: Sequence) ifTrue: [| newTable | - newTable := Dictionary new &capacity: Symbols size * 2. - Symbols do: [| :each | newTable at: each name put: each]. + newTable := Dictionary new &capacity: lobby globals Symbols size * 2. + lobby globals Symbols do: [| :each | newTable at: each name put: each]. lobby globals atSlotNamed: #Symbols put: newTable. "Remove the bootstrap kluge." #intern: removeMethodFrom: {lobby. ASCIIString traits}]. -x@lobby intern: s@(String traits) +_@lobby intern: s@(String traits) "Answer a Symbol object with the string as its name. This will identify any existing Symbol with the same name and use that, or create a new one if not." [ - x globals Symbols at: s ifAbsentPut: [Symbol newNamed: s] + globals Symbols at: s ifAbsentPut: [Symbol newNamed: s] ]. s@(Symbol traits) named: name @@ -60,12 +60,12 @@ s@(Symbol traits) named: name globals Symbols at: name ]. -x intern: s@(Symbol traits) +x@lobby intern: s@(Symbol traits) [x intern: s name]. s@(Root traits) intern "A quick way to create a new Symbol, and allow for genericity later, perhaps." -[s intern: s]. +[lobby intern: s]. globals removeSlot: #bootstrapSymbols. -- 2.11.4.GIT