Skip to content

Instantly share code, notes, and snippets.

@bakkdoor
Created January 9, 2011 01:46
Show Gist options
  • Save bakkdoor/771328 to your computer and use it in GitHub Desktop.
Save bakkdoor/771328 to your computer and use it in GitHub Desktop.
Change Rakefile to compile all files at once with fancy-written compiler and use rbx -Xint option
diff --git a/Rakefile b/Rakefile
index 2782ca9..b4cc318 100644
--- a/Rakefile
+++ b/Rakefile
@@ -89,7 +89,7 @@ namespace :compiler do
task :compile => file(boot_parser_e) do
say "Compiling fancy using stable compiler."
- cmd = ['rbx', load_rb]
+ cmd = ['rbx -Xint', load_rb]
cmd << _("boot/compiler/boot.fyc")
cmd << _("boot/compiler/compiler.fyc")
cmd << _("boot/compiler/compiler/command.fyc")
@@ -105,9 +105,10 @@ namespace :compiler do
# 15 seems to be a magic number that works without crashing (WTF?!)
# sources.each_slice(15) do |s|
- sources.each do |s|
- sh! *(cmd + [s])
- end
+ # sources.each do |s|
+ # sh! *(cmd + [s])
+ # end
+ sh! *(cmd + sources)
# compile lib/compiler/*.fy & lib/compiler/ast/*.fy seperately
# no idea whay, but this way it doesn't fail (occasionally)
# sh! *(cmd + compiler_files)
@@ -146,7 +147,7 @@ namespace :compiler do
output = _("boot/.wootstrap")
- cmd = ['rbx', load_rb]
+ cmd = ['rbx -Xint', load_rb]
cmd << _("lib/boot.fyc")
cmd << _("lib/compiler.fyc")
cmd << _("lib/compiler/command.fyc")
@@ -158,9 +159,10 @@ namespace :compiler do
sources = Dir.glob("lib/**/*.fy")
# 15 seems to be a magic number that works without crashing (WTF?!)
# sources.each_slice(15) do |s|
- sources.each do |s|
- sh! *(cmd + [s])
- end
+ # sources.each do |s|
+ # sh! *(cmd + [s])
+ # end
+ sh! *(cmd + sources)
mkdir_p _("parser/ext", output), :verbose => false
cp parser_e, _("parser/ext", output), :verbose => false
@@ -244,7 +246,7 @@ task :clean => ["parser:clean", "compiler:clean", :clean_compiled]
def compile(source)
- cmd = ['rbx', _("boot/load.rb")]
+ cmd = ['rbx -Xint', _("boot/load.rb")]
cmd << _("lib/boot.fyc")
cmd << _("lib/compiler.fyc")
cmd << _("lib/compiler/command.fyc")
diff --git a/bin/fancy b/bin/fancy
index ddabfdb..b9fc8d7 100755
--- a/bin/fancy
+++ b/bin/fancy
@@ -1,4 +1,4 @@
-#!/usr/bin/env rbx
+#!/usr/bin/env rbx -Xint
# -*- ruby -*-
base = File.dirname(__FILE__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment