summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael D. Adams <adamsmd@cs.indiana.edu>2007-08-06 04:50:11 +0000
committerMichael D. Adams <adamsmd@cs.indiana.edu>2007-08-06 04:50:11 +0000
commitfc395f40b0cc45be084027b38d3e28c2f498227d (patch)
treedc0e13adce6037a07c6384975d5d5f6fb490c546
parent5e27c8850b295db6ac171bb626ce1afd0cd3a1eb (diff)
downloadhaskell-fc395f40b0cc45be084027b38d3e28c2f498227d.tar.gz
Change to the Cmm syntax. Put gc_block before update_frame.
This order matches the symantic order better since the GC check is done before the update frame is pushed.
-rw-r--r--compiler/cmm/CmmParse.y20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y
index 200ec38090..5a56dd34e6 100644
--- a/compiler/cmm/CmmParse.y
+++ b/compiler/cmm/CmmParse.y
@@ -202,15 +202,15 @@ lits :: { [ExtFCode CmmExpr] }
cmmproc :: { ExtCode }
-- TODO: add real SRT/info tables to parsed Cmm
- : info maybe_formals maybe_frame maybe_gc_block '{' body '}'
- { do ((entry_ret_label, info, live, formals, frame, gc_block), stmts) <-
+ : info maybe_formals maybe_gc_block maybe_frame '{' body '}'
+ { do ((entry_ret_label, info, live, formals, gc_block, frame), stmts) <-
getCgStmtsEC' $ loopDecls $ do {
(entry_ret_label, info, live) <- $1;
formals <- sequence $2;
- frame <- $3;
- gc_block <- $4;
+ gc_block <- $3;
+ frame <- $4;
$6;
- return (entry_ret_label, info, live, formals, frame, gc_block) }
+ return (entry_ret_label, info, live, formals, gc_block, frame) }
blks <- code (cgStmtsToBlocks stmts)
code (emitInfoTableAndCode entry_ret_label (CmmInfo gc_block frame info) formals blks) }
@@ -219,14 +219,14 @@ cmmproc :: { ExtCode }
formals <- sequence $2;
code (emitInfoTableAndCode entry_ret_label (CmmInfo Nothing Nothing info) formals []) }
- | NAME maybe_formals maybe_frame maybe_gc_block '{' body '}'
- { do ((formals, frame, gc_block), stmts) <-
+ | NAME maybe_formals maybe_gc_block maybe_frame '{' body '}'
+ { do ((formals, gc_block, frame), stmts) <-
getCgStmtsEC' $ loopDecls $ do {
formals <- sequence $2;
- frame <- $3;
- gc_block <- $4;
+ gc_block <- $3;
+ frame <- $4;
$6;
- return (formals, frame, gc_block) }
+ return (formals, gc_block, frame) }
blks <- code (cgStmtsToBlocks stmts)
code (emitProc (CmmInfo gc_block frame CmmNonInfoTable) (mkRtsCodeLabelFS $1) formals blks) }