[pypy-svn] r65214 - pypy/branch/js-refactoring/pypy/lang/js
jandem at codespeak.net
jandem at codespeak.net
Mon May 11 15:11:52 CEST 2009
Author: jandem
Date: Mon May 11 15:11:51 2009
New Revision: 65214
Modified:
pypy/branch/js-refactoring/pypy/lang/js/interpreter.py
Log:
Ignore undefined argument remove some whitespace
Modified: pypy/branch/js-refactoring/pypy/lang/js/interpreter.py
==============================================================================
--- pypy/branch/js-refactoring/pypy/lang/js/interpreter.py (original)
+++ pypy/branch/js-refactoring/pypy/lang/js/interpreter.py Mon May 11 15:11:51 2009
@@ -586,20 +586,17 @@
for i in range(length):
P = str(i)
-
if not this.HasProperty(P):
# non existing property
continue
-
obj = this.Get(ctx, str(i))
if obj is w_Undefined:
undefs += 1
continue
-
values.append(obj)
# sort all values
- if len(args) > 0:
+ if len(args) > 0 and args[0] is not w_Undefined:
sorter = Sorter(values, compare_fn=args[0], ctx=ctx)
else:
sorter = Sorter(values, ctx=ctx)
@@ -621,7 +618,6 @@
while length > newlength:
this.Delete(str(newlength))
newlength += 1
-
return this
class W_DateFake(W_NewBuiltin): # XXX This is temporary
More information about the Pypy-commit
mailing list