Indeed. Not only is "undefined" a global property, it's only required to be DontDelete and DontEnum, not ReadOnly, so anybody can overwrite the value. JSVM is following the specification here. Bad spec, bad! If you want a faster "undefined" value, you can either declare a local variable and not initialize it, or use (void 0) or something similar, but we can't expect people to actually do that in practice.
2008/10/2 codesite-noreply <[EMAIL PROTECTED]> > > Issue 102: if (A == undefined) is slow > http://code.google.com/p/v8/issues/detail?id=102 > > Comment #1 by [EMAIL PROTECTED]: > I take a step back, undefined is a property of the global object, not a > literal. For > instance: > > var undefined = 200; > print(undefined); > > JSVM is happy to print out 200. > > > > -- > You received this message because you are listed in the owner > or CC fields of this issue, or because you starred this issue. > You may adjust your issue notification preferences at: > http://code.google.com/hosting/settings > > > > -- Lasse R.H. Nielsen [EMAIL PROTECTED] 'Faith without judgement merely degrades the spirit divine' --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
