[Gridflow-cvs] [svn] commit: r3393 - in /trunk/base: main.rb source_filter.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Apr 1 16:36:31 EDT 2008


Author: matju
Date: Tue Apr  1 16:36:30 2008
New Revision: 3393

Log:
cleanup

Modified:
    trunk/base/main.rb
    trunk/base/source_filter.rb

Modified: trunk/base/main.rb
==============================================================================
--- trunk/base/main.rb (original)
+++ trunk/base/main.rb Tue Apr  1 16:36:30 2008
@@ -60,9 +60,7 @@
 	# the $$ value is bogus
 	begin
 		died = []
-		subprocesses.each {|x,v|
-			Process.waitpid2(x,Process::WNOHANG) and died<<x
-		}
+		subprocesses.each {|x,v| Process.waitpid2(x,Process::WNOHANG) and died << x }
 	rescue Errno::ECHILD
 	end
 	#STDERR.puts died.inspect
@@ -142,7 +140,7 @@
 	end
 	#def inspect; if args then "[#{args}]" else super end end
 	def inspect; "some object" end
-	def initialize(*argv) @init_messages = [] end
+	def initialize(*) end
 	def _0_help; self.class.help end
 	def _0_get(s=nil)
 		s=s.intern if String===s
@@ -158,7 +156,6 @@
 	u0,t0=GridFlow.rdtsc,Time.new.to_f; sleep 0.01
 	u1,t1=GridFlow.rdtsc,Time.new.to_f; (u1-u0)/(t1-t0)
 end
-
 begin
 	@cpu_hertz = (0...3).map {GridFlow.estimate_cpu_clock}.sort[1] # median of three tries
 rescue Exception => e
@@ -170,11 +167,7 @@
 	if s==File.basename(s) then
 		dir = GridFlow.data_path.find {|x| File.exist? "#{x}/#{s}" }
 		if dir then "#{dir}/#{s}" else s end
-	elsif GridFlow.respond_to? :find_file_2
-		GridFlow.find_file_2 s
-	else
-		s
-	end
+	else s end
 end
 
 ENDIAN_BIG,ENDIAN_LITTLE,ENDIAN_SAME,ENDIAN_DIFF = 0,1,2,3

Modified: trunk/base/source_filter.rb
==============================================================================
--- trunk/base/source_filter.rb (original)
+++ trunk/base/source_filter.rb Tue Apr  1 16:36:30 2008
@@ -138,7 +138,6 @@
 	classname = frame.name
 	m = parse_methoddecl(line,";\s*$")
 	frame.methods[m.selector] = m
-
 	Out.print "static " if m.static
 	Out.print "#{m.rettype} #{m.selector}(VA"
 	Out.print ", #{unparse_arglist m.arglist}" if m.arglist.length>0
@@ -195,9 +194,7 @@
 	case m.rettype
 	when "void"; Out.print "return Qnil;"
 	when "Ruby"; Out.print "return foo;"
-	else 
-#		Out.print "post(\"returning 0x%08x\",R(foo).r);"
-		Out.print "return R(foo).r;"
+	else         Out.print "return R(foo).r;"
 	end
 	Out.print "} #{m.rettype} #{classname}::#{m.selector}(VA"
 	Out.print ",#{unparse_arglist m.arglist, false}" if m.arglist.length>0
@@ -232,9 +229,7 @@
 		handle_def "0 #{name} (#{type} #{name}) { this->#{name}=#{name}; }"
 	}
 	startup2 = "@gfattrs = {"
-	frame.attrs.each {|name,attr|
-		startup2 += ":#{name} => [],"
-	}
+	frame.attrs.each {|name,attr| startup2 += ":#{name} => []," }
 	startup2 += "}"
 	line.gsub!(/\{/,"{"+"IEVAL(rself,\"#{startup2}\");") or raise "\\classinfo line should have a '{' (sorry)"
 	get << "RAISE(\"unknown attr %s\",s->s_name); outlet_anything(bself->out[bself->nout-1],s,1,a);}"



More information about the Gridflow-cvs mailing list