JS.NET: Report #6

0 views
Skip to first unread message

Florian Gross

unread,
Aug 15, 2005, 12:03:47 AM8/15/05
to mono...@googlegroups.com
Moin!

Woah. Seventh report already. Who would have thunk we would be at this
point so fast? Oh, yeah, while we're talking about fast: Sorry for
delaying this report so much.


This week's success
===================

* I was able to bump the test count from last week's 3262 to 3386. Don't
we all just hate how hard it is to bump test numbers? ;)

* Seventh patch went in. Here's the Changelog:

> 2005-08-13 Florian Gross <fl...@ccan.de>
>
> * DateConstructor.cs, StringConstructor.cs, ObjectConstructor.cs,
> NumberConstructor.cs, FunctionConstructor.cs, BooleanConstructor.cs,
> ArrayConstructor.cs, RegExpConstructor.cs, ErrorConstructor.cs:
> Added name
> * ScriptObject.cs: Added HasMethod, CallMethod uses
> SemanticAnalyser.map_to_prototype and forwards engine
> * ArrayPrototype.cs: Implemented sort, added SortHelper
> * expression.cs: Implemented delete operator code generation
> * NumericUnary.cs: Implemented EvaluateUnary (currently unused)
> * ObjectPrototype.cs: smartToString falls back to toString instead
> of duplicated code
> * StringPrototype.cs: Fixed replace logic for replacement functions
> * FunctionDeclaration.cs: More user function infrastructure
> * FunctionObject.cs: Implemented ToString for user functions. Moved
> name, return_type, parameters, ToString up to ScriptFunction.
> Constructors set _prototype
> * Closure.cs: More user function infrastructure
> * Convert.cs: ToString Uses smartToString if no custom toString
> exists
> * BooleanObject.cs: Constructor now uses Convert.ToBoolean
> * LateBindings.cs: GetMethodFlags logic for anonymous functions.
> Initial implementation of DeleteMember. Implemented constructor
> cases in Call and CallValue
> * Relational.cs: Implemented EvaluateRelational, JScriptCompare
> * Parser.cs: Fixed bugs in decompiler calls so that the decompiled
> source code matches the original one
> * FunctionPrototype.cs: Fixed toString function check
> * Decompiler.cs: Adjusted indent properties. Made AddEOL not add
> semicolons to lines which already end with one. Implemented double
> literal logic
> * SemanticAnalyser.cs: Added more prototype mappings
> * ErrorConstructor.cs: Added ErrorTypeToName
> * FunctionExpression.cs: More user function infrastructure
> * ScriptFunction.cs: Added vsa_engine. Moved name, return_type,
> parameters, encodedSource, ToString up from FunctionObject.
> Implemented CreateInstance. Added initial setter for prototype.
> Added GetDefaultValue

* Started working on a few other bugs. Here's the list of the ones I
already solved: (Fixes not yet in SVN.)

* Syntax error in regular expression (octal parsing in
System.Text.RegularExpressions): This involved implementing back
reference vs. octal literal logic in the RE parser -- I also implemented
non-ECMA logic for it, but I probably don't get all edge cases of that
just right. I've also implemented [A-\132] to mean the same as [A-Z].

I've heard that Raja R. Harinath (who is maintaining Text.RE) will be
back from vacation tomorrow and will have a look at merging this and the
older patch that fixes ignore case logic for char classes in some cases.

* Fixed a bug in the JScript parser that would misparse the "in"
operator in argument lists.

* Implemented compiler and run time logic for ++obj.foo, obj["bar"]++
and similar. This was my most complex change to the IL generator so far,
but it's all the more cool because it works.

* Setting fields on the global object via late binding logic works
now. This involved moving up a bit of logic from JSObject to ScriptObject.

* Made var x = "012"; print(x++); output the correct 10 instead of
012. (We weren't using Convert.ToNumber() on the old value. Easier to
fix than I thought.)

* Cesar is successfully running 2938 tests in the new code generation
branch. It will probably go in by the middle of next week which is cool!

* Got mentioned on Slashdot (together with us lucky Mono Summer of Code
people) -- the totally slammed my Ruby WEBrick server with 20 requests
per day. Talked to very cool people (which wasn't quite related to
Slashdot, I think.)


This week's trouble
===================

* I'm waiting for Ruby.NET to get ready for run time hacking -- which
might happen on Monday. There's also cool people wanting to get involved
with the project and you can be part of them! What better way is there
to learn a new hip language than by reimplementing its C libraries in
C#? Don't miss this chance!

* I know. It probably sounds odd, but I'm still doing some waiting as well.


This week's goals
=================

* Got the test suite into SVN as soon as possible.

* Working closures are nice and Cesar helped out so I could do
infrastructure. (He implemented the complete Disassembler.cs which we
might use in the future to pretty-print JavaScript source code and which
we are now using to get function's source code. He also was very helpful
with figuring out how to do things.)

* Fixed some compiler bugs while Cesar is busy with more complex stuff.

* Got more tests to run. -- Yeah, it wasn't that many, but once we have
less invalid IL this should all get easier.

* Fixed bugs in tests that don't work yet. This means I won't have to
implement those to get things into a good state. There's still ones to
document, though.

* I didn't touch the runner, but it seems that the current version is
sometimes showing the same odd behavior for Cesar than it was for me
after adding new features. Is there anything odd about .WaitForExit()
that could cause freezes even when the application is no longer running?


Next week's goals
=================

* There's still a few bugs with complex prototype code, but from what
I've heard Netscape 2 had similar bugs. Probably still a good idea to
fix them, even if it needs some detailed investigating.

* Currently, the compiler will just bail out if it sees a constant name
in a constructor call that it doesn't know. It should generate
LateBinding logic instead. This happens with "new Math()" and is
somewhat complex to fix -- but it should be doable.

* After we have less invalid IL there will once again be a flood of
freshly discovered new run time bugs. Fixing them is important.

* Have a look at the Ruby.NET code once it is in the repository and
figure out if I can help by writing code. Juggle time carefully between
Ruby.NET and JScript.NET.

* Feel free to suggest more stuff. -- On the other hand nobody has ever
really done this formally via this list or mail. Are you guys still
listening? :)


Random stuff
============

Thanks go to Miguel and Cesar for being on IRC and taking the time to
respond. It helps a lot if you can talk about problems in time.

Okay, I think that is it for this week. Thanks for all the help I have
received from the Mono folks so far -- it is really a nice community and
that is a good thing.

Patches and tests are available from http://flgr.dyndns.org/mono/

Regards,
Florian Gross

Reply all
Reply to author
Forward
0 new messages