πŸ“ Source Files

91 files (118 modified)
πŸ“„ README
Modified Files (118)
  • Harrayclassobject.h
  • Harrayliteral.h
  • C++arrayobject.cpp
  • Harrayobject.h
  • Hbinary.h
  • C++block.cpp
  • Hblock.h
  • C++blockfunctions.cpp
  • Hblockfunctions.h
  • Hcall.h
  • Hcallbase.h
  • Hcallnamed.h
  • Hclass.h
  • C++classobject.cpp
  • Hclassobject.h
  • Hconditionalor.h
  • Hcontainer.h
  • C++context.cpp
  • Hcontext.h
  • Hdobreak.h
  • Hdocontinue.h
  • Hdoreturn.h
  • Hdot.h
  • Hdotcall.h
  • Hdotset.h
  • Hdotsetrmw.h
  • Hdoubleclassobject.h
  • Hdoubleliteral.h
  • Hfunction.h
  • C++functionobject.cpp
  • Hfunctionobject.h
  • Hget.h
  • Hif.h
  • Himport.h
  • Hintclassobject.h
  • Hintliteral.h
  • C++intobject.cpp
  • Hintobject.h
  • C++main.cpp
  • C++makerootcontext.cpp
  • Hmakerootcontext.h
  • C++nativefunction.cpp
  • Hnativefunction.h
  • C++node.cpp
  • Hnode.h
  • C++object.cpp
  • Hobject.h
  • Hobjectclassobject.h
  • C++package.cpp
  • Hpackage.h
  • C++packageatominstance.cpp
  • Hpackageatominstance.h
  • C++parse.cpp
  • Hrootpackage.h
  • Hset.h
  • Hsetrmw.h
  • Hsetsubscript.h
  • Hstringclassobject.h
  • Hstringliteral.h
  • C++stringobject.cpp
  • Hstringobject.h
  • Hsubscript.h
  • Hsubscriptrmw.h
  • Hsuper.h
  • Hsuperconstructorcall.h
  • Hsuperdot.h
  • Hsupermethodcall.h
  • C++symbol.cpp
  • Hsymbol.h
  • Hunary.h
  • C++userclassobject.cpp
  • Huserclassobject.h
  • C++userfunction.cpp
  • Huserfunction.h
  • C++userobject.cpp
  • Huserobject.h
  • Hutils.h
  • C++value.cpp
  • Hvalue.h
  • Hvalueinlines.h
  • Hwhile.h
  • Hcachepadding.h
  • C++cacherecipe.cpp
  • Hcacherecipe.h
  • C++call.cpp
  • C++callbase.cpp
  • C++callnamed.cpp
  • C++class.cpp
  • Hclasskind.h
  • Hconstructcache.h
  • C++dot.cpp
  • C++dotcall.cpp
  • C++dotset.cpp
  • C++dotsetrmw.cpp
  • C++get.cpp
  • Hgetrootpackage.h
  • Hintrinsic.h
  • C++load.cpp
  • Hload.h
  • Hnativeinstanceconstructor.h
  • Hobjectinlines.h
  • Hoffsets.h
  • C++rootpackage.cpp
  • C++set.cpp
  • C++setrmw.cpp
  • C++setsubscript.cpp
  • C++storage.cpp
  • Hstorage.h
  • C++stringliteral.cpp
  • C++subscript.cpp
  • C++subscriptrmw.cpp
  • C++super.cpp
  • C++superconstructorcall.cpp
  • C++superdot.cpp
  • C++supermethodcall.cpp
  • C++watchpoint.cpp
  • Hwatchpoint.h
  • Hwatchpointandversion.h
Unmodified Files (10)
  • Hbitcast.h
  • Hcanbreak.h
  • Hcancontinue.h
  • Hcanreturn.h
  • Hcontrol.h
  • C++error.cpp
  • Herror.h
  • Hpackageatom.h
  • Hparse.h
  • Hrmw.h

Zef interpreter after Optimization #6: Object Model and Inline Caches

This is a huge change to the Zef interpreter:

  • Objects and dynamic scopes are no longer hashtables. Instead, they are tightly packes contiguous objects. Objects use the Object type and dynamic scopes use the Storage type. Object is a subtype of Storage.

  • All objects have a ClassObject that describes them, and the ClassObject is where the hashtables are. All dynamic scopes have a Context that describes them, and the Context is where the hashtables are. Hence, we don’t have to create hashtables every time we create scopes and objects, but the hashtables are still there.

  • The common case of object or scope lookup is via an inline cache - code that has been specialized based on whatever lookup path succeeded the first time that particular access was attempted. constructcache.h is where the construction of inline caches happens.

This is a 4.5x speed-up.

This is displaying a diff from the previous version of the Zef interpreter.

Select a file