From 588f568eb7ce029b83da7aec130c4ab78930d44a Mon Sep 17 00:00:00 2001 From: obastemur Date: Sat, 10 Feb 2018 03:09:03 -0800 Subject: [PATCH] deps: update ChakraCore to Microsoft/ChakraCore@5a1a799161 [1.8>1.9] [MERGE #4653 @obastemur] asmjs: enable MathBuiltinsCall test for OSX Merge pull request #4653 from obastemur:enable_math_Builtins_osx Fixes #4537 Reviewed-By: chakrabot --- .../core/test/AsmJs/MathBuiltinsCall.baseline | 3 - .../core/test/AsmJs/MathBuiltinsCall.js | 72 +++++++++++-------- deps/chakrashim/core/test/AsmJs/rlexe.xml | 4 -- 3 files changed, 43 insertions(+), 36 deletions(-) diff --git a/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.baseline b/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.baseline index 23a535c8d1f..5fbdf3743bd 100644 --- a/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.baseline +++ b/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.baseline @@ -188,7 +188,6 @@ f19 (a[10](1))= 1 f20 (a[10](1))= 1 f1 (a[11](10))= NaN f2 (a[11](10))= NaN -f3 (a[11](10))= 1.4711276743037347 f4 (a[11](10))= -1 f5 (a[11](10))= -1 f6 (a[11](10))= 1 @@ -698,7 +697,6 @@ f19 (a[40](1))= 1 f20 (a[40](1))= 1 f1 (a[41](10))= NaN f2 (a[41](10))= NaN -f3 (a[41](10))= 1.4711276743037347 f4 (a[41](10))= -1 f5 (a[41](10))= -1 f6 (a[41](10))= 1 @@ -919,7 +917,6 @@ f19 (a[53](1))= 1 f20 (a[53](1))= 1 f1 (a[54](10.0))= NaN f2 (a[54](10.0))= NaN -f3 (a[54](10.0))= 1.4711276743037347 f4 (a[54](10.0))= -1 f5 (a[54](10.0))= -1 f6 (a[54](10.0))= 1 diff --git a/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.js b/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.js index 53429a295ef..384e89b8da4 100644 --- a/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.js +++ b/deps/chakrashim/core/test/AsmJs/MathBuiltinsCall.js @@ -3,6 +3,8 @@ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- +WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js"); + function foo() {} var all = [ undefined, null, @@ -12,14 +14,14 @@ var all = [ undefined, null, 1<<32, -(1<<32), (1<<32)-1, 1<<31, -(1<<31), 1<<25, -1<<25, 65536, 46341, Number.MIN_VALUE, Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, new Number(NaN), new Number(+0), new Number( -0), new Number(0), new Number(1), - new Number(10.0), new Number(10.1), - new Number(Number.MIN_VALUE), new Number(Number.NaN), + new Number(10.0), new Number(10.1), + new Number(Number.MIN_VALUE), new Number(Number.NaN), new Number(Number.POSITIVE_INFINITY), new Number(Number.NEGATIVE_INFINITY), "", "hello", "hel" + "lo", "+0", "-0", "0", "1", "10.0", "10.1", new String(""), new String("hello"), new String("he" + "llo"), new Object(), [1,2,3], new Object(), [1,2,3] , foo ]; - + function AsmModule(stdlib,foreign,buffer) { "use asm"; @@ -32,7 +34,7 @@ function AsmModule(stdlib,foreign,buffer) { var fd2 = +foreign.d2; var fun1 = foreign.fun1; var fun2 = foreign.fun2; - + // stdlib immutable variable type double var sInf = stdlib.Infinity, sNaN = stdlib.NaN; // stdlib math (double) -> double @@ -67,7 +69,7 @@ function AsmModule(stdlib,foreign,buffer) { var PI = stdlib.Math.PI; var SQRT1_2 = stdlib.Math.SQRT1_2; var SQRT2 = stdlib.Math.SQRT2; - + //views var a=new stdlib.Int8Array(buffer); var b=new stdlib.Int16Array(buffer); @@ -77,62 +79,62 @@ function AsmModule(stdlib,foreign,buffer) { var f=new stdlib.Uint32Array(buffer); var g=new stdlib.Float32Array(buffer); var h=new stdlib.Float64Array(buffer); - + function f1(x){ x = +x; return +acos(x); } - + function f2(x){ x = +x; return +asin(x); } - + function f3(x){ x = +x; return +atan(x); } - + function f4(x){ x = +x; return +cos(x); } - + function f5(x){ x = +x; return +sin(x); } - + function f6(x){ x = +x; return +tan(x); } - + function f7(x){ x = +x; return +ceil(x); } - + function f8(x){ x = +x; return +floor(x); } - + function f9(x){ x = +x; return +exp(x); } - + function f10(x){ x = +x; return +log(x); } - + function f11(x){ x = +x; return +sqrt(x); } - + // stdlib math (signed) -> signed ^ (doublish) -> double function f12(x){ x = +x; @@ -142,14 +144,14 @@ function AsmModule(stdlib,foreign,buffer) { x = x|0; return abs(x|0)|0; } - + // stdlib math (doublish, doublish) -> double function f14(x,y){ x = +x; y = +y; return +atan2(x,y); } - + function f15(x,y){ x = +x; y = +y; @@ -161,29 +163,29 @@ function AsmModule(stdlib,foreign,buffer) { y = y|0; return imul(x,y)|0; } - + function f17(x){ x = fround(x); return fround(ceil(x)); } - + function f18(x){ x = fround(x); return fround(floor(x)); } - + function f19(x){ x = fround(x); return fround(sqrt(x)); } - + function f20(x){ x = fround(x); return fround(abs(x)); } - - - return { + + + return { f1 : f1 , f2 : f2 , f3 : f3 , @@ -215,7 +217,19 @@ var asmModule = AsmModule(global,env,buffer); for (var i=0; i