1 2004-08-25 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
3 * BinaryOp.cs: renamed current_op to simply op as with the new
4 parser we no longer need to keep track of the old_op.
6 2004-08-24 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
8 * expression.cs: do not pass the operand as a parameter to the
9 constructor as it gets after the parent gets constructed, same
10 with binary. Added code generation for array index access.
11 * Parser.cs: added ToJStoken which converts Token to JSToken,
12 factored the code for creation the Unary nodes. Take care of
14 * LateBinding.cs: back to Microsoft.JScript namespace.
17 2004-08-23 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
19 * Parser.cs: pass the skip_count to ArrayLiteral constructor.
20 * Missing.cs: back to Microsoft.JScript namespace.
21 * ArrayLiteral.cs: added field skip_count, it tells us if this is
22 a spaced-arrayliteral, in which case we add a null value in the
23 list, added null check in the resolve and code generation process.
25 2004-08-21 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
27 * expression.cs: added interface ICallable and and function AddArg
28 to class Call. Added class New.
29 * driver.cs: made it use the new lexer and parser.
30 * ast.cs: added field line_number, added property InFunction,
31 added class Function that factores all the code shared between
32 FunctionDeclaration and FunctionExpression.
33 * With.cs: constructor receives line number.
34 * VariableStatement.cs: constructor receives line number.
35 * VariableDeclaration.cs: Added check for parent being
36 FunctionDeclaration and FunctionExpression.
37 * Try.cs: Moved the code that used to take care of the catch to
38 Catch class. Constructor receives forming elements and line
39 number. Removed mangle_id.
40 * Throw.cs: constructor receives line number.
41 * Statement.cs: If, DoWhile, Return constructor receives line number. Renamed
42 identifier to label in Continue and Break class, its constructor now
43 receives the label and line number. For class, constructor
44 receives its forming parts. Switch class, constructor receives
45 line number, added function AddClause and AddStm. Added class
46 Catch. Added class Labelled.
47 * SemanticAnalyser.cs: Added field anon_method_counter, properties
48 NextAnonymousMethod and CurrentAnonymousMethod.
49 * Parser.cs: function ArgumentList receives a ICallable list
50 instead of a AST. Now we add the arguments of a callable. Build
52 * Literal.cs: added constructor for 'this' literal and
53 ObjectLiteral constructor. Added RegExpLiteral class, will take
54 care of regular expressions semantic analysis and code generation.
55 * JSScanner.cs: use no more the antlr based lexer. Fix typo.
56 * JSParser.cs: make it use the new port of Rhino's Parser.
57 * FunctionObject.cs: Added constructor that receives the function name.
58 * FunctionExpression.cs: made it inherit from Function class. Added
59 constructor. Factored the code that used to set the prefix to
60 Function.set_prefix (it's shared with FunctionDeclaration). Added
61 fields local_script_func and field. Implemented Resolve and Emit
62 (now we can do: var x = function (this, method, is, anonymous) {... };).
63 * FunctionDeclaration.cs: made it inherit from Function class in
64 order to share code with FunctionExpression. Added new
65 constructor. Moved the code that used to built the prefix to
66 Function inside function set_prefix. When building the closure
67 added check for setting the type of a FunctionExpression. Moved
68 set_function_type and set_custom_attr to class Function.
69 * ForIn.cs: added constructor and fields lhs, obj and body.
70 * Block.cs: added default constructor and line number based
71 constructor. Check for elems not being null before adding.
72 * ArrayLiteral.cs: set elements in constructor.
74 2004-07-29 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
76 * Parser.cs: Added ClauseType enum. Added all the statements to current_script_or_fn,
77 building the other block was not needed. Build the ast's for the
78 expressions and statements, keep track of the parent relationship.
80 2004-07-19 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
82 * Added Token.cs, TokenStream.cs, Parser.cs which are the port of
83 Mozilla/Rhino's parser.
85 2004-06-24 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
87 * jscript-lexer-parser.g: added ast building for object_literal,
88 it's disabled for now while I fix the "block Vs object_literal"
89 non-determinism problem on the parser. Added rule for
90 array_literal. Build PropertyName ast build.
91 * Literal.cs: fixed the negative numbers code generation (we must
92 optimize this). Added initial ObjectLiteral's class, code generation and
93 Resolve process. Added class ObjectLiteralItem and PropertyName.
94 * ArrayLiteral.cs: added internal size field as an ArrayLiteral can have
95 elisions we keep track of the "real" size here. Added constructor. Added initial
96 Resolve and Emit code.
97 * ASTList.cs: added Size property.
98 * Globals.cs, ASTList.cs: Back to the useful namespace (M.J).
100 2004-06-20 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
102 * CodeGenerator.cs: Added LoopBegin and LoopEnd to EmitContext, they are used by
103 break and continue in order to jump to the desired place. Added
104 check for converting to boolean if we encounter an identifier (at need_convert_to_boolean).
105 * Statement.cs: class If.Emit, call fall_true instead of fall_false so we don't
106 need to jump if the expression evaluates to true. Continue class,
107 replaced ParentIsItrStm with InLoop, emit jump to correct
108 place. Break class, implemented Resolve; deleted
109 ParentIsCorrect. DoWhile, While classes, set LoopBegin and
110 LoopEnd. While class, set LoopBegin and LoopEnd.
111 * ast.cs: Added InLoop and InSwitch.
112 * jscript-lexer-parser.g: pass parent to break_stm. Added block as
113 a statement. Temporarily disabled object_literal in order to test
114 the block structure and continue and break statements.
116 2004-05-28 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
118 * Statement.cs: changed parent_is_itr_stm method to ParentIsItrStm
119 property. Added initial pieces for Break's Resolve. Fixed bug that
120 did not let Emit the code for case clauses that came after the
121 default clause (we match the jsc behavior).
122 * jscript-lexer-parser.g: set parent of switch's clauses.
124 2004-05-27 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
126 * Statement.cs: added parent as a parameter on Continue constructor. Added parent_is_itr_stm
127 * jscript-lexer-parser.g: set parent hierarchy for continue
128 statement. Set to correct parent in iteration_stm.
130 2004-05-24 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
132 * StrictEquality.cs, JSFieldInfo.cs: got it back to Microsoft.JScript namespace.
134 * Statement.cs: Added code generation support for 'switch' statement.
136 * jscript-lexer-parser.g: added 'using' for
137 System.Collections. Allow 'switch' statement building of its
138 ast. Added parent parameter to constructor of With. Build
141 * With.cs: code generation support for 'with' stm.
143 2004-05-21 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
145 * Statement.cs: initial code generation of 'for'.
146 * jscript-lexer-parser.g: let's build for's ast.
148 2004-05-18 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
150 * jscript-lexer-parser.g: let's build Try/Catch/Finally ast.
151 * expression.cs: handle Try case for field or local vars allocation.
152 * Try.cs: implemented Emit.
153 * Throw.cs: implemented code generation.
154 * FunctionDeclaration.cs: cache some values.
156 2004-04-26 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
158 * FunctionDeclaration.cs: let's make function name formation
159 (get_name ()) a little bit less dumb. We cache the prefix now so
160 we don't have to recalculate it everytime.
162 2004-04-22 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
164 * Literal.cs: emit the correct code for negative numbers.
165 * jscript-lexer-parser.g: set parent unary_expr.
167 2004-04-18 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
169 * expression.cs: added code generation for 'x1 ? x2 :x3' op.
170 * Statement.cs: Added code generation for while and do-while.
172 2004-04-17 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
174 * Statement.cs (class if): reimplemented Emit based on fall_false.
175 * Equality.cs: added code generation for != and emit jumping code
176 only in the case we are at a global expression not statement.
177 * CodeGenerator.cs (fall_true, fall_false): Check if convertion to
178 boolean needed. Made emit_to_boolean internal. Added need_convert_to_boolean.
180 2004-04-14 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
182 * expression.cs (Binary.Emit): treat boolean operator
183 specially. Added emit_jumping_code.
184 * CodeGenerator.cs: Added emit_to_boolean. Added fall_true and
185 fall_false, which will express all boolean expressions and control
188 2004-04-02 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
190 * Equality.cs: Moved the Emit and Resolve code here.
191 * jscript-lexer-parser.g: Build a Equality object instead of a
192 Binary object for equality_expr.
193 * expression.cs: moved equality oeprators (resolve and IL gen) to
194 Equality.Emit and Equality.Resolve.
196 2004-03-31 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
198 * expression.cs: Added shift operators IL emit.
199 * BitwiseBinary.cs: added constructor for building it according to
200 JSToken enum. return a new object on EvaluateBitwiseBinary (this
201 needs a real implementation).
202 * expression.cs: added code for evaluation of bitwise operators at emit_op_eval.
204 * Statement.cs: added stub for While and DoWhile ast
205 representation (reworking my Emit code).
206 * jscript-parser-lexer.g: allow iteration statement ast build.
208 * FunctionDeclaration.cs: agrouped code for setting custom attribute.
210 * expression.cs: added Modulo operator case.
212 2004-03-16 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
214 * Convert.cs: added rule for string conversion.
216 * Plus.cs: added rule for string addition.
218 * PostOrPrefixOperator.cs: added constructor, returned to Microsoft.JScript ns, initial Resolve and
219 Emit (cases where there's no real operator).
221 * StringLiteral.cs: now implements Exp as can appear as a simple
222 exp in global code. Added check for Pop generation.
224 * expression.cs: added IL generation code for print func call.
225 Args class added get_element, Size and made Resolve behave as the
226 others (collect the differents Resolve's return values from each
227 of the arguments). Expression class, added default Resolve call
228 for non-Exp implementers.
230 * jscript-lexer-parser.g: postfix_expr rule now returns a simple
231 AST, this handles the case where no postOrPrefixOp present; Unary
234 * FormalParameterList.cs: added get_element, retrieves nth element.
236 2004-03-14 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
238 * ScriptStream.cs: let's print some messages.
240 * jscript-lexer-parser.g (STRING_LITERAL): Do not include the ' in the text of the rule.
242 2004-03-13 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
244 * jscript-lexer-parser.g: keep track of return's parent.
245 * Statement.cs: added parent parameter to constructor.
247 * expression.cs: refactored Emit code from Identifier, now we take
248 care of function's paramenter references. First attack to function
249 calls, check if Resolve from Call succeed.
251 * VariableDeclaration.cs: Deleted Decl class, field_info and
252 local_builder fields were being used only by VariableDeclaration,
253 I'll keep them there.
255 * FormalParameterList.cs: added field pos to FormalParam, and set
256 it at FormalParameterList's Resolve stage.
258 * TODO: updated TODO.
260 2004-03-07 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
262 * jscript-lexer-parser.g: build If's ast. Keep track of expr parent.
264 * expression.cs: At class Conditional renamed fields. Class
265 Expression inherits from Exp as we must keep track if we must pop
266 the last value (this is for the comma operator), track the parent,
267 at Resolve we take care of the last value of the expression,
269 * VariableDeclaration.cs: updates needed because of EmitContext change.
271 * Statement.cs: added parent param to If constructor. Implement
272 Resolve and Emit for If statement.
274 * Relational.cs: Set parent. The boxing happens in the containing statement.
276 * FunctionDeclaration.cs: Added func_type field, will be used to determine the
277 type of the function we are generating (global function, method
278 from a class, etc) and attach to it the correct custom
279 attribute. Simplified the code for nested functions:
280 refactored the code so no code duplication is involved, now we
281 have only one function that retrieves the name of the function,
282 now create a new EmitContext for the body of the method.
284 * FormalParameterList.cs, Literal.cs, StringLiteral.cs: use
285 current EmitContext's ILGenerator.
287 * Convert.cs: Do not throw the NotImplementedException anymore for
288 method ToBoolean, for now we always return false. This must get a
291 * CodeGenerator.cs: Deleted one of ILGenerator fields
292 from EmitContext, suffices using only one (more notes about the
293 change on the Functiondeclaration entry). Imitate jsc behavior for
294 compiled files names, aggregate the exe or dll extension after last dot.
296 * Block.cs: In order to implement the comma operator (i.e., expression,
297 assign_exp), we must track if our expressions are at a global
298 scope, in which case we must pop the last result too.
300 2004-01-25 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
302 * Relational.cs: Initial generation of CIL for relational operators.
304 2004-01-23 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
306 * jscript-lexer-parser.g: formal_param_list receives a parent too.
308 * SymbolTable.cs: added size and current_symbols properties.
310 * JSLocalField.cs: don't throw not ImplementedException from
311 constructor (same reason, testing purposes, must get implemented
314 * IdentificationTable.cs: added num_of_locals and current_locals properties.
316 * FunctionDeclaration.cs: added a LocalBuilder and DictionaryEntry
317 as fields. Not throw NotImplementedException for
318 JScriptFunctionDeclaration (testing purposes, must get implemeted
319 for real). Let's build our function closures! Added functions:
320 build_closure and build_closure_nested, build_local_fields. Keep
321 track of current parameters and locals defs.
323 * FormalParameterList.cs: made FormalParam inherit from
324 AST. Implement the Emit for parameters, yeah!
326 * CodeGenerator.cs: added a ModuleBuilder reference. New constructor.
328 * Closure.cs: do not throw the exception (this allow me to run the
329 tests at mcs/jtests and check that at least i'm not generating
330 invalid CIL). Be aware that this must be really implemented.
332 * Block.cs: renamed field, and implement the double pass for
333 nested function declarations code emittion, yeah!.
335 2004-01-16 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
337 * Microsoft.JScript/VsaReferenceItem.cs: renamed field, reuse parent's ctr.
338 * Microsoft.JScript/VsaItem.cs: renamed some fields, added ctr,
339 * Microsoft.JScript/VsaGlobalItem.cs: reuse parent ctr.
340 * Microsoft.JScript/VsaCodeItem.cs: reuse parent ctr.
341 * Microsoft.JScript/GlobalScope.cs: reuse constructors from parent.
343 * UnaryOp.cs: inherit from Exp now.
344 * Plus.cs: Don't throw the exception when calling constructor, let
345 it build the default handler. Return a new object when calling
346 EvaluatePlus until properly implemented.
348 * NumericUnary.cs: added new Resolve.
349 * NumericBinary.cs: assign operator val at ctr. Return a new
350 object when calling EvaluateNumericBinary until properly
351 implemented. Added Resolve.
352 * Equality.cs: added ctr and return false for EvaluateEquality
353 until properly implemented. Added Resolve's functions.
355 * Block.cs (Resolve): That check was not necessary.
357 * InstanceOf.cs, PostOrPrefixOperator.cs, Relational.cs,
358 StrictEquality.cs, TypeOf.cs: added Resolve inherited from
359 BinaryOp and UnaryOp, and this from Exp.
360 * IdentificationTable.cs, ScriptBlock.cs: deleted debugging messages.
361 * jscript-lexer-parser.g: deleted debugging messages. Create a
362 Assign object instance of a simple Binary obj. Same case for Equality.
364 * expression.cs: added Exp abstract class. Classes that are ast of
365 language constructions that can appear as global expressions that
366 get evaluated and then the result is discarded inherit from this
367 new class. This let meee keep track of things that must get Popped
368 or can even avoid the evaluation of it. Wrote real Resolve method
369 for classes: Unary, Binary.
370 Implemted Emit method for some binary operations (+, -, / and *),
371 for other operators some more code is still missing.
372 Identifier: handle assignment cases and global exp cases.
373 Added class Assign (compisite assignment still missing tough :-(
375 * driver.cs: deleted debug messages, added "Compilation Succeeded"
377 * VariableStatement.cs, VariableDeclaration.cs: wrote real Resolve method.
378 * Literal.cs (BooleanLiteral, NumericLiteral): now inherits from
379 Exp and handle the case for global expressions that must be popped
380 after evaluation. no more invalid IL being generated! yeah!
381 * Block.cs: wrote real Resolve method, erased debug messages.
382 * BitwiseBinary.cs, InstanceOf.cs, UnaryOp.cs: : add new Resolve inherited from Exp.
383 * BinaryOp.cs, Conditional: now inherits from Exp.
385 2004-01-15 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
387 * ReferenceAttribute.cs: moved it back to namespace Microsoft.JScript.
389 * CodeGenerator.cs: small fixes to generate same things that ms.
391 2004-01-13 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
393 * VariableDeclaration.cs: get the this.type which is a Type not a TypeBuilder.
395 2004-01-12 Atsushi Enomoto <atsushi@ximian.com>
397 * JSMethodInfo.cs : tiny fix for NET_2_0 build.
399 2003-12-24 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
401 * jscript-lexer-parser.g: keep track of parent reference for
402 IDENTIFIER, STRING_LITERAL.
404 * expression.cs: Added 'binding' field. Added 'parent' parameter
405 to constructor. Now we emit the proper code for the identifier.
407 * VariableStatement.cs: updated to field names instead of the old
410 * VariableDeclaration.cs: Added class Decl, it constains the
411 references to the static field or LocalBuilder that are created
412 when a declaration is emitted. Deleted unuseful properties (Id,
415 * SymbolTable.cs: Deleted Retrieve method. Contains now returns an
416 object instead of a boolean.
418 * StringLiteral.cs: Deleted unuseful properties. Use ig instead of ec.ig.
420 * IdentificationTable.cs: Deleted Retrieve method. Contains method
421 now return an object instead of a boolean, that reference is the
422 binding associated with the identifier being searched.
424 2003-12-18 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
426 * jscript-lexer-parser.g: Keep track of parent for numeric_literal.
428 * VariableDeclaration.cs: now I handle initialization (ex. var x =
429 2; or function f () { var x = 4; }) at global scope or at
432 * Literal.cs: Added parent param to NumericLiteral constructor.
434 * FunctionDeclaration.cs: Added Ret opcode for all function declaration bodies.
436 2003-12-17 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
438 * CodeGenerator.cs: Added IL emittion for ldnull on default ending code for 'Global Code'.
440 2003-12-10 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
442 * jscript-lexer-parser.g: added 'tokens { IN = "in"; INSTANCE_OF =
443 "instanceof"; }' in order to be able to parse both keywords. When
444 generating the parser, one warning about nondeterminism
445 (k==1:"in") is generated ignore it.
447 2003-12-07 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
449 * jscript-lexer-parser.g: things like 'new Point (10, 20).x' were
450 not parsable now they are. Mozilla's and Janet's test suites are
451 being really helpful.
453 2003-12-05 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
455 * jscript-lexer-parser.g: added check for non-null reference at
456 var_decl_list rule. Added single quote STRING_LITERAL lexical rule
457 and multiple lines comments rule.
459 * jscript-lexer-parser.g: Now I keep track of the parent for most
460 of the syntatic constructs. Fixed object_literal rule.
462 * ast.cs: Added field parent. This will help me to track nested
463 blocks for all of the syntatic constructs and will allow to Emit
464 everything in one single pass.
465 * FunctionDeclaration.cs, FunctionExpression.cs: Rearranged the
467 * Block.cs, FunctionObject.cs: deleted parent field as AST will
468 hold it. Delete parent parameter from constructor.
469 * CodeGenerator.cs: Add field gc_ig (global code IL generator) to
470 EmitContext class. The idea is Emitting everything in one pass (decls
471 and 'Global Code' method, the parent reference let me know which IL
472 generator use, gc_ig or ig).
473 * Equality.cs, BooleanLiteral, Relational.cs: Added new parameter to
474 constructor. Use new parent reference for choosing the IL
475 generator. NumericLiteral a 'hard coded' int32 IL emittion added
477 * StringLiteral.cs, Literal.cs (BooleanLiteral.Emit): now I use
478 the parent reference to infere which IL generator to use.
479 * VariableDeclaration.cs: deleted parent field. At Emit, now I use the parent
480 reference to infer which IL generator to use.
481 * expression.cs: Added paramenter parent to constructor of: Unary,
482 Binary, Conditional, Call.
484 2003-11-30 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
486 * expression.cs: Added new field to Call class, so it can handle more arguments.
488 * StringLiteral.cs (Emit) : Load the string value.
490 * Literal.cs: BooleanLiteral, Resolve always return true. Emit the value and box it to Boolean.
492 * CodeGenerator.cs: Set parent if 'JScript 0' to GlobalScope. Set
493 custom attribute. Build default 'JScript 0' constructor. Emit
494 default initial/final code of 'Global Code'. Create default
497 2003-11-29 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
499 * jscript-lexer-grammar.g: define new rule 'arguments' instead of
500 repeating hand written rule all around. Change "." for DOT, dumb
501 mistake by myself. Added rule new_expr. Now we handle properly the
502 call_expr rule (as defined on the spec), and added a new
503 argument. Added subrule new_expr to left_hand_side_expr rule.
505 2003-11-27 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
507 * expression.cs (Expression): implemented Emit.
509 * expression.cs (Binary): Emit now creates a local for the
510 different kinds of binary expressions (initial code for this).
512 * ast.cs: Emit method now is abstract instead of virtual.
514 * CodeGenerator.cs: changed no_global_code_method to is_global_code_method.
516 * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, DebugBreak.cs,
517 Enum.cs, Equality.cs, Eval.cs, ForIn.cs, FormalParameterList.cs,
518 FunctionExpression.cs, Import.cs, InstanceOf.cs, Literal.cs,
519 NumericLiteral, NumericBinary.cs, NumericUnary.cs, Package.cs,
520 Plus.cs, PostOrPrefixOperator.cs, Print.cs, Relational.cs,
521 Continue, Break, Return, StrictEquality.cs, StringLiteral.cs,
522 Throw.cs, Try.cs, TypeOf.cs, VariableDeclaration.cs, With.cs,
523 Conditional, Call, Identifier, Args, Expression, :
526 * FunctionDeclaration.cs: Check if values are not null first (at
527 Resolve). Ignore code generation is at 'Global Code'.
529 * VariableDeclaration.cs: Now I take care of IL generation when we
530 are at statements and expressions at global code, 'Global Code'
531 method is populated with that IL.
533 * CodeGenerator.cs: Added flag for 'Global Code' method
534 emittion. Now I call 'Emit' twice. The first for declarations the
535 follower for statements and expressions at global scope.
537 2003-11-10 cesar lopez nataren <cesar@ciencias.unam.mx>
539 * Visitor.cs: Deleted.
541 2003-11-09 cesar lopez nataren <cesar@ciencias.unam.mx>
543 * FormalParameterList.cs: Now inherits from AST. Each of the
544 formal parameters gets into the IdentificationTable at Resolve.
546 * FunctionDeclaration.cs:Resolve (), We open a new block when
547 encountering a FunctionDeclaration, resolve de parameters and the
548 body, at the end we close the block.
550 * IdentificationTable.cs: Now we keep track of parent of the
551 current block. 'Enter (...)' now receives an object, not a
552 VarDecl. 'Contains' now take care of searching through the binding
555 * Literal.cs: Deleted 'Literal' class, was being used for
556 nothing. All the classes the inherited from it, now do it from
557 AST. A 'literal' does resolve to true by default.
559 * Relational.cs: Resolve recursively left and right.
561 * SemanticAnalyser.cs: added flag for 'print statement'.
563 * Statement.cs: 'If' class, resolves firstly the condition, the true_stm
566 * driver.cs: Init the semantic analysis phase.
568 * expression.cs: 'Unary' class, resolves its operand
569 first. 'Binary' class,resolves left and right first. 'Args' class
570 resolve all the formal parameters first. 'Expression' resolve all
571 the nested expressions first.
573 * jscript-lexer-parser.g: Replaced 'Literal' references for AST ones.
575 2003-11-08 cesar lopez nataren <cesar@ciencias.unam.mx>
577 * jscript-lexer-parser.g: Allow the building of numeric_literal and DECIMAL_LITERAL,
578 this is temporal in order to get Factorial compiled by mjs (must
579 build the types according to Ecma-262 spec).
581 * Literal.cs: Added NumericLiteral class.
583 2003-11-06 cesar lopez nataren <cesar@ciencias.unam.mx>
585 * FunctionDeclaration.cs: Build a ScriptFunction local variable,
586 if inside a nested block.
588 2003-11-05 cesar lopez nataren <cesar@ciencias.unam.mx>
590 * jscript-lexer-parser.g: Now we take care of parents. This allows
591 to keep track if we are inside nested blocks. At
592 'func_decl_or_expr', now I built the FunctionDeclaration or
593 FunctionExpression first and then assign its body to it - this let
594 me get a non-null value of the FunctionExpression or
595 FunctionDeclaration so I can detect if it's a nested block (thanks go to Jackson!).
597 * Block.cs, FunctionObject.cs, VariableDeclaration.cs: Added 'AST parent' field.
598 * Block.cs, FunctionDeclaration.cs, FunctionExpression.cs,
599 FunctionObject.cs, VariableDeclaration.cs: Added 'AST parent' parameter to constructor.
601 * ScriptBlock.cs: Initiate the global block with 'null' as parent.
603 * FunctionDeclaration.cs: Added 'get_composite_name ()' method
604 (gets the name of a function if it's nested). Emit code for
605 function's body. At 'Emit ()' now we take care if it's a nested
608 * FunctionObject.cs: default return type is 'void' not
609 'Object'. Function declarations without parameters map to functions with
610 'Object this' and 'VsaEngine engine' as parameters by
611 default. Assign parent to nested block.
613 * VariableDeclaration.cs: At 'Emit ()', now we take care if we are
614 a global declaration or inside a function declaration.
616 2003-11-04 cesar lopez nataren <cesar@ciencias.unam.mx>
618 * FunctionObject.cs: Handle no parameters on functions.
620 * jscript-lexer-parser.g: Allow functions without parameters.
622 2003-11-03 cesar lopez nataren <cesar@ciencias.unam.mx>
624 * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, Blocks.cs,
625 DebugBreak.cs, Enum.cs, Equality.cs, Eval.cs, ForIn.cs,
626 FunctionDeclaration.cs, FunctionExpression.cs, Import.cs,
627 InstanceOf.cs, Literal.cs, NumericBinary.cs, NumericUnary.cs,
628 Package.cs, Plus.cs, PostOrPrefixOperator.cs, Print.cs,
629 Relational.cs, ScriptBlock.cs, StrictEquality.cs, Throw.cs,
630 Try.cs, TypeOf.cs, VariableDeclaration.cs, VariableStatement.cs,
631 With.cs, expression.cs : Added
632 'Resolve' method stub.
634 * CodeGenerator.cs: Added a ILGenerator field to EmitContext.
636 * FormalParameterList.cs: Added FormalParam class. Change Add
637 method to receive the id and the type annotation from function's parameters.
639 * FunctionDeclaration.cs: Added code for initial function's
640 definition code generation.
642 * FunctionObject.cs: Added MethodAttributes and type_annot
643 fields. Added params_types function, which returns an array of
644 types from each of the function's parameters.
646 * IdentificationTable.cs: Added ToString method.
648 * SemanticAnalizer.cs: Fixed the file name (maybe I should erase it
649 and add it again with the correct name). Not based on the Visitor
650 pattern anymore. Deleted all the VisitFOO methods. Added a
651 IdentificationTable field. Added Run, Dump methods.
653 * Statement.cs: Deleted Statement class (it was being used for
654 nothing). All classes that were having Statement as parent,
655 changed their parent to be AST.
657 * SymbolTable.cs: Added Add method that receives the id and the
658 declaration class. Retrieve changed to return an AST. Added
659 ToString method. Added 'SymbolTable parent' field.
661 * VariableDeclaration.cs: Added InitValue property.
663 * ast.cs: Added some comments and abstract method 'Resolve'.
665 * jscript-lexer-parser.g: Added parsing support for formal
666 parameters type annotations.
668 2003-10-30 cesar lopez nataren <cesar@ciencias.unam.mx>
670 * jscript-lexer-parser.g: fixed function call parsing! yeah! (give
673 2003-10-28 cesar lopez nataren <cesar@ciencias.unam.mx>
675 * jscript-lexer-parser.g: allow empty program files. Added type
676 annotations on var decl and function decl.
677 * VariableDeclaration.cs: added return type annotation field.
678 * FunctionExpression.cs: added return type parameter to constructor.
679 * FunctionDeclaration.cs: added return type parameter to
680 constructor. Added Emit method (just creates the static field at
681 the global object, for now).
682 * FunctionObject.cs: added return type to constructor. Changed
683 names to readable ones ;-)
685 * ScriptStream.cs: added WriteLine.
687 2003-10-24 cesar lopez nataren <cesar@ciencias.unam.mx>
689 * ast.cs: Added 'virtual' Emit method (I might change it to be
690 abstract, but I would have to added to all classes that derive
691 from it. I'll do it later)
692 * Block.cs: Added Emit method.
693 * CodeGnerator.cs: Restructured it (not based on the Visitor pattern
694 anymore) - still missing some methods, ut on the way. A nice
695 hacking weekend coming. Added EmitContext class.
696 * ScriptBlock.cs: Added Emit method.
697 * VariableDeclaration.cs: Changed type field from string to
698 Type. Added Emit method.
699 * VariableStatement.cs: Added Emit method.
700 * driver.cs: Added CodeGeneration phase (only simple var
701 declarations support it. More coming soon).
704 2003-10-22 cesar lopez nataren <cesar@ciencias.unam.mx>
706 * statement.cs: added Return class.
708 * Throw.cs: Added expression field, constructor and ToString.
710 * jscript-lexer-parser.g: Allow return_stm and throw_stm tree
713 * With.cs: added constructor and ToString. Back to the non-tmp
716 * jscript-parser-lexer.g: allow with_stm tree building.
718 * jscript-lexer-parser.g: changed the return type from if_stm from
719 'If' to AST. Added tree for continue_stm. Allowed building of
722 * statement.cs: switched to internal 'If' class. Added Continue
723 class. Added Break class.
725 * jscript-lexer-parser.g: build tree for function decl or expr.
727 * FunctionDeclaration.cs: added internal constructor.
729 * FunctionExpression.cs: added internal constructor.
731 * FunctionObject.cs: added internal constructor and ToString method.
733 * jscript-lexer-parser.g: added building tree for if_stm.
734 * Statement.cs: Added if class for 'if' statement.
737 2003-10-21 cesar lopez nataren <cesar@ciencias.unam.mx>
739 * VariableDeclaration.cs: added the initializer to ToString.
741 * jscript-lexer-parser.g: Allow "christmas trees" (aka expression
744 * Block.cs, Equality.cs, Relational.cs: modified ToString
746 * Equality.cs, Relational.cs, StringLiteral.cs,
747 VariableDeclaration.cs: Added constructor
749 * VariableStatement.cs, ScriptBlock.cs: changed from hungarian
750 name convetion style to mono style.
752 * UnaryOp.cs: added operator and operand fields.
754 * VariableDeclaration.cs: chenged field name from assignExp to val.
756 * BinaryOp.cs: Made "internal" the attributes, added the two
759 * JScriptLexer.cs, JScriptParser.cs, JScriptParserokenTypes.cs,: updates from grammar changes.
761 * driver.cs: Dump the string representation of the parsed exps.
763 * Literal.cs: added BooleanLiteral
765 * Relational.cs: added constructor, ToString,
767 2003-10-10 cesar lopez nataren <cesar@ciencias.unam.mx>
769 * README: added some info about hacking the grammar
771 * JSparser.cs: Updated the constructor to not receiving params.
773 * JScriptLexer.cs, JScriptParser.cs, JScriptParserTokenTypes.cs,
774 JScriptParserTokenTypes.txt: update of antlr generated files from
777 * jscript-lexer-parser.g: Rewrote the EcmaScript grammar. Now we
778 can parse a little bit more useful programs like:
780 function factorial (i)
787 k = factorial (i - 1);
796 As you can see, it's not the classic factorial function
797 definition, I still have to make some tricks like storing the
798 result from the recursive call and then multiply. But this new
799 grammar it's easier to alter than the old one. Also we got support
800 for for-in statements, for statements, global expressions, support
801 for object accesors or better known as the "dot" operator. Two
802 rules are on the eye: left_hand_size_expr and call_expr, in order
803 to finish the parsing grammar and fix the bugs.
806 2003-09-29 <cesar@ciencias.unam.mx>
808 * Added: VsaGlobalItem.cs, VsaReferenceItem.cs, VsaCodeItem.cs
810 * Added VsaItem.cs, implements IVsaItem.
812 2003-09-28 <cesar@ciencias.unam.mx>
814 * VsaItems.cs: Check that no name is repeated (this was docs fault
815 :-)). This is the beauty of testing.
817 * Add VsaItems.cs, implements IVsaItems.
819 2003-09-22 <cesar@ciencias.unam.mx>
821 * DocumentContext.cs: changed constructor from internal to public,
822 this a kind of hack ;), but we can build mjs.exe with that change.
824 * driver.cs, ast.cs, VsaEngine.cs, VariableStatement.cs,
825 VariableDeclaration.cs, VBArrayConstructor.cs, StringObject.cs,
826 StringLiteral.cs, StringConstructor.cs, Statement.cs,
827 ScriptStream.cs, ScriptObject.cs, ScriptFunction.cs,
828 ScriptBlock.cs, RegExpObject.cs, RegExpConstructor.cs, Print.cs,
829 Package.cs, ObjectConstructor.cs, NumberObject.cs,
830 NumberConstructor.cs, MathObject.cs, Literal.cs,
831 LenientGlobalObject.cs, JSVariableField.cs, JSToken.cs,
832 JSScanner.cs, JSParser.cs, JSObject.cs, JSLocalField.cs,
833 JSFunctionAttributeEnum.cs, JSFunctionAttibute.cs, JSField.cs,
834 JSBuiltIn.cs, IVsaScriptScope.cs, IRedirectOutput.cs,
835 IActivationObject.cs, GlobalScope.cs, GlobalObject.cs,
836 FunctionObject.cs, FunctionExpression.cs, FunctionDeclaration.cs,
837 FunctionConstructor.cs, FormalParameterList.cs, ErrorObject.cs,
838 ErrorConstructor.cs, EnumeratorObject.cs,
839 EnumeratorConstructor.cs, Enum.cs, Empty.cs, DocumentContext.cs,
840 DateObject.cs, DateConstructor.cs, Context.cs, Closure.cs,
841 BooleanObject.cs, BooleanConstructor.cs, Block.cs, BinaryOp.cs,
842 BaseVsaEngine.cs, ArrayObject.cs, ArrayConstructor.cs,
843 ActiveXObjectConstructor.cs, ActivationObject.cs:
845 indentation comformance to mono style. Returned to
846 Microsoft.JScript namespace name. Now we can build
847 Microsoft.JScript.dll on Linux/Windows, and build mjs.exe on
848 linux/Windows with our Microsoft.JScript.dll. To build mjs.exe:
849 $(CSC) /r:Microsoft.JScript.dll driver.cs. Also changed my mind
850 about the namespace stuff, because I want people
851 to contribute NUnit tests for Microsoft.JScript public API.
853 * jscript-lexer-parser.g: Now we are back to Microsoft.JScript namespace.
855 2003-09-21 <cesar@ciencias.unam.mx>
857 * jscript-lexer-parser.g: fixed typo and added SEMI_COLON to print_statement.
859 2003-09-20 <cesar@ciencias.unam.mx>
861 * jscript-lexer-parser.g: We are little bit closer to the spec on
862 StringLiteral definition.
864 * jscript-lexer-parser.g: One line patch, the beauty of tests :-)
866 * jscript-lexer-parser.g: Build ast for FunctionExpression.
868 * JSObject.cs: we don't throw NotImplementedException anymore,
869 this let us use FunctionExpression to build the ast.
871 * FunctionExpression.cs: Added a FunctionObject as field, a
874 * FunctionObject.cs: Added default constructor.
876 * driver.cs: Deleted the Jsc class. We are not generating code
877 now. I'm moving to provide something like mcs's EmitContext
878 instead of the CodeGenerator class having the Reflection.Emit
879 builders and ILGenerator. This driver is just for Lexical and
880 Parsing phases testing.
882 * driver.cs: Now we are using the Microsoft.JScript public API
883 functions to load the lexer and parser.
885 * ScriptBlock.cs,Block.cs: Added ToString function.
887 2003-09-20 <cesar@ciencias.unam.mx>
889 * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, Block.cs,
890 DebugBreak.cs, Enum.cs, Equality.cs, Eval.cs, ForIn.cs,
891 FunctionExpression.cs, Import.cs, In.cs, InstanceOf.cs,
892 Literal.cs, NumericBinary.cs, NumericUnary.cs, Package.cs,
893 Plus.cs, PostOrPrefixOperator.cs, Print.cs, Relational.cs,
894 Statement.cs, StrictEquality.cs, StringLiteral.cs, Throw.cs,
895 Try.cs, TypeOf.cs, VariableDeclaration.cs, With.cs, ast.cs,
896 : erased Visit method and made some mono indentation style changes.
898 * CodeGenerator.cs: commented some function calls.
899 * FunctionDeclaration.cs: moved function attributes to
900 FunctionObject class, erased Visit method.
901 * FunctionObject.cs: Here is where we store a function
902 expression/declaration info, erased Visit method.
903 * ScriptBlock.cs: Added a Block field, Block will contain the
905 * jscript-lexer-parser.g: updated the grammar to build the program
906 representation based on ScriptBlock.
908 2003-09-19 <cesar@ciencias.unam.mx>
910 * JSToken.cs: public API compliance.
912 2003-09-07 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
914 * Context.cs: Added constructor and Document field.
915 * DocumentContext.cs: Added Name field.
916 * JSParser.cs: Integration of antlr's generated parser with
917 JSParser public API. ScriptBlock is now the principal data structure that
918 represents a Jscript .Net program.
919 * JSScanner.cs: Integration of antlr's generated lexer with
920 JSScanner public API.
922 2003-07-27 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
923 * Added files StringLiteral.cs, CodeGenerator.cs and Print.cs.
925 2003-07-27 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
927 * jscript-lexer-parser.g: Changed the namespace to
928 Microsoft.JScript.Tmp.
930 * jscript-lexer-parser.g: Fixwd a typo at source_elements rule.
932 * jscript-lexer-parser.g: Got the name of a
933 global_function_declaration and also its return type if
936 * jscript-lexer-parser.g: Added syntatic rule for print_statement.
937 * jscript-lexer-parser.g: Initial construction of AST for
938 enum_statement and package_statement.
940 * jscript-lexer-parser.g: Fixed the enum_statement to accept
941 empty enum declarations.
943 * jscript-lexer-parser.g: Got the type of a
944 veriable_declaration.
946 * jscript-lexer-parser.g: Initial construction of AST for
947 primary_expression (in particular literal).
950 2003-07-27 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
952 * driver.cs: Modified the driver structure to be compatible
953 with our new CodeGenrator and SemanticAnalizer. I
954 removed the builders from Reflection.Emit to the
955 CodeGenerator. Added an ASTList, SemanticAnalizer and
956 CodeGenerator here. Adde methods Run, GenerateCode
959 2003-07-27 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
960 * Statement.cs: Forgot to include it on last commit.
962 2003-07-27 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
964 * Decided to change temporarly namespace name
965 Microsoft.JScript to Microsoft.JScript.Tmp in order to be able
966 to run the code generated by our CIL code generator (on next
967 commit will come). The problem is that we don't have the
968 runtime support for our compiler, this involve VsaEngine class
969 and its "friends", which I have not found a lot of
970 doumentation for. If someone knows a docs place for them,
971 don't hesitate to send me a email pointing to them.
973 * Changed from public to internal Visit function at some
976 * Package.cs: Added Name and Members fields.
978 * SemanticAnalizer.cs: Added methods VisitPrint and
981 * VariableDeclaration.cs: Added Type field.
983 * Visitor.cs: Changed from public to internal. Added
984 VisitPrint and VisitStringLiteral methods.
986 * VsaEngine.cs: Fixed namespace name from Microsoft.JScript to
987 Microsoft.JScript.Vsa and then to Microsoft.JScript.Vsa.Tmp.
992 2003-07-22 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
994 * Added CmdLineError.cs and JSError.cs, last night I forgot to
997 2003-07-21 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
999 ArrayPrototype.cs, ArrayWrapper.cs, BitwiseBinary.cs,
1000 BlockScope.cs, BooleanPrototype.cs, BreakOutOfFinally.cs,
1001 CmdLineException.cs, CmdLineOptionParser.cs,
1002 ContinueOutOfFinally.cs, Convert.cs, DatePrototype.cs,
1003 DocumentContext.cs, EnumeratorPrototype.cs, Equality.cs,
1004 ErrorPrototype.cs, EvalErrorObject.cs, Expando.cs,
1005 FieldAccessor.cs, FunctionPrototype.cs, FunctionWrapper.cs,
1006 Globals.cs, In.cs, InstanceOf.cs, JSConstructor.cs,
1007 JScriptException.cs, JSFieldInfo.cs, JSMethodInfo.cs, JSParser.cs,
1008 JSPrototypeObject.cs, JSScanner.cs, LateBinding.cs,
1009 LenientArrayPrototype.cs, LenientBooleanPrototype.cs,
1010 LenientDateConstructor.cs, LenientDatePrototype.cs,
1011 LenientEnumeratorPrototype.cs, LenientErrorPrototype.cs,
1012 LenientFunctionPrototype.cs, LenientMathObject.cs,
1013 LenientNumberPrototype.cs, LenientObjectPrototype.cs,
1014 LenientRegExpPrototype.cs, LenientStringConstructor.cs,
1015 LenientStringPrototype.cs, LenientVBArrayPrototype.cs,
1016 MemberInfoList.cs, MethodInvoker.cs, Missing.cs, Namespace.cs,
1017 NotRecommendedAttribute.cs, NumberPrototype.cs, NumericBinary.cs,
1018 NumericUnary.cs, ObjectPrototype.cs, Plus.cs,
1019 PostOrPrefixOperator.cs, RangeErrorObject.cs,
1020 ReferenceAttribute.cs, ReferenceErrorObject.cs, RegExpMatch.cs,
1021 RegExpPrototype.cs, Relational.cs, ResInfo.cs,
1022 ReturnOutOfFinally.cs, ScriptStream.cs, SimpleHashtable.cs,
1023 StackFrame.cs, StrictEquality.cs, StringPrototype.cs,
1024 SuperTypeMembersSorter.cs, SyntaxErrorObject.cs, TypedArray.cs,
1025 TypeErrorObject.cs, TypeOf.cs, TypeReflector.cs,
1026 URIErrorObject.cs, VBArrayObject.cs, VBArrayPrototype.cs,
1027 VersionableAttribute.cs
1029 Now, I must fill in the blanks :-)
1032 2003-07-09 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
1033 * jscript-lexer-parser.g: Added conditional_compilation_directive,
1034 which is the beginning of our support for conditional compilation
1035 statements and directives in our parser. Added
1036 cc_on_statement, and some lexer rules for getting the needed
1037 tokens (COND_SET, COND_DEBUG, COND_POSITION, COND_POSITION,
1038 COND_IF, COND_ELIF, COND_ELSE, COND_END and CC_ON.
1041 2003-07-03 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
1043 * jscript-lexer-parser.g: Changed the format of copyright notice.
1045 This changes will allow the support
1046 for the grammar added by MS to EcmaScript (aka its JScript .Net),
1047 I'm still missing some, but they are on the way.
1049 * jscript-lexer-parser.g: Deleted function_declaration, and
1050 added global_function_declaration and type_function_declaration.
1051 I decided to make the grammar as strict as the MS docs mark,
1052 but there's a difference between what their docs says and what
1053 their compiler does. For this case I decided to follow the
1054 docs. A program like:
1055 private function F ()
1057 according to the docs, would not be syntaticly correct. But the MS
1058 compiler, accepts the grammar construct and mark the error at
1059 semantic analysis phase. I followed the docs this time.
1061 * jscript-lexer-parser.g: Added debbuger_statement.
1062 * jscript-lexer-parser.g: Added import_statement.
1063 * jscript-lexer-parser.g: Added package_statement and package_member(s).
1064 * jscript-lexer-parser.g: Added super_statement.
1065 * jscript-lexer-parser.g: Added const_statement.
1066 * jscript-lexer-parser.g: Added class_statement,
1067 interfaces_list and class_members.
1069 * jscript-lexer-parser.g: Added interface_statement and
1072 * jscript-lexer-parser.g: Added enum_statement.
1073 * jscript-lexer-parser.g: Added static_statement. The rule for
1074 this syntatic construc is: static identifier { [body] }
1075 body does not get well specified in the docs. Must search wich
1076 are the possible values of it.
1078 * jscript-lexer-parser.g: At variable_declaration, added
1079 support for explicit type declaration.
1081 * jscript-lexer-parser.g: Added numeric_literal,
1082 DECIMAL_LITERAL and HEX_INTEGER_LITERAL.
1084 * jscript-lexer-parser.g: Added modifiers, modifier, version_modifier.
1087 2003-06-09 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
1090 * Added the Visit method to classes: AST, ArrayLiteral, ASTList,
1091 Block, DebugBreak, Eval, ForIn, FunctionDeclaration,
1092 FunctionExpression, Import, Package, ScriptBlock, Throw, Try,
1095 That method will be the driver that will allow classes
1096 that implement the Visitor interface do a walk through the AST's
1097 elements, in particular the Semantic Analizer and the Code
1098 Generator. Every class that inherits from AST will have a Visit
1099 method, that method will receive a Visitor and a object as
1100 parameters, the only thing that it'll do is letting the Visitor
1101 call the respective method VisitX, where X is the name of the
1102 currently visited class.
1104 * ASTList.cs:Added constructor, Add, Visit, ToString methods.
1106 * FunctionDeclaration.cs: Added constructor, Visit and ToString
1109 * jscript-lexer-parser.g: Added a ASTList as a parameter to the
1110 program (the main entry of the parser). Also added as parameters:
1111 - An AST to source_element.
1112 - A Statement to statement.
1113 - A VariableStatement to variable_statement.
1114 - A VariableStatement to variable_declaration_list.
1115 - A FormalParamerList by formal_parameter_list.
1116 - A ASTList by function_body.
1118 And now some rules return objects:
1119 - A VariableDeclaration by variable_declaration.
1120 - A Functiondeclaration by function_declaration.
1122 * driver.cs: Added the construction of the AST of the EcmaScript
1125 * Visitor.cs: Added this file. It's the visitor interface.
1127 * VariableDeclaration.cs: Added this class, it's the AST
1128 representation of a variable declaration.
1130 * Statement.cs: Added this file. It's the logical representation
1133 * VariableStatement.cs: Added this class. It's the AST
1134 representation of a chain of variable declarations.
1136 * FormalParameterList.cs: The function declaration needs to store
1137 its parameter, we will put them on this class.
1139 * SemanticAnalizer.cs: Added this class. I'll use the Visitor pattern in order to
1140 implement the semantic analysis and code generation
1141 phases. SemanticAnalizer and CodeGenerator will implement the
1142 Visitor interface, they will walk a program's
1143 AST tree and do their respective work.
1145 * IdentificationTable.cs: Added this class. The SymbolTable will be used
1146 by the SemanticAnalyzer in order to keep track of the variable
1147 declaration encountered, etc..
1149 * SymbolTable.cs: A simple hashtable but for commodity i'll call
1153 2003-05-03 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
1155 * jscript-lexer-parser.g:
1156 - Deleted the assignment_operator COMPOUND_ASSIGNMENT, and added
1157 MULTIPLICATION_ASSIGN, DIVISION_ASSIGN, REMAINDER_ASSIGN,
1158 ADDITION_ASSIGN, SUBSTRACTION_ASSIGN, SIGNED_LEFT_SHIFT_ASSIGN,
1159 SIGNED_RIGHT_SHIFT_ASSIGN, UNSIGNED_RIGHT_SHIFT_ASSIGN,
1160 BITWISE_AND_ASSIGN, BITWISE_OR_ASSIGN.
1161 - Changed INTERROGATION to CONDITIONAL.
1162 - Changed TRIANGLE to BITWISE_XOR.
1163 - Changed SLASH to DIVISION.
1164 - Changed PERCENT to REMAINDER.
1165 - Changed ADMIRATION to LOGICAL_NOT
1166 - Added BITWISE_NOT (~).
1167 - Added the INCREMENT and DECREMENT rules for
1168 left_hand_side_expression.
1169 - Increased lexer lookup from 2 to 4.
1170 - Redefined the definitions of: L_THAN, G_THAN, MINUS, TIMES,
1171 BITWISE_AND, BITWISE_OR,
1172 - Added operator: EQUALS, DOES_NOT_EQUALS, STRICT_EQUALS,
1173 REMAINDER, UNSIGNED_RIGHT_SHIFT.
1174 - Added the recursion rules for equality_expression.
1175 - Added the recursion rules for shift_expression.
1177 - The most important thing, added support for expressions like:
1180 2003-04-20 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1183 - Erased the Context class, it was used for the first
1184 test of the print_statement and Reflection.Emit. As I erased the
1185 Program, SourceElements, SourceElement from the ANTLR grammar (for
1186 the rework of the AST tied to the MS JScript public API), I erased
1188 - Erased the methods: EmitJScript0Type, EmitJScript0Cons,
1189 EmitGlobalCode, EmitJScript0, EmitJScriptMainType,
1190 EmitJScriptMainCons, EmitJScriptMainFunction, EmitJScriptMain,
1193 * jscript-lexer-parser.g:
1194 - Erased the references to the classes Program, SourceElements,
1195 SourceElement, Statement, FunctionDeclaration and erased
1196 print_statement rule.
1198 * JSCriptLexer.cs JScriptParser.cs and the other files generated
1199 by antlr, reflect changes from the grammar changes.
1201 2003-04-19 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1202 * Added stubs for the classes:
1205 ActiveXObjectConstructor.cs
1209 AssemblyCustomAttributeList.cs
1214 BooleanConstructor.cs
1222 EnumeratorConstructor.cs
1228 FunctionConstructor.cs
1229 FunctionDeclaration.cs
1230 FunctionExpression.cs
1234 IActivationObject.cs
1240 JSFunctionAttribute.cs
1241 JSFunctionAttributeEnum.cs
1246 LenientGlobalObject.cs
1248 NumberConstructor.cs
1250 ObjectConstructor.cs
1252 RegExpConstructor.cs
1257 StringConstructor.cs
1262 VBArrayConstructor.cs
1267 2003-04-11 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1269 * jscript-lexer-parser.g:
1270 - Added rules for: continue_statement, break_statement,
1271 return_statement, throw statement (all of them do not ensure that
1272 no LineSeparator appears between the keyword on the left and the
1273 identifier, expression or semicolon on the right, that must be fixed).
1274 - Added single line comments rule.
1276 2003-04-08 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1278 * jscript-lexer-parser.g: Added syntatic rule for:
1280 - while and for-in subrules of iteration_statement.
1281 - Added array_literal - got tricky - I just could get the simplest rule going :)
1285 2003-04-08 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1287 * jscript-lexer-parser.g:
1288 - Syntatic rule for iteration_statement.
1289 - "do" subrule for it.
1290 - Added ((L_THAN | G_THAN | LE_THAN | GE_THAN | "instanceof" |
1291 "in") relational_expression | ) rule to relational_expression.
1292 -Added function_expression syntatic rule.
1293 - Added STRING_LITERAL to literal rules.
1294 - "Less/Greater or equal than" lexer rule.
1296 2003-04-03 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1298 * jscript-lexer-parser.g: Added switch_statement rule, case_block, case_clauses, case_clause, default_clause, labelled_statement, try_statement, catch_exp, finally_exp.
1300 2003-04-01 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1302 * jscript-lexer-parser.g: Added the grammar rules for: with_statement, object_literal, ( expression ), property_name_and_value_list, property_name and expression.
1305 2003-03-30 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1307 * Added a README file. Explains the dependencies and build process.
1309 2003-03-30 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1311 * Added this ChangeLog file.
1313 * ast.cs: Added this file. Contains the classes used for building
1314 the EcmaScript 's AST.
1316 * JScript*: These are the files generated by antlr (the parser generator).
1318 * TODOAttribute.cs: Changed the namespace in order to use it freely on Microsoft.JScript.
1320 * driver.cs: Added this file. Contains the compiler entry point. And some Reflection.Emit methods,
1321 that will be moved to other file in the future.
1323 * jscript-lexer-parser.g: The EcmaScript's antlr grammar.