comparison src/compiler.sml @ 258:40c33706d887

Avoid unnecessary WHERE clause
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 15:32:31 -0400
parents 71bafe66dbe1
children bacd0ba869e1
comparison
equal deleted inserted replaced
257:32f9212583b2 258:40c33706d887
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_reduce = toUntangle o transform mono_reduce "mono_reduce" 316 val toMono_reduce1 = toUntangle o transform mono_reduce "mono_reduce1"
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_shake = toMono_reduce o transform mono_shake "mono_shake" 323 val toMono_shake1 = toMono_reduce1 o transform mono_shake "mono_shake1"
324 324
325 val toMono_opt2 = toMono_shake o transform mono_opt "mono_opt2" 325 val toMono_opt2 = toMono_shake1 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"
326 332
327 val cjrize = { 333 val cjrize = {
328 func = Cjrize.cjrize, 334 func = Cjrize.cjrize,
329 print = CjrPrint.p_file CjrEnv.empty 335 print = CjrPrint.p_file CjrEnv.empty
330 } 336 }
331 337
332 val toCjrize = toMono_opt2 o transform cjrize "cjrize" 338 val toCjrize = toMono_shake2 o transform cjrize "cjrize"
333 339
334 fun compileC {cname, oname, ename} = 340 fun compileC {cname, oname, ename} =
335 let 341 let
336 val compile = "gcc -O3 -I include -c " ^ cname ^ " -o " ^ oname 342 val compile = "gcc -O3 -I include -c " ^ cname ^ " -o " ^ oname
337 val link = "gcc -pthread -O3 clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename 343 val link = "gcc -pthread -O3 clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename