Front Page All Articles Recent Changes Random Article

Contents

Concatenative language

  • ACL
  • Ait
  • Aocla
  • Breeze
  • Callisto
  • Cat
  • Cognate
  • colorForth
  • Concata
  • CoSy
  • Deque
  • DSSP
  • dt
  • Elymas
  • Enchilada
  • ETAC
  • F
  • Factor
  • Fiveth
  • Forth
  • Fourth
  • Freelang
  • Gershwin
  • hex
  • iNet
  • Joy
  • Joy of Postfix App
  • kcats
  • Kitten
  • lang5
  • Listack
  • LSE64
  • Lviv
  • Meow5
  • min
  • Mirth
  • mjoy
  • Mlatu
  • Ode
  • OForth
  • Om
  • Onyx
  • Plorth
  • Popr
  • Porth
  • PostScript
  • Prowl
  • Quest32
  • Quackery
  • r3
  • Raven
  • Retro
  • RPL
  • SPL
  • Staapl
  • Stabel
  • Tal
  • Titan
  • Trith
  • Uiua
  • Worst
  • xs
  • XY
  • 5th
  • 8th

Concatenative topics

  • Compilers
  • Interpreters
  • Type systems
  • Object systems
  • Quotations
  • Variables
  • Garbage collection
  • Example programs

Concatenative meta

  • People
  • Communities

Other languages

  • APL
  • C++
  • Erlang
  • FP trivia
  • Haskell
  • Io
  • Java
  • JavaScript
  • Lisp
  • ML
  • Oberon
  • RPL
  • Self
  • Slate
  • Smalltalk

Meta

  • Search
  • Farkup wiki format
  • Etiquette
  • Sandbox

Factor/To do/Static stack safety

  • every word has a stack effect
  • the effect is set at word construction time!
  • stack effect can be unknown: ( ... )
  • effect<= checks for an unknown
  • if word calls words w/ unknown effect, don't compile
  • call of unknown quot from optimized word checks effect
(( ... )) call-with

: foo ( ... q: ( a -- b ) -- ) call ;
  • we don't want to load stack checker in stage1
  • define calls a stack checker hook
  • we no longer need usages xref, "inferred-effect" word-prop, "compiled-effect" word-prop

we can roll this out in phases:

phase 1: require declarations in all contexts and have :, HOOK:, GENERIC:

actually parse the declaration so omitting it is a syntax error

assert-depth should infer

phase 2: introduce ... in stack effects and enforce it

no such thing as an inference warning anymore!

phase 3: define-declared becomes define

phase 4: get rid of ... effects hopefully

issues:

  • changing effect of inline ... word may bubble up to callers.
  • we can get rid of ... words altogether if some combinators, such as dip, bi, and so on, become strongly-typed.

This revision created on Wed, 26 Nov 2008 00:33:44 by slava

Latest Revisions Edit

All content is © 2008-2024 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.