From a39fc76a1254e3923a65ad74654e21e32288cb8c Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 18 Jan 2017 08:45:42 +0200 Subject: [PATCH] create vm file to require vm parts --- lib/register.rb | 2 +- lib/vm.rb | 12 ++++++++++++ lib/vm/method_compiler.rb | 1 - 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 lib/vm.rb diff --git a/lib/register.rb b/lib/register.rb index d06d19ad..784660a0 100644 --- a/lib/register.rb +++ b/lib/register.rb @@ -7,7 +7,7 @@ end require "register/padding" require "register/positioned" -require "vm/method_compiler" +require "vm" require "vm/parfait" require "register/machine" diff --git a/lib/vm.rb b/lib/vm.rb new file mode 100644 index 00000000..18af5c7b --- /dev/null +++ b/lib/vm.rb @@ -0,0 +1,12 @@ +# The Vm Module expresses a medium level virtual machine. +# It is the level between the higher ruby abstraction and the lower risc level. +# +# Historically it has grown out of a language abtraction that was not unlike c, +# in that it has tyes and everything is known at compile time. +# No method dispatch, just calling. +# In some ways it is more like c++ as it knows about classes and in fact everything is an +# object. +module Vm +end +require_relative "vm/tree" +require_relative "vm/method_compiler" diff --git a/lib/vm/method_compiler.rb b/lib/vm/method_compiler.rb index 1dbcbf22..7ed29b63 100644 --- a/lib/vm/method_compiler.rb +++ b/lib/vm/method_compiler.rb @@ -1,4 +1,3 @@ -require_relative "tree" require_relative "method_compiler/assignment" require_relative "method_compiler/basic_values" require_relative "method_compiler/call_site"