⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203499 in webkit


Ignore:
Timestamp:
Jul 21, 2016, 12:33:28 AM (10 years ago)
Author:
Yusuke Suzuki
Message:

[ES7] Introduce exponentiation expression
​https://bugs.webkit.org/show_bug.cgi?id=159969

Reviewed by Saam Barati.

This patch implements the exponentiation expression, e.g. x ** y.
The exponentiation expression is introduced in ECMA262 2016 and ECMA262 2016
is already released. So this is not the draft spec.

The exponentiation expression has 2 interesting points.

  1. Right associative

To follow the Math expression, operator is right associative.
When we execute x ** y ** z, this is handled as x ** (y ** z), not (x ** y) ** z.
This patch introduces the right associativity to the binary operator and handles it
in the operator precedence parser in Parser.cpp.

  1. LHS of the exponentiation expression is UpdateExpression

ExponentiationExpression[Yield]:

UnaryExpression?Yield
UpdateExpression?Yield ExponentiationExpression?Yield

As we can see, the left hand side of the ExponentiationExpression is UpdateExpression, not UnaryExpression.
It means that +x ** y becomes a syntax error. This is intentional. Without superscript in JS,
-x**y is confusing between -(x ** y) and (-x) ** y. So ECMA262 intentionally avoids UnaryExpression here.
If we need to use a negated value, we need to write parentheses explicitly e.g. (-x) ** y.
In this patch, we ensure that the left hand side is not an unary expression by checking an operator in
parseBinaryExpression. This works since ** has the highest operator precedence in the binary operators.

We introduce a new bytecode, op_pow. That simply works as similar as the other binary operators.
And it is converted to ArithPow in DFG and handled in DFG and FTL.
In this patch, we take the approach just introducing a new bytecode instead of calling Math.pow.
This is because we would like to execute ToNumber in the caller side, not in the callee (Math.pow) side.
And we don't want to compile into the following.

lhsNumber = to_number (lhs)
rhsNumber = to_number (rhs)
call Math.pow(lhsNumber, rhsNumber)

We ensure that this patch passes all the test262 tests related to the exponentiation expression.

The only sensitive part to the performance is the parser changes.
So we measured the code-load performance and it is neutral in my x64 Linux box (hanayamata).

Collected 30 samples per benchmark/VM, with 30 VM invocations per benchmark. Emitted a call to
gc() between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used
the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark
execution times with 95% confidence intervals in milliseconds.

baseline patched

closure 0.60499+-0.00250 0.60180+-0.00244
jquery 7.89175+-0.02433 ? 7.91287+-0.04759 ?

<geometric> 2.18499+-0.00523 2.18207+-0.00689 might be 1.0013x faster

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):

  • bytecompiler/NodesCodegen.cpp:

(JSC::emitReadModifyAssignment):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_pow):

  • llint/LowLevelInterpreter.asm:
  • parser/ASTBuilder.h:

(JSC::ASTBuilder::operatorStackShouldReduce):
(JSC::ASTBuilder::makePowNode):
(JSC::ASTBuilder::makeMultNode):
(JSC::ASTBuilder::makeDivNode):
(JSC::ASTBuilder::makeModNode):
(JSC::ASTBuilder::makeSubNode):
(JSC::ASTBuilder::makeBinaryNode):
(JSC::ASTBuilder::operatorStackHasHigherPrecedence): Deleted.

  • parser/Lexer.cpp:

(JSC::Lexer<T>::lex):

  • parser/NodeConstructors.h:

(JSC::PowNode::PowNode):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::isUnaryOpExcludingUpdateOp):
(JSC::Parser<LexerType>::parseBinaryExpression):
(JSC::isUnaryOp): Deleted.

  • parser/ParserTokens.h:

(JSC::isUpdateOp):
(JSC::isUnaryOp):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::operatorStackPop):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • tests/stress/pow-basics.js: Added.

(valuesAreClose):
(mathPowDoubleDouble1):
(mathPowDoubleInt1):
(test1):
(mathPowDoubleDouble2):
(mathPowDoubleInt2):
(test2):
(mathPowDoubleDouble3):
(mathPowDoubleInt3):
(test3):
(mathPowDoubleDouble4):
(mathPowDoubleInt4):
(test4):
(mathPowDoubleDouble5):
(mathPowDoubleInt5):
(test5):
(mathPowDoubleDouble6):
(mathPowDoubleInt6):
(test6):
(mathPowDoubleDouble7):
(mathPowDoubleInt7):
(test7):
(mathPowDoubleDouble8):
(mathPowDoubleInt8):
(test8):
(mathPowDoubleDouble9):
(mathPowDoubleInt9):
(test9):
(mathPowDoubleDouble10):
(mathPowDoubleInt10):
(test10):
(mathPowDoubleDouble11):
(mathPowDoubleInt11):
(test11):

  • tests/stress/pow-coherency.js: Added.

(pow42):
(build42AsDouble.opaqueAdd):
(build42AsDouble):
(powDouble42):
(clobber):
(pow42NoConstantFolding):
(powDouble42NoConstantFolding):

  • tests/stress/pow-evaluation-order.js: Added.

(shouldBe):
(throw.new.Error):

  • tests/stress/pow-expects-update-expression-on-lhs.js: Added.

(testSyntax):
(testSyntaxError):
(throw.new.Error):
(let.token.of.tokens.testSyntax.pow):
(testSyntax.pow):

  • tests/stress/pow-integer-exponent-fastpath.js: Added.

(valuesAreClose):
(mathPowDoubleDoubleTestExponentFifty):
(mathPowDoubleIntTestExponentFifty):
(testExponentFifty):
(mathPowDoubleDoubleTestExponentTenThousands):
(mathPowDoubleIntTestExponentTenThousands):
(testExponentTenThousands):

  • tests/stress/pow-nan-behaviors.js: Added.

(testIntegerBaseWithNaNExponentStatic):
(mathPowIntegerBaseWithNaNExponentDynamic):
(testIntegerBaseWithNaNExponentDynamic):
(testFloatingPointBaseWithNaNExponentStatic):
(mathPowFloatingPointBaseWithNaNExponentDynamic):
(testFloatingPointBaseWithNaNExponentDynamic):
(testNaNBaseStatic):
(mathPowNaNBaseDynamic1):
(mathPowNaNBaseDynamic2):
(mathPowNaNBaseDynamic3):
(mathPowNaNBaseDynamic4):
(testNaNBaseDynamic):
(infiniteExponentsStatic):
(mathPowInfiniteExponentsDynamic1):
(mathPowInfiniteExponentsDynamic2):
(mathPowInfiniteExponentsDynamic3):
(mathPowInfiniteExponentsDynamic4):
(infiniteExponentsDynamic):

  • tests/stress/pow-simple.js: Added.

(shouldBe):
(throw.new.Error):

  • tests/stress/pow-stable-results.js: Added.

(opaquePow):
(isIdentical):

  • tests/stress/pow-to-number-should-be-executed-in-code-side.js: Added.

(shouldBe):
(throw.new.Error):

  • tests/stress/pow-with-constants.js: Added.

(exponentIsZero):
(testExponentIsZero):
(exponentIsOne):
(testExponentIsOne):
(powUsedAsSqrt):
(testPowUsedAsSqrt):
(powUsedAsOneOverSqrt):
(testPowUsedAsOneOverSqrt):
(powUsedAsSquare):
(testPowUsedAsSquare):
(intIntConstantsSmallNumbers):
(intIntConstantsLargeNumbers):
(intIntSmallConstants):
(intDoubleConstants):
(doubleDoubleConstants):
(doubleIntConstants):
(testBaseAndExponentConstantLiterals):
(exponentIsIntegerConstant):
(testExponentIsIntegerConstant):
(exponentIsDoubleConstant):
(testExponentIsDoubleConstant):
(exponentIsInfinityConstant):
(testExponentIsInfinityConstant):
(exponentIsNegativeInfinityConstant):
(testExponentIsNegativeInfinityConstant):

  • tests/stress/pow-with-never-NaN-exponent.js: Added.

(exponentIsNonNanDouble1):
(exponentIsNonNanDouble2):
(testExponentIsDoubleConstant):

  • tests/test262.yaml:
Location:
trunk/Source/JavaScriptCore
Files:
9 added
23 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r203491 r203499  
     12016-07-20  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [ES7] Introduce exponentiation expression
     4        https://bugs.webkit.org/show_bug.cgi?id=159969
     5
     6        Reviewed by Saam Barati.
     7
     8        This patch implements the exponentiation expression, e.g. `x ** y`.
     9        The exponentiation expression is introduced in ECMA262 2016 and ECMA262 2016
     10        is already released. So this is not the draft spec.
     11
     12        The exponentiation expression has 2 interesting points.
     13
     14        1. Right associative
     15
     16            To follow the Math expression, ** operator is right associative.
     17            When we execute `x ** y ** z`, this is handled as `x ** (y ** z)`, not `(x ** y) ** z`.
     18            This patch introduces the right associativity to the binary operator and handles it
     19            in the operator precedence parser in Parser.cpp.
     20
     21        2. LHS of the exponentiation expression is UpdateExpression
     22
     23            ExponentiationExpression[Yield]:
     24                UnaryExpression[?Yield]
     25                UpdateExpression[?Yield] ** ExponentiationExpression[?Yield]
     26
     27            As we can see, the left hand side of the ExponentiationExpression is UpdateExpression, not UnaryExpression.
     28            It means that `+x ** y` becomes a syntax error. This is intentional. Without superscript in JS,
     29            `-x**y` is confusing between `-(x ** y)` and `(-x) ** y`. So ECMA262 intentionally avoids UnaryExpression here.
     30            If we need to use a negated value, we need to write parentheses explicitly e.g. `(-x) ** y`.
     31            In this patch, we ensure that the left hand side is not an unary expression by checking an operator in
     32            parseBinaryExpression. This works since `**` has the highest operator precedence in the binary operators.
     33
     34        We introduce a new bytecode, op_pow. That simply works as similar as the other binary operators.
     35        And it is converted to ArithPow in DFG and handled in DFG and FTL.
     36        In this patch, we take the approach just introducing a new bytecode instead of calling Math.pow.
     37        This is because we would like to execute ToNumber in the caller side, not in the callee (Math.pow) side.
     38        And we don't want to compile ** into the following.
     39
     40            lhsNumber = to_number (lhs)
     41            rhsNumber = to_number (rhs)
     42            call Math.pow(lhsNumber, rhsNumber)
     43
     44        We ensure that this patch passes all the test262 tests related to the exponentiation expression.
     45
     46        The only sensitive part to the performance is the parser changes.
     47        So we measured the code-load performance and it is neutral in my x64 Linux box (hanayamata).
     48
     49            Collected 30 samples per benchmark/VM, with 30 VM invocations per benchmark. Emitted a call to
     50            gc() between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used
     51            the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark
     52            execution times with 95% confidence intervals in milliseconds.
     53
     54                                     baseline                  patched
     55
     56            closure              0.60499+-0.00250          0.60180+-0.00244
     57            jquery               7.89175+-0.02433    ?     7.91287+-0.04759       ?
     58
     59            <geometric>          2.18499+-0.00523          2.18207+-0.00689         might be 1.0013x faster
     60
     61        * bytecode/BytecodeList.json:
     62        * bytecode/BytecodeUseDef.h:
     63        (JSC::computeUsesForBytecodeOffset):
     64        (JSC::computeDefsForBytecodeOffset):
     65        * bytecode/CodeBlock.cpp:
     66        (JSC::CodeBlock::dumpBytecode):
     67        * bytecompiler/NodesCodegen.cpp:
     68        (JSC::emitReadModifyAssignment):
     69        * dfg/DFGByteCodeParser.cpp:
     70        (JSC::DFG::ByteCodeParser::parseBlock):
     71        * dfg/DFGCapabilities.cpp:
     72        (JSC::DFG::capabilityLevel):
     73        * jit/JIT.cpp:
     74        (JSC::JIT::privateCompileMainPass):
     75        * jit/JIT.h:
     76        * jit/JITArithmetic.cpp:
     77        (JSC::JIT::emit_op_pow):
     78        * llint/LowLevelInterpreter.asm:
     79        * parser/ASTBuilder.h:
     80        (JSC::ASTBuilder::operatorStackShouldReduce):
     81        (JSC::ASTBuilder::makePowNode):
     82        (JSC::ASTBuilder::makeMultNode):
     83        (JSC::ASTBuilder::makeDivNode):
     84        (JSC::ASTBuilder::makeModNode):
     85        (JSC::ASTBuilder::makeSubNode):
     86        (JSC::ASTBuilder::makeBinaryNode):
     87        (JSC::ASTBuilder::operatorStackHasHigherPrecedence): Deleted.
     88        * parser/Lexer.cpp:
     89        (JSC::Lexer<T>::lex):
     90        * parser/NodeConstructors.h:
     91        (JSC::PowNode::PowNode):
     92        * parser/Nodes.h:
     93        * parser/Parser.cpp:
     94        (JSC::Parser<LexerType>::parseAssignmentExpression):
     95        (JSC::isUnaryOpExcludingUpdateOp):
     96        (JSC::Parser<LexerType>::parseBinaryExpression):
     97        (JSC::isUnaryOp): Deleted.
     98        * parser/ParserTokens.h:
     99        (JSC::isUpdateOp):
     100        (JSC::isUnaryOp):
     101        * parser/SyntaxChecker.h:
     102        (JSC::SyntaxChecker::operatorStackPop):
     103        * runtime/CommonSlowPaths.cpp:
     104        (JSC::SLOW_PATH_DECL):
     105        * runtime/CommonSlowPaths.h:
     106        * tests/stress/pow-basics.js: Added.
     107        (valuesAreClose):
     108        (mathPowDoubleDouble1):
     109        (mathPowDoubleInt1):
     110        (test1):
     111        (mathPowDoubleDouble2):
     112        (mathPowDoubleInt2):
     113        (test2):
     114        (mathPowDoubleDouble3):
     115        (mathPowDoubleInt3):
     116        (test3):
     117        (mathPowDoubleDouble4):
     118        (mathPowDoubleInt4):
     119        (test4):
     120        (mathPowDoubleDouble5):
     121        (mathPowDoubleInt5):
     122        (test5):
     123        (mathPowDoubleDouble6):
     124        (mathPowDoubleInt6):
     125        (test6):
     126        (mathPowDoubleDouble7):
     127        (mathPowDoubleInt7):
     128        (test7):
     129        (mathPowDoubleDouble8):
     130        (mathPowDoubleInt8):
     131        (test8):
     132        (mathPowDoubleDouble9):
     133        (mathPowDoubleInt9):
     134        (test9):
     135        (mathPowDoubleDouble10):
     136        (mathPowDoubleInt10):
     137        (test10):
     138        (mathPowDoubleDouble11):
     139        (mathPowDoubleInt11):
     140        (test11):
     141        * tests/stress/pow-coherency.js: Added.
     142        (pow42):
     143        (build42AsDouble.opaqueAdd):
     144        (build42AsDouble):
     145        (powDouble42):
     146        (clobber):
     147        (pow42NoConstantFolding):
     148        (powDouble42NoConstantFolding):
     149        * tests/stress/pow-evaluation-order.js: Added.
     150        (shouldBe):
     151        (throw.new.Error):
     152        * tests/stress/pow-expects-update-expression-on-lhs.js: Added.
     153        (testSyntax):
     154        (testSyntaxError):
     155        (throw.new.Error):
     156        (let.token.of.tokens.testSyntax.pow):
     157        (testSyntax.pow):
     158        * tests/stress/pow-integer-exponent-fastpath.js: Added.
     159        (valuesAreClose):
     160        (mathPowDoubleDoubleTestExponentFifty):
     161        (mathPowDoubleIntTestExponentFifty):
     162        (testExponentFifty):
     163        (mathPowDoubleDoubleTestExponentTenThousands):
     164        (mathPowDoubleIntTestExponentTenThousands):
     165        (testExponentTenThousands):
     166        * tests/stress/pow-nan-behaviors.js: Added.
     167        (testIntegerBaseWithNaNExponentStatic):
     168        (mathPowIntegerBaseWithNaNExponentDynamic):
     169        (testIntegerBaseWithNaNExponentDynamic):
     170        (testFloatingPointBaseWithNaNExponentStatic):
     171        (mathPowFloatingPointBaseWithNaNExponentDynamic):
     172        (testFloatingPointBaseWithNaNExponentDynamic):
     173        (testNaNBaseStatic):
     174        (mathPowNaNBaseDynamic1):
     175        (mathPowNaNBaseDynamic2):
     176        (mathPowNaNBaseDynamic3):
     177        (mathPowNaNBaseDynamic4):
     178        (testNaNBaseDynamic):
     179        (infiniteExponentsStatic):
     180        (mathPowInfiniteExponentsDynamic1):
     181        (mathPowInfiniteExponentsDynamic2):
     182        (mathPowInfiniteExponentsDynamic3):
     183        (mathPowInfiniteExponentsDynamic4):
     184        (infiniteExponentsDynamic):
     185        * tests/stress/pow-simple.js: Added.
     186        (shouldBe):
     187        (throw.new.Error):
     188        * tests/stress/pow-stable-results.js: Added.
     189        (opaquePow):
     190        (isIdentical):
     191        * tests/stress/pow-to-number-should-be-executed-in-code-side.js: Added.
     192        (shouldBe):
     193        (throw.new.Error):
     194        * tests/stress/pow-with-constants.js: Added.
     195        (exponentIsZero):
     196        (testExponentIsZero):
     197        (exponentIsOne):
     198        (testExponentIsOne):
     199        (powUsedAsSqrt):
     200        (testPowUsedAsSqrt):
     201        (powUsedAsOneOverSqrt):
     202        (testPowUsedAsOneOverSqrt):
     203        (powUsedAsSquare):
     204        (testPowUsedAsSquare):
     205        (intIntConstantsSmallNumbers):
     206        (intIntConstantsLargeNumbers):
     207        (intIntSmallConstants):
     208        (intDoubleConstants):
     209        (doubleDoubleConstants):
     210        (doubleIntConstants):
     211        (testBaseAndExponentConstantLiterals):
     212        (exponentIsIntegerConstant):
     213        (testExponentIsIntegerConstant):
     214        (exponentIsDoubleConstant):
     215        (testExponentIsDoubleConstant):
     216        (exponentIsInfinityConstant):
     217        (testExponentIsInfinityConstant):
     218        (exponentIsNegativeInfinityConstant):
     219        (testExponentIsNegativeInfinityConstant):
     220        * tests/stress/pow-with-never-NaN-exponent.js: Added.
     221        (exponentIsNonNanDouble1):
     222        (exponentIsNonNanDouble2):
     223        (testExponentIsDoubleConstant):
     224        * tests/test262.yaml:
     225
    12262016-07-18  Filip Pizlo  <fpizlo@apple.com>
    2227
  • trunk/Source/JavaScriptCore/bytecode/BytecodeList.json

    r203361 r203499  
    4040            { "name" : "op_mod", "length" : 4 },
    4141            { "name" : "op_sub", "length" : 5 },
     42            { "name" : "op_pow", "length" : 4 },
    4243            { "name" : "op_lshift", "length" : 4 },
    4344            { "name" : "op_rshift", "length" : 4 },
  • trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h

    r203364 r203499  
    209209    case op_mod:
    210210    case op_sub:
     211    case op_pow:
    211212    case op_lshift:
    212213    case op_rshift:
    … …  
    432433    case op_mod:
    433434    case op_sub:
     435    case op_pow:
    434436    case op_lshift:
    435437    case op_rshift:
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r203364 r203499  
    10231023        case op_mod: {
    10241024            printBinaryOp(out, exec, location, it, "mod");
     1025            break;
     1026        }
     1027        case op_pow: {
     1028            printBinaryOp(out, exec, location, it, "pow");
    10251029            break;
    10261030        }
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r203006 r203499  
    19941994            opcodeID = op_mod;
    19951995            break;
     1996        case OpPowEq:
     1997            opcodeID = op_pow;
     1998            break;
    19961999        default:
    19972000            RELEASE_ASSERT_NOT_REACHED();
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r203364 r203499  
    38183818            set(VirtualRegister(currentInstruction[1].u.operand), makeSafe(addToGraph(ArithMod, op1, op2)));
    38193819            NEXT_OPCODE(op_mod);
     3820        }
     3821
     3822        case op_pow: {
     3823            // FIXME: ArithPow(Untyped, Untyped) should be supported as the same to ArithMul, ArithSub etc.
     3824            // https://bugs.webkit.org/show_bug.cgi?id=160012
     3825            Node* op1 = get(VirtualRegister(currentInstruction[2].u.operand));
     3826            Node* op2 = get(VirtualRegister(currentInstruction[3].u.operand));
     3827            set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(ArithPow, op1, op2));
     3828            NEXT_OPCODE(op_pow);
    38203829        }
    38213830
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp

    r203364 r203499  
    124124    case op_mul:
    125125    case op_mod:
     126    case op_pow:
    126127    case op_div:
    127128    case op_debug:
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r203130 r203499  
    301301        DEFINE_OP(op_dec)
    302302        DEFINE_OP(op_inc)
     303        DEFINE_OP(op_pow)
    303304        DEFINE_OP(op_profile_type)
    304305        DEFINE_OP(op_profile_control_flow)
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r203081 r203499  
    567567        void emit_op_dec(Instruction*);
    568568        void emit_op_inc(Instruction*);
     569        void emit_op_pow(Instruction*);
    569570        void emit_op_profile_type(Instruction*);
    570571        void emit_op_profile_control_flow(Instruction*);
  • trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp

    r201301 r203499  
    10331033}
    10341034
    1035 /* ------------------------------ END: OP_ADD, OP_SUB, OP_MUL ------------------------------ */
     1035void JIT::emit_op_pow(Instruction* currentInstruction)
     1036{
     1037    JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_pow);
     1038    slowPathCall.call();
     1039}
     1040
     1041/* ------------------------------ END: OP_ADD, OP_SUB, OP_MUL, OP_POW ------------------------------ */
    10361042
    10371043} // namespace JSC
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r203130 r203499  
    13211321
    13221322
     1323_llint_op_pow:
     1324    traceExecution()
     1325    callOpcodeSlowPath(_slow_path_pow)
     1326    dispatch(4)
     1327
     1328
    13231329_llint_op_typeof:
    13241330    traceExecution()
  • trunk/Source/JavaScriptCore/parser/ASTBuilder.h

    r201542 r203499  
    2929#include "BuiltinNames.h"
    3030#include "BytecodeIntrinsicRegistry.h"
     31#include "MathCommon.h"
    3132#include "NodeConstructors.h"
    3233#include "SyntaxChecker.h"
    … …  
    144145    ExpressionNode* makeNegateNode(const JSTokenLocation&, ExpressionNode*);
    145146    ExpressionNode* makeBitwiseNotNode(const JSTokenLocation&, ExpressionNode*);
     147    ExpressionNode* makePowNode(const JSTokenLocation&, ExpressionNode* left, ExpressionNode* right, bool rightHasAssignments);
    146148    ExpressionNode* makeMultNode(const JSTokenLocation&, ExpressionNode* left, ExpressionNode* right, bool rightHasAssignments);
    147149    ExpressionNode* makeDivNode(const JSTokenLocation&, ExpressionNode* left, ExpressionNode* right, bool rightHasAssignments);
    … …  
    785787        m_binaryOperatorStack.removeLast();
    786788    }
    787     bool operatorStackHasHigherPrecedence(int&, int precedence)
    788     {
    789         return precedence <= m_binaryOperatorStack.last().second;
     789    bool operatorStackShouldReduce(int precedence)
     790    {
     791        // If the current precedence of the operator stack is the same to the one of the given operator,
     792        // it depends on the associative whether we reduce the stack.
     793        // If the operator is right associative, we should not reduce the stack right now.
     794        if (precedence == m_binaryOperatorStack.last().second)
     795            return !(m_binaryOperatorStack.last().first & RightAssociativeBinaryOpTokenFlag);
     796        return precedence < m_binaryOperatorStack.last().second;
    790797    }
    791798    const BinaryOperand& getFromOperandStack(int i) { return m_binaryOperandStack[m_binaryOperandStack.size() + i]; }
    … …  
    10451052}
    10461053
     1054ExpressionNode* ASTBuilder::makePowNode(const JSTokenLocation& location, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments)
     1055{
     1056    auto* strippedExpr1 = expr1->stripUnaryPlus();
     1057    auto* strippedExpr2 = expr2->stripUnaryPlus();
     1058
     1059    if (strippedExpr1->isNumber() && strippedExpr2->isNumber()) {
     1060        const NumberNode& numberExpr1 = static_cast<NumberNode&>(*strippedExpr1);
     1061        const NumberNode& numberExpr2 = static_cast<NumberNode&>(*strippedExpr2);
     1062        return createNumberFromBinaryOperation(location, operationMathPow(numberExpr1.value(), numberExpr2.value()), numberExpr1, numberExpr2);
     1063    }
     1064
     1065    if (strippedExpr1->isNumber())
     1066        expr1 = strippedExpr1;
     1067    if (strippedExpr2->isNumber())
     1068        expr2 = strippedExpr2;
     1069
     1070    return new (m_parserArena) PowNode(location, expr1, expr2, rightHasAssignments);
     1071}
     1072
    10471073ExpressionNode* ASTBuilder::makeMultNode(const JSTokenLocation& location, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments)
    10481074{
     1075    // FIXME: Unary + change the evaluation order.
     1076    // https://bugs.webkit.org/show_bug.cgi?id=159968
    10491077    expr1 = expr1->stripUnaryPlus();
    10501078    expr2 = expr2->stripUnaryPlus();
    … …  
    10671095ExpressionNode* ASTBuilder::makeDivNode(const JSTokenLocation& location, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments)
    10681096{
     1097    // FIXME: Unary + change the evaluation order.
     1098    // https://bugs.webkit.org/show_bug.cgi?id=159968
    10691099    expr1 = expr1->stripUnaryPlus();
    10701100    expr2 = expr2->stripUnaryPlus();
    … …  
    10831113ExpressionNode* ASTBuilder::makeModNode(const JSTokenLocation& location, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments)
    10841114{
     1115    // FIXME: Unary + change the evaluation order.
     1116    // https://bugs.webkit.org/show_bug.cgi?id=159968
    10851117    expr1 = expr1->stripUnaryPlus();
    10861118    expr2 = expr2->stripUnaryPlus();
    … …  
    11071139ExpressionNode* ASTBuilder::makeSubNode(const JSTokenLocation& location, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments)
    11081140{
     1141    // FIXME: Unary + change the evaluation order.
     1142    // https://bugs.webkit.org/show_bug.cgi?id=159968
    11091143    expr1 = expr1->stripUnaryPlus();
    11101144    expr2 = expr2->stripUnaryPlus();
    … …  
    12961330    case MOD:
    12971331        return makeModNode(location, lhs.first, rhs.first, rhs.second.hasAssignment);
     1332
     1333    case POW:
     1334        return makePowNode(location, lhs.first, rhs.first, rhs.second.hasAssignment);
    12981335    }
    12991336    CRASH();
  • trunk/Source/JavaScriptCore/parser/Lexer.cpp

    r203028 r203499  
    19571957            break;
    19581958        }
     1959        if (m_current == '*') {
     1960            shift();
     1961            if (m_current == '=') {
     1962                shift();
     1963                token = POWEQUAL;
     1964                break;
     1965            }
     1966            token = POW;
     1967            break;
     1968        }
    19591969        token = TIMES;
    19601970        break;
  • trunk/Source/JavaScriptCore/parser/NodeConstructors.h

    r201328 r203499  
    498498    }
    499499
     500    inline PowNode::PowNode(const JSTokenLocation& location, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments)
     501        : BinaryOpNode(location, ResultType::numberType(), expr1, expr2, op_pow, rightHasAssignments)
     502    {
     503    }
     504
    500505    inline MultNode::MultNode(const JSTokenLocation& location, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments)
    501506        : BinaryOpNode(location, ResultType::numberType(), expr1, expr2, op_mul, rightHasAssignments)
  • trunk/Source/JavaScriptCore/parser/Nodes.h

    r202680 r203499  
    6868        OpOrEq,
    6969        OpModEq,
     70        OpPowEq,
    7071        OpLShift,
    7172        OpRShift,
    … …  
    10401041    };
    10411042
     1043    class PowNode : public BinaryOpNode {
     1044    public:
     1045        PowNode(const JSTokenLocation&, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);
     1046    };
     1047
    10421048    class MultNode : public BinaryOpNode {
    10431049    public:
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r203263 r203499  
    31273127        case OREQUAL: op = OpOrEq; break;
    31283128        case MODEQUAL: op = OpModEq; break;
     3129        case POWEQUAL: op = OpPowEq; break;
    31293130        default:
    31303131            goto end;
    … …  
    32193220}
    32203221
    3221 ALWAYS_INLINE static bool isUnaryOp(JSTokenType token)
    3222 {
    3223     return token & UnaryOpTokenFlag;
     3222ALWAYS_INLINE static bool isUnaryOpExcludingUpdateOp(JSTokenType token)
     3223{
     3224    if (isUpdateOp(token))
     3225        return false;
     3226    return isUnaryOp(token);
    32243227}
    32253228
    … …  
    32423245        JSTextPosition exprStart = tokenStartPosition();
    32433246        int initialAssignments = m_parserState.assignmentCount;
     3247        JSTokenType leadingTokenTypeForUnaryExpression = m_token.m_type;
    32443248        TreeExpression current = parseUnaryExpression(context);
    32453249        failIfFalse(current, "Cannot parse expression");
    32463250       
    32473251        context.appendBinaryExpressionInfo(operandStackDepth, current, exprStart, lastTokenEndPosition(), lastTokenEndPosition(), initialAssignments != m_parserState.assignmentCount);
     3252
     3253        // 12.6 https://tc39.github.io/ecma262/#sec-exp-operator
     3254        // ExponentiationExpresion is described as follows.
     3255        //
     3256        //     ExponentiationExpression[Yield]:
     3257        //         UnaryExpression[?Yield]
     3258        //         UpdateExpression[?Yield] ** ExponentiationExpression[?Yield]
     3259        //
     3260        // As we can see, the left hand side of the ExponentiationExpression is UpdateExpression, not UnaryExpression.
     3261        // So placing UnaryExpression not included in UpdateExpression here is a syntax error.
     3262        // This is intentional. For example, if UnaryExpression is allowed, we can have the code like `-x**y`.
     3263        // But this is confusing: `-(x**y)` OR `(-x)**y`, which interpretation is correct?
     3264        // To avoid this problem, ECMA262 makes unparenthesized exponentiation expression as operand of unary operators an early error.
     3265        // More rationale: https://mail.mozilla.org/pipermail/es-discuss/2015-September/044232.html
     3266        //
     3267        // Here, we guarantee that the left hand side of this expression is not unary expression by checking the leading operator of the parseUnaryExpression.
     3268        // This check just works. Let's consider the example,
     3269        //     y <> -x ** z
     3270        //          ^
     3271        //          Check this.
     3272        // If the binary operator <> has higher precedence than one of "**", this check does not work.
     3273        // But it's OK for ** because the operator "**" has the highest operator precedence in the binary operators.
     3274        failIfTrue(match(POW) && isUnaryOpExcludingUpdateOp(leadingTokenTypeForUnaryExpression), "Unparenthesized unary expression found on the left hand side of an exponentiation expression");
     3275
    32483276        int precedence = isBinaryOperator(m_token.m_type);
    32493277        if (!precedence)
    … …  
    32543282        next(TreeBuilder::DontBuildStrings);
    32553283       
    3256         while (operatorStackDepth &&  context.operatorStackHasHigherPrecedence(operatorStackDepth, precedence)) {
     3284        while (operatorStackDepth && context.operatorStackShouldReduce(precedence)) {
    32573285            ASSERT(operandStackDepth > 1);
    32583286           
  • trunk/Source/JavaScriptCore/parser/ParserTokens.h

    r201542 r203499  
    4242    BinaryOpTokenPrecedenceMask = 15 << BinaryOpTokenPrecedenceShift,
    4343    ErrorTokenFlag = 1 << (BinaryOpTokenAllowsInPrecedenceAdditionalShift + BinaryOpTokenPrecedenceShift + 7),
    44     UnterminatedErrorTokenFlag = ErrorTokenFlag << 1
     44    UnterminatedErrorTokenFlag = ErrorTokenFlag << 1,
     45    RightAssociativeBinaryOpTokenFlag = UnterminatedErrorTokenFlag << 1
    4546};
    4647
    … …  
    110111    ANDEQUAL,
    111112    MODEQUAL,
     113    POWEQUAL,
    112114    XOREQUAL,
    113115    OREQUAL,
    … …  
    119121    PLUSPLUS = 0 | UnaryOpTokenFlag,
    120122    MINUSMINUS = 1 | UnaryOpTokenFlag,
    121     EXCLAMATION = 2 | UnaryOpTokenFlag,
    122     TILDE = 3 | UnaryOpTokenFlag,
    123     AUTOPLUSPLUS = 4 | UnaryOpTokenFlag,
    124     AUTOMINUSMINUS = 5 | UnaryOpTokenFlag,
     123    AUTOPLUSPLUS = 2 | UnaryOpTokenFlag,
     124    AUTOMINUSMINUS = 3 | UnaryOpTokenFlag,
     125    EXCLAMATION = 4 | UnaryOpTokenFlag,
     126    TILDE = 5 | UnaryOpTokenFlag,
    125127    TYPEOF = 6 | UnaryOpTokenFlag | KeywordTokenFlag,
    126128    VOIDTOKEN = 7 | UnaryOpTokenFlag | KeywordTokenFlag,
    … …  
    149151    DIVIDE = 21 | BINARY_OP_PRECEDENCE(10),
    150152    MOD = 22 | BINARY_OP_PRECEDENCE(10),
     153    POW = 23 | BINARY_OP_PRECEDENCE(11) | RightAssociativeBinaryOpTokenFlag, // Make sure that POW has the highest operator precedence.
    151154    ERRORTOK = 0 | ErrorTokenFlag,
    152155    UNTERMINATED_IDENTIFIER_ESCAPE_ERRORTOK = 0 | ErrorTokenFlag | UnterminatedErrorTokenFlag,
    … …  
    223226};
    224227
     228ALWAYS_INLINE bool isUpdateOp(JSTokenType token)
     229{
     230    return token >= PLUSPLUS && token <= AUTOMINUSMINUS;
     231}
     232
     233ALWAYS_INLINE bool isUnaryOp(JSTokenType token)
     234{
     235    return token & UnaryOpTokenFlag;
     236}
     237
    225238} // namespace JSC
    226239
  • trunk/Source/JavaScriptCore/parser/SyntaxChecker.h

    r201542 r203499  
    302302    // Logic to handle datastructures used during parsing of binary expressions
    303303    void operatorStackPop(int& operatorStackDepth) { operatorStackDepth--; }
    304     bool operatorStackHasHigherPrecedence(int&, int) { return true; }
     304    bool operatorStackShouldReduce(int) { return true; }
    305305    BinaryOperand getFromOperandStack(int) { return m_topBinaryExpr; }
    306306    void shrinkOperandStackBy(int& operandStackDepth, int amount) { operandStackDepth -= amount; }
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp

    r203081 r203499  
    471471}
    472472
     473SLOW_PATH_DECL(slow_path_pow)
     474{
     475    BEGIN();
     476    double a = OP_C(2).jsValue().toNumber(exec);
     477    double b = OP_C(3).jsValue().toNumber(exec);
     478    RETURN(jsNumber(operationMathPow(a, b)));
     479}
     480
    473481SLOW_PATH_DECL(slow_path_lshift)
    474482{
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h

    r203081 r203499  
    220220SLOW_PATH_HIDDEN_DECL(slow_path_div);
    221221SLOW_PATH_HIDDEN_DECL(slow_path_mod);
     222SLOW_PATH_HIDDEN_DECL(slow_path_pow);
    222223SLOW_PATH_HIDDEN_DECL(slow_path_lshift);
    223224SLOW_PATH_HIDDEN_DECL(slow_path_rshift);
  • trunk/Source/JavaScriptCore/tests/stress/math-pow-basics.js

    r180098 r203499  
    182182}
    183183noInline(test7);
    184 test6(-37.676522764377296, -1.0, -0.026541727490454296, -0.026541727490454296);
     184test7(-37.676522764377296, -1.0, -0.026541727490454296, -0.026541727490454296);
    185185
    186186// Let's square things.
    … …  
    208208}
    209209noInline(test8);
    210 test7(-37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
     210test8(-37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
    211211
    212212function mathPowDoubleDouble9(x, y) {
    … …  
    233233}
    234234noInline(test9);
    235 test8(37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
     235test9(37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
    236236
    237237// Let's cube things.
    … …  
    258258    }
    259259}
    260 noInline(test9);
    261 test9(-37.676522764377296, 3.0, -53482.591444930236, -53482.591444930236);
     260noInline(test10);
     261test10(-37.676522764377296, 3.0, -53482.591444930236, -53482.591444930236);
    262262
    263263function mathPowDoubleDouble11(x, y) {
    … …  
    283283    }
    284284}
    285 noInline(test10);
    286 test10(37.676522764377296, 3.0, 53482.591444930236, 53482.591444930236);
     285noInline(test11);
     286test11(37.676522764377296, 3.0, 53482.591444930236, 53482.591444930236);
  • trunk/Source/JavaScriptCore/tests/stress/math-pow-nan-behaviors.js

    r180360 r203499  
    1 // If y is NaN, the result is NaN.
     1// If an argument is NaN, the result of Math.pow(x, y) is NaN.
    22function testIntegerBaseWithNaNExponentStatic() {
    33    for (var i = 0; i < 10000; ++i) {
    … …  
    7373
    7474// If y is +0, the result is 1, even if x is NaN.
    75 // If y is −0, the result is 1, even if x is NaN.
     75// If y is -0, the result is 1, even if x is NaN.
    7676// If x is NaN and y is nonzero, the result is NaN.
    7777function testNaNBaseStatic() {
    … …  
    141141testNaNBaseDynamic();
    142142
    143 // If abs(x) is 1 and y is +∞, the result is NaN.
    144 // If abs(x) is 1 and y is −∞, the result is NaN.
     143// If abs(x) is 1 and y is +Inf the result is NaN.
     144// If abs(x) is 1 and y is −Inf the result is NaN.
    145145function infiniteExponentsStatic() {
    146146    for (var i = 0; i < 10000; ++i) {
  • trunk/Source/JavaScriptCore/tests/stress/pow-basics.js

    r203498 r203499  
    55// Some random values.
    66function mathPowDoubleDouble1(x, y) {
    7     return Math.pow(x, y)
     7    return x ** y;
    88}
    99noInline(mathPowDoubleDouble1);
    1010
    1111function mathPowDoubleInt1(x, y) {
    12     return Math.pow(x, y)
     12    return x ** y;
    1313}
    1414noInline(mathPowDoubleInt1);
    … …  
    3131
    3232function mathPowDoubleDouble2(x, y) {
    33     return Math.pow(x, y)
     33    return x ** y;
    3434}
    3535noInline(mathPowDoubleDouble2);
    3636
    3737function mathPowDoubleInt2(x, y) {
    38     return Math.pow(x, y)
     38    return x ** y;
    3939}
    4040noInline(mathPowDoubleInt2);
    … …  
    5656
    5757function mathPowDoubleDouble3(x, y) {
    58     return Math.pow(x, y)
     58    return x ** y;
    5959}
    6060noInline(mathPowDoubleDouble3);
    6161
    6262function mathPowDoubleInt3(x, y) {
    63     return Math.pow(x, y)
     63    return x ** y;
    6464}
    6565noInline(mathPowDoubleInt3);
    … …  
    8282// Exponent zero.
    8383function mathPowDoubleDouble4(x, y) {
    84     return Math.pow(x, y)
     84    return x ** y;
    8585}
    8686noInline(mathPowDoubleDouble4);
    8787
    8888function mathPowDoubleInt4(x, y) {
    89     return Math.pow(x, y)
     89    return x ** y;
    9090}
    9191noInline(mathPowDoubleInt4);
    … …  
    108108// Exponent minus zero.
    109109function mathPowDoubleDouble5(x, y) {
    110     return Math.pow(x, y)
     110    return x ** y;
    111111}
    112112noInline(mathPowDoubleDouble5);
    113113
    114114function mathPowDoubleInt5(x, y) {
    115     return Math.pow(x, y)
     115    return x ** y;
    116116}
    117117noInline(mathPowDoubleInt5);
    … …  
    134134// Exponent 1.
    135135function mathPowDoubleDouble6(x, y) {
    136     return Math.pow(x, y)
     136    return x ** y;
    137137}
    138138noInline(mathPowDoubleDouble6);
    139139
    140140function mathPowDoubleInt6(x, y) {
    141     return Math.pow(x, y)
     141    return x ** y;
    142142}
    143143noInline(mathPowDoubleInt6);
    … …  
    160160// Exponent -1.
    161161function mathPowDoubleDouble7(x, y) {
    162     return Math.pow(x, y)
     162    return x ** y;
    163163}
    164164noInline(mathPowDoubleDouble7);
    165165
    166166function mathPowDoubleInt7(x, y) {
    167     return Math.pow(x, y)
     167    return x ** y;
    168168}
    169169noInline(mathPowDoubleInt7);
    … …  
    182182}
    183183noInline(test7);
    184 test6(-37.676522764377296, -1.0, -0.026541727490454296, -0.026541727490454296);
     184test7(-37.676522764377296, -1.0, -0.026541727490454296, -0.026541727490454296);
    185185
    186186// Let's square things.
    187187function mathPowDoubleDouble8(x, y) {
    188     return Math.pow(x, y)
     188    return x ** y;
    189189}
    190190noInline(mathPowDoubleDouble8);
    191191
    192192function mathPowDoubleInt8(x, y) {
    193     return Math.pow(x, y)
     193    return x ** y;
    194194}
    195195noInline(mathPowDoubleInt8);
    … …  
    208208}
    209209noInline(test8);
    210 test7(-37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
     210test8(-37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
    211211
    212212function mathPowDoubleDouble9(x, y) {
    213     return Math.pow(x, y)
     213    return x ** y;
    214214}
    215215noInline(mathPowDoubleDouble9);
    216216
    217217function mathPowDoubleInt9(x, y) {
    218     return Math.pow(x, y)
     218    return x ** y;
    219219}
    220220noInline(mathPowDoubleInt9);
    … …  
    233233}
    234234noInline(test9);
    235 test8(37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
     235test9(37.676522764377296, 2.0, 1419.5203676146407, 1419.5203676146407);
    236236
    237237// Let's cube things.
    238238function mathPowDoubleDouble10(x, y) {
    239     return Math.pow(x, y)
     239    return x ** y;
    240240}
    241241noInline(mathPowDoubleDouble10);
    242242
    243243function mathPowDoubleInt10(x, y) {
    244     return Math.pow(x, y)
     244    return x ** y;
    245245}
    246246noInline(mathPowDoubleInt10);
    … …  
    258258    }
    259259}
    260 noInline(test9);
    261 test9(-37.676522764377296, 3.0, -53482.591444930236, -53482.591444930236);
     260noInline(test10);
     261test10(-37.676522764377296, 3.0, -53482.591444930236, -53482.591444930236);
    262262
    263263function mathPowDoubleDouble11(x, y) {
    264     return Math.pow(x, y)
     264    return x ** y;
    265265}
    266266noInline(mathPowDoubleDouble11);
    267267
    268268function mathPowDoubleInt11(x, y) {
    269     return Math.pow(x, y)
     269    return x ** y;
    270270}
    271271noInline(mathPowDoubleInt11);
    … …  
    283283    }
    284284}
    285 noInline(test10);
    286 test10(37.676522764377296, 3.0, 53482.591444930236, 53482.591444930236);
     285noInline(test11);
     286test11(37.676522764377296, 3.0, 53482.591444930236, 53482.591444930236);
  • trunk/Source/JavaScriptCore/tests/stress/pow-nan-behaviors.js

    r203498 r203499  
    1 // If y is NaN, the result is NaN.
     1// If an argument is NaN, the result of x ** y is NaN.
    22function testIntegerBaseWithNaNExponentStatic() {
    33    for (var i = 0; i < 10000; ++i) {
    4         var result = Math.pow(5, NaN);
    5         if (!isNaN(result))
    6             throw "Error: bad result, Math.pow(5, NaN) = " + result;
    7     }
    8     for (var i = 0; i < 10000; ++i) {
    9         var result = Math.pow(i, NaN);
    10         if (!isNaN(result))
    11             throw "Error: bad result, Math.pow(i, NaN) = " + result + " with i = " + i;
     4        var result = 5 ** NaN;
     5        if (!isNaN(result))
     6            throw "Error: bad result, 5 ** NaN = " + result;
     7    }
     8    for (var i = 0; i < 10000; ++i) {
     9        var result = i ** NaN;
     10        if (!isNaN(result))
     11            throw "Error: bad result, i ** NaN = " + result + " with i = " + i;
    1212    }
    1313}
    … …  
    1616
    1717function mathPowIntegerBaseWithNaNExponentDynamic(x, y) {
    18     return Math.pow(x, y);
     18    return x ** y;
    1919}
    2020noInline(mathPowIntegerBaseWithNaNExponentDynamic);
    … …  
    3838function testFloatingPointBaseWithNaNExponentStatic() {
    3939    for (var i = 0; i < 10000; ++i) {
    40         var result = Math.pow(5.5, NaN);
    41         if (!isNaN(result))
    42             throw "Error: bad result, Math.pow(5.5, NaN) = " + result;
    43     }
    44     for (var i = 0; i < 10000; ++i) {
    45         var result = Math.pow(i + 0.5, NaN);
    46         if (!isNaN(result))
    47             throw "Error: bad result, Math.pow(i + 0.5, NaN) = " + result + " with i = " + i;
     40        var result = 5.5 ** NaN;
     41        if (!isNaN(result))
     42            throw "Error: bad result, 5.5 ** NaN = " + result;
     43    }
     44    for (var i = 0; i < 10000; ++i) {
     45        var result = (i + 0.5) ** NaN;
     46        if (!isNaN(result))
     47            throw "Error: bad result, (i + 0.5) ** NaN = " + result + " with i = " + i;
    4848    }
    4949}
    … …  
    5252
    5353function mathPowFloatingPointBaseWithNaNExponentDynamic(x, y) {
    54     return Math.pow(x, y);
     54    return x ** y;
    5555}
    5656noInline(mathPowFloatingPointBaseWithNaNExponentDynamic);
    … …  
    7373
    7474// If y is +0, the result is 1, even if x is NaN.
    75 // If y is −0, the result is 1, even if x is NaN.
     75// If y is -0, the result is 1, even if x is NaN.
    7676// If x is NaN and y is nonzero, the result is NaN.
    7777function testNaNBaseStatic() {
    7878    for (var i = 0; i < 10000; ++i) {
    79         var result = Math.pow(NaN, i + 1);
    80         if (!isNaN(result))
    81             throw "Error: bad result, Math.pow(NaN, i + 1) = " + result + " with i = " + i;
    82     }
    83     for (var i = 0; i < 10000; ++i) {
    84         var result = Math.pow(NaN, i + 1.5);
    85         if (!isNaN(result))
    86             throw "Error: bad result, Math.pow(NaN, i + 1.5) = " + result + " with i = " + i;
    87     }
    88     for (var i = 0; i < 10000; ++i) {
    89         var result = Math.pow(NaN, 0);
    90         if (result !== 1)
    91             throw "Error: bad result, Math.pow(NaN, 0) = " + result;
    92     }
    93     for (var i = 0; i < 10000; ++i) {
    94         var result = Math.pow(NaN, -0);
    95         if (result !== 1)
    96             throw "Error: bad result, Math.pow(NaN, -0) = " + result;
     79        var result = NaN ** (i + 1);
     80        if (!isNaN(result))
     81            throw "Error: bad result, NaN ** (i + 1) = " + result + " with i = " + i;
     82    }
     83    for (var i = 0; i < 10000; ++i) {
     84        var result = NaN ** (i + 1.5);
     85        if (!isNaN(result))
     86            throw "Error: bad result, NaN ** (i + 1.5) = " + result + " with i = " + i;
     87    }
     88    for (var i = 0; i < 10000; ++i) {
     89        var result = NaN ** 0;
     90        if (result !== 1)
     91            throw "Error: bad result, NaN ** 0 = " + result;
     92    }
     93    for (var i = 0; i < 10000; ++i) {
     94        var result = NaN ** -0;
     95        if (result !== 1)
     96            throw "Error: bad result, NaN ** -0 = " + result;
    9797    }
    9898}
    … …  
    101101
    102102function mathPowNaNBaseDynamic1(x, y) {
    103     return Math.pow(x, y);
     103    return x ** y;
    104104}
    105105function mathPowNaNBaseDynamic2(x, y) {
    106     return Math.pow(x, y);
     106    return x ** y;
    107107}
    108108function mathPowNaNBaseDynamic3(x, y) {
    109     return Math.pow(x, y);
     109    return x ** y;
    110110}
    111111function mathPowNaNBaseDynamic4(x, y) {
    112     return Math.pow(x, y);
     112    return x ** y;
    113113}
    114114noInline(mathPowNaNBaseDynamic1);
    … …  
    141141testNaNBaseDynamic();
    142142
    143 // If abs(x) is 1 and y is +∞, the result is NaN.
    144 // If abs(x) is 1 and y is −∞, the result is NaN.
     143// If abs(x) is 1 and y is +Inf the result is NaN.
     144// If abs(x) is 1 and y is −Inf the result is NaN.
    145145function infiniteExponentsStatic() {
    146146    for (var i = 0; i < 10000; ++i) {
    147         var result = Math.pow(1, Number.POSITIVE_INFINITY);
    148         if (!isNaN(result))
    149             throw "Error: bad result, Math.pow(1, Number.POSITIVE_INFINITY) = " + result;
    150     }
    151     for (var i = 0; i < 10000; ++i) {
    152         var result = Math.pow(-1, Number.POSITIVE_INFINITY);
    153         if (!isNaN(result))
    154             throw "Error: bad result, Math.pow(-1, Number.POSITIVE_INFINITY) = " + result;
    155     }
    156     for (var i = 0; i < 10000; ++i) {
    157         var result = Math.pow(1, Number.NEGATIVE_INFINITY);
    158         if (!isNaN(result))
    159             throw "Error: bad result, Math.pow(1, Number.NEGATIVE_INFINITY) = " + result;
    160     }
    161     for (var i = 0; i < 10000; ++i) {
    162         var result = Math.pow(-1, Number.NEGATIVE_INFINITY);
    163         if (!isNaN(result))
    164             throw "Error: bad result, Math.pow(-1, Number.NEGATIVE_INFINITY) = " + result;
     147        var result = 1 ** Number.POSITIVE_INFINITY;
     148        if (!isNaN(result))
     149            throw "Error: bad result, 1 ** Number.POSITIVE_INFINITY = " + result;
     150    }
     151    for (var i = 0; i < 10000; ++i) {
     152        var result = (-1) ** Number.POSITIVE_INFINITY;
     153        if (!isNaN(result))
     154            throw "Error: bad result, -1 ** Number.POSITIVE_INFINITY = " + result;
     155    }
     156    for (var i = 0; i < 10000; ++i) {
     157        var result = 1 ** Number.NEGATIVE_INFINITY;
     158        if (!isNaN(result))
     159            throw "Error: bad result, 1 ** Number.NEGATIVE_INFINITY = " + result;
     160    }
     161    for (var i = 0; i < 10000; ++i) {
     162        var result = (-1) ** Number.NEGATIVE_INFINITY;
     163        if (!isNaN(result))
     164            throw "Error: bad result, -1 ** Number.NEGATIVE_INFINITY = " + result;
    165165    }
    166166}
    … …  
    169169
    170170function mathPowInfiniteExponentsDynamic1(x, y) {
    171     return Math.pow(x, y);
     171    return x ** y;
    172172}
    173173function mathPowInfiniteExponentsDynamic2(x, y) {
    174     return Math.pow(x, y);
     174    return x ** y;
    175175}
    176176function mathPowInfiniteExponentsDynamic3(x, y) {
    177     return Math.pow(x, y);
     177    return x ** y;
    178178}
    179179function mathPowInfiniteExponentsDynamic4(x, y) {
    180     return Math.pow(x, y);
     180    return x ** y;
    181181}
    182182noInline(mathPowInfiniteExponentsDynamic1);
  • trunk/Source/JavaScriptCore/tests/test262.yaml

    r203332 r203499  
    6082360823  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6082460824- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A1.js
    60825   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60825  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6082660826- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A1.js
    60827   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60827  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6082860828- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A10.js
    6082960829  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    … …  
    6083160831  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6083260832- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A11.js
    60833   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60833  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6083460834- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A11.js
    60835   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60835  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6083660836- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A12.js
    60837   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60837  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6083860838- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A12.js
    60839   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60839  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6084060840- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A13.js
    60841   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60841  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6084260842- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A13.js
    60843   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60843  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6084460844- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A14.js
    60845   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60845  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6084660846- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A14.js
    60847   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60847  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6084860848- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A15.js
    60849   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60849  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6085060850- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A15.js
    60851   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60851  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6085260852- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A16.js
    60853   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60853  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6085460854- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A16.js
    60855   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60855  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6085660856- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A17.js
    60857   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60857  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6085860858- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A17.js
    60859   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60859  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6086060860- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A18.js
    60861   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60861  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6086260862- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A18.js
    60863   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60863  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6086460864- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A19.js
    60865   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60865  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6086660866- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A19.js
    60867   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60867  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6086860868- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A2.js
    60869   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60869  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6087060870- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A2.js
    60871   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60871  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6087260872- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A20.js
    60873   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60873  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6087460874- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A20.js
    60875   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60875  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6087660876- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A21.js
    60877   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60877  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6087860878- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A21.js
    60879   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60879  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6088060880- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A22.js
    60881   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60881  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6088260882- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A22.js
    60883   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60883  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6088460884- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A23.js
    60885   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60885  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6088660886- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A23.js
    60887   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60887  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6088860888- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A3.js
    60889   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60889  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6089060890- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A3.js
    60891   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60891  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6089260892- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A4.js
    60893   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60893  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6089460894- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A4.js
    60895   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60895  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6089660896- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A5.js
    60897   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60897  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6089860898- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A5.js
    60899   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60899  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6090060900- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A6.js
    60901   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60901  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6090260902- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A6.js
    60903   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60903  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6090460904- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A7.js
    60905   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60905  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6090660906- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A7.js
    60907   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60907  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6090860908- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A8.js
    60909   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60909  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6091060910- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A8.js
    60911   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60911  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6091260912- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A9.js
    60913   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60913  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6091460914- path: test262/test/language/expressions/exponentiation/applying-the-exp-operator_A9.js
    60915   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60915  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6091660916- path: test262/test/language/expressions/exponentiation/exp-assignment-operator.js
    60917   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60917  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6091860918- path: test262/test/language/expressions/exponentiation/exp-assignment-operator.js
    60919   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60919  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6092060920- path: test262/test/language/expressions/exponentiation/exp-operator-evaluation-order.js
    60921   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60921  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6092260922- path: test262/test/language/expressions/exponentiation/exp-operator-evaluation-order.js
    60923   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60923  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6092460924- path: test262/test/language/expressions/exponentiation/exp-operator-precedence-unary-expression-semantics.js
    60925   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60925  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6092660926- path: test262/test/language/expressions/exponentiation/exp-operator-precedence-unary-expression-semantics.js
    60927   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60927  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6092860928- path: test262/test/language/expressions/exponentiation/exp-operator-precedence-update-expression-semantics.js
    60929   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60929  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6093060930- path: test262/test/language/expressions/exponentiation/exp-operator-precedence-update-expression-semantics.js
    60931   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60931  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6093260932- path: test262/test/language/expressions/exponentiation/exp-operator-syntax-error-bitnot-unary-expression-base.js
    6093360933  cmd: runTest262 :normal, "SyntaxError", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    … …  
    6095960959  cmd: runTest262 :normal, "SyntaxError", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6096060960- path: test262/test/language/expressions/exponentiation/exp-operator.js
    60961   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
     60961  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
    6096260962- path: test262/test/language/expressions/exponentiation/exp-operator.js
    60963   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
     60963  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    6096460964- path: test262/test/language/expressions/function/S10.1.1_A1_T2.js
    6096560965  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
Note: See TracChangeset for help on using the changeset viewer.