[pypy-commit] lang-js default: 11.4.4
stepahn
noreply at buildbot.pypy.org
Fri Dec 28 11:34:21 CET 2012
Author: Stephan <stephan at stzal.com>
Branch:
Changeset: r240:998b48e0d926
Date: 2012-06-02 11:13 +0200
http://bitbucket.org/pypy/lang-js/changeset/998b48e0d926/
Log: 11.4.4
diff --git a/js/baseop.py b/js/baseop.py
--- a/js/baseop.py
+++ b/js/baseop.py
@@ -2,7 +2,7 @@
""" Base operations implementations
"""
-from js.jsobj import W_String, W_IntNumber, W_FloatNumber
+from js.jsobj import W_String, W_IntNumber, W_FloatNumber, _w
from js.execution import ThrowException, JsTypeError
from pypy.rlib.rarithmetic import r_uint, intmask, ovfcheck
@@ -11,6 +11,7 @@
import math
+# 11.6.1
def plus(ctx, nleft, nright):
if isinstance(nleft, W_String) or isinstance(nright, W_String):
sleft = nleft.to_string()
diff --git a/js/opcodes.py b/js/opcodes.py
--- a/js/opcodes.py
+++ b/js/opcodes.py
@@ -333,13 +333,15 @@
class INCR(BaseUnaryOperation):
def eval(self, ctx):
value = ctx.stack_pop()
- newvalue = increment(ctx, value)
+ num = _w(value.ToNumber())
+ newvalue = increment(ctx, num)
ctx.stack_append(newvalue)
class DECR(BaseUnaryOperation):
def eval(self, ctx):
value = ctx.stack_pop()
- newvalue = decrement(ctx, value)
+ num = _w(value.ToNumber())
+ newvalue = decrement(ctx, num)
ctx.stack_append(newvalue)
class GT(BaseBinaryComparison):
More information about the pypy-commit
mailing list