Skip to content

Commit

Permalink
<missing>
Browse files Browse the repository at this point in the history
--HG--
branch : com.mozilla.es4.smlnj
extra : convert_revision : f37ff03918cb673067dd72a7bf36ce3b49330900
  • Loading branch information
[email protected] committed Sep 2, 2007
1 parent e761912 commit be76e10
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
5 changes: 2 additions & 3 deletions tests/self/cogen-expr.es
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,9 @@
}

function cgUnaryExpr(ctx, e) {
let {asm:asm, emitter:emitter} = ctx;
var {asm:asm, emitter:emitter} = ctx;

let incdec = function incdec(pre, inc) {
//let name;
function incdec(pre, inc) {
switch type (e.e1) {
case (lr:LexicalRef) {
//name = cgIdentExpr(ctx, lr.ident);
Expand Down
15 changes: 12 additions & 3 deletions tests/self/cogen-stmt.es
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,21 @@
}

function cgBreakStmt(ctx, {ident: ident}) {
function hit (node) {
return node.tag == "break" && (ident == null || memberOf(ident, stk.labels))
}
unstructuredControlFlow(ctx,
(function (node) node.tag == "break" && (ident == null || memberOf(ident, stk.labels))),
hit,
true,
"Internal error: definer should have checked that all referenced labels are defined");
}

function cgContinueStmt(ctx, {ident: ident}) {
function hit(node) {
return node.tag == "continue" && (ident == null || memberOf(ident, stk.labels))
}
unstructuredControlFlow(ctx,
(function (node) node.tag == "continue" && (ident == null || memberOf(ident, stk.labels))),
hit,
true,
"Internal error: definer should have checked that all referenced labels are defined");
}
Expand All @@ -191,8 +197,11 @@
t = asm.getTemp();
asm.I_setlocal(t);
}
function hit(node){
return node.tag == "function"
}
unstructuredControlFlow(ctx,
(function (node) node.tag == "function"),
hit,
false,
"Internal error: definer should have checked that top-level code does not return");
if (s.expr == null)
Expand Down
3 changes: 2 additions & 1 deletion tests/self/emitter.es
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ namespace Emit;
}

public function finalize() {
forEach(function (s) { s.finalize() }, scripts);
function f(s) { s.finalize() }
forEach(f, scripts);
return file;
}

Expand Down

0 comments on commit be76e10

Please sign in to comment.