comparison src/compiler.sml @ 268:bacd0ba869e1

Monoize ASC/DESC
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 16:54:13 -0400
parents 40c33706d887
children b9b02613c0c2
comparison
equal deleted inserted replaced
267:f31e8da68e90 268:bacd0ba869e1
311 val mono_reduce = { 311 val mono_reduce = {
312 func = MonoReduce.reduce, 312 func = MonoReduce.reduce,
313 print = MonoPrint.p_file MonoEnv.empty 313 print = MonoPrint.p_file MonoEnv.empty
314 } 314 }
315 315
316 val toMono_reduce1 = toUntangle o transform mono_reduce "mono_reduce1" 316 val toMono_reduce = toUntangle o transform mono_reduce "mono_reduce"
317 317
318 val mono_shake = { 318 val mono_shake = {
319 func = MonoShake.shake, 319 func = MonoShake.shake,
320 print = MonoPrint.p_file MonoEnv.empty 320 print = MonoPrint.p_file MonoEnv.empty
321 } 321 }
322 322
323 val toMono_shake1 = toMono_reduce1 o transform mono_shake "mono_shake1" 323 val toMono_shake = toMono_reduce o transform mono_shake "mono_shake1"
324 324
325 val toMono_opt2 = toMono_shake1 o transform mono_opt "mono_opt2" 325 val toMono_opt2 = toMono_shake o transform mono_opt "mono_opt2"
326
327 val toMono_reduce2 = toMono_opt2 o transform mono_reduce "mono_reduce2"
328
329 val toMono_opt3 = toMono_reduce2 o transform mono_opt "mono_opt3"
330
331 val toMono_shake2 = toMono_opt3 o transform mono_shake "mono_shake2"
332 326
333 val cjrize = { 327 val cjrize = {
334 func = Cjrize.cjrize, 328 func = Cjrize.cjrize,
335 print = CjrPrint.p_file CjrEnv.empty 329 print = CjrPrint.p_file CjrEnv.empty
336 } 330 }
337 331
338 val toCjrize = toMono_shake2 o transform cjrize "cjrize" 332 val toCjrize = toMono_opt2 o transform cjrize "cjrize"
339 333
340 fun compileC {cname, oname, ename} = 334 fun compileC {cname, oname, ename} =
341 let 335 let
342 val compile = "gcc -O3 -I include -c " ^ cname ^ " -o " ^ oname 336 val compile = "gcc -O3 -I include -c " ^ cname ^ " -o " ^ oname
343 val link = "gcc -pthread -O3 clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename 337 val link = "gcc -pthread -O3 clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename