Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Best way to fix incorrect primitive scope resolution when used with many scopes

1 view
Skip to first unread message

Marc Guillemot

unread,
Oct 1, 2008, 5:42:45 AM10/1/08
to
Hi,

I'm working on the resolution of bug 374918 "String primitive prototype
wrongly resolved when used with many top scopes"
(https://bugzilla.mozilla.org/show_bug.cgi?id=374918)

After trying different solutions, I come now to the conclusion that to
resolve correctly the prototype of primitive objects... storage of
primitive objects has to be *totally avoided* and replace by the
NativeXxxx (NativeString, NativeNumber and NativeBoolean) otherwise the
information on the scope is lost.

There are 2 solutions (as far as I can currently see) to implement it:
- wrap primitives in NativeXxxx asap (ie when put in the stack)
- wrap primitives in NativeXxxx first when they are "used", which means
on args just before function call, on the value just before setting
property, ...

What would be the best way?

Cheers,
Marc.
--
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

0 new messages