2003-12-05 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
authorCésar Natarén <cesar@mono-cvs.ximian.com>
Fri, 5 Dec 2003 18:14:52 +0000 (18:14 -0000)
committerCésar Natarén <cesar@mono-cvs.ximian.com>
Fri, 5 Dec 2003 18:14:52 +0000 (18:14 -0000)
commit69680d2094ec7a99a47407bd589a1610fa8a4b17
tree3b95ae263313365c49311225532b67c98d71e69e
parent04777121250bfa2c474dcb4ca13614aa0a7a9c9f
2003-12-05  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>

* jscript-lexer-parser.g: Now I keep track of the parent for most
of the syntatic constructs. Fixed object_literal rule.
* ast.cs: Added field parent. This will help me to track nested
blocks for all of the syntatic constructs and will allow to Emit
everything in one single pass.
* FunctionDeclaration.cs, FunctionExpression.cs: Rearranged the
parent stuff.
* Block.cs, FunctionObject.cs: deleted parent field as AST will
hold it. Delete parent parameter from constructor.
* CodeGenerator.cs: Add field gc_ig (global code IL generator) to
EmitContext class. The idea is Emitting everything in one pass (decls
and 'Global Code' method, the parent reference let me know which IL
generator use, gc_ig or ig).
* Equality.cs, BooleanLiteral, Relational.cs: Added new parameter to
constructor. Use new parent reference for choosing the IL
generator. NumericLiteral a 'hard coded' int32 IL emittion added
for testing.
* StringLiteral.cs, Literal.cs (BooleanLiteral.Emit): now I use
the parent reference to infere which IL generator to use.
* VariableDeclaration.cs: deleted parent field. At Emit, now I use the parent
reference to infer which IL generator to use.
* expression.cs: Added paramenter parent to constructor of: Unary,
Binary, Conditional, Call.

svn path=/trunk/mcs/; revision=20804
13 files changed:
mcs/class/Microsoft.JScript/Microsoft.JScript/Block.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/ChangeLog
mcs/class/Microsoft.JScript/Microsoft.JScript/CodeGenerator.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/Equality.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/FunctionDeclaration.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/FunctionExpression.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/FunctionObject.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/Literal.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/Relational.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/StringLiteral.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/VariableDeclaration.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/ast.cs
mcs/class/Microsoft.JScript/Microsoft.JScript/expression.cs