1 Information for the Slate Distribution
2 --------------------------------------
4 Slate is a prototype-based, multi-dispatch object-oriented language that
5 runs from a highly-customizable live environment. The implementation is
6 highly portable and relatively lightweight.
8 The reference site for this Distribution is at http://www.slatelanguage.org
9 and the Google Code project at: http://code.google.com/p/slate-language/
11 Bug reports and requests for information can be made via the Slate mailing
12 list, described at: http://groups.google.com/group/slate-language
14 See the wiki for more detailed documentation:
15 http://code.google.com/p/slate-language/w/list
17 See our bug-tracker for issues:
18 http://code.google.com/p/slate-language/issues/list
24 'make slate.image' builds a standard saved image from a kernel image.
25 'make edit' launches the VM and standard image in Emacs with a scratch area.
26 '(sudo) make install' installs the VM and images in global directories (/usr/local/ by default) so that the VM can be invoked as just "slate".
28 Read common.mk for more options.
35 This starts slate using <image>.
37 Run 'slate -h' for more details.
42 Read the online tutorials (from newest to oldest):
44 * http://slatelanguage.org/tutorial/
45 * http://code.google.com/p/slate-language/wiki/GettingStarted
50 If you make changes to core slate files (like adding a new field to
51 CompiledMethods), sometimes the only easy way to make those changes
52 throughout the system is to rebuild Slate completely. Here is how you
53 generate a new kernel image:
57 make bootstrap WORD_SIZE=64 && make slate.image WORD_SIZE=64
59 make bootstrap WORD_SIZE=32 && make slate.image WORD_SIZE=32
63 At the Slate REPL, execute:
64 load: 'src/mobius/init.slate'.
66 Image bootstrap &littleEndian: True &bitSize: 32.
68 Image bootstrap &littleEndian: True &bitSize: 64.
70 Then you will load the resulting kernel image like a regular image:
72 ./slate -i kernel.new.<endian>.<wordsize>.<timestamp>.image
74 After the image is loaded, you will want to save it so you
75 don't have to go through loading the kernel again:
77 Image saveNamed: 'slate.image'.
83 make vmclean && make DEBUG=1
88 f <n> (change frame to one with an 'oh' object (struct object_heap*))
90 See the slate backtrace -> print print_backtrace(oh)
91 Inspect an object -> print print_detail(oh, struct Object*)
92 See the stack -> print print_stack_types(oh, 200)
95 Source directory structure
96 --------------------------
99 : The C files for the VM. Interprets bytecode and provides necessary facilities for primitives, gc, etc.
100 src/mobius -> The slate files for the compiler, lexer, bootstrap, and close-to-vm? facilities etc.
102 : The core libraries for the default slate system.
104 : The standard but optional libraries.
106 : C code for slate FFI calls. `make plugins' to build
108 : The slate UI code that probably calls plugins to draw the basics. load: 'src/ui/init.slate'.
110 : The slate GTK interface. load: 'src/ui/gtk/demo.slate'.
112 : The slate networking code. load: 'src/net/init.slate'.
117 Besides using grep, there are a few facilities:
119 #as: implementations do: [|:each| each definitionLocation ifNotNilDo: [|:l| inform: (l as: String) ]].
121 (#parseExpression findOn: {Syntax Parser}) definitionLocation
123 See the slate manual for more details.
133 genCode: (c generate:
137 method sourceTree result: Nil &topLevel: True) code.
139 ] applyWith: VM SSACompiler new.
143 Inside a function definition:
148 genCode: (c generate:
150 block@(Method traits) on: c@(Condition traits) do: handler
152 context: (c cloneSettingSlots: #(handlers exitContinuation)
153 to: {{handler}. [| :result | ^ result]}).
154 conditionStack push: context.
155 block ensure: [conditionStack pop]
159 method sourceTree result: Nil &topLevel: True) code.
160 c decompile: genCode third code
161 ] applyWith: VM SSACompiler new.
170 genCode: (c generate:
172 block@(Method traits) on: c@(Condition traits) do: handler
174 context: (c cloneSettingSlots: #(handlers exitContinuation)
175 to: {{handler}. [| :result | ^ result]}).
176 conditionStack push: context.
177 block ensure: [conditionStack pop]
181 method sourceTree result: Nil &topLevel: True) code.
182 c decompile: (genCode third code at: 13) code
183 ] applyWith: VM SSACompiler new.
187 See what is getting called:
191 VM SSACompiler new decompile: (#handle: findOn: {mainWindow. PaintEvent newContext: mainWindow context}) method code.