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