Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Self (programming language)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Environment == One feature of Self is that it is based on the same sort of [[virtual machine]] system that earlier Smalltalk systems used. That is, programs are not [[Standalone program|stand-alone]] entities as they are in languages such as [[C (programming language)|C]], but need their entire memory environment in order to run. This requires that applications be shipped in chunks of saved memory known as ''snapshots'' or ''[[system image|images]]''. One disadvantage of this approach is that images are sometimes large and unwieldy; however, debugging an image is often simpler than debugging traditional programs because the runtime state is easier to inspect and modify. (The difference between source-based and image-based development is analogous to the difference between class-based and prototypical object-oriented programming.) In addition, the environment is tailored to the rapid and continual change of the objects in the system. Refactoring a "class" design is as simple as dragging methods out of the existing ancestors into new ones. Simple tasks like test methods can be handled by making a copy, dragging the method into the copy, then changing it. Unlike traditional systems, only the changed object has the new code, and nothing has to be rebuilt in order to test it. If the method works, it can simply be dragged back into the ancestor. ===Performance=== Self VMs achieved performance of approximately half the speed of optimised C on some benchmarks.<ref>{{cite journal |url=http://research.sun.com/jtech/pubs/97-pep.ps |title=Design and Implementation of Pep, a Java Just-In-Time Translator |last1=Agesen |first1=Ole |journal=Theory and Practice of Object Systems |volume=3 |issue=2 |date=March 1997 |pages=127β155 |doi=10.1002/(SICI)1096-9942(1997)3:2<127::AID-TAPO4>3.0.CO;2-S |archive-url=https://web.archive.org/web/20061124224739/http://research.sun.com/jtech/pubs/97-pep.ps |archive-date=November 24, 2006 |url-status=dead}}</ref> This was achieved by [[just-in-time compilation]] techniques which were pioneered and improved in Self research to make a high level language perform this well. ===Garbage collection=== The [[Garbage collection (computer science)|garbage collector]] for Self uses [[Tracing garbage collection#Generational GC (ephemeral GC)|generational garbage collection]] which segregates objects by age. By using the memory management system to record page writes a write-barrier can be maintained. This technique gives excellent performance, although after running for some time a full garbage collection can occur, taking considerable time.{{Vague|date=April 2020}} ===Optimizations=== The run time system selectively flattens call structures. This gives modest speedups in itself, but allows extensive caching of type information and multiple versions of code for different caller types. This removes the need to do many method lookups and permits conditional branch statements and hard-coded calls to be inserted- often giving C-like performance with no loss of generality at the language level, but on a fully garbage collected system.<ref>{{cite thesis |url=https://www.cs.tufts.edu/~nr/cs257/archive/craig-chambers/thesis.pdf |title=The Design and Implementation of the SELF Compiler, an Optimizing Compiler for Object-Oriented Programming Languages |first=Craig |last=Chambers |publisher=[[Stanford University]] |degree=PhD |date=March 13, 1992}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Self (programming language)
(section)
Add topic