Permalink
Browse files

added task :compare to the Rakefile on cpp branch

  • Loading branch information...
1 parent f5d9d6a commit 5c5123604f0d20c1a256725060876703b9d46189 @seydar seydar committed Oct 22, 2008
Showing with 23 additions and 2 deletions.
  1. +22 −0 Rakefile
  2. +1 −2 vm/profiler.cpp
View
@@ -79,6 +79,28 @@ task :distclean => %w[
vm:distclean
]
+def rbx_compile(from)
+ sh "bin/rbx compile -f #{from}"
+end
+
+desc 'Compare an rbc file made by MRI with one made by rbx'
+task :compare, :file do |task, args|
+ file = args[:file]
+ raise "Please supply something that exists" unless File.exist? file
+
+ mri_compile file, file + 'c.mri'
+ rbx_compile file
+
+ File.open(file + 'c.mri') do |mri|
+ File.open(file + 'c') do |rbx|
+ while m = mri.gets and r = rbx.gets
+ puts "Line of Failure: #{rbx.lineno}" and break unless m === r
+ end
+ end
+ end
+
+end
+
namespace :clean do
desc "Cleans up editor files and other misc crap"
task :crap do
View
@@ -7,8 +7,7 @@
// HACK figure out a better way to detect if we should use
// mach_absolute_time
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
- __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
+#if 1
#define USE_MACH_TIME
#endif

0 comments on commit 5c51236

Please sign in to comment.