finding source code that is defined after bootstrap

7 views
Skip to first unread message

Timmy Douglas

unread,
Jan 10, 2009, 4:02:22 PM1/10/09
to slate-language
I added code to store the source file where the code was originally
read. Bootstrap code does not contain this information because of the
limited number of types of objects that can created then. The idea is
to eventually take advantage of this information in the to-be IDE.

Slate 5> #as: implementations do: [|:each| each definitionLocation
ifNotNilDo:
[|:l| inform: (l as: String) ]].
GC Freed 123906 words and coalesced 353 times
GC tenured 593 objects (11940 words)
GC Freed 112608 words and coalesced 82 times
GC tenured 114 objects (3613 words)
src/lib/path.slate:149
src/lib/path.slate:6
src/lib/complex.slate:38
src/lib/queue.slate:27
src/lib/path.slate:133
src/lib/directory.slate:186
src/lib/bag.slate:42
src/lib/fraction.slate:115
src/lib/directory.slate:182
src/lib/path.slate:171
src/lib/fraction.slate:92
src/lib/path.slate:174
src/lib/tuple.slate:10
src/lib/path.slate:168
src/lib/complex.slate:31
src/lib/module.slate:153
src/lib/numericMixin.slate:3
src/lib/path.slate:158
src/lib/fraction.slate:95
src/lib/fraction.slate:112


Slate 7> (#save findOn: {Image}) definitionLocation.
'src/lib/image.slate:5'

Guille

unread,
Jan 14, 2009, 10:25:58 AM1/14/09
to slate-language
Ok, I merged the Inspector and the traitsborwser. Now the inspector
shows you the methods, and if the source is available, it opens a new
Workspace for you to read the source. Next steps are to make the
workspace behave like a normal editor (save, copy, paste, etc).

Guille

unread,
Jan 14, 2009, 3:01:51 PM1/14/09
to slate-language
I 've noticed that there is less source code information than what I
would like.
I would suggest to standardize the way we reach source code, either by
completing sourcefile/line number pair info after bootstrap, (and keep
that info synchronized afterwards) or just saving each method source
code in a slot called source at compile time.

Timmy Douglas

unread,
Jan 14, 2009, 5:30:18 PM1/14/09
to slate-language
I tried pulling from your git repository but I haven't seen any
updates.

The best way to do this would be to look at src/mobius/bootstrap.slate
and looking at what files it loads. Then make a file that loads all
those files after the image has bootstrapped. One issue is that some
of those files have "bootstrap fixups" which should be moved into
separate files so that loading the files twice doesn't cause any
problems.

The location of the source is given by the lexer, so when you evaluate
code in your environment, you might want to fill out that field with
something that your editor can understand and find.

Timmy Douglas

unread,
Jan 14, 2009, 5:33:48 PM1/14/09
to slate-language
er sorry I mean src/mobius/build.slate. That has the list of files.

Maybe I can do this later, for now just assume that you will have
more results.

Guille

unread,
Jan 15, 2009, 3:05:06 AM1/15/09
to slate-language
> I tried pulling from your git repository but I haven't seen any
> updates.
>

Sorry about that, I commited but I didn't pushed, check now
Reply all
Reply to author
Forward
0 new messages