]> gitweb.factorcode.org Git - factor.git/commit
namespaces: make set-global/get-global foldable
authorJoe Groff <arcata@gmail.com>
Sun, 27 Nov 2011 04:20:55 +0000 (20:20 -0800)
committerJoe Groff <arcata@gmail.com>
Tue, 29 Nov 2011 02:25:27 +0000 (18:25 -0800)
commita1b730e86733335f32624fda57475139c52f2c4f
treee52e46d2e1b1d5e015acdf807fcac63a50f81710
parent8b18af03356f55d3b41a23cdc7e39b42e323df70
namespaces: make set-global/get-global foldable
Store the globals hashtable as an array of boxes so that the key-to-reference mapping is constant. Use a singleton and an unfoldable "box-at" word so that get-global and set-global optimize to direct operations on the associated box when the variable name is a compile-time constant. Fixes #200.
basis/bootstrap/image/image.factor
core/namespaces/namespaces-tests.factor
core/namespaces/namespaces.factor