From a34dd031b6e8ee501de7b80c0e5efcbe04daf214 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 10 Feb 2016 10:03:50 -0800 Subject: [PATCH] deps: Update chakracore to 1.1.0.3 --- .../core/lib/Backend/GlobOptFields.cpp | 1 + .../core/lib/common/CommonDefines.h | 2 +- .../fieldopts/objptrcopyprop_typescript.js | 43 +++++++++++++++++++ deps/chakrashim/core/test/fieldopts/rlexe.xml | 5 +++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 deps/chakrashim/core/test/fieldopts/objptrcopyprop_typescript.js diff --git a/deps/chakrashim/core/lib/Backend/GlobOptFields.cpp b/deps/chakrashim/core/lib/Backend/GlobOptFields.cpp index e8ffe0d602b..9839e249472 100644 --- a/deps/chakrashim/core/lib/Backend/GlobOptFields.cpp +++ b/deps/chakrashim/core/lib/Backend/GlobOptFields.cpp @@ -1607,6 +1607,7 @@ GlobOpt::CreateFieldSrcValue(PropertySym * sym, PropertySym * originalSym, IR::O // We don't clear the value when we kill the field. // Clear it to make sure we don't use the old value. this->blockData.symToValueMap->Clear(sym->m_id); + this->blockData.symToValueMap->Clear(originalSym->m_id); } Assert((*ppOpnd)->AsSymOpnd()->m_sym == sym || this->IsLoopPrePass()); diff --git a/deps/chakrashim/core/lib/common/CommonDefines.h b/deps/chakrashim/core/lib/common/CommonDefines.h index 673051e69f5..ab08355f70e 100644 --- a/deps/chakrashim/core/lib/common/CommonDefines.h +++ b/deps/chakrashim/core/lib/common/CommonDefines.h @@ -14,7 +14,7 @@ #define CHAKRA_CORE_MINOR_VERSION 1 #define CHAKRA_CORE_VERSION_RELEASE 1 #define CHAKRA_CORE_VERSION_PRERELEASE 0 -#define CHAKRA_CORE_VERSION_RELEASE_QFE 2 +#define CHAKRA_CORE_VERSION_RELEASE_QFE 3 #define CHAKRA_VERSION_RELEASE 0 #define CHAKRA_VERSION_PRERELEASE 1 diff --git a/deps/chakrashim/core/test/fieldopts/objptrcopyprop_typescript.js b/deps/chakrashim/core/test/fieldopts/objptrcopyprop_typescript.js new file mode 100644 index 00000000000..3e9ef79228a --- /dev/null +++ b/deps/chakrashim/core/test/fieldopts/objptrcopyprop_typescript.js @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------------------------------- +// Copyright (C) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. +//------------------------------------------------------------------------------------------------------- + +function foo(obj, obj2) +{ + if (obj.x == 10) + { + obj = obj2; + + if (obj.x == 20) + { + return; + } + } + + return obj.x; +} + + +function test() +{ + var o1 = new Object(); + var o2 = new Object(); + + o1.x = 10; + o2.x = 30; + + for (var i = 0; i < 1000; i++) + { + var result = foo(o1,o2); + if (result != 30) + { + WScript.Echo("FAILED\n"); + return; + } + } + + WScript.Echo("Passed"); +} + +test(); diff --git a/deps/chakrashim/core/test/fieldopts/rlexe.xml b/deps/chakrashim/core/test/fieldopts/rlexe.xml index 441e8a9d21a..d462cb5d700 100644 --- a/deps/chakrashim/core/test/fieldopts/rlexe.xml +++ b/deps/chakrashim/core/test/fieldopts/rlexe.xml @@ -333,6 +333,11 @@ objptrcopyprop_bug.baseline + + + objptrcopyprop_typescript.js + + fieldcopyprop_typespec.js