Past and Future
What?

A progressive, open-source Smalltalk platform
            for professional use.
What?

A flexible environment to support the research
          of new language concepts.
What?
   Pharo = Language + IDE

Pure Object-Oriented Language

      Dynamically Typed
History
         Based on Squeak Smalltalk

+ Major Cleanups (MVC, eToys)
+ New UI Look / TrueType
+ Tools
+ Block Closure...
699 Bug-reports closed

       377 Updates

Release Planned: August 2009
Getting
Started
 (if needed)
Pier
Pier
Smalltalk with OO-Database

     Pharo is the IDE
Future
...cleaner
...smaller
...faster
(of course)
Enable
Evolution
Enable
Experiments
Examples
- Compiler

- Slots

- JIT and AOStA
Old Compiler
- From 1976
- Not OO
- Hard to understand. Hard to change

     We need a better Compiler!
New Compiler
- Originally by Anthony Hannan

- Based on Visitors
- Reusable and Pluggable Backend (IRBuilder)
- Uses RB AS...
New Compiler
       Scanner                Semantic                      Code
code              AST                      A...
Plans...
- New BlockClosure Format

- Plugin architecture: Parser, Checker, CodeGen

- Use RB Parser (Faster, Error messag...
Examples
- Compiler

- Slots

- JIT and AOStA
Instance Vars
- Not objects
- Change behavior?
- Change memory layout?

    Instance state should be more
              po...
Slots
- Are objects
- Allow custom subclasses
- Change behavior and memory layout

    Without Performance penalty!
Auto-Accessor
MopObject subclass: #SlotExample

 slots: '{AutoAccessorSlot named: #hello}'

 classVariableNames: ''

 pool...
Active Slot
MopObject subclass: #SlotExample

 slots: '{ActiveSlot named: #hello
              action: [Beeper beep]}'

 c...
Sparse Slot
MopObject subclass: #SlotExample

 slots: '{SparseSlot named: #a.
           SparseSlot named: #b.
           ...
iVar Slot
MopObject subclass: #SlotExample

 slots: '{IVarSlot named: #a}

 classVariableNames: ''

 poolDictionaries: ''
...
Auto-Accessor
MopObject subclass: #SlotExample

 slots: '{AutoAccessorSlot named: #hello}'

 classVariableNames: ''

 pool...
Slot subclass: #AutoAccessorSlot

 instanceVariableNames: ''

 ....


postCreationAction

 self generateGetter.

 self gen...
Active Slot
MopObject subclass: #SlotExample

 slots: '{ActiveSlot named: #hello
              action: [Beeper beep]}'

 c...
Active Slot
AutoAccessorSlot subclass: #ActiveSlot

 instanceVariableNames: 'action'

 ....


emitReadUsing: methodBuilder...
Status
- First Prototype

- Integration with ClassBuilder
- Compatibility with iVars
- Explore different designs
Examples
- Compiler

- Slots

- JIT and AOStA
VM
- Virtual Machine uses Interpreter

- JIT Compiler under development (Eliot Miranda)

      How to optimize even more?
AOStA
- Provide API for accessing runtime data

- PIC: Polymorphic Inline Cache

     Record class per send instruction

-...
AOStA
      PIC


     BC 2                                SSA 2
BC            SSA     OPT      SSA               BC
     ...
AOStA
- Use PIC-Data for specialization

- Inline often-called methods

- Special Bytecode for primitive types (Floats)
AOStA
- Bytecode-to-Bytecode optimization

- Purely realized in Smaltalk

- Accessible in the image. Reflection?
More...
- Improve Tools

- Real Modules

- Reflection

- .......
Join Us!

 Goal: learning and having fun

http://pharo-project.org
Denker - Pharo: Present and Future - 2009-07-14
Denker - Pharo: Present and Future - 2009-07-14
Upcoming SlideShare
Loading in...5
×

Denker - Pharo: Present and Future - 2009-07-14

641

Published on

This set of slides was used by Marcus Denker for his CHOOSE SIGBeer given on July 14, 2009 in Bern:
http://choose.s-i.ch/events/2009-07-14-denker

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
641
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Denker - Pharo: Present and Future - 2009-07-14"

  1. 1. Past and Future
  2. 2. What? A progressive, open-source Smalltalk platform for professional use.
  3. 3. What? A flexible environment to support the research of new language concepts.
  4. 4. What? Pharo = Language + IDE Pure Object-Oriented Language Dynamically Typed
  5. 5. History Based on Squeak Smalltalk + Major Cleanups (MVC, eToys) + New UI Look / TrueType + Tools + Block Closures + Lots of bugfixes and small improvements
  6. 6. 699 Bug-reports closed 377 Updates Release Planned: August 2009
  7. 7. Getting Started (if needed)
  8. 8. Pier
  9. 9. Pier
  10. 10. Smalltalk with OO-Database Pharo is the IDE
  11. 11. Future
  12. 12. ...cleaner
  13. 13. ...smaller
  14. 14. ...faster
  15. 15. (of course)
  16. 16. Enable Evolution
  17. 17. Enable Experiments
  18. 18. Examples - Compiler - Slots - JIT and AOStA
  19. 19. Old Compiler - From 1976 - Not OO - Hard to understand. Hard to change We need a better Compiler!
  20. 20. New Compiler - Originally by Anthony Hannan - Based on Visitors - Reusable and Pluggable Backend (IRBuilder) - Uses RB AST - SmaCC Parser Easier to understand. Easier to change
  21. 21. New Compiler Scanner Semantic Code code AST AST Bytecode / Parser Analysis Generation Code generation in detail Build Bytecode AST IR Bytecode IR Generation ASTTranslator IRTranslator IRBuilder BytecodeBuilder
  22. 22. Plans... - New BlockClosure Format - Plugin architecture: Parser, Checker, CodeGen - Use RB Parser (Faster, Error messages)
  23. 23. Examples - Compiler - Slots - JIT and AOStA
  24. 24. Instance Vars - Not objects - Change behavior? - Change memory layout? Instance state should be more powerful!
  25. 25. Slots - Are objects - Allow custom subclasses - Change behavior and memory layout Without Performance penalty!
  26. 26. Auto-Accessor MopObject subclass: #SlotExample slots: '{AutoAccessorSlot named: #hello}' classVariableNames: '' poolDictionaries: '' category: 'SlotExamples' Create accessor-methods at compile-time
  27. 27. Active Slot MopObject subclass: #SlotExample slots: '{ActiveSlot named: #hello action: [Beeper beep]}' classVariableNames: '' poolDictionaries: '' category: 'SlotExamples' Evaluate block on read
  28. 28. Sparse Slot MopObject subclass: #SlotExample slots: '{SparseSlot named: #a. SparseSlot named: #b. SparseSlot named: #c}' classVariableNames: '' poolDictionaries: '' category: 'SlotExamples' Store values in one Dictionary
  29. 29. iVar Slot MopObject subclass: #SlotExample slots: '{IVarSlot named: #a} classVariableNames: '' poolDictionaries: '' category: 'SlotExamples' Normal instance Variable
  30. 30. Auto-Accessor MopObject subclass: #SlotExample slots: '{AutoAccessorSlot named: #hello}' classVariableNames: '' poolDictionaries: '' category: 'SlotExamples' Create accessor-methods at compiled-time
  31. 31. Slot subclass: #AutoAccessorSlot instanceVariableNames: '' .... postCreationAction self generateGetter. self generateSetter. generateGetter class compile: (String streamContents: [:stream |stream nextPutAll: self name; crtab; nextPutAll: '^', self name asString])
  32. 32. Active Slot MopObject subclass: #SlotExample slots: '{ActiveSlot named: #hello action: [Beeper beep]}' classVariableNames: '' poolDictionaries: '' category: 'SlotExamples' Evaluate block on read
  33. 33. Active Slot AutoAccessorSlot subclass: #ActiveSlot instanceVariableNames: 'action' .... emitReadUsing: methodBuilder methodBuilder pushLiteral: action; send: #value. super emitReadUsing: methodBuilder
  34. 34. Status - First Prototype - Integration with ClassBuilder - Compatibility with iVars - Explore different designs
  35. 35. Examples - Compiler - Slots - JIT and AOStA
  36. 36. VM - Virtual Machine uses Interpreter - JIT Compiler under development (Eliot Miranda) How to optimize even more?
  37. 37. AOStA - Provide API for accessing runtime data - PIC: Polymorphic Inline Cache Record class per send instruction - Hotness Counter Where do we spend time?
  38. 38. AOStA PIC BC 2 SSA 2 BC SSA OPT SSA BC SSA BC Optimize SSA-Form (Static Single Assignment)
  39. 39. AOStA - Use PIC-Data for specialization - Inline often-called methods - Special Bytecode for primitive types (Floats)
  40. 40. AOStA - Bytecode-to-Bytecode optimization - Purely realized in Smaltalk - Accessible in the image. Reflection?
  41. 41. More... - Improve Tools - Real Modules - Reflection - .......
  42. 42. Join Us! Goal: learning and having fun http://pharo-project.org
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×