From 397d182e2abb190eed4309fd9bfe1349c4f3576a Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Tue, 16 Feb 2016 16:08:29 -0800 Subject: [PATCH] deps: Updated chakracore to 1.1.0.3 --- deps/chakrashim/core/CODE_OF_CONDUCT.md | 51 +++++++++ deps/chakrashim/core/README.md | 50 ++++----- .../core/jenkins.check_copyright.py | 4 +- deps/chakrashim/core/lib/Backend/Encoder.cpp | 2 +- deps/chakrashim/core/lib/Backend/Func.cpp | 12 +- .../core/lib/Backend/GlobOptFields.cpp | 1 + .../core/lib/Backend/InliningDecider.cpp | 2 +- .../core/lib/Backend/NativeCodeGenerator.cpp | 1 + .../core/lib/Parser/CharClassifier.cpp | 38 ++++--- .../lib/Runtime/Base/DelayLoadLibrary.cpp | 10 ++ .../core/lib/Runtime/Base/DelayLoadLibrary.h | 7 +- .../core/lib/Runtime/Base/ScriptContext.cpp | 11 ++ .../core/lib/Runtime/Base/ScriptContext.h | 1 + .../Runtime/Language/JavascriptOperators.cpp | 8 +- .../Runtime/Language/JavascriptOperators.h | 4 +- .../Language/JavascriptStackWalker.cpp | 104 +++++++++++------- .../Runtime/Language/JavascriptStackWalker.h | 6 +- .../IntlEngineInterfaceExtensionObject.cpp | 19 ++-- .../lib/Runtime/Library/JavascriptDate.cpp | 6 +- .../lib/Runtime/Library/JavascriptLibrary.cpp | 2 +- .../lib/Runtime/Library/JavascriptNumber.cpp | 2 +- .../lib/Runtime/Library/JavascriptString.cpp | 2 +- .../core/lib/common/CommonDefines.h | 8 +- .../core/test/Array/memset_invariant.js | 23 +++- .../core/test/Optimizer/test143.baseline | 2 + deps/chakrashim/core/test/es6/rlexe.xml | 4 +- .../fieldopts/objptrcopyprop_typescript.js | 43 ++++++++ deps/chakrashim/core/test/fieldopts/rlexe.xml | 5 + 28 files changed, 303 insertions(+), 125 deletions(-) create mode 100644 deps/chakrashim/core/CODE_OF_CONDUCT.md create mode 100644 deps/chakrashim/core/test/fieldopts/objptrcopyprop_typescript.js diff --git a/deps/chakrashim/core/CODE_OF_CONDUCT.md b/deps/chakrashim/core/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..17461b02102 --- /dev/null +++ b/deps/chakrashim/core/CODE_OF_CONDUCT.md @@ -0,0 +1,51 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of +fostering an open and welcoming community, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating +documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free +experience for everyone, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. We will +prioritize marginalized people's safety over marginalized people's comfort. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic + addresses, without explicit permission +* Other unethical or unprofessional conduct + +Project maintainers have the right _and responsibility_ to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +By adopting this Code of Conduct, project maintainers commit themselves to +fairly and consistently applying these principles to every aspect of managing +this project. Project maintainers who do not follow or enforce the Code of +Conduct may be permanently removed from the project team. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting us at [chakracore@microsoft.com][email]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. Maintainers are +obligated to maintain confidentiality with regard to the reporter of an +incident. + +This Code of Conduct is adapted from the [Contributor Covenant][homepage] version 1.3.0 +and [Open Code of Conduct][opencoc]. + +[email]: mailto:chakracore@microsoft.com +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/3/0/ +[opencoc]: http://todogroup.org/opencodeofconduct/ diff --git a/deps/chakrashim/core/README.md b/deps/chakrashim/core/README.md index b5c7bb35bd0..a44a6ae5e6d 100644 --- a/deps/chakrashim/core/README.md +++ b/deps/chakrashim/core/README.md @@ -4,7 +4,7 @@ ChakraCore is the core part of Chakra, the high-performance JavaScript engine th You can stay up-to-date on progress by following the [MSEdge developer blog](http://blogs.windows.com/msedgedev/). -## Build Status +## [Build Status](https://github.com/Microsoft/ChakraCore/wiki/Build-Status) | | __Debug__ | __Test__ | __Release__ | |:-------:|:---------:|:--------:|:-----------:| @@ -12,28 +12,28 @@ You can stay up-to-date on progress by following the [MSEdge developer blog](htt | __x64__ | [![x64debug][x64dbgicon]][x64dbglink] | [![x64test][x64testicon]][x64testlink] | [![x64release][x64relicon]][x64rellink] | | __arm__ | [![armdebug][armdbgicon]][armdbglink] | [![armtest][armtesticon]][armtestlink] | [![armrelease][armrelicon]][armrellink] | -[x86dbgicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_debug/badge/icon -[x86dbglink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_debug/ -[x86testicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_test/badge/icon -[x86testlink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_test/ -[x86relicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_release/badge/icon -[x86rellink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_release/ - -[x64dbgicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_debug/badge/icon -[x64dbglink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_debug/ -[x64testicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_test/badge/icon -[x64testlink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_test/ -[x64relicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_release/badge/icon -[x64rellink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_release/ - -[armdbgicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_debug/badge/icon -[armdbglink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_debug/ -[armtesticon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_test/badge/icon -[armtestlink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_test/ -[armrelicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_release/badge/icon -[armrellink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_release/ - -Note: these badges are correct but currently display on GitHub as image not found because of permissions. This will be fixed when the build jobs are public. +[x86dbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_debug/badge/icon +[x86dbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_debug/ +[x86testicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_test/badge/icon +[x86testlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_test/ +[x86relicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_release/badge/icon +[x86rellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_release/ + +[x64dbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_debug/badge/icon +[x64dbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_debug/ +[x64testicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_test/badge/icon +[x64testlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_test/ +[x64relicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_release/badge/icon +[x64rellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_release/ + +[armdbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_debug/badge/icon +[armdbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_debug/ +[armtesticon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_test/badge/icon +[armtestlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_test/ +[armrelicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_release/badge/icon +[armrellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_release/ + +Above is a table of our rolling build status. We run additional builds on a daily basis. See [Build Status](https://github.com/Microsoft/ChakraCore/wiki/Build-Status) for the status of all builds. ## Security @@ -75,10 +75,10 @@ Contributions to ChakraCore are welcome. Here is how you can contribute to Chak * [Submit pull requests](https://github.com/Microsoft/ChakraCore/pulls) for bug fixes and features and discuss existing proposals * Chat about [@ChakraCore](https://twitter.com/ChakraCore) on Twitter -Please refer to [Contribution guidelines](CONTRIBUTING.md) for more details. +Please refer to [Contribution guidelines](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md) for more details. ## Roadmap For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/ChakraCore/wiki/Roadmap). ## Contact us -For questions about ChakraCore, please open an [issue](https://github.com/Microsoft/ChakraCore/issues/new) and prefix the issue title with [Question]. +For questions about ChakraCore, please open an [issue](https://github.com/Microsoft/ChakraCore/issues/new) and prefix the issue title with [Question]. diff --git a/deps/chakrashim/core/jenkins.check_copyright.py b/deps/chakrashim/core/jenkins.check_copyright.py index 59db93cf059..44fd69e2dac 100644 --- a/deps/chakrashim/core/jenkins.check_copyright.py +++ b/deps/chakrashim/core/jenkins.check_copyright.py @@ -26,8 +26,8 @@ file_name = sys.argv[1] if not os.path.isfile(file_name): - print "File does not exist:", file_name - exit(1) + print "File does not exist:", file_name, "(not neccesarily an error)" + exit(0) with open(file_name, 'r') as sourcefile: for x in range(0,len(copyright_lines)): diff --git a/deps/chakrashim/core/lib/Backend/Encoder.cpp b/deps/chakrashim/core/lib/Backend/Encoder.cpp index a3dd3f8de84..f1406266b8a 100644 --- a/deps/chakrashim/core/lib/Backend/Encoder.cpp +++ b/deps/chakrashim/core/lib/Backend/Encoder.cpp @@ -592,7 +592,7 @@ void Encoder::RecordInlineeFrame(Func* inlinee, uint32 currentOffset) { // The only restriction for not supporting loop bodies is that inlinee frame map is created on FunctionEntryPointInfo & not // the base class EntryPointInfo. - if (!this->m_func->IsSimpleJit()) + if (!this->m_func->IsLoopBody() && !this->m_func->IsSimpleJit()) { InlineeFrameRecord* record = nullptr; if (inlinee->frameInfo && inlinee->m_hasInlineArgsOpt) diff --git a/deps/chakrashim/core/lib/Backend/Func.cpp b/deps/chakrashim/core/lib/Backend/Func.cpp index 26d06e813c7..976a3f2be45 100644 --- a/deps/chakrashim/core/lib/Backend/Func.cpp +++ b/deps/chakrashim/core/lib/Backend/Func.cpp @@ -138,14 +138,14 @@ Func::Func(JitArenaAllocator *alloc, CodeGenWorkItem* workItem, const Js::Functi m_workItem->GetEntryPoint()->SetHasJittedStackClosure(); } - if (m_jnFunction->GetDoBackendArgumentsOptimization() && !m_jnFunction->GetHasTry()) - { - // doBackendArgumentsOptimization bit is set when there is no eval inside a function - // as determined by the bytecode generator. - SetHasStackArgs(true); - } if (m_workItem->Type() == JsFunctionType) { + if (m_jnFunction->GetDoBackendArgumentsOptimization() && !m_jnFunction->GetHasTry()) + { + // doBackendArgumentsOptimization bit is set when there is no eval inside a function + // as determined by the bytecode generator. + SetHasStackArgs(true); + } if (doStackNestedFunc && m_jnFunction->GetNestedCount() != 0) { Assert(!(this->IsJitInDebugMode() && !m_jnFunction->GetUtf8SourceInfo()->GetIsLibraryCode())); 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/Backend/InliningDecider.cpp b/deps/chakrashim/core/lib/Backend/InliningDecider.cpp index a10ed9705ae..087c6d2badd 100644 --- a/deps/chakrashim/core/lib/Backend/InliningDecider.cpp +++ b/deps/chakrashim/core/lib/Backend/InliningDecider.cpp @@ -190,7 +190,7 @@ Js::FunctionInfo *InliningDecider::Inline(Js::FunctionBody *const inliner, Js::F Js::FunctionProxy * proxy = functionInfo->GetFunctionProxy(); if (proxy && proxy->IsFunctionBody()) { - if (isLoopBody && PHASE_OFF(Js::InlineInJitLoopBodyPhase, this->topFunc)) + if (isLoopBody && !PHASE_ON(Js::InlineInJitLoopBodyPhase, this->topFunc)) { INLINE_TESTTRACE_VERBOSE(L"INLINING: Skip Inline: Jit loop body: %s (%s)\n", this->topFunc->GetDisplayName(), this->topFunc->GetDebugNumberSet(debugStringBuffer)); diff --git a/deps/chakrashim/core/lib/Backend/NativeCodeGenerator.cpp b/deps/chakrashim/core/lib/Backend/NativeCodeGenerator.cpp index dce7ace495b..2d512d91f1d 100644 --- a/deps/chakrashim/core/lib/Backend/NativeCodeGenerator.cpp +++ b/deps/chakrashim/core/lib/Backend/NativeCodeGenerator.cpp @@ -1708,6 +1708,7 @@ NativeCodeGenerator::GatherCodeGenData( Assert(functionBody); Assert(jitTimeData); Assert(IsInlinee == !!runtimeData); + Assert(!IsInlinee || !inliningDecider.GetIsLoopBody()); Assert(topFunctionBody != nullptr && (!entryPoint->GetWorkItem() || entryPoint->GetWorkItem()->GetFunctionBody() == topFunctionBody)); Assert(objTypeSpecFldInfoList != nullptr); diff --git a/deps/chakrashim/core/lib/Parser/CharClassifier.cpp b/deps/chakrashim/core/lib/Parser/CharClassifier.cpp index ceca04eba1d..9e3a291c9d7 100644 --- a/deps/chakrashim/core/lib/Parser/CharClassifier.cpp +++ b/deps/chakrashim/core/lib/Parser/CharClassifier.cpp @@ -619,28 +619,36 @@ void Js::CharClassifier::initClassifier(ScriptContext * scriptContext, CharClass if (es6ModeNeeded) { HRESULT hr = globalizationAdapter->EnsureDataTextObjectsInitialized(globLibrary); + // Failed to load windows.globalization.dll or jsintl.dll. No unicodeStatics support + // in that case. if (FAILED(hr)) { - AssertMsg(false, "Failed to initialize COM interfaces, verify correct version of globalization dll is used."); - JavascriptError::MapAndThrowError(scriptContext, hr); - } - - this->winGlobCharApi = globalizationAdapter->GetUnicodeStatics(); - if (this->winGlobCharApi == nullptr) - { - // No fallback mode, then assert - if (es6FallbackMode == CharClassifierModes::ES6) - { - AssertMsg(false, "Windows::Data::Text::IUnicodeCharactersStatics not initialized"); - //Fallback to ES5 just in case for fre builds. - es6FallbackMode = CharClassifierModes::ES5; - } if (isES6UnicodeVerboseEnabled) { Output::Print(L"Windows::Data::Text::IUnicodeCharactersStatics not initialized\r\n"); } - //Default to non-es6 es6Supported = false; + es6FallbackMode = CharClassifierModes::ES5; + } + else + { + this->winGlobCharApi = globalizationAdapter->GetUnicodeStatics(); + if (this->winGlobCharApi == nullptr) + { + // No fallback mode, then assert + if (es6FallbackMode == CharClassifierModes::ES6) + { + AssertMsg(false, "Windows::Data::Text::IUnicodeCharactersStatics not initialized"); + //Fallback to ES5 just in case for fre builds. + es6FallbackMode = CharClassifierModes::ES5; + } + if (isES6UnicodeVerboseEnabled) + { + Output::Print(L"Windows::Data::Text::IUnicodeCharactersStatics not initialized\r\n"); + } + //Default to non-es6 + es6Supported = false; + } } } #else diff --git a/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.cpp b/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.cpp index d780ddf327e..a5e61042a38 100644 --- a/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.cpp +++ b/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.cpp @@ -176,6 +176,11 @@ namespace Js return E_NOTIMPL; } + bool DelayLoadWindowsGlobalization::HasGlobalizationDllLoaded() + { + return this->hasGlobalizationDllLoaded; + } + HRESULT DelayLoadWindowsGlobalization::DllGetActivationFactory( __in HSTRING activatibleClassId, __out IActivationFactory** factory) @@ -268,6 +273,11 @@ namespace Js m_hModule = LoadLibraryEx(GetWin7LibraryName(), nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); } + // Set the flag depending on Windows.globalization.dll or jsintl.dll was loaded successfully or not + if (m_hModule != nullptr) + { + hasGlobalizationDllLoaded = true; + } this->winRTStringLibrary = winRTStringLibrary; this->winRTStringsPresent = GetFunction("WindowsDuplicateString") != nullptr; } diff --git a/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.h b/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.h index c6c294bf3b2..2dfc42807a5 100644 --- a/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.h +++ b/deps/chakrashim/core/lib/Runtime/Base/DelayLoadLibrary.h @@ -166,13 +166,15 @@ namespace Js PFNCWDllGetActivationFactory m_pfnFNCWDllGetActivationFactory; Js::DelayLoadWinRtString *winRTStringLibrary; - BOOL winRTStringsPresent; + bool winRTStringsPresent; + bool hasGlobalizationDllLoaded; public: DelayLoadWindowsGlobalization() : DelayLoadWinRtString(), m_pfnFNCWDllGetActivationFactory(nullptr), winRTStringLibrary(nullptr), - winRTStringsPresent(false) { } + winRTStringsPresent(false), + hasGlobalizationDllLoaded(false) { } virtual ~DelayLoadWindowsGlobalization() { } @@ -187,6 +189,7 @@ namespace Js void Ensure(Js::DelayLoadWinRtString *winRTStringLibrary); HRESULT DllGetActivationFactory(__in HSTRING activatibleClassId, __out IActivationFactory** factory); + bool HasGlobalizationDllLoaded(); HRESULT WindowsCreateString(_In_reads_opt_(length) const WCHAR * sourceString, UINT32 length, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING * string) override; HRESULT WindowsCreateStringReference(_In_reads_opt_(length+1) const WCHAR * sourceString, UINT32 length, _Out_ HSTRING_HEADER * header, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING * string) override; diff --git a/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp b/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp index a82504e6f73..3a0334287f9 100644 --- a/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp +++ b/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp @@ -5239,6 +5239,17 @@ void ScriptContext::RegisterPrototypeChainEnsuredToHaveOnlyWritableDataPropertie return false; } + bool ScriptContext::IsIntlEnabled() + { + if (GetConfig()->IsIntlEnabled()) + { + // This will try to load globalization dlls if not already loaded. + Js::DelayLoadWindowsGlobalization* globLibrary = GetThreadContext()->GetWindowsGlobalizationLibrary(); + return globLibrary->HasGlobalizationDllLoaded(); + } + return false; + } + #ifdef INLINE_CACHE_STATS void ScriptContext::LogCacheUsage(Js::PolymorphicInlineCache *cache, bool isGetter, Js::PropertyId propertyId, bool hit, bool collision) diff --git a/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.h b/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.h index 28fa9140321..832cfb943ab 100644 --- a/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.h +++ b/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.h @@ -913,6 +913,7 @@ namespace Js void RestoreRegexStacks(UnifiedRegex::RegexStacks *const contStack); void InitializeGlobalObject(); + bool IsIntlEnabled(); JavascriptLibrary* GetLibrary() const { return javascriptLibrary; } const JavascriptLibraryBase* GetLibraryBase() const { return javascriptLibrary->GetLibraryBase(); } #if DBG diff --git a/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.cpp b/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.cpp index b787454269d..538ec0c78e3 100644 --- a/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.cpp +++ b/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.cpp @@ -4380,9 +4380,9 @@ namespace Js (Js::JavascriptNumber *)buffer), scriptContext, flags, dValue); #endif } - BOOL JavascriptOperators::OP_Memcopy(Var dstInstance, int32 dstStart, Var srcInstance, int32 srcStart, uint32 length, ScriptContext* scriptContext) + BOOL JavascriptOperators::OP_Memcopy(Var dstInstance, int32 dstStart, Var srcInstance, int32 srcStart, int32 length, ScriptContext* scriptContext) { - if (length == 0) + if (length <= 0) { return true; } @@ -4481,9 +4481,9 @@ namespace Js return returnValue; } - BOOL JavascriptOperators::OP_Memset(Var instance, int32 start, Var value, uint32 length, ScriptContext* scriptContext) + BOOL JavascriptOperators::OP_Memset(Var instance, int32 start, Var value, int32 length, ScriptContext* scriptContext) { - if (length == 0) + if (length <= 0) { return true; } diff --git a/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.h b/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.h index b0b0645b661..461de94470c 100644 --- a/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.h +++ b/deps/chakrashim/core/lib/Runtime/Language/JavascriptOperators.h @@ -318,8 +318,8 @@ namespace Js static Var OP_DeleteElementI(Var instance, Var aElementIndex, ScriptContext* scriptContext, PropertyOperationFlags propertyOperationFlags = PropertyOperation_None); static Var OP_DeleteElementI_UInt32(Var instance, uint32 aElementIndex, ScriptContext* scriptContext, PropertyOperationFlags propertyOperationFlags = PropertyOperation_None); static Var OP_DeleteElementI_Int32(Var instance, int aElementIndex, ScriptContext* scriptContext, PropertyOperationFlags propertyOperationFlags = PropertyOperation_None); - static BOOL OP_Memset(Var instance, int32 start, Var value, uint32 length, ScriptContext* scriptContext); - static BOOL OP_Memcopy(Var dstInstance, int32 dstStart, Var srcInstance, int32 srcStart, uint32 length, ScriptContext* scriptContext); + static BOOL OP_Memset(Var instance, int32 start, Var value, int32 length, ScriptContext* scriptContext); + static BOOL OP_Memcopy(Var dstInstance, int32 dstStart, Var srcInstance, int32 srcStart, int32 length, ScriptContext* scriptContext); static Var OP_GetLength(Var instance, ScriptContext* scriptContext); static Var OP_GetThis(Var thisVar, int moduleID, ScriptContext* scriptContext); static Var OP_GetThisNoFastPath(Var thisVar, int moduleID, ScriptContext* scriptContext); diff --git a/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.cpp b/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.cpp index 32404338baf..5b17c9ad658 100644 --- a/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.cpp +++ b/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.cpp @@ -300,7 +300,11 @@ namespace Js { if (this->IsJavascriptFrame()) { - if (this->interpreterFrame && this->lastInternalFrameInfo.codeAddress == nullptr) + if (this->interpreterFrame +#if ENABLE_NATIVE_CODEGEN + && this->lastInternalFrameInfo.codeAddress == nullptr +#endif + ) { uint32 offset = this->interpreterFrame->GetReader()->GetCurrentOffset(); if (offset == 0) @@ -366,52 +370,63 @@ namespace Js FunctionBody *inlinee = nullptr; StatementData data; - // For inlined frames, translation from native offset -> source code happens in two steps. - // The native offset is first translated into a statement index using the physical frame's - // source context info. This statement index is then looked up in the *inlinee*'s source - // context info to get the bytecode offset. - // - // For all inlined frames contained within a physical frame we have only one offset == (IP - entry). - // Since we can't use that to get the other inlined callers' IPs, we save the IP of all inlined - // callers in its "callinfo" (See InlineeCallInfo). The top most inlined frame uses the IP - // of the physical frame. All other inlined frames use the preceding inlined frame's offset. - // - function = this->GetCurrentFunctionFromPhysicalFrame(); - inlinee = inlinedFramesBeingWalked ? inlinedFrameWalker.GetFunctionObject()->GetFunctionBody() : nullptr; - InlinedFrameWalker tmpFrameWalker; - if (inlinedFramesBeingWalked) + if (this->interpreterFrame == nullptr) //Inlining is disabled in Jit Loopbody. Don't attempt to get the statement map from the inlined frame. { - // Inlined frames are being walked right now. The top most frame is where the IP is. - if (!inlinedFrameWalker.IsTopMostFrame()) + // For inlined frames, translation from native offset -> source code happens in two steps. + // The native offset is first translated into a statement index using the physical frame's + // source context info. This statement index is then looked up in the *inlinee*'s source + // context info to get the bytecode offset. + // + // For all inlined frames contained within a physical frame we have only one offset == (IP - entry). + // Since we can't use that to get the other inlined callers' IPs, we save the IP of all inlined + // callers in its "callinfo" (See InlineeCallInfo). The top most inlined frame uses the IP + // of the physical frame. All other inlined frames use the preceding inlined frame's offset. + // + function = this->GetCurrentFunctionFromPhysicalFrame(); + inlinee = inlinedFramesBeingWalked ? inlinedFrameWalker.GetFunctionObject()->GetFunctionBody() : nullptr; + InlinedFrameWalker tmpFrameWalker; + if (inlinedFramesBeingWalked) { - if (function->GetFunctionBody()->GetMatchingStatementMapFromNativeOffset(pCodeAddr, - inlinedFrameWalker.GetCurrentInlineeOffset(), - data, - loopNum, - inlinee)) + // Inlined frames are being walked right now. The top most frame is where the IP is. + if (!inlinedFrameWalker.IsTopMostFrame()) + { + if (function->GetFunctionBody()->GetMatchingStatementMapFromNativeOffset(pCodeAddr, + inlinedFrameWalker.GetCurrentInlineeOffset(), + data, + loopNum, + inlinee)) + { + return data.bytecodeBegin; + } + } + } + else if (ScriptFunction::Is(function) && + InlinedFrameWalker::FromPhysicalFrame(tmpFrameWalker, currentFrame, ScriptFunction::FromVar(function), previousInterpreterFrameIsFromBailout, loopNum, this)) + { + // Inlined frames are not being walked right now. However, if there + // are inlined frames on the stack the InlineeCallInfo of the first inlined frame + // has the native offset of the current physical frame. + Assert(!inlinee); + uint32 inlineeOffset = tmpFrameWalker.GetBottomMostInlineeOffset(); + tmpFrameWalker.Close(); + + if (this->GetCurrentFunctionFromPhysicalFrame()->GetFunctionBody()->GetMatchingStatementMapFromNativeOffset(pCodeAddr, + inlineeOffset, + data, + loopNum, + inlinee)) { return data.bytecodeBegin; } } } - else if (ScriptFunction::Is(function) && - InlinedFrameWalker::FromPhysicalFrame(tmpFrameWalker, currentFrame, ScriptFunction::FromVar(function), previousInterpreterFrameIsFromBailout, loopNum, this)) + else { - // Inlined frames are not being walked right now. However, if there - // are inlined frames on the stack the InlineeCallInfo of the first inlined frame - // has the native offset of the current physical frame. - Assert(!inlinee); - uint32 inlineeOffset = tmpFrameWalker.GetBottomMostInlineeOffset(); - tmpFrameWalker.Close(); - - if (this->GetCurrentFunctionFromPhysicalFrame()->GetFunctionBody()->GetMatchingStatementMapFromNativeOffset(pCodeAddr, - inlineeOffset, - data, - loopNum, - inlinee)) - { - return data.bytecodeBegin; - } + //Get the function from the interpreterFrame in jit loop body case + //This is exactly same as this->GetCurrentFunctionFromPhysicalFrame() if the interperterFrame is not + //called from bailout path. + Assert(this->lastInternalFrameInfo.codeAddress); + function = this->interpreterFrame->GetJavascriptFunction(); } if (function->GetFunctionBody() && function->GetFunctionBody()->GetMatchingStatementMapFromNativeAddress(pCodeAddr, data, loopNum, inlinee)) @@ -754,10 +769,12 @@ namespace Js bool JavascriptStackWalker::CheckJavascriptFrame(bool includeInlineFrames) { +#if ENABLE_NATIVE_CODEGEN if (this->lastInternalFrameInfo.frameConsumed) { ClearCachedInternalFrameInfo(); } +#endif this->isNativeLibraryFrame = false; // Clear previous result @@ -795,7 +812,8 @@ namespace Js this->tempInterpreterFrame = this->interpreterFrame->GetPreviousFrame(); -#if DBG && ENABLE_NATIVE_CODEGEN +#if ENABLE_NATIVE_CODEGEN +#if DBG if (((CallInfo const *)&argv[JavascriptFunctionArgIndex_CallInfo])->Flags & CallFlags_InternalFrame) { // The return address of the interpreterFrame is the same as the entryPoint for a jitted loop body. @@ -807,7 +825,7 @@ namespace Js true /*fromBailout*/, this->tempInterpreterFrame->GetCurrentLoopNum(), this, true /*noAlloc*/)); tmpFrameWalker.Close(); } -#endif +#endif //DBG if (!this->interpreterFrame->IsCurrentLoopNativeAddr(this->lastInternalFrameInfo.codeAddress)) { @@ -818,7 +836,7 @@ namespace Js Assert(this->lastInternalFrameInfo.codeAddress); this->lastInternalFrameInfo.frameConsumed = true; } - +#endif //ENABLE_NATIVE_CODEGEN return true; } @@ -1010,6 +1028,7 @@ namespace Js return this->GetCurrentArgv()[JavascriptFunctionArgIndex_This]; } +#if ENABLE_NATIVE_CODEGEN void JavascriptStackWalker::ClearCachedInternalFrameInfo() { this->lastInternalFrameInfo.Clear(); @@ -1023,6 +1042,7 @@ namespace Js } this->lastInternalFrameInfo.loopBodyFrameType = loopBodyFrameType; } +#endif bool JavascriptStackWalker::IsCurrentPhysicalFrameForLoopBody() const { diff --git a/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.h b/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.h index ad8fe9d96a1..fa6f08bdb8b 100644 --- a/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.h +++ b/deps/chakrashim/core/lib/Runtime/Language/JavascriptStackWalker.h @@ -224,9 +224,11 @@ namespace Js static bool TryIsTopJavaScriptFrameNative(ScriptContext* scriptContext, bool* istopFrameNative, bool ignoreLibraryCode = false); +#if ENABLE_NATIVE_CODEGEN void ClearCachedInternalFrameInfo(); void SetCachedInternalFrameInfo(InternalFrameType frameType, InternalFrameType loopBodyFrameType); InternalFrameInfo GetCachedInternalFrameInfo() const { return this->lastInternalFrameInfo; } +#endif bool IsCurrentPhysicalFrameForLoopBody() const; // noinline, we want to use own stack frame. @@ -326,9 +328,9 @@ namespace Js void SetCurrentArgumentsObject(Var args); Var GetCurrentNativeArgumentsObject() const; void SetCurrentNativeArgumentsObject(Var args); - +#if ENABLE_NATIVE_CODEGEN InternalFrameInfo lastInternalFrameInfo; - +#endif mutable StackFrame currentFrame; Js::JavascriptFunction * UpdateFrame(bool includeInlineFrames); diff --git a/deps/chakrashim/core/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp b/deps/chakrashim/core/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp index e7f4bf4be0d..4861639e574 100644 --- a/deps/chakrashim/core/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp +++ b/deps/chakrashim/core/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp @@ -30,8 +30,11 @@ using namespace Windows::Globalization; #pragma warning(pop) -#define IfCOMFailAssertMsgAndThrowHr(op) \ - IfFailAssertMsgAndThrowHr(op, "Failed to initialize COM interfaces, verify correct version of globalization dll is used.") +#define IfCOMFailIgnoreSilentlyAndReturn(op) \ + if(FAILED(hr=(op))) \ + { \ + return; \ + } \ #define IfFailAssertMsgAndThrowHr(op, msg) \ if (FAILED(hr=(op))) \ @@ -233,7 +236,7 @@ namespace Js } JavascriptLibrary* library = scriptContext->GetLibrary(); DynamicObject* commonObject = library->GetEngineInterfaceObject()->GetCommonNativeInterfaces(); - if (scriptContext->GetConfig()->IsIntlEnabled()) + if (scriptContext->IsIntlEnabled()) { Assert(library->GetEngineInterfaceObject() != nullptr); this->intlNativeInterfaces = DynamicObject::New(library->GetRecycler(), @@ -383,7 +386,7 @@ namespace Js JavascriptString* initType = nullptr; //Ensure we have initialized all appropriate COM objects for the adapter (we will be using them now) - IfCOMFailAssertMsgAndThrowHr(GetWindowsGlobalizationAdapter(scriptContext)->EnsureCommonObjectsInitialized(library)); + IfCOMFailIgnoreSilentlyAndReturn(globAdapter->EnsureCommonObjectsInitialized(library)); switch (intlInitializationType) { default: @@ -391,8 +394,8 @@ namespace Js // fall thru case IntlInitializationType::Intl: - IfCOMFailAssertMsgAndThrowHr(globAdapter->EnsureNumberFormatObjectsInitialized(library)); - IfCOMFailAssertMsgAndThrowHr(globAdapter->EnsureDateTimeFormatObjectsInitialized(library)); + IfCOMFailIgnoreSilentlyAndReturn(globAdapter->EnsureNumberFormatObjectsInitialized(library)); + IfCOMFailIgnoreSilentlyAndReturn(globAdapter->EnsureDateTimeFormatObjectsInitialized(library)); initType = scriptContext->GetLibrary()->CreateStringFromCppLiteral(L"Intl"); break; case IntlInitializationType::StringPrototype: @@ -400,11 +403,11 @@ namespace Js initType = scriptContext->GetLibrary()->CreateStringFromCppLiteral(L"String"); break; case IntlInitializationType::DatePrototype: - IfCOMFailAssertMsgAndThrowHr(globAdapter->EnsureDateTimeFormatObjectsInitialized(library)); + IfCOMFailIgnoreSilentlyAndReturn(globAdapter->EnsureDateTimeFormatObjectsInitialized(library)); initType = scriptContext->GetLibrary()->CreateStringFromCppLiteral(L"Date"); break; case IntlInitializationType::NumberPrototype: - IfCOMFailAssertMsgAndThrowHr(globAdapter->EnsureNumberFormatObjectsInitialized(library)); + IfCOMFailIgnoreSilentlyAndReturn(globAdapter->EnsureNumberFormatObjectsInitialized(library)); initType = scriptContext->GetLibrary()->CreateStringFromCppLiteral(L"Number"); break; } diff --git a/deps/chakrashim/core/lib/Runtime/Library/JavascriptDate.cpp b/deps/chakrashim/core/lib/Runtime/Library/JavascriptDate.cpp index 64433e7c7ef..aabb77c7d81 100644 --- a/deps/chakrashim/core/lib/Runtime/Library/JavascriptDate.cpp +++ b/deps/chakrashim/core/lib/Runtime/Library/JavascriptDate.cpp @@ -1306,7 +1306,7 @@ namespace Js JavascriptDate* date = JavascriptDate::FromVar(args[0]); #ifdef ENABLE_INTL_OBJECT - if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->GetConfig()->IsIntlEnabled()){ + if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->IsIntlEnabled()){ EngineInterfaceObject* nativeEngineInterfaceObj = scriptContext->GetLibrary()->GetEngineInterfaceObject(); if (nativeEngineInterfaceObj) @@ -1357,7 +1357,7 @@ namespace Js JavascriptDate* date = JavascriptDate::FromVar(args[0]); #ifdef ENABLE_INTL_OBJECT - if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->GetConfig()->IsIntlEnabled()){ + if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->IsIntlEnabled()){ EngineInterfaceObject* nativeEngineInterfaceObj = scriptContext->GetLibrary()->GetEngineInterfaceObject(); if (nativeEngineInterfaceObj) @@ -1416,7 +1416,7 @@ namespace Js JavascriptDate* date = JavascriptDate::FromVar(args[0]); #ifdef ENABLE_INTL_OBJECT - if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->GetConfig()->IsIntlEnabled()){ + if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->IsIntlEnabled()){ EngineInterfaceObject* nativeEngineInterfaceObj = scriptContext->GetLibrary()->GetEngineInterfaceObject(); if (nativeEngineInterfaceObj) diff --git a/deps/chakrashim/core/lib/Runtime/Library/JavascriptLibrary.cpp b/deps/chakrashim/core/lib/Runtime/Library/JavascriptLibrary.cpp index e1fdf868b18..f2f543ace7a 100644 --- a/deps/chakrashim/core/lib/Runtime/Library/JavascriptLibrary.cpp +++ b/deps/chakrashim/core/lib/Runtime/Library/JavascriptLibrary.cpp @@ -1445,7 +1445,7 @@ namespace Js AddMember(globalObject, PropertyIds::JSON, JSONObject); #ifdef ENABLE_INTL_OBJECT - if (scriptContext->GetConfig()->IsIntlEnabled()) + if (scriptContext->IsIntlEnabled()) { IntlObject = DynamicObject::New(recycler, DynamicType::New(scriptContext, TypeIds_Object, objectPrototype, nullptr, diff --git a/deps/chakrashim/core/lib/Runtime/Library/JavascriptNumber.cpp b/deps/chakrashim/core/lib/Runtime/Library/JavascriptNumber.cpp index 4a687efbe37..8a8593bfc18 100644 --- a/deps/chakrashim/core/lib/Runtime/Library/JavascriptNumber.cpp +++ b/deps/chakrashim/core/lib/Runtime/Library/JavascriptNumber.cpp @@ -652,7 +652,7 @@ namespace Js } #ifdef ENABLE_INTL_OBJECT - if(CONFIG_FLAG(IntlBuiltIns) && scriptContext->GetConfig()->IsIntlEnabled()){ + if(CONFIG_FLAG(IntlBuiltIns) && scriptContext->IsIntlEnabled()){ EngineInterfaceObject* nativeEngineInterfaceObj = scriptContext->GetLibrary()->GetEngineInterfaceObject(); if (nativeEngineInterfaceObj) diff --git a/deps/chakrashim/core/lib/Runtime/Library/JavascriptString.cpp b/deps/chakrashim/core/lib/Runtime/Library/JavascriptString.cpp index f37d23124b8..4652e2532ae 100644 --- a/deps/chakrashim/core/lib/Runtime/Library/JavascriptString.cpp +++ b/deps/chakrashim/core/lib/Runtime/Library/JavascriptString.cpp @@ -1302,7 +1302,7 @@ namespace Js GetThisAndSearchStringArguments(args, scriptContext, L"String.prototype.localeCompare", &pThis, &pThat, true); #ifdef ENABLE_INTL_OBJECT - if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->GetConfig()->IsIntlEnabled()) + if (CONFIG_FLAG(IntlBuiltIns) && scriptContext->IsIntlEnabled()) { EngineInterfaceObject* nativeEngineInterfaceObj = scriptContext->GetLibrary()->GetEngineInterfaceObject(); if (nativeEngineInterfaceObj) diff --git a/deps/chakrashim/core/lib/common/CommonDefines.h b/deps/chakrashim/core/lib/common/CommonDefines.h index 8074a9363dd..ab08355f70e 100644 --- a/deps/chakrashim/core/lib/common/CommonDefines.h +++ b/deps/chakrashim/core/lib/common/CommonDefines.h @@ -11,10 +11,10 @@ // Chakra Core version //---------------------------------------------------------------------------------------------------- #define CHAKRA_CORE_MAJOR_VERSION 1 -#define CHAKRA_CORE_MINOR_VERSION 0 -#define CHAKRA_CORE_VERSION_RELEASE 0 -#define CHAKRA_CORE_VERSION_PRERELEASE 1 -#define CHAKRA_CORE_VERSION_RELEASE_QFE 0 +#define CHAKRA_CORE_MINOR_VERSION 1 +#define CHAKRA_CORE_VERSION_RELEASE 1 +#define CHAKRA_CORE_VERSION_PRERELEASE 0 +#define CHAKRA_CORE_VERSION_RELEASE_QFE 3 #define CHAKRA_VERSION_RELEASE 0 #define CHAKRA_VERSION_PRERELEASE 1 diff --git a/deps/chakrashim/core/test/Array/memset_invariant.js b/deps/chakrashim/core/test/Array/memset_invariant.js index b47684803e2..6e6f531d815 100644 --- a/deps/chakrashim/core/test/Array/memset_invariant.js +++ b/deps/chakrashim/core/test/Array/memset_invariant.js @@ -12,6 +12,12 @@ function* makeValueGen(a, b) { yield b; } +function* makeStartGen(a, b) { + yield 0; // for interpreter + yield 32; // for jitted version + yield 32; // for jitted version +} + function makeTest(name, config) { const f1 = `function ${name}(arr) { for(var i = -5; i < 15; ++i) {arr[i] = ${config.v1};} @@ -26,6 +32,11 @@ function makeTest(name, config) { for(var i = -2; i < 17; ++i) {arr[i] = v;} return arr; }`; + const f4 = customName => `function ${customName}Z(arr, start) { + const v = ${config.v1}; + for(var i = start; i < 5; ++i) {arr[i] = v;} + return arr; + }`; const extraTests = (config.wrongTypes || []).map((wrongType, i) => { const difValue = {f: f2(`${name}W${i}`), compare: f2(`${name}WC${i}`)}; @@ -36,10 +47,17 @@ function makeTest(name, config) { return difValue; }); + const negativeLengthTest = {f: f4(name), compare: f4(`${name}C`), newForCompare: true}; + const genIndex = makeStartGen(); + Reflect.defineProperty(negativeLengthTest, "v", { + get: () => genIndex.next().value + }); + const tests = [ {f: f1}, {f: f2(name), v: config.v2 !== undefined ? config.v2 : config.v1}, {f: f3}, + negativeLengthTest ].concat(extraTests); const convertTest = function(fnText) { @@ -77,9 +95,8 @@ for(const test of tests) { let a1 = fn(new global[t](10), detail.v); const a2 = fn(new global[t](10), detail.v); if(detail.compare) { - // the optimized version ran with a different value. Run again with a clean function to compare - // reuse a1 to test if we correctly overwrite the values - a1 = detail.compare(a1, detail.v); + // the optimized version ran with a different value. Run again with a clean function to compare= + a1 = detail.compare(detail.newForCompare ? new global[t](10) : a1, detail.v); } if(a1.length !== a2.length) { passed = false; diff --git a/deps/chakrashim/core/test/Optimizer/test143.baseline b/deps/chakrashim/core/test/Optimizer/test143.baseline index e190d3eacd7..972d53d9785 100644 --- a/deps/chakrashim/core/test/Optimizer/test143.baseline +++ b/deps/chakrashim/core/test/Optimizer/test143.baseline @@ -5,5 +5,7 @@ Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Separating array checks Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Hoisting array checks with bailout out of loop Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Eliminating array checks Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Separating array checks with bailout +Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Eliminating array checks +Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Separating array checks with bailout Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Hoisting array checks with bailout out of loop Testtrace: ArrayCheckHoist function test0 ( (#1.1), #2): Eliminating array checks diff --git a/deps/chakrashim/core/test/es6/rlexe.xml b/deps/chakrashim/core/test/es6/rlexe.xml index 68b5a7bbdd0..b7bb4d3ca07 100644 --- a/deps/chakrashim/core/test/es6/rlexe.xml +++ b/deps/chakrashim/core/test/es6/rlexe.xml @@ -507,7 +507,7 @@ unicode_6_identifiers.js unicode_6_identifiers.baseline -ES6Unicode - exclude_ship + exclude_win7,exclude_ship @@ -1005,7 +1005,7 @@ bug_OS_2553885.js - BugFix + exclude_win7,BugFix 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