Skip to content

Commit

Permalink
fixes to get 'esc-sanity.sh' to pass
Browse files Browse the repository at this point in the history
--HG--
branch : com.mozilla.es4.smlnj
extra : convert_revision : 11b6216a6d3bfc7f39beb2ea6f0d120e6c436319
  • Loading branch information
jeffdyer committed Aug 28, 2007
1 parent 8860123 commit 8fadb97
Show file tree
Hide file tree
Showing 8 changed files with 550 additions and 101 deletions.
24 changes: 0 additions & 24 deletions comp-esc.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
# This script is used to make ESC compile itself

### SANITY TEST

./esc1.sh tests/self/hello.es
./esc2.sh tests/self/hello.es
./esc3.sh tests/self/hello.es
./esc1.sh tests/self/if.es
#./esc2.sh tests/self/if.es
./esc3.sh tests/self/if.es
./esc1.sh tests/self/for.es
#./esc2.sh tests/self/for.es
./esc3.sh tests/self/for.es
./esc1.sh tests/self/try.es
#./esc2.sh tests/self/try.es
./esc3.sh tests/self/try.es
./esc1.sh tests/self/cls.es
./esc2.sh tests/self/cls.es
./esc3.sh tests/self/cls.es
./esc1.sh tests/self/switch.es
#./esc2.sh tests/self/switch.es
./esc3.sh tests/self/switch.es
./esc1.sh tests/self/switchType.es
./esc2.sh tests/self/switchType.es
./esc3.sh tests/self/switchType.es

### STAGE 1

### DECODE
Expand Down
18 changes: 14 additions & 4 deletions comp-esc2.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#./esc3.sh tests/self/debug.es
#./esc3.sh tests/self/ast.es
#./esc3.sh tests/self/decoder.es
./esc1.sh tests/self/debug.es
./esc1.sh tests/self/ast.es
./esc1.sh tests/self/decoder.es
./esc1.sh tests/self/encoder.es
./esc3.sh tests/self/encoder.es
./esc1.sh tests/self/esc2.es

#./esc2.sh tests/self/debug.es
#./esc2.sh tests/self/ast.es
#./esc2.sh tests/self/decoder.es
#./esc2.sh tests/self/encoder.es
#./esc2.sh tests/self/esc2.es

./esc3.sh tests/self/debug.es
./esc3.sh tests/self/ast.es
./esc3.sh tests/self/decoder.es
./esc3.sh tests/self/encoder.es
./esc3.sh tests/self/esc2.es

### compile test case: print('hello world') will do
Expand Down
15 changes: 15 additions & 0 deletions esc-sanity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#./esc.sh tests/self/hello.es
#/work/tamarin/bin/shell tests/self/hello.es.abc
#./esc1.sh tests/self/if.es
#/work/tamarin/bin/shell tests/self/if.es.abc
#./esc.sh tests/self/for.es
#/work/tamarin/bin/shell tests/self/for.es.abc
#./esc.sh tests/self/try.es
#/work/tamarin/bin/shell tests/self/try.es.abc
#./esc.sh tests/self/cls.es
#/work/tamarin/bin/shell tests/self/cls.es.abc
#./esc.sh tests/self/switch.es
#/work/tamarin/bin/shell tests/self/switch.es.abc
./esc.sh tests/self/switchtype.es
/work/tamarin/bin/shell tests/self/switchtype.es.abc

2 changes: 1 addition & 1 deletion tests/self/ast.es
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ namespace Ast
class Catch {
const param: HEAD;
const block: BLOCK;
function Catch (param,setting,block)
function Catch (param,block)
: param = param
, block = block { }
}
Expand Down
2 changes: 1 addition & 1 deletion tests/self/cogen-stmt.es
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ package cogen
}

function cgSwitchTypeStmt(ctx, {expr:expr, type:type, cases:cases}) {
let b = new Block({fixtures:[],inits:[]}, [new ThrowStmt(expr)]);
let b = new Block(new Ast::Head([],[]), [new ThrowStmt(expr)]);

cgTryStmt(ctx, {block:b, catches:cases, finallyBlock:null} );
}
Expand Down
578 changes: 513 additions & 65 deletions tests/self/debug.es.ast

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/self/lexer.es
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ namespace Lexer
colCoord = 0;
}
else {
print ("token ", token);
//print ("token ", token);
//print ("token ", token, " \t", Token::tokenText(token));
colCoord += markIndex - lastMarkIndex;
coordList.push ([lnCoord,colCoord]);
Expand Down
10 changes: 5 additions & 5 deletions tests/self/parser.es
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ namespace Parse;
}

let pn = fxtrs[0][0];
print ("pn..id=",pn.Ast::name.id," id=",id);
print ("pn..ns=",pn.Ast::name.ns.Ast::hash()," ns=",ns.Ast::hash());
//print ("pn..id=",pn.Ast::name.id," id=",id);
//print ("pn..ns=",pn.Ast::name.ns.Ast::hash()," ns=",ns.Ast::hash());
if (pn.Ast::name.id==id && pn.Ast::name.ns.Ast::hash()==ns.Ast::hash()) // FIXME: need ns compare
{
exit ("hasName true");
Expand Down Expand Up @@ -403,7 +403,7 @@ namespace Parse;
enter ("evalIdentExprToNamespace");
switch type (nd) {
case (nd: Ast::Identifier) {
var fxtr = findFixtureWithIdentifier (nd.Ast::ident,it);
var fxtr = findFixtureWithIdentifier (nd.Ast::ident,null);
switch type (fxtr[1]) {
case (fxtr:Ast::NamespaceFixture) {
var val = fxtr.Ast::ns;
Expand Down Expand Up @@ -4715,7 +4715,7 @@ namespace Parse;
default:
var [ts1,nd1] = assignmentExpression (ts,beta);
ts1 = semicolon (ts1,omega);
var nd1 = new Ast::Block ({fixtures:[],inits:[]},[new Ast::ReturnStmt (nd1)],null);
var nd1 = new Ast::Block (new Ast::Head ([],[]),[new Ast::ReturnStmt (nd1)],null);
break;
}

Expand Down Expand Up @@ -5607,7 +5607,7 @@ namespace Parse;
"T.<U>!",
"?T.<U>",
// Postfix expressions
// Postfixx expressions
"x.y",
"new x",
Expand Down

0 comments on commit 8fadb97

Please sign in to comment.