* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / Microsoft.JScript / Microsoft.JScript / ChangeLog
1 2006-07-26  César Octavio López Natarén  <cesar.nataren@gmail.com>
2
3         * JScriptCodeGenerator.cs, JScriptCodeProvider.cs: Use
4         implementation from Akiramei (mei@work.email.ne.jp).
5
6 2006-06-08  Cesar Lopez Nataren  <cesar.nataren@medsphere.com>
7
8         * Added the NPL license (as that's the header the original java
9         files have) header to Token.cs, TokenStream.cs, Parser.cs and
10         Decompiler.cs to avoid confusion. Also, the notice has always been
11         stated in mcs/LICENSE that:
12
13         "The Microsoft.JScript assembly is covered by the
14         MIT X11 and the Mozilla MPL license as it contains
15         ported pieces of code from Rhino, the Mozilla JavaScript
16         implementations" 
17
18         And we include mcs/LICENSE.MPL  
19
20 2006-04-18  Cesar Lopez Nataren  <cesar.nataren@medsphere.com>
21
22         * TokenStream.cs: Ciao to_string.
23
24 2006-04-18  Miguel de Icaza  <miguel@novell.com>
25
26         * TokenStream.cs: kill to_string method, it was one inneficient
27         way of turning char [] into strings.  Use the proper String
28         constructor for that. 
29
30 2006-01-25  Cesar Lopez Nataren  <cnataren@novell.com>
31
32         * FunctionExpression.cs: Set the prefix at resolve time not at
33         constructor time. Solves a bug related to the use of nested
34         FunctionExpression's.
35
36 2006-01-24  Cesar Lopez Nataren  <cnataren@novell.com>
37
38         * ast.cs (Function.set_prefix): use InFunction and
39         GetContainerFunction for retrieving the container function.
40
41         * Statement.cs (Return): Implement ICanModifyContext as can return
42         a FunctionExpression.
43
44         * FunctionDeclaration.cs: Erase unused method Init.
45
46 2006-01-18 Evan Briones <evan@evanbriones.com>
47
48         * GlobalObject.cs: parsefloat in ms.net version returns NaN for text strings.
49           If a match is found the regular expression returns its value. Otherwise the
50           value of the object is retained. Previously it would return an empty string if 
51           nothing matched making. Double.TryParse would then return 0.
52           Example of this returning NaN : var isnan = 'hello'; print (parseFloat(e));
53           Example of it returning 0 : var iszero = 'string'; print (parseFloat (iszero));
54           We behave like Rhino.
55
56 2006-01-17  Cesar Lopez Nataren  <cnataren@novell.com>
57
58         * Parser.cs: Propagate the proper parent.  Fixes #75166.
59
60         * ast.cs: Added virtual method PropagateParent for recovering a
61         lost parent or set it up properly if previously set to null.
62
63         * Statement.cs (If,Jump,Break.PropagateParent): recover
64         the proper parent.
65
66         * expression.cs (Binary.emit_access): Emit late binding code for
67         member's access that maps to MemberTypes (like Math.pow). Fixes
68         #72440.
69
70 2006-01-13  Cesar Lopez Nataren  <cnataren@novell.com>
71
72         * ForIn.cs: implement for (x in obj) logic.
73
74 2006-01-11  Cesar Lopez Nataren  <cnataren@novell.com>
75
76         * Parser.cs (StatementHelper): Avoid null reference exception
77         using the new EmptyAST node in case we have an empty stm (Token.SEMI).
78
79 2006-01-10  Cesar Lopez Nataren  <cnataren@novell.com>
80
81         * Empty.cs: Add internal type EmptyAST.
82
83         * Parser.cs: Avoid creating a ForIn object when we only have empty
84         condition, test or increment expressions in the loop.
85
86 2006-01-08  Cesar Lopez Nataren  <cnataren@novell.com>
87
88         * SemanticAnalizer.cs, Import.cs: No longer use the Mono.CSharp
89         stuff; we lookup for the namespaces in our code (stolen from mcs
90         source code though :)
91         
92         * Namespace.cs: Handle the namespace lookup here.
93
94 2005-12-15  Cesar Lopez Nataren  <cnataren@novell.com>
95
96         * Parser.cs: Use the new assign ctr and Init method.
97         * expression.cs (Assign): Modify the number of ctr and added the Init method.
98         * BinaryOp.cs: Add setter for left.
99
100         * Statement.cs (For.Emit): Take into account what relational
101         operator is in place.
102
103         * expression.cs (Assign.Emit): Emit box in the op= cases.
104
105 2005-12-10 Florian Gross  <flgr@ccan.de> and
106            Evan Briones <evan@evanbriones.com>
107
108         * ForIn.cs (JScriptGetEnumerator) : Returns a new IEnumerable GetEnumerator.
109         
110         * JSObject.cs (JSObjectEnumerator) : Enumerates the property names.
111         
112         * JScriptException.cs : Added NotCollection exception.
113         
114         * Convert.cs (ToForInObject): If value isn't null
115         returns GlobalObject.Object.CreateInstance(value)
116         
117         * LateBinding.cs : Added StringObject for getting and setting
118         object property
119
120 2005-12-10  Cesar Lopez Nataren  <cnataren@novell.com>
121
122         * CodeGenerator.cs: Add EmitAssignAsExp.
123
124         * expression.cs: Take care of uses of assigment in a expression
125         context; we must save the right-side value in a local and then
126         load the local. Added  Assign.EmitAndReturnBuilder.
127         
128 2005-11-25  Cesar Lopez Nataren  <cnataren@novell.com>
129
130         * With.cs (JScriptWith): Use Convert.Object before we cast to
131         ScriptObject as literals fail to be put in the scope chain's
132         front.
133
134         * expression.cs (Call.Emit): implement the case when the invoked
135         method at call is a property.
136
137         * Latebinding.cs: return null in case we don't mach anything.   
138
139 2005-11-22  Cesar Lopez Nataren  <cnataren@novell.com>
140
141         * Statement.cs (Return.Resolve): Added field exp_returns_void
142         which allow us to return a method call as the return expression
143         value even when the method call returns void; we emit null in such
144         a case.
145
146         * ast.cs (Function): switch from 'protected' to 'internal'
147         property HandleReturnType.
148
149 2005-11-21  Cesar Lopez Nataren  <cnataren@novell.com>
150
151         * Statement.cs (class Switch): Preserve the value of
152         EmitContext.LoopEnd as can be overriden in nested blocks, for
153         example in a switch statement inside a for-loop.
154
155 2005-10-28  Raja R Harinath  <rharinath@novell.com>
156
157         * Import.cs (Resolve): Update to changes in GMCS.
158         * SemanticAnalizer.cs (ComputeNamespace): Likewise.
159
160 2005-10-23  Florian Gross  <flgr@ccan.de>
161
162         * LateBinding.cs: Changed to accept object instead of ScriptObject in a lot of places
163         
164 2005-10-23  Raja R Harinath  <harinath@gmail.com>
165
166         * Import.cs (Resolve): Update to changes in MCS code.
167
168 2005-10-11  Cesar Lopez Nataren  <cnataren@novell.com>
169
170         * CodeGenerator.cs (CodeGenerator): EmitRelationalComp handle 'in'
171         operator case.
172
173         * Add support for multiple files compilation. This involved addig
174         an extra pass into the AST for ensuring the resolve process, this
175         pass is named PopulateContext. The AST nodes that implement
176         ICanModifyContext call PopulateContext.
177
178         * IdentificationTable.cs: Added class Environment, which is a
179         symbol table which takes into account namespace info, this is for
180         package statement future implementation.
181
182 2005-09-30  Cesar Lopez Nataren  <cnataren@novell.com>
183
184         * expression.cs (Expression::Resolve): check if we have an
185         assigment in a chain of expressions and stms, it fixes
186         #75801, and give us 660 more successful tests.
187
188 2005-09-13  Cesar Lopez Nataren  <cnataren@novell.com>
189
190         * SemanticAnalyser.cs: Add field assemblies. Run now receives the
191         assembly's array, add method ComputeNamespaces,
192         * Parser.cs: Add support for the 'import' statement. Add field
193         code_items, new constructor, methods ParseAll and Import.
194         * Import.cs: Implement Resolve and Emit methods.
195         * ScriptBlock.cs: Add default ctr.
196
197 2005-09-11  Cesar Lopez Nataren  <cnataren@novell.com>
198
199         * expression.cs (Identifier::emit_undeclared_assignment): Fix
200         small regression related to the value/refs patch. All works again
201         for undeclared variables.
202
203 2005-09-09  Cesar Lopez Nataren  <cnataren@novell.com>
204
205         * SemanticAnalyser.cs, expression.cs (Unary): Fixes for delete
206         operator.
207
208 2005-09-08  Cesar Lopez Nataren  <cnataren@novell.com>
209
210         * Relational.cs: The loading of true or false it's generated by
211         EmitRelationalComp not in Relational.Emit as is not always needed.
212         * CodeGenerator.cs: Add EmitRelationalComp.
213         * expression.cs (Args.Emit, emit_default_args_case): take care of
214         Relational operator case.
215
216 2005-09-06  Florian Gross  <flgr@ccan.de>
217
218         * ObjectPrototype.cs: Implemented better working hasOwnProperty
219         * In.cs: Implemented JScriptIn
220         * LateBinding.cs: Added LateBinding.Delete, HasObjectProperty,
221         DirectHasObjectProperty
222
223 2005-09-06  Cesar Lopez Nataren  <cnataren@novell.com>
224
225         * CodeGenerator.cs (GetBoxType): Take into account the case where
226         the type is relational whose operator is In.
227
228 2005-09-02  Cesar Lopez Nataren  <cnataren@novell.com>
229
230         * SemanticAnalyser.cs: Added IsDeletable, check if a property is
231         in an object's constructor.
232         * CodeGenerator.cs: Added JSToken.Delete to GetBoxType.
233         * expression.cs: (Unary) Added field deletable. Take care of the
234         case when the property that we are trying to delete is not
235         deletable, we use late binding's method Delete for that. (Binary)
236         Added property IsDeletable. (Args) Do not pop the values of
237         arguments which implement Exp.
238
239 2005-08-28  Florian Gross  <flgr@ccan.de>
240
241         * Try.cs: Implemented JScriptExceptionValue
242         * DateConstructor.cs: Adjusted rounding of date values
243         * RegExpPrototype.cs: Truncates lastIndex before using it
244         * With.cs: Implemented JScriptWith -- can't test this yet because
245         of compiler bugs
246         * ErrorPrototype.cs: Adjusted toString (no ClassName)
247         * JScriptCodeGenerator.cs: Implemented CreateEscapedIdentifier,
248         CreateValidIdentifier, GenerateAssignStatement, GenerateComment,
249         GenerateConditionStatement, GenerateMethodReturnStatement,
250         GenerateThisReferenceExpression, GenerateThrowExceptionStatement,
251         GenerateVariableDeclarationStatement, IsValidIdentifier,
252         QuoteSnippetString. Added dont_write_semicolon, GetSafeName,
253         FillKeywordTable, keywords. Most of this is very similar to the
254         implementation of the C# CodeGenerator
255         * DatePrototype.cs: prototype's time value is NaN, not 0
256         * Closure.cs: Sets _prototype from func
257         * FunctionObject.cs: Changed prototype of user functions 
258         * ErrorObject.cs: Added GetDefaultValue
259         * GlobalObject.cs: parseFloat handles whitespace correctly.
260         Various bug fixes for parseInt
261         * RegExpObject.cs: lastindex changed to double (was int)
262
263 2005-08-19  Cesar Lopez Nataren  <cnataren@novell.com>
264
265         * SemanticAnalyser.cs: Added ArrayLiteral, StringLiteral,
266         BooleanConstant, ByteConstant, ShortConstant, IntConstant,
267         LongConstant, FloatConstant, DoubleConstant to the
268         prototypes. Added methods IsNumericConstant, NeedsToBoolean.
269
270         * Parser.cs: Added methods InRangeOf, HasNoDecimals which help on
271         building the property AST node depending on how big and precise
272         the number is.
273
274         * CodeGenerator.cs: (emit_get_default_this) Receives an extra
275         argument which indicates if we are inside a method, use
276         load_engine. Added method EmitBox, EmitConv, GetBoxType
277
278         * Literal.cs: Add abstract class Constant. Renamed BooleanLiteral
279         to BooleanConstant. Delete NumericLiteral, handle the number code
280         generation properly categorizing in ByteConstant, ShortConstant,
281         IntConstant, LongConstant, FloatConstant and DoubleConstant which
282         inherit from NumericConstant. (ObjectLiteral) Handle boxing issue.
283
284         * Statement.cs, Relational.cs: (If) Handle boxing issue.
285
286         * VariableDeclaration.cs: Handle the boxing issue when
287         we have initializers.
288
289         * Equality.cs, StrictEquality.cs: Handle the boxing issue before invoking
290         EvaluateEquality, JScriptStrictEquals.
291
292         * ArrayLiteral.cs: Implement ICanLookupPrototype so we can
293         optimize access to methods through the prototype and not
294         generating IL code that uses late binding. Handle the boxing
295         issue.
296
297         * expression.cs: (Unary.Emit) Nuke emit_unary_op. Take care of
298         properly boxing the operands of methods that evaluate the unary
299         operators at runtime. Fix the minus logic for IL generation, add
300         method emit_non_numeric_unary. Optimize the numeric
301         cases. (Binary) Add LateBinding internal
302         property. (Binary.emit_late_get_or_set, emit_array_access,
303         Conditional.Emit, Call.Emit, emit_print_stm, emit_late_call,
304         setup_late_call_args, EmitBuiltInArgs, Identifier.Emit, Args.Emit,
305         Expression.Emit, Assign.Emit, New.Emit)
306         Take care of properly boxing the built in .NET
307         values. (force_strong_type) Change the type from ParameterInfo to
308         object, take care specifically. (Expression) Add Last internal
309         property. In general, the point is that value types like integers,
310         booleans, etc... do not have to generate a box operation, the user
311         of the arg must handle that.
312
313 2005-08-17  Florian Gross  <flgr@ccan.de>
314
315         * ScriptObject.cs: Added settable _proto for __proto__. This isn't
316         currently exposed to JScript, but set by
317         FunctionConstructor.CreateInstance. Moved AddField, ClassName,
318         proper_array_index up from JSObject
319         * Constructors: Added _length
320         * JSObject.cs: Moved AddField, ClassName, proper_array_index up to
321         ScriptObject. Added precaching of prototype fields
322         * PostOrPrefixOperator.cs: EvaluatePostOrPrefix correctly promotoes
323         old value to number. Implemented ++obj.a and obj["a"]--
324         * ActivationObject.cs: Added GetMemberValue
325         * expression.cs: Added logic for undeclared variables from cesar and
326         got it to work
327         * ObjectPrototype.cs: toString works on ScriptObjects now
328         * JScriptException.cs: Added extra_data for adding details to the
329         built-in messages
330         * IdentificationTable.cs: Adjusted internal name mapping logic
331         * Bindings.cs: Added stubbed IsMissing
332         * JSFieldInfo.cs: Added SetValue with Binder and CultureInfo stub
333         * Convert.cs: Added IsBoolean, implemented ToString for GlobalScope
334         * LateBindings.cs: Added name, obj constructor. Heavily refactored
335         by adding GetObjectProperty, TryDirectGetObjectProperty,
336         TryGetNativeProperty, DirectSetObjectProperty, TrySetNativeProperty
337         and changed methods to use them. We now do prototypes correctly in
338         general which also slows us down. MapToInternalName does
339         substituation of $ to dollar_. Implemented a simple property cache
340         * BooleanPrototype.cs: Better implementations of toString, valueOf
341         * Parser.cs: Fixed parsing of "in" keyword in argument lists
342         * FunctionPrototype.cs: Works with all ScriptFunctions
343         * RegExpObject.cs: Added extra data to RegExpSyntax exception
344         * GlobalScope.cs: Initializes elems, removed redundant AddField
345         override and implemented stub GetField with lex level
346         * ScriptFunctions.cs: Correctly sets __proto__ on result
347
348 2005-08-13  Florian Gross  <flgr@ccan.de>
349
350         * DateConstructor.cs, StringConstructor.cs, ObjectConstructor.cs,
351         NumberConstructor.cs, FunctionConstructor.cs, BooleanConstructor.cs,
352         ArrayConstructor.cs, RegExpConstructor.cs, ErrorConstructor.cs:
353         Added name
354         * ScriptObject.cs: Added HasMethod, CallMethod uses
355         SemanticAnalyser.map_to_prototype and forwards engine
356         * ArrayPrototype.cs: Implemented sort, added SortHelper
357         * expression.cs: Implemented delete operator code generation
358         * NumericUnary.cs: Implemented EvaluateUnary (currently unused)
359         * ObjectPrototype.cs: smartToString falls back to toString instead
360         of duplicated code
361         * StringPrototype.cs: Fixed replace logic for replacement functions
362         * FunctionDeclaration.cs: More user function infrastructure
363         * FunctionObject.cs: Implemented ToString for user functions. Moved
364         name, return_type, parameters, ToString up to ScriptFunction.
365         Constructors set _prototype
366         * Closure.cs: More user function infrastructure
367         * Convert.cs: ToString Uses smartToString if no custom toString
368         exists
369         * BooleanObject.cs: Constructor now uses Convert.ToBoolean
370         * LateBindings.cs: GetMethodFlags logic for anonymous functions.
371         Initial implementation of DeleteMember. Implemented constructor
372         cases in Call and CallValue
373         * Relational.cs: Implemented EvaluateRelational, JScriptCompare
374         * Parser.cs: Fixed bugs in decompiler calls so that the decompiled
375         source code matches the original one
376         * FunctionPrototype.cs: Fixed toString function check
377         * Decompiler.cs: Adjusted indent properties. Made AddEOL not add
378         semicolons to lines which already end with one. Implemented double
379         literal logic
380         * SemanticAnalyser.cs: Added more prototype mappings
381         * ErrorConstructor.cs: Added ErrorTypeToName
382         * FunctionExpression.cs: More user function infrastructure
383         * ScriptFunction.cs: Added vsa_engine. Moved name, return_type,
384         parameters, encodedSource, ToString up from FunctionObject.
385         Implemented CreateInstance. Added initial setter for prototype.
386         Added GetDefaultValue
387
388 2005-08-09  Florian Gross  <flgr@ccan.de>
389
390         * BitwiseBinary.cs: Implement LeftShift, RightShift and
391         UnsignedRightShift evaluation. Add method UnsignedRightShift.
392         * Token.cs: Added field PrintNames, Add flag ignore_error to
393         method Name.
394         * Decompiler.cs: Fixes for >>> implementation. Clean up the port.
395         
396 2005-08-09  Cesar Lopez Nataren  <cnataren@novell.com>
397
398         * Parser.cs: Added infrastructure for closure construction support
399         per Florian Gross and Miguel request ;-)
400         * Decompiler.cs: Added to the repository.
401
402 2005-08-04  Jb Evain  <jbevain@gmail.com>
403
404         * CodeGenerator.cs: write a valid RequestAttribute on the assembly
405
406 2005-08-03  Florian Gross  <flgr@ccan.de>
407
408         * ScriptObject.cs: Renamed __proto__ to proto for 1.1 compatibility
409         * expression.cs: Uses LateBinding.MapToInternalName to map __proto__
410         to proto
411         * StringPrototype.cs: replace doesn't use anonymous delegate anymore
412         for 1.1 compatibility
413         * JScriptException.cs: Added another case to ErrorMessage.
414         * IdentificationTable.cs: Uses LateBinding.MapToInternalName to map
415         __proto__ to proto
416         * LateBinding.cs: Added MapToInternalName and changed code to use it.
417         Fixed type mapping with varargs. Unwraps Closure objects to
418         FunctionObjects. Fixed bug in SetField logic
419         * JSObject.cs: Added ClassName for RegExpObject
420         * ArrayPrototype.cs: More uint / int fixes for concat, splice,
421         unshift
422         * StringConstructor.cs: String() ought to be "undefined"
423         * JScriptException.cs: Added code for user exceptions (eg. throw "x")
424         * FunctionObject.cs: Implemented length for user functions
425         * Convert.cs: uint / uint fix for Convert.ToNativeArray
426         * Throw.cs: Implemented JScriptThrow
427         * FunctionPrototype.cs: Correctly throws JSError.FunctionExpected
428         instead of NotImplementedException
429         * ScriptFunction.cs: Added arity as an alias for length (Mozilla)
430
431 2005-08-02  Cesar Lopez Nataren  <cnataren@novell.com>
432
433         * TokenStream.cs: Display source name and line number.
434         * SemanticAnalizer.cs: Added StringLiteral to prototypes.
435         * Parser.cs: Added Location class, which tracks the SourceName and
436         line number. Build every node from the AST tree with location info.
437         * CodeGenerator.cs: Add emit_default_value.
438         * expression.cs: (Binary.Resolve) Fix for calling directly the
439         method from the prototype if the lhs binary expression is a
440         literal, added ICanLookupPrototype interface. Display the source
441         file name and line number in the errors. (Call) Added field
442         need_this, simplify the logic infering the exact number of
443         parameters from the called method. Added NeedThis. Re-implement
444         Resolve and Emit from Args, delete DesiredNumOfArgs, IsPrint,
445         has_var_args. Added Size, emit_default_args_case. Added location
446         field to FunctionObject. StringLiteral implements ICanLookupPrototype.
447         Fix typo from IAccessible :).
448
449         * All classes that inherit from abstract class AST: Use
450         constructor from AST that stores the parent and the new info from
451         Location.       
452
453 2005-08-01  Cesar Lopez Nataren  <cnataren@novell.com>
454
455         * Statement.cs (Catch.Emit): Fix for properly emit code for
456         loading the script engine.
457
458 2005-07-29  Cesar Lopez Nataren  <cnataren@novell.com>
459
460         * All files at current dir: set svn:eol-style to native.
461
462 2005-07-28  Florian Gross  <flgr@ccan.de>
463
464         * DateConstructor.cs: Sets _prototype. Added DateMod. MakeDay,
465         IsLeapYear, DaysInYear, WeekDay, HourFromTime, MinFromTime,
466         SecFromTime, msFromTime use DateMod (important for negative date
467         values!)
468         * ScriptObject.cs: Added implementation of proprietary __proto__
469         * JSObject.cs: Added more ClassName cases and fixed old ones.
470         GetDefaultValue uses smartToString instead of toString
471         * ArrayPrototype.cs: Added Proto. Switched indices and length values
472         to use uint instead of int so we can represent the full Array size
473         range from ECMA-262
474         * StringConstructor.cs: Sets _prototype
475         * ObjectConstructor.cs: Sets _prototype
476         * RegExpPrototype.cs: Added Proto. Uses uint instead of int for
477         RegExpMatch length and indices
478         * NumberConstructor.cs: Sets _prototype
479         * expression.cs: force_strong_type always uses ToNumber (fixes
480         broken arguments for Math.pow and so on)
481         * ObjectPrototype.cs: Added Proto. toString is dumb and will output
482         [object Array] when called on an Array instead of using
483         ArrayPrototype.toString. Added smartToString which does the old
484         behavior
485         * StringPrototype.cs: Added Proto. Uses uint instead of int for
486         arrays
487         * JScriptException.cs: Added more cases to Message
488         * ArrayObject.cs: Switched to uint for indices and length
489         * FunctionConstructor.cs: Sets _prototype
490         * Equality.cs: Rewrote equality logic. More cases covered, less code
491         * DatePrototype.cs: Added Proto
492         * Convert.cs: Added ToUint32. ToNumber with Arrays switched to uint
493         * StrictEquality.cs: Added logic for function equality
494         * StringObject.cs: Initializes value to "". Implemented Equals
495         * LateBinding.cs: More cases covered. Added logic for converting
496         arguments to match the signature. Added SetArrayLength. Refactored
497         to use SetArrayLength
498         * BooleanPrototype.cs: Added Proto and empty implementation of
499         constructor
500         * BooleanConstructor.cs: Sets _prototype
501         * FunctionPrototype.cs: Added Proto
502         * NumberPrototype.cs: Added Proto
503         * ArrayConstructor.cs: Sets _prototype
504         * SemanticAnalizer.cs: Added constructor and prototype information
505         to prototypes lookup table
506         * RegExpConstructor.cs: Sets _prototype
507         * ScriptFunction.cs: Added _prototype and implemented prototype
508         using it. Implemented Equals for built-in functions
509
510 2005-07-28  Cesar Lopez Nataren  <cnataren@novell.com>
511
512         * expression.cs (emit_access): Take into account that __proto__
513         property (Mozilla extension) is contained in ScriptObject.
514
515 2005-07-27  Cesar Lopez Nataren  <cnataren@novell.com>
516
517         * SemanticAnalizer.cs: Added Boolean/BooleanConstructor and
518         Function/FunctionConstructor. Delete method Dump.
519         
520 2005-07-25  Cesar Lopez Nataren  <cnataren@novell.com>
521
522         * SemanticAnalizer.cs: Added Object/ObjectConstructor to the obj_ctrs.
523         * expression.cs: Fixes error for cases like Constructor.Property.
524         * SemanticAnalizer.cs: Added Array/ArrayConstructor to the ctrs.
525
526 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
527
528         * IdentificationTable.cs: Fixed build.
529
530 2005-07-24  Florian Gross  <flgr@ccan.de>
531
532         * DateConstructor.cs: CreateInstance handles Infinity, NaN and double
533         with decimal places correctly and won't fail when trying to get the
534         timezone offset for invalid values anymore. LocalTime keeps the date
535         in the correct timezone
536         * ScriptObject.cs: Moved GetField from JSObject.cs. CallMethod can be
537         used to call ObjectPrototype methods on objects of derived prototypes.
538         * JSObject.cs: Implemented SetMemberValue2, more cases for ClassName,
539         added avoid_toString argument to GetDefaultValue to avoid infinite
540         recursion from ObjectPrototype:toString
541         * ArrayPrototype.cs: Fixed pop, shift to work with the auto-popping
542         ArrayObject:length setter. Implemented toLocaleString
543         * ObjectConstructor.cs: Refactored to use Convert.ToObject. Invoke
544         works with null / undefined argument
545         * StringConstructor.cs: Handles Object []
546         * RegexpPrototype.cs: exec made aware of $_ and UpdateLastMatch
547         * JScriptInstanceOf.cs: Implemented JScriptInstanceof
548         * NumberConstructor.cs: Handles Object []
549         * ObjectPrototype.cs: toString uses GetDefaultValue if available
550         * StringPrototype.cs: match uses UpdateLastMatch, replace works with
551         replacement function, split handles max_count correctly in all cases
552         and calls UpdateLastMatch and handles no match case correctly
553         * IdentificationTable.cs: CreateSymbol mangles "$" to "dollar_" so
554         we can support RegExp.$1, Enter handles case where symbol exists
555         already so that  function foo (a, b, a) { }  works
556         * ArrayObject.cs: length setter pops elements if new size < old size
557         * ErrorPrototype.cs: Implemented constructor, toString
558         * JSFieldInfo.cs: Implemented Name
559         * DatePrototype.cs: Made toDateString, toLocaleDateString,
560         toLocaleString, toLocaleTimeString, toString, toUTCString handle
561         invalid date value cases
562         * NumericBinary.cs: Refactored to use Convert.ToNumber
563         * Convert.cs: Refactored ToBoolean, ToInt32, ToNumber, ToObject to
564         use IsNumberTypeCode. Added more object cases to ToNumber. ToNumber
565         with string correctly choses parseInt or parseFloat instead of always
566         using parseFloat. Implemented ToNativeArray. Added more cases to
567         ToObject. Fixed ToString with double to be more standards conform
568         * StringObject.cs: Implemented length getter
569         * LateBinding.cs: Added GetMethodFlags, GetRequiredArgumentCount.
570         Made assemble_args ignore trailing unneeded arguments and handle
571         methods that don't have a thisObj argument. Added Invoke logic for
572         Closure, FunctionObject and RegExpObject. Made GetNonMissingValue
573         work correctly for GlobalScope. Correctly sets length when adding
574         index properties to ArrayObjects. Implemented SetValue
575         * GlobalObject.cs: Implemented escape, Function, unescape. Made
576         parseFloat ignore some leading / trailing garbage
577         * FunctionPrototype.cs: Implemented apply, call
578         * RegExpObject.cs: ToString handles empty RegExp case correctly.
579         Initialize made aware of $*. Implemented GetDefaultValue
580         * TokenStream.cs: Handle overflows from float literals
581         * ErrorConstructor.cs: Added ErrorTypeToClass, implemented
582         CreateInstance
583         * RegExpConstructor.cs: RegExpConstructor adds fields for $_,
584         $&, $+, $`, $', $*. Added UpdateLastMatch. Invoke handles zero
585         argument case. Added getters for $1 to $9. Implemented input,
586         lastMatch, lastParen, leftContext, rightContext, multiline
587         * ScriptFunction.cs: Implemented length getter and setter
588
589         * SyntaxErrorObject.cs, ReferenceErrorObject.cs,
590         TypeErrorObject.cs, ErrorObject.cs, EvalErrorObject.cs,
591         RangeErrorObject.cs, URIErrorObject.cs: Added new ctr, which is used at
592         ErrorConstructor::CreateInstance.
593         
594         * expression.cs: Use Missing.Value for missed parameters in method
595         invocations.
596         
597 2005-07-17  Florian Gross  <flgr@ccan.de>
598
599         * DateConstructor.cs: Implemented UTC
600         * ScriptObject.cs: Implemented GetMethod, CallMethod
601         * JSObject.cs: Implemented fallback ToString, more ClassName cases and
602         fallback GetDefaultValue
603         * ArrayPrototype.cs: Fixed concat, join and added splice
604         * RegExpPrototype.cs: Implemented compile, exec, test
605         * expression.cs: Emit JS undef instead of JS null for missing args.
606         * StringPrototype.cs: changed lastIndexOf to be compatible with JSC.
607         Implemented match, replace (no replacement closure), search, split.
608         No longer uses assert_type for ensuring right type of thisObj
609         * ArrayObject.cs: Better length argument handling in constructor. Added
610         SpliceSlowly
611         * DatePrototype.cs: Added setDate, setFullYear, setHours, setMinutes,
612         setMilliseconds, setMonth, setSeconds, setTime, setUTCDate,
613         setUTCFullYear, setUTCHours, setUTCMinutes, setUTCMilliseconds,
614         setUTCMonth, setUTCSeconds, setYear
615         * FunctionObject.cs: Moved MethodAttributes to ScriptFunction. Added
616         MethodInfo-taking constructor
617         * Convert.cs: Added IsNumber, IsString, ToRegExp. More cases in
618         ToNumber. Refactored ToString
619         * ScriptEquality.cs: More cases
620         * LateBindings.cs: Big refactoring. Introduced assemble_args. Handles
621         missing arguments. build_args can pass null as engine. More CallValue,
622         GetNonMissingValue cases
623         * Plus.cs: Heavily refactored EvaluatePlus from 90 to 12 lines
624         * GlobalObject.cs: Added CollectGarbage
625         * NumberPrototype.cs: No longer uses assert_type for unsuring right
626         type of thisObj
627         * RegExpObject: Added lastIndex, Initialize, stores compiled Regex
628         * SemanticAnalizer: Added missing prototypes. Made assert_type work
629         with derived types
630         * ScriptFunction.cs: Moved MethodAttributes from FunctionObject. Added
631         MethodInfo. Implemented Invoke for built-in functions.
632
633 2005-07-07  Florian Gross  <flgr@ccan.de>
634
635         * MathObject.cs: Implemented max and min (untested)
636         * ObjectConstructor.cs: Implemented Invoke
637         * StringConstructor.cs: Implemented Invoke and fromCharCode
638         * PostOrPrefixOperator.cs: Implemented EvaluatePostOrPrefix
639         * NumberConstructor: Implemented CreateInstance and Invoke
640         * expression.cs: Implemented unary operators void, +, -, !, ~ and !
641         * ArrayPrototype.cs: Implemented concat, push and unshift
642         * DatePrototype.cs: Implemented getDate, getDay, getFullYear, getHours,
643         getMilliseconds, getMinutes, getMonth, getSeconds, getTime,
644         getTimezoneOffset, getUTCDate, getUTCDay, getUTCFullYear, getUTCHours,
645         getUTCMilliseconds, getUTCMinutes, getUTCMonth, getUTCSeconds,
646         getVarDate, getYear, toDateString, toGMTString, toLocaleDateString,
647         toLocaleString, toLocaleTimeString, toString, toTimeString,
648         toUTCString and valueOf
649         * ObjectPrototype.cs: Implemented toLocaleString and valueOf
650         * StringPrototype.cs: Implemented substr and concat
651         * Convert.cs: Implemented ToPrimitive, ToBoolean and ToUint16. Added
652         more cases to IsNumberTypeCode, IsFloatTypeCode and ToInt32. Fixed
653         ToString with doubles
654         * Plus.cs: Added more cases. Fixed endless loop for unknown types via
655         ugly goto
656         * ArrayObject.cs: Added GetDefaultValue
657         * NumberObject.cs: Added GetDefaultValue
658         * StringObject.cs: Added GetDefaultValue
659         * BooleanObject.cs: Added GetDefaultValue
660         * GlobalObject.cs: Fixed parseFloat. Added parseInt and ScriptEngine*
661         functions
662         * JSObject.cs: Implemented abstract GetDefaultValue
663         * BitwiseBinary.cs: Implemented &, ^ and | operators
664         * BooleanConstructor.cs: Implemented Invoke
665         * DateConstructor.cs: Implemented infrastructure for DatePrototype.
666         Note: YearFromTime is ported from Rhino. Also implemented Invoke and
667         CreateInstance.
668         * NumberPrototype.cs: Implemented toFixed, toLocaleString and toString
669         * TokenStream.cs: Fixed locale dependant float parsing
670         * LateBinding.cs: Added proper support for varargs passing
671
672 2005-07-06  Cesar Lopez Nataren  <cnataren@novell.com>
673
674         * FunctionExpression.cs (build_closure): Use CodeGenerator.load_engine.
675
676         * Parser.cs: Restore pn as the parent.
677         * expression.cs: Added is_dynamic_function field to class
678         Call. It's not enough knowing if the parent is a
679         FunctionExpression/FunctionDeclaration, we must assure that we
680         are really inside a FunctionExpression/FunctionDeclaration in
681         order to know in which place is the engine. setup_late_call_args
682         and get_global_scope_or_this used the new field for loading the
683         engine.
684
685 2005-07-05  Cesar Lopez Nataren  <cnataren@novell.com>
686
687         * LateBinding.cs (CallValue): throw a NotImplementedException
688         instead of a returning null.
689
690         Fixes bug #75442
691         * FunctionExpression.cs (Emit): use InFunction instead of testing by hand.
692         * Parser.cs (MemberExpr): pass parent as the parameter not pn.
693         * expression.cs (get_global_scope_or_this): use
694         CodeGenerator.load_engine for loading the engine, and invoke
695         GetGlobalScope when the member_exp is a function expression.
696
697 2005-07-04  Cesar Lopez Nataren  <cnataren@novell.com>
698
699         Fixes bug #75440
700         * expression.cs (emit_late_get_or_set, emit_late_call): Take care the case where
701         the left hand side of a late bound expression is a literal.
702         * SemanticAnalizer.cs: Added IsLiteral method.
703
704 2005-07-02  Florian Gross  <flgr@ccan.de>
705
706         * ArrayPrototype.cs: Implemented pop, reverse, shift and slice
707         * StringPrototype.cs: Implemented anchor, big, blink, bold, charAt,
708         charCodeAt, fixed, fontcolor, fontsize, indexOf, italics, lastIndexOf,
709         link, localeCompare, slice, small, strike, substring, sup,
710         toLocaleLowerCase, toLocaleUpperCase, toLowerCase, toString, toUpperCase
711         and valueOf
712         * ArrayObject.cs: ArrayObject-ctor works correctly when first argument
713         isn't length and first element gets assigned to 0 slot correctly
714         * NumberObject.cs: Basic constructor / double value made internal
715         * Equality.cs: Added basic logic for TypeCode.Empty, DBNull, Boolean and
716         Char
717         * FunctionObject.cs: ToString matches that of MS JS.NET for internal
718         functions
719         * Convert.cs: IsNumberTypeCode and IsFloatTypeCode utility methods, basic
720         implementation of ToInt32 and ToNumber, more cases for ToString
721         * StrictEquality.cs: Initial working implementation
722         * LateBindings.cs: Call works for Methods that don't have HasEngine and
723         support for getting methods (as in "foo".link) in GetNonMissingValue
724         * Plus.cs: Added support for more types
725         * GlobalObject.cs: Implemented isNaN, isFinite and parseFloat
726         * FunctionPrototype.cs: Implemented toString
727         * NumberPrototype.cs: Implemented valueOf
728         * Globals.cs: Implemented ConstructArrayLiteral
729         * TypeOf.cs: Added more cases
730
731 2005-06-10  Cesar Lopez Nataren  <cnataren@novell.com>
732
733         * LateBinding.cs: Added field right_hand_side. Initial
734         implementation of Call. Added build_args method. Initial
735         implementation of GetNonMissingValue.
736         * Convert.cs (ToObject): Add return values for TypeCode.String,
737         TypeCode.Boolean, and TypeCode.Object.
738         * RegExpPrototype.cs (toString): Implemented.
739         * RegExpObject.cs: Implemented.
740         * RegExpConstructor.cs: Implement Construct, CreateInstance, and Invoke.
741
742 2005-06-06  Cesar Lopez Nataren  <cnataren@novell.com>
743
744         * expression.cs (emit_access): We can now access the properties
745         from the Global RegExp object, they were not being accesible
746         because they are properties not fields.
747
748 2005-05-31  Cesar Lopez Nataren  <cnataren@novell.com>
749
750         * SemanticAnalizer.cs: Add the global, non-constructable RegExp
751         constructor object to obj_ctrs so we can type-check its property
752         access as well as fixing the break showed at #74681 now the raise
753         the proper error code. Renamed method object_contains_method to
754         object_contains, and now we filter on instance members too.
755         * expression.cs: use new API from SemanticAnalizer.
756
757 2005-05-30  Cesar Lopez Nataren  <cnataren@novell.com>
758
759         * Literal.cs: (RegExpLiteral.Emit): Take care of attributes. "g" is
760         global, "i" is case-insensitive and "m" is multi-line.
761
762 2005-05-19  Cesar Lopez Nataren  <cnataren@novell.com>
763
764         * Parser.cs: Throw NotImplementedException for function
765         declarations that appear inside other statements
766         (FunctionType.ExpressionStatement declarations). Fix the
767         NullReferenceException from #74970. But now exposes #75002.
768
769 2005-05-18  Marek Safar  <marek.safar@seznam.cz>
770
771         * JScriptCodeGenerator.cs: Stubbed.
772         
773         * JScriptCodeProvider.cs: Implemented.
774
775 2005-05-17  Cesar Lopez Nataren  <cnataren@novell.com>
776
777         * SemanticAnalizer.cs: Add methods_with_outter_scope_refs and
778         methods_with_vars_used_nested hashtables.
779         AddMethodReferenceOutterScopeVar,  AddMethodVarsUsedNested,
780         MethodReferenceOutterScopeVar. OutterScopeVar,
781         MethodVarsUsedNested and VarUsedNested.
782         * CodeGenerator.cs: Add locals_to_stack_frame method and emit_parents.
783         * TypeManager.cs: Add LocalsAtDepth.
784         * VariableDeclaration.cs: keep track of the lexical depth of
785         current declaration.
786         * FunctionDeclaration.cs: take care of outter scope variables uses.
787         * IdentificationTable.cs: keep track of Catch statement opened blocks.
788         * expression.cs: take care of eval's Net_1_0 and greater
789         versions. Implement the use of variables in nested scopes. For it,
790         we track the variable's scope level and we compare it with the
791         level in which appears if there's a difference supperior to one
792         and the variables wasn't not declared in the global scope we
793         proceed to generate the code that keep tracks of the state of the
794         variables through a StackFrame, in which we copy the local vars
795         prior to the invocation to the nested method which uses a outter
796         scope variable, then we copy back the variables in the StackFrame
797         into de local vars when the invocation finishes.
798         
799         * Try.cs: open a scope indicating that's for a catch block.
800
801 2005-05-07  Cesar Lopez Nataren  <cnataren@novell.com>
802
803         * MethodInvoker.cs, ScriptObject.cs, BitwiseBinary.cs,
804         ActivationObject.cs, PostOrPrefixOperator, StackFrame.cs,
805         NumericUnary.cs, JSConstructor.cs, Equality.cs, NumericBinary.cs,
806         Convert.cs, LateBinding.cs, Plus.cs, BitwiseBinary.cs,
807         JSMethodInfo.cs, Relational.cs, ScriptFunction.cs : Add missing
808         debugger attributes.
809
810 2005-05-06  Cesar Lopez Nataren  <cnataren@novell.com>
811
812         * Binding.cs: add missing methods and fields.
813
814 2005-05-03  Cesar Lopez Nataren  <cnataren@novell.com>
815
816         * ReturnOutOfFinally.cs, SyntaxErrorObject.cs, TypeReflector.cs,
817         JSPrototypeObject.cs, ReferenceErrorObject.cs, Namespace.cs,
818         expression.cs (Unary class), Binding.cs, ArrayWrapper.cs,
819         CmdLineOptionParser.cs, TypeErrorObject.cs, JSConstructor.cs,
820         TypedArray.cs, FunctionWrapper.cs, SuperTypeMembersSorter.cs,
821         ContinueOutOfFinally.cs, BlockScope.cs,
822         AssemblyCustomAttributeList.cs, VersionableAttribute.cs,
823         SimpleHashtable.cs, ResInfo.cs, Import.cs,
824         NotRecommendedAttribute.cs, CmdLineException.cs, DebugBreak.cs,
825         VBArrayObject.cs, CmdLineError.cs, TODOAttribute.cs,
826         RegExpMatch.cs, JScriptCodeProvider.cs, RangeErrorObject.cs,: Fixes for API compliance.
827
828 2005-04-28  Cesar Lopez Nataren  <cnataren@novell.com>
829
830         * BinaryOp.cs, ActivationObject.cs, expression.cs (Args),
831         ArrayLiteral.cs, ArrayObject.cs, IRedirectOutput.cs, ASTList.cs,
832         IVsaScriptScope.cs, ast.cs (AST), BinaryOp.cs,
833         EnumeratorObject.cs, BreakOutOfFinally.cs, Enum.cs,
834         FormalParameterList.cs, FunctionDeclaration.cs, Equality.cs,
835         Closure.cs, Block.cs, Statement.cs, BooleanObject.cs,
836         LenientBooleanPrototype.cs, GlobalObject.cs, BooleanPrototype.cs,
837         CodeGenerator.cs, LenientDateConstructor.cs,
838         LenientGlobalObject.cs, JSToken.cs, MethodInvoker.cs,
839         LenientRegExpPrototype.cs, NumericUnary.cs,
840         LenientArrayPrototype.cs, JSParser.cs, JSPropertyInfo.cs,
841         LenientVBArrayPrototype.cs, LenientStringPrototype.cs,
842         LenientObjectPrototype.cs, With.cs, ScriptBlock.cs, Expando.cs,
843         JSScanner.cs, LenientEnumeratorPrototype.cs, EvalErrorObject.cs,
844         VariableDeclaration.cs, Print.cs, LenientErrorPrototype.cs,
845         LenientBooleanPrototype.cs, LenientFunctionPrototype.cs, Literal.cs,
846         LenientMathObject.cs, LenientDatePrototype.cs,  Relational.cs,
847         Parser.cs, Throw.cs, VariableStatement.cs, RegExpObject.cs, Eval.cs,
848         SemanticAnalizer.cs, LenientStringConstructor.cs,
849         LenientNumberPrototype.cs, FieldAccessor.cs : Changes for MS API
850         compliance. 
851
852 2005-04-18  Cesar Lopez Nataren  <cnataren@novell.com>
853
854         * Parser.cs: Build a StrictEquality object instead of a Equality
855         object, when we have === and !=== as operator.
856         * CodeGenerator.cs: (ft_emit_equality, fall_true) Take into account the
857         strict cases of equality. 
858         * StrictEquality.cs: Add parent, left and right params to default
859         ctr. Implement Resolve and Emit.
860
861 2005-04-15  Cesar Lopez Nataren  <cnataren@novell.com>
862
863         * Statement.cs: make internal the builders.
864         * expression.cs: (Identifier.Emit) Take into account if its
865         binding is of type Catch.
866
867 2005-04-14  Cesar Lopez Nataren  <cnataren@novell.com>
868
869         * SemanticAnalizer.cs: Added a Hashtable that indicates which
870         methods need to generate proper code for handling the local vars
871         in the StackFrame. Added method AddMethodWithEval, MethodContainsEval.
872
873         * Eval.cs: Back to M.J.
874
875         * ast.cs: locals from abstract class Function is now an array of
876         objects not just AST's.
877
878         * CodeGenerator.cs: Clean up fall_true, better using recursion :)
879         Added static method load_local_vars. At method ft_emit_equality do
880         Emit the code of the ast. Added method load_local_vars.
881
882         * FunctionDeclaration.cs: Update call to TypeManager methods to
883         new API. Added a check for invocations to 'eval' inside functions
884         so StackFrame IL code gets generated. Build the function's closure
885         take the need for the StackFrame into account.
886         
887         * TypeManager.cs: renamed IdentificationTable locals to
888         local_script_functions, AddLocal to AddLocalScriptFunction,
889         GetLocal to GetLocalScriptFunction. Added method CurrentLocals.
890
891         * IdentificationTable.cs: Method CurrentLocals now returns
892         an array of object's not AST's.
893
894         * expression.cs: (class Call) Check if we have a call to 'eval',
895         if so we must keep up the StackFrame which contains the local
896         vars. We generate special code that handles the StackFrame with
897         the local vars in order to keep them in sync. When a function
898         contains an invocation to 'eval' even when such function is a
899         function declared in the code we do not perform a direct method
900         call to it when invoked instead a call through late binding gets
901         performed. Added methods IsEval, set_local_vars. Implement 'eval'
902         from JScript!
903
904 2005-04-10  Cesar Lopez Nataren  <cnataren@novell.com>
905
906         * StackTrace.cs: Back to M.J namespace.
907
908 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
909
910         * Literal.cs: fix the build and broke something else ;-).
911
912 2005-04-08  Cesar Lopez Nataren  <cnataren@novell.com>
913
914         * Literal.cs: Implement the construction of regular expression literal.
915         * Parser.cs: Pass the proper parent to RegExpLiteral.
916
917 2005-03-30  Cesar Lopez Nataren  <cnataren@novell.com>
918
919         * TypeOf.cs: take into account Objects.
920         * ArrayConstructor.cs: Implement CreateInstance.
921         * LateBinding.cs: Initial implementatio of CallValue and
922         SetIndexedPropertyValueStatic.
923         * JSFieldInfo.cs: Implement GetValue and SetValue.
924         * ArrayObject.cs: Implement length, add three ctrs.
925         * JScriptException.cs: Add error_number field. Implement
926         ctr. ErrorNumber, Message and StackTrace.
927         * ArrayPrototype.cs: Implement join and toString.       
928         * JSObject.cs: Remove the ChainHash, we use a simple hashtable
929         now, the one inherited from ScriptObject.
930         * ScriptObject.cs: Add a Hashtable here.
931
932 2005-03-29  Cesar Lopez Nataren  <cnataren@novell.com>
933
934         * GlobalScope.cs: Set parent and engine in ctr. Return 'this' for
935         GetDefaultThisObject.
936         * ScriptObject.cs: Added protected 'parent' field of type
937         GlobalScope.
938
939 2005-03-16  Cesar Lopez Nataren  <cnataren@novell.com>
940
941         * FunctionExpression.cs: Update to TypeManager new API.
942
943         * TypeManager.cs: Keep both MethodBuilder and LocalBuilder around.
944
945         * FunctionDeclaration.cs: In some contexts we need the
946         MethodBuilder and LocalBuilder, so we must keep both around.
947
948         * expression.cs: (load_script_func) Take care if bounded variable
949         was declared in a nested context. (emit_create_instance) Handle
950         the FunctionConstructor case.
951
952 2005-02-28  Cesar Lopez Nataren  <cnataren@novell.com>
953
954         * ForIn.cs: Initial implementation of ForIn stm.
955
956 2005-02-27  Cesar Lopez Nataren  <cnataren@novell.com>
957
958         * VariableStatement.cs (PopulateContext): Do not add the symbol to
959         the context if already defined in current context.
960
961         * CodeGenerator.cs: Renamed VariableDefined to variable_defined_in_current_scope.
962
963         * TypeManager.cs: Reimplemented it, We use an IdentificationTable
964         instead of a simple Hashtable so we can handle scopes
965         properly. Cleaner api.
966
967         * VariableDeclaration.cs: Use new CodeGenerator api. (EmitDecl)
968         Add the builders to the TypeManager.
969
970         * Block.cs: Use new TypeManager api.
971
972         * FunctionDeclaration.cs: Use new TypeManager api. Take care of
973         scopes in the TypeManger on Emit.
974
975         * IdentificationTable.cs: (Binder) Changed the type of value from
976         AST to object so I can use this symbol table
977         anywhere. (IdentificationTable) Add current_locals stack and added
978         method InCurrentScope. 
979
980         * expression.cs: Use new api from TypeManager, Add casts where neeeded.
981
982         This solves an infinite loop we were falling into when calling
983         IdentificationTable.CurrentLocals when repeated declarations where
984         inside function declarations.
985         
986         * ast.cs: Added protected field ig to class Function.
987         * Block.cs: Emit function's body in a later phase since free
988         ocurrences of functions - at the same level of it - can be handled
989         properly, since they must be defined and inited to the correct values.
990         * FunctionDeclaration.cs: Renamed Emit to create_closure. And make
991         Emit only generate the code of the body.
992
993         Fixes #73078.
994
995 2005-02-22  Cesar Lopez Nataren  <cnataren@novell.com>
996
997         * Block.cs: Report error JS5040. Reopened #72674, see last comment of it.
998
999         * CodeGenerator.cs: Added method VariableDefined.
1000         
1001         * TypeManager.cs: Added method SetMethod.
1002         
1003         * VariableDeclaration.cs (EmitDecl): Added logic to allow multiple
1004         declarations of the same var. Fixes #72674.
1005         
1006         * Block.cs: Added hashtable ocurrences. It holds the index of the
1007         previous declaration which after encountering another one with the
1008         same name gets nuked.
1009
1010         * FunctionDeclaration.cs: Added logic for allowing multiple
1011         declaration of methods with the same name. Fixes #72674.        
1012
1013         * expression.cs (Args): Added field func. Holds a reference to the
1014         Function which to the args are being passed. Use it to track the
1015         proper number of arguments for the call. 
1016
1017 2005-02-20  Cesar Lopez Nataren  <cnataren@novell.com>
1018
1019         * expression.cs (Args.Emit): check if num_of_args is -1.
1020         * ast.cs (Function.NumOfArgs): avoid using a null pointer. In the
1021         code generation phase if num_of_args is -1 means the actual
1022         arguments are the desired number of args. Fixes #72697.
1023
1024         * Parser.cs: Pass proper parent.
1025         * CodeGenerator.cs: added emit_get_default_this.
1026         * Literal.cs (This) : Resolve and Emit implemented. Fixes #72477
1027         * expression.cs: (emit_late_get_or_set) use
1028         load_engine. (load_script_func) Ensure that TypeManager has a ref
1029         to the local otherwise it's a field. (New.Resolve) Check if late
1030         binding is needed. (New.Emit) Generate proper IL that make use of
1031         late binding  when the id of the constructor it's not part of the
1032         build in objects.
1033
1034 2005-02-14  Cesar Lopez Nataren  <cnataren@novell.com>
1035
1036         * Token.cs, TokenStream.cs, Parser.cs: make this classes internal.
1037
1038         * Context.cs: delete wrongly exposed ctr.
1039
1040 2005-02-10  Cesar Lopez Nataren  <cnataren@novell.com>
1041
1042         * expression.cs: use InFuntion in proper places.
1043
1044         * Parser.cs: Add parameter that indicates if it's a prefix
1045         operator. When building the MemberExprTail set to proper parent.
1046         * PostOrPrefixOperator.cs: Partial implementation of ++ and --,
1047         prefix and suffix, we assume that the operand is a variable.
1048
1049 2005-02-09  Cesar Lopez Nataren  <cnataren@novell.com>
1050
1051         * expression.cs: Added method EmitStore and EmitLoad to Identifier
1052         class. Implemented op= operators. Fixes 72393.
1053
1054 2005-02-08  Cesar Lopez Nataren  <cnataren@novell.com>
1055
1056         * expression.cs (Identifier.Emit): Handle case where we are
1057         assigning to a formal parameter. Fixes #72333.
1058
1059 2005-02-06  Cesar Lopez Nataren  <cnataren@novell.com>
1060
1061         * expression.cs: (load_script_func) Load localbuilder in an
1062         invocation when needed, this let us have higher order functions,
1063         which is lovely (Fixes #71129). Update calls to load_engine to new signature. 
1064         * FunctionDeclaration.cs: Add LocalBuilder to TypeManager.locals
1065         * Statement.cs: Changed ctr to Init, so we can track correctly the
1066         parent hierarchy when building the ast of the program.
1067         * TypeManager.cs: Added field locals. Factored code for
1068         handling the tables. Added enums ManagedType and Operation.
1069         * Parser.cs: Track correctly the parent of return.
1070         * ast.cs (class Function): add ScriptBlock as possible parent of a
1071         global expression.
1072         * CodeGenerator.cs: change signature of load_engine. Instead of a
1073         AST a boolean. So we can call it with InFunction as parameter.
1074
1075 2005-02-05  Cesar Lopez Nataren  <cnataren@novell.com>
1076
1077         * expression.cs: rework the late binding algorithm, we directly
1078         call an object's method if it's a static method of it. Added field
1079         late_bind, properties AccessField and Binding, renamed emit_access
1080         to emit_array_access to class Binary. Added fields params_info,
1081         late_bind and var_args to Class Args; also methods has_var_args,
1082         force_strong_type, reworked its Emit code, we take care of methods
1083         which have variable number of arguments, take care of needed
1084         conversions and boxing when the call has specific strong types as
1085         formal parameters. Added method IsPrint and property Parameters to
1086         class BuiltIn.
1087         * IdentificationTable.cs: Better implementation of jscript's
1088         environments semantics. Added classes Symbol and Binder.
1089         * SymbolTable.cs: Nuked.
1090         * Block.cs: Fix the semantic of semantic analysis and code
1091         generatipo process, we now allow forward declarations of variables
1092         and functions.
1093         * FunctionDeclaration.cs: Added default ctr and Init method. Fix
1094         the semantics of the Resolve and Emit process, we can have forward
1095         declaration of variables and functions. Fix order in which
1096         JSLocalField's get build.
1097         * FunctionExpression.cs: Fix order in which JSLocalField's get build. 
1098         * VariableStatement.cs: Added methods EmitVariableDecls and PopulateContext.
1099         * VariableDeclaration.cs: Added method EmitDecl. Delay the Resolve
1100         and Emit process until the second phase.
1101         * Statement.cs: Resolve process of For class take care of
1102         VariableStatements for populating the environment in advance.
1103         * TypeManager.cs: Make GetMethod return a MethodBuilder.
1104         * ast.cs: Added field locals, property NumOfArgs, method GetName
1105         to abstract class Function.
1106         * SemanticAnalyser.cs: unified global environment and the stack of
1107         contexts. Added field global_obj, adapt methods to new
1108         IdentificationTable api. Delete method ObjectSystemContains. Added
1109         method contains, is_js_object, object_contains_method, map_to_ctr,
1110         get_member.
1111         * Try.cs: Update to new IdentificationTable api.
1112         * ScriptObject.cs, JSPropertyInfo.cs, FormalParameterList.cs,
1113         JSFieldInfo.cs, JSMethodInfo.cs, JSLocalField.cs,
1114         ScriptFunction.cs: use full namespace name for Binder.
1115
1116 2005-01-17  Cesar Lopez Nataren  <cnataren@novell.com>
1117
1118         * CodeGenerator.cs: Added load_engine.
1119         * expression.cs (emit_func_call), FunctionDeclaration.cs: Fix
1120         computation of VsaEngine.
1121
1122 2005-01-11  Cesar Lopez Nataren  <cnataren@novell.com>
1123
1124         * StringConstructor.cs: implement CreateInstance.
1125
1126 2005-01-10  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1127
1128         * BooleanPrototype.cs: update to assert_type.
1129         * SemanticAnalizer.cs: move BooleanPrototype.AssertType here, rename it to assert_type.
1130
1131 2005-01-06  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1132
1133         * BooleanObject.cs: implement ctr's.
1134         * BooleanPrototype.cs: back to M.J namespace. Implement contructor
1135         property, toString and valueOf, add AssertType.
1136
1137         * Convert.cs: add ToString overload and implement.
1138
1139         * JSFieldInfo.cs, JSLocalField.cs: Add conditional NET_2_0 or BOOTSTRAP_NET_2_0 's
1140         Mono_GetGenericFieldDefinition.
1141
1142         * StringObject.cs: add ctrs.
1143
1144 2005-01-05  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1145
1146         * ObjectPrototype.cs: Add internal ctr. Implement hasOwnProperty.
1147         * ObjectConstructor.cs: implemented CreateInstance.
1148         * expression.cs (emit_create_instance): add Boolean case.
1149         * Try.cs, Statement.cs (EmitStms), Literal.cs
1150         (ObjectLiteralItem.Emit), CodeGenerator.cs (fall_false): delete
1151         unused variables.
1152
1153 2004-12-15  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1154
1155         * CodeGenerator.cs: add support for compiling not only from cwd.
1156
1157 2004-12-13  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1158
1159         * expression.cs: emit code for null literal.
1160
1161 2004-12-06  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1162
1163         * expression.cs: added StringConstructor case.
1164
1165         * MemberInfoList.cs: added internal classes Node, ListIter,
1166         ChainHash and implement MemberInfoList.
1167         * JSObject.cs: implement AddField, AddProperty, AddMethod,
1168         GetMembers, RemoveMember, GetEnumerator, add ChainHash's ext
1169         field.
1170         
1171
1172 2004-11-30  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1173
1174         * *Prototype.cs: return constructor.
1175
1176 2004-11-25  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1177
1178         * GlobalObject.cs: return the different kinds of object's
1179         constructors.
1180         * DateConstructor.cs, StringConstructor.cs, ObjectConstructor.cs,
1181         NumberConstructor.cs, VBArrayConstructor.cs,
1182         FunctionConstructor.cs, EnumeratorConstructor.cs,
1183         BooleanConstructor.cs, ArrayConstructor.cs, RegExpConstructor.cs,
1184         ActiveXObjectConstructor.cs : added default constructor and static
1185         contructor field.       
1186         * ErrorConstructor.cs: added default and discriminatory ctrs. Let
1187         us know which type of error we are.
1188         * DateObject.cs: add field that hold the millisecond representation of date.
1189         * JSError.cs, JScriptException.cs: back to Microsoft.JScript namespace.
1190         * DatePrototype.cs: add default ctr.
1191         
1192         * MathObject.cs: implement its methods.
1193
1194 2004-11-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1195
1196         * DateConstructor.cs: runtime support, ported parse method from Rhino.
1197
1198 2004-11-22  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1199
1200         * CodeGenerator.cs: (ff_emit_relational) receive a full
1201         EmitContext as parameter. Added
1202         ff_emit_equality_cond. (fall_false) take where of the case where
1203         an expression is received.
1204         
1205         * Parser.cs: use ToJSToken for building the Relational
1206         object. Map relational Token's to JSToken's.
1207         * expression.cs: Added Size property to class
1208         Expression. (emit_create_instance): Added Number code generation. 
1209
1210         * Relational.cs (Emit): fix typo, emit boxing to boolean.
1211
1212 2004-11-19  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1213
1214         * NumericBinary.cs: implement EvaluateNumericBinary.
1215
1216 2004-11-15  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1217
1218         * CodeGenerator.cs: factor code for fall_true/fall_false (add
1219         emit_default_case, ft_binary_recursion, ft_emit_equality,
1220         ff_emit_relational, ff_binary_recursion). Fix
1221         trouble with logical ops code generation.       
1222
1223 2004-11-12  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1224
1225         * TypeOf.cs, Plus.cs, Equality.cs:  implementation of
1226         JScriptTypeOf, EvaluatePlus, EvaluateEquality.
1227         * Convert.cs (ToString): use the IConvertible/TypeCode approach
1228         for convertions. Add GetTypeCode.
1229
1230         * Parser.cs, expression.cs: discriminate among =, +=, -=, etc. Add overload of
1231         ToJSToken.
1232
1233 2004-11-10  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1234
1235         * expression.cs (emit_late_call): Pop after Call or CallValue when
1236         needed. (New.Emit) add emit_create_instance.
1237         
1238
1239 2004-11-08  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1240
1241         * expression.cs (class New): add new operator support. Add
1242         emit_args, implemented Emit.
1243
1244         * expression.cs: emit unary operator code.
1245         * TypeOf.cs: back to Microsoft.JScript namespace. fix typo.
1246         * Literal.cs: constrain more the case of negative numeric literal.
1247
1248         * expression.cs (emit_func_call): pop if function's return type is
1249         non-void and has no effect. 
1250
1251 2004-11-07  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1252
1253         * BinaryOp.cs: added constructor for instantiating derived classes.
1254         * BitwiseBinary.cs, Equality.cs, In.cs, InstanceOf.cs,
1255         NumericBinary.cs, Plus.cs, Relational.cs, StrictEquality.cs,
1256         expression.cs (classes Binary, Assign): use inherited constructor. 
1257         * BitwiseBinary.cs, Equality.cs: deleted public constructor which carried the context.  
1258
1259 2004-10-25  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1260
1261         * StringObject.cs: add value field
1262
1263         * expression.cs: implement LateBinding. Added methods:
1264         emit_late_binding, init_late_binding, emit_late_get_or_set,
1265         get_global_scope_or_this, setup_late_call_args, load_script_func, emit_late_call
1266         * Convert.cs: implement CheckIfDoubleIsInteger and CheckIfSingleIsInteger
1267
1268 2004-10-20  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1269
1270         * ast.cs (Function): added method emit_return_local_field, if
1271         there's a return stm inside a function we must allocate a
1272         JSLocalField indicating the return type of the function.
1273         * FunctionDeclaration.cs, FunctionExpression.cs: generate the
1274         extra JSLocalField if needed
1275
1276 2004-10-19  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1277
1278         * Parser.cs: set the operator properly.
1279
1280 2004-10-11  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1281
1282         * GlobalObject.cs: ported encodeURI, encodeURIComponent,
1283         decodeURI, decodeURIComponent from Rhino's codebase. Added methods encode and decode.
1284         
1285         * expression.cs (Call.Emit): implement IsConstructorProperty.
1286
1287 2004-10-06  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1288
1289         * expression.cs: added support for function calls. Handle case of
1290         print where no args are supplied.       
1291
1292 2004-10-05  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1293
1294         * ast.cs: added GetContainerFunction property.
1295         * Statement.cs: added class NotVoidReturnEventArgs and delegate
1296         NotVoidReturnEventHandler, throw an event in case we find a
1297         return, the enclosing function object takes care of changing the
1298         return type of the function.
1299         * FunctionDeclaration.cs, FunctionExpression.cs: take care of
1300         return's inside functions.
1301
1302 2004-09-22  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1303
1304         * expression.cs: Binary, use ResolveFieldAccess only in case the operator is JSToken.AccessField.
1305
1306         * Parser.cs: use ToJSToken to set the operator properly.
1307         * FunctionDeclaration.cs: delete spaces.
1308
1309 2004-09-21  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1310
1311         * FunctionDeclaration.cs: check for parent being a ScriptBlock.
1312
1313 2004-09-20  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1314
1315         * expression.cs: added semantic analysis for accessing fields on
1316         class Binary. Semantic Analysis for Calls it takes care of
1317         constructors and methods, added invocation code for built in
1318         methods. Added interface IAccesible that let us resolve the '.'
1319         operator. Class Args handles missing or surplus arguments. Added
1320         class BuiltIn which will take care of all builtins of ECMAScript.
1321         * ast.cs: added check for parent equal to ScriptBlock.
1322         * SymbolTable.cs: added method Remove.
1323         * Statement.cs: Added abstract class Jump of which Continue and
1324         Break inherit, checks the label stuff. Added checks for Label
1325         stuff to Continue and Break classes. Added method Init for
1326         DoWhile. Fixes for loops statements in order to be able for have
1327         nested loops. Initial support for Label statements.
1328         * SemanticAnalizer.cs: added hash global_env and
1329         IdentificationTable label_set for keeping track of global methods and
1330         label sets. Added static constructor, method BuildGlobalEnv,
1331         ImplementationName, ObjectSystemContains, AddLabel, ContainsLabel,
1332         GetLabel, RemoveLabel.  
1333         * Relational.cs: added code generation for ops instanceof and
1334         in. Fixes for usual relational ops.
1335         * Parser.cs:fixes to keep track of the inheritance chain.
1336         * MathObject.cs: added internal constructor.
1337         * JSFunctionAttribute.cs: added fields value and built_in_function
1338         so we can decide when a method is really a built in.
1339         * IdentificationTable.cs: added method Remove.
1340         * CodeGenerator.cs: fixes for fall_true & fall_false for taking care of ast when is a Expression.
1341
1342 2004-08-25  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1343
1344         * expression.cs: made Binary is IAssignable, added fields assign
1345         and right_side, added method ResolveAssign (which now receives an
1346         extra parameter, being the right side of the assigment). Take care of being
1347         inside a function for array indexing. Take care of lvalue case
1348         too. Assign.Emit just calls left.Emit since left knows everything
1349         about the right side of the assigment after Resolve process.
1350         * BitwiseBinary.cs, CodeGenerator.cs, Equality.cs, NumericBinary.cs, : updates for BinaryOp change.
1351         * BinaryOp.cs: renamed current_op to op as with the new
1352         parser we no longer need to keep track of the old_op.
1353
1354 2004-08-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1355
1356         * expression.cs: do not pass the operand as a parameter to the
1357         constructor as it gets after the parent gets constructed, same
1358         with binary. Added code generation for array index access.
1359         * Parser.cs: added ToJStoken which converts Token to JSToken,
1360         factored the code for creation the Unary nodes. Take care of
1361         parent relationship.
1362         * LateBinding.cs: back to Microsoft.JScript namespace.
1363         
1364
1365 2004-08-23  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1366
1367         * Parser.cs: pass the skip_count to ArrayLiteral constructor.
1368         * Missing.cs: back to Microsoft.JScript namespace.
1369         * ArrayLiteral.cs: added field skip_count, it tells us if this is
1370         a spaced-arrayliteral, in which case we add a null value in the
1371         list, added null check in the resolve and code generation process.
1372
1373 2004-08-21  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1374
1375         * expression.cs: added interface ICallable and and function AddArg
1376         to class Call. Added class New.
1377         * driver.cs: made it use the new lexer and parser.
1378         * ast.cs: added field line_number, added property InFunction,
1379         added class Function that factores all the code shared between
1380         FunctionDeclaration and FunctionExpression.
1381         * With.cs: constructor receives line number.
1382         * VariableStatement.cs: constructor receives line number.       
1383         * VariableDeclaration.cs: Added check for parent being
1384         FunctionDeclaration and FunctionExpression.
1385         * Try.cs: Moved the code that used to take care of the catch to
1386         Catch class. Constructor receives forming elements and line
1387         number. Removed mangle_id.
1388         * Throw.cs: constructor receives line number.
1389         * Statement.cs: If, DoWhile, Return  constructor receives line number. Renamed
1390         identifier to label in Continue and Break class, its constructor now
1391         receives the label and line number. For class, constructor
1392         receives its forming parts. Switch class, constructor receives
1393         line number, added function AddClause and AddStm. Added class
1394         Catch. Added class Labelled.
1395         * SemanticAnalyser.cs: Added field anon_method_counter, properties
1396         NextAnonymousMethod and CurrentAnonymousMethod.
1397         * Parser.cs: function ArgumentList receives a ICallable list
1398         instead of a AST. Now we add the arguments of a callable. Build
1399         Call's ast.
1400         * Literal.cs: added constructor for 'this' literal and
1401         ObjectLiteral constructor. Added RegExpLiteral class, will take
1402         care of regular expressions semantic analysis and code generation.
1403         * JSScanner.cs: use no more the antlr based lexer. Fix typo.
1404         * JSParser.cs: make it use the new port of Rhino's Parser.
1405         * FunctionObject.cs: Added constructor that receives the function name.
1406         * FunctionExpression.cs: made it inherit from Function class. Added
1407         constructor. Factored the code that used to set the prefix to
1408         Function.set_prefix (it's shared with FunctionDeclaration). Added
1409         fields local_script_func and field. Implemented Resolve and Emit
1410         (now we can do: var x = function (this, method, is, anonymous) {... };).        
1411         * FunctionDeclaration.cs: made it inherit from Function class in
1412         order to share code with FunctionExpression. Added new
1413         constructor. Moved the code that used to built the prefix to
1414         Function inside function set_prefix. When building the closure
1415         added check for  setting the type of a FunctionExpression. Moved
1416         set_function_type and set_custom_attr to class Function. 
1417         * ForIn.cs: added constructor and fields lhs, obj and body.
1418         * Block.cs: added default constructor and line number based
1419         constructor. Check for elems not being null before adding.
1420         * ArrayLiteral.cs: set elements in constructor.
1421         
1422 2004-07-29  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1423
1424         * Parser.cs: Added ClauseType enum. Added all the statements to current_script_or_fn,
1425         building the other block was not needed. Build the ast's for the
1426         expressions and statements, keep track of the parent relationship.
1427
1428 2004-07-19  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1429
1430         * Added Token.cs, TokenStream.cs, Parser.cs which are the port of
1431         Mozilla/Rhino's  parser.
1432
1433 2004-06-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1434
1435         * jscript-lexer-parser.g: added ast building for object_literal,
1436         it's disabled for now while I fix the "block Vs object_literal"
1437         non-determinism problem on the parser. Added rule for
1438         array_literal. Build PropertyName ast build.
1439         * Literal.cs: fixed the negative numbers code generation (we must
1440         optimize this). Added initial ObjectLiteral's class, code generation and
1441         Resolve process. Added class ObjectLiteralItem and PropertyName.
1442         * ArrayLiteral.cs: added internal size field as an ArrayLiteral can have
1443         elisions we keep track of the "real" size here. Added constructor. Added initial
1444         Resolve and Emit code.
1445         * ASTList.cs: added Size property. 
1446         * Globals.cs, ASTList.cs: Back to the useful namespace (M.J).
1447
1448 2004-06-20  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1449
1450         * CodeGenerator.cs: Added LoopBegin and LoopEnd to EmitContext, they are used by
1451         break and continue in order to jump to the desired place. Added
1452         check for converting to boolean if we encounter an identifier (at need_convert_to_boolean).
1453         * Statement.cs: class If.Emit, call fall_true instead of fall_false so we don't
1454         need to jump if the expression evaluates to true. Continue class,
1455         replaced ParentIsItrStm with InLoop, emit jump to correct
1456         place. Break class, implemented Resolve; deleted
1457         ParentIsCorrect. DoWhile, While classes, set LoopBegin and
1458         LoopEnd. While class, set LoopBegin and LoopEnd. 
1459         * ast.cs: Added InLoop and InSwitch.
1460         * jscript-lexer-parser.g: pass parent to break_stm. Added block as
1461         a statement. Temporarily disabled object_literal in order to test
1462         the block structure and continue and break statements.
1463         
1464 2004-05-28  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1465
1466         * Statement.cs: changed parent_is_itr_stm method to ParentIsItrStm
1467         property. Added initial pieces for Break's Resolve. Fixed bug that
1468         did not let Emit the code for case clauses that came after the
1469         default clause (we match the jsc behavior).
1470         * jscript-lexer-parser.g: set parent of switch's clauses.
1471
1472 2004-05-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1473
1474         * Statement.cs: added parent as a parameter on Continue constructor. Added parent_is_itr_stm
1475         * jscript-lexer-parser.g: set parent hierarchy for continue
1476         statement. Set to correct parent in iteration_stm.
1477
1478 2004-05-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1479
1480         * StrictEquality.cs, JSFieldInfo.cs: got it back to Microsoft.JScript namespace.
1481
1482         * Statement.cs: Added code generation support for 'switch' statement.
1483
1484         * jscript-lexer-parser.g: added 'using' for
1485         System.Collections. Allow 'switch' statement building of its
1486         ast. Added parent parameter to constructor of With. Build
1487         inside_for ast. 
1488
1489         * With.cs: code generation support for 'with' stm.
1490
1491 2004-05-21  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1492
1493         * Statement.cs: initial code generation of 'for'.
1494         * jscript-lexer-parser.g: let's build for's ast.
1495
1496 2004-05-18  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1497
1498         * jscript-lexer-parser.g: let's build Try/Catch/Finally ast.
1499         * expression.cs: handle Try case for field or local vars allocation. 
1500         * Try.cs: implemented Emit.
1501         * Throw.cs: implemented code generation.
1502         * FunctionDeclaration.cs: cache some values.
1503
1504 2004-04-26  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1505
1506         * FunctionDeclaration.cs: let's make function name formation
1507         (get_name ()) a little bit less dumb. We cache the prefix now so
1508         we don't have to recalculate it everytime.
1509
1510 2004-04-22  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1511
1512         * Literal.cs: emit the correct code for negative numbers.
1513         * jscript-lexer-parser.g: set parent unary_expr.
1514
1515 2004-04-18  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1516
1517         * expression.cs: added code generation for 'x1 ? x2 :x3' op.
1518         * Statement.cs: Added code generation for while and do-while.
1519
1520 2004-04-17  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1521
1522         * Statement.cs (class if): reimplemented Emit based on fall_false.
1523         * Equality.cs: added code generation for != and emit jumping code
1524         only in the case we are at a global expression not statement.
1525         * CodeGenerator.cs (fall_true, fall_false): Check if convertion to
1526         boolean needed. Made emit_to_boolean internal. Added need_convert_to_boolean.
1527
1528 2004-04-14  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1529
1530         * expression.cs (Binary.Emit): treat boolean operator
1531         specially. Added emit_jumping_code.
1532         * CodeGenerator.cs: Added emit_to_boolean. Added fall_true and
1533         fall_false, which will express all boolean expressions and control
1534         flow conditions. 
1535
1536 2004-04-02  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1537
1538         * Equality.cs: Moved the Emit and Resolve code here.
1539         * jscript-lexer-parser.g: Build a Equality object instead of a
1540         Binary object for equality_expr.
1541         * expression.cs: moved equality oeprators (resolve and IL gen) to
1542         Equality.Emit and Equality.Resolve.
1543
1544 2004-03-31  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1545
1546         * expression.cs: Added shift operators IL emit.
1547         * BitwiseBinary.cs: added constructor for building it according to
1548         JSToken enum. return a new object on EvaluateBitwiseBinary (this
1549         needs a real implementation).
1550         * expression.cs: added code for evaluation of bitwise operators at emit_op_eval.
1551
1552         * Statement.cs: added stub for While and DoWhile ast
1553         representation (reworking my Emit code).
1554         * jscript-parser-lexer.g: allow iteration statement ast build.
1555
1556         * FunctionDeclaration.cs: agrouped code for setting custom attribute.
1557
1558         * expression.cs: added Modulo operator case.
1559
1560 2004-03-16  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1561
1562         * Convert.cs: added rule for string conversion.
1563
1564         * Plus.cs: added rule for string addition.
1565
1566         * PostOrPrefixOperator.cs: added constructor, returned to Microsoft.JScript ns, initial Resolve and
1567         Emit (cases where there's no real operator).
1568
1569         * StringLiteral.cs: now implements Exp as can appear as a simple
1570         exp in global code. Added check for Pop generation.
1571
1572         * expression.cs: added IL generation code for print func call. 
1573         Args class added get_element, Size and made Resolve behave as the
1574         others (collect the differents Resolve's return values from each
1575         of the arguments). Expression class, added default Resolve call
1576         for non-Exp implementers.
1577
1578         * jscript-lexer-parser.g: postfix_expr rule now returns a simple
1579         AST, this handles the case where no postOrPrefixOp present; Unary
1580         returns an AST too.
1581
1582         * FormalParameterList.cs: added get_element, retrieves nth element.
1583
1584 2004-03-14  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1585
1586         * ScriptStream.cs: let's print some messages.
1587
1588         * jscript-lexer-parser.g (STRING_LITERAL): Do not include the ' in the text of the rule.
1589
1590 2004-03-13  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1591
1592         * jscript-lexer-parser.g: keep track of return's parent.
1593         * Statement.cs: added parent parameter to constructor.
1594
1595         * expression.cs: refactored Emit code from Identifier, now we take
1596         care of function's paramenter references. First attack to function
1597         calls, check if Resolve from Call succeed.
1598         
1599         * VariableDeclaration.cs: Deleted Decl class, field_info and
1600         local_builder fields were being used only by VariableDeclaration,
1601         I'll keep them there.
1602         
1603         * FormalParameterList.cs: added field pos to FormalParam, and set
1604         it at FormalParameterList's Resolve stage. 
1605         
1606         * TODO: updated TODO.
1607
1608 2004-03-07  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1609
1610         * jscript-lexer-parser.g: build If's ast. Keep track of expr parent.
1611
1612         * expression.cs: At class Conditional renamed fields. Class
1613         Expression inherits from Exp as we must keep track if we must pop
1614         the last value (this is for the comma operator), track the parent,
1615         at Resolve we take care of the last value of the expression, 
1616
1617         * VariableDeclaration.cs: updates needed because of EmitContext change.
1618
1619         * Statement.cs: added parent param to If constructor. Implement
1620         Resolve and Emit for If statement.
1621
1622         * Relational.cs: Set parent. The boxing happens in the containing statement.
1623
1624         * FunctionDeclaration.cs: Added func_type field, will be used to determine the
1625         type of the function we are generating (global function, method
1626         from a class, etc) and attach to it the correct custom
1627         attribute. Simplified the code for nested functions: 
1628         refactored the code so no code duplication is involved, now we
1629         have only one function that retrieves  the name of the function,
1630         now create a new EmitContext for the body of the method.
1631
1632         * FormalParameterList.cs, Literal.cs, StringLiteral.cs:  use
1633         current EmitContext's ILGenerator. 
1634
1635         * Convert.cs: Do not throw the NotImplementedException anymore for
1636         method ToBoolean, for now we always return false. This must get a
1637         real implementation.
1638
1639         * CodeGenerator.cs:  Deleted one of ILGenerator fields
1640         from EmitContext, suffices using only one (more notes about the
1641         change on the Functiondeclaration entry). Imitate jsc behavior for
1642         compiled files names, aggregate the exe or dll extension after last dot.
1643
1644         * Block.cs: In order to implement the comma operator (i.e., expression,
1645         assign_exp), we must track if our expressions are at a global
1646         scope, in which case we must pop the last result too.
1647
1648 2004-01-25  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1649
1650         * Relational.cs: Initial generation of CIL for relational operators.
1651
1652 2004-01-23  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1653
1654         * jscript-lexer-parser.g: formal_param_list receives a parent too.
1655
1656         * SymbolTable.cs: added size and current_symbols properties.
1657
1658         * JSLocalField.cs: don't throw not ImplementedException from
1659         constructor (same reason, testing purposes, must get implemented
1660         for real).
1661
1662         * IdentificationTable.cs: added num_of_locals and current_locals properties.
1663
1664         * FunctionDeclaration.cs: added a LocalBuilder and DictionaryEntry
1665         as fields. Not throw NotImplementedException for
1666         JScriptFunctionDeclaration (testing purposes, must get implemeted
1667         for real). Let's build our function closures! Added functions:
1668         build_closure and build_closure_nested, build_local_fields. Keep
1669         track of current parameters and locals defs.
1670
1671         * FormalParameterList.cs: made FormalParam inherit from
1672         AST. Implement the Emit for parameters, yeah!
1673
1674         * CodeGenerator.cs: added a ModuleBuilder reference. New constructor.   
1675
1676         * Closure.cs: do not throw the exception (this allow me to run the
1677         tests  at mcs/jtests and check that at least i'm not generating
1678         invalid CIL). Be aware that this must be really implemented.
1679
1680         * Block.cs: renamed field, and implement the double pass for
1681         nested function declarations code emittion, yeah!.
1682
1683 2004-01-16  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1684
1685         * Microsoft.JScript/VsaReferenceItem.cs: renamed field, reuse parent's ctr.
1686         * Microsoft.JScript/VsaItem.cs: renamed some fields, added ctr, 
1687         * Microsoft.JScript/VsaGlobalItem.cs: reuse parent ctr.
1688         * Microsoft.JScript/VsaCodeItem.cs: reuse parent ctr.
1689         * Microsoft.JScript/GlobalScope.cs: reuse constructors from parent.
1690
1691         * UnaryOp.cs: inherit from Exp now.
1692         * Plus.cs: Don't throw the exception when calling constructor, let
1693         it build the default handler. Return a new object when calling
1694         EvaluatePlus until properly implemented.
1695
1696         * NumericUnary.cs: added new Resolve.
1697         * NumericBinary.cs: assign operator val at ctr. Return a new
1698         object when calling EvaluateNumericBinary until properly
1699         implemented. Added Resolve.
1700         * Equality.cs: added ctr and return false for EvaluateEquality
1701         until properly implemented. Added Resolve's functions.
1702
1703         * Block.cs (Resolve): That check was not necessary.
1704         
1705         * InstanceOf.cs, PostOrPrefixOperator.cs, Relational.cs,
1706         StrictEquality.cs, TypeOf.cs: added Resolve inherited from
1707         BinaryOp and UnaryOp, and this from Exp.
1708         * IdentificationTable.cs, ScriptBlock.cs: deleted debugging messages.
1709         * jscript-lexer-parser.g: deleted debugging messages. Create a
1710         Assign object instance of a simple Binary obj. Same case for Equality.
1711
1712         * expression.cs: added Exp abstract class. Classes that are ast of
1713         language constructions that can appear as global expressions that
1714         get evaluated and then the result is discarded inherit from this
1715         new class. This let meee keep track of things that must get Popped
1716         or can even avoid the evaluation of it. Wrote real Resolve method
1717         for classes: Unary, Binary.
1718         Implemted Emit method for some binary operations (+, -, / and *),
1719         for other operators some more code is still missing.    
1720         Identifier: handle assignment cases and global exp cases.
1721         Added class Assign (compisite assignment still missing tough :-(
1722
1723         * driver.cs: deleted debug messages, added "Compilation Succeeded"
1724         message ;-).
1725         * VariableStatement.cs, VariableDeclaration.cs: wrote real Resolve method.      
1726         * Literal.cs (BooleanLiteral, NumericLiteral): now inherits from
1727         Exp and handle the case for global expressions that must be popped
1728         after evaluation. no more invalid IL being generated! yeah!
1729         * Block.cs: wrote real Resolve method, erased debug messages.
1730         * BitwiseBinary.cs, InstanceOf.cs, UnaryOp.cs: : add new Resolve inherited from Exp.
1731         * BinaryOp.cs, Conditional: now inherits from Exp.
1732
1733 2004-01-15  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1734
1735         * ReferenceAttribute.cs: moved it back to namespace Microsoft.JScript.
1736
1737         * CodeGenerator.cs: small fixes to generate same things that ms.
1738
1739 2004-01-13  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1740
1741         * VariableDeclaration.cs: get the this.type which is a Type not a TypeBuilder.
1742
1743 2004-01-12  Atsushi Enomoto  <atsushi@ximian.com>
1744
1745         * JSMethodInfo.cs : tiny fix for NET_2_0 build.
1746
1747 2003-12-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1748
1749         * jscript-lexer-parser.g: keep track of parent reference for
1750         IDENTIFIER, STRING_LITERAL.
1751
1752         * expression.cs: Added 'binding' field. Added 'parent' parameter
1753         to constructor. Now we emit the proper code for the identifier.
1754
1755         * VariableStatement.cs: updated to field names instead of the old
1756         property's name.
1757
1758         * VariableDeclaration.cs: Added class Decl, it constains the
1759         references to the static field or LocalBuilder that are created
1760         when a declaration is emitted. Deleted unuseful properties (Id,
1761         InitValue, Type).
1762
1763         * SymbolTable.cs: Deleted Retrieve method. Contains now returns an
1764         object instead of a boolean.
1765
1766         * StringLiteral.cs: Deleted unuseful properties. Use ig instead of ec.ig.
1767
1768         * IdentificationTable.cs: Deleted Retrieve method. Contains method
1769         now return an object instead of a boolean, that reference is the
1770         binding associated with the identifier being searched.
1771
1772 2003-12-18  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1773
1774         * jscript-lexer-parser.g: Keep track of parent for numeric_literal.
1775
1776         * VariableDeclaration.cs: now I handle initialization (ex. var x =
1777         2; or function f () { var x = 4; }) at global scope or at
1778         function's body.
1779
1780         * Literal.cs: Added parent param to NumericLiteral constructor.
1781
1782         * FunctionDeclaration.cs: Added Ret opcode for all function declaration bodies.
1783
1784 2003-12-17  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1785
1786         * CodeGenerator.cs: Added IL emittion for ldnull on default ending code for 'Global Code'.
1787
1788 2003-12-10  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1789
1790         * jscript-lexer-parser.g: added 'tokens { IN = "in"; INSTANCE_OF =
1791         "instanceof"; }' in order to be able to parse both keywords. When
1792         generating the parser, one warning about nondeterminism
1793         (k==1:"in") is generated ignore it.
1794
1795 2003-12-07  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1796
1797         * jscript-lexer-parser.g: things like 'new Point (10, 20).x' were
1798         not parsable now they are. Mozilla's and Janet's  test suites are
1799         being really helpful.
1800
1801 2003-12-05  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1802
1803         * jscript-lexer-parser.g: added check for non-null reference at
1804         var_decl_list rule. Added single quote STRING_LITERAL lexical rule
1805         and multiple lines comments rule.
1806
1807         * jscript-lexer-parser.g: Now I keep track of the parent for most
1808         of the syntatic constructs. Fixed object_literal rule.
1809
1810         * ast.cs: Added field parent. This will help me to track nested
1811         blocks for all of the syntatic constructs and will allow to Emit
1812         everything in one single pass.
1813         * FunctionDeclaration.cs, FunctionExpression.cs: Rearranged the
1814         parent stuff.
1815         * Block.cs, FunctionObject.cs: deleted parent field as AST will
1816         hold it. Delete parent parameter from constructor.
1817         * CodeGenerator.cs: Add field gc_ig (global code IL generator) to
1818         EmitContext class. The idea is Emitting everything in one pass (decls
1819         and 'Global Code' method, the parent reference let me know which IL
1820         generator use, gc_ig or ig).
1821         * Equality.cs, BooleanLiteral, Relational.cs: Added new parameter to
1822         constructor. Use new parent reference for choosing the IL
1823         generator. NumericLiteral a 'hard coded' int32 IL emittion added
1824         for testing. 
1825         * StringLiteral.cs, Literal.cs (BooleanLiteral.Emit): now I use
1826         the parent reference to infere which IL generator to use.
1827         * VariableDeclaration.cs: deleted parent field. At Emit, now I use the parent
1828         reference to infer which IL generator to use.
1829         * expression.cs: Added paramenter parent to constructor of: Unary,
1830         Binary, Conditional, Call.
1831
1832 2003-11-30  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1833
1834         * expression.cs: Added new field to Call class, so it can handle more arguments.
1835
1836         * StringLiteral.cs (Emit) : Load the string value.
1837
1838         * Literal.cs: BooleanLiteral, Resolve always return true. Emit the value and box it to Boolean.
1839
1840         * CodeGenerator.cs: Set parent if 'JScript 0' to GlobalScope. Set
1841         custom attribute. Build default 'JScript 0' constructor. Emit
1842         default initial/final code of 'Global Code'. Create default
1843         'JScript Main'.
1844
1845 2003-11-29  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1846
1847         * jscript-lexer-grammar.g: define new rule 'arguments' instead of
1848         repeating hand written rule all around. Change "." for DOT, dumb
1849         mistake by myself. Added rule new_expr. Now we handle properly the
1850         call_expr rule (as defined on the spec), and added a new
1851         argument. Added subrule new_expr to  left_hand_side_expr rule.
1852
1853 2003-11-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1854
1855         * expression.cs (Expression): implemented Emit.
1856
1857         * expression.cs (Binary): Emit now creates a local for the
1858         different kinds of binary expressions (initial code for this).
1859
1860         * ast.cs: Emit method now is abstract instead of virtual.
1861
1862         * CodeGenerator.cs: changed no_global_code_method to is_global_code_method.
1863
1864         * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, DebugBreak.cs,
1865         Enum.cs, Equality.cs, Eval.cs, ForIn.cs, FormalParameterList.cs,
1866         FunctionExpression.cs, Import.cs, InstanceOf.cs, Literal.cs,
1867         NumericLiteral, NumericBinary.cs, NumericUnary.cs, Package.cs,
1868         Plus.cs, PostOrPrefixOperator.cs, Print.cs, Relational.cs,
1869         Continue, Break, Return, StrictEquality.cs, StringLiteral.cs,
1870         Throw.cs, Try.cs, TypeOf.cs, VariableDeclaration.cs, With.cs,
1871         Conditional, Call, Identifier, Args, Expression, :
1872         added Emit method.
1873
1874         * FunctionDeclaration.cs: Check if values are not null first (at
1875         Resolve). Ignore code generation is at 'Global Code'.
1876
1877         * VariableDeclaration.cs: Now I take care of IL generation when we
1878         are at statements and expressions at global code, 'Global Code'
1879         method is populated with that IL.  
1880
1881         * CodeGenerator.cs: Added flag for 'Global Code' method
1882         emittion. Now I call 'Emit' twice. The first for declarations the
1883         follower for statements and expressions at global scope.
1884         
1885 2003-11-10 cesar lopez nataren <cesar@ciencias.unam.mx>
1886
1887         * Visitor.cs: Deleted.
1888
1889 2003-11-09 cesar lopez nataren <cesar@ciencias.unam.mx>
1890
1891         * FormalParameterList.cs: Now inherits from AST. Each of the
1892         formal parameters gets into the IdentificationTable at Resolve.
1893
1894         * FunctionDeclaration.cs:Resolve (), We open a new block when
1895         encountering a FunctionDeclaration, resolve de parameters and the
1896         body, at the end we close the block.
1897
1898         * IdentificationTable.cs: Now we keep track of parent of the
1899         current block. 'Enter (...)' now receives an object, not a
1900         VarDecl. 'Contains' now take care of searching through the binding
1901         chain.
1902
1903         * Literal.cs: Deleted 'Literal' class, was being used for
1904         nothing. All the classes the inherited from it, now do it from
1905         AST. A 'literal' does resolve to true by default.
1906
1907         * Relational.cs: Resolve recursively left and right.
1908
1909         * SemanticAnalyser.cs: added flag for 'print statement'.
1910
1911         * Statement.cs: 'If' class, resolves firstly the condition, the true_stm
1912         and false_stm.
1913
1914         * driver.cs:  Init the semantic analysis phase.
1915
1916         * expression.cs: 'Unary' class, resolves its operand
1917         first. 'Binary' class,resolves left and right first. 'Args' class
1918         resolve all the formal parameters first. 'Expression' resolve all
1919         the nested expressions first.
1920
1921         * jscript-lexer-parser.g: Replaced 'Literal' references for AST ones.
1922         
1923 2003-11-08 cesar lopez nataren <cesar@ciencias.unam.mx>
1924
1925         * jscript-lexer-parser.g: Allow the building of numeric_literal and DECIMAL_LITERAL,
1926         this is temporal in order to get Factorial compiled by mjs (must
1927         build the types according to Ecma-262 spec).
1928
1929         * Literal.cs: Added NumericLiteral class.
1930
1931 2003-11-06 cesar lopez nataren <cesar@ciencias.unam.mx>
1932
1933         * FunctionDeclaration.cs: Build a ScriptFunction local variable,
1934         if inside a nested block.
1935
1936 2003-11-05 cesar lopez nataren <cesar@ciencias.unam.mx>
1937
1938         * jscript-lexer-parser.g: Now we take care of parents. This allows
1939         to keep track if we are inside nested blocks. At
1940         'func_decl_or_expr', now I built the FunctionDeclaration or
1941         FunctionExpression first and then assign its body to it - this let
1942         me get a non-null value of the FunctionExpression or
1943         FunctionDeclaration so I can detect if it's a nested block (thanks go to Jackson!).
1944
1945         * Block.cs, FunctionObject.cs, VariableDeclaration.cs: Added 'AST parent' field.
1946         * Block.cs, FunctionDeclaration.cs, FunctionExpression.cs,
1947         FunctionObject.cs, VariableDeclaration.cs: Added 'AST parent' parameter to constructor.
1948
1949         * ScriptBlock.cs: Initiate the global block with 'null' as parent.
1950         
1951         * FunctionDeclaration.cs: Added 'get_composite_name ()' method
1952         (gets the name of a function if it's nested). Emit code for
1953         function's body. At 'Emit ()' now we take care if it's a nested
1954         declaration.
1955
1956         * FunctionObject.cs: default return type is 'void' not
1957         'Object'. Function declarations without parameters map to functions with
1958         'Object this' and 'VsaEngine engine' as parameters by
1959         default. Assign parent to nested block.
1960
1961         * VariableDeclaration.cs: At 'Emit ()', now we take care if we are
1962         a global declaration or inside a function declaration.
1963         
1964 2003-11-04 cesar lopez nataren <cesar@ciencias.unam.mx>
1965
1966         * FunctionObject.cs: Handle no parameters on functions.
1967         
1968         * jscript-lexer-parser.g: Allow functions without parameters.
1969
1970 2003-11-03 cesar lopez nataren <cesar@ciencias.unam.mx>
1971
1972         * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, Blocks.cs,
1973         DebugBreak.cs, Enum.cs, Equality.cs, Eval.cs, ForIn.cs,
1974         FunctionDeclaration.cs, FunctionExpression.cs, Import.cs,
1975         InstanceOf.cs, Literal.cs, NumericBinary.cs, NumericUnary.cs,
1976         Package.cs, Plus.cs, PostOrPrefixOperator.cs, Print.cs,
1977         Relational.cs, ScriptBlock.cs, StrictEquality.cs, Throw.cs,
1978         Try.cs, TypeOf.cs, VariableDeclaration.cs, VariableStatement.cs,
1979         With.cs, expression.cs : Added 
1980         'Resolve' method stub.
1981
1982         * CodeGenerator.cs: Added a ILGenerator field to EmitContext.
1983
1984         * FormalParameterList.cs: Added FormalParam class. Change Add
1985         method to receive the id and the type annotation from function's parameters.
1986
1987         * FunctionDeclaration.cs: Added code for initial function's
1988         definition code generation.
1989
1990         * FunctionObject.cs: Added MethodAttributes and type_annot
1991         fields. Added params_types function, which returns an array of
1992         types from each of the function's parameters.
1993
1994         * IdentificationTable.cs: Added ToString method.
1995
1996         * SemanticAnalizer.cs: Fixed the file name (maybe I should erase it
1997         and add it again with the correct name). Not based on the Visitor
1998         pattern anymore. Deleted all the VisitFOO methods. Added a
1999         IdentificationTable field. Added Run, Dump methods.
2000
2001         * Statement.cs: Deleted Statement class (it was being used for
2002         nothing). All classes that were having Statement as parent,
2003         changed their parent to be AST.
2004
2005         * SymbolTable.cs: Added Add method that receives the id and the
2006         declaration class. Retrieve changed to return an AST. Added
2007         ToString method. Added 'SymbolTable parent' field.
2008
2009         * VariableDeclaration.cs: Added InitValue property.
2010
2011         * ast.cs: Added some comments and abstract method 'Resolve'.
2012
2013         * jscript-lexer-parser.g: Added parsing support for formal
2014         parameters type annotations.
2015         
2016 2003-10-30  cesar lopez nataren <cesar@ciencias.unam.mx>
2017
2018         * jscript-lexer-parser.g: fixed function call parsing! yeah! (give
2019         thanks to Hector!) 
2020
2021 2003-10-28  cesar lopez nataren <cesar@ciencias.unam.mx>
2022
2023         * jscript-lexer-parser.g: allow empty program files. Added type
2024         annotations on var decl and function decl.
2025         * VariableDeclaration.cs: added return type annotation field.
2026         * FunctionExpression.cs: added return type parameter to constructor.
2027         * FunctionDeclaration.cs: added return type parameter to
2028         constructor. Added Emit method (just creates the static field at
2029         the global object, for now).
2030         * FunctionObject.cs: added return type to constructor. Changed
2031         names to readable ones ;-) 
2032
2033         * ScriptStream.cs: added WriteLine.
2034
2035 2003-10-24  cesar lopez nataren <cesar@ciencias.unam.mx>
2036
2037         * ast.cs: Added 'virtual' Emit method (I might change it to be
2038         abstract, but I would have to added to all classes that derive
2039         from it. I'll do it later)
2040         * Block.cs: Added Emit method.
2041         * CodeGnerator.cs: Restructured it (not based on the Visitor pattern
2042         anymore) - still missing some methods, ut on the way. A nice
2043         hacking weekend coming. Added EmitContext class.
2044         * ScriptBlock.cs: Added Emit method.
2045         * VariableDeclaration.cs: Changed type field from string to
2046         Type. Added Emit method.
2047         * VariableStatement.cs: Added Emit method.
2048         * driver.cs: Added CodeGeneration phase (only simple var
2049         declarations support it. More coming soon).
2050
2051
2052 2003-10-22  cesar lopez nataren <cesar@ciencias.unam.mx>
2053
2054         * statement.cs: added Return class.
2055
2056         * Throw.cs: Added expression field, constructor and ToString.
2057         
2058         * jscript-lexer-parser.g: Allow return_stm and throw_stm tree
2059         building.  
2060         
2061         * With.cs: added constructor and ToString. Back to the non-tmp
2062         namespace.
2063
2064         * jscript-parser-lexer.g: allow with_stm tree building.
2065
2066         * jscript-lexer-parser.g: changed the return type from if_stm from
2067         'If' to AST. Added tree for continue_stm. Allowed building of
2068         Break tree.
2069
2070         * statement.cs: switched to internal 'If' class. Added Continue
2071         class. Added Break class.
2072         
2073         * jscript-lexer-parser.g: build tree for function decl or expr.
2074
2075         * FunctionDeclaration.cs: added internal constructor.
2076
2077         * FunctionExpression.cs: added internal constructor.
2078
2079         * FunctionObject.cs: added internal constructor and ToString method.
2080
2081         * jscript-lexer-parser.g: added building tree for if_stm.
2082         * Statement.cs: Added if class for 'if' statement.
2083         
2084
2085 2003-10-21  cesar lopez nataren  <cesar@ciencias.unam.mx>
2086
2087         * VariableDeclaration.cs: added the initializer to ToString.
2088         
2089         * jscript-lexer-parser.g: Allow "christmas trees" (aka expression
2090         trees) building.
2091         
2092         * Block.cs, Equality.cs, Relational.cs: modified ToString 
2093
2094         * Equality.cs, Relational.cs, StringLiteral.cs,
2095         VariableDeclaration.cs: Added constructor 
2096
2097         * VariableStatement.cs, ScriptBlock.cs: changed from hungarian
2098         name convetion style to mono style.
2099
2100         * UnaryOp.cs: added operator and operand fields.
2101
2102         * VariableDeclaration.cs: chenged field name from assignExp to val.
2103
2104         *  BinaryOp.cs: Made "internal" the attributes, added the two
2105         operators holders.
2106
2107         * JScriptLexer.cs, JScriptParser.cs, JScriptParserokenTypes.cs,: updates from grammar changes.
2108         
2109         * driver.cs: Dump the string representation of the parsed exps.
2110
2111         * Literal.cs:  added BooleanLiteral
2112
2113         * Relational.cs: added constructor, ToString, 
2114
2115 2003-10-10  cesar lopez nataren <cesar@ciencias.unam.mx>
2116
2117         * README: added some info about hacking the grammar
2118
2119         * JSparser.cs: Updated the constructor to not receiving params.
2120
2121         * JScriptLexer.cs, JScriptParser.cs, JScriptParserTokenTypes.cs,
2122         JScriptParserTokenTypes.txt: update of antlr generated files from
2123         grammar changes. 
2124
2125         * jscript-lexer-parser.g: Rewrote the EcmaScript grammar. Now we
2126         can parse a little bit more useful programs like:
2127
2128         function factorial (i)
2129         {
2130                 var k;
2131
2132                 if (i <= 0)
2133                         return 1;
2134                 else {
2135                         k = factorial (i - 1);
2136                         return i * k;
2137                 }
2138         }
2139
2140         var x;
2141         x = factorial (4); 
2142         print (x);
2143
2144         As you can see, it's not the classic factorial function
2145         definition, I still have to make some tricks like storing the
2146         result from the recursive call and then multiply. But this new
2147         grammar it's easier to alter than the old one. Also we got support
2148         for for-in statements, for statements, global expressions, support
2149         for object accesors or better known as the "dot" operator. Two
2150         rules are on the eye: left_hand_size_expr and call_expr, in order
2151         to finish the parsing grammar and fix the bugs.
2152
2153
2154 2003-09-29    <cesar@ciencias.unam.mx>
2155
2156         * Added: VsaGlobalItem.cs, VsaReferenceItem.cs, VsaCodeItem.cs
2157
2158         * Added VsaItem.cs, implements IVsaItem.
2159
2160 2003-09-28    <cesar@ciencias.unam.mx>
2161
2162         * VsaItems.cs: Check that no name is repeated (this was docs fault
2163         :-)). This is the beauty of testing.
2164
2165         * Add VsaItems.cs, implements IVsaItems.
2166
2167 2003-09-22    <cesar@ciencias.unam.mx>
2168
2169         * DocumentContext.cs: changed constructor from internal to public,
2170         this a kind of hack ;), but we can build mjs.exe with that change.
2171
2172         * driver.cs, ast.cs, VsaEngine.cs, VariableStatement.cs,
2173         VariableDeclaration.cs, VBArrayConstructor.cs, StringObject.cs,
2174         StringLiteral.cs, StringConstructor.cs, Statement.cs,
2175         ScriptStream.cs, ScriptObject.cs, ScriptFunction.cs,
2176         ScriptBlock.cs, RegExpObject.cs, RegExpConstructor.cs, Print.cs,
2177         Package.cs, ObjectConstructor.cs, NumberObject.cs,
2178         NumberConstructor.cs, MathObject.cs, Literal.cs,
2179         LenientGlobalObject.cs, JSVariableField.cs, JSToken.cs,
2180         JSScanner.cs, JSParser.cs, JSObject.cs, JSLocalField.cs,
2181         JSFunctionAttributeEnum.cs, JSFunctionAttibute.cs, JSField.cs,
2182         JSBuiltIn.cs, IVsaScriptScope.cs, IRedirectOutput.cs,
2183         IActivationObject.cs, GlobalScope.cs, GlobalObject.cs,
2184         FunctionObject.cs, FunctionExpression.cs, FunctionDeclaration.cs,
2185         FunctionConstructor.cs, FormalParameterList.cs, ErrorObject.cs,
2186         ErrorConstructor.cs, EnumeratorObject.cs,
2187         EnumeratorConstructor.cs, Enum.cs, Empty.cs, DocumentContext.cs,
2188         DateObject.cs, DateConstructor.cs, Context.cs, Closure.cs,
2189         BooleanObject.cs, BooleanConstructor.cs, Block.cs, BinaryOp.cs,
2190         BaseVsaEngine.cs, ArrayObject.cs, ArrayConstructor.cs,
2191         ActiveXObjectConstructor.cs, ActivationObject.cs: 
2192
2193         indentation comformance to mono style. Returned to
2194         Microsoft.JScript namespace name. Now we can build
2195         Microsoft.JScript.dll on Linux/Windows, and build mjs.exe on
2196         linux/Windows with our Microsoft.JScript.dll. To build mjs.exe:
2197         $(CSC) /r:Microsoft.JScript.dll  driver.cs. Also changed my mind
2198         about the namespace stuff, because I want people 
2199         to contribute NUnit tests for Microsoft.JScript public API.
2200                 
2201         * jscript-lexer-parser.g: Now we are back to Microsoft.JScript namespace.
2202
2203 2003-09-21    <cesar@ciencias.unam.mx>
2204
2205         * jscript-lexer-parser.g: fixed typo and added SEMI_COLON to print_statement.
2206
2207 2003-09-20    <cesar@ciencias.unam.mx>
2208
2209         * jscript-lexer-parser.g: We are little bit closer to the spec on
2210         StringLiteral definition.  
2211
2212         * jscript-lexer-parser.g: One line patch, the beauty of tests :-)
2213
2214         * jscript-lexer-parser.g: Build ast for FunctionExpression.
2215
2216         * JSObject.cs: we don't throw NotImplementedException anymore,
2217         this let us use FunctionExpression to build the ast.
2218
2219         * FunctionExpression.cs: Added a FunctionObject as field, a
2220         default constructor.
2221
2222         * FunctionObject.cs: Added default constructor.
2223
2224         * driver.cs: Deleted the Jsc class. We are not generating code
2225         now. I'm moving to provide something like mcs's EmitContext
2226         instead of the CodeGenerator class having the Reflection.Emit
2227         builders and ILGenerator. This driver is just for Lexical and
2228         Parsing phases testing.
2229
2230         * driver.cs: Now we are using the Microsoft.JScript public API
2231         functions to load the lexer and parser.
2232
2233         * ScriptBlock.cs,Block.cs: Added ToString function.
2234
2235 2003-09-20    <cesar@ciencias.unam.mx>
2236
2237         * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, Block.cs,
2238         DebugBreak.cs, Enum.cs, Equality.cs, Eval.cs, ForIn.cs,
2239         FunctionExpression.cs, Import.cs, In.cs, InstanceOf.cs,
2240         Literal.cs, NumericBinary.cs, NumericUnary.cs, Package.cs,
2241         Plus.cs, PostOrPrefixOperator.cs, Print.cs, Relational.cs,
2242         Statement.cs, StrictEquality.cs, StringLiteral.cs, Throw.cs,
2243         Try.cs, TypeOf.cs, VariableDeclaration.cs, With.cs, ast.cs, 
2244         : erased Visit method and made some mono indentation style changes.
2245
2246         * CodeGenerator.cs: commented some function calls.
2247         * FunctionDeclaration.cs: moved function attributes to
2248         FunctionObject class, erased Visit method.
2249         * FunctionObject.cs: Here is where we store a function
2250         expression/declaration info, erased Visit method.
2251         * ScriptBlock.cs: Added a Block field, Block will contain the
2252         source elements.
2253         * jscript-lexer-parser.g: updated the grammar to build the program
2254         representation based on ScriptBlock.
2255
2256 2003-09-19    <cesar@ciencias.unam.mx>
2257
2258         * JSToken.cs: public API compliance.
2259
2260 2003-09-07 Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2261
2262         * Context.cs: Added constructor and Document field.
2263         * DocumentContext.cs: Added Name field.
2264         * JSParser.cs: Integration of antlr's generated parser with
2265         JSParser public API. ScriptBlock is now the principal data structure that
2266         represents a Jscript .Net program.
2267         * JSScanner.cs: Integration of antlr's generated lexer with
2268         JSScanner public API.
2269
2270 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2271         * Added files StringLiteral.cs, CodeGenerator.cs and Print.cs.
2272
2273 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2274
2275         * jscript-lexer-parser.g: Changed the namespace to
2276         Microsoft.JScript.Tmp.
2277
2278         * jscript-lexer-parser.g: Fixwd a typo at source_elements rule.
2279
2280         * jscript-lexer-parser.g: Got the name of a
2281         global_function_declaration and also its return type if
2282         available. 
2283
2284         * jscript-lexer-parser.g: Added syntatic rule for print_statement.
2285         * jscript-lexer-parser.g: Initial construction of AST for
2286         enum_statement and package_statement.
2287
2288         * jscript-lexer-parser.g: Fixed the enum_statement to accept
2289         empty enum declarations.
2290
2291         * jscript-lexer-parser.g: Got the type of a
2292         veriable_declaration.
2293
2294         * jscript-lexer-parser.g: Initial construction of AST for
2295         primary_expression (in particular literal).
2296
2297
2298 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2299
2300         * driver.cs: Modified the driver structure to be compatible
2301         with our new CodeGenrator and SemanticAnalizer. I
2302         removed the builders from Reflection.Emit to the
2303         CodeGenerator. Added an ASTList, SemanticAnalizer and
2304         CodeGenerator here. Adde methods Run, GenerateCode
2305
2306
2307 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2308         * Statement.cs: Forgot to include it on last commit.
2309
2310 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2311         
2312         * Decided to change temporarly namespace name
2313         Microsoft.JScript to Microsoft.JScript.Tmp in order to be able
2314         to run the code generated by our CIL code generator (on  next
2315         commit will come). The problem is that we don't have the
2316         runtime support for our compiler, this involve VsaEngine class
2317         and its "friends", which I have not found a lot of
2318         doumentation for. If someone knows a docs place for them,
2319         don't hesitate to send me a email pointing to them.
2320
2321         * Changed from public to internal Visit function at some
2322         classes.
2323
2324         * Package.cs: Added Name and Members fields.
2325         
2326         * SemanticAnalizer.cs: Added methods VisitPrint and
2327         VisitStringLiteral.
2328
2329         * VariableDeclaration.cs: Added Type field.
2330
2331         * Visitor.cs: Changed from public to internal. Added
2332         VisitPrint and VisitStringLiteral methods.
2333
2334         * VsaEngine.cs: Fixed namespace name from Microsoft.JScript to
2335         Microsoft.JScript.Vsa and then to Microsoft.JScript.Vsa.Tmp.
2336         
2337
2338
2339
2340 2003-07-22  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2341
2342         * Added CmdLineError.cs and JSError.cs, last night I forgot to
2343         commit them.
2344
2345 2003-07-21 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
2346         * Added files:
2347         ArrayPrototype.cs, ArrayWrapper.cs, BitwiseBinary.cs, 
2348         BlockScope.cs, BooleanPrototype.cs, BreakOutOfFinally.cs, 
2349         CmdLineException.cs, CmdLineOptionParser.cs, 
2350         ContinueOutOfFinally.cs, Convert.cs, DatePrototype.cs, 
2351         DocumentContext.cs, EnumeratorPrototype.cs, Equality.cs, 
2352         ErrorPrototype.cs, EvalErrorObject.cs, Expando.cs, 
2353         FieldAccessor.cs, FunctionPrototype.cs, FunctionWrapper.cs, 
2354         Globals.cs, In.cs, InstanceOf.cs, JSConstructor.cs, 
2355         JScriptException.cs, JSFieldInfo.cs, JSMethodInfo.cs, JSParser.cs, 
2356         JSPrototypeObject.cs, JSScanner.cs, LateBinding.cs, 
2357         LenientArrayPrototype.cs, LenientBooleanPrototype.cs, 
2358         LenientDateConstructor.cs, LenientDatePrototype.cs, 
2359         LenientEnumeratorPrototype.cs, LenientErrorPrototype.cs, 
2360         LenientFunctionPrototype.cs, LenientMathObject.cs, 
2361         LenientNumberPrototype.cs, LenientObjectPrototype.cs, 
2362         LenientRegExpPrototype.cs, LenientStringConstructor.cs, 
2363         LenientStringPrototype.cs, LenientVBArrayPrototype.cs, 
2364         MemberInfoList.cs, MethodInvoker.cs, Missing.cs, Namespace.cs, 
2365         NotRecommendedAttribute.cs, NumberPrototype.cs, NumericBinary.cs, 
2366         NumericUnary.cs, ObjectPrototype.cs, Plus.cs, 
2367         PostOrPrefixOperator.cs, RangeErrorObject.cs, 
2368         ReferenceAttribute.cs, ReferenceErrorObject.cs, RegExpMatch.cs, 
2369         RegExpPrototype.cs, Relational.cs, ResInfo.cs, 
2370         ReturnOutOfFinally.cs, ScriptStream.cs, SimpleHashtable.cs, 
2371         StackFrame.cs, StrictEquality.cs, StringPrototype.cs, 
2372         SuperTypeMembersSorter.cs, SyntaxErrorObject.cs, TypedArray.cs, 
2373         TypeErrorObject.cs, TypeOf.cs, TypeReflector.cs, 
2374         URIErrorObject.cs, VBArrayObject.cs, VBArrayPrototype.cs, 
2375         VersionableAttribute.cs 
2376
2377         Now, I must fill in the blanks :-)
2378
2379
2380 2003-07-09  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2381         * jscript-lexer-parser.g: Added conditional_compilation_directive,
2382         which is the beginning of our support for conditional compilation
2383         statements and directives in our parser. Added
2384         cc_on_statement, and some lexer rules for getting the needed
2385         tokens (COND_SET, COND_DEBUG, COND_POSITION, COND_POSITION,
2386         COND_IF, COND_ELIF, COND_ELSE, COND_END and CC_ON.
2387
2388
2389 2003-07-03  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2390
2391         * jscript-lexer-parser.g: Changed the format of copyright notice.
2392
2393         This changes will allow the support
2394         for the grammar added by MS to EcmaScript (aka its JScript .Net),
2395         I'm still missing some, but they are on the way.
2396
2397         * jscript-lexer-parser.g: Deleted function_declaration, and
2398         added global_function_declaration and type_function_declaration.
2399         I decided  to make the grammar as strict as the MS docs mark,
2400         but there's a difference between what their docs says and what
2401         their compiler does. For this case I decided to follow the
2402         docs. A program like: 
2403                 private function F () 
2404                 {}
2405         according to the docs, would not be syntaticly correct. But the MS
2406         compiler, accepts the grammar construct and mark the error at
2407         semantic analysis phase. I followed the docs this time. 
2408
2409         * jscript-lexer-parser.g: Added debbuger_statement.
2410         * jscript-lexer-parser.g: Added import_statement.
2411         * jscript-lexer-parser.g: Added package_statement and package_member(s).
2412         * jscript-lexer-parser.g: Added super_statement.
2413         * jscript-lexer-parser.g: Added const_statement.
2414         * jscript-lexer-parser.g: Added class_statement,
2415         interfaces_list and class_members. 
2416
2417         * jscript-lexer-parser.g: Added interface_statement and
2418         interface_members.
2419
2420         * jscript-lexer-parser.g: Added enum_statement.
2421         * jscript-lexer-parser.g: Added static_statement. The rule for
2422         this syntatic construc is: static identifier { [body] }
2423         body does not get well specified in the docs. Must search wich
2424         are the possible values of it.
2425
2426         * jscript-lexer-parser.g: At variable_declaration, added
2427         support for explicit type declaration.
2428
2429         * jscript-lexer-parser.g: Added numeric_literal,
2430         DECIMAL_LITERAL and HEX_INTEGER_LITERAL.
2431
2432         * jscript-lexer-parser.g: Added modifiers, modifier, version_modifier.
2433
2434
2435 2003-06-09  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2436
2437
2438         * Added the Visit method to classes: AST, ArrayLiteral, ASTList,
2439         Block, DebugBreak, Eval, ForIn, FunctionDeclaration,
2440         FunctionExpression, Import, Package, ScriptBlock, Throw, Try,
2441         With, 
2442         
2443         That method will be the driver that will allow classes
2444         that implement the Visitor interface do a walk through the AST's
2445         elements, in particular the Semantic Analizer and the Code
2446         Generator. Every class that inherits from AST will have a Visit
2447         method, that method will receive a Visitor and a object as
2448         parameters, the only thing that it'll do is letting the Visitor
2449         call the respective method VisitX, where X is the name of the
2450         currently visited class.
2451         
2452         * ASTList.cs:Added constructor, Add, Visit, ToString  methods.
2453
2454         * FunctionDeclaration.cs: Added constructor, Visit and ToString
2455         methods.
2456         
2457         * jscript-lexer-parser.g: Added a ASTList as a parameter to the
2458         program (the main entry of the parser). Also added as parameters: 
2459                 - An AST to source_element.
2460                 - A Statement to statement.
2461                 - A VariableStatement to variable_statement.
2462                 - A VariableStatement to variable_declaration_list.
2463                 - A FormalParamerList by formal_parameter_list.
2464                 - A ASTList by function_body.
2465         
2466         And now some rules return objects:
2467                 - A VariableDeclaration by variable_declaration.
2468                 - A Functiondeclaration by function_declaration.
2469
2470         * driver.cs: Added the construction of the AST of the EcmaScript
2471         program.
2472
2473         * Visitor.cs: Added this file. It's the visitor interface. 
2474
2475         * VariableDeclaration.cs: Added this class, it's the AST
2476         representation of a variable declaration.
2477
2478         * Statement.cs: Added this file. It's the logical representation
2479         of a Statement.
2480
2481         * VariableStatement.cs: Added this class. It's the AST
2482         representation of a chain of variable declarations.
2483         
2484         * FormalParameterList.cs: The function declaration needs to store
2485         its parameter, we will put them on this class.
2486
2487         * SemanticAnalizer.cs: Added this class. I'll use the Visitor pattern in order to
2488         implement the semantic analysis and code generation
2489         phases. SemanticAnalizer and CodeGenerator will implement the
2490         Visitor interface, they will walk a program's
2491         AST tree and do their respective work.
2492
2493         * IdentificationTable.cs: Added this class. The SymbolTable will be used
2494         by the SemanticAnalyzer in order to keep track of the variable
2495         declaration encountered, etc..
2496
2497         * SymbolTable.cs: A simple hashtable but for commodity i'll call
2498         it this way.
2499
2500         
2501 2003-05-03  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2502
2503         * jscript-lexer-parser.g:
2504         - Deleted the assignment_operator COMPOUND_ASSIGNMENT, and added
2505         MULTIPLICATION_ASSIGN, DIVISION_ASSIGN, REMAINDER_ASSIGN,
2506         ADDITION_ASSIGN, SUBSTRACTION_ASSIGN, SIGNED_LEFT_SHIFT_ASSIGN,
2507         SIGNED_RIGHT_SHIFT_ASSIGN, UNSIGNED_RIGHT_SHIFT_ASSIGN,
2508         BITWISE_AND_ASSIGN, BITWISE_OR_ASSIGN.
2509         - Changed INTERROGATION to CONDITIONAL.
2510         - Changed TRIANGLE to BITWISE_XOR.
2511         - Changed SLASH to DIVISION.
2512         - Changed PERCENT to REMAINDER.
2513         - Changed ADMIRATION to LOGICAL_NOT
2514         - Added BITWISE_NOT (~).
2515         - Added the INCREMENT and DECREMENT rules for
2516         left_hand_side_expression.
2517         - Increased lexer lookup from 2 to 4.
2518         - Redefined the definitions of: L_THAN, G_THAN, MINUS, TIMES,
2519         BITWISE_AND, BITWISE_OR,
2520         - Added operator: EQUALS, DOES_NOT_EQUALS, STRICT_EQUALS,
2521         REMAINDER, UNSIGNED_RIGHT_SHIFT.
2522         - Added the recursion rules for equality_expression.
2523         - Added the recursion rules for shift_expression.
2524         - Now we skip tabs.
2525         - The most important thing, added support for expressions like:
2526         sdf.[hgh], cool!
2527
2528 2003-04-20      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2529
2530         * driver.cs: 
2531         - Erased the Context class, it was used for the first
2532         test of the print_statement and Reflection.Emit. As I erased the
2533         Program, SourceElements, SourceElement from the ANTLR grammar (for
2534         the rework of the AST tied to the MS JScript public API), I erased
2535         some uses in here.
2536         - Erased the methods: EmitJScript0Type, EmitJScript0Cons,
2537         EmitGlobalCode, EmitJScript0, EmitJScriptMainType,
2538         EmitJScriptMainCons, EmitJScriptMainFunction, EmitJScriptMain,
2539         Emit.
2540
2541         * jscript-lexer-parser.g: 
2542         - Erased the references to the classes Program, SourceElements,
2543         SourceElement, Statement, FunctionDeclaration and erased
2544         print_statement rule. 
2545
2546         * JSCriptLexer.cs JScriptParser.cs and the other files generated
2547         by antlr, reflect changes from the grammar changes.
2548
2549 2003-04-19      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2550         * Added stubs for the classes:
2551         ASTList.cs 
2552         ActivationObject.cs 
2553         ActiveXObjectConstructor.cs 
2554         ArrayConstructor.cs 
2555         ArrayLiteral.cs 
2556         ArrayObject.cs 
2557         AssemblyCustomAttributeList.cs 
2558         BaseVsaEngine.cs 
2559         BinaryOp.cs 
2560         Binding.cs 
2561         Block.cs 
2562         BooleanConstructor.cs 
2563         BooleanObject.cs 
2564         Closure.cs 
2565         Context.cs 
2566         DateConstructor.cs 
2567         DateObject.cs 
2568         DebugBreak.cs 
2569         Empty.cs 
2570         EnumeratorConstructor.cs 
2571         EnumeratorObject.cs 
2572         ErrorConstructor.cs 
2573         ErrorObject.cs 
2574         Eval.cs 
2575         ForIn.cs 
2576         FunctionConstructor.cs 
2577         FunctionDeclaration.cs 
2578         FunctionExpression.cs 
2579         FunctionObject.cs 
2580         GlobalObject.cs 
2581         GlobalScope.cs 
2582         IActivationObject.cs 
2583         IRedirectOutput.cs 
2584         IVsaScriptScope.cs 
2585         Import.cs 
2586         JSBuiltIn.cs 
2587         JSField.cs 
2588         JSFunctionAttribute.cs 
2589         JSFunctionAttributeEnum.cs 
2590         JSLocalField.cs 
2591         JSObject.cs 
2592         JSToken.cs 
2593         JSVariableField.cs 
2594         LenientGlobalObject.cs 
2595         MathObject.cs 
2596         NumberConstructor.cs 
2597         NumberObject.cs 
2598         ObjectConstructor.cs 
2599         Package.cs 
2600         RegExpConstructor.cs 
2601         RegExpObject.cs 
2602         ScriptBlock.cs 
2603         ScriptFunction.cs 
2604         ScriptObject.cs 
2605         StringConstructor.cs 
2606         StringObject.cs 
2607         Throw.cs 
2608         Try.cs 
2609         UnaryOp.cs 
2610         VBArrayConstructor.cs 
2611         VsaEngine.cs 
2612         With.cs         
2613         
2614
2615 2003-04-11      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2616
2617         * jscript-lexer-parser.g:
2618         - Added rules for: continue_statement, break_statement,
2619         return_statement, throw statement (all of them do not ensure that
2620         no LineSeparator appears between the keyword on the left and the
2621         identifier, expression or semicolon on the right, that must be fixed).
2622         - Added single line comments rule.
2623
2624 2003-04-08      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2625
2626         * jscript-lexer-parser.g: Added syntatic rule for:
2627         - if_statement.
2628         - while and for-in subrules of iteration_statement.
2629         - Added array_literal - got tricky - I just could get the simplest rule going :)
2630         - Added elision.
2631
2632         
2633 2003-04-08      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2634
2635         * jscript-lexer-parser.g:
2636         - Syntatic rule for iteration_statement.
2637         - "do" subrule for it.
2638         - Added ((L_THAN | G_THAN | LE_THAN | GE_THAN | "instanceof" |
2639         "in") relational_expression | ) rule to relational_expression.
2640         -Added function_expression syntatic rule.
2641         - Added STRING_LITERAL to literal rules.
2642         - "Less/Greater or equal than" lexer rule.
2643
2644 2003-04-03      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2645
2646         * jscript-lexer-parser.g: Added switch_statement rule, case_block, case_clauses, case_clause, default_clause, labelled_statement, try_statement, catch_exp, finally_exp.
2647
2648 2003-04-01    Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2649
2650         * jscript-lexer-parser.g: Added the grammar rules for: with_statement, object_literal, ( expression ), property_name_and_value_list, property_name and expression.
2651         
2652
2653 2003-03-30    Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2654
2655         * Added a README file. Explains the dependencies and build process.
2656
2657 2003-03-30   Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
2658
2659         * Added this ChangeLog file.
2660         
2661         * ast.cs: Added this file. Contains the classes used for building
2662         the EcmaScript 's AST.
2663
2664         * JScript*: These are the files generated by antlr (the parser generator). 
2665
2666         * TODOAttribute.cs: Changed the namespace in order to use it freely on Microsoft.JScript.
2667
2668         * driver.cs: Added this file. Contains the compiler entry point. And some Reflection.Emit methods,
2669         that will be moved to other file in the future.
2670
2671         * jscript-lexer-parser.g: The EcmaScript's antlr grammar.