node/lib/metasm/metasm/compile_c.rb
def precompile(compiler, scope=nil)
			stmts = @statements.dup
			@statements.clear
			stmts.each { |st|
				compiler.curexpr = st
				st.precompile(compiler, self)
			}

			# cleanup declarations
			@symbol.delete_if { |n, s| not s.kind_of? Variable }
			@struct.delete_if { |n, s| not s.kind_of? Union }
			@symbol.each_value { |var|
				CExpression.precompile_type(compiler, self, var, true)
			}
			@struct.each_value { |var|
				next if not var.members
				var.members.each { |m|
					CExpression.precompile_type(compiler, self, m, true)
				}
			}
			scope.statements << self if scope and not @statements.empty?
		end
# precompile all statements, then simplifies symbols/structs types
precompile all statements, then simplifies symbols/structs types
precompile all statements then simplifies symbols / structs types
def precompile(compiler, scope=nil)
			stmts = @statements.dup
			@statements.clear
			stmts.each { |st|
				compiler.curexpr = st
				st.precompile(compiler, self)
			}
			@symbol.delete_if { |n, s| not s.kind_of? Variable }
			@struct.delete_if { |n, s| not s.kind_of? Union }
			@symbol.each_value { |var|
				CExpression.precompile_type(compiler, self, var, true)
			}
			@struct.each_value { |var|
				next if not var.members
				var.members.each { |m|
					CExpression.precompile_type(compiler, self, m, true)
				}
			}
			scope.statements << self if scope and not @statements.empty?
		end
def precompile ( compiler , scope = nil ) stmts = @statements . dup @statements . clear stmts . each { | st | compiler . curexpr = st st . precompile ( compiler , self ) } @symbol . delete_if { | n , s | not s . kind_of? Variable } @struct . delete_if { | n , s | not s . kind_of? Union } @symbol . each_value { | var | CExpression . precompile_type ( compiler , self , var , true ) } @struct . each_value { | var | next if not var . members var . members . each { | m | CExpression . precompile_type ( compiler , self , m , true ) } } scope . statements << self if scope and not @statements . empty? end
precompile all statements, then simplifies symbols/structs types
precompile all statements then simplifies symbols / structs types
# cleanup declarations
compiler
scope