--- /dev/null
+[submodule "modules/build-system"]
+ path = modules/build-system
+ url = https://github.com/mikedlowis/build-system.git
--- /dev/null
+source 'https://rubygems.org'
+gem 'rake', '>= 0'
+gem 'rscons', '>= 0'
+gem 'rspec', '>= 0'
--- /dev/null
+GEM
+ remote: https://rubygems.org/
+ specs:
+ diff-lcs (1.2.5)
+ json (1.8.1)
+ rake (10.3.2)
+ rscons (1.8.1)
+ json (~> 1.0)
+ rspec (3.1.0)
+ rspec-core (~> 3.1.0)
+ rspec-expectations (~> 3.1.0)
+ rspec-mocks (~> 3.1.0)
+ rspec-core (3.1.7)
+ rspec-support (~> 3.1.0)
+ rspec-expectations (3.1.2)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.1.0)
+ rspec-mocks (3.1.3)
+ rspec-support (~> 3.1.0)
+ rspec-support (3.1.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rake
+ rscons
+ rspec
--- /dev/null
+#!/usr/bin/ruby
+
+require_relative 'modules/build-system/setup'
+
+#------------------------------------------------------------------------------
+# Environment Definitions
+#------------------------------------------------------------------------------
+# Define the default compiler environment
+base_env = BuildEnv.new do |env|
+ # Move the object files to the build dir
+ env.build_dir('source','build/obj/source')
+end
+
+#------------------------------------------------------------------------------
+# Release Build Targets
+#------------------------------------------------------------------------------
+base_env.Library('build/libatc.a', Dir['source/runtime/*.c'])
+
+#------------------------------------------------------------------------------
+# Test Build Targets
+#------------------------------------------------------------------------------
+#if Opts[:profile].include? "test"
+# compiler_libs = ['build/lib/libparse-test.a'] + runtime_libs
+# test_env.Library('build/lib/libparse-test.a', FileList['source/libparse/*.c'])
+# test_env.Program('build/bin/sclpl-test', FileList['source/sclpl/*.c'] + compiler_libs)
+# test_env.Command('RSpec', [], 'CMD' => [
+# 'rspec', '--pattern', 'spec/**{,/*/**}/*_spec.rb', '--format', 'documentation'])
+#end
--- /dev/null
+Subproject commit f1a522b4aed7c58ce3c8467ff8a00f00c3e27e64
--- /dev/null
+#include "gc.h"
+#include <stdlib.h>
+
+/*****************************************************************************/
+
+typedef struct {
+ uint64_t objmap;
+ uint8_t data[];
+} obj_t;
+
+void gc_init(void* stack_bottom)
+{
+}
+
+void* gc_alloc(uint64_t objmap, size_t num_slots)
+{
+ obj_t* obj;
+ if (num_slots <= (sizeof(uint64_t) - 1u)) {
+ obj = (void*)malloc(sizeof(obj_t) + (num_slots * sizeof(uintptr_t)));
+ } else {
+ obj = (void*)malloc(sizeof(obj_t) + (num_slots * sizeof(uintptr_t)));
+ }
+ obj->objmap = objmap;
+ obj++;
+ return (void*)obj;
+}
+
+void gc_collect(void)
+{
+}
+
+void gc_shutdown(void)
+{
+}
+
+/*****************************************************************************/
+
--- /dev/null
+/**
+ @file gc.h
+ @brief TODO: Describe this file
+*/
+#ifndef GC_H
+#define GC_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+void gc_init(void* stack_bottom);
+
+void* gc_alloc(uint64_t objmap, size_t size);
+
+void gc_collect(void);
+
+void gc_shutdown(void);
+
+#endif /* GC_H */
--- /dev/null
+#include "gc.h"
+
+int main(int argc, char** argv) {
+ extern int ATC_Main(int argc, char** argv);
+ int ret_code;
+ gc_init(&ret_code);
+ ret_code = ATC_Main(argc, argv);
+ gc_shutdown();
+ return ret_code;
+}
+