diff --git a/deps/chakrashim/core/.gitattributes b/deps/chakrashim/core/.gitattributes
index 5e8d1b1f838..d179809ca9c 100644
--- a/deps/chakrashim/core/.gitattributes
+++ b/deps/chakrashim/core/.gitattributes
@@ -1,11 +1,11 @@
-*.baseline -crlf
-*.cmd -crlf
-test/**/*.js -crlf
-test/es6/HTMLComments.js binary diff=cpp
-*.wasm binary
-*.cpp text eol=lf diff=cpp
-*.h text eol=lf diff=cpp
-*.inl text eol=lf diff=cpp
-*.vcproj text eol=crlf diff=xml
-*.vcxproj text eol=crlf diff=xml
-*.sln text eol=crlf diff=xml
+*.baseline -crlf
+*.cmd -crlf
+test/**/*.js -crlf
+test/es6/HTMLComments.js binary diff=cpp
+*.wasm binary
+*.cpp text eol=lf diff=cpp
+*.h text eol=lf diff=cpp
+*.inl text eol=lf diff=cpp
+*.vcproj text eol=crlf diff=xml
+*.vcxproj text eol=crlf diff=xml
+*.sln text eol=crlf diff=xml
diff --git a/deps/chakrashim/core/.gitignore b/deps/chakrashim/core/.gitignore
index ba8bbcdcf8c..d4c817a8b93 100644
--- a/deps/chakrashim/core/.gitignore
+++ b/deps/chakrashim/core/.gitignore
@@ -1,109 +1,109 @@
-# Visual Studio
-*_i.c
-*_p.c
-*.aps
-*.bak
-*.cache
-*.dll
-*.err
-*.exe
-*.i
-*.ilk
-*.lib
-*.log
-*.ncb
-*.obj
-*.opendb
-*.opensdf
-*.pch
-*.pdb
-*.sbr
-*.sdf
-*.suo
-*.tlb
-*.tlh
-*.user
-*.VC.db
-*.vcxproj.user
-*.vspscc
-*.wrn
-.vs/
-
-# Visual Studio Extensions
-*.vadbg
-*.args.json
-
-# Build Artifacts
-build_*.err
-build_*.log
-build_*.wrn
-Build/ipch/
-Build/swum-cache.txt
-Build/VCBuild.NoJIT/
-Build/VCBuild.SWB/
-Build/VCBuild/
-buildchk.*
-buildfre.*
-out/
-_DROP/
-
-# Generated Files
-*.bc
-*.dpl.*
-*.nupkg
-*.pyc
-*.tlog/
-/test/_ttdlog/*
-ComputedEnvironment.cmd
-packages/
-profile.dpl.*
-sd.ini
-test/*/*.baseline.rebase
-test/benchmarks/*.dpl
-test/benchmarks/*.txt
-testout*
-packages.config
-lib/wabt/built/
-
-# CMake Files
-cmake_install.cmake
-CMakeCache.txt
-CMakeFiles
-CMakeScripts
-install_manifest.txt
-
-# xcode
-*.xcodeproj
-*.xcworkspace
-
-# VIM
-.*.swo
-.*.swp
-tags
-
-# VS Code
-.vscode/
-
-# additional *nix generated files
-*.a
-*.gch
-*.o
-*.so
-*.dylib
-Makefile
-pal/src/config.h
-DbgController.js.h
-lib/wabt/built/config.h
-
-# Generated by other tools
-*.lldb.cmd
-*.orig
-deps/
-
-.DS_Store
-android-toolchain-arm/
-cc-toolchain/
-/TraceOutput.txt
-Build/VcBuild
-Build/VcBuild.NoJIT
-Build/VcBuild.SWB
+# Visual Studio
+*_i.c
+*_p.c
+*.aps
+*.bak
+*.cache
+*.dll
+*.err
+*.exe
+*.i
+*.ilk
+*.lib
+*.log
+*.ncb
+*.obj
+*.opendb
+*.opensdf
+*.pch
+*.pdb
+*.sbr
+*.sdf
+*.suo
+*.tlb
+*.tlh
+*.user
+*.VC.db
+*.vcxproj.user
+*.vspscc
+*.wrn
+.vs/
+
+# Visual Studio Extensions
+*.vadbg
+*.args.json
+
+# Build Artifacts
+build_*.err
+build_*.log
+build_*.wrn
+Build/ipch/
+Build/swum-cache.txt
+Build/VCBuild.NoJIT/
+Build/VCBuild.SWB/
+Build/VCBuild/
+buildchk.*
+buildfre.*
+out/
+_DROP/
+
+# Generated Files
+*.bc
+*.dpl.*
+*.nupkg
+*.pyc
+*.tlog/
+/test/_ttdlog/*
+ComputedEnvironment.cmd
+packages/
+profile.dpl.*
+sd.ini
+test/*/*.baseline.rebase
+test/benchmarks/*.dpl
+test/benchmarks/*.txt
+testout*
+packages.config
+lib/wabt/built/
+
+# CMake Files
+cmake_install.cmake
+CMakeCache.txt
+CMakeFiles
+CMakeScripts
+install_manifest.txt
+
+# xcode
+*.xcodeproj
+*.xcworkspace
+
+# VIM
+.*.swo
+.*.swp
+tags
+
+# VS Code
+.vscode/
+
+# additional *nix generated files
+*.a
+*.gch
+*.o
+*.so
+*.dylib
+Makefile
+pal/src/config.h
+DbgController.js.h
+lib/wabt/built/config.h
+
+# Generated by other tools
+*.lldb.cmd
+*.orig
+deps/
+
+.DS_Store
+android-toolchain-arm/
+cc-toolchain/
+/TraceOutput.txt
+Build/VcBuild
+Build/VcBuild.NoJIT
+Build/VcBuild.SWB
diff --git a/deps/chakrashim/core/Build/Chakra.Build.props b/deps/chakrashim/core/Build/Chakra.Build.props
index 201322c7ec3..8c3424e8ae9 100644
--- a/deps/chakrashim/core/Build/Chakra.Build.props
+++ b/deps/chakrashim/core/Build/Chakra.Build.props
@@ -1,88 +1,88 @@
-
-
-
-
- 0x0601
- 0x0602
- 0x0603
- 0x0A00
-
-
- $(WindowsSdkDir)Include\um
- $(WindowsSdkDir)Include\$(TargetPlatformVersion)\um
-
-
- nothrownew.obj
-
-
- $(BuildWithCodeAnalysis)
-
-
-
-
- %(PreprocessorDefinitions);
- _CHAKRACOREBUILD;
- _WIN32_WINNT=$(Win32_WinNTVersion);
- WINVER=$(Win32_WinNTVersion);
- WIN32_LEAN_AND_MEAN=1
-
-
- %(PreprocessorDefinitions);
- DISABLE_JIT=1
-
-
- %(PreprocessorDefinitions);
- INTL_ICU=1
-
-
- %(PreprocessorDefinitions);
- GLOBAL_ENABLE_WRITE_BARRIER=1
-
- %(PreprocessorDefinitions);NTDDI_VERSION=$(NTDDIVersion)
-
-
- %(DisableSpecificWarnings);
- 4458;
- 4312;
-
-
- MultiThreadedDebugDLL
- MultiThreadedDebug
-
- $(ChakraCoreRootDirectory)\lib\common\placeholder;
- $(IntDir)..\CoreManifests;
- %(AdditionalIncludeDirectories)
-
-
- $(IcuIncludeDir)\common;
- $(IcuIncludeDir)\i18n;
- %(AdditionalIncludeDirectories)
-
-
-
-
- %(PreprocessorDefinitions);_CHAKRACOREBUILD
-
-
-
-
-
-
- oleaut32.lib;
- version.lib
-
-
- kernel32.lib;
- ole32.lib
-
-
-
-
- $(ChakraCommonLinkDependencies);
- dbghelp.lib;
- user32.lib
-
-
-
-
-
+
+
+
+
+ 0x0601
+ 0x0602
+ 0x0603
+ 0x0A00
+
+
+ $(WindowsSdkDir)Include\um
+ $(WindowsSdkDir)Include\$(TargetPlatformVersion)\um
+
+
+ nothrownew.obj
+
+
+ $(BuildWithCodeAnalysis)
+
+
+
+
+ %(PreprocessorDefinitions);
+ _CHAKRACOREBUILD;
+ _WIN32_WINNT=$(Win32_WinNTVersion);
+ WINVER=$(Win32_WinNTVersion);
+ WIN32_LEAN_AND_MEAN=1
+
+
+ %(PreprocessorDefinitions);
+ DISABLE_JIT=1
+
+
+ %(PreprocessorDefinitions);
+ INTL_ICU=1
+
+
+ %(PreprocessorDefinitions);
+ GLOBAL_ENABLE_WRITE_BARRIER=1
+
+ %(PreprocessorDefinitions);NTDDI_VERSION=$(NTDDIVersion)
+
+
+ %(DisableSpecificWarnings);
+ 4458;
+ 4312;
+
+
+ MultiThreadedDebugDLL
+ MultiThreadedDebug
+
+ $(ChakraCoreRootDirectory)\lib\common\placeholder;
+ $(IntDir)..\CoreManifests;
+ %(AdditionalIncludeDirectories)
+
+
+ $(IcuIncludeDir)\common;
+ $(IcuIncludeDir)\i18n;
+ %(AdditionalIncludeDirectories)
+
+
+
+
+ %(PreprocessorDefinitions);_CHAKRACOREBUILD
+
+
+
+
+
+
+ oleaut32.lib;
+ version.lib
+
+
+ kernel32.lib;
+ ole32.lib
+
+
+
+
+ $(ChakraCommonLinkDependencies);
+ dbghelp.lib;
+ user32.lib
+
+
+
+
+
diff --git a/deps/chakrashim/core/Build/Common.Build.ProjectConfiguration.props b/deps/chakrashim/core/Build/Common.Build.ProjectConfiguration.props
index 80daebf3ad5..64860f5fadc 100644
--- a/deps/chakrashim/core/Build/Common.Build.ProjectConfiguration.props
+++ b/deps/chakrashim/core/Build/Common.Build.ProjectConfiguration.props
@@ -1,60 +1,60 @@
-
-
-
-
- Debug
- Win32
-
-
- Test
- Win32
-
-
- Release
- Win32
-
-
-
-
- Debug
- x64
-
-
- Test
- x64
-
-
- Release
- x64
-
-
-
-
- Debug
- ARM
-
-
- Test
- ARM
-
-
- Release
- ARM
-
-
-
-
- Debug
- CHPE
-
-
- Test
- CHPE
-
-
- Release
- CHPE
-
-
-
-
+
+
+
+
+ Debug
+ Win32
+
+
+ Test
+ Win32
+
+
+ Release
+ Win32
+
+
+
+
+ Debug
+ x64
+
+
+ Test
+ x64
+
+
+ Release
+ x64
+
+
+
+
+ Debug
+ ARM
+
+
+ Test
+ ARM
+
+
+ Release
+ ARM
+
+
+
+
+ Debug
+ CHPE
+
+
+ Test
+ CHPE
+
+
+ Release
+ CHPE
+
+
+
+
diff --git a/deps/chakrashim/core/Build/Common.Build.props b/deps/chakrashim/core/Build/Common.Build.props
index 82f70c96ea1..cc965c845bf 100644
--- a/deps/chakrashim/core/Build/Common.Build.props
+++ b/deps/chakrashim/core/Build/Common.Build.props
@@ -1,174 +1,174 @@
-
-
-
-
- 8
- Unsigned
-
- Ole
-
-
-
- 1033
-
-
- %(AdditionalOptions) /no_settings_comment
-
-
- %(AdditionalOptions) /no_stamp
-
- true
-
-
- %(Filename).h
- $(IntDir)
-
-
- %(AdditionalOptions) -sal
-
-
-
- %(AdditionalOptions) -sal_local
- %(PreprocessorDefinitions);WINVER=$(Win32_WinNTVersion)
-
-
- %(PreprocessorDefinitions);NOMINMAX;USE_EDGEMODE_JSRT
-
- %(PreprocessorDefinitions);COM_STDMETHOD_CAN_THROW
-
- %(PreprocessorDefinitions);USE_STATIC_RUNTIMELIB
-
-
- %(PreprocessorDefinitions);$(AdditionalPreprocessorDefinitions)
-
-
- %(PreprocessorDefinitions);_ARM_
-
-
- Level4
-
- true
-
- false
-
- ProgramDatabase
- OldStyle
-
- SyncCThrow
-
- StdCall
-
- 8Bytes
-
- true
-
- true
-
- true
-
- MultiThreadedDLL
- MultiThreaded
-
-
-
-
- %(AdditionalOptions) /Zm125
- %(AdditionalOptions) /Yl$(TargetName)
-
- %(AdditionalOptions) /Gw
-
- $(IntDir)$(TargetName).pdb
- $(IntDir)
-
-
-
- %(PreprocessorDefinitions);
- BYTECODE_TESTING=1
-
- %(PreprocessorDefinitions);CAN_BUILD_WABT=1
-
-
- %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_NUMBER=$(ChakraVersionBuildNumber)
- %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_QFE=$(ChakraVersionBuildQFENumber)
- %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_COMMIT=$(ChakraVersionBuildCommit)
- %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_DATE=$(ChakraVersionBuildDate)
-
-
-
- 3
-
-
- true
- true
- true
- true
-
- 6.1
- 6.2
- 6.3
- 10.00
-
-
- %(AdditionalOptions) /release
-
- %(AdditionalOptions) /ignore:4221
-
- %(AdditionalOptions) /DEBUGTYPE:CV,FIXUP
-
-
-
- %(AdditionalOptions) /ignore:4221
-
-
-
-
-
-
- Disabled
-
-
-
-
- MaxSpeed
-
- true
-
-
-
-
-
-
- %(PreprocessorDefinitions);_DEBUG;DBG;DBG_DUMP
-
-
- %(PreprocessorDefinitions);DBG;ENABLE_DEBUG_CONFIG_OPTIONS=1
-
-
- %(PreprocessorDefinitions);DBG
-
-
-
-
-
- %(PreprocessorDefinitions);NDEBUG
- %(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1
-
-
- %(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1
-
-
- UseLinkTimeCodeGeneration
- UseFastLinkTimeCodeGeneration
-
-
- true
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 8
+ Unsigned
+
+ Ole
+
+
+
+ 1033
+
+
+ %(AdditionalOptions) /no_settings_comment
+
+
+ %(AdditionalOptions) /no_stamp
+
+ true
+
+
+ %(Filename).h
+ $(IntDir)
+
+
+ %(AdditionalOptions) -sal
+
+
+
+ %(AdditionalOptions) -sal_local
+ %(PreprocessorDefinitions);WINVER=$(Win32_WinNTVersion)
+
+
+ %(PreprocessorDefinitions);NOMINMAX;USE_EDGEMODE_JSRT
+
+ %(PreprocessorDefinitions);COM_STDMETHOD_CAN_THROW
+
+ %(PreprocessorDefinitions);USE_STATIC_RUNTIMELIB
+
+
+ %(PreprocessorDefinitions);$(AdditionalPreprocessorDefinitions)
+
+
+ %(PreprocessorDefinitions);_ARM_
+
+
+ Level4
+
+ true
+
+ false
+
+ ProgramDatabase
+ OldStyle
+
+ SyncCThrow
+
+ StdCall
+
+ 8Bytes
+
+ true
+
+ true
+
+ true
+
+ MultiThreadedDLL
+ MultiThreaded
+
+
+
+
+ %(AdditionalOptions) /Zm125
+ %(AdditionalOptions) /Yl$(TargetName)
+
+ %(AdditionalOptions) /Gw
+
+ $(IntDir)$(TargetName).pdb
+ $(IntDir)
+
+
+
+ %(PreprocessorDefinitions);
+ BYTECODE_TESTING=1
+
+ %(PreprocessorDefinitions);CAN_BUILD_WABT=1
+
+
+ %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_NUMBER=$(ChakraVersionBuildNumber)
+ %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_QFE=$(ChakraVersionBuildQFENumber)
+ %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_COMMIT=$(ChakraVersionBuildCommit)
+ %(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_DATE=$(ChakraVersionBuildDate)
+
+
+
+ 3
+
+
+ true
+ true
+ true
+ true
+
+ 6.1
+ 6.2
+ 6.3
+ 10.00
+
+
+ %(AdditionalOptions) /release
+
+ %(AdditionalOptions) /ignore:4221
+
+ %(AdditionalOptions) /DEBUGTYPE:CV,FIXUP
+
+
+
+ %(AdditionalOptions) /ignore:4221
+
+
+
+
+
+
+ Disabled
+
+
+
+
+ MaxSpeed
+
+ true
+
+
+
+
+
+
+ %(PreprocessorDefinitions);_DEBUG;DBG;DBG_DUMP
+
+
+ %(PreprocessorDefinitions);DBG;ENABLE_DEBUG_CONFIG_OPTIONS=1
+
+
+ %(PreprocessorDefinitions);DBG
+
+
+
+
+
+ %(PreprocessorDefinitions);NDEBUG
+ %(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1
+
+
+ %(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1
+
+
+ UseLinkTimeCodeGeneration
+ UseFastLinkTimeCodeGeneration
+
+
+ true
+
+
+
+
+
+
+
+
+
diff --git a/deps/chakrashim/core/Build/NuGet/.pack-version b/deps/chakrashim/core/Build/NuGet/.pack-version
index 0690dc91961..661e7aeadf3 100644
--- a/deps/chakrashim/core/Build/NuGet/.pack-version
+++ b/deps/chakrashim/core/Build/NuGet/.pack-version
@@ -1 +1 @@
-1.7.3
+1.7.3
diff --git a/deps/chakrashim/core/CMakeLists.txt b/deps/chakrashim/core/CMakeLists.txt
index 61dea4a773f..28f45f79667 100644
--- a/deps/chakrashim/core/CMakeLists.txt
+++ b/deps/chakrashim/core/CMakeLists.txt
@@ -1,490 +1,490 @@
-cmake_minimum_required(VERSION 3.2)
-project (CHAKRACORE)
-
-# Keep CMake from caching static/shared library
-# option. Otherwise, CMake fails to update cached
-# references
-
-# todo: create a sub cmake file to take care of _SH uncaching...
-if(SHARED_LIBRARY_SH)
- unset(SHARED_LIBRARY_SH CACHE)
- unset(STATIC_LIBRARY_SH CACHE)
- unset(STATIC_LIBRARY CACHE)
- set(SHARED_LIBRARY 1)
-endif()
-
-if(STATIC_LIBRARY_SH)
- unset(SHARED_LIBRARY_SH CACHE)
- unset(STATIC_LIBRARY_SH CACHE)
- unset(SHARED_LIBRARY CACHE)
- set(STATIC_LIBRARY 1)
-endif()
-
-if(LIBS_ONLY_BUILD_SH)
- unset(LIBS_ONLY_BUILD_SH CACHE)
- set(CC_LIBS_ONLY_BUILD 1)
-endif()
-
-if(CC_USES_SYSTEM_ARCH_SH)
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
- set(CC_TARGETS_AMD64_SH 1)
- elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
- set(CC_TARGETS_ARM_SH 1)
- endif()
- unset(CC_USES_SYSTEM_ARCH_SH CACHE)
-endif()
-
-if(CC_TARGETS_AMD64_SH)
- set(CC_TARGETS_AMD64 1)
-elseif(CC_TARGETS_ARM_SH)
- set(CC_TARGETS_ARM 1)
- add_definitions(-D_ARM_=1)
- set(CMAKE_SYSTEM_PROCESSOR "armv7l")
-elseif(CC_TARGETS_X86_SH)
- set(CC_TARGETS_X86 1)
- set(CMAKE_SYSTEM_PROCESSOR "i386")
-else()
- message(FATAL_ERROR "Couldn't detect target processor, try `--arch` argument with build.sh")
-endif()
-
-unset(CC_TARGETS_ARM_SH CACHE)
-unset(CC_TARGETS_X86_SH CACHE)
-unset(CC_TARGETS_AMD64_SH CACHE)
-
-if(ENABLE_VALGRIND_SH)
- unset(ENABLE_VALGRIND_SH CACHE)
- if(NOT CC_TARGETS_X86)
- # Enable Valgrind is not needed for x86 builds. Already <= 32Gb address space
- set(ENABLE_VALGRIND 1)
- add_definitions(-DENABLE_VALGRIND=1)
- endif()
-endif()
-
-if(ICU_SETTINGS_RESET)
- unset(ICU_SETTINGS_RESET CACHE)
- unset(ICU_INCLUDE_PATH CACHE)
- unset(ICU_INCLUDE_PATH_SH CACHE)
- unset(NO_ICU_PATH_GIVEN_SH CACHE)
- unset(NO_ICU_PATH_GIVEN CACHE)
- unset(CC_EMBED_ICU_SH CACHE)
-endif()
-
-if(CC_TARGET_OS_ANDROID_SH)
- set(CC_TARGET_OS_ANDROID 1)
- set(CMAKE_SYSTEM_NAME Android)
- set(ANDROID_NDK "android-toolchain-arm/")
- set(ANDROID_ABI armeabi-v7a)
- set(CMAKE_SYSTEM_VERSION 21)
- set(CMAKE_ANDROID_ARCH_ABI armeabi)
- set(ANDROID_TOOLCHAIN_NAME arm-linux-androideabi-clang3.8)
- set(ANDROID_STL "c++_static")
- unset(CC_TARGET_OS_ANDROID_SH CACHE)
-elseif(CMAKE_SYSTEM_NAME STREQUAL Linux)
- set(CC_TARGET_OS_LINUX 1)
-elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
- set(CC_TARGET_OS_OSX 1)
-endif()
-
-if (ENABLE_CC_XPLAT_TRACE_SH)
- unset(ENABLE_CC_XPLAT_TRACE_SH CACHE)
- set(ENABLE_CC_XPLAT_TRACE 1)
- if (CC_TARGET_OS_ANDROID)
- add_definitions(-DTRACE_OUTPUT_TO_LOGCAT=1)
- else()
- add_definitions(-DTRACE_OUTPUT_TARGET_FILE=1)
- endif()
- add_definitions(-DENABLE_CC_XPLAT_TRACE=1)
- add_compile_options(-finstrument-functions)
- add_compile_options(-g)
- add_compile_options(-ggdb)
- if(NOT STATIC_LIBRARY)
- message(FATAL_ERROR "Trace option is available only for --static builds")
- endif()
-endif()
-
-if(CC_EMBED_ICU_SH)
- unset(CC_EMBED_ICU_SH CACHE)
- set(CC_EMBED_ICU 1)
- set(ICU_INCLUDE_PATH "deps/icu/source/output/include/")
-endif()
-
-if(ICU_INCLUDE_PATH_SH)
- set(ICU_INCLUDE_PATH ${ICU_INCLUDE_PATH_SH})
- unset(NO_ICU_PATH_GIVEN_SH CACHE)
- unset(NO_ICU_PATH_GIVEN CACHE)
- unset(ICU_INCLUDE_PATH_SH CACHE)
-endif()
-
-if(NO_ICU_PATH_GIVEN_SH)
- set(NO_ICU_PATH_GIVEN ${NO_ICU_PATH_GIVEN_SH})
- unset(NO_ICU_PATH_GIVEN_SH CACHE)
- unset(ICU_INCLUDE_PATH_SH CACHE)
- unset(ICU_INCLUDE_PATH CACHE)
-endif()
-
-function(clr_unknown_arch)
- message(FATAL_ERROR "Only AMD64, ARM and I386 are supported")
-endfunction()
-
-if(INTL_ICU_SH)
- unset(INTL_ICU_SH CACHE) # don't cache
- add_definitions(-DINTL_ICU=1)
- set(ICU_INTL_ENABLED 1)
-endif()
-
-if(ICU_INCLUDE_PATH)
- add_definitions(-DHAS_REAL_ICU=1)
- set(ICU_CC_PATH "${ICU_INCLUDE_PATH}/../lib/")
- find_library(ICUUC icuuc PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
- if(ICU_INTL_ENABLED)
- find_library(ICU18 icui18n PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
- # icu header files are either located under the same folder or i18n is under a relative path
- # TODO (unlikely): shall we add `--icu-intl` to build.sh ?
- set(ICU_INCLUDE_PATH
- "${ICU_INCLUDE_PATH}"
- "${ICU_INCLUDE_PATH}/../i18n/")
- endif()
- if(ICUUC)
- message("-- found ICU libs: ${ICU_CC_PATH}")
- find_library(ICUDATA icudata PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
- if (NOT ICUDATA)
- set(ICUDATA "")
- endif()
- find_library(ICUTOOLS icutools PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
- if (NOT ICUTOOLS)
- set(ICUTOOLS "")
- endif()
- set(ICULIB
- ${ICUUC}
- ${ICU18}
- ${ICUDATA}
- ${ICUTOOLS}
- )
- endif()
-endif()
-
-set(CLR_CMAKE_PLATFORM_XPLAT 1)
-if(CC_TARGETS_AMD64)
- add_definitions(-D_M_X64_OR_ARM64)
- add_compile_options(-msse4.2)
-
- if(NOT CMAKE_BUILD_TYPE STREQUAL Release)
- set(CAN_BUILD_WABT 1)
- endif()
-elseif(CC_TARGETS_X86)
- add_definitions(-D__i686__)
- add_definitions(-D_M_IX86_OR_ARM32)
- add_compile_options(-arch i386)
- add_compile_options(-msse3)
-
- set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} \
- -m32"
- )
-elseif(CC_TARGETS_ARM)
- add_definitions(-D__arm__)
- add_definitions(-D_M_IX86_OR_ARM32)
- add_definitions(-D_M_ARM32_OR_ARM64)
- if(CC_TARGET_OS_OSX)
- add_compile_options(-arch arm)
- elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- # reduce link time memory usage
- set(LINKER_REDUCED_MEMORY "-Xlinker --no-keep-memory")
- endif()
-else()
- clr_unknown_arch()
-endif()
-
-if(CAN_BUILD_WABT)
- add_definitions(-DCAN_BUILD_WABT)
-endif()
-
-if(CC_TARGET_OS_LINUX OR CC_TARGET_OS_ANDROID)
- if(NOT ICULIB)
- if(NOT NO_ICU_PATH_GIVEN)
- if(NOT CC_EMBED_ICU)
- set(ICULIB "icuuc")
- if(ICU_INTL_ENABLED)
- set(ICULIB
- "${ICULIB}"
- "icui18n")
- endif()
- endif()
- add_definitions(-DHAS_REAL_ICU=1)
- endif()
- endif()
-
- set(CLR_CMAKE_PLATFORM_LINUX 1)
- # OSX 10.12 Clang deprecates libstdc++ [See GH #1599]
- # So, -Werror is linux only for now
- # + Android ARM ABI shows ld warnings
- # xplat-todo: Do we need this ?
- if (NOT CC_TARGET_OS_ANDROID)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
- -Werror"
- )
- endif()
-elseif(CC_TARGET_OS_OSX)
- add_definitions(
- -DPLATFORM_UNIX
- )
-
- # in case ICU path was given but it doesn't exist, build script will fail.
- # so, fallback only if ICU path wasn't given
- if(NOT ICU_INCLUDE_PATH)
- set(NO_ICU_PATH_GIVEN 1)
- message("-- Couldn't find ICU. Falling back to --no-icu build")
- endif()
-
- if(NOT CC_XCODE_PROJECT)
- set(OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET} CC")
- if (${OSX_DEPLOYMENT_TARGET} STREQUAL " CC")
- set(OSX_DEPLOYMENT_TARGET "10.9")
- add_compile_options(-mmacosx-version-min=10.9)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
- -mmacosx-version-min=10.9 -std=gnu99")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
- -mmacosx-version-min=10.9 -std=gnu++11")
- else()
- set(OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}")
- message(WARNING "-- !! macOS Deployment Target was set to $ENV{MACOSX_DEPLOYMENT_TARGET}. Using it as is.")
- endif()
- endif()
-else()
- message(FATAL_ERROR "This OS is not supported")
-endif()
-
-if (CMAKE_CXX_COMPILER_ID STREQUAL AppleClang
- OR CMAKE_CXX_COMPILER_ID STREQUAL Clang
- OR CMAKE_CXX_COMPILER_ID STREQUAL GNU)
- # Color diagnostics for g++ and clang++
- add_definitions("-fdiagnostics-color=always")
-endif()
-
-if(STATIC_LIBRARY)
- add_definitions(-DCHAKRA_STATIC_LIBRARY=1)
-endif()
-
-if(CLR_CMAKE_PLATFORM_XPLAT)
- add_definitions(-D_CHAKRACOREBUILD)
- add_definitions(-DFEATURE_PAL)
- add_definitions(-DPLATFORM_UNIX=1)
-
- if(CLR_CMAKE_PLATFORM_LINUX)
- add_definitions(-D__LINUX__=1)
- if(CC_TARGETS_AMD64)
- add_definitions(-DLINUX64)
- endif(CC_TARGETS_AMD64)
- endif(CLR_CMAKE_PLATFORM_LINUX)
-
- if(CC_TARGETS_AMD64)
- set(IS_64BIT_BUILD 1)
- add_definitions(-D_M_X64 -D_M_AMD64 -D_AMD64_)
- endif(CC_TARGETS_AMD64)
-
- add_definitions(
- -DUNICODE
- -D_SAFECRT_USE_CPP_OVERLOADS=1
- -D__STDC_WANT_LIB_EXT1__=1
- )
-
- set(CMAKE_CXX_STANDARD 11)
-
- # CC WARNING FLAGS
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
- -Wno-implicit-function-declaration"
- )
-
- # todo: fix general visibility of the interface
- # do not set to `fvisibility=hidden` as it is going to
- # prevent the required interface is being exported
- # clang by default sets fvisibility=default
-
- # CXX WARNING FLAGS
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
- -Wno-ignored-attributes\
- -Wno-deprecated-declarations\
- -Wno-parentheses-equality\
- -Wno-missing-braces\
- -Wno-reorder\
- -Wno-microsoft\
- -Wno-unused-value\
- -Wno-int-to-void-pointer-cast\
- -Wno-invalid-offsetof\
- -Wno-undefined-inline\
- -Wno-inconsistent-missing-override\
- -Wno-c++14-extensions\
- -Wno-macro-redefined\
- -Wno-pragmas\
- -Wno-invalid-token-paste\
- -Wno-format\
- -Wno-invalid-noreturn\
- -Wno-null-arithmetic\
- -Wno-tautological-constant-out-of-range-compare\
- -Wno-tautological-undefined-compare\
- -Wno-address-of-temporary\
- -Wno-null-conversion\
- -Wno-return-type\
- -Wno-switch\
- -Wno-implicit-function-declaration\
- -Wno-int-to-pointer-cast"
- )
- # notes..
- # -Wno-address-of-temporary # vtinfo.h, VirtualTableInfo::RegisterVirtualTable
- # -Wno-null-conversion # Check shmemory.cpp and cs.cpp here...
- # -Wno-return-type # switch unreachable code
- # -Wno-switch # switch values not handled
-
- include(Build/CMakeFeatureDetect.cmake)
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
- ${CXX_DO_NOT_OPTIMIZE_SIBLING_CALLS} \
- -fno-omit-frame-pointer \
- -fdelayed-template-parsing"
- )
-
- # CXX / CC COMPILER FLAGS
- add_compile_options(
- -fasm-blocks
- -fms-extensions
- -fwrapv # Treat signed integer overflow as two's complement
- )
-
- # Clang -fsanitize.
- if (CLANG_SANITIZE_SH)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${CLANG_SANITIZE_SH}")
- set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fsanitize=${CLANG_SANITIZE_SH}")
- unset(CLANG_SANITIZE_SH CACHE) # don't cache
- endif()
-endif(CLR_CMAKE_PLATFORM_XPLAT)
-
-if (ENABLE_FULL_LTO_SH OR ENABLE_THIN_LTO_SH)
- if (CC_TARGET_OS_LINUX)
- set(CC_LTO_ENABLED -use-gold-plugin)
- set(CC_LTO_ENABLED_C -c)
- endif()
-
- if (ENABLE_FULL_LTO_SH)
- unset(DENABLE_FULL_LTO_SH CACHE)
- add_compile_options(-flto ${CC_LTO_ENABLED_C})
-
- if (CC_LTO_ENABLED)
- set(CC_LTO_ENABLED "${CC_LTO_ENABLED} -flto")
- endif()
- elseif (ENABLE_THIN_LTO_SH)
- unset(ENABLE_THIN_LTO_SH CACHE)
- add_compile_options(-flto=thin)
- if (CC_LTO_ENABLED)
- set(CC_LTO_ENABLED "${CC_LTO_ENABLED} -flto=thin")
- endif()
- endif()
-endif()
-
-if(CMAKE_BUILD_TYPE STREQUAL Debug)
- add_definitions(
- -DDBG=1
- -DDEBUG=1
- -D_DEBUG=1 # for PAL
- -DDBG_DUMP=1
- )
-elseif(CMAKE_BUILD_TYPE STREQUAL Test)
- add_definitions(
- -DENABLE_DEBUG_CONFIG_OPTIONS=1
- )
- add_compile_options(-g)
-endif(CMAKE_BUILD_TYPE STREQUAL Debug)
-
-if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
- add_compile_options(-O3)
-else()
- add_compile_options(-O0)
-endif(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
-
-if(IS_64BIT_BUILD)
- add_definitions(
- -DBIT64=1
- -DSTACK_ALIGN=16
- )
-endif(IS_64BIT_BUILD)
-
-if(NO_JIT_SH)
- unset(NO_JIT_SH CACHE) # don't cache
- unset(BuildJIT CACHE) # also clear it just in case
- add_definitions(-DDISABLE_JIT=1)
-else()
- set(BuildJIT 1)
-endif()
-
-if(WITHOUT_FEATURES_SH)
- add_definitions(${WITHOUT_FEATURES_SH})
- unset(WITHOUT_FEATURES_SH CACHE) # don't cache
-endif(WITHOUT_FEATURES_SH)
-
-if(EXTRA_DEFINES_SH)
- add_definitions(${EXTRA_DEFINES_SH})
- unset(EXTRA_DEFINES_SH CACHE) #don't cache
-endif(EXTRA_DEFINES_SH)
-
-enable_language(ASM)
-
-if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
- set(DYN_LIB_EXT "dylib")
-else()
- set(DYN_LIB_EXT "so")
-endif()
-
-################# Write-barrier check/analyze ##################
-if (WB_CHECK_SH OR WB_ANALYZE_SH)
- add_definitions(
- -Xclang -load
- -Xclang ${CMAKE_CURRENT_SOURCE_DIR}/tools/RecyclerChecker/Build/libclangRecyclerChecker.${DYN_LIB_EXT}
- )
-endif()
-if (WB_CHECK_SH)
- unset(WB_CHECK_SH CACHE) # don't cache
- add_definitions(
- -Xclang -add-plugin
- -Xclang check-recycler
- )
-endif()
-if (WB_ANALYZE_SH)
- unset(WB_ANALYZE_SH CACHE) # don't cache
- add_definitions(
- -Xclang -analyze
- -Xclang -analyzer-checker=chakra.RecyclerChecker
- )
-endif()
-if (WB_ARGS_SH)
- foreach(wb_arg IN LISTS WB_ARGS_SH)
- add_definitions(
- -Xclang -plugin-arg-check-recycler
- -Xclang ${wb_arg}
- )
- endforeach(wb_arg)
- unset(WB_ARGS_SH CACHE) # don't cache
-endif()
-
-include_directories(
- .
- lib/Common
- lib/Common/PlaceHolder
- pal
- pal/inc
- pal/inc/rt
- ${ICU_INCLUDE_PATH}
- )
-
-if(ICU_INCLUDE_PATH)
- if(NOT HAVE_LIBICU_UCHAR_H)
- set(HAVE_LIBICU_UCHAR_H "1")
- endif()
-endif()
-
-add_subdirectory (pal)
-
-# build the rest with NO_PAL_MINMAX and PAL_STDCPP_COMPAT
-add_definitions(
- -DNO_PAL_MINMAX
- -DPAL_STDCPP_COMPAT
- )
-add_subdirectory (lib)
-add_subdirectory (bin)
+cmake_minimum_required(VERSION 3.2)
+project (CHAKRACORE)
+
+# Keep CMake from caching static/shared library
+# option. Otherwise, CMake fails to update cached
+# references
+
+# todo: create a sub cmake file to take care of _SH uncaching...
+if(SHARED_LIBRARY_SH)
+ unset(SHARED_LIBRARY_SH CACHE)
+ unset(STATIC_LIBRARY_SH CACHE)
+ unset(STATIC_LIBRARY CACHE)
+ set(SHARED_LIBRARY 1)
+endif()
+
+if(STATIC_LIBRARY_SH)
+ unset(SHARED_LIBRARY_SH CACHE)
+ unset(STATIC_LIBRARY_SH CACHE)
+ unset(SHARED_LIBRARY CACHE)
+ set(STATIC_LIBRARY 1)
+endif()
+
+if(LIBS_ONLY_BUILD_SH)
+ unset(LIBS_ONLY_BUILD_SH CACHE)
+ set(CC_LIBS_ONLY_BUILD 1)
+endif()
+
+if(CC_USES_SYSTEM_ARCH_SH)
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ set(CC_TARGETS_AMD64_SH 1)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
+ set(CC_TARGETS_ARM_SH 1)
+ endif()
+ unset(CC_USES_SYSTEM_ARCH_SH CACHE)
+endif()
+
+if(CC_TARGETS_AMD64_SH)
+ set(CC_TARGETS_AMD64 1)
+elseif(CC_TARGETS_ARM_SH)
+ set(CC_TARGETS_ARM 1)
+ add_definitions(-D_ARM_=1)
+ set(CMAKE_SYSTEM_PROCESSOR "armv7l")
+elseif(CC_TARGETS_X86_SH)
+ set(CC_TARGETS_X86 1)
+ set(CMAKE_SYSTEM_PROCESSOR "i386")
+else()
+ message(FATAL_ERROR "Couldn't detect target processor, try `--arch` argument with build.sh")
+endif()
+
+unset(CC_TARGETS_ARM_SH CACHE)
+unset(CC_TARGETS_X86_SH CACHE)
+unset(CC_TARGETS_AMD64_SH CACHE)
+
+if(ENABLE_VALGRIND_SH)
+ unset(ENABLE_VALGRIND_SH CACHE)
+ if(NOT CC_TARGETS_X86)
+ # Enable Valgrind is not needed for x86 builds. Already <= 32Gb address space
+ set(ENABLE_VALGRIND 1)
+ add_definitions(-DENABLE_VALGRIND=1)
+ endif()
+endif()
+
+if(ICU_SETTINGS_RESET)
+ unset(ICU_SETTINGS_RESET CACHE)
+ unset(ICU_INCLUDE_PATH CACHE)
+ unset(ICU_INCLUDE_PATH_SH CACHE)
+ unset(NO_ICU_PATH_GIVEN_SH CACHE)
+ unset(NO_ICU_PATH_GIVEN CACHE)
+ unset(CC_EMBED_ICU_SH CACHE)
+endif()
+
+if(CC_TARGET_OS_ANDROID_SH)
+ set(CC_TARGET_OS_ANDROID 1)
+ set(CMAKE_SYSTEM_NAME Android)
+ set(ANDROID_NDK "android-toolchain-arm/")
+ set(ANDROID_ABI armeabi-v7a)
+ set(CMAKE_SYSTEM_VERSION 21)
+ set(CMAKE_ANDROID_ARCH_ABI armeabi)
+ set(ANDROID_TOOLCHAIN_NAME arm-linux-androideabi-clang3.8)
+ set(ANDROID_STL "c++_static")
+ unset(CC_TARGET_OS_ANDROID_SH CACHE)
+elseif(CMAKE_SYSTEM_NAME STREQUAL Linux)
+ set(CC_TARGET_OS_LINUX 1)
+elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+ set(CC_TARGET_OS_OSX 1)
+endif()
+
+if (ENABLE_CC_XPLAT_TRACE_SH)
+ unset(ENABLE_CC_XPLAT_TRACE_SH CACHE)
+ set(ENABLE_CC_XPLAT_TRACE 1)
+ if (CC_TARGET_OS_ANDROID)
+ add_definitions(-DTRACE_OUTPUT_TO_LOGCAT=1)
+ else()
+ add_definitions(-DTRACE_OUTPUT_TARGET_FILE=1)
+ endif()
+ add_definitions(-DENABLE_CC_XPLAT_TRACE=1)
+ add_compile_options(-finstrument-functions)
+ add_compile_options(-g)
+ add_compile_options(-ggdb)
+ if(NOT STATIC_LIBRARY)
+ message(FATAL_ERROR "Trace option is available only for --static builds")
+ endif()
+endif()
+
+if(CC_EMBED_ICU_SH)
+ unset(CC_EMBED_ICU_SH CACHE)
+ set(CC_EMBED_ICU 1)
+ set(ICU_INCLUDE_PATH "deps/icu/source/output/include/")
+endif()
+
+if(ICU_INCLUDE_PATH_SH)
+ set(ICU_INCLUDE_PATH ${ICU_INCLUDE_PATH_SH})
+ unset(NO_ICU_PATH_GIVEN_SH CACHE)
+ unset(NO_ICU_PATH_GIVEN CACHE)
+ unset(ICU_INCLUDE_PATH_SH CACHE)
+endif()
+
+if(NO_ICU_PATH_GIVEN_SH)
+ set(NO_ICU_PATH_GIVEN ${NO_ICU_PATH_GIVEN_SH})
+ unset(NO_ICU_PATH_GIVEN_SH CACHE)
+ unset(ICU_INCLUDE_PATH_SH CACHE)
+ unset(ICU_INCLUDE_PATH CACHE)
+endif()
+
+function(clr_unknown_arch)
+ message(FATAL_ERROR "Only AMD64, ARM and I386 are supported")
+endfunction()
+
+if(INTL_ICU_SH)
+ unset(INTL_ICU_SH CACHE) # don't cache
+ add_definitions(-DINTL_ICU=1)
+ set(ICU_INTL_ENABLED 1)
+endif()
+
+if(ICU_INCLUDE_PATH)
+ add_definitions(-DHAS_REAL_ICU=1)
+ set(ICU_CC_PATH "${ICU_INCLUDE_PATH}/../lib/")
+ find_library(ICUUC icuuc PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
+ if(ICU_INTL_ENABLED)
+ find_library(ICU18 icui18n PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
+ # icu header files are either located under the same folder or i18n is under a relative path
+ # TODO (unlikely): shall we add `--icu-intl` to build.sh ?
+ set(ICU_INCLUDE_PATH
+ "${ICU_INCLUDE_PATH}"
+ "${ICU_INCLUDE_PATH}/../i18n/")
+ endif()
+ if(ICUUC)
+ message("-- found ICU libs: ${ICU_CC_PATH}")
+ find_library(ICUDATA icudata PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
+ if (NOT ICUDATA)
+ set(ICUDATA "")
+ endif()
+ find_library(ICUTOOLS icutools PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
+ if (NOT ICUTOOLS)
+ set(ICUTOOLS "")
+ endif()
+ set(ICULIB
+ ${ICUUC}
+ ${ICU18}
+ ${ICUDATA}
+ ${ICUTOOLS}
+ )
+ endif()
+endif()
+
+set(CLR_CMAKE_PLATFORM_XPLAT 1)
+if(CC_TARGETS_AMD64)
+ add_definitions(-D_M_X64_OR_ARM64)
+ add_compile_options(-msse4.2)
+
+ if(NOT CMAKE_BUILD_TYPE STREQUAL Release)
+ set(CAN_BUILD_WABT 1)
+ endif()
+elseif(CC_TARGETS_X86)
+ add_definitions(-D__i686__)
+ add_definitions(-D_M_IX86_OR_ARM32)
+ add_compile_options(-arch i386)
+ add_compile_options(-msse3)
+
+ set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} \
+ -m32"
+ )
+elseif(CC_TARGETS_ARM)
+ add_definitions(-D__arm__)
+ add_definitions(-D_M_IX86_OR_ARM32)
+ add_definitions(-D_M_ARM32_OR_ARM64)
+ if(CC_TARGET_OS_OSX)
+ add_compile_options(-arch arm)
+ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ # reduce link time memory usage
+ set(LINKER_REDUCED_MEMORY "-Xlinker --no-keep-memory")
+ endif()
+else()
+ clr_unknown_arch()
+endif()
+
+if(CAN_BUILD_WABT)
+ add_definitions(-DCAN_BUILD_WABT)
+endif()
+
+if(CC_TARGET_OS_LINUX OR CC_TARGET_OS_ANDROID)
+ if(NOT ICULIB)
+ if(NOT NO_ICU_PATH_GIVEN)
+ if(NOT CC_EMBED_ICU)
+ set(ICULIB "icuuc")
+ if(ICU_INTL_ENABLED)
+ set(ICULIB
+ "${ICULIB}"
+ "icui18n")
+ endif()
+ endif()
+ add_definitions(-DHAS_REAL_ICU=1)
+ endif()
+ endif()
+
+ set(CLR_CMAKE_PLATFORM_LINUX 1)
+ # OSX 10.12 Clang deprecates libstdc++ [See GH #1599]
+ # So, -Werror is linux only for now
+ # + Android ARM ABI shows ld warnings
+ # xplat-todo: Do we need this ?
+ if (NOT CC_TARGET_OS_ANDROID)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+ -Werror"
+ )
+ endif()
+elseif(CC_TARGET_OS_OSX)
+ add_definitions(
+ -DPLATFORM_UNIX
+ )
+
+ # in case ICU path was given but it doesn't exist, build script will fail.
+ # so, fallback only if ICU path wasn't given
+ if(NOT ICU_INCLUDE_PATH)
+ set(NO_ICU_PATH_GIVEN 1)
+ message("-- Couldn't find ICU. Falling back to --no-icu build")
+ endif()
+
+ if(NOT CC_XCODE_PROJECT)
+ set(OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET} CC")
+ if (${OSX_DEPLOYMENT_TARGET} STREQUAL " CC")
+ set(OSX_DEPLOYMENT_TARGET "10.9")
+ add_compile_options(-mmacosx-version-min=10.9)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
+ -mmacosx-version-min=10.9 -std=gnu99")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+ -mmacosx-version-min=10.9 -std=gnu++11")
+ else()
+ set(OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}")
+ message(WARNING "-- !! macOS Deployment Target was set to $ENV{MACOSX_DEPLOYMENT_TARGET}. Using it as is.")
+ endif()
+ endif()
+else()
+ message(FATAL_ERROR "This OS is not supported")
+endif()
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL AppleClang
+ OR CMAKE_CXX_COMPILER_ID STREQUAL Clang
+ OR CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+ # Color diagnostics for g++ and clang++
+ add_definitions("-fdiagnostics-color=always")
+endif()
+
+if(STATIC_LIBRARY)
+ add_definitions(-DCHAKRA_STATIC_LIBRARY=1)
+endif()
+
+if(CLR_CMAKE_PLATFORM_XPLAT)
+ add_definitions(-D_CHAKRACOREBUILD)
+ add_definitions(-DFEATURE_PAL)
+ add_definitions(-DPLATFORM_UNIX=1)
+
+ if(CLR_CMAKE_PLATFORM_LINUX)
+ add_definitions(-D__LINUX__=1)
+ if(CC_TARGETS_AMD64)
+ add_definitions(-DLINUX64)
+ endif(CC_TARGETS_AMD64)
+ endif(CLR_CMAKE_PLATFORM_LINUX)
+
+ if(CC_TARGETS_AMD64)
+ set(IS_64BIT_BUILD 1)
+ add_definitions(-D_M_X64 -D_M_AMD64 -D_AMD64_)
+ endif(CC_TARGETS_AMD64)
+
+ add_definitions(
+ -DUNICODE
+ -D_SAFECRT_USE_CPP_OVERLOADS=1
+ -D__STDC_WANT_LIB_EXT1__=1
+ )
+
+ set(CMAKE_CXX_STANDARD 11)
+
+ # CC WARNING FLAGS
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
+ -Wno-implicit-function-declaration"
+ )
+
+ # todo: fix general visibility of the interface
+ # do not set to `fvisibility=hidden` as it is going to
+ # prevent the required interface is being exported
+ # clang by default sets fvisibility=default
+
+ # CXX WARNING FLAGS
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+ -Wno-ignored-attributes\
+ -Wno-deprecated-declarations\
+ -Wno-parentheses-equality\
+ -Wno-missing-braces\
+ -Wno-reorder\
+ -Wno-microsoft\
+ -Wno-unused-value\
+ -Wno-int-to-void-pointer-cast\
+ -Wno-invalid-offsetof\
+ -Wno-undefined-inline\
+ -Wno-inconsistent-missing-override\
+ -Wno-c++14-extensions\
+ -Wno-macro-redefined\
+ -Wno-pragmas\
+ -Wno-invalid-token-paste\
+ -Wno-format\
+ -Wno-invalid-noreturn\
+ -Wno-null-arithmetic\
+ -Wno-tautological-constant-out-of-range-compare\
+ -Wno-tautological-undefined-compare\
+ -Wno-address-of-temporary\
+ -Wno-null-conversion\
+ -Wno-return-type\
+ -Wno-switch\
+ -Wno-implicit-function-declaration\
+ -Wno-int-to-pointer-cast"
+ )
+ # notes..
+ # -Wno-address-of-temporary # vtinfo.h, VirtualTableInfo::RegisterVirtualTable
+ # -Wno-null-conversion # Check shmemory.cpp and cs.cpp here...
+ # -Wno-return-type # switch unreachable code
+ # -Wno-switch # switch values not handled
+
+ include(Build/CMakeFeatureDetect.cmake)
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+ ${CXX_DO_NOT_OPTIMIZE_SIBLING_CALLS} \
+ -fno-omit-frame-pointer \
+ -fdelayed-template-parsing"
+ )
+
+ # CXX / CC COMPILER FLAGS
+ add_compile_options(
+ -fasm-blocks
+ -fms-extensions
+ -fwrapv # Treat signed integer overflow as two's complement
+ )
+
+ # Clang -fsanitize.
+ if (CLANG_SANITIZE_SH)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${CLANG_SANITIZE_SH}")
+ set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fsanitize=${CLANG_SANITIZE_SH}")
+ unset(CLANG_SANITIZE_SH CACHE) # don't cache
+ endif()
+endif(CLR_CMAKE_PLATFORM_XPLAT)
+
+if (ENABLE_FULL_LTO_SH OR ENABLE_THIN_LTO_SH)
+ if (CC_TARGET_OS_LINUX)
+ set(CC_LTO_ENABLED -use-gold-plugin)
+ set(CC_LTO_ENABLED_C -c)
+ endif()
+
+ if (ENABLE_FULL_LTO_SH)
+ unset(DENABLE_FULL_LTO_SH CACHE)
+ add_compile_options(-flto ${CC_LTO_ENABLED_C})
+
+ if (CC_LTO_ENABLED)
+ set(CC_LTO_ENABLED "${CC_LTO_ENABLED} -flto")
+ endif()
+ elseif (ENABLE_THIN_LTO_SH)
+ unset(ENABLE_THIN_LTO_SH CACHE)
+ add_compile_options(-flto=thin)
+ if (CC_LTO_ENABLED)
+ set(CC_LTO_ENABLED "${CC_LTO_ENABLED} -flto=thin")
+ endif()
+ endif()
+endif()
+
+if(CMAKE_BUILD_TYPE STREQUAL Debug)
+ add_definitions(
+ -DDBG=1
+ -DDEBUG=1
+ -D_DEBUG=1 # for PAL
+ -DDBG_DUMP=1
+ )
+elseif(CMAKE_BUILD_TYPE STREQUAL Test)
+ add_definitions(
+ -DENABLE_DEBUG_CONFIG_OPTIONS=1
+ )
+ add_compile_options(-g)
+endif(CMAKE_BUILD_TYPE STREQUAL Debug)
+
+if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
+ add_compile_options(-O3)
+else()
+ add_compile_options(-O0)
+endif(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
+
+if(IS_64BIT_BUILD)
+ add_definitions(
+ -DBIT64=1
+ -DSTACK_ALIGN=16
+ )
+endif(IS_64BIT_BUILD)
+
+if(NO_JIT_SH)
+ unset(NO_JIT_SH CACHE) # don't cache
+ unset(BuildJIT CACHE) # also clear it just in case
+ add_definitions(-DDISABLE_JIT=1)
+else()
+ set(BuildJIT 1)
+endif()
+
+if(WITHOUT_FEATURES_SH)
+ add_definitions(${WITHOUT_FEATURES_SH})
+ unset(WITHOUT_FEATURES_SH CACHE) # don't cache
+endif(WITHOUT_FEATURES_SH)
+
+if(EXTRA_DEFINES_SH)
+ add_definitions(${EXTRA_DEFINES_SH})
+ unset(EXTRA_DEFINES_SH CACHE) #don't cache
+endif(EXTRA_DEFINES_SH)
+
+enable_language(ASM)
+
+if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+ set(DYN_LIB_EXT "dylib")
+else()
+ set(DYN_LIB_EXT "so")
+endif()
+
+################# Write-barrier check/analyze ##################
+if (WB_CHECK_SH OR WB_ANALYZE_SH)
+ add_definitions(
+ -Xclang -load
+ -Xclang ${CMAKE_CURRENT_SOURCE_DIR}/tools/RecyclerChecker/Build/libclangRecyclerChecker.${DYN_LIB_EXT}
+ )
+endif()
+if (WB_CHECK_SH)
+ unset(WB_CHECK_SH CACHE) # don't cache
+ add_definitions(
+ -Xclang -add-plugin
+ -Xclang check-recycler
+ )
+endif()
+if (WB_ANALYZE_SH)
+ unset(WB_ANALYZE_SH CACHE) # don't cache
+ add_definitions(
+ -Xclang -analyze
+ -Xclang -analyzer-checker=chakra.RecyclerChecker
+ )
+endif()
+if (WB_ARGS_SH)
+ foreach(wb_arg IN LISTS WB_ARGS_SH)
+ add_definitions(
+ -Xclang -plugin-arg-check-recycler
+ -Xclang ${wb_arg}
+ )
+ endforeach(wb_arg)
+ unset(WB_ARGS_SH CACHE) # don't cache
+endif()
+
+include_directories(
+ .
+ lib/Common
+ lib/Common/PlaceHolder
+ pal
+ pal/inc
+ pal/inc/rt
+ ${ICU_INCLUDE_PATH}
+ )
+
+if(ICU_INCLUDE_PATH)
+ if(NOT HAVE_LIBICU_UCHAR_H)
+ set(HAVE_LIBICU_UCHAR_H "1")
+ endif()
+endif()
+
+add_subdirectory (pal)
+
+# build the rest with NO_PAL_MINMAX and PAL_STDCPP_COMPAT
+add_definitions(
+ -DNO_PAL_MINMAX
+ -DPAL_STDCPP_COMPAT
+ )
+add_subdirectory (lib)
+add_subdirectory (bin)
diff --git a/deps/chakrashim/core/README.md b/deps/chakrashim/core/README.md
index 2ed6f8e4b91..5fa8ffcbc01 100644
--- a/deps/chakrashim/core/README.md
+++ b/deps/chakrashim/core/README.md
@@ -1,145 +1,145 @@
-# ChakraCore
-
-[![Join the chat at https://gitter.im/Microsoft/ChakraCore](https://badges.gitter.im/Microsoft/ChakraCore.svg)](https://gitter.im/Microsoft/ChakraCore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[![Licensed under the MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt)
-
-ChakraCore is the core part of Chakra, the high-performance JavaScript engine that powers Microsoft Edge and Windows applications written in HTML/CSS/JS. ChakraCore supports Just-in-time (JIT) compilation of JavaScript for x86/x64/ARM, garbage collection, and a wide range of the latest JavaScript features. ChakraCore also supports the [JavaScript Runtime (JSRT) APIs](https://github.com/Microsoft/ChakraCore/wiki/JavaScript-Runtime-%28JSRT%29-Overview), which allows you to easily embed ChakraCore in your applications.
-
-You can stay up-to-date on progress by following the [MSEdge developer blog](https://blogs.windows.com/msedgedev/).
-
-## [Build Status](https://github.com/Microsoft/ChakraCore/wiki/Build-Status)
-
-| | __Debug__ | __Test__ | __Release__ |
-|:-----------------------------:|:---------:|:--------:|:-----------:|
-| __Windows (x64)__ | [![x64debug][x64dbgicon]][x64dbglink] | [![x64test][x64testicon]][x64testlink] | [![x64release][x64relicon]][x64rellink] |
-| __Windows (x86)__ | [![x86debug][x86dbgicon]][x86dbglink] | [![x86test][x86testicon]][x86testlink] | [![x86release][x86relicon]][x86rellink] |
-| __Windows (ARM)__ | [![armdebug][armdbgicon]][armdbglink] | [![armtest][armtesticon]][armtestlink] | [![armrelease][armrelicon]][armrellink] |
-| __Ubuntu 16.04 (x64)[a]__ | [![linux_a_debug][linux_a_dbgicon]][linux_a_dbglink] | [![linux_a_test][linux_a_testicon]][linux_a_testlink] | [![linux_a_release][linux_a_relicon]][linux_a_rellink] |
-| __Ubuntu 16.04 (x64)[s]__ | [![linux_s_debug][linux_s_dbgicon]][linux_s_dbglink] | [![linux_s_test][linux_s_testicon]][linux_s_testlink] | [![linux_s_release][linux_s_relicon]][linux_s_rellink] |
-| __Ubuntu 16.04 (x64)[s][n]__ | * | [![linux_sn_test][linux_sn_testicon]][linux_sn_testlink] | * |
-| __OS X 10.9 (x64)[a]__ | [![osx_a_debug][osx_a_dbgicon]][osx_a_dbglink] | [![osx_a_test][osx_a_testicon]][osx_a_testlink] | [![osx_a_release][osx_a_relicon]][osx_a_rellink] |
-| __OS X 10.9 (x64)[s][n]__ | * | [![osx_sn_test][osx_sn_testicon]][osx_sn_testlink] | * |
-
-[a] Static | [s] Shared | [n] NoJIT | * Omitted
-
-[x64dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_debug/badge/icon
-[x64dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_debug/
-[x64testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_test/badge/icon
-[x64testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_test/
-[x64relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_release/badge/icon
-[x64rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_release/
-
-[x86dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/badge/icon
-[x86dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/
-[x86testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_test/badge/icon
-[x86testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_test/
-[x86relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_release/badge/icon
-[x86rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_release/
-
-[armdbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_debug/badge/icon
-[armdbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_debug/
-[armtesticon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_test/badge/icon
-[armtestlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_test/
-[armrelicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_release/badge/icon
-[armrellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_release/
-
-[linux_a_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_debug/badge/icon
-[linux_a_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_debug/
-[linux_a_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_test/badge/icon
-[linux_a_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_test/
-[linux_a_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_release/badge/icon
-[linux_a_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_release/
-
-[linux_s_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_debug/badge/icon
-[linux_s_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_debug/
-[linux_s_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_test/badge/icon
-[linux_s_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_test/
-[linux_s_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_release/badge/icon
-[linux_s_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_release/
-
-[linux_sn_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_debug/badge/icon
-[linux_sn_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_debug/
-[linux_sn_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_test/badge/icon
-[linux_sn_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_test/
-[linux_sn_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_release/badge/icon
-[linux_sn_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_release/
-
-[osx_a_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_debug/badge/icon
-[osx_a_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_debug/
-[osx_a_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_test/badge/icon
-[osx_a_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_test/
-[osx_a_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_release/badge/icon
-[osx_a_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_release/
-
-[osx_sn_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_debug/badge/icon
-[osx_sn_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_debug/
-[osx_sn_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_test/badge/icon
-[osx_sn_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_test/
-[osx_sn_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_release/badge/icon
-[osx_sn_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_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 and additional details.
-
-## Security
-
-If you believe you have found a security issue in ChakraCore, please share it with us privately following the guidance at the Microsoft [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094). Reporting it via this channel helps minimize risk to projects built with ChakraCore.
-
-## Documentation
-
-* [ChakraCore Architecture](https://github.com/Microsoft/ChakraCore/wiki/Architecture-Overview)
-* [Quickstart Embedding ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Embedding-ChakraCore)
-* [JSRT Reference](https://github.com/Microsoft/ChakraCore/wiki/JavaScript-Runtime-%28JSRT%29-Reference)
-* [Contribution guidelines](CONTRIBUTING.md)
-* [Blogs, talks and other resources](https://github.com/Microsoft/ChakraCore/wiki/Resources)
-
-## [Building ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Building-ChakraCore)
-
-You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 or above, with either Visual Studio 2013 or 2015 with C++ support installed. Once you have Visual Studio installed:
-
-* Clone ChakraCore through ```git clone https://github.com/Microsoft/ChakraCore.git```
-* Open `Build\Chakra.Core.sln` in Visual Studio
-* Build Solution
-
-More details in [Building ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Building-ChakraCore).
-
-Alternatively, see [Getting ChakraCore binaries](https://github.com/Microsoft/ChakraCore/wiki/Getting-ChakraCore-binaries) for pre-built ChakraCore binaries.
-
-## Using ChakraCore
-
-Once built, you have a few options for how you can use ChakraCore:
-
-* The most basic is to test the engine is running correctly with the *ch.exe* binary. This app is a lightweight hosting of JSRT that you can use to run small applications. After building, you can find this binary in:
- * `Build\VcBuild\bin\${platform}_${configuration}`
- * (e.g. `Build\VcBuild\bin\x64_debug`)
-* You can [embed ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Embedding-ChakraCore) in your applications - see [documentation](https://github.com/Microsoft/ChakraCore/wiki/Embedding-ChakraCore) and [samples](https://aka.ms/chakracoresamples).
-* Finally, you can also use ChakraCore as the JavaScript engine in Node. You can learn more by reading how to use [Chakra as Node's JS engine](https://github.com/Microsoft/node)
-
-_A note about using ChakraCore_: ChakraCore is the foundational JavaScript engine, but it does not include the external APIs that make up the modern JavaScript development experience. For example, DOM APIs like ```document.write()``` are additional APIs that are not available by default and would need to be provided. For debugging, you may instead want to use ```print()```.
-
-## [Contribute](CONTRIBUTING.md)
-
-Contributions to ChakraCore are welcome. Here is how you can contribute to ChakraCore:
-
-* [Submit bugs](https://github.com/Microsoft/ChakraCore/issues) and help us verify fixes (please refer to [External Issues](https://github.com/Microsoft/ChakraCore/wiki/External-Issues) for anything external, such as Microsoft Edge or Node-ChakraCore issues)
-* [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
-
-This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
-
-Please refer to [Contribution Guidelines](CONTRIBUTING.md) for more details.
-
-## [License](https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt)
-
-Code licensed under the [MIT License](https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt).
-
-## [Roadmap](https://github.com/Microsoft/ChakraCore/wiki/Roadmap)
-
-For details on our planned features and future direction please refer to our [Roadmap](https://github.com/Microsoft/ChakraCore/wiki/Roadmap).
-
-## Contact Us
-
-If you have questions about ChakraCore, or you would like to reach out to us about an issue you're having or for development advice as you work on a ChakraCore issue, you can reach us as follows:
-
-* Open an [issue](https://github.com/Microsoft/ChakraCore/issues/new) and prefix the issue title with [Question]. See [Question](https://github.com/Microsoft/ChakraCore/issues?q=label%3AQuestion) tag for already-opened questions.
-* Discuss ChakraCore with the team and the community on our [Gitter Channel](https://gitter.im/Microsoft/ChakraCore).
-* You can also start private messages with individual ChakraCore developers via Gitter.
+# ChakraCore
+
+[![Join the chat at https://gitter.im/Microsoft/ChakraCore](https://badges.gitter.im/Microsoft/ChakraCore.svg)](https://gitter.im/Microsoft/ChakraCore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![Licensed under the MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt)
+
+ChakraCore is the core part of Chakra, the high-performance JavaScript engine that powers Microsoft Edge and Windows applications written in HTML/CSS/JS. ChakraCore supports Just-in-time (JIT) compilation of JavaScript for x86/x64/ARM, garbage collection, and a wide range of the latest JavaScript features. ChakraCore also supports the [JavaScript Runtime (JSRT) APIs](https://github.com/Microsoft/ChakraCore/wiki/JavaScript-Runtime-%28JSRT%29-Overview), which allows you to easily embed ChakraCore in your applications.
+
+You can stay up-to-date on progress by following the [MSEdge developer blog](https://blogs.windows.com/msedgedev/).
+
+## [Build Status](https://github.com/Microsoft/ChakraCore/wiki/Build-Status)
+
+| | __Debug__ | __Test__ | __Release__ |
+|:-----------------------------:|:---------:|:--------:|:-----------:|
+| __Windows (x64)__ | [![x64debug][x64dbgicon]][x64dbglink] | [![x64test][x64testicon]][x64testlink] | [![x64release][x64relicon]][x64rellink] |
+| __Windows (x86)__ | [![x86debug][x86dbgicon]][x86dbglink] | [![x86test][x86testicon]][x86testlink] | [![x86release][x86relicon]][x86rellink] |
+| __Windows (ARM)__ | [![armdebug][armdbgicon]][armdbglink] | [![armtest][armtesticon]][armtestlink] | [![armrelease][armrelicon]][armrellink] |
+| __Ubuntu 16.04 (x64)[a]__ | [![linux_a_debug][linux_a_dbgicon]][linux_a_dbglink] | [![linux_a_test][linux_a_testicon]][linux_a_testlink] | [![linux_a_release][linux_a_relicon]][linux_a_rellink] |
+| __Ubuntu 16.04 (x64)[s]__ | [![linux_s_debug][linux_s_dbgicon]][linux_s_dbglink] | [![linux_s_test][linux_s_testicon]][linux_s_testlink] | [![linux_s_release][linux_s_relicon]][linux_s_rellink] |
+| __Ubuntu 16.04 (x64)[s][n]__ | * | [![linux_sn_test][linux_sn_testicon]][linux_sn_testlink] | * |
+| __OS X 10.9 (x64)[a]__ | [![osx_a_debug][osx_a_dbgicon]][osx_a_dbglink] | [![osx_a_test][osx_a_testicon]][osx_a_testlink] | [![osx_a_release][osx_a_relicon]][osx_a_rellink] |
+| __OS X 10.9 (x64)[s][n]__ | * | [![osx_sn_test][osx_sn_testicon]][osx_sn_testlink] | * |
+
+[a] Static | [s] Shared | [n] NoJIT | * Omitted
+
+[x64dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_debug/badge/icon
+[x64dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_debug/
+[x64testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_test/badge/icon
+[x64testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_test/
+[x64relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_release/badge/icon
+[x64rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x64_release/
+
+[x86dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/badge/icon
+[x86dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/
+[x86testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_test/badge/icon
+[x86testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_test/
+[x86relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_release/badge/icon
+[x86rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/x86_release/
+
+[armdbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_debug/badge/icon
+[armdbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_debug/
+[armtesticon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_test/badge/icon
+[armtestlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_test/
+[armrelicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_release/badge/icon
+[armrellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/arm_release/
+
+[linux_a_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_debug/badge/icon
+[linux_a_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_debug/
+[linux_a_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_test/badge/icon
+[linux_a_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_test/
+[linux_a_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_release/badge/icon
+[linux_a_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_ubuntu_linux_release/
+
+[linux_s_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_debug/badge/icon
+[linux_s_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_debug/
+[linux_s_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_test/badge/icon
+[linux_s_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_test/
+[linux_s_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_release/badge/icon
+[linux_s_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/shared_ubuntu_linux_release/
+
+[linux_sn_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_debug/badge/icon
+[linux_sn_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_debug/
+[linux_sn_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_test/badge/icon
+[linux_sn_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_test/
+[linux_sn_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_release/badge/icon
+[linux_sn_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_ubuntu_linux_release/
+
+[osx_a_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_debug/badge/icon
+[osx_a_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_debug/
+[osx_a_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_test/badge/icon
+[osx_a_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_test/
+[osx_a_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_release/badge/icon
+[osx_a_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/static_osx_osx_release/
+
+[osx_sn_dbgicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_debug/badge/icon
+[osx_sn_dbglink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_debug/
+[osx_sn_testicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_test/badge/icon
+[osx_sn_testlink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_test/
+[osx_sn_relicon]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_release/badge/icon
+[osx_sn_rellink]: https://ci.dot.net/job/Microsoft_ChakraCore/job/master/job/_no_jit_shared_osx_osx_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 and additional details.
+
+## Security
+
+If you believe you have found a security issue in ChakraCore, please share it with us privately following the guidance at the Microsoft [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094). Reporting it via this channel helps minimize risk to projects built with ChakraCore.
+
+## Documentation
+
+* [ChakraCore Architecture](https://github.com/Microsoft/ChakraCore/wiki/Architecture-Overview)
+* [Quickstart Embedding ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Embedding-ChakraCore)
+* [JSRT Reference](https://github.com/Microsoft/ChakraCore/wiki/JavaScript-Runtime-%28JSRT%29-Reference)
+* [Contribution guidelines](CONTRIBUTING.md)
+* [Blogs, talks and other resources](https://github.com/Microsoft/ChakraCore/wiki/Resources)
+
+## [Building ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Building-ChakraCore)
+
+You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 or above, with either Visual Studio 2013 or 2015 with C++ support installed. Once you have Visual Studio installed:
+
+* Clone ChakraCore through ```git clone https://github.com/Microsoft/ChakraCore.git```
+* Open `Build\Chakra.Core.sln` in Visual Studio
+* Build Solution
+
+More details in [Building ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Building-ChakraCore).
+
+Alternatively, see [Getting ChakraCore binaries](https://github.com/Microsoft/ChakraCore/wiki/Getting-ChakraCore-binaries) for pre-built ChakraCore binaries.
+
+## Using ChakraCore
+
+Once built, you have a few options for how you can use ChakraCore:
+
+* The most basic is to test the engine is running correctly with the *ch.exe* binary. This app is a lightweight hosting of JSRT that you can use to run small applications. After building, you can find this binary in:
+ * `Build\VcBuild\bin\${platform}_${configuration}`
+ * (e.g. `Build\VcBuild\bin\x64_debug`)
+* You can [embed ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Embedding-ChakraCore) in your applications - see [documentation](https://github.com/Microsoft/ChakraCore/wiki/Embedding-ChakraCore) and [samples](https://aka.ms/chakracoresamples).
+* Finally, you can also use ChakraCore as the JavaScript engine in Node. You can learn more by reading how to use [Chakra as Node's JS engine](https://github.com/Microsoft/node)
+
+_A note about using ChakraCore_: ChakraCore is the foundational JavaScript engine, but it does not include the external APIs that make up the modern JavaScript development experience. For example, DOM APIs like ```document.write()``` are additional APIs that are not available by default and would need to be provided. For debugging, you may instead want to use ```print()```.
+
+## [Contribute](CONTRIBUTING.md)
+
+Contributions to ChakraCore are welcome. Here is how you can contribute to ChakraCore:
+
+* [Submit bugs](https://github.com/Microsoft/ChakraCore/issues) and help us verify fixes (please refer to [External Issues](https://github.com/Microsoft/ChakraCore/wiki/External-Issues) for anything external, such as Microsoft Edge or Node-ChakraCore issues)
+* [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
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+
+Please refer to [Contribution Guidelines](CONTRIBUTING.md) for more details.
+
+## [License](https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt)
+
+Code licensed under the [MIT License](https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt).
+
+## [Roadmap](https://github.com/Microsoft/ChakraCore/wiki/Roadmap)
+
+For details on our planned features and future direction please refer to our [Roadmap](https://github.com/Microsoft/ChakraCore/wiki/Roadmap).
+
+## Contact Us
+
+If you have questions about ChakraCore, or you would like to reach out to us about an issue you're having or for development advice as you work on a ChakraCore issue, you can reach us as follows:
+
+* Open an [issue](https://github.com/Microsoft/ChakraCore/issues/new) and prefix the issue title with [Question]. See [Question](https://github.com/Microsoft/ChakraCore/issues?q=label%3AQuestion) tag for already-opened questions.
+* Discuss ChakraCore with the team and the community on our [Gitter Channel](https://gitter.im/Microsoft/ChakraCore).
+* You can also start private messages with individual ChakraCore developers via Gitter.
diff --git a/deps/chakrashim/core/build.sh b/deps/chakrashim/core/build.sh
index 3b62edde03c..deba4bce592 100644
--- a/deps/chakrashim/core/build.sh
+++ b/deps/chakrashim/core/build.sh
@@ -1,658 +1,658 @@
-#!/bin/bash
-#-------------------------------------------------------------------------------------------------------
-# Copyright (C) Microsoft. All rights reserved.
-# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-#-------------------------------------------------------------------------------------------------------
-
-SAFE_RUN() {
- local SF_RETURN_VALUE=$($1 2>&1)
-
- if [[ $? != 0 ]]; then
- >&2 echo $SF_RETURN_VALUE
- exit 1
- fi
- echo $SF_RETURN_VALUE
-}
-
-ERROR_EXIT() {
- if [[ $? != 0 ]]; then
- echo $($1 2>&1)
- exit 1;
- fi
-}
-
-ERROR_CLANG() {
- echo "ERROR: clang++ not found."
- echo -e "\nYou could use clang++ from a custom location.\n"
- PRINT_USAGE
- exit 1
-}
-
-PRINT_USAGE() {
- echo ""
- echo "[ChakraCore Build Script Help]"
- echo ""
- echo "build.sh [options]"
- echo ""
- echo "options:"
- echo " --arch[=S] Set target arch (arm, x86, amd64)"
- echo " --cc=PATH Path to Clang (see example below)"
- echo " --cxx=PATH Path to Clang++ (see example below)"
- echo " --create-deb[=V] Create .deb package with given V version."
- echo " -d, --debug Debug build. Default: Release"
- echo " --embed-icu Download and embed ICU-57 statically."
- echo " --extra-defines=DEF=VAR,DEFINE,..."
- echo " Compile with additional defines"
- echo " -h, --help Show help"
- echo " --icu=PATH Path to ICU include folder (see example below)"
- echo " -j[=N], --jobs[=N] Multicore build, allow N jobs at once."
- echo " -n, --ninja Build with ninja instead of make."
- echo " --no-icu Compile without unicode/icu support."
- echo " --no-jit Disable JIT"
- echo " --libs-only Do not build CH and GCStress"
- echo " --lto Enables LLVM Full LTO"
- echo " --lto-thin Enables LLVM Thin LTO - xcode 8+ or clang 3.9+"
- echo " --static Build as static library. Default: shared library"
- echo " --sanitize=CHECKS Build with clang -fsanitize checks,"
- echo " e.g. undefined,signed-integer-overflow."
- echo " -t, --test-build Test build. Enables test flags on a release build."
- echo " --target[=S] Target OS (i.e. android)"
- echo " --target-path[=S] Output path for compiled binaries. Default: out/"
- echo " --trace Enables experimental built-in trace."
- echo " --xcode Generate XCode project."
- echo " --with-intl Include the Intl object (requires ICU)."
- echo " --without=FEATURE,FEATURE,..."
- echo " Disable FEATUREs from JSRT experimental features."
- echo " --valgrind Enable Valgrind support"
- echo " !!! Disables Concurrent GC (lower performance)"
- echo " -v, --verbose Display verbose output including all options"
- echo " --wb-check CPPFILE"
- echo " Write-barrier check given CPPFILE (git path)"
- echo " --wb-analyze CPPFILE"
- echo " Write-barrier analyze given CPPFILE (git path)"
- echo " --wb-args=PLUGIN_ARGS"
- echo " Write-barrier clang plugin args"
- echo " -y Automatically answer Yes to questions asked by \
-script (at your own risk)"
- echo ""
- echo "example:"
- echo " ./build.sh --cxx=/path/to/clang++ --cc=/path/to/clang -j"
- echo "with icu:"
- echo " ./build.sh --icu=/usr/local/opt/icu4c/include"
- echo ""
-}
-
-pushd `dirname $0` > /dev/null
-CHAKRACORE_DIR=`pwd -P`
-popd > /dev/null
-_CXX=""
-_CC=""
-_VERBOSE=""
-BUILD_TYPE="Release"
-CMAKE_GEN=
-EXTRA_DEFINES=""
-MAKE=make
-MULTICORE_BUILD=""
-NO_JIT=
-ICU_PATH="-DICU_SETTINGS_RESET=1"
-STATIC_LIBRARY="-DSHARED_LIBRARY_SH=1"
-SANITIZE=
-WITHOUT_FEATURES=""
-CREATE_DEB=0
-ARCH="-DCC_USES_SYSTEM_ARCH_SH=1"
-OS_LINUX=0
-OS_APT_GET=0
-OS_UNIX=0
-LTO=""
-TARGET_OS=""
-ENABLE_CC_XPLAT_TRACE=""
-WB_CHECK=
-WB_ANALYZE=
-WB_ARGS=
-TARGET_PATH=0
-VALGRIND=0
-# -DCMAKE_EXPORT_COMPILE_COMMANDS=ON useful for clang-query tool
-CMAKE_EXPORT_COMPILE_COMMANDS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
-LIBS_ONLY_BUILD=
-SHOULD_EMBED_ICU=0
-ALWAYS_YES=0
-
-if [ -f "/proc/version" ]; then
- OS_LINUX=1
- PROC_INFO=$(cat /proc/version)
- if [[ $PROC_INFO =~ 'Ubuntu' || $PROC_INFO =~ 'Debian'
- || $PROC_INFO =~ 'Linaro' ]]; then
- OS_APT_GET=1
- fi
-elif [[ $(uname -s) =~ "Darwin" ]]; then
- OS_UNIX=1
-else
- echo -e "Warning: Installation script couldn't detect host OS..\n" # exit ?
-fi
-
-while [[ $# -gt 0 ]]; do
- case "$1" in
- --arch=*)
- ARCH=$1
- ARCH="${ARCH:7}"
- ;;
-
- --cxx=*)
- _CXX=$1
- _CXX=${_CXX:6}
- ;;
-
- --cc=*)
- _CC=$1
- _CC=${_CC:5}
- ;;
-
- -h | --help)
- PRINT_USAGE
- exit
- ;;
-
- -v | --verbose)
- _VERBOSE="VERBOSE=1"
- ;;
-
- -d | --debug)
- BUILD_TYPE="Debug"
- ;;
-
- --embed-icu)
- SHOULD_EMBED_ICU=1
- ;;
-
- --extra-defines=*)
- DEFINES=$1
- DEFINES=${DEFINES:16} # value after --extra-defines=
- for x in ${DEFINES//,/ } # replace comma with space then split
- do
- if [[ "$EXTRA_DEFINES" == "" ]]; then
- EXTRA_DEFINES="-DEXTRA_DEFINES_SH="
- else
- EXTRA_DEFINES="$EXTRA_DEFINES;"
- fi
- EXTRA_DEFINES="${EXTRA_DEFINES}-D${x}"
- done
- ;;
-
- -t | --test-build)
- BUILD_TYPE="Test"
- ;;
-
- -j | --jobs)
- if [[ "$1" == "-j" && "$2" =~ ^[^-] ]]; then
- MULTICORE_BUILD="-j $2"
- shift
- else
- MULTICORE_BUILD="-j $(nproc)"
- fi
- ;;
-
- -j=* | --jobs=*) # -j=N syntax used in CI
- MULTICORE_BUILD=$1
- if [[ "$1" =~ ^-j= ]]; then
- MULTICORE_BUILD="-j ${MULTICORE_BUILD:3}"
- else
- MULTICORE_BUILD="-j ${MULTICORE_BUILD:7}"
- fi
- ;;
-
- --icu=*)
- ICU_PATH=$1
- # resolve tilde on path
- eval ICU_PATH="${ICU_PATH:6}"
- if [[ ! -d ${ICU_PATH} ]]; then
- if [[ -d "${CHAKRACORE_DIR}/${ICU_PATH}" ]]; then
- ICU_PATH="${CHAKRACORE_DIR}/${ICU_PATH}"
- else
- # if ICU_PATH is given, do not fallback to no-icu
- echo "!!! couldn't find ICU at $ICU_PATH"
- exit 1
- fi
- fi
- ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH}"
- ;;
-
- --libs-only)
- LIBS_ONLY_BUILD="-DLIBS_ONLY_BUILD_SH=1"
- ;;
-
- --lto)
- LTO="-DENABLE_FULL_LTO_SH=1"
- HAS_LTO=1
- ;;
-
- --lto-thin)
- LTO="-DENABLE_THIN_LTO_SH=1"
- HAS_LTO=1
- ;;
-
- -n | --ninja)
- CMAKE_GEN="-G Ninja"
- MAKE=ninja
- ;;
-
- --no-icu)
- ICU_PATH="-DNO_ICU_PATH_GIVEN_SH=1"
- ;;
-
- --no-jit)
- NO_JIT="-DNO_JIT_SH=1"
- ;;
-
- --with-intl)
- INTL_ICU="-DINTL_ICU_SH=1"
- ;;
-
- --xcode)
- CMAKE_GEN="-G Xcode -DCC_XCODE_PROJECT=1"
- CMAKE_EXPORT_COMPILE_COMMANDS=""
- MAKE=0
- ;;
-
- --create-deb=*)
- CREATE_DEB=$1
- CREATE_DEB="${CREATE_DEB:13}"
- ;;
-
- --static)
- STATIC_LIBRARY="-DSTATIC_LIBRARY_SH=1"
- ;;
-
- --sanitize=*)
- SANITIZE=$1
- SANITIZE=${SANITIZE:11} # value after --sanitize=
- SANITIZE="-DCLANG_SANITIZE_SH=${SANITIZE}"
- ;;
-
- --target=*)
- _TARGET_OS=$1
- _TARGET_OS="${_TARGET_OS:9}"
- if [[ $_TARGET_OS =~ "android" ]]; then
- OLD_PATH=$PATH
- export TOOLCHAIN=$PWD/android-toolchain-arm
- TARGET_OS="-DCC_TARGET_OS_ANDROID_SH=1 -DANDROID_TOOLCHAIN_DIR=${TOOLCHAIN}/arm-linux-androideabi"
- export PATH=$TOOLCHAIN/bin:$OLD_PATH
- export AR=arm-linux-androideabi-ar
- export CC=arm-linux-androideabi-clang
- export CXX=arm-linux-androideabi-clang++
- export LINK=arm-linux-androideabi-clang++
- export STRIP=arm-linux-androideabi-strip
- # override CXX and CC
- _CXX="${TOOLCHAIN}/bin/${CXX}"
- _CC="${TOOLCHAIN}/bin/${CC}"
- fi
- ;;
-
- --trace)
- ENABLE_CC_XPLAT_TRACE="-DENABLE_CC_XPLAT_TRACE_SH=1"
- ;;
-
- --target-path=*)
- TARGET_PATH=$1
- TARGET_PATH=${TARGET_PATH:14}
- ;;
-
- --without=*)
- FEATURES=$1
- FEATURES=${FEATURES:10} # value after --without=
- for x in ${FEATURES//,/ } # replace comma with space then split
- do
- if [[ "$WITHOUT_FEATURES" == "" ]]; then
- WITHOUT_FEATURES="-DWITHOUT_FEATURES_SH="
- else
- WITHOUT_FEATURES="$WITHOUT_FEATURES;"
- fi
- WITHOUT_FEATURES="${WITHOUT_FEATURES}-DCOMPILE_DISABLE_${x}=1"
- done
- ;;
-
- --wb-check)
- if [[ "$2" =~ ^[^-] ]]; then
- WB_CHECK="$2"
- shift
- else
- WB_CHECK="*" # check all files
- fi
- ;;
-
- --wb-analyze)
- if [[ "$2" =~ ^[^-] ]]; then
- WB_ANALYZE="$2"
- shift
- else
- PRINT_USAGE && exit 1
- fi
- ;;
-
- --wb-args=*)
- WB_ARGS=$1
- WB_ARGS=${WB_ARGS:10}
- WB_ARGS=${WB_ARGS// /;} # replace space with ; to generate a cmake list
- ;;
-
- --valgrind)
- VALGRIND="-DENABLE_VALGRIND_SH=1"
- ;;
-
- -y | -Y)
- ALWAYS_YES=1
- ;;
-
- *)
- echo "Unknown option $1"
- PRINT_USAGE
- exit -1
- ;;
- esac
-
- shift
-done
-
-if [[ $SHOULD_EMBED_ICU == 1 ]]; then
- if [ ! -d "${CHAKRACORE_DIR}/deps/icu/source/output" ]; then
- ICU_URL="http://source.icu-project.org/repos/icu/icu/tags/release-57-1"
- echo -e "\n----------------------------------------------------------------"
- echo -e "\nThis script will download ICU-LIB from\n${ICU_URL}\n"
- echo "It is licensed to you by its publisher, not Microsoft."
- echo "Microsoft is not responsible for the software."
- echo "Your installation and use of ICU-LIB is subject to the publisher's terms available here:"
- echo -e "http://www.unicode.org/copyright.html#License\n"
- echo -e "----------------------------------------------------------------\n"
- echo "If you don't agree, press Ctrl+C to terminate"
- WAIT_QUESTION="Hit ENTER to continue (or wait 10 seconds)"
- if [[ $ALWAYS_YES == 1 ]]; then
- echo "$WAIT_QUESTION : Y"
- else
- read -t 10 -p "$WAIT_QUESTION"
- fi
-
- SAFE_RUN `mkdir -p ${CHAKRACORE_DIR}/deps/`
- cd "${CHAKRACORE_DIR}/deps/";
- ABS_DIR=`pwd`
- if [ ! -d "${ABS_DIR}/icu/" ]; then
- echo "Downloading ICU ${ICU_URL}"
- if [ ! -f "/usr/bin/svn" ]; then
- echo -e "\nYou should install 'svn' client in order to use this feature"
- if [ $OS_APT_GET == 1 ]; then
- echo "tip: Try 'sudo apt-get install subversion'"
- fi
- exit 1
- fi
- svn export -q $ICU_URL icu
- ERROR_EXIT "rm -rf ${ABS_DIR}/icu/"
- fi
-
- cd "${ABS_DIR}/icu/source";./configure --with-data-packaging=static\
- --prefix="${ABS_DIR}/icu/source/output/"\
- --enable-static --disable-shared --with-library-bits=64\
- --disable-icuio --disable-layout\
- CXXFLAGS="-fPIC" CFLAGS="-fPIC"
-
- ERROR_EXIT "rm -rf ${ABS_DIR}/icu/source/output/"
- make STATICCFLAGS="-fPIC" STATICCXXFLAGS="-fPIC" STATICCPPFLAGS="-DPIC" install
- ERROR_EXIT "rm -rf ${ABS_DIR}/icu/source/output/"
- cd "${ABS_DIR}/../"
- fi
- ICU_PATH="-DCC_EMBED_ICU_SH=1"
-fi
-
-if [[ ${#_VERBOSE} > 0 ]]; then
- # echo options back to the user
- echo "Printing command line options back to the user:"
- echo "_CXX=${_CXX}"
- echo "_CC=${_CC}"
- echo "BUILD_TYPE=${BUILD_TYPE}"
- echo "MULTICORE_BUILD=${MULTICORE_BUILD}"
- echo "ICU_PATH=${ICU_PATH}"
- echo "CMAKE_GEN=${CMAKE_GEN}"
- echo "MAKE=${MAKE} $_VERBOSE"
- echo ""
-fi
-
-# if LTO build is enabled and cc-toolchain/clang was compiled, use it instead
-if [[ $HAS_LTO == 1 ]]; then
- if [[ -f "${CHAKRACORE_DIR}/cc-toolchain/build/bin/clang++" ]]; then
- SELF=`pwd`
- _CXX="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang++"
- _CC="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang"
- else
- # Linux LD possibly doesn't support LLVM LTO, check.. and compile clang if not
- if [[ $OS_LINUX == 1 ]]; then
- if [[ ! `ld -v` =~ 'GNU gold' ]]; then
- pushd "$CHAKRACORE_DIR" > /dev/null
- $CHAKRACORE_DIR/tools/compile_clang.sh
- if [[ $? != 0 ]]; then
- echo -e "tools/compile_clang.sh has failed.\n"
- echo "Try with 'sudo' ?"
- popd > /dev/null
- exit 1
- fi
- _CXX="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang++"
- _CC="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang"
- popd > /dev/null
- fi
- fi
- fi
-fi
-
-if [ "${HAS_LTO}${OS_LINUX}" == "11" ]; then
- echo "lto: ranlib disabled"
- export RANLIB=/bin/true
-fi
-
-CLANG_PATH=
-if [[ ${#_CXX} > 0 || ${#_CC} > 0 ]]; then
- if [[ ${#_CXX} == 0 || ${#_CC} == 0 ]]; then
- echo "ERROR: '-cxx' and '-cc' options must be used together."
- exit 1
- fi
- echo "Custom CXX ${_CXX}"
- echo "Custom CC ${_CC}"
-
- if [[ ! -f $_CXX || ! -f $_CC ]]; then
- echo "ERROR: Custom compiler not found on given path"
- exit 1
- fi
- CLANG_PATH=$_CXX
-else
- RET_VAL=$(SAFE_RUN 'c++ --version')
- if [[ ! $RET_VAL =~ "clang" ]]; then
- echo "Searching for Clang..."
- if [[ -f /usr/bin/clang++ ]]; then
- echo "Clang++ found at /usr/bin/clang++"
- _CXX=/usr/bin/clang++
- _CC=/usr/bin/clang
- CLANG_PATH=$_CXX
- else
- # try env CXX and CC
- if [[ ! -f $CXX || ! -f $CC ]]; then
- ERROR_CLANG
- fi
-
- _CXX=$CXX
- _CC=$CC
- CLANG_PATH=$CXX
- VERSION=$($CXX --version)
- if [[ ! $VERSION =~ "clang" ]]; then
- ERROR_CLANG
- fi
- echo -e "Clang++ not found on PATH.\nTrying CCX -> ${CCX} and CC -> ${CC}"
- fi
- else
- CLANG_PATH=c++
- fi
-fi
-
-# check clang version (min required 3.7)
-VERSION=$($CLANG_PATH --version | grep "version [0-9]*\.[0-9]*" --o -i | grep "[0-9]\.[0-9]*" --o)
-VERSION=${VERSION/./}
-
-if [[ $VERSION -lt 37 ]]; then
- echo "ERROR: Minimum required Clang version is 3.7"
- exit 1
-fi
-
-CC_PREFIX=""
-if [[ ${#_CXX} > 0 ]]; then
- CC_PREFIX="-DCMAKE_CXX_COMPILER=$_CXX -DCMAKE_C_COMPILER=$_CC"
-fi
-
-RELATIVE_BUILD_PATH="../.."
-if [[ $TARGET_PATH == 0 ]]; then
- TARGET_PATH="$CHAKRACORE_DIR/out"
-else
- if [[ $TARGET_PATH =~ "~/" ]]; then
- echo "Do not use '~/' for '--target-path'"
- echo -e "\nAborting Build."
- exit 1
- fi
-fi
-
-BUILD_DIRECTORY="${TARGET_PATH}/${BUILD_TYPE:0}"
-echo "Build path: ${BUILD_DIRECTORY}"
-
-BUILD_RELATIVE_DIRECTORY=$(python -c "import os.path;print \
- os.path.relpath('${CHAKRACORE_DIR}', '$BUILD_DIRECTORY')")
-
-################# Write-barrier check/analyze run #################
-WB_FLAG=
-WB_TARGET=
-
-if [[ $WB_CHECK || $WB_ANALYZE ]]; then
- # build software write barrier checker clang plugin
- $CHAKRACORE_DIR/tools/RecyclerChecker/build.sh --cxx=$_CXX || exit 1
-
- if [[ $WB_CHECK && $WB_ANALYZE ]]; then
- echo "Please run only one of --wb-check or --wb-analyze" && exit 1
- fi
- if [[ $WB_CHECK ]]; then
- WB_FLAG="-DWB_CHECK_SH=1"
- WB_FILE=$WB_CHECK
- fi
- if [[ $WB_ANALYZE ]]; then
- WB_FLAG="-DWB_ANALYZE_SH=1"
- WB_FILE=$WB_ANALYZE
- fi
-
- if [[ $WB_ARGS ]]; then
- if [[ $WB_ARGS =~ "-fix" ]]; then
- MULTICORE_BUILD="-j 1" # 1 job only if doing write barrier fix
- fi
- WB_ARGS="-DWB_ARGS_SH=$WB_ARGS"
- fi
-
- # support --wb-check ONE_CPP_FILE
- if [[ $WB_FILE != "*" ]]; then
- if [[ $MAKE != 'ninja' ]]; then
- echo "--wb-check/wb-analyze ONE_FILE only works with --ninja" && exit 1
- fi
-
- if [[ -f $CHAKRACORE_DIR/$WB_FILE ]]; then
- touch $CHAKRACORE_DIR/$WB_FILE
- else
- echo "$CHAKRACORE_DIR/$WB_FILE not found. Please use full git path for $WB_FILE." && exit 1
- fi
-
- WB_FILE_DIR=`dirname $WB_FILE`
- WB_FILE_BASE=`basename $WB_FILE`
-
- WB_FILE_CMAKELISTS="$CHAKRACORE_DIR/$WB_FILE_DIR/CMakeLists.txt"
- if [[ -f $WB_FILE_CMAKELISTS ]]; then
- SUBDIR=$(grep -i add_library $WB_FILE_CMAKELISTS | sed "s/.*(\([^ ]*\) .*/\1/")
- else
- echo "$WB_FILE_CMAKELISTS not found." && exit 1
- fi
- WB_TARGET="$WB_FILE_DIR/CMakeFiles/$SUBDIR.dir/$WB_FILE_BASE.o"
- fi
-fi
-
-# prepare DbgController.js.h
-CH_DIR="${CHAKRACORE_DIR}/bin/ch"
-"${CH_DIR}/jstoc.py" "${CH_DIR}/DbgController.js" controllerScript
-if [[ $? != 0 ]]; then
- exit 1
-fi
-
-if [ ! -d "$BUILD_DIRECTORY" ]; then
- SAFE_RUN `mkdir -p $BUILD_DIRECTORY`
-fi
-pushd $BUILD_DIRECTORY > /dev/null
-
-if [[ $ARCH =~ "x86" ]]; then
- ARCH="-DCC_TARGETS_X86_SH=1"
- echo "Compile Target : x86"
-elif [[ $ARCH =~ "arm" ]]; then
- ARCH="-DCC_TARGETS_ARM_SH=1"
- echo "Compile Target : arm"
-elif [[ $ARCH =~ "amd64" ]]; then
- ARCH="-DCC_TARGETS_AMD64_SH=1"
- echo "Compile Target : amd64"
-else
- echo "Compile Target : System Default"
-fi
-
-echo Generating $BUILD_TYPE makefiles
-echo $EXTRA_DEFINES
-cmake $CMAKE_GEN $CC_PREFIX $ICU_PATH $LTO $STATIC_LIBRARY $ARCH $TARGET_OS \
- $ENABLE_CC_XPLAT_TRACE $EXTRA_DEFINES -DCMAKE_BUILD_TYPE=$BUILD_TYPE $SANITIZE $NO_JIT $INTL_ICU \
- $WITHOUT_FEATURES $WB_FLAG $WB_ARGS $CMAKE_EXPORT_COMPILE_COMMANDS $LIBS_ONLY_BUILD\
- $VALGRIND $BUILD_RELATIVE_DIRECTORY
-
-_RET=$?
-if [[ $? == 0 ]]; then
- if [[ $MAKE != 0 ]]; then
- if [[ $MAKE != 'ninja' ]]; then
- # $MFLAGS comes from host `make` process. Sub `make` process needs this (recursional make runs)
- TEST_MFLAGS="${MFLAGS}*!"
- if [[ $TEST_MFLAGS != "*!" ]]; then
- # Get -j flag from the host
- MULTICORE_BUILD=""
- fi
- $MAKE $MFLAGS $MULTICORE_BUILD $_VERBOSE $WB_TARGET 2>&1 | tee build.log
- else
- $MAKE $MULTICORE_BUILD $_VERBOSE $WB_TARGET 2>&1 | tee build.log
- fi
- _RET=${PIPESTATUS[0]}
- else
- echo "Visit given folder above for xcode project file ----^"
- fi
-fi
-
-if [[ $_RET != 0 ]]; then
- echo "See error details above. Exit code was $_RET"
-else
- if [[ $CREATE_DEB != 0 ]]; then
- DEB_FOLDER=`realpath .`
- DEB_FOLDER="${DEB_FOLDER}/chakracore_${CREATE_DEB}"
-
- mkdir -p $DEB_FOLDER/usr/local/bin
- mkdir -p $DEB_FOLDER/DEBIAN
- cp $DEB_FOLDER/../ch $DEB_FOLDER/usr/local/bin/
- if [[ $STATIC_LIBRARY == "-DSHARED_LIBRARY_SH=1" ]]; then
- cp $DEB_FOLDER/../*.so $DEB_FOLDER/usr/local/bin/
- fi
- echo -e "Package: ChakraCore"\
- "\nVersion: ${CREATE_DEB}"\
- "\nSection: base"\
- "\nPriority: optional"\
- "\nArchitecture: amd64"\
- "\nDepends: libc6 (>= 2.19), uuid-dev (>> 0), libicu-dev (>> 0)"\
- "\nMaintainer: ChakraCore "\
- "\nDescription: Chakra Core"\
- "\n Open source Core of Chakra Javascript Engine"\
- > $DEB_FOLDER/DEBIAN/control
-
- dpkg-deb --build $DEB_FOLDER
- _RET=$?
- if [[ $_RET == 0 ]]; then
- echo ".deb package is available under $BUILD_DIRECTORY"
- fi
- fi
-fi
-
-popd > /dev/null
-exit $_RET
+#!/bin/bash
+#-------------------------------------------------------------------------------------------------------
+# Copyright (C) Microsoft. All rights reserved.
+# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+#-------------------------------------------------------------------------------------------------------
+
+SAFE_RUN() {
+ local SF_RETURN_VALUE=$($1 2>&1)
+
+ if [[ $? != 0 ]]; then
+ >&2 echo $SF_RETURN_VALUE
+ exit 1
+ fi
+ echo $SF_RETURN_VALUE
+}
+
+ERROR_EXIT() {
+ if [[ $? != 0 ]]; then
+ echo $($1 2>&1)
+ exit 1;
+ fi
+}
+
+ERROR_CLANG() {
+ echo "ERROR: clang++ not found."
+ echo -e "\nYou could use clang++ from a custom location.\n"
+ PRINT_USAGE
+ exit 1
+}
+
+PRINT_USAGE() {
+ echo ""
+ echo "[ChakraCore Build Script Help]"
+ echo ""
+ echo "build.sh [options]"
+ echo ""
+ echo "options:"
+ echo " --arch[=S] Set target arch (arm, x86, amd64)"
+ echo " --cc=PATH Path to Clang (see example below)"
+ echo " --cxx=PATH Path to Clang++ (see example below)"
+ echo " --create-deb[=V] Create .deb package with given V version."
+ echo " -d, --debug Debug build. Default: Release"
+ echo " --embed-icu Download and embed ICU-57 statically."
+ echo " --extra-defines=DEF=VAR,DEFINE,..."
+ echo " Compile with additional defines"
+ echo " -h, --help Show help"
+ echo " --icu=PATH Path to ICU include folder (see example below)"
+ echo " -j[=N], --jobs[=N] Multicore build, allow N jobs at once."
+ echo " -n, --ninja Build with ninja instead of make."
+ echo " --no-icu Compile without unicode/icu support."
+ echo " --no-jit Disable JIT"
+ echo " --libs-only Do not build CH and GCStress"
+ echo " --lto Enables LLVM Full LTO"
+ echo " --lto-thin Enables LLVM Thin LTO - xcode 8+ or clang 3.9+"
+ echo " --static Build as static library. Default: shared library"
+ echo " --sanitize=CHECKS Build with clang -fsanitize checks,"
+ echo " e.g. undefined,signed-integer-overflow."
+ echo " -t, --test-build Test build. Enables test flags on a release build."
+ echo " --target[=S] Target OS (i.e. android)"
+ echo " --target-path[=S] Output path for compiled binaries. Default: out/"
+ echo " --trace Enables experimental built-in trace."
+ echo " --xcode Generate XCode project."
+ echo " --with-intl Include the Intl object (requires ICU)."
+ echo " --without=FEATURE,FEATURE,..."
+ echo " Disable FEATUREs from JSRT experimental features."
+ echo " --valgrind Enable Valgrind support"
+ echo " !!! Disables Concurrent GC (lower performance)"
+ echo " -v, --verbose Display verbose output including all options"
+ echo " --wb-check CPPFILE"
+ echo " Write-barrier check given CPPFILE (git path)"
+ echo " --wb-analyze CPPFILE"
+ echo " Write-barrier analyze given CPPFILE (git path)"
+ echo " --wb-args=PLUGIN_ARGS"
+ echo " Write-barrier clang plugin args"
+ echo " -y Automatically answer Yes to questions asked by \
+script (at your own risk)"
+ echo ""
+ echo "example:"
+ echo " ./build.sh --cxx=/path/to/clang++ --cc=/path/to/clang -j"
+ echo "with icu:"
+ echo " ./build.sh --icu=/usr/local/opt/icu4c/include"
+ echo ""
+}
+
+pushd `dirname $0` > /dev/null
+CHAKRACORE_DIR=`pwd -P`
+popd > /dev/null
+_CXX=""
+_CC=""
+_VERBOSE=""
+BUILD_TYPE="Release"
+CMAKE_GEN=
+EXTRA_DEFINES=""
+MAKE=make
+MULTICORE_BUILD=""
+NO_JIT=
+ICU_PATH="-DICU_SETTINGS_RESET=1"
+STATIC_LIBRARY="-DSHARED_LIBRARY_SH=1"
+SANITIZE=
+WITHOUT_FEATURES=""
+CREATE_DEB=0
+ARCH="-DCC_USES_SYSTEM_ARCH_SH=1"
+OS_LINUX=0
+OS_APT_GET=0
+OS_UNIX=0
+LTO=""
+TARGET_OS=""
+ENABLE_CC_XPLAT_TRACE=""
+WB_CHECK=
+WB_ANALYZE=
+WB_ARGS=
+TARGET_PATH=0
+VALGRIND=0
+# -DCMAKE_EXPORT_COMPILE_COMMANDS=ON useful for clang-query tool
+CMAKE_EXPORT_COMPILE_COMMANDS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
+LIBS_ONLY_BUILD=
+SHOULD_EMBED_ICU=0
+ALWAYS_YES=0
+
+if [ -f "/proc/version" ]; then
+ OS_LINUX=1
+ PROC_INFO=$(cat /proc/version)
+ if [[ $PROC_INFO =~ 'Ubuntu' || $PROC_INFO =~ 'Debian'
+ || $PROC_INFO =~ 'Linaro' ]]; then
+ OS_APT_GET=1
+ fi
+elif [[ $(uname -s) =~ "Darwin" ]]; then
+ OS_UNIX=1
+else
+ echo -e "Warning: Installation script couldn't detect host OS..\n" # exit ?
+fi
+
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --arch=*)
+ ARCH=$1
+ ARCH="${ARCH:7}"
+ ;;
+
+ --cxx=*)
+ _CXX=$1
+ _CXX=${_CXX:6}
+ ;;
+
+ --cc=*)
+ _CC=$1
+ _CC=${_CC:5}
+ ;;
+
+ -h | --help)
+ PRINT_USAGE
+ exit
+ ;;
+
+ -v | --verbose)
+ _VERBOSE="VERBOSE=1"
+ ;;
+
+ -d | --debug)
+ BUILD_TYPE="Debug"
+ ;;
+
+ --embed-icu)
+ SHOULD_EMBED_ICU=1
+ ;;
+
+ --extra-defines=*)
+ DEFINES=$1
+ DEFINES=${DEFINES:16} # value after --extra-defines=
+ for x in ${DEFINES//,/ } # replace comma with space then split
+ do
+ if [[ "$EXTRA_DEFINES" == "" ]]; then
+ EXTRA_DEFINES="-DEXTRA_DEFINES_SH="
+ else
+ EXTRA_DEFINES="$EXTRA_DEFINES;"
+ fi
+ EXTRA_DEFINES="${EXTRA_DEFINES}-D${x}"
+ done
+ ;;
+
+ -t | --test-build)
+ BUILD_TYPE="Test"
+ ;;
+
+ -j | --jobs)
+ if [[ "$1" == "-j" && "$2" =~ ^[^-] ]]; then
+ MULTICORE_BUILD="-j $2"
+ shift
+ else
+ MULTICORE_BUILD="-j $(nproc)"
+ fi
+ ;;
+
+ -j=* | --jobs=*) # -j=N syntax used in CI
+ MULTICORE_BUILD=$1
+ if [[ "$1" =~ ^-j= ]]; then
+ MULTICORE_BUILD="-j ${MULTICORE_BUILD:3}"
+ else
+ MULTICORE_BUILD="-j ${MULTICORE_BUILD:7}"
+ fi
+ ;;
+
+ --icu=*)
+ ICU_PATH=$1
+ # resolve tilde on path
+ eval ICU_PATH="${ICU_PATH:6}"
+ if [[ ! -d ${ICU_PATH} ]]; then
+ if [[ -d "${CHAKRACORE_DIR}/${ICU_PATH}" ]]; then
+ ICU_PATH="${CHAKRACORE_DIR}/${ICU_PATH}"
+ else
+ # if ICU_PATH is given, do not fallback to no-icu
+ echo "!!! couldn't find ICU at $ICU_PATH"
+ exit 1
+ fi
+ fi
+ ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH}"
+ ;;
+
+ --libs-only)
+ LIBS_ONLY_BUILD="-DLIBS_ONLY_BUILD_SH=1"
+ ;;
+
+ --lto)
+ LTO="-DENABLE_FULL_LTO_SH=1"
+ HAS_LTO=1
+ ;;
+
+ --lto-thin)
+ LTO="-DENABLE_THIN_LTO_SH=1"
+ HAS_LTO=1
+ ;;
+
+ -n | --ninja)
+ CMAKE_GEN="-G Ninja"
+ MAKE=ninja
+ ;;
+
+ --no-icu)
+ ICU_PATH="-DNO_ICU_PATH_GIVEN_SH=1"
+ ;;
+
+ --no-jit)
+ NO_JIT="-DNO_JIT_SH=1"
+ ;;
+
+ --with-intl)
+ INTL_ICU="-DINTL_ICU_SH=1"
+ ;;
+
+ --xcode)
+ CMAKE_GEN="-G Xcode -DCC_XCODE_PROJECT=1"
+ CMAKE_EXPORT_COMPILE_COMMANDS=""
+ MAKE=0
+ ;;
+
+ --create-deb=*)
+ CREATE_DEB=$1
+ CREATE_DEB="${CREATE_DEB:13}"
+ ;;
+
+ --static)
+ STATIC_LIBRARY="-DSTATIC_LIBRARY_SH=1"
+ ;;
+
+ --sanitize=*)
+ SANITIZE=$1
+ SANITIZE=${SANITIZE:11} # value after --sanitize=
+ SANITIZE="-DCLANG_SANITIZE_SH=${SANITIZE}"
+ ;;
+
+ --target=*)
+ _TARGET_OS=$1
+ _TARGET_OS="${_TARGET_OS:9}"
+ if [[ $_TARGET_OS =~ "android" ]]; then
+ OLD_PATH=$PATH
+ export TOOLCHAIN=$PWD/android-toolchain-arm
+ TARGET_OS="-DCC_TARGET_OS_ANDROID_SH=1 -DANDROID_TOOLCHAIN_DIR=${TOOLCHAIN}/arm-linux-androideabi"
+ export PATH=$TOOLCHAIN/bin:$OLD_PATH
+ export AR=arm-linux-androideabi-ar
+ export CC=arm-linux-androideabi-clang
+ export CXX=arm-linux-androideabi-clang++
+ export LINK=arm-linux-androideabi-clang++
+ export STRIP=arm-linux-androideabi-strip
+ # override CXX and CC
+ _CXX="${TOOLCHAIN}/bin/${CXX}"
+ _CC="${TOOLCHAIN}/bin/${CC}"
+ fi
+ ;;
+
+ --trace)
+ ENABLE_CC_XPLAT_TRACE="-DENABLE_CC_XPLAT_TRACE_SH=1"
+ ;;
+
+ --target-path=*)
+ TARGET_PATH=$1
+ TARGET_PATH=${TARGET_PATH:14}
+ ;;
+
+ --without=*)
+ FEATURES=$1
+ FEATURES=${FEATURES:10} # value after --without=
+ for x in ${FEATURES//,/ } # replace comma with space then split
+ do
+ if [[ "$WITHOUT_FEATURES" == "" ]]; then
+ WITHOUT_FEATURES="-DWITHOUT_FEATURES_SH="
+ else
+ WITHOUT_FEATURES="$WITHOUT_FEATURES;"
+ fi
+ WITHOUT_FEATURES="${WITHOUT_FEATURES}-DCOMPILE_DISABLE_${x}=1"
+ done
+ ;;
+
+ --wb-check)
+ if [[ "$2" =~ ^[^-] ]]; then
+ WB_CHECK="$2"
+ shift
+ else
+ WB_CHECK="*" # check all files
+ fi
+ ;;
+
+ --wb-analyze)
+ if [[ "$2" =~ ^[^-] ]]; then
+ WB_ANALYZE="$2"
+ shift
+ else
+ PRINT_USAGE && exit 1
+ fi
+ ;;
+
+ --wb-args=*)
+ WB_ARGS=$1
+ WB_ARGS=${WB_ARGS:10}
+ WB_ARGS=${WB_ARGS// /;} # replace space with ; to generate a cmake list
+ ;;
+
+ --valgrind)
+ VALGRIND="-DENABLE_VALGRIND_SH=1"
+ ;;
+
+ -y | -Y)
+ ALWAYS_YES=1
+ ;;
+
+ *)
+ echo "Unknown option $1"
+ PRINT_USAGE
+ exit -1
+ ;;
+ esac
+
+ shift
+done
+
+if [[ $SHOULD_EMBED_ICU == 1 ]]; then
+ if [ ! -d "${CHAKRACORE_DIR}/deps/icu/source/output" ]; then
+ ICU_URL="http://source.icu-project.org/repos/icu/icu/tags/release-57-1"
+ echo -e "\n----------------------------------------------------------------"
+ echo -e "\nThis script will download ICU-LIB from\n${ICU_URL}\n"
+ echo "It is licensed to you by its publisher, not Microsoft."
+ echo "Microsoft is not responsible for the software."
+ echo "Your installation and use of ICU-LIB is subject to the publisher's terms available here:"
+ echo -e "http://www.unicode.org/copyright.html#License\n"
+ echo -e "----------------------------------------------------------------\n"
+ echo "If you don't agree, press Ctrl+C to terminate"
+ WAIT_QUESTION="Hit ENTER to continue (or wait 10 seconds)"
+ if [[ $ALWAYS_YES == 1 ]]; then
+ echo "$WAIT_QUESTION : Y"
+ else
+ read -t 10 -p "$WAIT_QUESTION"
+ fi
+
+ SAFE_RUN `mkdir -p ${CHAKRACORE_DIR}/deps/`
+ cd "${CHAKRACORE_DIR}/deps/";
+ ABS_DIR=`pwd`
+ if [ ! -d "${ABS_DIR}/icu/" ]; then
+ echo "Downloading ICU ${ICU_URL}"
+ if [ ! -f "/usr/bin/svn" ]; then
+ echo -e "\nYou should install 'svn' client in order to use this feature"
+ if [ $OS_APT_GET == 1 ]; then
+ echo "tip: Try 'sudo apt-get install subversion'"
+ fi
+ exit 1
+ fi
+ svn export -q $ICU_URL icu
+ ERROR_EXIT "rm -rf ${ABS_DIR}/icu/"
+ fi
+
+ cd "${ABS_DIR}/icu/source";./configure --with-data-packaging=static\
+ --prefix="${ABS_DIR}/icu/source/output/"\
+ --enable-static --disable-shared --with-library-bits=64\
+ --disable-icuio --disable-layout\
+ CXXFLAGS="-fPIC" CFLAGS="-fPIC"
+
+ ERROR_EXIT "rm -rf ${ABS_DIR}/icu/source/output/"
+ make STATICCFLAGS="-fPIC" STATICCXXFLAGS="-fPIC" STATICCPPFLAGS="-DPIC" install
+ ERROR_EXIT "rm -rf ${ABS_DIR}/icu/source/output/"
+ cd "${ABS_DIR}/../"
+ fi
+ ICU_PATH="-DCC_EMBED_ICU_SH=1"
+fi
+
+if [[ ${#_VERBOSE} > 0 ]]; then
+ # echo options back to the user
+ echo "Printing command line options back to the user:"
+ echo "_CXX=${_CXX}"
+ echo "_CC=${_CC}"
+ echo "BUILD_TYPE=${BUILD_TYPE}"
+ echo "MULTICORE_BUILD=${MULTICORE_BUILD}"
+ echo "ICU_PATH=${ICU_PATH}"
+ echo "CMAKE_GEN=${CMAKE_GEN}"
+ echo "MAKE=${MAKE} $_VERBOSE"
+ echo ""
+fi
+
+# if LTO build is enabled and cc-toolchain/clang was compiled, use it instead
+if [[ $HAS_LTO == 1 ]]; then
+ if [[ -f "${CHAKRACORE_DIR}/cc-toolchain/build/bin/clang++" ]]; then
+ SELF=`pwd`
+ _CXX="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang++"
+ _CC="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang"
+ else
+ # Linux LD possibly doesn't support LLVM LTO, check.. and compile clang if not
+ if [[ $OS_LINUX == 1 ]]; then
+ if [[ ! `ld -v` =~ 'GNU gold' ]]; then
+ pushd "$CHAKRACORE_DIR" > /dev/null
+ $CHAKRACORE_DIR/tools/compile_clang.sh
+ if [[ $? != 0 ]]; then
+ echo -e "tools/compile_clang.sh has failed.\n"
+ echo "Try with 'sudo' ?"
+ popd > /dev/null
+ exit 1
+ fi
+ _CXX="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang++"
+ _CC="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang"
+ popd > /dev/null
+ fi
+ fi
+ fi
+fi
+
+if [ "${HAS_LTO}${OS_LINUX}" == "11" ]; then
+ echo "lto: ranlib disabled"
+ export RANLIB=/bin/true
+fi
+
+CLANG_PATH=
+if [[ ${#_CXX} > 0 || ${#_CC} > 0 ]]; then
+ if [[ ${#_CXX} == 0 || ${#_CC} == 0 ]]; then
+ echo "ERROR: '-cxx' and '-cc' options must be used together."
+ exit 1
+ fi
+ echo "Custom CXX ${_CXX}"
+ echo "Custom CC ${_CC}"
+
+ if [[ ! -f $_CXX || ! -f $_CC ]]; then
+ echo "ERROR: Custom compiler not found on given path"
+ exit 1
+ fi
+ CLANG_PATH=$_CXX
+else
+ RET_VAL=$(SAFE_RUN 'c++ --version')
+ if [[ ! $RET_VAL =~ "clang" ]]; then
+ echo "Searching for Clang..."
+ if [[ -f /usr/bin/clang++ ]]; then
+ echo "Clang++ found at /usr/bin/clang++"
+ _CXX=/usr/bin/clang++
+ _CC=/usr/bin/clang
+ CLANG_PATH=$_CXX
+ else
+ # try env CXX and CC
+ if [[ ! -f $CXX || ! -f $CC ]]; then
+ ERROR_CLANG
+ fi
+
+ _CXX=$CXX
+ _CC=$CC
+ CLANG_PATH=$CXX
+ VERSION=$($CXX --version)
+ if [[ ! $VERSION =~ "clang" ]]; then
+ ERROR_CLANG
+ fi
+ echo -e "Clang++ not found on PATH.\nTrying CCX -> ${CCX} and CC -> ${CC}"
+ fi
+ else
+ CLANG_PATH=c++
+ fi
+fi
+
+# check clang version (min required 3.7)
+VERSION=$($CLANG_PATH --version | grep "version [0-9]*\.[0-9]*" --o -i | grep "[0-9]\.[0-9]*" --o)
+VERSION=${VERSION/./}
+
+if [[ $VERSION -lt 37 ]]; then
+ echo "ERROR: Minimum required Clang version is 3.7"
+ exit 1
+fi
+
+CC_PREFIX=""
+if [[ ${#_CXX} > 0 ]]; then
+ CC_PREFIX="-DCMAKE_CXX_COMPILER=$_CXX -DCMAKE_C_COMPILER=$_CC"
+fi
+
+RELATIVE_BUILD_PATH="../.."
+if [[ $TARGET_PATH == 0 ]]; then
+ TARGET_PATH="$CHAKRACORE_DIR/out"
+else
+ if [[ $TARGET_PATH =~ "~/" ]]; then
+ echo "Do not use '~/' for '--target-path'"
+ echo -e "\nAborting Build."
+ exit 1
+ fi
+fi
+
+BUILD_DIRECTORY="${TARGET_PATH}/${BUILD_TYPE:0}"
+echo "Build path: ${BUILD_DIRECTORY}"
+
+BUILD_RELATIVE_DIRECTORY=$(python -c "import os.path;print \
+ os.path.relpath('${CHAKRACORE_DIR}', '$BUILD_DIRECTORY')")
+
+################# Write-barrier check/analyze run #################
+WB_FLAG=
+WB_TARGET=
+
+if [[ $WB_CHECK || $WB_ANALYZE ]]; then
+ # build software write barrier checker clang plugin
+ $CHAKRACORE_DIR/tools/RecyclerChecker/build.sh --cxx=$_CXX || exit 1
+
+ if [[ $WB_CHECK && $WB_ANALYZE ]]; then
+ echo "Please run only one of --wb-check or --wb-analyze" && exit 1
+ fi
+ if [[ $WB_CHECK ]]; then
+ WB_FLAG="-DWB_CHECK_SH=1"
+ WB_FILE=$WB_CHECK
+ fi
+ if [[ $WB_ANALYZE ]]; then
+ WB_FLAG="-DWB_ANALYZE_SH=1"
+ WB_FILE=$WB_ANALYZE
+ fi
+
+ if [[ $WB_ARGS ]]; then
+ if [[ $WB_ARGS =~ "-fix" ]]; then
+ MULTICORE_BUILD="-j 1" # 1 job only if doing write barrier fix
+ fi
+ WB_ARGS="-DWB_ARGS_SH=$WB_ARGS"
+ fi
+
+ # support --wb-check ONE_CPP_FILE
+ if [[ $WB_FILE != "*" ]]; then
+ if [[ $MAKE != 'ninja' ]]; then
+ echo "--wb-check/wb-analyze ONE_FILE only works with --ninja" && exit 1
+ fi
+
+ if [[ -f $CHAKRACORE_DIR/$WB_FILE ]]; then
+ touch $CHAKRACORE_DIR/$WB_FILE
+ else
+ echo "$CHAKRACORE_DIR/$WB_FILE not found. Please use full git path for $WB_FILE." && exit 1
+ fi
+
+ WB_FILE_DIR=`dirname $WB_FILE`
+ WB_FILE_BASE=`basename $WB_FILE`
+
+ WB_FILE_CMAKELISTS="$CHAKRACORE_DIR/$WB_FILE_DIR/CMakeLists.txt"
+ if [[ -f $WB_FILE_CMAKELISTS ]]; then
+ SUBDIR=$(grep -i add_library $WB_FILE_CMAKELISTS | sed "s/.*(\([^ ]*\) .*/\1/")
+ else
+ echo "$WB_FILE_CMAKELISTS not found." && exit 1
+ fi
+ WB_TARGET="$WB_FILE_DIR/CMakeFiles/$SUBDIR.dir/$WB_FILE_BASE.o"
+ fi
+fi
+
+# prepare DbgController.js.h
+CH_DIR="${CHAKRACORE_DIR}/bin/ch"
+"${CH_DIR}/jstoc.py" "${CH_DIR}/DbgController.js" controllerScript
+if [[ $? != 0 ]]; then
+ exit 1
+fi
+
+if [ ! -d "$BUILD_DIRECTORY" ]; then
+ SAFE_RUN `mkdir -p $BUILD_DIRECTORY`
+fi
+pushd $BUILD_DIRECTORY > /dev/null
+
+if [[ $ARCH =~ "x86" ]]; then
+ ARCH="-DCC_TARGETS_X86_SH=1"
+ echo "Compile Target : x86"
+elif [[ $ARCH =~ "arm" ]]; then
+ ARCH="-DCC_TARGETS_ARM_SH=1"
+ echo "Compile Target : arm"
+elif [[ $ARCH =~ "amd64" ]]; then
+ ARCH="-DCC_TARGETS_AMD64_SH=1"
+ echo "Compile Target : amd64"
+else
+ echo "Compile Target : System Default"
+fi
+
+echo Generating $BUILD_TYPE makefiles
+echo $EXTRA_DEFINES
+cmake $CMAKE_GEN $CC_PREFIX $ICU_PATH $LTO $STATIC_LIBRARY $ARCH $TARGET_OS \
+ $ENABLE_CC_XPLAT_TRACE $EXTRA_DEFINES -DCMAKE_BUILD_TYPE=$BUILD_TYPE $SANITIZE $NO_JIT $INTL_ICU \
+ $WITHOUT_FEATURES $WB_FLAG $WB_ARGS $CMAKE_EXPORT_COMPILE_COMMANDS $LIBS_ONLY_BUILD\
+ $VALGRIND $BUILD_RELATIVE_DIRECTORY
+
+_RET=$?
+if [[ $? == 0 ]]; then
+ if [[ $MAKE != 0 ]]; then
+ if [[ $MAKE != 'ninja' ]]; then
+ # $MFLAGS comes from host `make` process. Sub `make` process needs this (recursional make runs)
+ TEST_MFLAGS="${MFLAGS}*!"
+ if [[ $TEST_MFLAGS != "*!" ]]; then
+ # Get -j flag from the host
+ MULTICORE_BUILD=""
+ fi
+ $MAKE $MFLAGS $MULTICORE_BUILD $_VERBOSE $WB_TARGET 2>&1 | tee build.log
+ else
+ $MAKE $MULTICORE_BUILD $_VERBOSE $WB_TARGET 2>&1 | tee build.log
+ fi
+ _RET=${PIPESTATUS[0]}
+ else
+ echo "Visit given folder above for xcode project file ----^"
+ fi
+fi
+
+if [[ $_RET != 0 ]]; then
+ echo "See error details above. Exit code was $_RET"
+else
+ if [[ $CREATE_DEB != 0 ]]; then
+ DEB_FOLDER=`realpath .`
+ DEB_FOLDER="${DEB_FOLDER}/chakracore_${CREATE_DEB}"
+
+ mkdir -p $DEB_FOLDER/usr/local/bin
+ mkdir -p $DEB_FOLDER/DEBIAN
+ cp $DEB_FOLDER/../ch $DEB_FOLDER/usr/local/bin/
+ if [[ $STATIC_LIBRARY == "-DSHARED_LIBRARY_SH=1" ]]; then
+ cp $DEB_FOLDER/../*.so $DEB_FOLDER/usr/local/bin/
+ fi
+ echo -e "Package: ChakraCore"\
+ "\nVersion: ${CREATE_DEB}"\
+ "\nSection: base"\
+ "\nPriority: optional"\
+ "\nArchitecture: amd64"\
+ "\nDepends: libc6 (>= 2.19), uuid-dev (>> 0), libicu-dev (>> 0)"\
+ "\nMaintainer: ChakraCore "\
+ "\nDescription: Chakra Core"\
+ "\n Open source Core of Chakra Javascript Engine"\
+ > $DEB_FOLDER/DEBIAN/control
+
+ dpkg-deb --build $DEB_FOLDER
+ _RET=$?
+ if [[ $_RET == 0 ]]; then
+ echo ".deb package is available under $BUILD_DIRECTORY"
+ fi
+ fi
+fi
+
+popd > /dev/null
+exit $_RET
diff --git a/deps/chakrashim/core/jenkins/check_eol.sh b/deps/chakrashim/core/jenkins/check_eol.sh
index 4c06a8860ed..ee3024fe394 100644
--- a/deps/chakrashim/core/jenkins/check_eol.sh
+++ b/deps/chakrashim/core/jenkins/check_eol.sh
@@ -1,27 +1,27 @@
-#-------------------------------------------------------------------------------------------------------
-# Copyright (C) Microsoft. All rights reserved.
-# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-#-------------------------------------------------------------------------------------------------------
-
-# Need to make sure that the reference to origin/master is available.
-# We know that HEAD is checked out so that the tests on that source can be run.
-
-# configure the sh environment to run scripts from the bin dir in case that's missing
-ls &> /dev/null # checking for ls script on the path
-if [ $? -ne 0 ]; then
- PATH=/bin:/usr/bin:$PATH
-fi
-
-ERRFILE=check_eol.sh.err
-rm -f $ERRFILE
-
-git diff --name-only `git merge-base origin/master HEAD` HEAD | grep -v -E "(test/.*\\.js|\\.cmd|\\.baseline|\\.wasm|\\.vcxproj|\\.vcproj|\\.sln)" | xargs -I % ./jenkins/check_file_eol.sh %
-
-if [ -e $ERRFILE ]; then # if error file exists then there were errors
- >&2 echo "--------------" # leading >&2 means echo to stderr
- >&2 echo "--- ERRORS ---"
- cat $ERRFILE 1>&2 # send output to stderr so it can be redirected as error if desired
- exit 1 # tell the caller there was an error (so Jenkins will fail the CI task)
-else
- echo "--- NO PROBLEMS DETECTED ---"
-fi
+#-------------------------------------------------------------------------------------------------------
+# Copyright (C) Microsoft. All rights reserved.
+# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+#-------------------------------------------------------------------------------------------------------
+
+# Need to make sure that the reference to origin/master is available.
+# We know that HEAD is checked out so that the tests on that source can be run.
+
+# configure the sh environment to run scripts from the bin dir in case that's missing
+ls &> /dev/null # checking for ls script on the path
+if [ $? -ne 0 ]; then
+ PATH=/bin:/usr/bin:$PATH
+fi
+
+ERRFILE=check_eol.sh.err
+rm -f $ERRFILE
+
+git diff --name-only `git merge-base origin/master HEAD` HEAD | grep -v -E "(test/.*\\.js|\\.cmd|\\.baseline|\\.wasm|\\.vcxproj|\\.vcproj|\\.sln)" | xargs -I % ./jenkins/check_file_eol.sh %
+
+if [ -e $ERRFILE ]; then # if error file exists then there were errors
+ >&2 echo "--------------" # leading >&2 means echo to stderr
+ >&2 echo "--- ERRORS ---"
+ cat $ERRFILE 1>&2 # send output to stderr so it can be redirected as error if desired
+ exit 1 # tell the caller there was an error (so Jenkins will fail the CI task)
+else
+ echo "--- NO PROBLEMS DETECTED ---"
+fi
diff --git a/deps/chakrashim/core/lib/Runtime/Library/InJavascript/Intl.js b/deps/chakrashim/core/lib/Runtime/Library/InJavascript/Intl.js
index 2c6c6508279..48364401a97 100644
--- a/deps/chakrashim/core/lib/Runtime/Library/InJavascript/Intl.js
+++ b/deps/chakrashim/core/lib/Runtime/Library/InJavascript/Intl.js
@@ -1,1774 +1,1774 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-"use strict";
-// Core intl lib
-(function (EngineInterface, InitType) {
- var platform = EngineInterface.Intl;
-
- // allow unit tests to disable caching behavior for testing convenience but have this always `true` in real scenarios
- platform.useCaches = true;
-
- if (platform.localeLookupCache === undefined) {
- platform.localeLookupCache = new platform.Map();
- }
- if (platform.localeBestFitCache === undefined) {
- platform.localeBestFitCache = new platform.Map();
- }
-
- // determine what backing library we are using
- // making these vars in JS allows us to more change how we
- // determine the backing library
- let isPlatformUsingICU = !platform.winglob;
- let isPlatformUsingWinGlob = platform.winglob;
-
- // constants
- const NOT_FOUND = "NOT_FOUND";
-
- // Built-Ins
- var setPrototype = platform.builtInSetPrototype;
- var getArrayLength = platform.builtInGetArrayLength;
- var callInstanceFunc = platform.builtInCallInstanceFunction;
-
- var Boolean = platform.Boolean;
- var Object = platform.Object;
- var RegExp = platform.RegExp;
- var Number = platform.Number;
- var String = platform.String;
- var Date = platform.Date;
- var Error = platform.Error;
- var Map = platform.Map;
-
- var RaiseAssert = platform.raiseAssert;
-
- var Math = setPrototype({
- abs: platform.builtInMathAbs,
- floor: platform.builtInMathFloor,
- max: platform.builtInMathMax,
- pow: platform.builtInMathPow
- }, null);
-
- var ObjectGetPrototypeOf = platform.builtInJavascriptObjectEntryGetPrototypeOf;
- var ObjectIsExtensible = platform.builtInJavascriptObjectEntryIsExtensible;
- var ObjectGetOwnPropertyNames = platform.builtInJavascriptObjectEntryGetOwnPropertyNames;
- var ObjectInstanceHasOwnProperty = platform.builtInJavascriptObjectEntryHasOwnProperty;
- // Because we don't keep track of the attributes object, and neither does the internals of Object.defineProperty;
- // We don't need to restore it's prototype.
- var _objectDefineProperty = platform.builtInJavascriptObjectEntryDefineProperty;
- var ObjectDefineProperty = function (obj, prop, attributes) {
- _objectDefineProperty(obj, prop, setPrototype(attributes, null));
- };
-
- var ArrayInstanceForEach = platform.builtInJavascriptArrayEntryForEach;
- var ArrayInstanceIndexOf = platform.builtInJavascriptArrayEntryIndexOf;
- var ArrayInstancePush = platform.builtInJavascriptArrayEntryPush;
- var ArrayInstanceJoin = platform.builtInJavascriptArrayEntryJoin;
-
- var FunctionInstanceBind = platform.builtInJavascriptFunctionEntryBind;
- var DateInstanceGetDate = platform.builtInJavascriptDateEntryGetDate;
- var DateNow = platform.builtInJavascriptDateEntryNow;
-
- var StringInstanceReplace = platform.builtInJavascriptStringEntryReplace;
- var StringInstanceToLowerCase = platform.builtInJavascriptStringEntryToLowerCase;
- var StringInstanceToUpperCase = platform.builtInJavascriptStringEntryToUpperCase;
-
- var ObjectPrototype = ObjectGetPrototypeOf({});
-
- var isFinite = platform.builtInGlobalObjectEntryIsFinite;
- var isNaN = platform.builtInGlobalObjectEntryIsNaN;
-
- let __defaultLocale = undefined;
- const GetDefaultLocale = function () {
- if (__defaultLocale && platform.useCaches) {
- return __defaultLocale;
- }
-
- const locale = platform.getDefaultLocale();
- if (!locale) {
- // if the system locale is undefined/null/empty string, we have to
- // do something or else we will crash
- __defaultLocale = "en";
- } else {
- __defaultLocale = locale;
- }
-
- return __defaultLocale;
- };
-
- let CacheNumberFormat = function (numberFormat) {
- let retVal = platform.cacheNumberFormat(numberFormat);
- if (retVal === null) {
- // TODO (doilij): remove this fallback when implemented under ICU
- numberFormat.__numberingSystem = "";
- }
- // no return value
- };
-
- let CreateDateTimeFormat = function (dateTimeFormat, condition) {
- let retVal = platform.createDateTimeFormat(dateTimeFormat, condition);
- if (retVal === null) {
- // TODO (doilij): remove this fallback when implemented under ICU
- dateTimeFormat.__numberingSystem = "";
- dateTimeFormat.__patternStrings = [
- "{month.a}{day.b}{hour.c}{minute.d}{second.e}",
- "" // another entry for fun
- ]
- }
- // no return value
- };
-
- let IsWellFormedLanguageTag = function (langTag) {
- let retVal = platform.isWellFormedLanguageTag(langTag);
- if (retVal === null) {
- if (!LANG_TAG_RE) {
- InitializeLangTagREs();
- }
- let match = platform.builtInRegexMatch(langTag, LANG_TAG_RE);
- return !!match;
- } else {
- return retVal;
- }
- };
-
- var forEachIfPresent = function (obj, length, func) {
- let current = 0;
- while (current < length) {
- if (current in obj) {
- func(obj[current]);
- }
- current++;
- }
- };
-
- // A helper function that is meant to rethrow SOE and OOM exceptions allowing them to propagate.
- var throwExIfOOMOrSOE = function (ex) {
- if (ex.number === -2146828260 || ex.number === -2146828281) {
- throw ex;
- }
- };
-
- var tagPublicFunction = function (name, f) {
- return platform.tagPublicLibraryCode(f, name);
- };
-
- var resolveLocaleBestFit = function (locale, defaultLocale) {
- var resolvedLocale = platform.localeBestFitCache.get(locale);
- if (resolvedLocale === undefined) {
- resolvedLocale = platform.resolveLocaleBestFit(locale);
- if (resolvedLocale === null) {
- if (!LANG_TAG_BASE_RE) {
- InitializeLangTagREs();
- }
- let match = platform.builtInRegexMatch(locale, LANG_TAG_BASE_RE);
- resolvedLocale = match[1] + (match[2] ? ('-' + match[2]) : '') + (match[3] ? ('-' + match[3]) : '');
- }
- // If resolvedLocale is undefined, cache that we got undefined
- // so we don't try to resolve for `locale` in future.
- platform.localeBestFitCache.set(locale, resolvedLocale === undefined ? NOT_FOUND : resolvedLocale);
- } else if (resolvedLocale === NOT_FOUND) {
- resolvedLocale = undefined;
- }
-
- if (defaultLocale === locale) {
- return resolvedLocale;
- } else if (defaultLocale === resolvedLocale) {
- return undefined;
- } else {
- return resolvedLocale;
- }
- }
-
- var resolveLocaleLookup = function (localeWithoutSubtags) {
- let resolvedLocale = platform.localeLookupCache.get(localeWithoutSubtags);
- if (resolvedLocale === undefined) {
- resolvedLocale = platform.resolveLocaleLookup(localeWithoutSubtags);
- if (resolvedLocale === null) {
- if (!LANG_TAG_BASE_RE) {
- InitializeLangTagREs();
- }
- let match = platform.builtInRegexMatch(localeWithoutSubtags, LANG_TAG_BASE_RE);
- // match: [1] language; [2] script; [3] region (e.g. en-Latn-US)
- resolvedLocale = match[1]
- + (match[2] ? ('-' + match[2]) : '')
- + (match[3] ? ('-' + match[3]) : '');
- }
- // If resolvedLocale is undefined, cache that we got undefined
- // so we don't try to resolve for `locale` in future.
- platform.localeLookupCache.set(localeWithoutSubtags, resolvedLocale === undefined ? NOT_FOUND : resolvedLocale);
- } else if (resolvedLocale === NOT_FOUND) {
- resolvedLocale = undefined;
- }
- return resolvedLocale;
- }
-
- var getExtensionSubtags = function (locale) {
- if (!LANG_TAG_EXT_RE) {
- InitializeLangTagREs();
- }
-
- const match = platform.builtInRegexMatch(locale, LANG_TAG_EXT_RE);
- if (!match) {
- return undefined;
- }
-
- // Note: extensions are /((${extension})-)*/ and are made up of \\b(?:${singleton}(?:-${alphanum}{2,8})+)\\b
- // where the ${alphanum}{2,8} fields are of the form `${key}-${value}`.
- // TODO (doilij): return an array of `${key}-${value}` pairs
-
- // REVIEW (doilij): leading - might mean we need to filter: // ss.match(rr)[4].split('-').filter((x)=>!!x)
- // In that case:
- // TODO StringInstanceSplit
- // TODO ArrayInstanceFilter
- // let extSubtags = ArrayInstanceFilter(extensionsString.split('-'), (x)=>!!x);
- const extSubtags = match[0].split('-').filter((x) => !!x);
- // REVIEW (doilij): performance (testing for str[0]==='-' and using the string after that or updating the regex might be faster)
-
- return extSubtags;
- }
-
- var resolveLocaleHelper = function (locale, fitter, extensionFilter, defaultLocale) {
- var subTags = platform.getExtensions(locale);
- if (subTags === null) {
- // platform.getExtensions returns null to indicate fallback to JS implementation
- subTags = getExtensionSubtags(locale);
- }
-
- if (subTags) {
- callInstanceFunc(ArrayInstanceForEach, subTags, function (subTag) {
- locale = callInstanceFunc(StringInstanceReplace, locale, "-" + subTag, "");
- });
- }
-
- // Instead of using replace, we will match two groups, one capturing, one not. The non capturing group just strips away -u if present.
- // We are substituting for the function replace; which will only make a change if /-u$/ was found (-u at the end of the line)
- // And because match will return null if we don't match entire sequence, we are using the two groups stated above.
- locale = platform.builtInRegexMatch(locale, /(.*?)(?:-u)?$/)[1];
- var resolved = fitter(locale, defaultLocale);
-
- if (extensionFilter !== undefined) { // Filter to expected sub-tags
- var filtered = [];
- callInstanceFunc(ArrayInstanceForEach, subTags, (function (subTag) {
- var parts = platform.builtInRegexMatch(subTag, /([^-]*)-?(.*)?/); // [0] entire thing; [1] key; [2] value
- var key = parts[1];
- if (callInstanceFunc(ArrayInstanceIndexOf, extensionFilter, key) !== -1) {
- callInstanceFunc(ArrayInstancePush, filtered, subTag);
- }
- }));
- subTags = filtered;
- }
-
- // As long as we are using the JS version of getExtensions on ICU, "u" will be considered an extension
- // of a locale like "de-u-co-phonebk"
- // Thus, we can't add the -u- ourselves here
- const withoutSubTags = resolved;
- if (resolved) {
- if (subTags && getArrayLength(subTags) > 0) {
- if (isPlatformUsingICU) {
- resolved += "-";
- } else {
- resolved += "-u-";
- }
- }
-
- resolved += callInstanceFunc(ArrayInstanceJoin, subTags, "-");
- } else {
- resolved = undefined;
- }
-
- return setPrototype({
- locale: resolved,
- subTags: subTags,
- localeWithoutSubtags: withoutSubTags
- }, null);
- }
-
- var resolveLocales = function (givenLocales, matcher, extensionFilter, defaultLocaleFunc) {
- var fitter = matcher === "lookup" ? resolveLocaleLookup : resolveLocaleBestFit;
- var length = getArrayLength(givenLocales);
-
- var defaultLocale = defaultLocaleFunc();
-
- length = length !== undefined ? length : 0;
- for (var i = 0; i < length; i++) {
- var resolved = resolveLocaleHelper(givenLocales[i], fitter, extensionFilter, defaultLocale);
- if (resolved.locale !== undefined) {
- return resolved;
- }
- }
- return resolveLocaleHelper(defaultLocale, fitter, undefined, defaultLocale);
- }
-
- // get just the language-script-region from the default locale
- let __strippedDefaultLocale = undefined;
- var strippedDefaultLocale = function () {
- if (__strippedDefaultLocale) {
- return __strippedDefaultLocale;
- }
-
- if (isPlatformUsingICU) {
- if (!LANG_TAG_BASE_RE) {
- InitializeLangTagREs();
- }
-
- const def = GetDefaultLocale();
- const match = platform.builtInRegexMatch(def, LANG_TAG_BASE_RE);
- if (match) {
- // strip extensions by matching only the base
- __strippedDefaultLocale = match[0];
- } else {
- __strippedDefaultLocale = def;
- }
- } else {
- // the only thing to strip off of a WinGlob locale is the collation,
- // which comes after the underscore
- __strippedDefaultLocale = platform.builtInRegexMatch(GetDefaultLocale(), /([^_]*).*/)[1];
- }
-
- return __strippedDefaultLocale;
- };
-
- var Internal = (function () {
- return setPrototype({
- ToObject: function (o) {
- if (o === null) {
- platform.raiseNeedObject();
- }
- return o !== undefined ? Object(o) : undefined;
- },
-
- ToString: function (s) {
- return s !== undefined ? String(s) : undefined;
- },
-
- ToNumber: function (n) {
- return n === undefined ? NaN : Number(n);
- },
-
- ToLogicalBoolean: function (v) {
- return v !== undefined ? Boolean(v) : undefined;
- },
-
- ToUint32: function (n) {
- var num = Number(n),
- ret = 0;
- if (!isNaN(num) && isFinite(num)) {
- ret = Math.abs(num % Math.pow(2, 32));
- }
- return ret;
- },
-
- HasProperty: function (o, p) {
- // Walk the prototype chain
- while (o) {
- if (callInstanceFunc(ObjectInstanceHasOwnProperty, o, p)) {
- return true;
- }
- o = ObjectGetPrototypeOf(o);
- }
- }
- }, null)
- })();
-
- // Internal ops implemented in JS:
- function GetOption(options, property, type, values, fallback) {
- let value = options[property];
-
- if (value !== undefined) {
- if (type == "boolean") {
- value = Internal.ToLogicalBoolean(value);
- }
-
- if (type == "string") {
- value = Internal.ToString(value);
- }
-
- if (type == "number") {
- value = Internal.ToNumber(value);
- }
-
- if (values !== undefined && callInstanceFunc(ArrayInstanceIndexOf, values, value) == -1) {
- platform.raiseOptionValueOutOfRange_3(String(value), String(property), "['" + callInstanceFunc(ArrayInstanceJoin, values, "', '") + "']");
- }
-
- return value;
- }
-
- return fallback;
- }
-
- function GetNumberOption(options, property, minimum, maximum, fallback) {
- const rawValue = options[property];
-
- if (typeof rawValue !== 'undefined') {
- const formattedValue = Internal.ToNumber(rawValue);
-
- if (isNaN(formattedValue) || formattedValue < minimum || formattedValue > maximum) {
- platform.raiseOptionValueOutOfRange_3(String(rawValue), String(property), "[" + minimum + " - " + maximum + "]");
- }
-
- return Math.floor(formattedValue);
- } else {
- return fallback;
- }
- }
-
- let CURRENCY_CODE_RE;
- function InitializeCurrencyRegExp() {
- CURRENCY_CODE_RE = /^[A-Z]{3}$/i;
- }
-
- let LANG_TAG_BASE_RE; // language[-script[-region]]
- let LANG_TAG_EXT_RE; // extension part (variant, extension, privateuse)
- let LANG_TAG_RE; // full syntax of language tags (including privateuse and grandfathered)
- function InitializeLangTagREs() {
- // Language Tag Syntax as described in RFC 5646 #section-2.1
- // Note: All language tags are comprised only of ASCII characters (makes our job easy here)
- // Note: Language tags in canonical form have case conventions, but language tags are case-insensitive for our purposes
-
- // Note: The ABNF syntax used in RFC 5646 #section-2.1 uses the following numeric quantifier conventions:
- // - (Parentheses) are used for grouping
- // - PRODUCTION => exactly 1 of PRODUCTION /PRODUCTION/
- // - [PRODUCTION] => 0 or 1 of PRODUCTION /(PRODUCTION)?/
- // - #PRODUCTION => exactly # of PRODUCTION /(PRODUCTION){#}/
- // - a*bPRODUCTION (where a and b are optional)
- // - *PRODUCTION => any number of PRODUCTION /(PRODUCTION)*/
- // - 1*PRODUCTION => 1 or more of PRODUCTION /(PRODUCTION)+/
- // - #*PRODUCTION => # or more of PRODUCTION /(PRODUCTION){#,}/
- // - *#PRODUCTION => 0 to # (inclusive) of PRODUCTION /(PRODUCTION){,#}/ or /(PRODUCTION){0,#}/
- // - a*bPRODUCTION => a to b (inclusive) of PRODUCTION /(PRODUCTION){a,b}/
-
- const ALPHA = "[A-Z]";
- const DIGIT = "[0-9]";
- const alphanum = `(?:${ALPHA}|${DIGIT})`;
-
- const regular = "\\b(?:art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)\\b";
- const irregular = "\\b(?:en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo" +
- "|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)\\b";
- const grandfathered = `\\b(?:${regular}|${irregular})\\b`;
-
- const privateuse = `\\b(?:x(?:-${alphanum}{1,8}\\b)+)\\b`; // privateuse = "x" 1*("-" (1*8alphanum))
- const singleton = `\\b(?:${DIGIT}|[A-WY-Z])\\b`; // singleton ~= alphanum except for 'x' ; (paraphrased)
- const extension = `\\b(?:${singleton}(?:-${alphanum}{2,8})+)\\b`; // extension = singleton 1*("-" (2*8alphanum))
- const variant = `\\b(?:${alphanum}{5,8}|${DIGIT}${alphanum}{3})\\b`; // variant = 5*8alphanum / (DIGIT 3alphanum)
- const region = `\\b(?:${ALPHA}{2}|${DIGIT}{3})\\b`; // region = 2ALPHA / 3DIGIT
-
- const script = `\\b(?:${ALPHA}{4})\\b`; // script = 4ALPHA
- const extlang = `\\b(?:${ALPHA}{3}\\b(?:-${ALPHA}{3}){0,2})\\b`; // extlang = 3ALPHA *2("-" 3ALPHA)
-
- const language = '\\b(?:' + // language =
- `${ALPHA}{2,3}` + // 2*3ALPHA ; shortest ISO 639 code
- `\\b(?:-${extlang})?` + // ["-" extlang] ; sometimes followed by extended language subtags
- // `|${ALPHA}{4}` + // / 4ALPHA ; or reserved for future use
- // `|${ALPHA}{5,8}` + // / 5*8ALPHA ; or registered language subtag
- `|${ALPHA}{4,8}` + // ~/ 4*8ALPHA ; (paraphrased: combined previous two lines)
- ')\\b';
-
- // below: ${language}, ${script}, and ${region} are wrapped in parens because matching groups are useful for replacement
- const LANG_TAG_BASE = `\\b(${language})\\b` + // langtag = language
- `\\b(?:-(${script}))?\\b` + // ["-" script]
- `\\b(?:-(${region}))?\\b` ; // ["-" region]
- const LANG_TAG_EXT = `\\b(?:-${variant})*\\b` + // *("-" variant)
- `\\b((?:-${extension})*)\\b` + // *("-" extension)
- `\\b(?:-${privateuse})?\\b` ; // ["-" privateuse]
- const langtag = `\\b${LANG_TAG_BASE}\\b${LANG_TAG_EXT}\\b`;
-
- const LANG_TAG = `\\b(?:${langtag}|${privateuse}|${grandfathered})\\b`; // Language-Tag = ...
-
- LANG_TAG_BASE_RE = new RegExp(LANG_TAG_BASE, 'i'); // [1] language; [2] script; [3] region
- LANG_TAG_EXT_RE = new RegExp(LANG_TAG_EXT, 'i'); // [1] extensions /((${extension})-)*/
- LANG_TAG_RE = new RegExp(LANG_TAG, 'i'); // [1] language; [2] script; [3] region; [4] extensions
- }
-
- function IsWellFormedCurrencyCode(code) {
- code = Internal.ToString(code);
-
- if (!CURRENCY_CODE_RE) {
- InitializeCurrencyRegExp();
- }
-
- return platform.builtInRegexMatch(code, CURRENCY_CODE_RE) !== null;
- }
-
- // Make sure locales is an array, remove duplicate locales, make sure each locale is valid, and canonicalize each.
- function CanonicalizeLocaleList(locales) {
- if (typeof locales === 'undefined') {
- return [];
- }
-
- if (typeof locales === 'string') {
- locales = [locales];
- }
-
- locales = Internal.ToObject(locales);
- const length = Internal.ToUint32(locales.length);
-
- // TODO: Use sets here to prevent duplicates
- let seen = [];
-
- forEachIfPresent(locales, length, function (locale) {
- if ((typeof locale !== 'string' && typeof locale !== 'object') || locale === null) {
- platform.raiseNeedObjectOrString("Locale");
- }
-
- let tag = Internal.ToString(locale);
-
- if (!IsWellFormedLanguageTag(tag)) {
- platform.raiseLocaleNotWellFormed(String(tag));
- }
-
- tag = platform.normalizeLanguageTag(tag);
-
- if (tag !== undefined && callInstanceFunc(ArrayInstanceIndexOf, seen, tag) === -1) {
- callInstanceFunc(ArrayInstancePush, seen, tag);
- }
- });
-
- return seen;
- }
-
- function LookupSupportedLocales(requestedLocales, fitter, defaultLocale) {
- var subset = [];
- var count = 0;
- callInstanceFunc(ArrayInstanceForEach, requestedLocales, function (locale) {
- try {
- var resolved = resolveLocaleHelper(locale, fitter, undefined, defaultLocale);
- if (resolved.locale) {
- ObjectDefineProperty(subset, count, { value: resolved.locale, writable: false, configurable: false, enumerable: true });
- count = count + 1;
- }
- } catch (ex) {
- throwExIfOOMOrSOE(ex);
- // Expecting an error (other than OOM or SOE), same as fitter returning undefined
- }
- });
- ObjectDefineProperty(subset, "length", { value: count, writable: false, configurable: false });
- return subset;
- }
-
- var supportedLocalesOfWrapper = function (that, functionName, locales, options) {
- if (that === null || that === undefined) {
- platform.raiseNotAConstructor(functionName);
- }
-
- var hiddenObj = platform.getHiddenObject(that);
- if (!hiddenObj || hiddenObj.isValid !== "Valid") {
- platform.raiseNotAConstructor(functionName);
- }
-
- return supportedLocalesOf(locales, options);
- }
-
- var canonicalizeLocaleListWrapper = function (that, functionName, locales) {
- if (that === null || that === undefined) {
- platform.raiseNotAConstructor(functionName);
- }
-
- var hiddenObj = platform.getHiddenObject(that);
- if (!hiddenObj || hiddenObj.isValid !== "Valid") {
- platform.raiseNotAConstructor(functionName);
- }
-
- return CanonicalizeLocaleList(locales);
- }
-
- // Shared among all the constructors
- var supportedLocalesOf = function (locales, options) {
- var matcher;
- locales = CanonicalizeLocaleList(locales);
-
- if (typeof options !== 'undefined') {
- matcher = options.localeMatcher;
-
- if (typeof matcher !== 'undefined') {
- matcher = Internal.ToString(matcher);
-
- if (matcher !== 'lookup' && matcher !== 'best fit') {
- platform.raiseOptionValueOutOfRange_3(String(matcher), "localeMatcher", "['best fit', 'lookup']");
- }
- }
- }
-
- if (typeof matcher === 'undefined' || matcher === 'best fit') {
- return LookupSupportedLocales(locales, resolveLocaleBestFit, platform.normalizeLanguageTag(strippedDefaultLocale()));
- } else {
- return LookupSupportedLocales(locales, resolveLocaleLookup, strippedDefaultLocale());
- }
- };
-
- const intlStaticMethodThisArg = setPrototype({}, null);
- platform.setHiddenObject(intlStaticMethodThisArg, setPrototype({ isValid: "Valid" }, null));
-
- // We wrap these functions so that we can define the correct name for this function for each Intl constructor,
- // which allows us to display the correct error message for each Intl type.
- const collator_supportedLocalesOf_name = "Intl.Collator.supportedLocalesOf";
- const collator_supportedLocalesOf = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(collator_supportedLocalesOf_name,
- function collator_supportedLocalesOf_dummyName(locales) {
- const options = arguments.length < 2 ? undefined : arguments[1];
- return supportedLocalesOfWrapper(this, collator_supportedLocalesOf_name, locales, options);
- }), intlStaticMethodThisArg);
-
- const numberFormat_supportedLocalesOf_name = "Intl.NumberFormat.supportedLocalesOf";
- const numberFormat_supportedLocalesOf = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(numberFormat_supportedLocalesOf_name,
- function numberFormat_supportedLocalesOf_dummyName(locales) {
- const options = arguments.length < 2 ? undefined : arguments[1];
- return supportedLocalesOfWrapper(this, numberFormat_supportedLocalesOf_name, locales, options);
- }), intlStaticMethodThisArg);
-
- const dateTimeFormat_supportedLocalesOf_name = "Intl.DateTimeFormat.supportedLocalesOf";
- const dateTimeFormat_supportedLocalesOf = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(dateTimeFormat_supportedLocalesOf_name,
- function dateTimeFormat_supportedLocalesOf_dummyName(locales) {
- const options = arguments.length < 2 ? undefined : arguments[1];
- return supportedLocalesOfWrapper(this, dateTimeFormat_supportedLocalesOf_name, locales, options);
- }), intlStaticMethodThisArg);
-
- const getCanonicalLocales_name = "Intl.getCanonicalLocales";
- const getCanonicalLocales = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(getCanonicalLocales_name,
- function getCanonicalLocales_dummyName(locales) {
- return canonicalizeLocaleListWrapper(this, getCanonicalLocales_name, locales);
- }), intlStaticMethodThisArg);
-
- // TODO: Bound functions get the "bound" prefix by default, so we need to remove it.
- // When https://github.com/Microsoft/ChakraCore/issues/637 is fixed and we have a way
- // to make built-in functions non-constructible, we can remove the call to
- // Function.prototype.bind (i.e. FunctionInstanceBind) and just rely on tagging instead of setting the "name" manually.
- ObjectDefineProperty(collator_supportedLocalesOf, 'name', { value: 'supportedLocalesOf' });
- ObjectDefineProperty(numberFormat_supportedLocalesOf, 'name', { value: 'supportedLocalesOf' });
- ObjectDefineProperty(dateTimeFormat_supportedLocalesOf, 'name', { value: 'supportedLocalesOf' });
- ObjectDefineProperty(getCanonicalLocales, 'name', { value: 'getCanonicalLocales' });
-
- // If an empty string is encountered for the value of the property; that means that is by default.
- // So in the case of zh-TW; "default" and "stroke" are the same.
- // This list was discussed with AnBorod, AnGlass and SureshJa.
- var localesAcceptingCollationValues = setPrototype({
- "es-ES": setPrototype({ "trad": "tradnl" }, null),
- "lv-LV": setPrototype({ "trad": "tradnl" }, null),
- "de-DE": setPrototype({ "phonebk": "phoneb" }, null),
- "ja-JP": setPrototype({ "unihan": "radstr" }, null),
- // We believe "pronun" means "pronunciation"
- "zh-TW": setPrototype({ "phonetic": "pronun", "unihan": "radstr", "stroke": "" }, null),
- "zh-HK": setPrototype({ "unihan": "radstr", "stroke": "" }, null),
- "zh-MO": setPrototype({ "unihan": "radstr", "stroke": "" }, null),
- "zh-CN": setPrototype({ "stroke": "stroke", "pinyin": "" }, null),
- "zh-SG": setPrototype({ "stroke": "stroke", "pinyin": "" }, null)
-
- // The following locales are supported by Windows; however, no BCP47 equivalent collation values were found for these.
- // In future releases; this list (plus most of the Collator implementation) will be changed/removed as the platform support is expected to change.
- // "hu-HU": ["technl"],
- // "ka-GE": ["modern"],
- // "x-IV": ["mathan"]
- }, null);
-
- // reverses the keys and values in each locale's sub-object in localesAcceptingCollationValues
- // localesAcceptingCollationValues[locale][key] = value -> reverseLocalesAcceptingCollationValues[locale][value] = key
- var reverseLocalesAcceptingCollationValues = (function () {
- const toReturn = setPrototype({}, null);
- callInstanceFunc(ArrayInstanceForEach, ObjectGetOwnPropertyNames(localesAcceptingCollationValues), function (locale) {
- const collationValuesForLocale = localesAcceptingCollationValues[locale];
- const reversedCollationValues = setPrototype({}, null);
-
- callInstanceFunc(ArrayInstanceForEach, ObjectGetOwnPropertyNames(collationValuesForLocale), function (collation) {
- const windowsTag = collationValuesForLocale[collation];
- if (windowsTag !== "") {
- reversedCollationValues[windowsTag] = collation;
- }
- });
-
- toReturn[locale] = reversedCollationValues;
- });
- return toReturn;
- }());
-
- // mappedDefaultLocale will get the default locale and update any deprecated
- // collation/sort order values it may use
- let __mappedDefaultLocale = undefined;
- var mappedDefaultLocale = function () {
- if (__mappedDefaultLocale && platform.useCaches) {
- return __mappedDefaultLocale;
- }
-
- let locale = undefined;
- let collation = undefined;
- if (isPlatformUsingICU) {
- // ICU's getDefaultLocale() will return a valid BCP-47/RFC 5646 langtag
- locale = GetDefaultLocale();
- const match = platform.builtInRegexMatch(locale, /-u(?:-[^\-][^\-]?-[^\-]+)*-co-([^\-]+).*/);
- if (match) {
- // if the system default locale had a collation, strip it for now
- // we will add the collation back later in this function
- collation = match[1];
- locale = callInstanceFunc(StringInstanceReplace, locale, `-co-${collation}`, "");
- }
- } else {
- // Windows' getDefaultLocale() will return a RFC4646 langtag
- const parts = platform.builtInRegexMatch(GetDefaultLocale(), /([^_]*)_?(.+)?/);
- locale = parts[1];
- collation = parts[2];
- }
-
- if (collation === undefined) {
- __mappedDefaultLocale = locale;
- return __mappedDefaultLocale;
- }
-
- // we stripped the -co-collation or _collation above, so this function adds it back
- const createLocaleCollationString = function (finalLocale, finalCollation) {
- if (isPlatformUsingICU) {
- return `${finalLocale}-co-${finalCollation}`;
- } else {
- return `${finalLocale}-u-co-${finalCollation}`;
- }
- };
-
- const collationMapForLocale = reverseLocalesAcceptingCollationValues[locale];
- if (collationMapForLocale === undefined) {
- // Assume the system wouldn't give us back a bad collation value
- __mappedDefaultLocale = createLocaleCollationString(locale, collation);
- return __mappedDefaultLocale;
- }
-
- const mappedCollation = collationMapForLocale[collation];
- if (mappedCollation !== undefined) {
- __mappedDefaultLocale = createLocaleCollationString(locale, mappedCollation);
- } else {
- __mappedDefaultLocale = createLocaleCollationString(locale, collation);
- }
-
- return __mappedDefaultLocale;
- };
-
- // Intl.Collator, String.prototype.localeCompare
- var Collator = (function () {
-
- if (InitType === 'Intl' || InitType === 'String') {
-
- function InitializeCollator(collator, localeList, options) {
- if (typeof collator != "object") {
- platform.raiseNeedObject();
- }
-
- if (callInstanceFunc(ObjectInstanceHasOwnProperty, collator, '__initializedIntlObject') && collator.__initializedIntlObject) {
- platform.raiseObjectIsAlreadyInitialized("Collator", "Collator");
- }
-
- collator.__initializedIntlObject = true;
-
- // Extract options
- if (typeof options === 'undefined') {
- options = setPrototype({}, null);
- } else {
- options = Internal.ToObject(options);
- }
-
- var matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
- var usage = GetOption(options, "usage", "string", ["sort", "search"], "sort");
- var sensitivity = GetOption(options, "sensitivity", "string", ["base", "accent", "case", "variant"], undefined);
- var ignorePunctuation = GetOption(options, "ignorePunctuation", "boolean", undefined, false);
- var caseFirst = GetOption(options, "caseFirst", "string", ["upper", "lower", "false"], undefined);
- var numeric = GetOption(options, "numeric", "boolean", [true, false], undefined);
-
- // Deal with the locales and extensions
- localeList = CanonicalizeLocaleList(localeList);
- var resolvedLocaleInfo = resolveLocales(localeList, matcher, undefined, mappedDefaultLocale);
-
- var collation = "default";
- var resolvedLocaleLookup = resolveLocaleLookup(resolvedLocaleInfo.localeWithoutSubtags);
- var collationAugmentedLocale = resolvedLocaleLookup;
-
- if (resolvedLocaleInfo.subTags) {
- callInstanceFunc(ArrayInstanceForEach, resolvedLocaleInfo.subTags, function (subTag) {
- var parts = platform.builtInRegexMatch(subTag, /([^-]*)-?(.*)?/); // [0] entire thing; [1] key; [2] value
- var key = parts[1];
- var value = parts[2] === "" ? undefined : parts[2];
- if (key === "kf" && caseFirst === undefined) {
- caseFirst = GetOption(setPrototype({ caseFirst: value }, null), "caseFirst", "string", ["upper", "lower", "false"], undefined);
- } else if (key === "kn" && numeric === undefined) {
- if (value !== undefined) {
- numeric = Internal.ToLogicalBoolean(callInstanceFunc(StringInstanceToLowerCase, value) === "true");
- } else {
- numeric = true;
- }
- } else if (key === "co" && value !== undefined && value !== "default" && value !== "search" && value !== "sort" && value !== "standard") {
- // Ignore these collation values as they shouldn't have any impact
- collation = value;
- }
- });
- }
- if (collation !== "default") {
- var accepedCollationForLocale = localesAcceptingCollationValues[collationAugmentedLocale];
- var windowsCollation = "";
- if (accepedCollationForLocale !== undefined && (windowsCollation = accepedCollationForLocale[collation]) !== undefined) {
- if (windowsCollation !== "") {
- collationAugmentedLocale = collationAugmentedLocale + "_" + windowsCollation;
- }
- }
- else {
- collation = "default";
- }
- }
-
- // Correct options if need be.
- if (caseFirst === undefined) {
- try {
- var num = platform.compareString('A', 'a', resolvedLocaleLookup, undefined, undefined, undefined);
- } catch (e) {
- // Rethrow OOM or SOE
- throwExIfOOMOrSOE(e);
-
- // Otherwise, Generic message to cover the exception throw from the CompareStringEx api.
- // The platform's exception is also generic and in most if not all cases specifies that "a" argument is invalid.
- // We have no other information from the platform on the cause of the exception.
- platform.raiseOptionValueOutOfRange();
- }
-
- if (num === 0) {
- caseFirst = 'false';
- } else if (num === -1) {
- caseFirst = 'upper';
- } else {
- caseFirst = 'lower';
- }
- }
-
- if (sensitivity === undefined) {
- sensitivity = "variant";
- }
-
- if (numeric === undefined) {
- numeric = false;
- }
-
- // Set the options on the object
- collator.__matcher = matcher;
- collator.__locale = resolvedLocaleInfo.localeWithoutSubtags;
- collator.__localeForCompare = collationAugmentedLocale;
- collator.__usage = usage;
- collator.__sensitivity = sensitivity;
- collator.__ignorePunctuation = ignorePunctuation;
- collator.__caseFirst = caseFirst;
- collator.__numeric = numeric;
- collator.__collation = collation;
- collator.__initializedCollator = true;
- }
-
- platform.registerBuiltInFunction(tagPublicFunction("String.prototype.localeCompare", function () {
- var that = arguments[0];
- if (this === undefined || this === null) {
- platform.raiseThis_NullOrUndefined("String.prototype.localeCompare");
- }
- else if (that === null) {
- platform.raiseNeedObject();
- }
- // ToString must be called on this/that argument before we do any other operation, as other operations in InitializeCollator may also be observable
- var thisArg = String(this);
- var that = String(that);
- var stateObject = setPrototype({}, null);
- InitializeCollator(stateObject, arguments[1], arguments[2]);
- return Number(platform.compareString(thisArg, that, stateObject.__localeForCompare, stateObject.__sensitivity, stateObject.__ignorePunctuation, stateObject.__numeric));
- }), 4);
-
- if (InitType === 'Intl') {
-
- function Collator() {
- // The function should have length of 0, hence we are getting arguments this way.
- // While it's true that we could just do e.g. arguments[0] and get undefined if it is not present,
- // that makes assumptions that the JIT must check. This pattern is marginally more efficient.
- var locales = undefined;
- var options = undefined;
- if (arguments.length >= 1) locales = arguments[0];
- if (arguments.length >= 2) options = arguments[1];
-
- if (this === Intl || this === undefined) {
- return new Collator(locales, options);
- }
-
- var obj = Internal.ToObject(this);
- if (!ObjectIsExtensible(obj)) {
- platform.raiseObjectIsNonExtensible("Collator");
- }
-
- // Use the hidden object to store data
- var hiddenObject = platform.getHiddenObject(obj);
-
- if (hiddenObject === undefined) {
- hiddenObject = setPrototype({}, null);
- platform.setHiddenObject(obj, hiddenObject);
- }
-
- InitializeCollator(hiddenObject, locales, options);
-
- // Add the bound compare
- hiddenObject.__boundCompare = callInstanceFunc(FunctionInstanceBind, compare, obj);
- delete hiddenObject.__boundCompare.name;
- return obj;
- }
- tagPublicFunction("Intl.Collator", Collator);
-
- function compare(a, b) {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
- }
-
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedCollator) {
- platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
- }
-
- a = String(a);
- b = String(b);
-
- return Number(platform.compareString(a, b, hiddenObject.__localeForCompare, hiddenObject.__sensitivity, hiddenObject.__ignorePunctuation, hiddenObject.__numeric));
- }
- tagPublicFunction("Intl.Collator.prototype.compare", compare);
-
- ObjectDefineProperty(Collator, 'supportedLocalesOf', { value: collator_supportedLocalesOf, writable: true, configurable: true });
-
- ObjectDefineProperty(Collator, 'prototype', { value: new Collator(), writable: false, enumerable: false, configurable: false });
- setPrototype(Collator.prototype, Object.prototype);
-
- ObjectDefineProperty(Collator.prototype, 'constructor', { value: Collator, writable: true, enumerable: false, configurable: true });
-
- ObjectDefineProperty(Collator.prototype, 'resolvedOptions', {
- value: function resolvedOptions() {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("Collator.prototype.resolvedOptions", "Collator");
- }
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedCollator) {
- platform.raiseNeedObjectOfType("Collator.prototype.resolvedOptions", "Collator");
- }
-
- return {
- locale: hiddenObject.__locale,
- usage: hiddenObject.__usage,
- sensitivity: hiddenObject.__sensitivity,
- ignorePunctuation: hiddenObject.__ignorePunctuation,
- collation: hiddenObject.__collation, // "co" unicode extension
- numeric: hiddenObject.__numeric, // "ka" unicode extension TODO: Determine if this is supported (doesn't have to be)
- caseFirst: hiddenObject.__caseFirst // "kf" unicode extension TODO: Determine if this is supported (doesn't have to be)
- }
- }, writable: true, enumerable: false, configurable: true
- });
-
- ObjectDefineProperty(Collator.prototype, 'compare', {
- get: tagPublicFunction('get compare', function () {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
- }
-
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedCollator) {
- platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
- }
-
- return hiddenObject.__boundCompare;
- }), enumerable: false, configurable: true
- });
-
- return Collator;
- }
- }
- // 'Init.Collator' not defined if reached here. Return 'undefined'
- return undefined;
- })();
-
- // Intl.NumberFormat, Number.prototype.toLocaleString
- var NumberFormat = (function () {
- // Keep these "enums" in sync with lib/Runtime/PlatformAgnostic/Intl.h
- const NumberFormatStyle = setPrototype({
- DEFAULT: 0, // "decimal" is the default
- DECIMAL: 0, // Intl.NumberFormat(locale, { style: "decimal" }); // aka in our code as "number"
- PERCENT: 1, // Intl.NumberFormat(locale, { style: "percent" });
- CURRENCY: 2, // Intl.NumberFormat(locale, { style: "currency", ... });
- MAX: 3
- }, null);
- const NumberFormatCurrencyDisplay = setPrototype({
- DEFAULT: 0, // "symbol" is the default
- SYMBOL: 0, // Intl.NumberFormat(locale, { style: "currency", currencyDisplay: "symbol" }); // e.g. "$" or "US$" depeding on locale
- CODE: 1, // Intl.NumberFormat(locale, { style: "currency", currencyDisplay: "code" }); // e.g. "USD"
- NAME: 2, // Intl.NumberFormat(locale, { style: "currency", currencyDisplay: "name" }); // e.g. "US dollar"
- MAX: 3
- }, null);
-
- if (InitType === 'Intl' || InitType === 'Number') {
- function InitializeNumberFormat(numberFormat, localeList, options) {
- if (typeof numberFormat != "object") {
- platform.raiseNeedObject();
- }
-
- if (callInstanceFunc(ObjectInstanceHasOwnProperty, numberFormat, '__initializedIntlObject') && numberFormat.__initializedIntlObject) {
- platform.raiseObjectIsAlreadyInitialized("NumberFormat", "NumberFormat");
- }
-
- numberFormat.__initializedIntlObject = true;
-
- // Extract options
- if (typeof options === 'undefined') {
- options = setPrototype({}, null);
- } else {
- options = Internal.ToObject(options);
- }
-
- var matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
- var style = GetOption(options, "style", "string", ["decimal", "percent", "currency"], "decimal");
-
- var formatterToUse = NumberFormatStyle.DECIMAL; // DEFAULT
- if (style === 'percent') {
- formatterToUse = NumberFormatStyle.PERCENT;
- } else if (style === 'currency') {
- formatterToUse = NumberFormatStyle.CURRENCY;
- }
-
- var currency = GetOption(options, "currency", "string", undefined, undefined);
- var currencyDisplay = GetOption(options, 'currencyDisplay', 'string', ['code', 'symbol', 'name'], 'symbol');
- var currencyDigits = undefined;
-
- var minimumIntegerDigits = GetNumberOption(options, 'minimumIntegerDigits', 1, 21, 1);
- var minimumFractionDigits = undefined;
- var maximumFractionDigits = undefined;
- var maximumFractionDigitsDefault = undefined;
-
- var minimumSignificantDigits = options.minimumSignificantDigits;
- var maximumSignificantDigits = options.maximumSignificantDigits;
-
- if (typeof minimumSignificantDigits !== 'undefined' || typeof maximumSignificantDigits !== 'undefined') {
- minimumSignificantDigits = GetNumberOption(options, 'minimumSignificantDigits', 1, 21, 1);
- maximumSignificantDigits = GetNumberOption(options, 'maximumSignificantDigits', minimumSignificantDigits, 21, 21);
- }
-
- var useGrouping = GetOption(options, 'useGrouping', 'boolean', undefined, true);
-
- // Deal with the locales and extensions
- localeList = CanonicalizeLocaleList(localeList);
- var resolvedLocaleInfo = resolveLocales(localeList, matcher, ["nu"], strippedDefaultLocale);
-
- // Correct the options if necessary
- if (typeof currency !== 'undefined' && !IsWellFormedCurrencyCode(currency)) {
- platform.raiseInvalidCurrencyCode(String(currency));
- }
-
- if (style === "currency") {
- if (typeof currency === 'undefined') {
- platform.raiseMissingCurrencyCode();
- }
- currency = callInstanceFunc(StringInstanceToUpperCase, currency);
- try {
- currencyDigits = platform.currencyDigits(currency);
- } catch (e) {
- throwExIfOOMOrSOE(e);
- platform.raiseInvalidCurrencyCode(String(currency));
- }
- minimumFractionDigits = GetNumberOption(options, 'minimumFractionDigits', 0, 20, currencyDigits);
- maximumFractionDigitsDefault = Math.max(currencyDigits, minimumFractionDigits);
- } else {
- currency = undefined;
- currencyDisplay = undefined;
- minimumFractionDigits = GetNumberOption(options, 'minimumFractionDigits', 0, 20, 0);
- if (style === "percent") {
- maximumFractionDigitsDefault = Math.max(minimumFractionDigits, 0);
- } else {
- maximumFractionDigitsDefault = Math.max(minimumFractionDigits, 3)
- }
- }
-
- maximumFractionDigits = GetNumberOption(options, 'maximumFractionDigits', minimumFractionDigits, 20, maximumFractionDigitsDefault);
-
- // Set the options on the object
- numberFormat.__localeMatcher = matcher;
- numberFormat.__locale = resolvedLocaleInfo.locale;
- numberFormat.__style = style;
-
- if (currency !== undefined) {
- numberFormat.__currency = currency;
- }
-
- if (currencyDisplay !== undefined) {
- numberFormat.__currencyDisplay = currencyDisplay;
- numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.DEFAULT;
- if (currencyDisplay === "symbol") {
- numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.SYMBOL;
- } else if (currencyDisplay === "code") {
- numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.CODE;
- } else if (currencyDisplay === "name") {
- numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.NAME;
- }
- }
-
- numberFormat.__minimumIntegerDigits = minimumIntegerDigits;
- numberFormat.__minimumFractionDigits = minimumFractionDigits;
- numberFormat.__maximumFractionDigits = maximumFractionDigits;
-
- if (maximumSignificantDigits !== undefined) {
- numberFormat.__minimumSignificantDigits = minimumSignificantDigits;
- numberFormat.__maximumSignificantDigits = maximumSignificantDigits;
- }
-
- numberFormat.__formatterToUse = formatterToUse;
- numberFormat.__useGrouping = useGrouping;
-
- try {
- // Cache api instance and update numbering system on the object
- CacheNumberFormat(numberFormat);
- }
- catch (e) {
- throwExIfOOMOrSOE(e);
- // Generic message to cover the exception throw from the platform.
- // The platform's exception is also generic and in most if not all cases specifies that "a" argument is invalid.
- // We have no other information from the platform on the cause of the exception.
- platform.raiseOptionValueOutOfRange();
- }
-
- if (!numberFormat.__numberingSystem)
- {
- numberFormat.__numberingSystem = "latn"; // assume Latin numerals by default
- }
-
- numberFormat.__numberingSystem = callInstanceFunc(StringInstanceToLowerCase, numberFormat.__numberingSystem);
- numberFormat.__initializedNumberFormat = true;
- }
-
- platform.registerBuiltInFunction(tagPublicFunction("Number.prototype.toLocaleString", function () {
- if ((typeof this) !== 'number' && !(this instanceof Number)) {
- platform.raiseNeedObjectOfType("Number.prototype.toLocaleString", "Number");
- }
-
- var stateObject = setPrototype({}, null);
- InitializeNumberFormat(stateObject, arguments[0], arguments[1]);
-
- var n = Internal.ToNumber(this);
- // Need to special case the '-0' case to format as 0 instead of -0.
- return String(platform.formatNumber(n === -0 ? 0 : n, stateObject));
- }), 3);
-
- if (InitType === 'Intl') {
- function NumberFormat() {
- // The function should have length of 0, hence we are getting arguments this way.
- // While it's true that we could just do e.g. arguments[0] and get undefined if it is not present,
- // that makes assumptions that the JIT must check. This pattern is marginally more efficient.
- let locales = undefined;
- let options = undefined;
- if (arguments.length >= 1) locales = arguments[0];
- if (arguments.length >= 2) options = arguments[1];
-
- if (this === Intl || this === undefined) {
- return new NumberFormat(locales, options);
- }
-
- let obj = Internal.ToObject(this);
-
- if (!ObjectIsExtensible(obj)) {
- platform.raiseObjectIsNonExtensible("NumberFormat");
- }
-
- // Use the hidden object to store data
- let hiddenObject = platform.getHiddenObject(obj);
-
- if (hiddenObject === undefined) {
- hiddenObject = setPrototype({}, null);
- platform.setHiddenObject(obj, hiddenObject);
- }
-
- InitializeNumberFormat(hiddenObject, locales, options);
-
- hiddenObject.__boundFormat = callInstanceFunc(FunctionInstanceBind, format, obj)
- delete hiddenObject.__boundFormat.name;
-
- return obj;
- }
- tagPublicFunction("Intl.NumberFormat", NumberFormat);
-
- function format(n) {
- n = Internal.ToNumber(n);
-
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
- }
-
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedNumberFormat) {
- platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
- }
-
- // Need to special case the '-0' case to format as 0 instead of -0.
- return String(platform.formatNumber(n === -0 ? 0 : n, hiddenObject));
- }
- tagPublicFunction("Intl.NumberFormat.prototype.format", format);
-
- ObjectDefineProperty(NumberFormat, 'supportedLocalesOf', { value: numberFormat_supportedLocalesOf, writable: true, configurable: true });
-
- var options = ['locale', 'numberingSystem', 'style', 'currency', 'currencyDisplay', 'minimumIntegerDigits',
- 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits',
- 'useGrouping'];
-
- ObjectDefineProperty(NumberFormat, 'prototype', { value: new NumberFormat(), writable: false, enumerable: false, configurable: false });
- setPrototype(NumberFormat.prototype, Object.prototype);
- ObjectDefineProperty(NumberFormat.prototype, 'constructor', { value: NumberFormat, writable: true, enumerable: false, configurable: true });
-
- ObjectDefineProperty(NumberFormat.prototype, 'resolvedOptions', {
- value: function resolvedOptions() {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("NumberFormat.prototype.resolvedOptions", "NumberFormat");
- }
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedNumberFormat) {
- platform.raiseNeedObjectOfType("NumberFormat.prototype.resolvedOptions", "NumberFormat");
- }
-
- var resolvedOptions = setPrototype({}, null);
-
- callInstanceFunc(ArrayInstanceForEach, options, function (option) {
- if (typeof hiddenObject['__' + option] !== 'undefined') {
- resolvedOptions[option] = hiddenObject['__' + option];
- }
- });
-
- return setPrototype(resolvedOptions, {});
- }, writable: true, enumerable: false, configurable: true
- });
-
- ObjectDefineProperty(NumberFormat.prototype, 'format', {
- get: tagPublicFunction('get format', function () {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
- }
-
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedNumberFormat) {
- platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
- }
-
- return hiddenObject.__boundFormat;
- }), enumerable: false, configurable: true
- });
-
- return NumberFormat;
- }
- }
- // 'Init.NumberFormat' not defined if reached here. Return 'undefined'
- return undefined;
- })();
-
- // Intl.DateTimeFormat, Date.prototype.toLocaleString, Date.prototype.toLocaleDateString, Date.prototype.toLocaleTimeString
- var DateTimeFormat = (function () {
-
- if (InitType === 'Intl' || InitType === 'Date') {
- function ToDateTimeOptions(options, required, defaults) {
- if (options === undefined) {
- options = setPrototype({}, null);
- } else {
- options = Internal.ToObject(options);
- }
-
- var needDefaults = true;
- if (required === "date" || required === "any") {
- if (options.weekday !== undefined || options.year !== undefined || options.month !== undefined || options.day !== undefined) {
- needDefaults = false;
- }
- }
- if (required === "time" || required === "any") {
- if (options.hour !== undefined || options.minute !== undefined || options.second !== undefined) {
- needDefaults = false;
- }
- }
-
- if (needDefaults && (defaults === "date" || defaults === "all")) {
- ObjectDefineProperty(options, "year", {
- value: "numeric", writable: true,
- enumerable: true, configurable: true
- });
- ObjectDefineProperty(options, "month", {
- value: "numeric", writable: true,
- enumerable: true, configurable: true
- });
- ObjectDefineProperty(options, "day", {
- value: "numeric", writable: true,
- enumerable: true, configurable: true
- });
- }
- if (needDefaults && (defaults === "time" || defaults === "all")) {
- ObjectDefineProperty(options, "hour", {
- value: "numeric", writable: true,
- enumerable: true, configurable: true
- });
- ObjectDefineProperty(options, "minute", {
- value: "numeric", writable: true,
- enumerable: true, configurable: true
- });
- ObjectDefineProperty(options, "second", {
- value: "numeric", writable: true,
- enumerable: true, configurable: true
- });
- }
- return options;
- }
-
- // Currently you cannot format date pieces and time pieces together, so this builds up a format template for each separately.
- function EcmaOptionsToWindowsTemplate(options) {
- var template = [];
-
- if (options.weekday) {
- if (options.weekday === 'narrow' || options.weekday === 'short') {
- callInstanceFunc(ArrayInstancePush, template, 'dayofweek.abbreviated');
- } else if (options.weekday === 'long') {
- callInstanceFunc(ArrayInstancePush, template, 'dayofweek.full');
- }
- }
-
- // TODO: Era not supported
- if (options.year) {
- if (options.year === '2-digit') {
- callInstanceFunc(ArrayInstancePush, template, 'year.abbreviated');
- } else if (options.year === 'numeric') {
- callInstanceFunc(ArrayInstancePush, template, 'year.full');
- }
- }
-
- if (options.month) {
- if (options.month === '2-digit' || options.month === 'numeric') {
- callInstanceFunc(ArrayInstancePush, template, 'month.numeric')
- } else if (options.month === 'short' || options.month === 'narrow') {
- callInstanceFunc(ArrayInstancePush, template, 'month.abbreviated');
- } else if (options.month === 'long') {
- callInstanceFunc(ArrayInstancePush, template, 'month.full');
- }
- }
-
- if (options.day) {
- callInstanceFunc(ArrayInstancePush, template, 'day');
- }
-
- if (options.timeZoneName) {
- if (options.timeZoneName === "short") {
- callInstanceFunc(ArrayInstancePush, template, 'timezone.abbreviated');
- } else if (options.timeZoneName === "long") {
- callInstanceFunc(ArrayInstancePush, template, 'timezone.full');
- }
- }
-
- callInstanceFunc(ArrayInstanceForEach, ['hour', 'minute', 'second'], function (opt) {
- if (options[opt]) {
- callInstanceFunc(ArrayInstancePush, template, opt);
- }
- });
-
- // TODO: Timezone Name not supported.
- return getArrayLength(template) > 0 ? callInstanceFunc(ArrayInstanceJoin, template, ' ') : undefined;
- }
-
- var WindowsToEcmaCalendarMap = {
- 'GregorianCalendar': 'gregory',
- 'HebrewCalendar': 'hebrew',
- 'HijriCalendar': 'islamic',
- 'JapaneseCalendar': 'japanese',
- 'JulianCalendar': 'julian',
- 'KoreanCalendar': 'korean',
- 'UmAlQuraCalendar': 'islamic-civil',
- 'ThaiCalendar': 'thai',
- 'TaiwanCalendar': 'taiwan'
- };
-
- function WindowsToEcmaCalendar(calendar) {
- if (typeof calendar === 'undefined') {
- return '';
- }
-
- return WindowsToEcmaCalendarMap[calendar] || 'gregory';
- }
-
- // Certain formats have similar patterns on both ecma and windows; will use helper methods for them
- function correctWeekdayEraMonthPattern(patternString, userValue, searchParam) {
- // parts[1] is either dayofweek.solo, dayofweek, era or month; parts[2] is either abbreviated or full
- var parts = platform.builtInRegexMatch(patternString, RegExp("{(" + searchParam + "(?:\\.solo)?)\\.([a-z]*)(?:\\([0-9]\\))?}"));
- // If this happens that means windows removed the specific pattern (which isn't expected; but better be safe)
- if (parts === null) {
- RaiseAssert(new Error("Error when correcting windows returned weekday/Era/Month pattern; regex returned null. \nInput was: '" + patternString + "'\nRegex: '" + "{(" + searchParam + "(\\.solo)?)\\.([a-z]*)(\\([0-9]\\))?}'"));
- return patternString;
- }
-
- if (parts[2] !== "full" && userValue === "long") {
- return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + "." + "full" + "}");
- } else if (userValue !== "long") {
- return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + "." + (userValue === "short" ? "abbreviated" : "abbreviated(1)") + "}");
- }
- return patternString;
- }
-
- function correctDayHourMinuteSecondMonthPattern(patternString, userValue, searchParam) {
- // parts[1] is either month, day, hour, minute, or second
- // REVIEW (doilij) is it even possible to have a '.solo' (i.e. /(?:\\.solo)?/ ) in the above cases?
- var parts = platform.builtInRegexMatch(patternString, RegExp("{(" + searchParam + ")(?:\\.solo)?\\.([a-z]*)(?:\\([0-9]\\))?}"));
- if (parts === null) {
- RaiseAssert(new Error("Error when correcting windows returned day/hour/minute/second/month pattern; regex returned null. \nInput was: '" + patternString + "'\nRegex: '" + "{(" + searchParam + "(\\.solo)?)\\.([a-z]*)(\\([0-9]\\))?}'"));
- return patternString;
- }
-
- // Only correct the 2 digit; unless part[2] isn't integer
- if (userValue === "2-digit") {
- return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + ".integer(2)}");
- } else if (parts[2] !== "integer") {
- return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + ".integer}");
- }
-
- return patternString;
- }
-
- // Perhaps the level of validation that we have might not be required for this method
- function updatePatternStrings(patternString, dateTimeFormat) {
- if (dateTimeFormat.__weekday !== undefined) {
- patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__weekday, "dayofweek");
- }
-
- if (dateTimeFormat.__era !== undefined) {
- // This is commented because not all options are supported for locales that do have era;
- // In addition, we can't force era to be part of a locale using templates.
- // patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__era, "era", 2);
- }
-
- if (dateTimeFormat.__year === "2-digit") {
- var parts = platform.builtInRegexMatch(patternString, /\{year\.[a-z]*(\([0-9]\))?\}/);
- if (parts === null) {
- RaiseAssert(new Error("Error when correcting windows returned year; regex returned null"));
- } else {
- patternString = callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{year.abbreviated(2)}");
- }
- } else if (dateTimeFormat.__year === "full") {
- var parts = platform.builtInRegexMatch(patternString, /\{year\.[a-z]*(\([0-9]\))?\}/);
- if (parts === null) {
- RaiseAssert(new Error("Error when correcting windows returned year; regex returned null"));
- } else {
- patternString = callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{year.full}");
- }
- }
-
- // Month partially overlaps with weekday/month; unless it's 2-digit or numeric in which case it overlaps with day/hour/minute/second
- if (dateTimeFormat.__month !== undefined && dateTimeFormat.__month !== "2-digit" && dateTimeFormat.__month !== "numeric") {
- patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__month, "month");
- } else if (dateTimeFormat.__month !== undefined) {
- patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__month, "month");
- }
-
- if (dateTimeFormat.__day !== undefined) {
- patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__day, "day");
- }
-
- if (dateTimeFormat.__hour !== undefined) {
- patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__hour, "hour");
- }
-
- if (dateTimeFormat.__minute !== undefined) {
- patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__minute, "minute");
- }
-
- if (dateTimeFormat.__second !== undefined) {
- patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__second, "second");
- }
-
- if (dateTimeFormat.__timeZoneName !== undefined) {
- patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__timeZoneName, "timezone");
- }
-
- return patternString;
- }
-
- function InitializeDateTimeFormat(dateTimeFormat, localeList, options) {
- if (typeof dateTimeFormat != "object") {
- platform.raiseNeedObject();
- }
-
- if (callInstanceFunc(ObjectInstanceHasOwnProperty, dateTimeFormat, '__initializedIntlObject') && dateTimeFormat.__initializedIntlObject) {
- platform.raiseObjectIsAlreadyInitialized("DateTimeFormat", "DateTimeFormat");
- }
-
- dateTimeFormat.__initializedIntlObject = true;
-
- // Extract the options
- options = ToDateTimeOptions(options, "any", "date");
-
- var matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
- var timeZone = GetOption(options, "timeZone", "string", undefined, undefined);
-
- if (timeZone !== undefined) {
- timeZone = platform.validateAndCanonicalizeTimeZone(timeZone);
- } else {
- timeZone = platform.getDefaultTimeZone();
- }
-
- if (timeZone === undefined) {
- platform.raiseOptionValueOutOfRange();
- }
-
- // Format options
- var weekday = GetOption(options, "weekday", "string", ['narrow', 'short', 'long'], undefined);
- var era = GetOption(options, "era", "string", ['narrow', 'short', 'long'], undefined);
- var year = GetOption(options, "year", "string", ['2-digit', 'numeric'], undefined);
- var month = GetOption(options, "month", "string", ['2-digit', 'numeric', 'narrow', 'short', 'long'], undefined);
- var day = GetOption(options, "day", "string", ['2-digit', 'numeric'], undefined);
- var hour = GetOption(options, "hour", "string", ['2-digit', 'numeric'], undefined);
- var minute = GetOption(options, "minute", "string", ['2-digit', 'numeric'], undefined);
- var second = GetOption(options, "second", "string", ['2-digit', 'numeric'], undefined);
- var timeZoneName = GetOption(options, "timeZoneName", "string", ['short', 'long'], undefined);
-
- var hour12 = hour ? GetOption(options, "hour12", "boolean", undefined, undefined) : undefined;
- var formatMatcher = GetOption(options, "formatMatcher", "string", ["basic", "best fit"], "best fit");
-
- var windowsClock = hour12 !== undefined ? (hour12 ? "12HourClock" : "24HourClock") : undefined;
-
- var templateString = EcmaOptionsToWindowsTemplate(setPrototype({
- weekday: weekday,
- era: era,
- year: year,
- month: month,
- day: day,
- hour: hour,
- minute: minute,
- second: second,
- timeZoneName: timeZoneName
- }, null));
-
- // Deal with the locale
- localeList = CanonicalizeLocaleList(localeList);
- var resolvedLocaleInfo = resolveLocales(localeList, matcher, ["nu", "ca"], strippedDefaultLocale);
-
- // Assign the options
- dateTimeFormat.__matcher = matcher;
- dateTimeFormat.__timeZone = timeZone;
- dateTimeFormat.__locale = resolvedLocaleInfo.locale;
-
- // Format options
- dateTimeFormat.__weekday = weekday;
- dateTimeFormat.__era = era;
- dateTimeFormat.__year = year;
- dateTimeFormat.__month = month;
- dateTimeFormat.__day = day;
- dateTimeFormat.__hour = hour;
- dateTimeFormat.__minute = minute;
- dateTimeFormat.__second = second;
- dateTimeFormat.__timeZoneName = timeZoneName;
-
- dateTimeFormat.__hour12 = hour12;
- dateTimeFormat.__formatMatcher = formatMatcher;
- dateTimeFormat.__windowsClock = windowsClock;
-
- dateTimeFormat.__templateString = templateString;
-
- /*
- * NOTE:
- * Pattern string's are position-sensitive; while templates are not.
- * If we specify {hour.integer(2)}:{minute.integer(2)} pattern string; we will always format as HH:mm.
- * On the other hand, template strings don't give as fine granularity for options; and the platform decides how long month.abbreviated should be.
- * Therefore, we have to create using template strings; and then change the .abbreivated/.integer values to have correct digits count if necessary.
- * Thus, this results in this redundant looking code to create dateTimeFormat twice.
- */
- var errorThrown = false;
-
- try {
- // Create the DateTimeFormatter to extract pattern strings
- CreateDateTimeFormat(dateTimeFormat, false);
- } catch (e) {
- // Rethrow SOE or OOM
- throwExIfOOMOrSOE(e);
-
- // We won't throw for the first exception, but assume the template strings were rejected.
- // Instead, we will try to fall back to default template strings.
- var defaultOptions = ToDateTimeOptions(options, "none", "all");
- dateTimeFormat.__templateString = EcmaOptionsToWindowsTemplate(defaultOptions, null);
- errorThrown = true;
- }
-
- if (!errorThrown) {
- // Update the pattern strings
- dateTimeFormat.__templateString = updatePatternStrings(dateTimeFormat.__patternStrings[0], dateTimeFormat);
- }
-
- try {
- // Cache the date time formatter
- CreateDateTimeFormat(dateTimeFormat, true);
- } catch (e) {
- // Rethrow SOE or OOM
- throwExIfOOMOrSOE(e);
-
- // Otherwise, Generic message to cover the exception throw from the platform.
- // The platform's exception is also generic and in most if not all cases specifies that "a" argument is invalid.
- // We have no other information from the platform on the cause of the exception.
- platform.raiseOptionValueOutOfRange();
- }
-
- // Correct the api's updated
- dateTimeFormat.__calendar = WindowsToEcmaCalendar(dateTimeFormat.__windowsCalendar);
-
- dateTimeFormat.__numberingSystem = callInstanceFunc(StringInstanceToLowerCase, dateTimeFormat.__numberingSystem);
- if (dateTimeFormat.__hour !== undefined) {
- dateTimeFormat.__hour12 = dateTimeFormat.__windowsClock === "12HourClock";
- }
- dateTimeFormat.__initializedDateTimeFormat = true;
- }
-
- platform.registerBuiltInFunction(tagPublicFunction("Date.prototype.toLocaleString", function () {
- if (typeof this !== 'object' || !(this instanceof Date)) {
- platform.raiseNeedObjectOfType("Date.prototype.toLocaleString", "Date");
- }
- var value = callInstanceFunc(DateInstanceGetDate, new Date(this));
- if (isNaN(value) || !isFinite(value)) {
- return "Invalid Date";
- }
- var stateObject = setPrototype({}, null);
- InitializeDateTimeFormat(stateObject, arguments[0], ToDateTimeOptions(arguments[1], "any", "all"));
- return String(platform.formatDateTime(Internal.ToNumber(this), stateObject));
- }), 0);
-
- platform.registerBuiltInFunction(tagPublicFunction("Date.prototype.toLocaleDateString", function () {
- if (typeof this !== 'object' || !(this instanceof Date)) {
- platform.raiseNeedObjectOfType("Date.prototype.toLocaleDateString", "Date");
- }
- var value = callInstanceFunc(DateInstanceGetDate, new Date(this));
- if (isNaN(value) || !isFinite(value)) {
- return "Invalid Date";
- }
- var stateObject = setPrototype({}, null);
- InitializeDateTimeFormat(stateObject, arguments[0], ToDateTimeOptions(arguments[1], "date", "date"));
- return String(platform.formatDateTime(Internal.ToNumber(this), stateObject));
- }), 1);
-
- platform.registerBuiltInFunction(tagPublicFunction("Date.prototype.toLocaleTimeString", function () {
- if (typeof this !== 'object' || !(this instanceof Date)) {
- platform.raiseNeedObjectOfType("Date.prototype.toLocaleTimeString", "Date");
- }
- var value = callInstanceFunc(DateInstanceGetDate, new Date(this));
- if (isNaN(value) || !isFinite(value)) {
- return "Invalid Date";
- }
- var stateObject = setPrototype({}, null);
- InitializeDateTimeFormat(stateObject, arguments[0], ToDateTimeOptions(arguments[1], "time", "time"));
- return String(platform.formatDateTime(Internal.ToNumber(this), stateObject));
- }), 2);
-
- if (InitType === 'Intl') {
- function DateTimeFormat() {
- // The function should have length of 0, hence we are getting arguments this way.
- // While it's true that we could just do e.g. arguments[0] and get undefined if it is not present,
- // that makes assumptions that the JIT must check. This pattern is marginally more efficient.
- var locales = undefined;
- var options = undefined;
- if (arguments.length >= 1) locales = arguments[0];
- if (arguments.length >= 2) options = arguments[1];
-
- if (this === Intl || this === undefined) {
- return new DateTimeFormat(locales, options);
- }
-
- var obj = Internal.ToObject(this);
- if (!ObjectIsExtensible(obj)) {
- platform.raiseObjectIsNonExtensible("DateTimeFormat");
- }
-
- // Use the hidden object to store data
- var hiddenObject = platform.getHiddenObject(obj);
-
- if (hiddenObject === undefined) {
- hiddenObject = setPrototype({}, null);
- platform.setHiddenObject(obj, hiddenObject);
- }
-
- InitializeDateTimeFormat(hiddenObject, locales, options);
-
- hiddenObject.__boundFormat = callInstanceFunc(FunctionInstanceBind, format, obj);
- delete hiddenObject.__boundFormat.name;
-
- return obj;
- }
- tagPublicFunction("Intl.DateTimeFormat", DateTimeFormat);
-
- function format() {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
- }
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedDateTimeFormat) {
- platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
- }
-
- if (arguments.length >= 1) {
- if (isNaN(arguments[0]) || !isFinite(arguments[0])) {
- platform.raiseInvalidDate();
- }
- return String(platform.formatDateTime(Internal.ToNumber(arguments[0]), hiddenObject));
- }
-
- return String(platform.formatDateTime(DateNow(), hiddenObject));
- }
- tagPublicFunction("Intl.DateTimeFormat.prototype.format", format);
-
- DateTimeFormat.__relevantExtensionKeys = ['ca', 'nu'];
-
- ObjectDefineProperty(DateTimeFormat, 'prototype', { value: new DateTimeFormat(), writable: false, enumerable: false, configurable: false });
- setPrototype(DateTimeFormat.prototype, Object.prototype);
- ObjectDefineProperty(DateTimeFormat.prototype, 'constructor', { value: DateTimeFormat, writable: true, enumerable: false, configurable: true });
-
- ObjectDefineProperty(DateTimeFormat.prototype, 'format', {
- get: tagPublicFunction('get format', function () {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
- }
-
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedDateTimeFormat) {
- platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
- }
-
- return hiddenObject.__boundFormat;
- }), enumerable: false, configurable: true
- });
-
- ObjectDefineProperty(DateTimeFormat.prototype, 'resolvedOptions', {
- value: function resolvedOptions() {
- if (typeof this !== 'object') {
- platform.raiseNeedObjectOfType("DateTimeFormat.prototype.resolvedOptions", "DateTimeFormat");
- }
- var hiddenObject = platform.getHiddenObject(this);
- if (hiddenObject === undefined || !hiddenObject.__initializedDateTimeFormat) {
- platform.raiseNeedObjectOfType("DateTimeFormat.prototype.resolvedOptions", "DateTimeFormat");
- }
- var temp = setPrototype({
- locale: hiddenObject.__locale,
- calendar: hiddenObject.__calendar, // ca unicode extension
- numberingSystem: hiddenObject.__numberingSystem, // nu unicode extension
- timeZone: hiddenObject.__timeZone,
- hour12: hiddenObject.__hour12,
- weekday: hiddenObject.__weekday,
- era: hiddenObject.__era,
- year: hiddenObject.__year,
- month: hiddenObject.__month,
- day: hiddenObject.__day,
- hour: hiddenObject.__hour,
- minute: hiddenObject.__minute,
- second: hiddenObject.__second,
- timeZoneName: hiddenObject.__timeZoneName
- }, null)
- var options = setPrototype({}, null);
- callInstanceFunc(ArrayInstanceForEach, ObjectGetOwnPropertyNames(temp), function (prop) {
- if ((temp[prop] !== undefined || prop === 'timeZone') && callInstanceFunc(ObjectInstanceHasOwnProperty, hiddenObject, "__" + prop)) {
- options[prop] = temp[prop];
- }
- }, hiddenObject);
- return setPrototype(options, Object.prototype);
- }, writable: true, enumerable: false, configurable: true
- });
-
- ObjectDefineProperty(DateTimeFormat, 'supportedLocalesOf', { value: dateTimeFormat_supportedLocalesOf, writable: true, configurable: true });
-
- return DateTimeFormat;
- }
- }
- // 'Init.DateTimeFormat' not defined if reached here. Return 'undefined'
- return undefined;
- })();
-
- // Initialize Intl properties only if needed
- if (InitType === 'Intl') {
- ObjectDefineProperty(Intl, "Collator", { value: Collator, writable: true, enumerable: false, configurable: true });
- ObjectDefineProperty(Intl, "NumberFormat", { value: NumberFormat, writable: true, enumerable: false, configurable: true });
- ObjectDefineProperty(Intl, "DateTimeFormat", { value: DateTimeFormat, writable: true, enumerable: false, configurable: true });
- ObjectDefineProperty(Intl, "getCanonicalLocales", { value: getCanonicalLocales, writable: true, enumerable: false, configurable: true });
- }
-});
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+"use strict";
+// Core intl lib
+(function (EngineInterface, InitType) {
+ var platform = EngineInterface.Intl;
+
+ // allow unit tests to disable caching behavior for testing convenience but have this always `true` in real scenarios
+ platform.useCaches = true;
+
+ if (platform.localeLookupCache === undefined) {
+ platform.localeLookupCache = new platform.Map();
+ }
+ if (platform.localeBestFitCache === undefined) {
+ platform.localeBestFitCache = new platform.Map();
+ }
+
+ // determine what backing library we are using
+ // making these vars in JS allows us to more change how we
+ // determine the backing library
+ let isPlatformUsingICU = !platform.winglob;
+ let isPlatformUsingWinGlob = platform.winglob;
+
+ // constants
+ const NOT_FOUND = "NOT_FOUND";
+
+ // Built-Ins
+ var setPrototype = platform.builtInSetPrototype;
+ var getArrayLength = platform.builtInGetArrayLength;
+ var callInstanceFunc = platform.builtInCallInstanceFunction;
+
+ var Boolean = platform.Boolean;
+ var Object = platform.Object;
+ var RegExp = platform.RegExp;
+ var Number = platform.Number;
+ var String = platform.String;
+ var Date = platform.Date;
+ var Error = platform.Error;
+ var Map = platform.Map;
+
+ var RaiseAssert = platform.raiseAssert;
+
+ var Math = setPrototype({
+ abs: platform.builtInMathAbs,
+ floor: platform.builtInMathFloor,
+ max: platform.builtInMathMax,
+ pow: platform.builtInMathPow
+ }, null);
+
+ var ObjectGetPrototypeOf = platform.builtInJavascriptObjectEntryGetPrototypeOf;
+ var ObjectIsExtensible = platform.builtInJavascriptObjectEntryIsExtensible;
+ var ObjectGetOwnPropertyNames = platform.builtInJavascriptObjectEntryGetOwnPropertyNames;
+ var ObjectInstanceHasOwnProperty = platform.builtInJavascriptObjectEntryHasOwnProperty;
+ // Because we don't keep track of the attributes object, and neither does the internals of Object.defineProperty;
+ // We don't need to restore it's prototype.
+ var _objectDefineProperty = platform.builtInJavascriptObjectEntryDefineProperty;
+ var ObjectDefineProperty = function (obj, prop, attributes) {
+ _objectDefineProperty(obj, prop, setPrototype(attributes, null));
+ };
+
+ var ArrayInstanceForEach = platform.builtInJavascriptArrayEntryForEach;
+ var ArrayInstanceIndexOf = platform.builtInJavascriptArrayEntryIndexOf;
+ var ArrayInstancePush = platform.builtInJavascriptArrayEntryPush;
+ var ArrayInstanceJoin = platform.builtInJavascriptArrayEntryJoin;
+
+ var FunctionInstanceBind = platform.builtInJavascriptFunctionEntryBind;
+ var DateInstanceGetDate = platform.builtInJavascriptDateEntryGetDate;
+ var DateNow = platform.builtInJavascriptDateEntryNow;
+
+ var StringInstanceReplace = platform.builtInJavascriptStringEntryReplace;
+ var StringInstanceToLowerCase = platform.builtInJavascriptStringEntryToLowerCase;
+ var StringInstanceToUpperCase = platform.builtInJavascriptStringEntryToUpperCase;
+
+ var ObjectPrototype = ObjectGetPrototypeOf({});
+
+ var isFinite = platform.builtInGlobalObjectEntryIsFinite;
+ var isNaN = platform.builtInGlobalObjectEntryIsNaN;
+
+ let __defaultLocale = undefined;
+ const GetDefaultLocale = function () {
+ if (__defaultLocale && platform.useCaches) {
+ return __defaultLocale;
+ }
+
+ const locale = platform.getDefaultLocale();
+ if (!locale) {
+ // if the system locale is undefined/null/empty string, we have to
+ // do something or else we will crash
+ __defaultLocale = "en";
+ } else {
+ __defaultLocale = locale;
+ }
+
+ return __defaultLocale;
+ };
+
+ let CacheNumberFormat = function (numberFormat) {
+ let retVal = platform.cacheNumberFormat(numberFormat);
+ if (retVal === null) {
+ // TODO (doilij): remove this fallback when implemented under ICU
+ numberFormat.__numberingSystem = "";
+ }
+ // no return value
+ };
+
+ let CreateDateTimeFormat = function (dateTimeFormat, condition) {
+ let retVal = platform.createDateTimeFormat(dateTimeFormat, condition);
+ if (retVal === null) {
+ // TODO (doilij): remove this fallback when implemented under ICU
+ dateTimeFormat.__numberingSystem = "";
+ dateTimeFormat.__patternStrings = [
+ "{month.a}{day.b}{hour.c}{minute.d}{second.e}",
+ "" // another entry for fun
+ ]
+ }
+ // no return value
+ };
+
+ let IsWellFormedLanguageTag = function (langTag) {
+ let retVal = platform.isWellFormedLanguageTag(langTag);
+ if (retVal === null) {
+ if (!LANG_TAG_RE) {
+ InitializeLangTagREs();
+ }
+ let match = platform.builtInRegexMatch(langTag, LANG_TAG_RE);
+ return !!match;
+ } else {
+ return retVal;
+ }
+ };
+
+ var forEachIfPresent = function (obj, length, func) {
+ let current = 0;
+ while (current < length) {
+ if (current in obj) {
+ func(obj[current]);
+ }
+ current++;
+ }
+ };
+
+ // A helper function that is meant to rethrow SOE and OOM exceptions allowing them to propagate.
+ var throwExIfOOMOrSOE = function (ex) {
+ if (ex.number === -2146828260 || ex.number === -2146828281) {
+ throw ex;
+ }
+ };
+
+ var tagPublicFunction = function (name, f) {
+ return platform.tagPublicLibraryCode(f, name);
+ };
+
+ var resolveLocaleBestFit = function (locale, defaultLocale) {
+ var resolvedLocale = platform.localeBestFitCache.get(locale);
+ if (resolvedLocale === undefined) {
+ resolvedLocale = platform.resolveLocaleBestFit(locale);
+ if (resolvedLocale === null) {
+ if (!LANG_TAG_BASE_RE) {
+ InitializeLangTagREs();
+ }
+ let match = platform.builtInRegexMatch(locale, LANG_TAG_BASE_RE);
+ resolvedLocale = match[1] + (match[2] ? ('-' + match[2]) : '') + (match[3] ? ('-' + match[3]) : '');
+ }
+ // If resolvedLocale is undefined, cache that we got undefined
+ // so we don't try to resolve for `locale` in future.
+ platform.localeBestFitCache.set(locale, resolvedLocale === undefined ? NOT_FOUND : resolvedLocale);
+ } else if (resolvedLocale === NOT_FOUND) {
+ resolvedLocale = undefined;
+ }
+
+ if (defaultLocale === locale) {
+ return resolvedLocale;
+ } else if (defaultLocale === resolvedLocale) {
+ return undefined;
+ } else {
+ return resolvedLocale;
+ }
+ }
+
+ var resolveLocaleLookup = function (localeWithoutSubtags) {
+ let resolvedLocale = platform.localeLookupCache.get(localeWithoutSubtags);
+ if (resolvedLocale === undefined) {
+ resolvedLocale = platform.resolveLocaleLookup(localeWithoutSubtags);
+ if (resolvedLocale === null) {
+ if (!LANG_TAG_BASE_RE) {
+ InitializeLangTagREs();
+ }
+ let match = platform.builtInRegexMatch(localeWithoutSubtags, LANG_TAG_BASE_RE);
+ // match: [1] language; [2] script; [3] region (e.g. en-Latn-US)
+ resolvedLocale = match[1]
+ + (match[2] ? ('-' + match[2]) : '')
+ + (match[3] ? ('-' + match[3]) : '');
+ }
+ // If resolvedLocale is undefined, cache that we got undefined
+ // so we don't try to resolve for `locale` in future.
+ platform.localeLookupCache.set(localeWithoutSubtags, resolvedLocale === undefined ? NOT_FOUND : resolvedLocale);
+ } else if (resolvedLocale === NOT_FOUND) {
+ resolvedLocale = undefined;
+ }
+ return resolvedLocale;
+ }
+
+ var getExtensionSubtags = function (locale) {
+ if (!LANG_TAG_EXT_RE) {
+ InitializeLangTagREs();
+ }
+
+ const match = platform.builtInRegexMatch(locale, LANG_TAG_EXT_RE);
+ if (!match) {
+ return undefined;
+ }
+
+ // Note: extensions are /((${extension})-)*/ and are made up of \\b(?:${singleton}(?:-${alphanum}{2,8})+)\\b
+ // where the ${alphanum}{2,8} fields are of the form `${key}-${value}`.
+ // TODO (doilij): return an array of `${key}-${value}` pairs
+
+ // REVIEW (doilij): leading - might mean we need to filter: // ss.match(rr)[4].split('-').filter((x)=>!!x)
+ // In that case:
+ // TODO StringInstanceSplit
+ // TODO ArrayInstanceFilter
+ // let extSubtags = ArrayInstanceFilter(extensionsString.split('-'), (x)=>!!x);
+ const extSubtags = match[0].split('-').filter((x) => !!x);
+ // REVIEW (doilij): performance (testing for str[0]==='-' and using the string after that or updating the regex might be faster)
+
+ return extSubtags;
+ }
+
+ var resolveLocaleHelper = function (locale, fitter, extensionFilter, defaultLocale) {
+ var subTags = platform.getExtensions(locale);
+ if (subTags === null) {
+ // platform.getExtensions returns null to indicate fallback to JS implementation
+ subTags = getExtensionSubtags(locale);
+ }
+
+ if (subTags) {
+ callInstanceFunc(ArrayInstanceForEach, subTags, function (subTag) {
+ locale = callInstanceFunc(StringInstanceReplace, locale, "-" + subTag, "");
+ });
+ }
+
+ // Instead of using replace, we will match two groups, one capturing, one not. The non capturing group just strips away -u if present.
+ // We are substituting for the function replace; which will only make a change if /-u$/ was found (-u at the end of the line)
+ // And because match will return null if we don't match entire sequence, we are using the two groups stated above.
+ locale = platform.builtInRegexMatch(locale, /(.*?)(?:-u)?$/)[1];
+ var resolved = fitter(locale, defaultLocale);
+
+ if (extensionFilter !== undefined) { // Filter to expected sub-tags
+ var filtered = [];
+ callInstanceFunc(ArrayInstanceForEach, subTags, (function (subTag) {
+ var parts = platform.builtInRegexMatch(subTag, /([^-]*)-?(.*)?/); // [0] entire thing; [1] key; [2] value
+ var key = parts[1];
+ if (callInstanceFunc(ArrayInstanceIndexOf, extensionFilter, key) !== -1) {
+ callInstanceFunc(ArrayInstancePush, filtered, subTag);
+ }
+ }));
+ subTags = filtered;
+ }
+
+ // As long as we are using the JS version of getExtensions on ICU, "u" will be considered an extension
+ // of a locale like "de-u-co-phonebk"
+ // Thus, we can't add the -u- ourselves here
+ const withoutSubTags = resolved;
+ if (resolved) {
+ if (subTags && getArrayLength(subTags) > 0) {
+ if (isPlatformUsingICU) {
+ resolved += "-";
+ } else {
+ resolved += "-u-";
+ }
+ }
+
+ resolved += callInstanceFunc(ArrayInstanceJoin, subTags, "-");
+ } else {
+ resolved = undefined;
+ }
+
+ return setPrototype({
+ locale: resolved,
+ subTags: subTags,
+ localeWithoutSubtags: withoutSubTags
+ }, null);
+ }
+
+ var resolveLocales = function (givenLocales, matcher, extensionFilter, defaultLocaleFunc) {
+ var fitter = matcher === "lookup" ? resolveLocaleLookup : resolveLocaleBestFit;
+ var length = getArrayLength(givenLocales);
+
+ var defaultLocale = defaultLocaleFunc();
+
+ length = length !== undefined ? length : 0;
+ for (var i = 0; i < length; i++) {
+ var resolved = resolveLocaleHelper(givenLocales[i], fitter, extensionFilter, defaultLocale);
+ if (resolved.locale !== undefined) {
+ return resolved;
+ }
+ }
+ return resolveLocaleHelper(defaultLocale, fitter, undefined, defaultLocale);
+ }
+
+ // get just the language-script-region from the default locale
+ let __strippedDefaultLocale = undefined;
+ var strippedDefaultLocale = function () {
+ if (__strippedDefaultLocale) {
+ return __strippedDefaultLocale;
+ }
+
+ if (isPlatformUsingICU) {
+ if (!LANG_TAG_BASE_RE) {
+ InitializeLangTagREs();
+ }
+
+ const def = GetDefaultLocale();
+ const match = platform.builtInRegexMatch(def, LANG_TAG_BASE_RE);
+ if (match) {
+ // strip extensions by matching only the base
+ __strippedDefaultLocale = match[0];
+ } else {
+ __strippedDefaultLocale = def;
+ }
+ } else {
+ // the only thing to strip off of a WinGlob locale is the collation,
+ // which comes after the underscore
+ __strippedDefaultLocale = platform.builtInRegexMatch(GetDefaultLocale(), /([^_]*).*/)[1];
+ }
+
+ return __strippedDefaultLocale;
+ };
+
+ var Internal = (function () {
+ return setPrototype({
+ ToObject: function (o) {
+ if (o === null) {
+ platform.raiseNeedObject();
+ }
+ return o !== undefined ? Object(o) : undefined;
+ },
+
+ ToString: function (s) {
+ return s !== undefined ? String(s) : undefined;
+ },
+
+ ToNumber: function (n) {
+ return n === undefined ? NaN : Number(n);
+ },
+
+ ToLogicalBoolean: function (v) {
+ return v !== undefined ? Boolean(v) : undefined;
+ },
+
+ ToUint32: function (n) {
+ var num = Number(n),
+ ret = 0;
+ if (!isNaN(num) && isFinite(num)) {
+ ret = Math.abs(num % Math.pow(2, 32));
+ }
+ return ret;
+ },
+
+ HasProperty: function (o, p) {
+ // Walk the prototype chain
+ while (o) {
+ if (callInstanceFunc(ObjectInstanceHasOwnProperty, o, p)) {
+ return true;
+ }
+ o = ObjectGetPrototypeOf(o);
+ }
+ }
+ }, null)
+ })();
+
+ // Internal ops implemented in JS:
+ function GetOption(options, property, type, values, fallback) {
+ let value = options[property];
+
+ if (value !== undefined) {
+ if (type == "boolean") {
+ value = Internal.ToLogicalBoolean(value);
+ }
+
+ if (type == "string") {
+ value = Internal.ToString(value);
+ }
+
+ if (type == "number") {
+ value = Internal.ToNumber(value);
+ }
+
+ if (values !== undefined && callInstanceFunc(ArrayInstanceIndexOf, values, value) == -1) {
+ platform.raiseOptionValueOutOfRange_3(String(value), String(property), "['" + callInstanceFunc(ArrayInstanceJoin, values, "', '") + "']");
+ }
+
+ return value;
+ }
+
+ return fallback;
+ }
+
+ function GetNumberOption(options, property, minimum, maximum, fallback) {
+ const rawValue = options[property];
+
+ if (typeof rawValue !== 'undefined') {
+ const formattedValue = Internal.ToNumber(rawValue);
+
+ if (isNaN(formattedValue) || formattedValue < minimum || formattedValue > maximum) {
+ platform.raiseOptionValueOutOfRange_3(String(rawValue), String(property), "[" + minimum + " - " + maximum + "]");
+ }
+
+ return Math.floor(formattedValue);
+ } else {
+ return fallback;
+ }
+ }
+
+ let CURRENCY_CODE_RE;
+ function InitializeCurrencyRegExp() {
+ CURRENCY_CODE_RE = /^[A-Z]{3}$/i;
+ }
+
+ let LANG_TAG_BASE_RE; // language[-script[-region]]
+ let LANG_TAG_EXT_RE; // extension part (variant, extension, privateuse)
+ let LANG_TAG_RE; // full syntax of language tags (including privateuse and grandfathered)
+ function InitializeLangTagREs() {
+ // Language Tag Syntax as described in RFC 5646 #section-2.1
+ // Note: All language tags are comprised only of ASCII characters (makes our job easy here)
+ // Note: Language tags in canonical form have case conventions, but language tags are case-insensitive for our purposes
+
+ // Note: The ABNF syntax used in RFC 5646 #section-2.1 uses the following numeric quantifier conventions:
+ // - (Parentheses) are used for grouping
+ // - PRODUCTION => exactly 1 of PRODUCTION /PRODUCTION/
+ // - [PRODUCTION] => 0 or 1 of PRODUCTION /(PRODUCTION)?/
+ // - #PRODUCTION => exactly # of PRODUCTION /(PRODUCTION){#}/
+ // - a*bPRODUCTION (where a and b are optional)
+ // - *PRODUCTION => any number of PRODUCTION /(PRODUCTION)*/
+ // - 1*PRODUCTION => 1 or more of PRODUCTION /(PRODUCTION)+/
+ // - #*PRODUCTION => # or more of PRODUCTION /(PRODUCTION){#,}/
+ // - *#PRODUCTION => 0 to # (inclusive) of PRODUCTION /(PRODUCTION){,#}/ or /(PRODUCTION){0,#}/
+ // - a*bPRODUCTION => a to b (inclusive) of PRODUCTION /(PRODUCTION){a,b}/
+
+ const ALPHA = "[A-Z]";
+ const DIGIT = "[0-9]";
+ const alphanum = `(?:${ALPHA}|${DIGIT})`;
+
+ const regular = "\\b(?:art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)\\b";
+ const irregular = "\\b(?:en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo" +
+ "|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)\\b";
+ const grandfathered = `\\b(?:${regular}|${irregular})\\b`;
+
+ const privateuse = `\\b(?:x(?:-${alphanum}{1,8}\\b)+)\\b`; // privateuse = "x" 1*("-" (1*8alphanum))
+ const singleton = `\\b(?:${DIGIT}|[A-WY-Z])\\b`; // singleton ~= alphanum except for 'x' ; (paraphrased)
+ const extension = `\\b(?:${singleton}(?:-${alphanum}{2,8})+)\\b`; // extension = singleton 1*("-" (2*8alphanum))
+ const variant = `\\b(?:${alphanum}{5,8}|${DIGIT}${alphanum}{3})\\b`; // variant = 5*8alphanum / (DIGIT 3alphanum)
+ const region = `\\b(?:${ALPHA}{2}|${DIGIT}{3})\\b`; // region = 2ALPHA / 3DIGIT
+
+ const script = `\\b(?:${ALPHA}{4})\\b`; // script = 4ALPHA
+ const extlang = `\\b(?:${ALPHA}{3}\\b(?:-${ALPHA}{3}){0,2})\\b`; // extlang = 3ALPHA *2("-" 3ALPHA)
+
+ const language = '\\b(?:' + // language =
+ `${ALPHA}{2,3}` + // 2*3ALPHA ; shortest ISO 639 code
+ `\\b(?:-${extlang})?` + // ["-" extlang] ; sometimes followed by extended language subtags
+ // `|${ALPHA}{4}` + // / 4ALPHA ; or reserved for future use
+ // `|${ALPHA}{5,8}` + // / 5*8ALPHA ; or registered language subtag
+ `|${ALPHA}{4,8}` + // ~/ 4*8ALPHA ; (paraphrased: combined previous two lines)
+ ')\\b';
+
+ // below: ${language}, ${script}, and ${region} are wrapped in parens because matching groups are useful for replacement
+ const LANG_TAG_BASE = `\\b(${language})\\b` + // langtag = language
+ `\\b(?:-(${script}))?\\b` + // ["-" script]
+ `\\b(?:-(${region}))?\\b` ; // ["-" region]
+ const LANG_TAG_EXT = `\\b(?:-${variant})*\\b` + // *("-" variant)
+ `\\b((?:-${extension})*)\\b` + // *("-" extension)
+ `\\b(?:-${privateuse})?\\b` ; // ["-" privateuse]
+ const langtag = `\\b${LANG_TAG_BASE}\\b${LANG_TAG_EXT}\\b`;
+
+ const LANG_TAG = `\\b(?:${langtag}|${privateuse}|${grandfathered})\\b`; // Language-Tag = ...
+
+ LANG_TAG_BASE_RE = new RegExp(LANG_TAG_BASE, 'i'); // [1] language; [2] script; [3] region
+ LANG_TAG_EXT_RE = new RegExp(LANG_TAG_EXT, 'i'); // [1] extensions /((${extension})-)*/
+ LANG_TAG_RE = new RegExp(LANG_TAG, 'i'); // [1] language; [2] script; [3] region; [4] extensions
+ }
+
+ function IsWellFormedCurrencyCode(code) {
+ code = Internal.ToString(code);
+
+ if (!CURRENCY_CODE_RE) {
+ InitializeCurrencyRegExp();
+ }
+
+ return platform.builtInRegexMatch(code, CURRENCY_CODE_RE) !== null;
+ }
+
+ // Make sure locales is an array, remove duplicate locales, make sure each locale is valid, and canonicalize each.
+ function CanonicalizeLocaleList(locales) {
+ if (typeof locales === 'undefined') {
+ return [];
+ }
+
+ if (typeof locales === 'string') {
+ locales = [locales];
+ }
+
+ locales = Internal.ToObject(locales);
+ const length = Internal.ToUint32(locales.length);
+
+ // TODO: Use sets here to prevent duplicates
+ let seen = [];
+
+ forEachIfPresent(locales, length, function (locale) {
+ if ((typeof locale !== 'string' && typeof locale !== 'object') || locale === null) {
+ platform.raiseNeedObjectOrString("Locale");
+ }
+
+ let tag = Internal.ToString(locale);
+
+ if (!IsWellFormedLanguageTag(tag)) {
+ platform.raiseLocaleNotWellFormed(String(tag));
+ }
+
+ tag = platform.normalizeLanguageTag(tag);
+
+ if (tag !== undefined && callInstanceFunc(ArrayInstanceIndexOf, seen, tag) === -1) {
+ callInstanceFunc(ArrayInstancePush, seen, tag);
+ }
+ });
+
+ return seen;
+ }
+
+ function LookupSupportedLocales(requestedLocales, fitter, defaultLocale) {
+ var subset = [];
+ var count = 0;
+ callInstanceFunc(ArrayInstanceForEach, requestedLocales, function (locale) {
+ try {
+ var resolved = resolveLocaleHelper(locale, fitter, undefined, defaultLocale);
+ if (resolved.locale) {
+ ObjectDefineProperty(subset, count, { value: resolved.locale, writable: false, configurable: false, enumerable: true });
+ count = count + 1;
+ }
+ } catch (ex) {
+ throwExIfOOMOrSOE(ex);
+ // Expecting an error (other than OOM or SOE), same as fitter returning undefined
+ }
+ });
+ ObjectDefineProperty(subset, "length", { value: count, writable: false, configurable: false });
+ return subset;
+ }
+
+ var supportedLocalesOfWrapper = function (that, functionName, locales, options) {
+ if (that === null || that === undefined) {
+ platform.raiseNotAConstructor(functionName);
+ }
+
+ var hiddenObj = platform.getHiddenObject(that);
+ if (!hiddenObj || hiddenObj.isValid !== "Valid") {
+ platform.raiseNotAConstructor(functionName);
+ }
+
+ return supportedLocalesOf(locales, options);
+ }
+
+ var canonicalizeLocaleListWrapper = function (that, functionName, locales) {
+ if (that === null || that === undefined) {
+ platform.raiseNotAConstructor(functionName);
+ }
+
+ var hiddenObj = platform.getHiddenObject(that);
+ if (!hiddenObj || hiddenObj.isValid !== "Valid") {
+ platform.raiseNotAConstructor(functionName);
+ }
+
+ return CanonicalizeLocaleList(locales);
+ }
+
+ // Shared among all the constructors
+ var supportedLocalesOf = function (locales, options) {
+ var matcher;
+ locales = CanonicalizeLocaleList(locales);
+
+ if (typeof options !== 'undefined') {
+ matcher = options.localeMatcher;
+
+ if (typeof matcher !== 'undefined') {
+ matcher = Internal.ToString(matcher);
+
+ if (matcher !== 'lookup' && matcher !== 'best fit') {
+ platform.raiseOptionValueOutOfRange_3(String(matcher), "localeMatcher", "['best fit', 'lookup']");
+ }
+ }
+ }
+
+ if (typeof matcher === 'undefined' || matcher === 'best fit') {
+ return LookupSupportedLocales(locales, resolveLocaleBestFit, platform.normalizeLanguageTag(strippedDefaultLocale()));
+ } else {
+ return LookupSupportedLocales(locales, resolveLocaleLookup, strippedDefaultLocale());
+ }
+ };
+
+ const intlStaticMethodThisArg = setPrototype({}, null);
+ platform.setHiddenObject(intlStaticMethodThisArg, setPrototype({ isValid: "Valid" }, null));
+
+ // We wrap these functions so that we can define the correct name for this function for each Intl constructor,
+ // which allows us to display the correct error message for each Intl type.
+ const collator_supportedLocalesOf_name = "Intl.Collator.supportedLocalesOf";
+ const collator_supportedLocalesOf = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(collator_supportedLocalesOf_name,
+ function collator_supportedLocalesOf_dummyName(locales) {
+ const options = arguments.length < 2 ? undefined : arguments[1];
+ return supportedLocalesOfWrapper(this, collator_supportedLocalesOf_name, locales, options);
+ }), intlStaticMethodThisArg);
+
+ const numberFormat_supportedLocalesOf_name = "Intl.NumberFormat.supportedLocalesOf";
+ const numberFormat_supportedLocalesOf = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(numberFormat_supportedLocalesOf_name,
+ function numberFormat_supportedLocalesOf_dummyName(locales) {
+ const options = arguments.length < 2 ? undefined : arguments[1];
+ return supportedLocalesOfWrapper(this, numberFormat_supportedLocalesOf_name, locales, options);
+ }), intlStaticMethodThisArg);
+
+ const dateTimeFormat_supportedLocalesOf_name = "Intl.DateTimeFormat.supportedLocalesOf";
+ const dateTimeFormat_supportedLocalesOf = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(dateTimeFormat_supportedLocalesOf_name,
+ function dateTimeFormat_supportedLocalesOf_dummyName(locales) {
+ const options = arguments.length < 2 ? undefined : arguments[1];
+ return supportedLocalesOfWrapper(this, dateTimeFormat_supportedLocalesOf_name, locales, options);
+ }), intlStaticMethodThisArg);
+
+ const getCanonicalLocales_name = "Intl.getCanonicalLocales";
+ const getCanonicalLocales = callInstanceFunc(FunctionInstanceBind, tagPublicFunction(getCanonicalLocales_name,
+ function getCanonicalLocales_dummyName(locales) {
+ return canonicalizeLocaleListWrapper(this, getCanonicalLocales_name, locales);
+ }), intlStaticMethodThisArg);
+
+ // TODO: Bound functions get the "bound" prefix by default, so we need to remove it.
+ // When https://github.com/Microsoft/ChakraCore/issues/637 is fixed and we have a way
+ // to make built-in functions non-constructible, we can remove the call to
+ // Function.prototype.bind (i.e. FunctionInstanceBind) and just rely on tagging instead of setting the "name" manually.
+ ObjectDefineProperty(collator_supportedLocalesOf, 'name', { value: 'supportedLocalesOf' });
+ ObjectDefineProperty(numberFormat_supportedLocalesOf, 'name', { value: 'supportedLocalesOf' });
+ ObjectDefineProperty(dateTimeFormat_supportedLocalesOf, 'name', { value: 'supportedLocalesOf' });
+ ObjectDefineProperty(getCanonicalLocales, 'name', { value: 'getCanonicalLocales' });
+
+ // If an empty string is encountered for the value of the property; that means that is by default.
+ // So in the case of zh-TW; "default" and "stroke" are the same.
+ // This list was discussed with AnBorod, AnGlass and SureshJa.
+ var localesAcceptingCollationValues = setPrototype({
+ "es-ES": setPrototype({ "trad": "tradnl" }, null),
+ "lv-LV": setPrototype({ "trad": "tradnl" }, null),
+ "de-DE": setPrototype({ "phonebk": "phoneb" }, null),
+ "ja-JP": setPrototype({ "unihan": "radstr" }, null),
+ // We believe "pronun" means "pronunciation"
+ "zh-TW": setPrototype({ "phonetic": "pronun", "unihan": "radstr", "stroke": "" }, null),
+ "zh-HK": setPrototype({ "unihan": "radstr", "stroke": "" }, null),
+ "zh-MO": setPrototype({ "unihan": "radstr", "stroke": "" }, null),
+ "zh-CN": setPrototype({ "stroke": "stroke", "pinyin": "" }, null),
+ "zh-SG": setPrototype({ "stroke": "stroke", "pinyin": "" }, null)
+
+ // The following locales are supported by Windows; however, no BCP47 equivalent collation values were found for these.
+ // In future releases; this list (plus most of the Collator implementation) will be changed/removed as the platform support is expected to change.
+ // "hu-HU": ["technl"],
+ // "ka-GE": ["modern"],
+ // "x-IV": ["mathan"]
+ }, null);
+
+ // reverses the keys and values in each locale's sub-object in localesAcceptingCollationValues
+ // localesAcceptingCollationValues[locale][key] = value -> reverseLocalesAcceptingCollationValues[locale][value] = key
+ var reverseLocalesAcceptingCollationValues = (function () {
+ const toReturn = setPrototype({}, null);
+ callInstanceFunc(ArrayInstanceForEach, ObjectGetOwnPropertyNames(localesAcceptingCollationValues), function (locale) {
+ const collationValuesForLocale = localesAcceptingCollationValues[locale];
+ const reversedCollationValues = setPrototype({}, null);
+
+ callInstanceFunc(ArrayInstanceForEach, ObjectGetOwnPropertyNames(collationValuesForLocale), function (collation) {
+ const windowsTag = collationValuesForLocale[collation];
+ if (windowsTag !== "") {
+ reversedCollationValues[windowsTag] = collation;
+ }
+ });
+
+ toReturn[locale] = reversedCollationValues;
+ });
+ return toReturn;
+ }());
+
+ // mappedDefaultLocale will get the default locale and update any deprecated
+ // collation/sort order values it may use
+ let __mappedDefaultLocale = undefined;
+ var mappedDefaultLocale = function () {
+ if (__mappedDefaultLocale && platform.useCaches) {
+ return __mappedDefaultLocale;
+ }
+
+ let locale = undefined;
+ let collation = undefined;
+ if (isPlatformUsingICU) {
+ // ICU's getDefaultLocale() will return a valid BCP-47/RFC 5646 langtag
+ locale = GetDefaultLocale();
+ const match = platform.builtInRegexMatch(locale, /-u(?:-[^\-][^\-]?-[^\-]+)*-co-([^\-]+).*/);
+ if (match) {
+ // if the system default locale had a collation, strip it for now
+ // we will add the collation back later in this function
+ collation = match[1];
+ locale = callInstanceFunc(StringInstanceReplace, locale, `-co-${collation}`, "");
+ }
+ } else {
+ // Windows' getDefaultLocale() will return a RFC4646 langtag
+ const parts = platform.builtInRegexMatch(GetDefaultLocale(), /([^_]*)_?(.+)?/);
+ locale = parts[1];
+ collation = parts[2];
+ }
+
+ if (collation === undefined) {
+ __mappedDefaultLocale = locale;
+ return __mappedDefaultLocale;
+ }
+
+ // we stripped the -co-collation or _collation above, so this function adds it back
+ const createLocaleCollationString = function (finalLocale, finalCollation) {
+ if (isPlatformUsingICU) {
+ return `${finalLocale}-co-${finalCollation}`;
+ } else {
+ return `${finalLocale}-u-co-${finalCollation}`;
+ }
+ };
+
+ const collationMapForLocale = reverseLocalesAcceptingCollationValues[locale];
+ if (collationMapForLocale === undefined) {
+ // Assume the system wouldn't give us back a bad collation value
+ __mappedDefaultLocale = createLocaleCollationString(locale, collation);
+ return __mappedDefaultLocale;
+ }
+
+ const mappedCollation = collationMapForLocale[collation];
+ if (mappedCollation !== undefined) {
+ __mappedDefaultLocale = createLocaleCollationString(locale, mappedCollation);
+ } else {
+ __mappedDefaultLocale = createLocaleCollationString(locale, collation);
+ }
+
+ return __mappedDefaultLocale;
+ };
+
+ // Intl.Collator, String.prototype.localeCompare
+ var Collator = (function () {
+
+ if (InitType === 'Intl' || InitType === 'String') {
+
+ function InitializeCollator(collator, localeList, options) {
+ if (typeof collator != "object") {
+ platform.raiseNeedObject();
+ }
+
+ if (callInstanceFunc(ObjectInstanceHasOwnProperty, collator, '__initializedIntlObject') && collator.__initializedIntlObject) {
+ platform.raiseObjectIsAlreadyInitialized("Collator", "Collator");
+ }
+
+ collator.__initializedIntlObject = true;
+
+ // Extract options
+ if (typeof options === 'undefined') {
+ options = setPrototype({}, null);
+ } else {
+ options = Internal.ToObject(options);
+ }
+
+ var matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
+ var usage = GetOption(options, "usage", "string", ["sort", "search"], "sort");
+ var sensitivity = GetOption(options, "sensitivity", "string", ["base", "accent", "case", "variant"], undefined);
+ var ignorePunctuation = GetOption(options, "ignorePunctuation", "boolean", undefined, false);
+ var caseFirst = GetOption(options, "caseFirst", "string", ["upper", "lower", "false"], undefined);
+ var numeric = GetOption(options, "numeric", "boolean", [true, false], undefined);
+
+ // Deal with the locales and extensions
+ localeList = CanonicalizeLocaleList(localeList);
+ var resolvedLocaleInfo = resolveLocales(localeList, matcher, undefined, mappedDefaultLocale);
+
+ var collation = "default";
+ var resolvedLocaleLookup = resolveLocaleLookup(resolvedLocaleInfo.localeWithoutSubtags);
+ var collationAugmentedLocale = resolvedLocaleLookup;
+
+ if (resolvedLocaleInfo.subTags) {
+ callInstanceFunc(ArrayInstanceForEach, resolvedLocaleInfo.subTags, function (subTag) {
+ var parts = platform.builtInRegexMatch(subTag, /([^-]*)-?(.*)?/); // [0] entire thing; [1] key; [2] value
+ var key = parts[1];
+ var value = parts[2] === "" ? undefined : parts[2];
+ if (key === "kf" && caseFirst === undefined) {
+ caseFirst = GetOption(setPrototype({ caseFirst: value }, null), "caseFirst", "string", ["upper", "lower", "false"], undefined);
+ } else if (key === "kn" && numeric === undefined) {
+ if (value !== undefined) {
+ numeric = Internal.ToLogicalBoolean(callInstanceFunc(StringInstanceToLowerCase, value) === "true");
+ } else {
+ numeric = true;
+ }
+ } else if (key === "co" && value !== undefined && value !== "default" && value !== "search" && value !== "sort" && value !== "standard") {
+ // Ignore these collation values as they shouldn't have any impact
+ collation = value;
+ }
+ });
+ }
+ if (collation !== "default") {
+ var accepedCollationForLocale = localesAcceptingCollationValues[collationAugmentedLocale];
+ var windowsCollation = "";
+ if (accepedCollationForLocale !== undefined && (windowsCollation = accepedCollationForLocale[collation]) !== undefined) {
+ if (windowsCollation !== "") {
+ collationAugmentedLocale = collationAugmentedLocale + "_" + windowsCollation;
+ }
+ }
+ else {
+ collation = "default";
+ }
+ }
+
+ // Correct options if need be.
+ if (caseFirst === undefined) {
+ try {
+ var num = platform.compareString('A', 'a', resolvedLocaleLookup, undefined, undefined, undefined);
+ } catch (e) {
+ // Rethrow OOM or SOE
+ throwExIfOOMOrSOE(e);
+
+ // Otherwise, Generic message to cover the exception throw from the CompareStringEx api.
+ // The platform's exception is also generic and in most if not all cases specifies that "a" argument is invalid.
+ // We have no other information from the platform on the cause of the exception.
+ platform.raiseOptionValueOutOfRange();
+ }
+
+ if (num === 0) {
+ caseFirst = 'false';
+ } else if (num === -1) {
+ caseFirst = 'upper';
+ } else {
+ caseFirst = 'lower';
+ }
+ }
+
+ if (sensitivity === undefined) {
+ sensitivity = "variant";
+ }
+
+ if (numeric === undefined) {
+ numeric = false;
+ }
+
+ // Set the options on the object
+ collator.__matcher = matcher;
+ collator.__locale = resolvedLocaleInfo.localeWithoutSubtags;
+ collator.__localeForCompare = collationAugmentedLocale;
+ collator.__usage = usage;
+ collator.__sensitivity = sensitivity;
+ collator.__ignorePunctuation = ignorePunctuation;
+ collator.__caseFirst = caseFirst;
+ collator.__numeric = numeric;
+ collator.__collation = collation;
+ collator.__initializedCollator = true;
+ }
+
+ platform.registerBuiltInFunction(tagPublicFunction("String.prototype.localeCompare", function () {
+ var that = arguments[0];
+ if (this === undefined || this === null) {
+ platform.raiseThis_NullOrUndefined("String.prototype.localeCompare");
+ }
+ else if (that === null) {
+ platform.raiseNeedObject();
+ }
+ // ToString must be called on this/that argument before we do any other operation, as other operations in InitializeCollator may also be observable
+ var thisArg = String(this);
+ var that = String(that);
+ var stateObject = setPrototype({}, null);
+ InitializeCollator(stateObject, arguments[1], arguments[2]);
+ return Number(platform.compareString(thisArg, that, stateObject.__localeForCompare, stateObject.__sensitivity, stateObject.__ignorePunctuation, stateObject.__numeric));
+ }), 4);
+
+ if (InitType === 'Intl') {
+
+ function Collator() {
+ // The function should have length of 0, hence we are getting arguments this way.
+ // While it's true that we could just do e.g. arguments[0] and get undefined if it is not present,
+ // that makes assumptions that the JIT must check. This pattern is marginally more efficient.
+ var locales = undefined;
+ var options = undefined;
+ if (arguments.length >= 1) locales = arguments[0];
+ if (arguments.length >= 2) options = arguments[1];
+
+ if (this === Intl || this === undefined) {
+ return new Collator(locales, options);
+ }
+
+ var obj = Internal.ToObject(this);
+ if (!ObjectIsExtensible(obj)) {
+ platform.raiseObjectIsNonExtensible("Collator");
+ }
+
+ // Use the hidden object to store data
+ var hiddenObject = platform.getHiddenObject(obj);
+
+ if (hiddenObject === undefined) {
+ hiddenObject = setPrototype({}, null);
+ platform.setHiddenObject(obj, hiddenObject);
+ }
+
+ InitializeCollator(hiddenObject, locales, options);
+
+ // Add the bound compare
+ hiddenObject.__boundCompare = callInstanceFunc(FunctionInstanceBind, compare, obj);
+ delete hiddenObject.__boundCompare.name;
+ return obj;
+ }
+ tagPublicFunction("Intl.Collator", Collator);
+
+ function compare(a, b) {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
+ }
+
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedCollator) {
+ platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
+ }
+
+ a = String(a);
+ b = String(b);
+
+ return Number(platform.compareString(a, b, hiddenObject.__localeForCompare, hiddenObject.__sensitivity, hiddenObject.__ignorePunctuation, hiddenObject.__numeric));
+ }
+ tagPublicFunction("Intl.Collator.prototype.compare", compare);
+
+ ObjectDefineProperty(Collator, 'supportedLocalesOf', { value: collator_supportedLocalesOf, writable: true, configurable: true });
+
+ ObjectDefineProperty(Collator, 'prototype', { value: new Collator(), writable: false, enumerable: false, configurable: false });
+ setPrototype(Collator.prototype, Object.prototype);
+
+ ObjectDefineProperty(Collator.prototype, 'constructor', { value: Collator, writable: true, enumerable: false, configurable: true });
+
+ ObjectDefineProperty(Collator.prototype, 'resolvedOptions', {
+ value: function resolvedOptions() {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("Collator.prototype.resolvedOptions", "Collator");
+ }
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedCollator) {
+ platform.raiseNeedObjectOfType("Collator.prototype.resolvedOptions", "Collator");
+ }
+
+ return {
+ locale: hiddenObject.__locale,
+ usage: hiddenObject.__usage,
+ sensitivity: hiddenObject.__sensitivity,
+ ignorePunctuation: hiddenObject.__ignorePunctuation,
+ collation: hiddenObject.__collation, // "co" unicode extension
+ numeric: hiddenObject.__numeric, // "ka" unicode extension TODO: Determine if this is supported (doesn't have to be)
+ caseFirst: hiddenObject.__caseFirst // "kf" unicode extension TODO: Determine if this is supported (doesn't have to be)
+ }
+ }, writable: true, enumerable: false, configurable: true
+ });
+
+ ObjectDefineProperty(Collator.prototype, 'compare', {
+ get: tagPublicFunction('get compare', function () {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
+ }
+
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedCollator) {
+ platform.raiseNeedObjectOfType("Collator.prototype.compare", "Collator");
+ }
+
+ return hiddenObject.__boundCompare;
+ }), enumerable: false, configurable: true
+ });
+
+ return Collator;
+ }
+ }
+ // 'Init.Collator' not defined if reached here. Return 'undefined'
+ return undefined;
+ })();
+
+ // Intl.NumberFormat, Number.prototype.toLocaleString
+ var NumberFormat = (function () {
+ // Keep these "enums" in sync with lib/Runtime/PlatformAgnostic/Intl.h
+ const NumberFormatStyle = setPrototype({
+ DEFAULT: 0, // "decimal" is the default
+ DECIMAL: 0, // Intl.NumberFormat(locale, { style: "decimal" }); // aka in our code as "number"
+ PERCENT: 1, // Intl.NumberFormat(locale, { style: "percent" });
+ CURRENCY: 2, // Intl.NumberFormat(locale, { style: "currency", ... });
+ MAX: 3
+ }, null);
+ const NumberFormatCurrencyDisplay = setPrototype({
+ DEFAULT: 0, // "symbol" is the default
+ SYMBOL: 0, // Intl.NumberFormat(locale, { style: "currency", currencyDisplay: "symbol" }); // e.g. "$" or "US$" depeding on locale
+ CODE: 1, // Intl.NumberFormat(locale, { style: "currency", currencyDisplay: "code" }); // e.g. "USD"
+ NAME: 2, // Intl.NumberFormat(locale, { style: "currency", currencyDisplay: "name" }); // e.g. "US dollar"
+ MAX: 3
+ }, null);
+
+ if (InitType === 'Intl' || InitType === 'Number') {
+ function InitializeNumberFormat(numberFormat, localeList, options) {
+ if (typeof numberFormat != "object") {
+ platform.raiseNeedObject();
+ }
+
+ if (callInstanceFunc(ObjectInstanceHasOwnProperty, numberFormat, '__initializedIntlObject') && numberFormat.__initializedIntlObject) {
+ platform.raiseObjectIsAlreadyInitialized("NumberFormat", "NumberFormat");
+ }
+
+ numberFormat.__initializedIntlObject = true;
+
+ // Extract options
+ if (typeof options === 'undefined') {
+ options = setPrototype({}, null);
+ } else {
+ options = Internal.ToObject(options);
+ }
+
+ var matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
+ var style = GetOption(options, "style", "string", ["decimal", "percent", "currency"], "decimal");
+
+ var formatterToUse = NumberFormatStyle.DECIMAL; // DEFAULT
+ if (style === 'percent') {
+ formatterToUse = NumberFormatStyle.PERCENT;
+ } else if (style === 'currency') {
+ formatterToUse = NumberFormatStyle.CURRENCY;
+ }
+
+ var currency = GetOption(options, "currency", "string", undefined, undefined);
+ var currencyDisplay = GetOption(options, 'currencyDisplay', 'string', ['code', 'symbol', 'name'], 'symbol');
+ var currencyDigits = undefined;
+
+ var minimumIntegerDigits = GetNumberOption(options, 'minimumIntegerDigits', 1, 21, 1);
+ var minimumFractionDigits = undefined;
+ var maximumFractionDigits = undefined;
+ var maximumFractionDigitsDefault = undefined;
+
+ var minimumSignificantDigits = options.minimumSignificantDigits;
+ var maximumSignificantDigits = options.maximumSignificantDigits;
+
+ if (typeof minimumSignificantDigits !== 'undefined' || typeof maximumSignificantDigits !== 'undefined') {
+ minimumSignificantDigits = GetNumberOption(options, 'minimumSignificantDigits', 1, 21, 1);
+ maximumSignificantDigits = GetNumberOption(options, 'maximumSignificantDigits', minimumSignificantDigits, 21, 21);
+ }
+
+ var useGrouping = GetOption(options, 'useGrouping', 'boolean', undefined, true);
+
+ // Deal with the locales and extensions
+ localeList = CanonicalizeLocaleList(localeList);
+ var resolvedLocaleInfo = resolveLocales(localeList, matcher, ["nu"], strippedDefaultLocale);
+
+ // Correct the options if necessary
+ if (typeof currency !== 'undefined' && !IsWellFormedCurrencyCode(currency)) {
+ platform.raiseInvalidCurrencyCode(String(currency));
+ }
+
+ if (style === "currency") {
+ if (typeof currency === 'undefined') {
+ platform.raiseMissingCurrencyCode();
+ }
+ currency = callInstanceFunc(StringInstanceToUpperCase, currency);
+ try {
+ currencyDigits = platform.currencyDigits(currency);
+ } catch (e) {
+ throwExIfOOMOrSOE(e);
+ platform.raiseInvalidCurrencyCode(String(currency));
+ }
+ minimumFractionDigits = GetNumberOption(options, 'minimumFractionDigits', 0, 20, currencyDigits);
+ maximumFractionDigitsDefault = Math.max(currencyDigits, minimumFractionDigits);
+ } else {
+ currency = undefined;
+ currencyDisplay = undefined;
+ minimumFractionDigits = GetNumberOption(options, 'minimumFractionDigits', 0, 20, 0);
+ if (style === "percent") {
+ maximumFractionDigitsDefault = Math.max(minimumFractionDigits, 0);
+ } else {
+ maximumFractionDigitsDefault = Math.max(minimumFractionDigits, 3)
+ }
+ }
+
+ maximumFractionDigits = GetNumberOption(options, 'maximumFractionDigits', minimumFractionDigits, 20, maximumFractionDigitsDefault);
+
+ // Set the options on the object
+ numberFormat.__localeMatcher = matcher;
+ numberFormat.__locale = resolvedLocaleInfo.locale;
+ numberFormat.__style = style;
+
+ if (currency !== undefined) {
+ numberFormat.__currency = currency;
+ }
+
+ if (currencyDisplay !== undefined) {
+ numberFormat.__currencyDisplay = currencyDisplay;
+ numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.DEFAULT;
+ if (currencyDisplay === "symbol") {
+ numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.SYMBOL;
+ } else if (currencyDisplay === "code") {
+ numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.CODE;
+ } else if (currencyDisplay === "name") {
+ numberFormat.__currencyDisplayToUse = NumberFormatCurrencyDisplay.NAME;
+ }
+ }
+
+ numberFormat.__minimumIntegerDigits = minimumIntegerDigits;
+ numberFormat.__minimumFractionDigits = minimumFractionDigits;
+ numberFormat.__maximumFractionDigits = maximumFractionDigits;
+
+ if (maximumSignificantDigits !== undefined) {
+ numberFormat.__minimumSignificantDigits = minimumSignificantDigits;
+ numberFormat.__maximumSignificantDigits = maximumSignificantDigits;
+ }
+
+ numberFormat.__formatterToUse = formatterToUse;
+ numberFormat.__useGrouping = useGrouping;
+
+ try {
+ // Cache api instance and update numbering system on the object
+ CacheNumberFormat(numberFormat);
+ }
+ catch (e) {
+ throwExIfOOMOrSOE(e);
+ // Generic message to cover the exception throw from the platform.
+ // The platform's exception is also generic and in most if not all cases specifies that "a" argument is invalid.
+ // We have no other information from the platform on the cause of the exception.
+ platform.raiseOptionValueOutOfRange();
+ }
+
+ if (!numberFormat.__numberingSystem)
+ {
+ numberFormat.__numberingSystem = "latn"; // assume Latin numerals by default
+ }
+
+ numberFormat.__numberingSystem = callInstanceFunc(StringInstanceToLowerCase, numberFormat.__numberingSystem);
+ numberFormat.__initializedNumberFormat = true;
+ }
+
+ platform.registerBuiltInFunction(tagPublicFunction("Number.prototype.toLocaleString", function () {
+ if ((typeof this) !== 'number' && !(this instanceof Number)) {
+ platform.raiseNeedObjectOfType("Number.prototype.toLocaleString", "Number");
+ }
+
+ var stateObject = setPrototype({}, null);
+ InitializeNumberFormat(stateObject, arguments[0], arguments[1]);
+
+ var n = Internal.ToNumber(this);
+ // Need to special case the '-0' case to format as 0 instead of -0.
+ return String(platform.formatNumber(n === -0 ? 0 : n, stateObject));
+ }), 3);
+
+ if (InitType === 'Intl') {
+ function NumberFormat() {
+ // The function should have length of 0, hence we are getting arguments this way.
+ // While it's true that we could just do e.g. arguments[0] and get undefined if it is not present,
+ // that makes assumptions that the JIT must check. This pattern is marginally more efficient.
+ let locales = undefined;
+ let options = undefined;
+ if (arguments.length >= 1) locales = arguments[0];
+ if (arguments.length >= 2) options = arguments[1];
+
+ if (this === Intl || this === undefined) {
+ return new NumberFormat(locales, options);
+ }
+
+ let obj = Internal.ToObject(this);
+
+ if (!ObjectIsExtensible(obj)) {
+ platform.raiseObjectIsNonExtensible("NumberFormat");
+ }
+
+ // Use the hidden object to store data
+ let hiddenObject = platform.getHiddenObject(obj);
+
+ if (hiddenObject === undefined) {
+ hiddenObject = setPrototype({}, null);
+ platform.setHiddenObject(obj, hiddenObject);
+ }
+
+ InitializeNumberFormat(hiddenObject, locales, options);
+
+ hiddenObject.__boundFormat = callInstanceFunc(FunctionInstanceBind, format, obj)
+ delete hiddenObject.__boundFormat.name;
+
+ return obj;
+ }
+ tagPublicFunction("Intl.NumberFormat", NumberFormat);
+
+ function format(n) {
+ n = Internal.ToNumber(n);
+
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
+ }
+
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedNumberFormat) {
+ platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
+ }
+
+ // Need to special case the '-0' case to format as 0 instead of -0.
+ return String(platform.formatNumber(n === -0 ? 0 : n, hiddenObject));
+ }
+ tagPublicFunction("Intl.NumberFormat.prototype.format", format);
+
+ ObjectDefineProperty(NumberFormat, 'supportedLocalesOf', { value: numberFormat_supportedLocalesOf, writable: true, configurable: true });
+
+ var options = ['locale', 'numberingSystem', 'style', 'currency', 'currencyDisplay', 'minimumIntegerDigits',
+ 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits',
+ 'useGrouping'];
+
+ ObjectDefineProperty(NumberFormat, 'prototype', { value: new NumberFormat(), writable: false, enumerable: false, configurable: false });
+ setPrototype(NumberFormat.prototype, Object.prototype);
+ ObjectDefineProperty(NumberFormat.prototype, 'constructor', { value: NumberFormat, writable: true, enumerable: false, configurable: true });
+
+ ObjectDefineProperty(NumberFormat.prototype, 'resolvedOptions', {
+ value: function resolvedOptions() {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("NumberFormat.prototype.resolvedOptions", "NumberFormat");
+ }
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedNumberFormat) {
+ platform.raiseNeedObjectOfType("NumberFormat.prototype.resolvedOptions", "NumberFormat");
+ }
+
+ var resolvedOptions = setPrototype({}, null);
+
+ callInstanceFunc(ArrayInstanceForEach, options, function (option) {
+ if (typeof hiddenObject['__' + option] !== 'undefined') {
+ resolvedOptions[option] = hiddenObject['__' + option];
+ }
+ });
+
+ return setPrototype(resolvedOptions, {});
+ }, writable: true, enumerable: false, configurable: true
+ });
+
+ ObjectDefineProperty(NumberFormat.prototype, 'format', {
+ get: tagPublicFunction('get format', function () {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
+ }
+
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedNumberFormat) {
+ platform.raiseNeedObjectOfType("NumberFormat.prototype.format", "NumberFormat");
+ }
+
+ return hiddenObject.__boundFormat;
+ }), enumerable: false, configurable: true
+ });
+
+ return NumberFormat;
+ }
+ }
+ // 'Init.NumberFormat' not defined if reached here. Return 'undefined'
+ return undefined;
+ })();
+
+ // Intl.DateTimeFormat, Date.prototype.toLocaleString, Date.prototype.toLocaleDateString, Date.prototype.toLocaleTimeString
+ var DateTimeFormat = (function () {
+
+ if (InitType === 'Intl' || InitType === 'Date') {
+ function ToDateTimeOptions(options, required, defaults) {
+ if (options === undefined) {
+ options = setPrototype({}, null);
+ } else {
+ options = Internal.ToObject(options);
+ }
+
+ var needDefaults = true;
+ if (required === "date" || required === "any") {
+ if (options.weekday !== undefined || options.year !== undefined || options.month !== undefined || options.day !== undefined) {
+ needDefaults = false;
+ }
+ }
+ if (required === "time" || required === "any") {
+ if (options.hour !== undefined || options.minute !== undefined || options.second !== undefined) {
+ needDefaults = false;
+ }
+ }
+
+ if (needDefaults && (defaults === "date" || defaults === "all")) {
+ ObjectDefineProperty(options, "year", {
+ value: "numeric", writable: true,
+ enumerable: true, configurable: true
+ });
+ ObjectDefineProperty(options, "month", {
+ value: "numeric", writable: true,
+ enumerable: true, configurable: true
+ });
+ ObjectDefineProperty(options, "day", {
+ value: "numeric", writable: true,
+ enumerable: true, configurable: true
+ });
+ }
+ if (needDefaults && (defaults === "time" || defaults === "all")) {
+ ObjectDefineProperty(options, "hour", {
+ value: "numeric", writable: true,
+ enumerable: true, configurable: true
+ });
+ ObjectDefineProperty(options, "minute", {
+ value: "numeric", writable: true,
+ enumerable: true, configurable: true
+ });
+ ObjectDefineProperty(options, "second", {
+ value: "numeric", writable: true,
+ enumerable: true, configurable: true
+ });
+ }
+ return options;
+ }
+
+ // Currently you cannot format date pieces and time pieces together, so this builds up a format template for each separately.
+ function EcmaOptionsToWindowsTemplate(options) {
+ var template = [];
+
+ if (options.weekday) {
+ if (options.weekday === 'narrow' || options.weekday === 'short') {
+ callInstanceFunc(ArrayInstancePush, template, 'dayofweek.abbreviated');
+ } else if (options.weekday === 'long') {
+ callInstanceFunc(ArrayInstancePush, template, 'dayofweek.full');
+ }
+ }
+
+ // TODO: Era not supported
+ if (options.year) {
+ if (options.year === '2-digit') {
+ callInstanceFunc(ArrayInstancePush, template, 'year.abbreviated');
+ } else if (options.year === 'numeric') {
+ callInstanceFunc(ArrayInstancePush, template, 'year.full');
+ }
+ }
+
+ if (options.month) {
+ if (options.month === '2-digit' || options.month === 'numeric') {
+ callInstanceFunc(ArrayInstancePush, template, 'month.numeric')
+ } else if (options.month === 'short' || options.month === 'narrow') {
+ callInstanceFunc(ArrayInstancePush, template, 'month.abbreviated');
+ } else if (options.month === 'long') {
+ callInstanceFunc(ArrayInstancePush, template, 'month.full');
+ }
+ }
+
+ if (options.day) {
+ callInstanceFunc(ArrayInstancePush, template, 'day');
+ }
+
+ if (options.timeZoneName) {
+ if (options.timeZoneName === "short") {
+ callInstanceFunc(ArrayInstancePush, template, 'timezone.abbreviated');
+ } else if (options.timeZoneName === "long") {
+ callInstanceFunc(ArrayInstancePush, template, 'timezone.full');
+ }
+ }
+
+ callInstanceFunc(ArrayInstanceForEach, ['hour', 'minute', 'second'], function (opt) {
+ if (options[opt]) {
+ callInstanceFunc(ArrayInstancePush, template, opt);
+ }
+ });
+
+ // TODO: Timezone Name not supported.
+ return getArrayLength(template) > 0 ? callInstanceFunc(ArrayInstanceJoin, template, ' ') : undefined;
+ }
+
+ var WindowsToEcmaCalendarMap = {
+ 'GregorianCalendar': 'gregory',
+ 'HebrewCalendar': 'hebrew',
+ 'HijriCalendar': 'islamic',
+ 'JapaneseCalendar': 'japanese',
+ 'JulianCalendar': 'julian',
+ 'KoreanCalendar': 'korean',
+ 'UmAlQuraCalendar': 'islamic-civil',
+ 'ThaiCalendar': 'thai',
+ 'TaiwanCalendar': 'taiwan'
+ };
+
+ function WindowsToEcmaCalendar(calendar) {
+ if (typeof calendar === 'undefined') {
+ return '';
+ }
+
+ return WindowsToEcmaCalendarMap[calendar] || 'gregory';
+ }
+
+ // Certain formats have similar patterns on both ecma and windows; will use helper methods for them
+ function correctWeekdayEraMonthPattern(patternString, userValue, searchParam) {
+ // parts[1] is either dayofweek.solo, dayofweek, era or month; parts[2] is either abbreviated or full
+ var parts = platform.builtInRegexMatch(patternString, RegExp("{(" + searchParam + "(?:\\.solo)?)\\.([a-z]*)(?:\\([0-9]\\))?}"));
+ // If this happens that means windows removed the specific pattern (which isn't expected; but better be safe)
+ if (parts === null) {
+ RaiseAssert(new Error("Error when correcting windows returned weekday/Era/Month pattern; regex returned null. \nInput was: '" + patternString + "'\nRegex: '" + "{(" + searchParam + "(\\.solo)?)\\.([a-z]*)(\\([0-9]\\))?}'"));
+ return patternString;
+ }
+
+ if (parts[2] !== "full" && userValue === "long") {
+ return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + "." + "full" + "}");
+ } else if (userValue !== "long") {
+ return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + "." + (userValue === "short" ? "abbreviated" : "abbreviated(1)") + "}");
+ }
+ return patternString;
+ }
+
+ function correctDayHourMinuteSecondMonthPattern(patternString, userValue, searchParam) {
+ // parts[1] is either month, day, hour, minute, or second
+ // REVIEW (doilij) is it even possible to have a '.solo' (i.e. /(?:\\.solo)?/ ) in the above cases?
+ var parts = platform.builtInRegexMatch(patternString, RegExp("{(" + searchParam + ")(?:\\.solo)?\\.([a-z]*)(?:\\([0-9]\\))?}"));
+ if (parts === null) {
+ RaiseAssert(new Error("Error when correcting windows returned day/hour/minute/second/month pattern; regex returned null. \nInput was: '" + patternString + "'\nRegex: '" + "{(" + searchParam + "(\\.solo)?)\\.([a-z]*)(\\([0-9]\\))?}'"));
+ return patternString;
+ }
+
+ // Only correct the 2 digit; unless part[2] isn't integer
+ if (userValue === "2-digit") {
+ return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + ".integer(2)}");
+ } else if (parts[2] !== "integer") {
+ return callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{" + parts[1] + ".integer}");
+ }
+
+ return patternString;
+ }
+
+ // Perhaps the level of validation that we have might not be required for this method
+ function updatePatternStrings(patternString, dateTimeFormat) {
+ if (dateTimeFormat.__weekday !== undefined) {
+ patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__weekday, "dayofweek");
+ }
+
+ if (dateTimeFormat.__era !== undefined) {
+ // This is commented because not all options are supported for locales that do have era;
+ // In addition, we can't force era to be part of a locale using templates.
+ // patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__era, "era", 2);
+ }
+
+ if (dateTimeFormat.__year === "2-digit") {
+ var parts = platform.builtInRegexMatch(patternString, /\{year\.[a-z]*(\([0-9]\))?\}/);
+ if (parts === null) {
+ RaiseAssert(new Error("Error when correcting windows returned year; regex returned null"));
+ } else {
+ patternString = callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{year.abbreviated(2)}");
+ }
+ } else if (dateTimeFormat.__year === "full") {
+ var parts = platform.builtInRegexMatch(patternString, /\{year\.[a-z]*(\([0-9]\))?\}/);
+ if (parts === null) {
+ RaiseAssert(new Error("Error when correcting windows returned year; regex returned null"));
+ } else {
+ patternString = callInstanceFunc(StringInstanceReplace, patternString, parts[0], "{year.full}");
+ }
+ }
+
+ // Month partially overlaps with weekday/month; unless it's 2-digit or numeric in which case it overlaps with day/hour/minute/second
+ if (dateTimeFormat.__month !== undefined && dateTimeFormat.__month !== "2-digit" && dateTimeFormat.__month !== "numeric") {
+ patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__month, "month");
+ } else if (dateTimeFormat.__month !== undefined) {
+ patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__month, "month");
+ }
+
+ if (dateTimeFormat.__day !== undefined) {
+ patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__day, "day");
+ }
+
+ if (dateTimeFormat.__hour !== undefined) {
+ patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__hour, "hour");
+ }
+
+ if (dateTimeFormat.__minute !== undefined) {
+ patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__minute, "minute");
+ }
+
+ if (dateTimeFormat.__second !== undefined) {
+ patternString = correctDayHourMinuteSecondMonthPattern(patternString, dateTimeFormat.__second, "second");
+ }
+
+ if (dateTimeFormat.__timeZoneName !== undefined) {
+ patternString = correctWeekdayEraMonthPattern(patternString, dateTimeFormat.__timeZoneName, "timezone");
+ }
+
+ return patternString;
+ }
+
+ function InitializeDateTimeFormat(dateTimeFormat, localeList, options) {
+ if (typeof dateTimeFormat != "object") {
+ platform.raiseNeedObject();
+ }
+
+ if (callInstanceFunc(ObjectInstanceHasOwnProperty, dateTimeFormat, '__initializedIntlObject') && dateTimeFormat.__initializedIntlObject) {
+ platform.raiseObjectIsAlreadyInitialized("DateTimeFormat", "DateTimeFormat");
+ }
+
+ dateTimeFormat.__initializedIntlObject = true;
+
+ // Extract the options
+ options = ToDateTimeOptions(options, "any", "date");
+
+ var matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
+ var timeZone = GetOption(options, "timeZone", "string", undefined, undefined);
+
+ if (timeZone !== undefined) {
+ timeZone = platform.validateAndCanonicalizeTimeZone(timeZone);
+ } else {
+ timeZone = platform.getDefaultTimeZone();
+ }
+
+ if (timeZone === undefined) {
+ platform.raiseOptionValueOutOfRange();
+ }
+
+ // Format options
+ var weekday = GetOption(options, "weekday", "string", ['narrow', 'short', 'long'], undefined);
+ var era = GetOption(options, "era", "string", ['narrow', 'short', 'long'], undefined);
+ var year = GetOption(options, "year", "string", ['2-digit', 'numeric'], undefined);
+ var month = GetOption(options, "month", "string", ['2-digit', 'numeric', 'narrow', 'short', 'long'], undefined);
+ var day = GetOption(options, "day", "string", ['2-digit', 'numeric'], undefined);
+ var hour = GetOption(options, "hour", "string", ['2-digit', 'numeric'], undefined);
+ var minute = GetOption(options, "minute", "string", ['2-digit', 'numeric'], undefined);
+ var second = GetOption(options, "second", "string", ['2-digit', 'numeric'], undefined);
+ var timeZoneName = GetOption(options, "timeZoneName", "string", ['short', 'long'], undefined);
+
+ var hour12 = hour ? GetOption(options, "hour12", "boolean", undefined, undefined) : undefined;
+ var formatMatcher = GetOption(options, "formatMatcher", "string", ["basic", "best fit"], "best fit");
+
+ var windowsClock = hour12 !== undefined ? (hour12 ? "12HourClock" : "24HourClock") : undefined;
+
+ var templateString = EcmaOptionsToWindowsTemplate(setPrototype({
+ weekday: weekday,
+ era: era,
+ year: year,
+ month: month,
+ day: day,
+ hour: hour,
+ minute: minute,
+ second: second,
+ timeZoneName: timeZoneName
+ }, null));
+
+ // Deal with the locale
+ localeList = CanonicalizeLocaleList(localeList);
+ var resolvedLocaleInfo = resolveLocales(localeList, matcher, ["nu", "ca"], strippedDefaultLocale);
+
+ // Assign the options
+ dateTimeFormat.__matcher = matcher;
+ dateTimeFormat.__timeZone = timeZone;
+ dateTimeFormat.__locale = resolvedLocaleInfo.locale;
+
+ // Format options
+ dateTimeFormat.__weekday = weekday;
+ dateTimeFormat.__era = era;
+ dateTimeFormat.__year = year;
+ dateTimeFormat.__month = month;
+ dateTimeFormat.__day = day;
+ dateTimeFormat.__hour = hour;
+ dateTimeFormat.__minute = minute;
+ dateTimeFormat.__second = second;
+ dateTimeFormat.__timeZoneName = timeZoneName;
+
+ dateTimeFormat.__hour12 = hour12;
+ dateTimeFormat.__formatMatcher = formatMatcher;
+ dateTimeFormat.__windowsClock = windowsClock;
+
+ dateTimeFormat.__templateString = templateString;
+
+ /*
+ * NOTE:
+ * Pattern string's are position-sensitive; while templates are not.
+ * If we specify {hour.integer(2)}:{minute.integer(2)} pattern string; we will always format as HH:mm.
+ * On the other hand, template strings don't give as fine granularity for options; and the platform decides how long month.abbreviated should be.
+ * Therefore, we have to create using template strings; and then change the .abbreivated/.integer values to have correct digits count if necessary.
+ * Thus, this results in this redundant looking code to create dateTimeFormat twice.
+ */
+ var errorThrown = false;
+
+ try {
+ // Create the DateTimeFormatter to extract pattern strings
+ CreateDateTimeFormat(dateTimeFormat, false);
+ } catch (e) {
+ // Rethrow SOE or OOM
+ throwExIfOOMOrSOE(e);
+
+ // We won't throw for the first exception, but assume the template strings were rejected.
+ // Instead, we will try to fall back to default template strings.
+ var defaultOptions = ToDateTimeOptions(options, "none", "all");
+ dateTimeFormat.__templateString = EcmaOptionsToWindowsTemplate(defaultOptions, null);
+ errorThrown = true;
+ }
+
+ if (!errorThrown) {
+ // Update the pattern strings
+ dateTimeFormat.__templateString = updatePatternStrings(dateTimeFormat.__patternStrings[0], dateTimeFormat);
+ }
+
+ try {
+ // Cache the date time formatter
+ CreateDateTimeFormat(dateTimeFormat, true);
+ } catch (e) {
+ // Rethrow SOE or OOM
+ throwExIfOOMOrSOE(e);
+
+ // Otherwise, Generic message to cover the exception throw from the platform.
+ // The platform's exception is also generic and in most if not all cases specifies that "a" argument is invalid.
+ // We have no other information from the platform on the cause of the exception.
+ platform.raiseOptionValueOutOfRange();
+ }
+
+ // Correct the api's updated
+ dateTimeFormat.__calendar = WindowsToEcmaCalendar(dateTimeFormat.__windowsCalendar);
+
+ dateTimeFormat.__numberingSystem = callInstanceFunc(StringInstanceToLowerCase, dateTimeFormat.__numberingSystem);
+ if (dateTimeFormat.__hour !== undefined) {
+ dateTimeFormat.__hour12 = dateTimeFormat.__windowsClock === "12HourClock";
+ }
+ dateTimeFormat.__initializedDateTimeFormat = true;
+ }
+
+ platform.registerBuiltInFunction(tagPublicFunction("Date.prototype.toLocaleString", function () {
+ if (typeof this !== 'object' || !(this instanceof Date)) {
+ platform.raiseNeedObjectOfType("Date.prototype.toLocaleString", "Date");
+ }
+ var value = callInstanceFunc(DateInstanceGetDate, new Date(this));
+ if (isNaN(value) || !isFinite(value)) {
+ return "Invalid Date";
+ }
+ var stateObject = setPrototype({}, null);
+ InitializeDateTimeFormat(stateObject, arguments[0], ToDateTimeOptions(arguments[1], "any", "all"));
+ return String(platform.formatDateTime(Internal.ToNumber(this), stateObject));
+ }), 0);
+
+ platform.registerBuiltInFunction(tagPublicFunction("Date.prototype.toLocaleDateString", function () {
+ if (typeof this !== 'object' || !(this instanceof Date)) {
+ platform.raiseNeedObjectOfType("Date.prototype.toLocaleDateString", "Date");
+ }
+ var value = callInstanceFunc(DateInstanceGetDate, new Date(this));
+ if (isNaN(value) || !isFinite(value)) {
+ return "Invalid Date";
+ }
+ var stateObject = setPrototype({}, null);
+ InitializeDateTimeFormat(stateObject, arguments[0], ToDateTimeOptions(arguments[1], "date", "date"));
+ return String(platform.formatDateTime(Internal.ToNumber(this), stateObject));
+ }), 1);
+
+ platform.registerBuiltInFunction(tagPublicFunction("Date.prototype.toLocaleTimeString", function () {
+ if (typeof this !== 'object' || !(this instanceof Date)) {
+ platform.raiseNeedObjectOfType("Date.prototype.toLocaleTimeString", "Date");
+ }
+ var value = callInstanceFunc(DateInstanceGetDate, new Date(this));
+ if (isNaN(value) || !isFinite(value)) {
+ return "Invalid Date";
+ }
+ var stateObject = setPrototype({}, null);
+ InitializeDateTimeFormat(stateObject, arguments[0], ToDateTimeOptions(arguments[1], "time", "time"));
+ return String(platform.formatDateTime(Internal.ToNumber(this), stateObject));
+ }), 2);
+
+ if (InitType === 'Intl') {
+ function DateTimeFormat() {
+ // The function should have length of 0, hence we are getting arguments this way.
+ // While it's true that we could just do e.g. arguments[0] and get undefined if it is not present,
+ // that makes assumptions that the JIT must check. This pattern is marginally more efficient.
+ var locales = undefined;
+ var options = undefined;
+ if (arguments.length >= 1) locales = arguments[0];
+ if (arguments.length >= 2) options = arguments[1];
+
+ if (this === Intl || this === undefined) {
+ return new DateTimeFormat(locales, options);
+ }
+
+ var obj = Internal.ToObject(this);
+ if (!ObjectIsExtensible(obj)) {
+ platform.raiseObjectIsNonExtensible("DateTimeFormat");
+ }
+
+ // Use the hidden object to store data
+ var hiddenObject = platform.getHiddenObject(obj);
+
+ if (hiddenObject === undefined) {
+ hiddenObject = setPrototype({}, null);
+ platform.setHiddenObject(obj, hiddenObject);
+ }
+
+ InitializeDateTimeFormat(hiddenObject, locales, options);
+
+ hiddenObject.__boundFormat = callInstanceFunc(FunctionInstanceBind, format, obj);
+ delete hiddenObject.__boundFormat.name;
+
+ return obj;
+ }
+ tagPublicFunction("Intl.DateTimeFormat", DateTimeFormat);
+
+ function format() {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
+ }
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedDateTimeFormat) {
+ platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
+ }
+
+ if (arguments.length >= 1) {
+ if (isNaN(arguments[0]) || !isFinite(arguments[0])) {
+ platform.raiseInvalidDate();
+ }
+ return String(platform.formatDateTime(Internal.ToNumber(arguments[0]), hiddenObject));
+ }
+
+ return String(platform.formatDateTime(DateNow(), hiddenObject));
+ }
+ tagPublicFunction("Intl.DateTimeFormat.prototype.format", format);
+
+ DateTimeFormat.__relevantExtensionKeys = ['ca', 'nu'];
+
+ ObjectDefineProperty(DateTimeFormat, 'prototype', { value: new DateTimeFormat(), writable: false, enumerable: false, configurable: false });
+ setPrototype(DateTimeFormat.prototype, Object.prototype);
+ ObjectDefineProperty(DateTimeFormat.prototype, 'constructor', { value: DateTimeFormat, writable: true, enumerable: false, configurable: true });
+
+ ObjectDefineProperty(DateTimeFormat.prototype, 'format', {
+ get: tagPublicFunction('get format', function () {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
+ }
+
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedDateTimeFormat) {
+ platform.raiseNeedObjectOfType("DateTimeFormat.prototype.format", "DateTimeFormat");
+ }
+
+ return hiddenObject.__boundFormat;
+ }), enumerable: false, configurable: true
+ });
+
+ ObjectDefineProperty(DateTimeFormat.prototype, 'resolvedOptions', {
+ value: function resolvedOptions() {
+ if (typeof this !== 'object') {
+ platform.raiseNeedObjectOfType("DateTimeFormat.prototype.resolvedOptions", "DateTimeFormat");
+ }
+ var hiddenObject = platform.getHiddenObject(this);
+ if (hiddenObject === undefined || !hiddenObject.__initializedDateTimeFormat) {
+ platform.raiseNeedObjectOfType("DateTimeFormat.prototype.resolvedOptions", "DateTimeFormat");
+ }
+ var temp = setPrototype({
+ locale: hiddenObject.__locale,
+ calendar: hiddenObject.__calendar, // ca unicode extension
+ numberingSystem: hiddenObject.__numberingSystem, // nu unicode extension
+ timeZone: hiddenObject.__timeZone,
+ hour12: hiddenObject.__hour12,
+ weekday: hiddenObject.__weekday,
+ era: hiddenObject.__era,
+ year: hiddenObject.__year,
+ month: hiddenObject.__month,
+ day: hiddenObject.__day,
+ hour: hiddenObject.__hour,
+ minute: hiddenObject.__minute,
+ second: hiddenObject.__second,
+ timeZoneName: hiddenObject.__timeZoneName
+ }, null)
+ var options = setPrototype({}, null);
+ callInstanceFunc(ArrayInstanceForEach, ObjectGetOwnPropertyNames(temp), function (prop) {
+ if ((temp[prop] !== undefined || prop === 'timeZone') && callInstanceFunc(ObjectInstanceHasOwnProperty, hiddenObject, "__" + prop)) {
+ options[prop] = temp[prop];
+ }
+ }, hiddenObject);
+ return setPrototype(options, Object.prototype);
+ }, writable: true, enumerable: false, configurable: true
+ });
+
+ ObjectDefineProperty(DateTimeFormat, 'supportedLocalesOf', { value: dateTimeFormat_supportedLocalesOf, writable: true, configurable: true });
+
+ return DateTimeFormat;
+ }
+ }
+ // 'Init.DateTimeFormat' not defined if reached here. Return 'undefined'
+ return undefined;
+ })();
+
+ // Initialize Intl properties only if needed
+ if (InitType === 'Intl') {
+ ObjectDefineProperty(Intl, "Collator", { value: Collator, writable: true, enumerable: false, configurable: true });
+ ObjectDefineProperty(Intl, "NumberFormat", { value: NumberFormat, writable: true, enumerable: false, configurable: true });
+ ObjectDefineProperty(Intl, "DateTimeFormat", { value: DateTimeFormat, writable: true, enumerable: false, configurable: true });
+ ObjectDefineProperty(Intl, "getCanonicalLocales", { value: getCanonicalLocales, writable: true, enumerable: false, configurable: true });
+ }
+});
diff --git a/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters b/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters
index 13cf95f31e7..a29ec48615f 100644
--- a/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters
+++ b/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters
@@ -1,64 +1,64 @@
-
-
-
-
- Platform\Windows
-
-
- Platform\Windows
-
-
- Platform\Windows
-
-
- Platform\Windows
-
-
- Platform\Windows
-
-
- Platform\Linux
-
-
- Platform\Linux
-
-
- Platform\Linux
-
-
-
-
-
-
-
-
-
- {8f95626a-111e-4c10-874a-d2729b8d495a}
-
-
- {b7acf62f-56f2-48b3-96c0-8b680e1e5d28}
-
-
- {97c4ec36-63dc-4c58-adba-078e4e29b452}
-
-
- {3db2b9a8-b7a8-4571-8383-b4c5a6e7970f}
-
-
-
-
- Interfaces
-
-
-
-
- Interfaces
-
-
- Interfaces
-
-
- Interfaces
-
-
+
+
+
+
+ Platform\Windows
+
+
+ Platform\Windows
+
+
+ Platform\Windows
+
+
+ Platform\Windows
+
+
+ Platform\Windows
+
+
+ Platform\Linux
+
+
+ Platform\Linux
+
+
+ Platform\Linux
+
+
+
+
+
+
+
+
+
+ {8f95626a-111e-4c10-874a-d2729b8d495a}
+
+
+ {b7acf62f-56f2-48b3-96c0-8b680e1e5d28}
+
+
+ {97c4ec36-63dc-4c58-adba-078e4e29b452}
+
+
+ {3db2b9a8-b7a8-4571-8383-b4c5a6e7970f}
+
+
+
+
+ Interfaces
+
+
+
+
+ Interfaces
+
+
+ Interfaces
+
+
+ Interfaces
+
+
\ No newline at end of file
diff --git a/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt b/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt
index 63a7b89408a..6b2a30618c6 100644
--- a/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt
+++ b/deps/chakrashim/core/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt
@@ -1,49 +1,49 @@
-project(CHAKRA_PLATFORM_AGNOSTIC)
-
-set(PL_SOURCE_FILES
- Common/UnicodeText.Common.cpp
- Common/HiResTimer.cpp
- Common/DateTime.cpp
- Linux/EventTrace.cpp
- Linux/UnicodeText.ICU.cpp
- Linux/NumbersUtility.cpp
- Linux/Thread.cpp
- Linux/PerfTrace.cpp
- Common/Trace.cpp
- Common/SystemInfo.Common.cpp
- )
-
-if(CC_TARGET_OS_ANDROID OR CC_TARGET_OS_LINUX)
-set(PL_SOURCE_FILES ${PL_SOURCE_FILES}
- Linux/SystemInfo.cpp
- )
-elseif(CC_TARGET_OS_OSX)
-set(PL_SOURCE_FILES ${PL_SOURCE_FILES}
- Unix/AssemblyCommon.cpp
- Unix/SystemInfo.cpp
- )
-endif()
-
-if(ICU_INTL_ENABLED)
-set(PL_SOURCE_FILES ${PL_SOURCE_FILES}
- Common/Intl.cpp
- )
-endif()
-
-if(NOT STATIC_LIBRARY)
- # CH has a direct dependency to this project
- add_library (Chakra.Runtime.PlatformAgnostic.Singular STATIC
- ${PL_SOURCE_FILES}
- )
- target_include_directories (
- Chakra.Runtime.PlatformAgnostic.Singular PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
- )
-endif()
-
-add_library (Chakra.Runtime.PlatformAgnostic OBJECT
- ${PL_SOURCE_FILES}
- )
-
-target_include_directories (
- Chakra.Runtime.PlatformAgnostic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
- )
+project(CHAKRA_PLATFORM_AGNOSTIC)
+
+set(PL_SOURCE_FILES
+ Common/UnicodeText.Common.cpp
+ Common/HiResTimer.cpp
+ Common/DateTime.cpp
+ Linux/EventTrace.cpp
+ Linux/UnicodeText.ICU.cpp
+ Linux/NumbersUtility.cpp
+ Linux/Thread.cpp
+ Linux/PerfTrace.cpp
+ Common/Trace.cpp
+ Common/SystemInfo.Common.cpp
+ )
+
+if(CC_TARGET_OS_ANDROID OR CC_TARGET_OS_LINUX)
+set(PL_SOURCE_FILES ${PL_SOURCE_FILES}
+ Linux/SystemInfo.cpp
+ )
+elseif(CC_TARGET_OS_OSX)
+set(PL_SOURCE_FILES ${PL_SOURCE_FILES}
+ Unix/AssemblyCommon.cpp
+ Unix/SystemInfo.cpp
+ )
+endif()
+
+if(ICU_INTL_ENABLED)
+set(PL_SOURCE_FILES ${PL_SOURCE_FILES}
+ Common/Intl.cpp
+ )
+endif()
+
+if(NOT STATIC_LIBRARY)
+ # CH has a direct dependency to this project
+ add_library (Chakra.Runtime.PlatformAgnostic.Singular STATIC
+ ${PL_SOURCE_FILES}
+ )
+ target_include_directories (
+ Chakra.Runtime.PlatformAgnostic.Singular PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+endif()
+
+add_library (Chakra.Runtime.PlatformAgnostic OBJECT
+ ${PL_SOURCE_FILES}
+ )
+
+target_include_directories (
+ Chakra.Runtime.PlatformAgnostic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+ )
diff --git a/deps/chakrashim/core/lib/wabt/src/validator.cc b/deps/chakrashim/core/lib/wabt/src/validator.cc
index dd3717cb043..683157d2091 100644
--- a/deps/chakrashim/core/lib/wabt/src/validator.cc
+++ b/deps/chakrashim/core/lib/wabt/src/validator.cc
@@ -1,1164 +1,1164 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "validator.h"
-#include "config.h"
-
-#include
-#include
-#include
-#include
-
-#include "binary-reader.h"
-#include "cast.h"
-#include "error-handler.h"
-#include "ir.h"
-#include "type-checker.h"
-#include "wast-parser-lexer-shared.h"
-
-namespace wabt {
-
-namespace {
-
-class Validator {
- public:
- WABT_DISALLOW_COPY_AND_ASSIGN(Validator);
- Validator(ErrorHandler*, WastLexer*, const Script*);
-
- Result CheckModule(const Module* module);
- Result CheckScript(const Script* script);
-
- private:
- struct ActionResult {
- enum class Kind {
- Error,
- Types,
- Type,
- } kind;
-
- union {
- const TypeVector* types;
- Type type;
- };
- };
-
- struct TryContext {
- const TryExpr* try_ = nullptr;
- const Catch* catch_ = nullptr;
- };
-
- void WABT_PRINTF_FORMAT(3, 4)
- PrintError(const Location* loc, const char* fmt, ...);
- void OnTypecheckerError(const char* msg);
- Result CheckVar(Index max_index,
- const Var* var,
- const char* desc,
- Index* out_index);
- Result CheckFuncVar(const Var* var, const Func** out_func);
- Result CheckGlobalVar(const Var* var,
- const Global** out_global,
- Index* out_global_index);
- Type GetGlobalVarTypeOrAny(const Var* var);
- Result CheckFuncTypeVar(const Var* var, const FuncType** out_func_type);
- Result CheckTableVar(const Var* var, const Table** out_table);
- Result CheckMemoryVar(const Var* var, const Memory** out_memory);
- Result CheckLocalVar(const Var* var, Type* out_type);
- Type GetLocalVarTypeOrAny(const Var* var);
- void CheckAlign(const Location* loc,
- Address alignment,
- Address natural_alignment);
- void CheckType(const Location* loc,
- Type actual,
- Type expected,
- const char* desc);
- void CheckTypeIndex(const Location* loc,
- Type actual,
- Type expected,
- const char* desc,
- Index index,
- const char* index_kind);
- void CheckTypes(const Location* loc,
- const TypeVector& actual,
- const TypeVector& expected,
- const char* desc,
- const char* index_kind);
- void CheckConstTypes(const Location* loc,
- const TypeVector& actual,
- const ConstVector& expected,
- const char* desc);
- void CheckConstType(const Location* loc,
- Type actual,
- const ConstVector& expected,
- const char* desc);
- void CheckAssertReturnNanType(const Location* loc,
- Type actual,
- const char* desc);
- void CheckExprList(const Location* loc, const ExprList& exprs);
- void CheckHasMemory(const Location* loc, Opcode opcode);
- void CheckBlockSig(const Location* loc,
- Opcode opcode,
- const BlockSignature* sig);
- void CheckExpr(const Expr* expr);
- void CheckFuncSignatureMatchesFuncType(const Location* loc,
- const FuncSignature& sig,
- const FuncType* func_type);
- void CheckFunc(const Location* loc, const Func* func);
- void PrintConstExprError(const Location* loc, const char* desc);
- void CheckConstInitExpr(const Location* loc,
- const ExprList& expr,
- Type expected_type,
- const char* desc);
- void CheckGlobal(const Location* loc, const Global* global);
- void CheckLimits(const Location* loc,
- const Limits* limits,
- uint64_t absolute_max,
- const char* desc);
- void CheckTable(const Location* loc, const Table* table);
- void CheckElemSegments(const Module* module);
- void CheckMemory(const Location* loc, const Memory* memory);
- void CheckDataSegments(const Module* module);
- void CheckImport(const Location* loc, const Import* import);
- void CheckExport(const Location* loc, const Export* export_);
-
- void CheckDuplicateExportBindings(const Module* module);
- const TypeVector* CheckInvoke(const Action* action);
- Result CheckGet(const Action* action, Type* out_type);
- ActionResult CheckAction(const Action* action);
- void CheckAssertReturnNanCommand(const Action* action);
- void CheckCommand(const Command* command);
-
- void CheckExcept(const Location* loc, const Exception* Except);
- Result CheckExceptVar(const Var* var, const Exception** out_except);
-
- ErrorHandler* error_handler_ = nullptr;
- WastLexer* lexer_ = nullptr;
- const Script* script_ = nullptr;
- const Module* current_module_ = nullptr;
- const Func* current_func_ = nullptr;
- Index current_table_index_ = 0;
- Index current_memory_index_ = 0;
- Index current_global_index_ = 0;
- Index num_imported_globals_ = 0;
- Index current_except_index_ = 0;
- TypeChecker typechecker_;
- // Cached for access by OnTypecheckerError.
- const Location* expr_loc_ = nullptr;
- Result result_ = Result::Ok;
- std::vector try_contexts_;
-};
-
-Validator::Validator(ErrorHandler* error_handler,
- WastLexer* lexer,
- const Script* script)
- : error_handler_(error_handler), lexer_(lexer), script_(script) {
- typechecker_.set_error_callback(
- [this](const char* msg) { OnTypecheckerError(msg); });
-}
-
-void Validator::PrintError(const Location* loc, const char* fmt, ...) {
- result_ = Result::Error;
- va_list args;
- va_start(args, fmt);
- WastFormatError(error_handler_, loc, lexer_, fmt, args);
- va_end(args);
-}
-
-void Validator::OnTypecheckerError(const char* msg) {
- PrintError(expr_loc_, "%s", msg);
-}
-
-static bool is_power_of_two(uint32_t x) {
- return x && ((x & (x - 1)) == 0);
-}
-
-static Address get_opcode_natural_alignment(Opcode opcode) {
- Address memory_size = opcode.GetMemorySize();
- assert(memory_size != 0);
- return memory_size;
-}
-
-Result Validator::CheckVar(Index max_index,
- const Var* var,
- const char* desc,
- Index* out_index) {
- if (var->index() < max_index) {
- if (out_index)
- *out_index = var->index();
- return Result::Ok;
- }
- PrintError(&var->loc, "%s variable out of range (max %" PRIindex ")", desc,
- max_index);
- return Result::Error;
-}
-
-Result Validator::CheckFuncVar(const Var* var, const Func** out_func) {
- Index index;
- if (Failed(
- CheckVar(current_module_->funcs.size(), var, "function", &index))) {
- return Result::Error;
- }
-
- if (out_func)
- *out_func = current_module_->funcs[index];
- return Result::Ok;
-}
-
-Result Validator::CheckGlobalVar(const Var* var,
- const Global** out_global,
- Index* out_global_index) {
- Index index;
- if (Failed(
- CheckVar(current_module_->globals.size(), var, "global", &index))) {
- return Result::Error;
- }
-
- if (out_global)
- *out_global = current_module_->globals[index];
- if (out_global_index)
- *out_global_index = index;
- return Result::Ok;
-}
-
-Type Validator::GetGlobalVarTypeOrAny(const Var* var) {
- const Global* global;
- if (Succeeded(CheckGlobalVar(var, &global, nullptr)))
- return global->type;
- return Type::Any;
-}
-
-Result Validator::CheckFuncTypeVar(const Var* var,
- const FuncType** out_func_type) {
- Index index;
- if (Failed(CheckVar(current_module_->func_types.size(), var,
- "function type", &index))) {
- return Result::Error;
- }
-
- if (out_func_type)
- *out_func_type = current_module_->func_types[index];
- return Result::Ok;
-}
-
-Result Validator::CheckTableVar(const Var* var, const Table** out_table) {
- Index index;
- if (Failed(CheckVar(current_module_->tables.size(), var, "table", &index))) {
- return Result::Error;
- }
-
- if (out_table)
- *out_table = current_module_->tables[index];
- return Result::Ok;
-}
-
-Result Validator::CheckMemoryVar(const Var* var, const Memory** out_memory) {
- Index index;
- if (Failed(
- CheckVar(current_module_->memories.size(), var, "memory", &index))) {
- return Result::Error;
- }
-
- if (out_memory)
- *out_memory = current_module_->memories[index];
- return Result::Ok;
-}
-
-Result Validator::CheckLocalVar(const Var* var, Type* out_type) {
- const Func* func = current_func_;
- Index max_index = func->GetNumParamsAndLocals();
- Index index = func->GetLocalIndex(*var);
- if (index < max_index) {
- if (out_type) {
- Index num_params = func->GetNumParams();
- if (index < num_params) {
- *out_type = func->GetParamType(index);
- } else {
- *out_type = current_func_->local_types[index - num_params];
- }
- }
- return Result::Ok;
- }
-
- if (var->is_name()) {
- PrintError(&var->loc, "undefined local variable \"%s\"",
- var->name().c_str());
- } else {
- PrintError(&var->loc, "local variable out of range (max %" PRIindex ")",
- max_index);
- }
- return Result::Error;
-}
-
-Type Validator::GetLocalVarTypeOrAny(const Var* var) {
- Type type = Type::Any;
- CheckLocalVar(var, &type);
- return type;
-}
-
-void Validator::CheckAlign(const Location* loc,
- Address alignment,
- Address natural_alignment) {
- if (alignment != WABT_USE_NATURAL_ALIGNMENT) {
- if (!is_power_of_two(alignment))
- PrintError(loc, "alignment must be power-of-two");
- if (alignment > natural_alignment) {
- PrintError(loc,
- "alignment must not be larger than natural alignment (%u)",
- natural_alignment);
- }
- }
-}
-
-void Validator::CheckType(const Location* loc,
- Type actual,
- Type expected,
- const char* desc) {
- if (expected != actual) {
- PrintError(loc, "type mismatch at %s. got %s, expected %s", desc,
- GetTypeName(actual), GetTypeName(expected));
- }
-}
-
-void Validator::CheckTypeIndex(const Location* loc,
- Type actual,
- Type expected,
- const char* desc,
- Index index,
- const char* index_kind) {
- if (expected != actual && expected != Type::Any && actual != Type::Any) {
- PrintError(
- loc, "type mismatch for %s %" PRIindex " of %s. got %s, expected %s",
- index_kind, index, desc, GetTypeName(actual), GetTypeName(expected));
- }
-}
-
-void Validator::CheckTypes(const Location* loc,
- const TypeVector& actual,
- const TypeVector& expected,
- const char* desc,
- const char* index_kind) {
- if (actual.size() == expected.size()) {
- for (size_t i = 0; i < actual.size(); ++i) {
- CheckTypeIndex(loc, actual[i], expected[i], desc, i, index_kind);
- }
- } else {
- PrintError(loc, "expected %" PRIzd " %ss, got %" PRIzd, expected.size(),
- index_kind, actual.size());
- }
-}
-
-void Validator::CheckConstTypes(const Location* loc,
- const TypeVector& actual,
- const ConstVector& expected,
- const char* desc) {
- if (actual.size() == expected.size()) {
- for (size_t i = 0; i < actual.size(); ++i) {
- CheckTypeIndex(loc, actual[i], expected[i].type, desc, i, "result");
- }
- } else {
- PrintError(loc, "expected %" PRIzd " results, got %" PRIzd, expected.size(),
- actual.size());
- }
-}
-
-void Validator::CheckConstType(const Location* loc,
- Type actual,
- const ConstVector& expected,
- const char* desc) {
- TypeVector actual_types;
- if (actual != Type::Void)
- actual_types.push_back(actual);
- CheckConstTypes(loc, actual_types, expected, desc);
-}
-
-void Validator::CheckAssertReturnNanType(const Location* loc,
- Type actual,
- const char* desc) {
- // When using assert_return_nan, the result can be either a f32 or f64 type
- // so we special case it here.
- if (actual != Type::F32 && actual != Type::F64) {
- PrintError(loc, "type mismatch at %s. got %s, expected f32 or f64", desc,
- GetTypeName(actual));
- }
-}
-
-void Validator::CheckExprList(const Location* loc, const ExprList& exprs) {
- for (const Expr& expr : exprs)
- CheckExpr(&expr);
-}
-
-void Validator::CheckHasMemory(const Location* loc, Opcode opcode) {
- if (current_module_->memories.size() == 0) {
- PrintError(loc, "%s requires an imported or defined memory.",
- opcode.GetName());
- }
-}
-
-void Validator::CheckBlockSig(const Location* loc,
- Opcode opcode,
- const BlockSignature* sig) {
- if (sig->size() > 1) {
- PrintError(loc,
- "multiple %s signature result types not currently supported.",
- opcode.GetName());
- }
-}
-
-void Validator::CheckExpr(const Expr* expr) {
- expr_loc_ = &expr->loc;
-
- switch (expr->type) {
- case ExprType::Binary:
- typechecker_.OnBinary(cast(expr)->opcode);
- break;
-
- case ExprType::Block: {
- auto block_expr = cast(expr);
- CheckBlockSig(&block_expr->loc, Opcode::Block, &block_expr->block->sig);
- typechecker_.OnBlock(&block_expr->block->sig);
- CheckExprList(&block_expr->loc, block_expr->block->exprs);
- typechecker_.OnEnd();
- break;
- }
-
- case ExprType::Br:
- typechecker_.OnBr(cast(expr)->var.index());
- break;
-
- case ExprType::BrIf:
- typechecker_.OnBrIf(cast(expr)->var.index());
- break;
-
- case ExprType::BrTable: {
- auto br_table_expr = cast(expr);
- typechecker_.BeginBrTable();
- for (Var& var : *br_table_expr->targets) {
- typechecker_.OnBrTableTarget(var.index());
- }
- typechecker_.OnBrTableTarget(br_table_expr->default_target.index());
- typechecker_.EndBrTable();
- break;
- }
-
- case ExprType::Call: {
- const Func* callee;
- if (Succeeded(CheckFuncVar(&cast(expr)->var, &callee))) {
- typechecker_.OnCall(&callee->decl.sig.param_types,
- &callee->decl.sig.result_types);
- }
- break;
- }
-
- case ExprType::CallIndirect: {
- const FuncType* func_type;
- if (current_module_->tables.size() == 0) {
- PrintError(&expr->loc, "found call_indirect operator, but no table");
- }
- if (Succeeded(CheckFuncTypeVar(&cast(expr)->var,
- &func_type))) {
- typechecker_.OnCallIndirect(&func_type->sig.param_types,
- &func_type->sig.result_types);
- }
- break;
- }
-
- case ExprType::Compare:
- typechecker_.OnCompare(cast(expr)->opcode);
- break;
-
- case ExprType::Const:
- typechecker_.OnConst(cast(expr)->const_.type);
- break;
-
- case ExprType::Convert:
- typechecker_.OnConvert(cast(expr)->opcode);
- break;
-
- case ExprType::Drop:
- typechecker_.OnDrop();
- break;
-
- case ExprType::GetGlobal:
- typechecker_.OnGetGlobal(
- GetGlobalVarTypeOrAny(&cast(expr)->var));
- break;
-
- case ExprType::GetLocal:
- typechecker_.OnGetLocal(
- GetLocalVarTypeOrAny(&cast(expr)->var));
- break;
-
- case ExprType::GrowMemory:
- CheckHasMemory(&expr->loc, Opcode::GrowMemory);
- typechecker_.OnGrowMemory();
- break;
-
- case ExprType::If: {
- auto if_expr = cast(expr);
- CheckBlockSig(&if_expr->loc, Opcode::If, &if_expr->true_->sig);
- typechecker_.OnIf(&if_expr->true_->sig);
- CheckExprList(&if_expr->loc, if_expr->true_->exprs);
- if (!if_expr->false_.empty()) {
- typechecker_.OnElse();
- CheckExprList(&if_expr->loc, if_expr->false_);
- }
- typechecker_.OnEnd();
- break;
- }
-
- case ExprType::Load: {
- auto load_expr = cast(expr);
- CheckHasMemory(&load_expr->loc, load_expr->opcode);
- CheckAlign(&load_expr->loc, load_expr->align,
- get_opcode_natural_alignment(load_expr->opcode));
- typechecker_.OnLoad(load_expr->opcode);
- break;
- }
-
- case ExprType::Loop: {
- auto loop_expr = cast(expr);
- CheckBlockSig(&loop_expr->loc, Opcode::Loop, &loop_expr->block->sig);
- typechecker_.OnLoop(&loop_expr->block->sig);
- CheckExprList(&loop_expr->loc, loop_expr->block->exprs);
- typechecker_.OnEnd();
- break;
- }
-
- case ExprType::CurrentMemory:
- CheckHasMemory(&expr->loc, Opcode::CurrentMemory);
- typechecker_.OnCurrentMemory();
- break;
-
- case ExprType::Nop:
- break;
-
- case ExprType::Rethrow:
- typechecker_.OnRethrow(cast(expr)->var.index());
- break;
-
- case ExprType::Return:
- typechecker_.OnReturn();
- break;
-
- case ExprType::Select:
- typechecker_.OnSelect();
- break;
-
- case ExprType::SetGlobal:
- typechecker_.OnSetGlobal(
- GetGlobalVarTypeOrAny(&cast(expr)->var));
- break;
-
- case ExprType::SetLocal:
- typechecker_.OnSetLocal(
- GetLocalVarTypeOrAny(&cast(expr)->var));
- break;
-
- case ExprType::Store: {
- auto store_expr = cast(expr);
- CheckHasMemory(&store_expr->loc, store_expr->opcode);
- CheckAlign(&store_expr->loc, store_expr->align,
- get_opcode_natural_alignment(store_expr->opcode));
- typechecker_.OnStore(store_expr->opcode);
- break;
- }
-
- case ExprType::TeeLocal:
- typechecker_.OnTeeLocal(
- GetLocalVarTypeOrAny(&cast(expr)->var));
- break;
-
- case ExprType::Throw:
- const Exception* except;
- if (Succeeded(CheckExceptVar(&cast(expr)->var, &except))) {
- typechecker_.OnThrow(&except->sig);
- }
- break;
-
- case ExprType::TryBlock: {
- auto try_expr = cast(expr);
- TryContext context;
- context.try_ = try_expr;
- try_contexts_.push_back(context);
- CheckBlockSig(&try_expr->loc, Opcode::Try, &try_expr->block->sig);
-
- typechecker_.OnTryBlock(&try_expr->block->sig);
- CheckExprList(&try_expr->loc, try_expr->block->exprs);
-
- if (try_expr->catches.empty())
- PrintError(&try_expr->loc, "TryBlock: doesn't have any catch clauses");
- bool found_catch_all = false;
- for (const Catch* catch_ : try_expr->catches) {
- try_contexts_.back().catch_ = catch_;
- typechecker_.OnCatchBlock(&try_expr->block->sig);
- if (catch_->IsCatchAll()) {
- found_catch_all = true;
- } else {
- if (found_catch_all)
- PrintError(&catch_->loc, "Appears after catch all block");
- const Exception* except = nullptr;
- if (Succeeded(CheckExceptVar(&catch_->var, &except))) {
- typechecker_.OnCatch(&except->sig);
- }
- }
- CheckExprList(&catch_->loc, catch_->exprs);
- }
- typechecker_.OnEnd();
- try_contexts_.pop_back();
- break;
- }
-
- case ExprType::Unary:
- typechecker_.OnUnary(cast(expr)->opcode);
- break;
-
- case ExprType::Unreachable:
- typechecker_.OnUnreachable();
- break;
- }
-}
-
-void Validator::CheckFuncSignatureMatchesFuncType(const Location* loc,
- const FuncSignature& sig,
- const FuncType* func_type) {
- CheckTypes(loc, sig.result_types, func_type->sig.result_types, "function",
- "result");
- CheckTypes(loc, sig.param_types, func_type->sig.param_types, "function",
- "argument");
-}
-
-void Validator::CheckFunc(const Location* loc, const Func* func) {
- current_func_ = func;
- if (func->GetNumResults() > 1) {
- PrintError(loc, "multiple result values not currently supported.");
- // Don't run any other checks, the won't test the result_type properly.
- return;
- }
- if (func->decl.has_func_type) {
- const FuncType* func_type;
- if (Succeeded(CheckFuncTypeVar(&func->decl.type_var, &func_type))) {
- CheckFuncSignatureMatchesFuncType(loc, func->decl.sig, func_type);
- }
- }
-
- expr_loc_ = loc;
- typechecker_.BeginFunction(&func->decl.sig.result_types);
- CheckExprList(loc, func->exprs);
- typechecker_.EndFunction();
- current_func_ = nullptr;
-}
-
-void Validator::PrintConstExprError(const Location* loc, const char* desc) {
- PrintError(loc,
- "invalid %s, must be a constant expression; either *.const or "
- "get_global.",
- desc);
-}
-
-void Validator::CheckConstInitExpr(const Location* loc,
- const ExprList& exprs,
- Type expected_type,
- const char* desc) {
- Type type = Type::Void;
- if (!exprs.empty()) {
- if (exprs.size() > 1) {
- PrintConstExprError(loc, desc);
- return;
- }
-
- const Expr* expr = &exprs.front();
- loc = &expr->loc;
-
- switch (expr->type) {
- case ExprType::Const:
- type = cast(expr)->const_.type;
- break;
-
- case ExprType::GetGlobal: {
- const Global* ref_global = nullptr;
- Index ref_global_index;
- if (Failed(CheckGlobalVar(&cast(expr)->var,
- &ref_global, &ref_global_index))) {
- return;
- }
-
- type = ref_global->type;
- if (ref_global_index >= num_imported_globals_) {
- PrintError(
- loc,
- "initializer expression can only reference an imported global");
- }
-
- if (ref_global->mutable_) {
- PrintError(
- loc, "initializer expression cannot reference a mutable global");
- }
- break;
- }
-
- default:
- PrintConstExprError(loc, desc);
- return;
- }
- }
-
- CheckType(loc, type, expected_type, desc);
-}
-
-void Validator::CheckGlobal(const Location* loc, const Global* global) {
- CheckConstInitExpr(loc, global->init_expr, global->type,
- "global initializer expression");
-}
-
-void Validator::CheckLimits(const Location* loc,
- const Limits* limits,
- uint64_t absolute_max,
- const char* desc) {
- if (limits->initial > absolute_max) {
- PrintError(loc, "initial %s (%" PRIu64 ") must be <= (%" PRIu64 ")", desc,
- limits->initial, absolute_max);
- }
-
- if (limits->has_max) {
- if (limits->max > absolute_max) {
- PrintError(loc, "max %s (%" PRIu64 ") must be <= (%" PRIu64 ")", desc,
- limits->max, absolute_max);
- }
-
- if (limits->max < limits->initial) {
- PrintError(loc,
- "max %s (%" PRIu64 ") must be >= initial %s (%" PRIu64 ")",
- desc, limits->max, desc, limits->initial);
- }
- }
-}
-
-void Validator::CheckTable(const Location* loc, const Table* table) {
- if (current_table_index_ == 1)
- PrintError(loc, "only one table allowed");
- CheckLimits(loc, &table->elem_limits, UINT32_MAX, "elems");
-}
-
-void Validator::CheckElemSegments(const Module* module) {
- for (const ModuleField& field : module->fields) {
- if (auto elem_segment_field = dyn_cast(&field)) {
- ElemSegment* elem_segment = elem_segment_field->elem_segment;
- const Table* table;
- if (!Succeeded(CheckTableVar(&elem_segment->table_var, &table)))
- continue;
-
- for (const Var& var : elem_segment->vars) {
- if (!Succeeded(CheckFuncVar(&var, nullptr)))
- continue;
- }
-
- CheckConstInitExpr(&field.loc, elem_segment->offset, Type::I32,
- "elem segment offset");
- }
- }
-}
-
-void Validator::CheckMemory(const Location* loc, const Memory* memory) {
- if (current_memory_index_ == 1)
- PrintError(loc, "only one memory block allowed");
- CheckLimits(loc, &memory->page_limits, WABT_MAX_PAGES, "pages");
-}
-
-void Validator::CheckDataSegments(const Module* module) {
- for (const ModuleField& field : module->fields) {
- if (auto data_segment_field = dyn_cast(&field)) {
- DataSegment* data_segment = data_segment_field->data_segment;
- const Memory* memory;
- if (!Succeeded(CheckMemoryVar(&data_segment->memory_var, &memory)))
- continue;
-
- CheckConstInitExpr(&field.loc, data_segment->offset, Type::I32,
- "data segment offset");
- }
- }
-}
-
-void Validator::CheckImport(const Location* loc, const Import* import) {
- switch (import->kind) {
- case ExternalKind::Except:
- ++current_except_index_;
- CheckExcept(loc, import->except);
- break;
- case ExternalKind::Func:
- if (import->func->decl.has_func_type)
- CheckFuncTypeVar(&import->func->decl.type_var, nullptr);
- break;
- case ExternalKind::Table:
- CheckTable(loc, import->table);
- ++current_table_index_;
- break;
- case ExternalKind::Memory:
- CheckMemory(loc, import->memory);
- ++current_memory_index_;
- break;
- case ExternalKind::Global:
- if (import->global->mutable_) {
- PrintError(loc, "mutable globals cannot be imported");
- }
- ++num_imported_globals_;
- ++current_global_index_;
- break;
- }
-}
-
-void Validator::CheckExport(const Location* loc, const Export* export_) {
- switch (export_->kind) {
- case ExternalKind::Except:
- CheckExceptVar(&export_->var, nullptr);
- break;
- case ExternalKind::Func:
- CheckFuncVar(&export_->var, nullptr);
- break;
- case ExternalKind::Table:
- CheckTableVar(&export_->var, nullptr);
- break;
- case ExternalKind::Memory:
- CheckMemoryVar(&export_->var, nullptr);
- break;
- case ExternalKind::Global: {
- const Global* global;
- if (Succeeded(CheckGlobalVar(&export_->var, &global, nullptr))) {
- if (global->mutable_) {
- PrintError(&export_->var.loc, "mutable globals cannot be exported");
- }
- }
- break;
- }
- }
-}
-
-void Validator::CheckDuplicateExportBindings(const Module* module) {
- module->export_bindings.FindDuplicates([this](
- const BindingHash::value_type& a, const BindingHash::value_type& b) {
- // Choose the location that is later in the file.
- const Location& a_loc = a.second.loc;
- const Location& b_loc = b.second.loc;
- const Location& loc = a_loc.line > b_loc.line ? a_loc : b_loc;
- PrintError(&loc, "redefinition of export \"%s\"", a.first.c_str());
- });
-}
-
-Result Validator::CheckModule(const Module* module) {
- bool seen_start = false;
-
- current_module_ = module;
- current_table_index_ = 0;
- current_memory_index_ = 0;
- current_global_index_ = 0;
- num_imported_globals_ = 0;
- current_except_index_ = 0;
-
- for (const ModuleField& field : module->fields) {
- switch (field.type) {
- case ModuleFieldType::Except:
- ++current_except_index_;
- CheckExcept(&field.loc, cast(&field)->except);
- break;
-
- case ModuleFieldType::Func:
- CheckFunc(&field.loc, cast(&field)->func);
- break;
-
- case ModuleFieldType::Global:
- CheckGlobal(&field.loc, cast(&field)->global);
- current_global_index_++;
- break;
-
- case ModuleFieldType::Import:
- CheckImport(&field.loc, cast(&field)->import);
- break;
-
- case ModuleFieldType::Export:
- CheckExport(&field.loc, cast(&field)->export_);
- break;
-
- case ModuleFieldType::Table:
- CheckTable(&field.loc, cast(&field)->table);
- current_table_index_++;
- break;
-
- case ModuleFieldType::ElemSegment:
- // Checked below.
- break;
-
- case ModuleFieldType::Memory:
- CheckMemory(&field.loc, cast(&field)->memory);
- current_memory_index_++;
- break;
-
- case ModuleFieldType::DataSegment:
- // Checked below.
- break;
-
- case ModuleFieldType::FuncType:
- break;
-
- case ModuleFieldType::Start: {
- if (seen_start) {
- PrintError(&field.loc, "only one start function allowed");
- }
-
- const Func* start_func = nullptr;
- CheckFuncVar(&cast(&field)->start, &start_func);
- if (start_func) {
- if (start_func->GetNumParams() != 0) {
- PrintError(&field.loc, "start function must be nullary");
- }
-
- if (start_func->GetNumResults() != 0) {
- PrintError(&field.loc, "start function must not return anything");
- }
- }
- seen_start = true;
- break;
- }
- }
- }
-
- CheckElemSegments(module);
- CheckDataSegments(module);
- CheckDuplicateExportBindings(module);
-
- return result_;
-}
-
-// Returns the result type of the invoked function, checked by the caller;
-// returning nullptr means that another error occurred first, so the result type
-// should be ignored.
-const TypeVector* Validator::CheckInvoke(const Action* action) {
- const ActionInvoke* invoke = action->invoke;
- const Module* module = script_->GetModule(action->module_var);
- if (!module) {
- PrintError(&action->loc, "unknown module");
- return nullptr;
- }
-
- const Export* export_ = module->GetExport(action->name);
- if (!export_) {
- PrintError(&action->loc, "unknown function export \"%s\"",
- action->name.c_str());
- return nullptr;
- }
-
- const Func* func = module->GetFunc(export_->var);
- if (!func) {
- // This error will have already been reported, just skip it.
- return nullptr;
- }
-
- size_t actual_args = invoke->args.size();
- size_t expected_args = func->GetNumParams();
- if (expected_args != actual_args) {
- PrintError(&action->loc, "too %s parameters to function. got %" PRIzd
- ", expected %" PRIzd,
- actual_args > expected_args ? "many" : "few", actual_args,
- expected_args);
- return nullptr;
- }
- for (size_t i = 0; i < actual_args; ++i) {
- const Const* const_ = &invoke->args[i];
- CheckTypeIndex(&const_->loc, const_->type, func->GetParamType(i), "invoke",
- i, "argument");
- }
-
- return &func->decl.sig.result_types;
-}
-
-Result Validator::CheckGet(const Action* action, Type* out_type) {
- const Module* module = script_->GetModule(action->module_var);
- if (!module) {
- PrintError(&action->loc, "unknown module");
- return Result::Error;
- }
-
- const Export* export_ = module->GetExport(action->name);
- if (!export_) {
- PrintError(&action->loc, "unknown global export \"%s\"",
- action->name.c_str());
- return Result::Error;
- }
-
- const Global* global = module->GetGlobal(export_->var);
- if (!global) {
- // This error will have already been reported, just skip it.
- return Result::Error;
- }
-
- *out_type = global->type;
- return Result::Ok;
-}
-
-Result Validator::CheckExceptVar(const Var* var, const Exception** out_except) {
- Index index;
- if (Failed(
- CheckVar(current_module_->excepts.size(), var, "except", &index))) {
- return Result::Error;
- }
- if (out_except)
- *out_except = current_module_->excepts[index];
- return Result::Ok;
-}
-
-void Validator::CheckExcept(const Location* loc, const Exception* except) {
- for (Type ty : except->sig) {
- switch (ty) {
- case Type::I32:
- case Type::I64:
- case Type::F32:
- case Type::F64:
- break;
- default:
- PrintError(loc, "Invalid exception type: %s", GetTypeName(ty));
- break;
- }
- }
-}
-
-Validator::ActionResult Validator::CheckAction(const Action* action) {
- ActionResult result;
- ZeroMemory(result);
-
- switch (action->type) {
- case ActionType::Invoke:
- result.types = CheckInvoke(action);
- result.kind =
- result.types ? ActionResult::Kind::Types : ActionResult::Kind::Error;
- break;
-
- case ActionType::Get:
- if (Succeeded(CheckGet(action, &result.type)))
- result.kind = ActionResult::Kind::Type;
- else
- result.kind = ActionResult::Kind::Error;
- break;
- }
-
- return result;
-}
-
-void Validator::CheckAssertReturnNanCommand(const Action* action) {
- ActionResult result = CheckAction(action);
-
- // A valid result type will either be f32 or f64; convert a Types result into
- // a Type result, so it is easier to check below. Type::Any is used to
- // specify a type that should not be checked (because an earlier error
- // occurred).
- if (result.kind == ActionResult::Kind::Types) {
- if (result.types->size() == 1) {
- result.kind = ActionResult::Kind::Type;
- result.type = (*result.types)[0];
- } else {
- PrintError(&action->loc, "expected 1 result, got %" PRIzd,
- result.types->size());
- result.type = Type::Any;
- }
- }
-
- if (result.kind == ActionResult::Kind::Type && result.type != Type::Any)
- CheckAssertReturnNanType(&action->loc, result.type, "action");
-}
-
-void Validator::CheckCommand(const Command* command) {
- switch (command->type) {
- case CommandType::Module:
- CheckModule(cast(command)->module);
- break;
-
- case CommandType::Action:
- // Ignore result type.
- CheckAction(cast(command)->action);
- break;
-
- case CommandType::Register:
- case CommandType::AssertMalformed:
- case CommandType::AssertInvalid:
- case CommandType::AssertUnlinkable:
- case CommandType::AssertUninstantiable:
- // Ignore.
- break;
-
- case CommandType::AssertReturn: {
- auto* assert_return_command = cast(command);
- const Action* action = assert_return_command->action;
- ActionResult result = CheckAction(action);
- switch (result.kind) {
- case ActionResult::Kind::Types:
- CheckConstTypes(&action->loc, *result.types,
- *assert_return_command->expected, "action");
- break;
-
- case ActionResult::Kind::Type:
- CheckConstType(&action->loc, result.type,
- *assert_return_command->expected, "action");
- break;
-
- case ActionResult::Kind::Error:
- // Error occurred, don't do any further checks.
- break;
- }
- break;
- }
-
- case CommandType::AssertReturnCanonicalNan:
- CheckAssertReturnNanCommand(
- cast(command)->action);
- break;
-
- case CommandType::AssertReturnArithmeticNan:
- CheckAssertReturnNanCommand(
- cast(command)->action);
- break;
-
- case CommandType::AssertTrap:
- // ignore result type.
- CheckAction(cast(command)->action);
- break;
- case CommandType::AssertExhaustion:
- // ignore result type.
- CheckAction(cast(command)->action);
- break;
- }
-}
-
-Result Validator::CheckScript(const Script* script) {
- for (const std::unique_ptr& command : script->commands)
- CheckCommand(command.get());
- return result_;
-}
-
-} // end anonymous namespace
-
-Result ValidateScript(WastLexer* lexer,
- const Script* script,
- ErrorHandler* error_handler) {
- Validator validator(error_handler, lexer, script);
-
- return validator.CheckScript(script);
-}
-
-Result ValidateModule(WastLexer* lexer,
- const Module* module,
- ErrorHandler* error_handler) {
- Validator validator(error_handler, lexer, nullptr);
-
- return validator.CheckModule(module);
-}
-
-} // namespace wabt
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "validator.h"
+#include "config.h"
+
+#include
+#include
+#include
+#include
+
+#include "binary-reader.h"
+#include "cast.h"
+#include "error-handler.h"
+#include "ir.h"
+#include "type-checker.h"
+#include "wast-parser-lexer-shared.h"
+
+namespace wabt {
+
+namespace {
+
+class Validator {
+ public:
+ WABT_DISALLOW_COPY_AND_ASSIGN(Validator);
+ Validator(ErrorHandler*, WastLexer*, const Script*);
+
+ Result CheckModule(const Module* module);
+ Result CheckScript(const Script* script);
+
+ private:
+ struct ActionResult {
+ enum class Kind {
+ Error,
+ Types,
+ Type,
+ } kind;
+
+ union {
+ const TypeVector* types;
+ Type type;
+ };
+ };
+
+ struct TryContext {
+ const TryExpr* try_ = nullptr;
+ const Catch* catch_ = nullptr;
+ };
+
+ void WABT_PRINTF_FORMAT(3, 4)
+ PrintError(const Location* loc, const char* fmt, ...);
+ void OnTypecheckerError(const char* msg);
+ Result CheckVar(Index max_index,
+ const Var* var,
+ const char* desc,
+ Index* out_index);
+ Result CheckFuncVar(const Var* var, const Func** out_func);
+ Result CheckGlobalVar(const Var* var,
+ const Global** out_global,
+ Index* out_global_index);
+ Type GetGlobalVarTypeOrAny(const Var* var);
+ Result CheckFuncTypeVar(const Var* var, const FuncType** out_func_type);
+ Result CheckTableVar(const Var* var, const Table** out_table);
+ Result CheckMemoryVar(const Var* var, const Memory** out_memory);
+ Result CheckLocalVar(const Var* var, Type* out_type);
+ Type GetLocalVarTypeOrAny(const Var* var);
+ void CheckAlign(const Location* loc,
+ Address alignment,
+ Address natural_alignment);
+ void CheckType(const Location* loc,
+ Type actual,
+ Type expected,
+ const char* desc);
+ void CheckTypeIndex(const Location* loc,
+ Type actual,
+ Type expected,
+ const char* desc,
+ Index index,
+ const char* index_kind);
+ void CheckTypes(const Location* loc,
+ const TypeVector& actual,
+ const TypeVector& expected,
+ const char* desc,
+ const char* index_kind);
+ void CheckConstTypes(const Location* loc,
+ const TypeVector& actual,
+ const ConstVector& expected,
+ const char* desc);
+ void CheckConstType(const Location* loc,
+ Type actual,
+ const ConstVector& expected,
+ const char* desc);
+ void CheckAssertReturnNanType(const Location* loc,
+ Type actual,
+ const char* desc);
+ void CheckExprList(const Location* loc, const ExprList& exprs);
+ void CheckHasMemory(const Location* loc, Opcode opcode);
+ void CheckBlockSig(const Location* loc,
+ Opcode opcode,
+ const BlockSignature* sig);
+ void CheckExpr(const Expr* expr);
+ void CheckFuncSignatureMatchesFuncType(const Location* loc,
+ const FuncSignature& sig,
+ const FuncType* func_type);
+ void CheckFunc(const Location* loc, const Func* func);
+ void PrintConstExprError(const Location* loc, const char* desc);
+ void CheckConstInitExpr(const Location* loc,
+ const ExprList& expr,
+ Type expected_type,
+ const char* desc);
+ void CheckGlobal(const Location* loc, const Global* global);
+ void CheckLimits(const Location* loc,
+ const Limits* limits,
+ uint64_t absolute_max,
+ const char* desc);
+ void CheckTable(const Location* loc, const Table* table);
+ void CheckElemSegments(const Module* module);
+ void CheckMemory(const Location* loc, const Memory* memory);
+ void CheckDataSegments(const Module* module);
+ void CheckImport(const Location* loc, const Import* import);
+ void CheckExport(const Location* loc, const Export* export_);
+
+ void CheckDuplicateExportBindings(const Module* module);
+ const TypeVector* CheckInvoke(const Action* action);
+ Result CheckGet(const Action* action, Type* out_type);
+ ActionResult CheckAction(const Action* action);
+ void CheckAssertReturnNanCommand(const Action* action);
+ void CheckCommand(const Command* command);
+
+ void CheckExcept(const Location* loc, const Exception* Except);
+ Result CheckExceptVar(const Var* var, const Exception** out_except);
+
+ ErrorHandler* error_handler_ = nullptr;
+ WastLexer* lexer_ = nullptr;
+ const Script* script_ = nullptr;
+ const Module* current_module_ = nullptr;
+ const Func* current_func_ = nullptr;
+ Index current_table_index_ = 0;
+ Index current_memory_index_ = 0;
+ Index current_global_index_ = 0;
+ Index num_imported_globals_ = 0;
+ Index current_except_index_ = 0;
+ TypeChecker typechecker_;
+ // Cached for access by OnTypecheckerError.
+ const Location* expr_loc_ = nullptr;
+ Result result_ = Result::Ok;
+ std::vector try_contexts_;
+};
+
+Validator::Validator(ErrorHandler* error_handler,
+ WastLexer* lexer,
+ const Script* script)
+ : error_handler_(error_handler), lexer_(lexer), script_(script) {
+ typechecker_.set_error_callback(
+ [this](const char* msg) { OnTypecheckerError(msg); });
+}
+
+void Validator::PrintError(const Location* loc, const char* fmt, ...) {
+ result_ = Result::Error;
+ va_list args;
+ va_start(args, fmt);
+ WastFormatError(error_handler_, loc, lexer_, fmt, args);
+ va_end(args);
+}
+
+void Validator::OnTypecheckerError(const char* msg) {
+ PrintError(expr_loc_, "%s", msg);
+}
+
+static bool is_power_of_two(uint32_t x) {
+ return x && ((x & (x - 1)) == 0);
+}
+
+static Address get_opcode_natural_alignment(Opcode opcode) {
+ Address memory_size = opcode.GetMemorySize();
+ assert(memory_size != 0);
+ return memory_size;
+}
+
+Result Validator::CheckVar(Index max_index,
+ const Var* var,
+ const char* desc,
+ Index* out_index) {
+ if (var->index() < max_index) {
+ if (out_index)
+ *out_index = var->index();
+ return Result::Ok;
+ }
+ PrintError(&var->loc, "%s variable out of range (max %" PRIindex ")", desc,
+ max_index);
+ return Result::Error;
+}
+
+Result Validator::CheckFuncVar(const Var* var, const Func** out_func) {
+ Index index;
+ if (Failed(
+ CheckVar(current_module_->funcs.size(), var, "function", &index))) {
+ return Result::Error;
+ }
+
+ if (out_func)
+ *out_func = current_module_->funcs[index];
+ return Result::Ok;
+}
+
+Result Validator::CheckGlobalVar(const Var* var,
+ const Global** out_global,
+ Index* out_global_index) {
+ Index index;
+ if (Failed(
+ CheckVar(current_module_->globals.size(), var, "global", &index))) {
+ return Result::Error;
+ }
+
+ if (out_global)
+ *out_global = current_module_->globals[index];
+ if (out_global_index)
+ *out_global_index = index;
+ return Result::Ok;
+}
+
+Type Validator::GetGlobalVarTypeOrAny(const Var* var) {
+ const Global* global;
+ if (Succeeded(CheckGlobalVar(var, &global, nullptr)))
+ return global->type;
+ return Type::Any;
+}
+
+Result Validator::CheckFuncTypeVar(const Var* var,
+ const FuncType** out_func_type) {
+ Index index;
+ if (Failed(CheckVar(current_module_->func_types.size(), var,
+ "function type", &index))) {
+ return Result::Error;
+ }
+
+ if (out_func_type)
+ *out_func_type = current_module_->func_types[index];
+ return Result::Ok;
+}
+
+Result Validator::CheckTableVar(const Var* var, const Table** out_table) {
+ Index index;
+ if (Failed(CheckVar(current_module_->tables.size(), var, "table", &index))) {
+ return Result::Error;
+ }
+
+ if (out_table)
+ *out_table = current_module_->tables[index];
+ return Result::Ok;
+}
+
+Result Validator::CheckMemoryVar(const Var* var, const Memory** out_memory) {
+ Index index;
+ if (Failed(
+ CheckVar(current_module_->memories.size(), var, "memory", &index))) {
+ return Result::Error;
+ }
+
+ if (out_memory)
+ *out_memory = current_module_->memories[index];
+ return Result::Ok;
+}
+
+Result Validator::CheckLocalVar(const Var* var, Type* out_type) {
+ const Func* func = current_func_;
+ Index max_index = func->GetNumParamsAndLocals();
+ Index index = func->GetLocalIndex(*var);
+ if (index < max_index) {
+ if (out_type) {
+ Index num_params = func->GetNumParams();
+ if (index < num_params) {
+ *out_type = func->GetParamType(index);
+ } else {
+ *out_type = current_func_->local_types[index - num_params];
+ }
+ }
+ return Result::Ok;
+ }
+
+ if (var->is_name()) {
+ PrintError(&var->loc, "undefined local variable \"%s\"",
+ var->name().c_str());
+ } else {
+ PrintError(&var->loc, "local variable out of range (max %" PRIindex ")",
+ max_index);
+ }
+ return Result::Error;
+}
+
+Type Validator::GetLocalVarTypeOrAny(const Var* var) {
+ Type type = Type::Any;
+ CheckLocalVar(var, &type);
+ return type;
+}
+
+void Validator::CheckAlign(const Location* loc,
+ Address alignment,
+ Address natural_alignment) {
+ if (alignment != WABT_USE_NATURAL_ALIGNMENT) {
+ if (!is_power_of_two(alignment))
+ PrintError(loc, "alignment must be power-of-two");
+ if (alignment > natural_alignment) {
+ PrintError(loc,
+ "alignment must not be larger than natural alignment (%u)",
+ natural_alignment);
+ }
+ }
+}
+
+void Validator::CheckType(const Location* loc,
+ Type actual,
+ Type expected,
+ const char* desc) {
+ if (expected != actual) {
+ PrintError(loc, "type mismatch at %s. got %s, expected %s", desc,
+ GetTypeName(actual), GetTypeName(expected));
+ }
+}
+
+void Validator::CheckTypeIndex(const Location* loc,
+ Type actual,
+ Type expected,
+ const char* desc,
+ Index index,
+ const char* index_kind) {
+ if (expected != actual && expected != Type::Any && actual != Type::Any) {
+ PrintError(
+ loc, "type mismatch for %s %" PRIindex " of %s. got %s, expected %s",
+ index_kind, index, desc, GetTypeName(actual), GetTypeName(expected));
+ }
+}
+
+void Validator::CheckTypes(const Location* loc,
+ const TypeVector& actual,
+ const TypeVector& expected,
+ const char* desc,
+ const char* index_kind) {
+ if (actual.size() == expected.size()) {
+ for (size_t i = 0; i < actual.size(); ++i) {
+ CheckTypeIndex(loc, actual[i], expected[i], desc, i, index_kind);
+ }
+ } else {
+ PrintError(loc, "expected %" PRIzd " %ss, got %" PRIzd, expected.size(),
+ index_kind, actual.size());
+ }
+}
+
+void Validator::CheckConstTypes(const Location* loc,
+ const TypeVector& actual,
+ const ConstVector& expected,
+ const char* desc) {
+ if (actual.size() == expected.size()) {
+ for (size_t i = 0; i < actual.size(); ++i) {
+ CheckTypeIndex(loc, actual[i], expected[i].type, desc, i, "result");
+ }
+ } else {
+ PrintError(loc, "expected %" PRIzd " results, got %" PRIzd, expected.size(),
+ actual.size());
+ }
+}
+
+void Validator::CheckConstType(const Location* loc,
+ Type actual,
+ const ConstVector& expected,
+ const char* desc) {
+ TypeVector actual_types;
+ if (actual != Type::Void)
+ actual_types.push_back(actual);
+ CheckConstTypes(loc, actual_types, expected, desc);
+}
+
+void Validator::CheckAssertReturnNanType(const Location* loc,
+ Type actual,
+ const char* desc) {
+ // When using assert_return_nan, the result can be either a f32 or f64 type
+ // so we special case it here.
+ if (actual != Type::F32 && actual != Type::F64) {
+ PrintError(loc, "type mismatch at %s. got %s, expected f32 or f64", desc,
+ GetTypeName(actual));
+ }
+}
+
+void Validator::CheckExprList(const Location* loc, const ExprList& exprs) {
+ for (const Expr& expr : exprs)
+ CheckExpr(&expr);
+}
+
+void Validator::CheckHasMemory(const Location* loc, Opcode opcode) {
+ if (current_module_->memories.size() == 0) {
+ PrintError(loc, "%s requires an imported or defined memory.",
+ opcode.GetName());
+ }
+}
+
+void Validator::CheckBlockSig(const Location* loc,
+ Opcode opcode,
+ const BlockSignature* sig) {
+ if (sig->size() > 1) {
+ PrintError(loc,
+ "multiple %s signature result types not currently supported.",
+ opcode.GetName());
+ }
+}
+
+void Validator::CheckExpr(const Expr* expr) {
+ expr_loc_ = &expr->loc;
+
+ switch (expr->type) {
+ case ExprType::Binary:
+ typechecker_.OnBinary(cast(expr)->opcode);
+ break;
+
+ case ExprType::Block: {
+ auto block_expr = cast(expr);
+ CheckBlockSig(&block_expr->loc, Opcode::Block, &block_expr->block->sig);
+ typechecker_.OnBlock(&block_expr->block->sig);
+ CheckExprList(&block_expr->loc, block_expr->block->exprs);
+ typechecker_.OnEnd();
+ break;
+ }
+
+ case ExprType::Br:
+ typechecker_.OnBr(cast(expr)->var.index());
+ break;
+
+ case ExprType::BrIf:
+ typechecker_.OnBrIf(cast(expr)->var.index());
+ break;
+
+ case ExprType::BrTable: {
+ auto br_table_expr = cast(expr);
+ typechecker_.BeginBrTable();
+ for (Var& var : *br_table_expr->targets) {
+ typechecker_.OnBrTableTarget(var.index());
+ }
+ typechecker_.OnBrTableTarget(br_table_expr->default_target.index());
+ typechecker_.EndBrTable();
+ break;
+ }
+
+ case ExprType::Call: {
+ const Func* callee;
+ if (Succeeded(CheckFuncVar(&cast(expr)->var, &callee))) {
+ typechecker_.OnCall(&callee->decl.sig.param_types,
+ &callee->decl.sig.result_types);
+ }
+ break;
+ }
+
+ case ExprType::CallIndirect: {
+ const FuncType* func_type;
+ if (current_module_->tables.size() == 0) {
+ PrintError(&expr->loc, "found call_indirect operator, but no table");
+ }
+ if (Succeeded(CheckFuncTypeVar(&cast(expr)->var,
+ &func_type))) {
+ typechecker_.OnCallIndirect(&func_type->sig.param_types,
+ &func_type->sig.result_types);
+ }
+ break;
+ }
+
+ case ExprType::Compare:
+ typechecker_.OnCompare(cast(expr)->opcode);
+ break;
+
+ case ExprType::Const:
+ typechecker_.OnConst(cast(expr)->const_.type);
+ break;
+
+ case ExprType::Convert:
+ typechecker_.OnConvert(cast(expr)->opcode);
+ break;
+
+ case ExprType::Drop:
+ typechecker_.OnDrop();
+ break;
+
+ case ExprType::GetGlobal:
+ typechecker_.OnGetGlobal(
+ GetGlobalVarTypeOrAny(&cast(expr)->var));
+ break;
+
+ case ExprType::GetLocal:
+ typechecker_.OnGetLocal(
+ GetLocalVarTypeOrAny(&cast(expr)->var));
+ break;
+
+ case ExprType::GrowMemory:
+ CheckHasMemory(&expr->loc, Opcode::GrowMemory);
+ typechecker_.OnGrowMemory();
+ break;
+
+ case ExprType::If: {
+ auto if_expr = cast(expr);
+ CheckBlockSig(&if_expr->loc, Opcode::If, &if_expr->true_->sig);
+ typechecker_.OnIf(&if_expr->true_->sig);
+ CheckExprList(&if_expr->loc, if_expr->true_->exprs);
+ if (!if_expr->false_.empty()) {
+ typechecker_.OnElse();
+ CheckExprList(&if_expr->loc, if_expr->false_);
+ }
+ typechecker_.OnEnd();
+ break;
+ }
+
+ case ExprType::Load: {
+ auto load_expr = cast(expr);
+ CheckHasMemory(&load_expr->loc, load_expr->opcode);
+ CheckAlign(&load_expr->loc, load_expr->align,
+ get_opcode_natural_alignment(load_expr->opcode));
+ typechecker_.OnLoad(load_expr->opcode);
+ break;
+ }
+
+ case ExprType::Loop: {
+ auto loop_expr = cast(expr);
+ CheckBlockSig(&loop_expr->loc, Opcode::Loop, &loop_expr->block->sig);
+ typechecker_.OnLoop(&loop_expr->block->sig);
+ CheckExprList(&loop_expr->loc, loop_expr->block->exprs);
+ typechecker_.OnEnd();
+ break;
+ }
+
+ case ExprType::CurrentMemory:
+ CheckHasMemory(&expr->loc, Opcode::CurrentMemory);
+ typechecker_.OnCurrentMemory();
+ break;
+
+ case ExprType::Nop:
+ break;
+
+ case ExprType::Rethrow:
+ typechecker_.OnRethrow(cast(expr)->var.index());
+ break;
+
+ case ExprType::Return:
+ typechecker_.OnReturn();
+ break;
+
+ case ExprType::Select:
+ typechecker_.OnSelect();
+ break;
+
+ case ExprType::SetGlobal:
+ typechecker_.OnSetGlobal(
+ GetGlobalVarTypeOrAny(&cast(expr)->var));
+ break;
+
+ case ExprType::SetLocal:
+ typechecker_.OnSetLocal(
+ GetLocalVarTypeOrAny(&cast(expr)->var));
+ break;
+
+ case ExprType::Store: {
+ auto store_expr = cast(expr);
+ CheckHasMemory(&store_expr->loc, store_expr->opcode);
+ CheckAlign(&store_expr->loc, store_expr->align,
+ get_opcode_natural_alignment(store_expr->opcode));
+ typechecker_.OnStore(store_expr->opcode);
+ break;
+ }
+
+ case ExprType::TeeLocal:
+ typechecker_.OnTeeLocal(
+ GetLocalVarTypeOrAny(&cast(expr)->var));
+ break;
+
+ case ExprType::Throw:
+ const Exception* except;
+ if (Succeeded(CheckExceptVar(&cast(expr)->var, &except))) {
+ typechecker_.OnThrow(&except->sig);
+ }
+ break;
+
+ case ExprType::TryBlock: {
+ auto try_expr = cast(expr);
+ TryContext context;
+ context.try_ = try_expr;
+ try_contexts_.push_back(context);
+ CheckBlockSig(&try_expr->loc, Opcode::Try, &try_expr->block->sig);
+
+ typechecker_.OnTryBlock(&try_expr->block->sig);
+ CheckExprList(&try_expr->loc, try_expr->block->exprs);
+
+ if (try_expr->catches.empty())
+ PrintError(&try_expr->loc, "TryBlock: doesn't have any catch clauses");
+ bool found_catch_all = false;
+ for (const Catch* catch_ : try_expr->catches) {
+ try_contexts_.back().catch_ = catch_;
+ typechecker_.OnCatchBlock(&try_expr->block->sig);
+ if (catch_->IsCatchAll()) {
+ found_catch_all = true;
+ } else {
+ if (found_catch_all)
+ PrintError(&catch_->loc, "Appears after catch all block");
+ const Exception* except = nullptr;
+ if (Succeeded(CheckExceptVar(&catch_->var, &except))) {
+ typechecker_.OnCatch(&except->sig);
+ }
+ }
+ CheckExprList(&catch_->loc, catch_->exprs);
+ }
+ typechecker_.OnEnd();
+ try_contexts_.pop_back();
+ break;
+ }
+
+ case ExprType::Unary:
+ typechecker_.OnUnary(cast(expr)->opcode);
+ break;
+
+ case ExprType::Unreachable:
+ typechecker_.OnUnreachable();
+ break;
+ }
+}
+
+void Validator::CheckFuncSignatureMatchesFuncType(const Location* loc,
+ const FuncSignature& sig,
+ const FuncType* func_type) {
+ CheckTypes(loc, sig.result_types, func_type->sig.result_types, "function",
+ "result");
+ CheckTypes(loc, sig.param_types, func_type->sig.param_types, "function",
+ "argument");
+}
+
+void Validator::CheckFunc(const Location* loc, const Func* func) {
+ current_func_ = func;
+ if (func->GetNumResults() > 1) {
+ PrintError(loc, "multiple result values not currently supported.");
+ // Don't run any other checks, the won't test the result_type properly.
+ return;
+ }
+ if (func->decl.has_func_type) {
+ const FuncType* func_type;
+ if (Succeeded(CheckFuncTypeVar(&func->decl.type_var, &func_type))) {
+ CheckFuncSignatureMatchesFuncType(loc, func->decl.sig, func_type);
+ }
+ }
+
+ expr_loc_ = loc;
+ typechecker_.BeginFunction(&func->decl.sig.result_types);
+ CheckExprList(loc, func->exprs);
+ typechecker_.EndFunction();
+ current_func_ = nullptr;
+}
+
+void Validator::PrintConstExprError(const Location* loc, const char* desc) {
+ PrintError(loc,
+ "invalid %s, must be a constant expression; either *.const or "
+ "get_global.",
+ desc);
+}
+
+void Validator::CheckConstInitExpr(const Location* loc,
+ const ExprList& exprs,
+ Type expected_type,
+ const char* desc) {
+ Type type = Type::Void;
+ if (!exprs.empty()) {
+ if (exprs.size() > 1) {
+ PrintConstExprError(loc, desc);
+ return;
+ }
+
+ const Expr* expr = &exprs.front();
+ loc = &expr->loc;
+
+ switch (expr->type) {
+ case ExprType::Const:
+ type = cast(expr)->const_.type;
+ break;
+
+ case ExprType::GetGlobal: {
+ const Global* ref_global = nullptr;
+ Index ref_global_index;
+ if (Failed(CheckGlobalVar(&cast(expr)->var,
+ &ref_global, &ref_global_index))) {
+ return;
+ }
+
+ type = ref_global->type;
+ if (ref_global_index >= num_imported_globals_) {
+ PrintError(
+ loc,
+ "initializer expression can only reference an imported global");
+ }
+
+ if (ref_global->mutable_) {
+ PrintError(
+ loc, "initializer expression cannot reference a mutable global");
+ }
+ break;
+ }
+
+ default:
+ PrintConstExprError(loc, desc);
+ return;
+ }
+ }
+
+ CheckType(loc, type, expected_type, desc);
+}
+
+void Validator::CheckGlobal(const Location* loc, const Global* global) {
+ CheckConstInitExpr(loc, global->init_expr, global->type,
+ "global initializer expression");
+}
+
+void Validator::CheckLimits(const Location* loc,
+ const Limits* limits,
+ uint64_t absolute_max,
+ const char* desc) {
+ if (limits->initial > absolute_max) {
+ PrintError(loc, "initial %s (%" PRIu64 ") must be <= (%" PRIu64 ")", desc,
+ limits->initial, absolute_max);
+ }
+
+ if (limits->has_max) {
+ if (limits->max > absolute_max) {
+ PrintError(loc, "max %s (%" PRIu64 ") must be <= (%" PRIu64 ")", desc,
+ limits->max, absolute_max);
+ }
+
+ if (limits->max < limits->initial) {
+ PrintError(loc,
+ "max %s (%" PRIu64 ") must be >= initial %s (%" PRIu64 ")",
+ desc, limits->max, desc, limits->initial);
+ }
+ }
+}
+
+void Validator::CheckTable(const Location* loc, const Table* table) {
+ if (current_table_index_ == 1)
+ PrintError(loc, "only one table allowed");
+ CheckLimits(loc, &table->elem_limits, UINT32_MAX, "elems");
+}
+
+void Validator::CheckElemSegments(const Module* module) {
+ for (const ModuleField& field : module->fields) {
+ if (auto elem_segment_field = dyn_cast(&field)) {
+ ElemSegment* elem_segment = elem_segment_field->elem_segment;
+ const Table* table;
+ if (!Succeeded(CheckTableVar(&elem_segment->table_var, &table)))
+ continue;
+
+ for (const Var& var : elem_segment->vars) {
+ if (!Succeeded(CheckFuncVar(&var, nullptr)))
+ continue;
+ }
+
+ CheckConstInitExpr(&field.loc, elem_segment->offset, Type::I32,
+ "elem segment offset");
+ }
+ }
+}
+
+void Validator::CheckMemory(const Location* loc, const Memory* memory) {
+ if (current_memory_index_ == 1)
+ PrintError(loc, "only one memory block allowed");
+ CheckLimits(loc, &memory->page_limits, WABT_MAX_PAGES, "pages");
+}
+
+void Validator::CheckDataSegments(const Module* module) {
+ for (const ModuleField& field : module->fields) {
+ if (auto data_segment_field = dyn_cast(&field)) {
+ DataSegment* data_segment = data_segment_field->data_segment;
+ const Memory* memory;
+ if (!Succeeded(CheckMemoryVar(&data_segment->memory_var, &memory)))
+ continue;
+
+ CheckConstInitExpr(&field.loc, data_segment->offset, Type::I32,
+ "data segment offset");
+ }
+ }
+}
+
+void Validator::CheckImport(const Location* loc, const Import* import) {
+ switch (import->kind) {
+ case ExternalKind::Except:
+ ++current_except_index_;
+ CheckExcept(loc, import->except);
+ break;
+ case ExternalKind::Func:
+ if (import->func->decl.has_func_type)
+ CheckFuncTypeVar(&import->func->decl.type_var, nullptr);
+ break;
+ case ExternalKind::Table:
+ CheckTable(loc, import->table);
+ ++current_table_index_;
+ break;
+ case ExternalKind::Memory:
+ CheckMemory(loc, import->memory);
+ ++current_memory_index_;
+ break;
+ case ExternalKind::Global:
+ if (import->global->mutable_) {
+ PrintError(loc, "mutable globals cannot be imported");
+ }
+ ++num_imported_globals_;
+ ++current_global_index_;
+ break;
+ }
+}
+
+void Validator::CheckExport(const Location* loc, const Export* export_) {
+ switch (export_->kind) {
+ case ExternalKind::Except:
+ CheckExceptVar(&export_->var, nullptr);
+ break;
+ case ExternalKind::Func:
+ CheckFuncVar(&export_->var, nullptr);
+ break;
+ case ExternalKind::Table:
+ CheckTableVar(&export_->var, nullptr);
+ break;
+ case ExternalKind::Memory:
+ CheckMemoryVar(&export_->var, nullptr);
+ break;
+ case ExternalKind::Global: {
+ const Global* global;
+ if (Succeeded(CheckGlobalVar(&export_->var, &global, nullptr))) {
+ if (global->mutable_) {
+ PrintError(&export_->var.loc, "mutable globals cannot be exported");
+ }
+ }
+ break;
+ }
+ }
+}
+
+void Validator::CheckDuplicateExportBindings(const Module* module) {
+ module->export_bindings.FindDuplicates([this](
+ const BindingHash::value_type& a, const BindingHash::value_type& b) {
+ // Choose the location that is later in the file.
+ const Location& a_loc = a.second.loc;
+ const Location& b_loc = b.second.loc;
+ const Location& loc = a_loc.line > b_loc.line ? a_loc : b_loc;
+ PrintError(&loc, "redefinition of export \"%s\"", a.first.c_str());
+ });
+}
+
+Result Validator::CheckModule(const Module* module) {
+ bool seen_start = false;
+
+ current_module_ = module;
+ current_table_index_ = 0;
+ current_memory_index_ = 0;
+ current_global_index_ = 0;
+ num_imported_globals_ = 0;
+ current_except_index_ = 0;
+
+ for (const ModuleField& field : module->fields) {
+ switch (field.type) {
+ case ModuleFieldType::Except:
+ ++current_except_index_;
+ CheckExcept(&field.loc, cast(&field)->except);
+ break;
+
+ case ModuleFieldType::Func:
+ CheckFunc(&field.loc, cast(&field)->func);
+ break;
+
+ case ModuleFieldType::Global:
+ CheckGlobal(&field.loc, cast(&field)->global);
+ current_global_index_++;
+ break;
+
+ case ModuleFieldType::Import:
+ CheckImport(&field.loc, cast(&field)->import);
+ break;
+
+ case ModuleFieldType::Export:
+ CheckExport(&field.loc, cast(&field)->export_);
+ break;
+
+ case ModuleFieldType::Table:
+ CheckTable(&field.loc, cast(&field)->table);
+ current_table_index_++;
+ break;
+
+ case ModuleFieldType::ElemSegment:
+ // Checked below.
+ break;
+
+ case ModuleFieldType::Memory:
+ CheckMemory(&field.loc, cast(&field)->memory);
+ current_memory_index_++;
+ break;
+
+ case ModuleFieldType::DataSegment:
+ // Checked below.
+ break;
+
+ case ModuleFieldType::FuncType:
+ break;
+
+ case ModuleFieldType::Start: {
+ if (seen_start) {
+ PrintError(&field.loc, "only one start function allowed");
+ }
+
+ const Func* start_func = nullptr;
+ CheckFuncVar(&cast(&field)->start, &start_func);
+ if (start_func) {
+ if (start_func->GetNumParams() != 0) {
+ PrintError(&field.loc, "start function must be nullary");
+ }
+
+ if (start_func->GetNumResults() != 0) {
+ PrintError(&field.loc, "start function must not return anything");
+ }
+ }
+ seen_start = true;
+ break;
+ }
+ }
+ }
+
+ CheckElemSegments(module);
+ CheckDataSegments(module);
+ CheckDuplicateExportBindings(module);
+
+ return result_;
+}
+
+// Returns the result type of the invoked function, checked by the caller;
+// returning nullptr means that another error occurred first, so the result type
+// should be ignored.
+const TypeVector* Validator::CheckInvoke(const Action* action) {
+ const ActionInvoke* invoke = action->invoke;
+ const Module* module = script_->GetModule(action->module_var);
+ if (!module) {
+ PrintError(&action->loc, "unknown module");
+ return nullptr;
+ }
+
+ const Export* export_ = module->GetExport(action->name);
+ if (!export_) {
+ PrintError(&action->loc, "unknown function export \"%s\"",
+ action->name.c_str());
+ return nullptr;
+ }
+
+ const Func* func = module->GetFunc(export_->var);
+ if (!func) {
+ // This error will have already been reported, just skip it.
+ return nullptr;
+ }
+
+ size_t actual_args = invoke->args.size();
+ size_t expected_args = func->GetNumParams();
+ if (expected_args != actual_args) {
+ PrintError(&action->loc, "too %s parameters to function. got %" PRIzd
+ ", expected %" PRIzd,
+ actual_args > expected_args ? "many" : "few", actual_args,
+ expected_args);
+ return nullptr;
+ }
+ for (size_t i = 0; i < actual_args; ++i) {
+ const Const* const_ = &invoke->args[i];
+ CheckTypeIndex(&const_->loc, const_->type, func->GetParamType(i), "invoke",
+ i, "argument");
+ }
+
+ return &func->decl.sig.result_types;
+}
+
+Result Validator::CheckGet(const Action* action, Type* out_type) {
+ const Module* module = script_->GetModule(action->module_var);
+ if (!module) {
+ PrintError(&action->loc, "unknown module");
+ return Result::Error;
+ }
+
+ const Export* export_ = module->GetExport(action->name);
+ if (!export_) {
+ PrintError(&action->loc, "unknown global export \"%s\"",
+ action->name.c_str());
+ return Result::Error;
+ }
+
+ const Global* global = module->GetGlobal(export_->var);
+ if (!global) {
+ // This error will have already been reported, just skip it.
+ return Result::Error;
+ }
+
+ *out_type = global->type;
+ return Result::Ok;
+}
+
+Result Validator::CheckExceptVar(const Var* var, const Exception** out_except) {
+ Index index;
+ if (Failed(
+ CheckVar(current_module_->excepts.size(), var, "except", &index))) {
+ return Result::Error;
+ }
+ if (out_except)
+ *out_except = current_module_->excepts[index];
+ return Result::Ok;
+}
+
+void Validator::CheckExcept(const Location* loc, const Exception* except) {
+ for (Type ty : except->sig) {
+ switch (ty) {
+ case Type::I32:
+ case Type::I64:
+ case Type::F32:
+ case Type::F64:
+ break;
+ default:
+ PrintError(loc, "Invalid exception type: %s", GetTypeName(ty));
+ break;
+ }
+ }
+}
+
+Validator::ActionResult Validator::CheckAction(const Action* action) {
+ ActionResult result;
+ ZeroMemory(result);
+
+ switch (action->type) {
+ case ActionType::Invoke:
+ result.types = CheckInvoke(action);
+ result.kind =
+ result.types ? ActionResult::Kind::Types : ActionResult::Kind::Error;
+ break;
+
+ case ActionType::Get:
+ if (Succeeded(CheckGet(action, &result.type)))
+ result.kind = ActionResult::Kind::Type;
+ else
+ result.kind = ActionResult::Kind::Error;
+ break;
+ }
+
+ return result;
+}
+
+void Validator::CheckAssertReturnNanCommand(const Action* action) {
+ ActionResult result = CheckAction(action);
+
+ // A valid result type will either be f32 or f64; convert a Types result into
+ // a Type result, so it is easier to check below. Type::Any is used to
+ // specify a type that should not be checked (because an earlier error
+ // occurred).
+ if (result.kind == ActionResult::Kind::Types) {
+ if (result.types->size() == 1) {
+ result.kind = ActionResult::Kind::Type;
+ result.type = (*result.types)[0];
+ } else {
+ PrintError(&action->loc, "expected 1 result, got %" PRIzd,
+ result.types->size());
+ result.type = Type::Any;
+ }
+ }
+
+ if (result.kind == ActionResult::Kind::Type && result.type != Type::Any)
+ CheckAssertReturnNanType(&action->loc, result.type, "action");
+}
+
+void Validator::CheckCommand(const Command* command) {
+ switch (command->type) {
+ case CommandType::Module:
+ CheckModule(cast(command)->module);
+ break;
+
+ case CommandType::Action:
+ // Ignore result type.
+ CheckAction(cast(command)->action);
+ break;
+
+ case CommandType::Register:
+ case CommandType::AssertMalformed:
+ case CommandType::AssertInvalid:
+ case CommandType::AssertUnlinkable:
+ case CommandType::AssertUninstantiable:
+ // Ignore.
+ break;
+
+ case CommandType::AssertReturn: {
+ auto* assert_return_command = cast(command);
+ const Action* action = assert_return_command->action;
+ ActionResult result = CheckAction(action);
+ switch (result.kind) {
+ case ActionResult::Kind::Types:
+ CheckConstTypes(&action->loc, *result.types,
+ *assert_return_command->expected, "action");
+ break;
+
+ case ActionResult::Kind::Type:
+ CheckConstType(&action->loc, result.type,
+ *assert_return_command->expected, "action");
+ break;
+
+ case ActionResult::Kind::Error:
+ // Error occurred, don't do any further checks.
+ break;
+ }
+ break;
+ }
+
+ case CommandType::AssertReturnCanonicalNan:
+ CheckAssertReturnNanCommand(
+ cast(command)->action);
+ break;
+
+ case CommandType::AssertReturnArithmeticNan:
+ CheckAssertReturnNanCommand(
+ cast(command)->action);
+ break;
+
+ case CommandType::AssertTrap:
+ // ignore result type.
+ CheckAction(cast(command)->action);
+ break;
+ case CommandType::AssertExhaustion:
+ // ignore result type.
+ CheckAction(cast(command)->action);
+ break;
+ }
+}
+
+Result Validator::CheckScript(const Script* script) {
+ for (const std::unique_ptr& command : script->commands)
+ CheckCommand(command.get());
+ return result_;
+}
+
+} // end anonymous namespace
+
+Result ValidateScript(WastLexer* lexer,
+ const Script* script,
+ ErrorHandler* error_handler) {
+ Validator validator(error_handler, lexer, script);
+
+ return validator.CheckScript(script);
+}
+
+Result ValidateModule(WastLexer* lexer,
+ const Module* module,
+ ErrorHandler* error_handler) {
+ Validator validator(error_handler, lexer, nullptr);
+
+ return validator.CheckModule(module);
+}
+
+} // namespace wabt
diff --git a/deps/chakrashim/core/netci.groovy b/deps/chakrashim/core/netci.groovy
index e99d500805c..8952f06b410 100644
--- a/deps/chakrashim/core/netci.groovy
+++ b/deps/chakrashim/core/netci.groovy
@@ -1,347 +1,347 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-// Import the utility functionality.
-import jobs.generation.Utilities
-
-// Grab the github project name passed in
-def project = GithubProject
-def branch = GithubBranchName
-
-def msbuildTypeMap = [
- 'debug':'chk',
- 'test':'test',
- 'release':'fre'
-]
-
-// convert `machine` parameter to OS component of PR task name
-def machineTypeToOSTagMap = [
- 'Windows 7': 'Windows 7', // Windows Server 2008 R2, equivalent to Windows 7
- 'Windows_NT': 'Windows', // Windows Server 2012 R2, equivalent to Windows 8.1 (aka Blue)
- 'Ubuntu16.04': 'Ubuntu',
- 'OSX': 'OSX'
-]
-
-def dailyRegex = 'dailies'
-
-// ---------------
-// HELPER CLOSURES
-// ---------------
-
-def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
- if (excludeConfigIf && excludeConfigIf(isPR, buildArch, buildType)) {
- return // early exit: we don't want to create a job for this configuration
- }
-
- def config = "${buildArch}_${buildType}"
- config = (configTag == null) ? config : "${configTag}_${config}"
-
- // params: Project, BaseTaskName, IsPullRequest (appends '_prtest')
- def jobName = Utilities.getFullJobName(project, config, isPR)
-
- def testableConfig = buildType in ['debug', 'test'] && buildArch != 'arm'
- def analysisConfig = buildType in ['release'] && runCodeAnalysis
-
- def buildScript = "call .\\jenkins\\buildone.cmd ${buildArch} ${buildType} "
- buildScript += buildExtra ?: ''
- buildScript += analysisConfig ? ' "/p:runcodeanalysis=true"' : ''
- def testScript = "call .\\jenkins\\testone.cmd ${buildArch} ${buildType} "
- testScript += testExtra ?: ''
- def analysisScript = '.\\Build\\scripts\\check_prefast_error.ps1 . CodeAnalysis.err'
-
- def newJob = job(jobName) {
- // This opens the set of build steps that will be run.
- // This looks strange, but it is actually a method call, with a
- // closure as a param, since Groovy allows method calls without parens.
- // (Compare with '.each' method used above.)
- steps {
- batchFile(buildScript) // run the parameter as if it were a batch file
- if (testableConfig) {
- batchFile(testScript)
- }
- if (analysisConfig) {
- powerShell(analysisScript)
- }
- }
- }
-
- def msbuildType = msbuildTypeMap.get(buildType)
- def msbuildFlavor = "build_${buildArch}${msbuildType}"
- def archivalString = "test/${msbuildFlavor}.*,test/logs/**"
- archivalString += analysisConfig ? ',CodeAnalysis.err' : ''
- Utilities.addArchival(newJob, archivalString,
- '', // no exclusions from archival
- false, // doNotFailIfNothingArchived=false ~= failIfNothingArchived
- false) // archiveOnlyIfSuccessful=false ~= archiveAlways
-
- Utilities.setMachineAffinity(newJob, machine, 'latest-or-auto')
- Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
-
- if (nonDefaultTaskSetup == null) {
- if (isPR) {
- def osTag = machineTypeToOSTagMap.get(machine)
- Utilities.addGithubPRTriggerForBranch(newJob, branch, "${osTag} ${config}")
- } else {
- Utilities.addGithubPushTrigger(newJob)
- }
- } else {
- // nonDefaultTaskSetup is e.g. DailyBuildTaskSetup (which sets up daily builds)
- // These jobs will only be configured for the branch specified below,
- // which is the name of the branch netci.groovy was processed for.
- // See list of such branches at:
- // https://github.com/dotnet/dotnet-ci/blob/master/jobs/data/repolist.txt
- nonDefaultTaskSetup(newJob, isPR, config)
- }
-}
-
-def CreateBuildTasks = { machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
- [true, false].each { isPR ->
- ['x86', 'x64', 'arm'].each { buildArch ->
- ['debug', 'test', 'release'].each { buildType ->
- CreateBuildTask(isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup)
- }
- }
- }
-}
-
-def CreateXPlatBuildTask = { isPR, buildType, staticBuild, machine, platform, configTag,
- xplatBranch, nonDefaultTaskSetup, customOption, testVariant, extraBuildParams ->
-
- def config = (platform == "osx" ? "osx_${buildType}" : "linux_${buildType}")
- def numConcurrentCommand = (platform == "osx" ? "sysctl -n hw.logicalcpu" : "nproc")
-
- config = (configTag == null) ? config : "${configTag}_${config}"
- config = staticBuild ? "static_${config}" : "shared_${config}"
- config = customOption ? customOption.replaceAll(/[-]+/, "_") + "_" + config : config
-
- // params: Project, BaseTaskName, IsPullRequest (appends '_prtest')
- def jobName = Utilities.getFullJobName(project, config, isPR)
-
- def infoScript = "bash jenkins/get_system_info.sh --${platform}"
- def buildFlag = buildType == "release" ? "" : (buildType == "debug" ? "--debug" : "--test-build")
- def staticFlag = staticBuild ? "--static" : ""
- def swbCheckFlag = (platform == "linux" && buildType == "debug" && !staticBuild) ? "--wb-check" : "";
- def icuFlag = (platform == "osx" ? "--icu=/usr/local/opt/icu4c/include" : "")
- def compilerPaths = (platform == "osx") ? "" : "--cxx=/usr/bin/clang++-3.9 --cc=/usr/bin/clang-3.9"
- def buildScript = "bash ./build.sh ${staticFlag} -j=`${numConcurrentCommand}` ${buildFlag} " +
- "${swbCheckFlag} ${compilerPaths} ${icuFlag} ${customOption} ${extraBuildParams}"
- def testScript = "bash test/runtests.sh \"${testVariant}\""
-
- def newJob = job(jobName) {
- steps {
- shell(infoScript)
- shell(buildScript)
- shell(testScript)
- }
- }
-
- def archivalString = "out/build.log"
- Utilities.addArchival(newJob, archivalString,
- '', // no exclusions from archival
- true, // doNotFailIfNothingArchived=false ~= failIfNothingArchived (true ~= doNotFail)
- false) // archiveOnlyIfSuccessful=false ~= archiveAlways
-
- Utilities.setMachineAffinity(newJob, machine, 'latest-or-auto')
- Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
-
- if (nonDefaultTaskSetup == null) {
- if (isPR) {
- def osTag = machineTypeToOSTagMap.get(machine)
- Utilities.addGithubPRTriggerForBranch(newJob, xplatBranch, "${osTag} ${config}")
- } else {
- Utilities.addGithubPushTrigger(newJob)
- }
- } else {
- // nonDefaultTaskSetup is e.g. DailyBuildTaskSetup (which sets up daily builds)
- // These jobs will only be configured for the branch specified below,
- // which is the name of the branch netci.groovy was processed for.
- // See list of such branches at:
- // https://github.com/dotnet/dotnet-ci/blob/master/jobs/data/repolist.txt
- nonDefaultTaskSetup(newJob, isPR, config)
- }
-}
-
-// Generic task to trigger clang-based cross-plat build tasks
-def CreateXPlatBuildTasks = { machine, platform, configTag, xplatBranch, nonDefaultTaskSetup, extraBuildParams ->
- [true, false].each { isPR ->
- CreateXPlatBuildTask(isPR, "test", "", machine, platform,
- configTag, xplatBranch, nonDefaultTaskSetup, "--no-jit", "--variants disable_jit", extraBuildParams)
-
- ['debug', 'test', 'release'].each { buildType ->
- def staticBuildConfigs = [true, false]
- if (platform == "osx") {
- staticBuildConfigs = [true]
- }
-
- staticBuildConfigs.each { staticBuild ->
- CreateXPlatBuildTask(isPR, buildType, staticBuild, machine, platform,
- configTag, xplatBranch, nonDefaultTaskSetup, "", "", extraBuildParams)
- }
- }
- }
-}
-
-def DailyBuildTaskSetup = { newJob, isPR, triggerName, groupRegex ->
- // The addition of triggers makes the job non-default in GitHub.
- if (isPR) {
- def triggerRegex = "(${dailyRegex}|${groupRegex}|${triggerName})"
- Utilities.addGithubPRTriggerForBranch(newJob, branch,
- triggerName, // GitHub task name
- "(?i).*test\\W+${triggerRegex}.*")
- } else {
- Utilities.addPeriodicTrigger(newJob, '@daily')
- }
-}
-
-def CreateStyleCheckTasks = { taskString, taskName, checkName ->
- [true, false].each { isPR ->
- def jobName = Utilities.getFullJobName(project, taskName, isPR)
-
- def newJob = job(jobName) {
- steps {
- shell(taskString)
- }
- }
-
- Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
- if (isPR) {
- // Set PR trigger.
- Utilities.addGithubPRTriggerForBranch(newJob, branch, checkName)
- } else {
- // Set a push trigger
- Utilities.addGithubPushTrigger(newJob)
- }
-
- Utilities.setMachineAffinity(newJob, 'Ubuntu16.04', 'latest-or-auto')
- }
-}
-
-// ----------------
-// INNER LOOP TASKS
-// ----------------
-
-CreateBuildTasks('Windows_NT', null, null, "-winBlue", true, null, null)
-
-// Add some additional daily configs to trigger per-PR as a quality gate:
-// x64_debug Slow Tests
-CreateBuildTask(true, 'x64', 'debug',
- 'Windows_NT', 'ci_slow', null, '-winBlue -includeSlow', false, null, null)
-// x64_debug DisableJIT
-CreateBuildTask(true, 'x64', 'debug',
- 'Windows_NT', 'ci_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', false, null, null)
-// x64_debug Legacy
-CreateBuildTask(true, 'x64', 'debug',
- 'Windows 7', 'ci_dev12', 'msbuild12', '-win7 -includeSlow', false, null, null)
-
-// -----------------
-// DAILY BUILD TASKS
-// -----------------
-
-if (!branch.endsWith('-ci')) {
- // build and test on Windows 7 with VS 2013 (Dev12/MsBuild12)
- CreateBuildTasks('Windows 7', 'daily_dev12', 'msbuild12', '-win7 -includeSlow', false,
- /* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch == 'arm') },
- /* nonDefaultTaskSetup */ { newJob, isPR, config ->
- DailyBuildTaskSetup(newJob, isPR,
- "Windows 7 ${config}",
- '(dev12|legacy)\\s+tests')})
-
- // build and test on the usual configuration (VS 2015) with -includeSlow
- CreateBuildTasks('Windows_NT', 'daily_slow', null, '-winBlue -includeSlow', false,
- /* excludeConfigIf */ null,
- /* nonDefaultTaskSetup */ { newJob, isPR, config ->
- DailyBuildTaskSetup(newJob, isPR,
- "Windows ${config}",
- 'slow\\s+tests')})
-
- // build and test on the usual configuration (VS 2015) with JIT disabled
- CreateBuildTasks('Windows_NT', 'daily_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', true,
- /* excludeConfigIf */ null,
- /* nonDefaultTaskSetup */ { newJob, isPR, config ->
- DailyBuildTaskSetup(newJob, isPR,
- "Windows ${config}",
- '(disablejit|nojit)\\s+tests')})
-}
-
-// ----------------
-// CODE STYLE TASKS
-// ----------------
-
-CreateStyleCheckTasks('./jenkins/check_copyright.sh', 'ubuntu_check_copyright', 'Copyright Check')
-CreateStyleCheckTasks('./jenkins/check_eol.sh', 'ubuntu_check_eol', 'EOL Check')
-CreateStyleCheckTasks('./jenkins/check_tabs.sh', 'ubuntu_check_tabs', 'Tab Check')
-
-// --------------
-// XPLAT BRANCHES
-// --------------
-
-// Explicitly enumerate xplat-incompatible branches, because we don't anticipate any future incompatible branches
-def isXPlatCompatibleBranch = !(branch in ['release/1.1', 'release/1.1-ci', 'release/1.2', 'release/1.2-ci'])
-
-// Include these explicitly-named branches
-def isXPlatDailyBranch = branch in ['master', 'linux', 'xplat']
-// Include some release/* branches (ignore branches ending in '-ci')
-if (branch.startsWith('release') && !branch.endsWith('-ci')) {
- // Allows all current and future release/* branches on which we should run daily builds of XPlat configs.
- // RegEx matches branch names we should ignore (e.g. release/1.1, release/1.2, release/1.2-pre)
- includeReleaseBranch = !(branch =~ /^release\/(1\.[12](\D.*)?)$/)
- isXPlatDailyBranch |= includeReleaseBranch
-}
-
-// -----------------
-// LINUX BUILD TASKS
-// -----------------
-
-if (isXPlatCompatibleBranch) {
- def osString = 'Ubuntu16.04'
-
- // PR and CI checks
- CreateXPlatBuildTasks(osString, "linux", "ubuntu", branch, null, "")
-
- // daily builds
- if (isXPlatDailyBranch) {
- CreateXPlatBuildTasks(osString, "linux", "daily_ubuntu", branch,
- /* nonDefaultTaskSetup */ { newJob, isPR, config ->
- DailyBuildTaskSetup(newJob, isPR,
- "Ubuntu ${config}",
- 'linux\\s+tests')},
- /* extraBuildParams */ "--extra-defines=PERFMAP_TRACE_ENABLED=1")
- }
-}
-
-// ---------------
-// OSX BUILD TASKS
-// ---------------
-
-if (isXPlatCompatibleBranch) {
- def osString = 'OSX'
-
- // PR and CI checks
- CreateXPlatBuildTasks(osString, "osx", "osx", branch, null, "")
-
- // daily builds
- if (isXPlatDailyBranch) {
- CreateXPlatBuildTasks(osString, "osx", "daily_osx", branch,
- /* nonDefaultTaskSetup */ { newJob, isPR, config ->
- DailyBuildTaskSetup(newJob, isPR,
- "OSX ${config}",
- 'linux\\s+tests')},
- /* extraBuildParams */ "")
- }
-}
-
-// ------------
-// HELP MESSAGE
-// ------------
-
-Utilities.createHelperJob(this, project, branch,
- "Welcome to the ${project} Repository", // This is prepended to the help message
- "For additional documentation on ChakraCore CI checks, please see:\n" +
- "\n" +
- "* https://github.com/Microsoft/ChakraCore/wiki/Jenkins-CI-Checks\n" +
- "* https://github.com/Microsoft/ChakraCore/wiki/Jenkins-Build-Triggers\n" +
- "* https://github.com/Microsoft/ChakraCore/wiki/Jenkins-Repro-Steps\n" +
- "\n" +
- "Have a nice day!") // This is appended to the help message. You might put known issues here.
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Import the utility functionality.
+import jobs.generation.Utilities
+
+// Grab the github project name passed in
+def project = GithubProject
+def branch = GithubBranchName
+
+def msbuildTypeMap = [
+ 'debug':'chk',
+ 'test':'test',
+ 'release':'fre'
+]
+
+// convert `machine` parameter to OS component of PR task name
+def machineTypeToOSTagMap = [
+ 'Windows 7': 'Windows 7', // Windows Server 2008 R2, equivalent to Windows 7
+ 'Windows_NT': 'Windows', // Windows Server 2012 R2, equivalent to Windows 8.1 (aka Blue)
+ 'Ubuntu16.04': 'Ubuntu',
+ 'OSX': 'OSX'
+]
+
+def dailyRegex = 'dailies'
+
+// ---------------
+// HELPER CLOSURES
+// ---------------
+
+def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
+ if (excludeConfigIf && excludeConfigIf(isPR, buildArch, buildType)) {
+ return // early exit: we don't want to create a job for this configuration
+ }
+
+ def config = "${buildArch}_${buildType}"
+ config = (configTag == null) ? config : "${configTag}_${config}"
+
+ // params: Project, BaseTaskName, IsPullRequest (appends '_prtest')
+ def jobName = Utilities.getFullJobName(project, config, isPR)
+
+ def testableConfig = buildType in ['debug', 'test'] && buildArch != 'arm'
+ def analysisConfig = buildType in ['release'] && runCodeAnalysis
+
+ def buildScript = "call .\\jenkins\\buildone.cmd ${buildArch} ${buildType} "
+ buildScript += buildExtra ?: ''
+ buildScript += analysisConfig ? ' "/p:runcodeanalysis=true"' : ''
+ def testScript = "call .\\jenkins\\testone.cmd ${buildArch} ${buildType} "
+ testScript += testExtra ?: ''
+ def analysisScript = '.\\Build\\scripts\\check_prefast_error.ps1 . CodeAnalysis.err'
+
+ def newJob = job(jobName) {
+ // This opens the set of build steps that will be run.
+ // This looks strange, but it is actually a method call, with a
+ // closure as a param, since Groovy allows method calls without parens.
+ // (Compare with '.each' method used above.)
+ steps {
+ batchFile(buildScript) // run the parameter as if it were a batch file
+ if (testableConfig) {
+ batchFile(testScript)
+ }
+ if (analysisConfig) {
+ powerShell(analysisScript)
+ }
+ }
+ }
+
+ def msbuildType = msbuildTypeMap.get(buildType)
+ def msbuildFlavor = "build_${buildArch}${msbuildType}"
+ def archivalString = "test/${msbuildFlavor}.*,test/logs/**"
+ archivalString += analysisConfig ? ',CodeAnalysis.err' : ''
+ Utilities.addArchival(newJob, archivalString,
+ '', // no exclusions from archival
+ false, // doNotFailIfNothingArchived=false ~= failIfNothingArchived
+ false) // archiveOnlyIfSuccessful=false ~= archiveAlways
+
+ Utilities.setMachineAffinity(newJob, machine, 'latest-or-auto')
+ Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
+
+ if (nonDefaultTaskSetup == null) {
+ if (isPR) {
+ def osTag = machineTypeToOSTagMap.get(machine)
+ Utilities.addGithubPRTriggerForBranch(newJob, branch, "${osTag} ${config}")
+ } else {
+ Utilities.addGithubPushTrigger(newJob)
+ }
+ } else {
+ // nonDefaultTaskSetup is e.g. DailyBuildTaskSetup (which sets up daily builds)
+ // These jobs will only be configured for the branch specified below,
+ // which is the name of the branch netci.groovy was processed for.
+ // See list of such branches at:
+ // https://github.com/dotnet/dotnet-ci/blob/master/jobs/data/repolist.txt
+ nonDefaultTaskSetup(newJob, isPR, config)
+ }
+}
+
+def CreateBuildTasks = { machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
+ [true, false].each { isPR ->
+ ['x86', 'x64', 'arm'].each { buildArch ->
+ ['debug', 'test', 'release'].each { buildType ->
+ CreateBuildTask(isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup)
+ }
+ }
+ }
+}
+
+def CreateXPlatBuildTask = { isPR, buildType, staticBuild, machine, platform, configTag,
+ xplatBranch, nonDefaultTaskSetup, customOption, testVariant, extraBuildParams ->
+
+ def config = (platform == "osx" ? "osx_${buildType}" : "linux_${buildType}")
+ def numConcurrentCommand = (platform == "osx" ? "sysctl -n hw.logicalcpu" : "nproc")
+
+ config = (configTag == null) ? config : "${configTag}_${config}"
+ config = staticBuild ? "static_${config}" : "shared_${config}"
+ config = customOption ? customOption.replaceAll(/[-]+/, "_") + "_" + config : config
+
+ // params: Project, BaseTaskName, IsPullRequest (appends '_prtest')
+ def jobName = Utilities.getFullJobName(project, config, isPR)
+
+ def infoScript = "bash jenkins/get_system_info.sh --${platform}"
+ def buildFlag = buildType == "release" ? "" : (buildType == "debug" ? "--debug" : "--test-build")
+ def staticFlag = staticBuild ? "--static" : ""
+ def swbCheckFlag = (platform == "linux" && buildType == "debug" && !staticBuild) ? "--wb-check" : "";
+ def icuFlag = (platform == "osx" ? "--icu=/usr/local/opt/icu4c/include" : "")
+ def compilerPaths = (platform == "osx") ? "" : "--cxx=/usr/bin/clang++-3.9 --cc=/usr/bin/clang-3.9"
+ def buildScript = "bash ./build.sh ${staticFlag} -j=`${numConcurrentCommand}` ${buildFlag} " +
+ "${swbCheckFlag} ${compilerPaths} ${icuFlag} ${customOption} ${extraBuildParams}"
+ def testScript = "bash test/runtests.sh \"${testVariant}\""
+
+ def newJob = job(jobName) {
+ steps {
+ shell(infoScript)
+ shell(buildScript)
+ shell(testScript)
+ }
+ }
+
+ def archivalString = "out/build.log"
+ Utilities.addArchival(newJob, archivalString,
+ '', // no exclusions from archival
+ true, // doNotFailIfNothingArchived=false ~= failIfNothingArchived (true ~= doNotFail)
+ false) // archiveOnlyIfSuccessful=false ~= archiveAlways
+
+ Utilities.setMachineAffinity(newJob, machine, 'latest-or-auto')
+ Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
+
+ if (nonDefaultTaskSetup == null) {
+ if (isPR) {
+ def osTag = machineTypeToOSTagMap.get(machine)
+ Utilities.addGithubPRTriggerForBranch(newJob, xplatBranch, "${osTag} ${config}")
+ } else {
+ Utilities.addGithubPushTrigger(newJob)
+ }
+ } else {
+ // nonDefaultTaskSetup is e.g. DailyBuildTaskSetup (which sets up daily builds)
+ // These jobs will only be configured for the branch specified below,
+ // which is the name of the branch netci.groovy was processed for.
+ // See list of such branches at:
+ // https://github.com/dotnet/dotnet-ci/blob/master/jobs/data/repolist.txt
+ nonDefaultTaskSetup(newJob, isPR, config)
+ }
+}
+
+// Generic task to trigger clang-based cross-plat build tasks
+def CreateXPlatBuildTasks = { machine, platform, configTag, xplatBranch, nonDefaultTaskSetup, extraBuildParams ->
+ [true, false].each { isPR ->
+ CreateXPlatBuildTask(isPR, "test", "", machine, platform,
+ configTag, xplatBranch, nonDefaultTaskSetup, "--no-jit", "--variants disable_jit", extraBuildParams)
+
+ ['debug', 'test', 'release'].each { buildType ->
+ def staticBuildConfigs = [true, false]
+ if (platform == "osx") {
+ staticBuildConfigs = [true]
+ }
+
+ staticBuildConfigs.each { staticBuild ->
+ CreateXPlatBuildTask(isPR, buildType, staticBuild, machine, platform,
+ configTag, xplatBranch, nonDefaultTaskSetup, "", "", extraBuildParams)
+ }
+ }
+ }
+}
+
+def DailyBuildTaskSetup = { newJob, isPR, triggerName, groupRegex ->
+ // The addition of triggers makes the job non-default in GitHub.
+ if (isPR) {
+ def triggerRegex = "(${dailyRegex}|${groupRegex}|${triggerName})"
+ Utilities.addGithubPRTriggerForBranch(newJob, branch,
+ triggerName, // GitHub task name
+ "(?i).*test\\W+${triggerRegex}.*")
+ } else {
+ Utilities.addPeriodicTrigger(newJob, '@daily')
+ }
+}
+
+def CreateStyleCheckTasks = { taskString, taskName, checkName ->
+ [true, false].each { isPR ->
+ def jobName = Utilities.getFullJobName(project, taskName, isPR)
+
+ def newJob = job(jobName) {
+ steps {
+ shell(taskString)
+ }
+ }
+
+ Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
+ if (isPR) {
+ // Set PR trigger.
+ Utilities.addGithubPRTriggerForBranch(newJob, branch, checkName)
+ } else {
+ // Set a push trigger
+ Utilities.addGithubPushTrigger(newJob)
+ }
+
+ Utilities.setMachineAffinity(newJob, 'Ubuntu16.04', 'latest-or-auto')
+ }
+}
+
+// ----------------
+// INNER LOOP TASKS
+// ----------------
+
+CreateBuildTasks('Windows_NT', null, null, "-winBlue", true, null, null)
+
+// Add some additional daily configs to trigger per-PR as a quality gate:
+// x64_debug Slow Tests
+CreateBuildTask(true, 'x64', 'debug',
+ 'Windows_NT', 'ci_slow', null, '-winBlue -includeSlow', false, null, null)
+// x64_debug DisableJIT
+CreateBuildTask(true, 'x64', 'debug',
+ 'Windows_NT', 'ci_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', false, null, null)
+// x64_debug Legacy
+CreateBuildTask(true, 'x64', 'debug',
+ 'Windows 7', 'ci_dev12', 'msbuild12', '-win7 -includeSlow', false, null, null)
+
+// -----------------
+// DAILY BUILD TASKS
+// -----------------
+
+if (!branch.endsWith('-ci')) {
+ // build and test on Windows 7 with VS 2013 (Dev12/MsBuild12)
+ CreateBuildTasks('Windows 7', 'daily_dev12', 'msbuild12', '-win7 -includeSlow', false,
+ /* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch == 'arm') },
+ /* nonDefaultTaskSetup */ { newJob, isPR, config ->
+ DailyBuildTaskSetup(newJob, isPR,
+ "Windows 7 ${config}",
+ '(dev12|legacy)\\s+tests')})
+
+ // build and test on the usual configuration (VS 2015) with -includeSlow
+ CreateBuildTasks('Windows_NT', 'daily_slow', null, '-winBlue -includeSlow', false,
+ /* excludeConfigIf */ null,
+ /* nonDefaultTaskSetup */ { newJob, isPR, config ->
+ DailyBuildTaskSetup(newJob, isPR,
+ "Windows ${config}",
+ 'slow\\s+tests')})
+
+ // build and test on the usual configuration (VS 2015) with JIT disabled
+ CreateBuildTasks('Windows_NT', 'daily_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', true,
+ /* excludeConfigIf */ null,
+ /* nonDefaultTaskSetup */ { newJob, isPR, config ->
+ DailyBuildTaskSetup(newJob, isPR,
+ "Windows ${config}",
+ '(disablejit|nojit)\\s+tests')})
+}
+
+// ----------------
+// CODE STYLE TASKS
+// ----------------
+
+CreateStyleCheckTasks('./jenkins/check_copyright.sh', 'ubuntu_check_copyright', 'Copyright Check')
+CreateStyleCheckTasks('./jenkins/check_eol.sh', 'ubuntu_check_eol', 'EOL Check')
+CreateStyleCheckTasks('./jenkins/check_tabs.sh', 'ubuntu_check_tabs', 'Tab Check')
+
+// --------------
+// XPLAT BRANCHES
+// --------------
+
+// Explicitly enumerate xplat-incompatible branches, because we don't anticipate any future incompatible branches
+def isXPlatCompatibleBranch = !(branch in ['release/1.1', 'release/1.1-ci', 'release/1.2', 'release/1.2-ci'])
+
+// Include these explicitly-named branches
+def isXPlatDailyBranch = branch in ['master', 'linux', 'xplat']
+// Include some release/* branches (ignore branches ending in '-ci')
+if (branch.startsWith('release') && !branch.endsWith('-ci')) {
+ // Allows all current and future release/* branches on which we should run daily builds of XPlat configs.
+ // RegEx matches branch names we should ignore (e.g. release/1.1, release/1.2, release/1.2-pre)
+ includeReleaseBranch = !(branch =~ /^release\/(1\.[12](\D.*)?)$/)
+ isXPlatDailyBranch |= includeReleaseBranch
+}
+
+// -----------------
+// LINUX BUILD TASKS
+// -----------------
+
+if (isXPlatCompatibleBranch) {
+ def osString = 'Ubuntu16.04'
+
+ // PR and CI checks
+ CreateXPlatBuildTasks(osString, "linux", "ubuntu", branch, null, "")
+
+ // daily builds
+ if (isXPlatDailyBranch) {
+ CreateXPlatBuildTasks(osString, "linux", "daily_ubuntu", branch,
+ /* nonDefaultTaskSetup */ { newJob, isPR, config ->
+ DailyBuildTaskSetup(newJob, isPR,
+ "Ubuntu ${config}",
+ 'linux\\s+tests')},
+ /* extraBuildParams */ "--extra-defines=PERFMAP_TRACE_ENABLED=1")
+ }
+}
+
+// ---------------
+// OSX BUILD TASKS
+// ---------------
+
+if (isXPlatCompatibleBranch) {
+ def osString = 'OSX'
+
+ // PR and CI checks
+ CreateXPlatBuildTasks(osString, "osx", "osx", branch, null, "")
+
+ // daily builds
+ if (isXPlatDailyBranch) {
+ CreateXPlatBuildTasks(osString, "osx", "daily_osx", branch,
+ /* nonDefaultTaskSetup */ { newJob, isPR, config ->
+ DailyBuildTaskSetup(newJob, isPR,
+ "OSX ${config}",
+ 'linux\\s+tests')},
+ /* extraBuildParams */ "")
+ }
+}
+
+// ------------
+// HELP MESSAGE
+// ------------
+
+Utilities.createHelperJob(this, project, branch,
+ "Welcome to the ${project} Repository", // This is prepended to the help message
+ "For additional documentation on ChakraCore CI checks, please see:\n" +
+ "\n" +
+ "* https://github.com/Microsoft/ChakraCore/wiki/Jenkins-CI-Checks\n" +
+ "* https://github.com/Microsoft/ChakraCore/wiki/Jenkins-Build-Triggers\n" +
+ "* https://github.com/Microsoft/ChakraCore/wiki/Jenkins-Repro-Steps\n" +
+ "\n" +
+ "Have a nice day!") // This is appended to the help message. You might put known issues here.
diff --git a/deps/chakrashim/core/pal/src/include/pal/synchobjects.hpp b/deps/chakrashim/core/pal/src/include/pal/synchobjects.hpp
index d9318071492..62164a2a410 100644
--- a/deps/chakrashim/core/pal/src/include/pal/synchobjects.hpp
+++ b/deps/chakrashim/core/pal/src/include/pal/synchobjects.hpp
@@ -1,217 +1,217 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//
-
-/*++
-
-
-
-Module Name:
-
- include/pal/synchobjects.hpp
-
-Abstract:
- Header file for synchronization manager and controllers
-
-
-
---*/
-
-#ifndef _SINCHOBJECTS_HPP_
-#define _SINCHOBJECTS_HPP_
-
-#include "corunix.hpp"
-#include "threadinfo.hpp"
-#include "shm.hpp"
-#include "list.h"
-
-#include
-
-#define SharedID SHMPTR
-#define SharedPoolId ULONG_PTR
-#define DefaultSharedPool ((ULONG_PTR)0)
-#define NULLSharedID ((SHMPTR)NULL)
-#define SharedIDToPointer(shID) SHMPTR_TO_TYPED_PTR(PVOID, shID)
-#define SharedIDToTypePointer(TYPE,shID) SHMPTR_TO_TYPED_PTR(TYPE, shID)
-#define RawSharedObjectAlloc(szSize, shPoolId) SHMalloc(szSize)
-#define RawSharedObjectFree(shID) SHMfree(shID)
-
-namespace CorUnix
-{
- DWORD InternalWaitForMultipleObjectsEx(
- CPalThread * pthrCurrent,
- DWORD nCount,
- CONST HANDLE *lpHandles,
- BOOL bWaitAll,
- DWORD dwMilliseconds,
- BOOL bAlertable);
-
- PAL_ERROR InternalSleepEx(
- CPalThread * pthrCurrent,
- DWORD dwMilliseconds,
- BOOL bAlertable);
-
- enum THREAD_STATE
- {
- TS_IDLE,
- TS_STARTING,
- TS_RUNNING,
- TS_FAILED,
- TS_DONE,
- };
-
- // forward declarations
- struct _ThreadWaitInfo;
- struct _WaitingThreadsListNode;
- class CSynchData;
-
- typedef struct _WaitingThreadsListNode * PWaitingThreadsListNode;
- typedef struct _OwnedObjectsListNode * POwnedObjectsListNode;
- typedef struct _ThreadApcInfoNode * PThreadApcInfoNode;
-
- typedef struct _ThreadWaitInfo
- {
- WaitType wtWaitType;
- WaitDomain wdWaitDomain;
- LONG lObjCount;
- LONG lSharedObjCount;
- CPalThread * pthrOwner;
- PWaitingThreadsListNode rgpWTLNodes[MAXIMUM_WAIT_OBJECTS];
-
- _ThreadWaitInfo() : wtWaitType(SingleObject), wdWaitDomain(LocalWait),
- lObjCount(0), lSharedObjCount(0),
- pthrOwner(NULL) {}
- } ThreadWaitInfo;
-
- typedef struct _ThreadNativeWaitData
- {
-#if !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- pthread_mutex_t mutex;
- pthread_cond_t cond;
- int iPred;
-#else // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- int iPipeRd;
- int iPipeWr;
-#endif // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
-
- DWORD dwObjectIndex;
- ThreadWakeupReason twrWakeupReason;
- bool fInitialized;
-
- _ThreadNativeWaitData() :
-#if !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- iPred(0),
-#else // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- iPipeRd(-1),
- iPipeWr(-1),
-#endif // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- dwObjectIndex(0),
- twrWakeupReason(WaitSucceeded),
- fInitialized(false)
- {
- }
-
- ~_ThreadNativeWaitData();
- } ThreadNativeWaitData;
-
- class CThreadSynchronizationInfo : public CThreadInfoInitializer
- {
- friend class CPalSynchronizationManager;
- friend class CSynchWaitController;
-
- THREAD_STATE m_tsThreadState;
- SharedID m_shridWaitAwakened;
- Volatile m_lLocalSynchLockCount;
- Volatile m_lSharedSynchLockCount;
- LIST_ENTRY m_leOwnedObjsList;
-
- ThreadNativeWaitData m_tnwdNativeData;
- ThreadWaitInfo m_twiWaitInfo;
-
-#ifdef SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING
- static const int PendingSignalingsArraySize = 10;
- LONG m_lPendingSignalingCount;
- CPalThread * m_rgpthrPendingSignalings[PendingSignalingsArraySize];
- LIST_ENTRY m_lePendingSignalingsOverflowList;
-#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING
-
- public:
-
- CThreadSynchronizationInfo();
- virtual ~CThreadSynchronizationInfo();
-
- //
- // CThreadInfoInitializer methods
- //
- virtual PAL_ERROR InitializePreCreate(void);
-
- virtual PAL_ERROR InitializePostCreate(
- CPalThread *pthrCurrent,
- SIZE_T threadId,
- DWORD dwLwpId
- );
-
- THREAD_STATE GetThreadState(void)
- {
- return m_tsThreadState;
- };
-
- void SetThreadState(THREAD_STATE tsThreadState)
- {
- m_tsThreadState = tsThreadState;
- };
-
- ThreadNativeWaitData * GetNativeData()
- {
- return &m_tnwdNativeData;
- }
-
-#if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- PAL_ERROR RunDeferredThreadConditionSignalings();
-#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
-
- // NOTE: the following methods provide non-synchronized access to
- // the list of owned objects for this thread. Any thread
- // accessing this list MUST own the appropriate
- // synchronization lock(s).
- void AddObjectToOwnedList(POwnedObjectsListNode pooln);
- void RemoveObjectFromOwnedList(POwnedObjectsListNode pooln);
- POwnedObjectsListNode RemoveFirstObjectFromOwnedList(void);
-
- // The following methods provide access to the native wait lock for
- // those implementations that need a lock to protect the support for
- // native thread blocking (e.g.: pthread conditions)
- void AcquireNativeWaitLock(void);
- void ReleaseNativeWaitLock(void);
- bool TryAcquireNativeWaitLock(void);
- };
-
- class CThreadApcInfo : public CThreadInfoInitializer
- {
- friend class CPalSynchronizationManager;
-
- PThreadApcInfoNode m_ptainHead;
- PThreadApcInfoNode m_ptainTail;
-
- public:
- CThreadApcInfo() :
- m_ptainHead(NULL),
- m_ptainTail(NULL)
- {
- }
- };
-
- class CPalSynchMgrController
- {
- public:
- static IPalSynchronizationManager * CreatePalSynchronizationManager();
-
- static PAL_ERROR PrepareForShutdown(void);
-
- static PAL_ERROR Shutdown(CPalThread *pthrCurrent, bool fFullCleanup);
- };
-}
-
-#endif // _SINCHOBJECTS_HPP_
-
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+/*++
+
+
+
+Module Name:
+
+ include/pal/synchobjects.hpp
+
+Abstract:
+ Header file for synchronization manager and controllers
+
+
+
+--*/
+
+#ifndef _SINCHOBJECTS_HPP_
+#define _SINCHOBJECTS_HPP_
+
+#include "corunix.hpp"
+#include "threadinfo.hpp"
+#include "shm.hpp"
+#include "list.h"
+
+#include
+
+#define SharedID SHMPTR
+#define SharedPoolId ULONG_PTR
+#define DefaultSharedPool ((ULONG_PTR)0)
+#define NULLSharedID ((SHMPTR)NULL)
+#define SharedIDToPointer(shID) SHMPTR_TO_TYPED_PTR(PVOID, shID)
+#define SharedIDToTypePointer(TYPE,shID) SHMPTR_TO_TYPED_PTR(TYPE, shID)
+#define RawSharedObjectAlloc(szSize, shPoolId) SHMalloc(szSize)
+#define RawSharedObjectFree(shID) SHMfree(shID)
+
+namespace CorUnix
+{
+ DWORD InternalWaitForMultipleObjectsEx(
+ CPalThread * pthrCurrent,
+ DWORD nCount,
+ CONST HANDLE *lpHandles,
+ BOOL bWaitAll,
+ DWORD dwMilliseconds,
+ BOOL bAlertable);
+
+ PAL_ERROR InternalSleepEx(
+ CPalThread * pthrCurrent,
+ DWORD dwMilliseconds,
+ BOOL bAlertable);
+
+ enum THREAD_STATE
+ {
+ TS_IDLE,
+ TS_STARTING,
+ TS_RUNNING,
+ TS_FAILED,
+ TS_DONE,
+ };
+
+ // forward declarations
+ struct _ThreadWaitInfo;
+ struct _WaitingThreadsListNode;
+ class CSynchData;
+
+ typedef struct _WaitingThreadsListNode * PWaitingThreadsListNode;
+ typedef struct _OwnedObjectsListNode * POwnedObjectsListNode;
+ typedef struct _ThreadApcInfoNode * PThreadApcInfoNode;
+
+ typedef struct _ThreadWaitInfo
+ {
+ WaitType wtWaitType;
+ WaitDomain wdWaitDomain;
+ LONG lObjCount;
+ LONG lSharedObjCount;
+ CPalThread * pthrOwner;
+ PWaitingThreadsListNode rgpWTLNodes[MAXIMUM_WAIT_OBJECTS];
+
+ _ThreadWaitInfo() : wtWaitType(SingleObject), wdWaitDomain(LocalWait),
+ lObjCount(0), lSharedObjCount(0),
+ pthrOwner(NULL) {}
+ } ThreadWaitInfo;
+
+ typedef struct _ThreadNativeWaitData
+ {
+#if !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
+ int iPred;
+#else // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ int iPipeRd;
+ int iPipeWr;
+#endif // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+
+ DWORD dwObjectIndex;
+ ThreadWakeupReason twrWakeupReason;
+ bool fInitialized;
+
+ _ThreadNativeWaitData() :
+#if !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ iPred(0),
+#else // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ iPipeRd(-1),
+ iPipeWr(-1),
+#endif // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ dwObjectIndex(0),
+ twrWakeupReason(WaitSucceeded),
+ fInitialized(false)
+ {
+ }
+
+ ~_ThreadNativeWaitData();
+ } ThreadNativeWaitData;
+
+ class CThreadSynchronizationInfo : public CThreadInfoInitializer
+ {
+ friend class CPalSynchronizationManager;
+ friend class CSynchWaitController;
+
+ THREAD_STATE m_tsThreadState;
+ SharedID m_shridWaitAwakened;
+ Volatile m_lLocalSynchLockCount;
+ Volatile m_lSharedSynchLockCount;
+ LIST_ENTRY m_leOwnedObjsList;
+
+ ThreadNativeWaitData m_tnwdNativeData;
+ ThreadWaitInfo m_twiWaitInfo;
+
+#ifdef SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING
+ static const int PendingSignalingsArraySize = 10;
+ LONG m_lPendingSignalingCount;
+ CPalThread * m_rgpthrPendingSignalings[PendingSignalingsArraySize];
+ LIST_ENTRY m_lePendingSignalingsOverflowList;
+#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING
+
+ public:
+
+ CThreadSynchronizationInfo();
+ virtual ~CThreadSynchronizationInfo();
+
+ //
+ // CThreadInfoInitializer methods
+ //
+ virtual PAL_ERROR InitializePreCreate(void);
+
+ virtual PAL_ERROR InitializePostCreate(
+ CPalThread *pthrCurrent,
+ SIZE_T threadId,
+ DWORD dwLwpId
+ );
+
+ THREAD_STATE GetThreadState(void)
+ {
+ return m_tsThreadState;
+ };
+
+ void SetThreadState(THREAD_STATE tsThreadState)
+ {
+ m_tsThreadState = tsThreadState;
+ };
+
+ ThreadNativeWaitData * GetNativeData()
+ {
+ return &m_tnwdNativeData;
+ }
+
+#if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ PAL_ERROR RunDeferredThreadConditionSignalings();
+#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+
+ // NOTE: the following methods provide non-synchronized access to
+ // the list of owned objects for this thread. Any thread
+ // accessing this list MUST own the appropriate
+ // synchronization lock(s).
+ void AddObjectToOwnedList(POwnedObjectsListNode pooln);
+ void RemoveObjectFromOwnedList(POwnedObjectsListNode pooln);
+ POwnedObjectsListNode RemoveFirstObjectFromOwnedList(void);
+
+ // The following methods provide access to the native wait lock for
+ // those implementations that need a lock to protect the support for
+ // native thread blocking (e.g.: pthread conditions)
+ void AcquireNativeWaitLock(void);
+ void ReleaseNativeWaitLock(void);
+ bool TryAcquireNativeWaitLock(void);
+ };
+
+ class CThreadApcInfo : public CThreadInfoInitializer
+ {
+ friend class CPalSynchronizationManager;
+
+ PThreadApcInfoNode m_ptainHead;
+ PThreadApcInfoNode m_ptainTail;
+
+ public:
+ CThreadApcInfo() :
+ m_ptainHead(NULL),
+ m_ptainTail(NULL)
+ {
+ }
+ };
+
+ class CPalSynchMgrController
+ {
+ public:
+ static IPalSynchronizationManager * CreatePalSynchronizationManager();
+
+ static PAL_ERROR PrepareForShutdown(void);
+
+ static PAL_ERROR Shutdown(CPalThread *pthrCurrent, bool fFullCleanup);
+ };
+}
+
+#endif // _SINCHOBJECTS_HPP_
+
diff --git a/deps/chakrashim/core/pal/src/safecrt/mbusafecrt.c b/deps/chakrashim/core/pal/src/safecrt/mbusafecrt.c
index 4cf67e691b0..d3ca1dc4736 100644
--- a/deps/chakrashim/core/pal/src/safecrt/mbusafecrt.c
+++ b/deps/chakrashim/core/pal/src/safecrt/mbusafecrt.c
@@ -1,255 +1,255 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//
-
-/***
-* mbusafecrt.c - implementation of support functions and data for MBUSafeCRT
-*
-
-*
-* Purpose:
-* This file contains the implementation of support functions and
-* data for MBUSafeCRT declared in mbusafecrt.h and mbusafecrt_internal.h.
-****/
-
-#include "pal/palinternal.h"
-#include
-#include
-#include
-
-#include "mbusafecrt_internal.h"
-
-/* global data */
-tSafeCRT_AssertFuncPtr sMBUSafeCRTAssertFunc = NULL;
-
-/***
-* MBUSafeCRTSetAssertFunc - Set the function called when an assert fails.
-****/
-
-void MBUSafeCRTSetAssertFunc( tSafeCRT_AssertFuncPtr inAssertFuncPtr )
-{
- /* set it */
- sMBUSafeCRTAssertFunc = inAssertFuncPtr;
-}
-
-/***
-* _putc_nolock - putc for the miniFILE stream.
-****/
-
-int _putc_nolock( char inChar, miniFILE* inStream )
-{
- int returnValue = EOF;
-
- inStream->_cnt -= sizeof( char );
-
- if ( ( inStream->_cnt ) >= 0 )
- {
- *( inStream->_ptr ) = inChar;
- inStream->_ptr += sizeof( char );
- returnValue = ( int )inChar;
- }
-
- return returnValue;
-}
-
-/***
-* _putwc_nolock - putwc for the miniFILE stream.
-****/
-
-int _putwc_nolock( char16_t inChar, miniFILE* inStream )
-{
- int returnValue = WEOF;
-
- inStream->_cnt -= sizeof( char16_t );
-
- if ( ( inStream->_cnt ) >= 0 )
- {
- *( ( char16_t* )( inStream->_ptr ) ) = inChar;
- inStream->_ptr += sizeof( char16_t );
- returnValue = ( int )inChar;
- }
-
- return returnValue;
-}
-
-/***
-* _getc_nolock - getc for the miniFILE stream.
-****/
-
-int _getc_nolock( miniFILE* inStream )
-{
- int returnValue = EOF;
-
- if ( ( inStream->_cnt ) >= ( int )( sizeof( char ) ) )
- {
- inStream->_cnt -= sizeof( char );
- returnValue = ( int )( *( inStream->_ptr ) );
- inStream->_ptr += sizeof( char );
- }
-
- return returnValue;
-}
-
-/***
-* _getwc_nolock - getc for the miniFILE stream.
-****/
-
-int _getwc_nolock( miniFILE* inStream )
-{
- int returnValue = EOF;
-
- if ( ( inStream->_cnt ) >= ( int )( sizeof( char16_t ) ) )
- {
- inStream->_cnt -= sizeof( char16_t );
- returnValue = ( int )( *( ( char16_t* )( inStream->_ptr ) ) );
- inStream->_ptr += sizeof( char16_t );
- }
-
- return returnValue;
-}
-
-/***
-* _ungetc_nolock - ungetc for the miniFILE stream.
-****/
-
-int _ungetc_nolock( char inChar, miniFILE* inStream )
-{
- int returnValue = EOF;
-
- if ( ( size_t )( ( inStream->_ptr ) - ( inStream->_base ) ) >= ( sizeof( char ) ) )
- {
- inStream->_cnt += sizeof( char );
- inStream->_ptr -= sizeof( char );
- return ( int )inChar;
- }
-
- return returnValue;
-}
-
-/***
-* _ungetwc_nolock - ungetwc for the miniFILE stream.
-****/
-
-int _ungetwc_nolock( char16_t inChar, miniFILE* inStream )
-{
- int returnValue = WEOF;
-
- if ( ( size_t )( ( inStream->_ptr ) - ( inStream->_base ) ) >= ( sizeof( char16_t ) ) )
- {
- inStream->_cnt += sizeof( char16_t );
- inStream->_ptr -= sizeof( char16_t );
- returnValue = ( unsigned short )inChar;
- }
-
- return returnValue;
-}
-
-
-/***
-* _safecrt_cfltcvt - convert a float to an ascii string.
-* Uses sprintf - this usage is OK.
-****/
-
-/* routine used for floating-point output */
-#define FORMATSIZE 30
-
-#define _snprintf snprintf
-
-// taken from output.inl
-#define FL_ALTERNATE 0x00080 /* alternate form requested */
-
-errno_t _safecrt_cfltcvt(double *arg, char *buffer, size_t sizeInBytes, int type, int precision, int flags)
-{
- char format[FORMATSIZE];
- size_t formatlen = 0;
- int retvalue;
-
- if (flags & 1)
- {
- type -= 'a' - 'A';
- }
- formatlen = 0;
- format[formatlen++] = '%';
- if (flags & FL_ALTERNATE)
- {
- format[formatlen++] = '#';
- }
- format[formatlen++] = '.';
- _itoa_s(precision, format + formatlen, FORMATSIZE - formatlen, 10);
- formatlen = strlen(format);
- format[formatlen++] = (char)type;
- format[formatlen] = 0;
-
- buffer[sizeInBytes - 1] = 0;
- retvalue = _snprintf(buffer, sizeInBytes, format, *arg);
- if (buffer[sizeInBytes - 1] != 0 || retvalue <= 0)
- {
- buffer[0] = 0;
- return EINVAL;
- }
- return 0;
-}
-
-
-/***
-* _safecrt_fassign - convert a string into a float or double.
-****/
-
-void _safecrt_fassign(int flag, void* argument, char* number )
-{
- if ( flag != 0 ) // double
- {
- double dblValue = 0.0;
- (void)sscanf( number, "%lf", &dblValue );
- *( ( double* )argument ) = dblValue;
- }
- else // float
- {
- float fltValue = 0.0;
- (void)sscanf( number, "%f", &fltValue );
- *( ( float* )argument ) = fltValue;
- }
-}
-
-
-/***
-* _safecrt_wfassign - convert a char16_t string into a float or double.
-****/
-
-void _safecrt_wfassign(int flag, void* argument, char16_t* number )
-{
- // We cannot use system functions for this - they
- // assume that char16_t is four bytes, while we assume
- // two. So, we need to convert to a regular char string
- // without using any system functions. To do this,
- // we'll assume that the numbers are in the 0-9 range and
- // do a simple conversion.
-
- char* numberAsChars = ( char* )number;
- int position = 0;
-
- // do the convert
- while ( number[ position ] != 0 )
- {
- numberAsChars[ position ] = ( char )( number[ position ] & 0x00FF );
- position++;
- }
- numberAsChars[ position ] = ( char )( number[ position ] & 0x00FF );
-
- // call the normal char version
- _safecrt_fassign( flag, argument, numberAsChars );
-}
-
-
-/***
-* _minimal_chartowchar - do a simple char to wchar conversion.
-****/
-
-int _minimal_chartowchar( char16_t* outWChar, const char* inChar )
-{
- *outWChar = ( char16_t )( ( unsigned short )( ( unsigned char )( *inChar ) ) );
- return 1;
-}
-
-
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+/***
+* mbusafecrt.c - implementation of support functions and data for MBUSafeCRT
+*
+
+*
+* Purpose:
+* This file contains the implementation of support functions and
+* data for MBUSafeCRT declared in mbusafecrt.h and mbusafecrt_internal.h.
+****/
+
+#include "pal/palinternal.h"
+#include
+#include
+#include
+
+#include "mbusafecrt_internal.h"
+
+/* global data */
+tSafeCRT_AssertFuncPtr sMBUSafeCRTAssertFunc = NULL;
+
+/***
+* MBUSafeCRTSetAssertFunc - Set the function called when an assert fails.
+****/
+
+void MBUSafeCRTSetAssertFunc( tSafeCRT_AssertFuncPtr inAssertFuncPtr )
+{
+ /* set it */
+ sMBUSafeCRTAssertFunc = inAssertFuncPtr;
+}
+
+/***
+* _putc_nolock - putc for the miniFILE stream.
+****/
+
+int _putc_nolock( char inChar, miniFILE* inStream )
+{
+ int returnValue = EOF;
+
+ inStream->_cnt -= sizeof( char );
+
+ if ( ( inStream->_cnt ) >= 0 )
+ {
+ *( inStream->_ptr ) = inChar;
+ inStream->_ptr += sizeof( char );
+ returnValue = ( int )inChar;
+ }
+
+ return returnValue;
+}
+
+/***
+* _putwc_nolock - putwc for the miniFILE stream.
+****/
+
+int _putwc_nolock( char16_t inChar, miniFILE* inStream )
+{
+ int returnValue = WEOF;
+
+ inStream->_cnt -= sizeof( char16_t );
+
+ if ( ( inStream->_cnt ) >= 0 )
+ {
+ *( ( char16_t* )( inStream->_ptr ) ) = inChar;
+ inStream->_ptr += sizeof( char16_t );
+ returnValue = ( int )inChar;
+ }
+
+ return returnValue;
+}
+
+/***
+* _getc_nolock - getc for the miniFILE stream.
+****/
+
+int _getc_nolock( miniFILE* inStream )
+{
+ int returnValue = EOF;
+
+ if ( ( inStream->_cnt ) >= ( int )( sizeof( char ) ) )
+ {
+ inStream->_cnt -= sizeof( char );
+ returnValue = ( int )( *( inStream->_ptr ) );
+ inStream->_ptr += sizeof( char );
+ }
+
+ return returnValue;
+}
+
+/***
+* _getwc_nolock - getc for the miniFILE stream.
+****/
+
+int _getwc_nolock( miniFILE* inStream )
+{
+ int returnValue = EOF;
+
+ if ( ( inStream->_cnt ) >= ( int )( sizeof( char16_t ) ) )
+ {
+ inStream->_cnt -= sizeof( char16_t );
+ returnValue = ( int )( *( ( char16_t* )( inStream->_ptr ) ) );
+ inStream->_ptr += sizeof( char16_t );
+ }
+
+ return returnValue;
+}
+
+/***
+* _ungetc_nolock - ungetc for the miniFILE stream.
+****/
+
+int _ungetc_nolock( char inChar, miniFILE* inStream )
+{
+ int returnValue = EOF;
+
+ if ( ( size_t )( ( inStream->_ptr ) - ( inStream->_base ) ) >= ( sizeof( char ) ) )
+ {
+ inStream->_cnt += sizeof( char );
+ inStream->_ptr -= sizeof( char );
+ return ( int )inChar;
+ }
+
+ return returnValue;
+}
+
+/***
+* _ungetwc_nolock - ungetwc for the miniFILE stream.
+****/
+
+int _ungetwc_nolock( char16_t inChar, miniFILE* inStream )
+{
+ int returnValue = WEOF;
+
+ if ( ( size_t )( ( inStream->_ptr ) - ( inStream->_base ) ) >= ( sizeof( char16_t ) ) )
+ {
+ inStream->_cnt += sizeof( char16_t );
+ inStream->_ptr -= sizeof( char16_t );
+ returnValue = ( unsigned short )inChar;
+ }
+
+ return returnValue;
+}
+
+
+/***
+* _safecrt_cfltcvt - convert a float to an ascii string.
+* Uses sprintf - this usage is OK.
+****/
+
+/* routine used for floating-point output */
+#define FORMATSIZE 30
+
+#define _snprintf snprintf
+
+// taken from output.inl
+#define FL_ALTERNATE 0x00080 /* alternate form requested */
+
+errno_t _safecrt_cfltcvt(double *arg, char *buffer, size_t sizeInBytes, int type, int precision, int flags)
+{
+ char format[FORMATSIZE];
+ size_t formatlen = 0;
+ int retvalue;
+
+ if (flags & 1)
+ {
+ type -= 'a' - 'A';
+ }
+ formatlen = 0;
+ format[formatlen++] = '%';
+ if (flags & FL_ALTERNATE)
+ {
+ format[formatlen++] = '#';
+ }
+ format[formatlen++] = '.';
+ _itoa_s(precision, format + formatlen, FORMATSIZE - formatlen, 10);
+ formatlen = strlen(format);
+ format[formatlen++] = (char)type;
+ format[formatlen] = 0;
+
+ buffer[sizeInBytes - 1] = 0;
+ retvalue = _snprintf(buffer, sizeInBytes, format, *arg);
+ if (buffer[sizeInBytes - 1] != 0 || retvalue <= 0)
+ {
+ buffer[0] = 0;
+ return EINVAL;
+ }
+ return 0;
+}
+
+
+/***
+* _safecrt_fassign - convert a string into a float or double.
+****/
+
+void _safecrt_fassign(int flag, void* argument, char* number )
+{
+ if ( flag != 0 ) // double
+ {
+ double dblValue = 0.0;
+ (void)sscanf( number, "%lf", &dblValue );
+ *( ( double* )argument ) = dblValue;
+ }
+ else // float
+ {
+ float fltValue = 0.0;
+ (void)sscanf( number, "%f", &fltValue );
+ *( ( float* )argument ) = fltValue;
+ }
+}
+
+
+/***
+* _safecrt_wfassign - convert a char16_t string into a float or double.
+****/
+
+void _safecrt_wfassign(int flag, void* argument, char16_t* number )
+{
+ // We cannot use system functions for this - they
+ // assume that char16_t is four bytes, while we assume
+ // two. So, we need to convert to a regular char string
+ // without using any system functions. To do this,
+ // we'll assume that the numbers are in the 0-9 range and
+ // do a simple conversion.
+
+ char* numberAsChars = ( char* )number;
+ int position = 0;
+
+ // do the convert
+ while ( number[ position ] != 0 )
+ {
+ numberAsChars[ position ] = ( char )( number[ position ] & 0x00FF );
+ position++;
+ }
+ numberAsChars[ position ] = ( char )( number[ position ] & 0x00FF );
+
+ // call the normal char version
+ _safecrt_fassign( flag, argument, numberAsChars );
+}
+
+
+/***
+* _minimal_chartowchar - do a simple char to wchar conversion.
+****/
+
+int _minimal_chartowchar( char16_t* outWChar, const char* inChar )
+{
+ *outWChar = ( char16_t )( ( unsigned short )( ( unsigned char )( *inChar ) ) );
+ return 1;
+}
+
+
diff --git a/deps/chakrashim/core/pal/src/safecrt/vswprint.c b/deps/chakrashim/core/pal/src/safecrt/vswprint.c
index ffa7433058c..03160c77363 100644
--- a/deps/chakrashim/core/pal/src/safecrt/vswprint.c
+++ b/deps/chakrashim/core/pal/src/safecrt/vswprint.c
@@ -1,293 +1,293 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//
-
-/***
-*vswprint.c - print formatted data into a string from var arg list
-*
-*Purpose:
-* defines vswprintf(), _vswprintf_c and _vsnwprintf() - print formatted output to
-* a string, get the data from an argument ptr instead of explicit
-* arguments.
-*
-*******************************************************************************/
-
-
-#include
-#include
-#include
-#include "internal_securecrt.h"
-
-#include "mbusafecrt_internal.h"
-
-typedef int (*WOUTPUTFN)(miniFILE *, const char16_t *, va_list);
-
-static int _vswprintf_helper( WOUTPUTFN outfn, char16_t *string, size_t count, const char16_t *format, va_list ap );
-static int _vscwprintf_helper (WOUTPUTFN outfn, const char16_t *format, va_list ap );
-
-/***
-*ifndef _COUNT_
-*int _vswprintf(string, format, ap) - print formatted data to string from arg ptr
-*else
-*ifndef _SWPRINTFS_ERROR_RETURN_FIX
-*int _vsnwprintf(string, cnt, format, ap) - print formatted data to string from arg ptr
-*else
-*int _vswprintf_c(string, cnt, format, ...) - print formatted data to string
-*endif
-*endif
-*
-*Purpose:
-* Prints formatted data, but to a string and gets data from an argument
-* pointer.
-* Sets up a FILE so file i/o operations can be used, make string look
-* like a huge buffer to it, but _flsbuf will refuse to flush it if it
-* fills up. Appends '\0' to make it a true string.
-*
-* Allocate the 'fake' _iob[] entryit statically instead of on
-* the stack so that other routines can assume that _iob[] entries are in
-* are in DGROUP and, thus, are near.
-*
-*ifdef _COUNT_
-*ifndef _SWPRINTFS_ERROR_RETURN_FIX
-* The _vsnwprintf() flavor takes a count argument that is
-* the max number of bytes that should be written to the
-* user's buffer.
-* We don't expose this function directly in the headers.
-*else
-* The _vswprintf_c() flavor does the same thing as the _snwprintf
-* above, but, it also fixes an issue in the return value in the case
-* when there isn't enough space to write the null terminator
-* We don't fix this issue in _vsnwprintf because of backward
-* compatibility. In new code, however, _vsnwprintf is #defined to
-* _vswprintf_c so users get the fix.
-*
-*endif
-*
-* Multi-thread: (1) Since there is no stream, this routine must never try
-* to get the stream lock (i.e., there is no stream lock either). (2)
-* Also, since there is only one statically allocated 'fake' iob, we must
-* lock/unlock to prevent collisions.
-*
-*Entry:
-* char16_t *string - place to put destination string
-*ifdef _COUNT_
-* size_t count - max number of bytes to put in buffer
-*endif
-* char16_t *format - format string, describes format of data
-* va_list ap - varargs argument pointer
-*
-*Exit:
-* returns number of wide characters in string
-* returns -2 if the string has been truncated (only in _vsnprintf_helper)
-* returns -1 in other error cases
-*
-*Exceptions:
-*
-*******************************************************************************/
-
-int __cdecl _vswprintf_helper (
- WOUTPUTFN woutfn,
- char16_t *string,
- size_t count,
- const char16_t *format,
- va_list ap
- )
-{
- miniFILE str;
- miniFILE *outfile = &str;
- int retval;
-
- _VALIDATE_RETURN( (format != NULL), EINVAL, -1);
-
- _VALIDATE_RETURN( (count == 0) || (string != NULL), EINVAL, -1 );
-
- outfile->_flag = _IOWRT|_IOSTRG;
- outfile->_ptr = outfile->_base = (char *) string;
-
- if(count>(INT_MAX/sizeof(char16_t)))
- {
- /* old-style functions allow any large value to mean unbounded */
- outfile->_cnt = INT_MAX;
- }
- else
- {
- outfile->_cnt = (int)(count*sizeof(char16_t));
- }
-
- retval = woutfn(outfile, format, ap );
-
- if(string==NULL)
- {
- return retval;
- }
-
- if((retval >= 0) && (_putc_nolock('\0',outfile) != EOF) && (_putc_nolock('\0',outfile) != EOF))
- return(retval);
-
- string[count - 1] = 0;
- if (outfile->_cnt < 0)
- {
- /* the buffer was too small; we return -2 to indicate truncation */
- return -2;
- }
- return -1;
-}
-
-int __cdecl _vswprintf_s (
- char16_t *string,
- size_t sizeInWords,
- const char16_t *format,
- va_list ap
- )
-{
- int retvalue = -1;
-
- /* validation section */
- _VALIDATE_RETURN(format != NULL, EINVAL, -1);
- _VALIDATE_RETURN(string != NULL && sizeInWords > 0, EINVAL, -1);
-
- retvalue = _vswprintf_helper(_woutput_s, string, sizeInWords, format, ap);
- if (retvalue < 0)
- {
- string[0] = 0;
- _SECURECRT__FILL_STRING(string, sizeInWords, 1);
- }
- if (retvalue == -2)
- {
- _VALIDATE_RETURN(("Buffer too small" && 0), ERANGE, -1);
- }
- if (retvalue >= 0)
- {
- _SECURECRT__FILL_STRING(string, sizeInWords, retvalue + 1);
- }
-
- return retvalue;
-}
-
-int __cdecl vswprintf_s (
- char16_t *string,
- size_t sizeInWords,
- const char16_t *format,
- va_list ap
- )
-{
- return _vswprintf_s(string, sizeInWords, format, ap);
-}
-
-int __cdecl _vsnwprintf_s (
- char16_t *string,
- size_t sizeInWords,
- size_t count,
- const char16_t *format,
- va_list ap
- )
-{
- int retvalue = -1;
- errno_t save_errno = 0;
-
- /* validation section */
- _VALIDATE_RETURN(format != NULL, EINVAL, -1);
- if (count == 0 && string == NULL && sizeInWords == 0)
- {
- /* this case is allowed; nothing to do */
- return 0;
- }
- _VALIDATE_RETURN(string != NULL && sizeInWords > 0, EINVAL, -1);
-
- if (sizeInWords > count)
- {
- save_errno = errno;
- retvalue = _vswprintf_helper(_woutput_s, string, count + 1, format, ap);
- if (retvalue == -2)
- {
- /* the string has been truncated, return -1 */
- _SECURECRT__FILL_STRING(string, sizeInWords, count + 1);
- if (errno == ERANGE)
- {
- errno = save_errno;
- }
- return -1;
- }
- }
- else /* sizeInWords <= count */
- {
- save_errno = errno;
- retvalue = _vswprintf_helper(_woutput_s, string, sizeInWords, format, ap);
- string[sizeInWords - 1] = 0;
- /* we allow truncation if count == _TRUNCATE */
- if (retvalue == -2 && count == _TRUNCATE)
- {
- if (errno == ERANGE)
- {
- errno = save_errno;
- }
- return -1;
- }
- }
-
- if (retvalue < 0)
- {
- string[0] = 0;
- _SECURECRT__FILL_STRING(string, sizeInWords, 1);
- if (retvalue == -2)
- {
- _VALIDATE_RETURN(("Buffer too small" && 0), ERANGE, -1);
- }
- return -1;
- }
-
- _SECURECRT__FILL_STRING(string, sizeInWords, retvalue + 1);
-
- return (retvalue < 0 ? -1 : retvalue);
-}
-
-/***
-* _vscwprintf() - counts the number of character needed to print the formatted
-* data
-*
-*Purpose:
-* Counts the number of characters in the formatted data.
-*
-*Entry:
-* char16_t *format - format string, describes format of data
-* va_list ap - varargs argument pointer
-*
-*Exit:
-* returns number of characters needed to print formatted data.
-*
-*Exceptions:
-*
-*******************************************************************************/
-
-#ifndef _COUNT_
-
-int __cdecl _vscwprintf_helper (
- WOUTPUTFN woutfn,
- const char16_t *format,
- va_list ap
- )
-{
- miniFILE str;
- miniFILE *outfile = &str;
- int retval;
-
- _VALIDATE_RETURN( (format != NULL), EINVAL, -1);
-
- outfile->_cnt = INT_MAX; //MAXSTR;
- outfile->_flag = _IOWRT|_IOSTRG;
- outfile->_ptr = outfile->_base = NULL;
-
- retval = woutfn(outfile, format, ap);
- return(retval);
-}
-
-int __cdecl _vscwprintf (
- const char16_t *format,
- va_list ap
- )
-{
- return _vscwprintf_helper(_woutput_s, format, ap);
-}
-
-#endif /* _COUNT_ */
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+/***
+*vswprint.c - print formatted data into a string from var arg list
+*
+*Purpose:
+* defines vswprintf(), _vswprintf_c and _vsnwprintf() - print formatted output to
+* a string, get the data from an argument ptr instead of explicit
+* arguments.
+*
+*******************************************************************************/
+
+
+#include
+#include
+#include
+#include "internal_securecrt.h"
+
+#include "mbusafecrt_internal.h"
+
+typedef int (*WOUTPUTFN)(miniFILE *, const char16_t *, va_list);
+
+static int _vswprintf_helper( WOUTPUTFN outfn, char16_t *string, size_t count, const char16_t *format, va_list ap );
+static int _vscwprintf_helper (WOUTPUTFN outfn, const char16_t *format, va_list ap );
+
+/***
+*ifndef _COUNT_
+*int _vswprintf(string, format, ap) - print formatted data to string from arg ptr
+*else
+*ifndef _SWPRINTFS_ERROR_RETURN_FIX
+*int _vsnwprintf(string, cnt, format, ap) - print formatted data to string from arg ptr
+*else
+*int _vswprintf_c(string, cnt, format, ...) - print formatted data to string
+*endif
+*endif
+*
+*Purpose:
+* Prints formatted data, but to a string and gets data from an argument
+* pointer.
+* Sets up a FILE so file i/o operations can be used, make string look
+* like a huge buffer to it, but _flsbuf will refuse to flush it if it
+* fills up. Appends '\0' to make it a true string.
+*
+* Allocate the 'fake' _iob[] entryit statically instead of on
+* the stack so that other routines can assume that _iob[] entries are in
+* are in DGROUP and, thus, are near.
+*
+*ifdef _COUNT_
+*ifndef _SWPRINTFS_ERROR_RETURN_FIX
+* The _vsnwprintf() flavor takes a count argument that is
+* the max number of bytes that should be written to the
+* user's buffer.
+* We don't expose this function directly in the headers.
+*else
+* The _vswprintf_c() flavor does the same thing as the _snwprintf
+* above, but, it also fixes an issue in the return value in the case
+* when there isn't enough space to write the null terminator
+* We don't fix this issue in _vsnwprintf because of backward
+* compatibility. In new code, however, _vsnwprintf is #defined to
+* _vswprintf_c so users get the fix.
+*
+*endif
+*
+* Multi-thread: (1) Since there is no stream, this routine must never try
+* to get the stream lock (i.e., there is no stream lock either). (2)
+* Also, since there is only one statically allocated 'fake' iob, we must
+* lock/unlock to prevent collisions.
+*
+*Entry:
+* char16_t *string - place to put destination string
+*ifdef _COUNT_
+* size_t count - max number of bytes to put in buffer
+*endif
+* char16_t *format - format string, describes format of data
+* va_list ap - varargs argument pointer
+*
+*Exit:
+* returns number of wide characters in string
+* returns -2 if the string has been truncated (only in _vsnprintf_helper)
+* returns -1 in other error cases
+*
+*Exceptions:
+*
+*******************************************************************************/
+
+int __cdecl _vswprintf_helper (
+ WOUTPUTFN woutfn,
+ char16_t *string,
+ size_t count,
+ const char16_t *format,
+ va_list ap
+ )
+{
+ miniFILE str;
+ miniFILE *outfile = &str;
+ int retval;
+
+ _VALIDATE_RETURN( (format != NULL), EINVAL, -1);
+
+ _VALIDATE_RETURN( (count == 0) || (string != NULL), EINVAL, -1 );
+
+ outfile->_flag = _IOWRT|_IOSTRG;
+ outfile->_ptr = outfile->_base = (char *) string;
+
+ if(count>(INT_MAX/sizeof(char16_t)))
+ {
+ /* old-style functions allow any large value to mean unbounded */
+ outfile->_cnt = INT_MAX;
+ }
+ else
+ {
+ outfile->_cnt = (int)(count*sizeof(char16_t));
+ }
+
+ retval = woutfn(outfile, format, ap );
+
+ if(string==NULL)
+ {
+ return retval;
+ }
+
+ if((retval >= 0) && (_putc_nolock('\0',outfile) != EOF) && (_putc_nolock('\0',outfile) != EOF))
+ return(retval);
+
+ string[count - 1] = 0;
+ if (outfile->_cnt < 0)
+ {
+ /* the buffer was too small; we return -2 to indicate truncation */
+ return -2;
+ }
+ return -1;
+}
+
+int __cdecl _vswprintf_s (
+ char16_t *string,
+ size_t sizeInWords,
+ const char16_t *format,
+ va_list ap
+ )
+{
+ int retvalue = -1;
+
+ /* validation section */
+ _VALIDATE_RETURN(format != NULL, EINVAL, -1);
+ _VALIDATE_RETURN(string != NULL && sizeInWords > 0, EINVAL, -1);
+
+ retvalue = _vswprintf_helper(_woutput_s, string, sizeInWords, format, ap);
+ if (retvalue < 0)
+ {
+ string[0] = 0;
+ _SECURECRT__FILL_STRING(string, sizeInWords, 1);
+ }
+ if (retvalue == -2)
+ {
+ _VALIDATE_RETURN(("Buffer too small" && 0), ERANGE, -1);
+ }
+ if (retvalue >= 0)
+ {
+ _SECURECRT__FILL_STRING(string, sizeInWords, retvalue + 1);
+ }
+
+ return retvalue;
+}
+
+int __cdecl vswprintf_s (
+ char16_t *string,
+ size_t sizeInWords,
+ const char16_t *format,
+ va_list ap
+ )
+{
+ return _vswprintf_s(string, sizeInWords, format, ap);
+}
+
+int __cdecl _vsnwprintf_s (
+ char16_t *string,
+ size_t sizeInWords,
+ size_t count,
+ const char16_t *format,
+ va_list ap
+ )
+{
+ int retvalue = -1;
+ errno_t save_errno = 0;
+
+ /* validation section */
+ _VALIDATE_RETURN(format != NULL, EINVAL, -1);
+ if (count == 0 && string == NULL && sizeInWords == 0)
+ {
+ /* this case is allowed; nothing to do */
+ return 0;
+ }
+ _VALIDATE_RETURN(string != NULL && sizeInWords > 0, EINVAL, -1);
+
+ if (sizeInWords > count)
+ {
+ save_errno = errno;
+ retvalue = _vswprintf_helper(_woutput_s, string, count + 1, format, ap);
+ if (retvalue == -2)
+ {
+ /* the string has been truncated, return -1 */
+ _SECURECRT__FILL_STRING(string, sizeInWords, count + 1);
+ if (errno == ERANGE)
+ {
+ errno = save_errno;
+ }
+ return -1;
+ }
+ }
+ else /* sizeInWords <= count */
+ {
+ save_errno = errno;
+ retvalue = _vswprintf_helper(_woutput_s, string, sizeInWords, format, ap);
+ string[sizeInWords - 1] = 0;
+ /* we allow truncation if count == _TRUNCATE */
+ if (retvalue == -2 && count == _TRUNCATE)
+ {
+ if (errno == ERANGE)
+ {
+ errno = save_errno;
+ }
+ return -1;
+ }
+ }
+
+ if (retvalue < 0)
+ {
+ string[0] = 0;
+ _SECURECRT__FILL_STRING(string, sizeInWords, 1);
+ if (retvalue == -2)
+ {
+ _VALIDATE_RETURN(("Buffer too small" && 0), ERANGE, -1);
+ }
+ return -1;
+ }
+
+ _SECURECRT__FILL_STRING(string, sizeInWords, retvalue + 1);
+
+ return (retvalue < 0 ? -1 : retvalue);
+}
+
+/***
+* _vscwprintf() - counts the number of character needed to print the formatted
+* data
+*
+*Purpose:
+* Counts the number of characters in the formatted data.
+*
+*Entry:
+* char16_t *format - format string, describes format of data
+* va_list ap - varargs argument pointer
+*
+*Exit:
+* returns number of characters needed to print formatted data.
+*
+*Exceptions:
+*
+*******************************************************************************/
+
+#ifndef _COUNT_
+
+int __cdecl _vscwprintf_helper (
+ WOUTPUTFN woutfn,
+ const char16_t *format,
+ va_list ap
+ )
+{
+ miniFILE str;
+ miniFILE *outfile = &str;
+ int retval;
+
+ _VALIDATE_RETURN( (format != NULL), EINVAL, -1);
+
+ outfile->_cnt = INT_MAX; //MAXSTR;
+ outfile->_flag = _IOWRT|_IOSTRG;
+ outfile->_ptr = outfile->_base = NULL;
+
+ retval = woutfn(outfile, format, ap);
+ return(retval);
+}
+
+int __cdecl _vscwprintf (
+ const char16_t *format,
+ va_list ap
+ )
+{
+ return _vscwprintf_helper(_woutput_s, format, ap);
+}
+
+#endif /* _COUNT_ */
diff --git a/deps/chakrashim/core/pal/src/synchmgr/synchmanager.hpp b/deps/chakrashim/core/pal/src/synchmgr/synchmanager.hpp
index dfbccad1cc0..984e62d4906 100644
--- a/deps/chakrashim/core/pal/src/synchmgr/synchmanager.hpp
+++ b/deps/chakrashim/core/pal/src/synchmgr/synchmanager.hpp
@@ -1,1023 +1,1023 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//
-
-/*++
-
-
-
-Module Name:
-
- synchmanager.hpp
-
-Abstract:
- Private header file for synchronization manager and
- controllers implementation
-
-
-
---*/
-#ifndef _SINCHMANAGER_HPP_
-#define _SINCHMANAGER_HPP_
-
-#include "pal/synchobjects.hpp"
-#include "pal/synchcache.hpp"
-#include "pal/cs.hpp"
-#include "pal/corunix.hpp"
-#include "pal/thread.hpp"
-#include "pal/procobj.hpp"
-#include "pal/init.h"
-#include "pal/process.h"
-
-#include
-#include
-#if HAVE_KQUEUE
-#include
-#endif // HAVE_KQUEUE
-#include "pal/dbgmsg.h"
-
-SET_DEFAULT_DEBUG_CHANNEL(SYNC);
-
-#ifdef _DEBUG
-// #define SYNCH_OBJECT_VALIDATION
-// #define SYNCH_STATISTICS
-#endif
-
-#ifdef SYNCH_OBJECT_VALIDATION
-#define VALIDATEOBJECT(obj) ((obj)->ValidateObject())
-#else
-#define VALIDATEOBJECT(obj)
-#endif
-
-namespace CorUnix
-{
- const DWORD WTLN_FLAG_OWNER_OBJECT_IS_SHARED = 1<<0;
- const DWORD WTLN_FLAG_WAIT_ALL = 1<<1;
- const DWORD WTLN_FLAG_DELEGATED_OBJECT_SIGNALING_IN_PROGRESS = 1<<2;
-
-#ifdef SYNCH_OBJECT_VALIDATION
- const DWORD HeadSignature = 0x48454144;
- const DWORD TailSignature = 0x5441494C;
- const DWORD EmptySignature = 0xBAADF00D;
-#endif
-
- enum THREAD_WAIT_STATE
- {
- TWS_ACTIVE,
- TWS_WAITING,
- TWS_ALERTABLE,
- TWS_EARLYDEATH,
- };
-
- enum WaitCompletionState
- {
- WaitIsNotSatisfied,
- WaitIsSatisfied,
- WaitMayBeSatisfied
- };
-
- typedef union _SynchDataGenrPtr
- {
- SharedID shrid;
- CSynchData * ptr;
- } SynchDataGenrPtr;
-
- typedef union _WTLNodeGenrPtr
- {
- SharedID shrid;
- struct _WaitingThreadsListNode * ptr;
- } WTLNodeGenrPtr;
-
- typedef struct _WaitingThreadsListNode
- {
-#ifdef SYNCH_OBJECT_VALIDATION
- DWORD dwDebugHeadSignature;
-#endif
- WTLNodeGenrPtr ptrNext;
- WTLNodeGenrPtr ptrPrev;
- SharedID shridSHRThis;
-
- // Data
- DWORD dwThreadId;
- DWORD dwProcessId;
- DWORD dwObjIndex;
- DWORD dwFlags;
-
- // Pointers to related objects
- SharedID shridWaitingState;
- SynchDataGenrPtr ptrOwnerObjSynchData;
- struct _ThreadWaitInfo * ptwiWaitInfo; // valid only in the
- // target process
-#ifdef SYNCH_OBJECT_VALIDATION
- _WaitingThreadsListNode();
- ~_WaitingThreadsListNode();
- void ValidateObject(void);
- void ValidateEmptyObject(void);
- void InvalidateObject(void);
-
- DWORD dwDebugTailSignature;
-#endif
- } WaitingThreadsListNode;
-
- typedef struct _DeferredSignalingListNode
- {
- LIST_ENTRY Link;
- CPalThread * pthrTarget;
- } DeferredSignalingListNode;
-
- typedef struct _OwnedObjectsListNode
- {
- LIST_ENTRY Link;
- CSynchData * pPalObjSynchData;
- } OwnedObjectsListNode;
-
- typedef struct _ThreadApcInfoNode
- {
- struct _ThreadApcInfoNode * pNext;
- PAPCFUNC pfnAPC;
- ULONG_PTR pAPCData;
- } ThreadApcInfoNode;
-
- class CPalSynchronizationManager; // fwd declaration
- class CProcProcessLocalData; // fwd declaration
-
- class CSynchData
- {
-#ifdef SYNCH_OBJECT_VALIDATION
- DWORD m_dwDebugHeadSignature;
-#endif
- // NB: For perforformance purposes this class is supposed
- // to have no virtual methods, and no destructor.
-
- WTLNodeGenrPtr m_ptrWTLHead;
- WTLNodeGenrPtr m_ptrWTLTail;
- ULONG m_ulcWaitingThreads;
- SharedID m_shridThis;
- ObjectDomain m_odObjectDomain;
- PalObjectTypeId m_otiObjectTypeId;
- LONG m_lRefCount;
- LONG m_lSignalCount;
-
- // Ownership data
- LONG m_lOwnershipCount;
- DWORD m_dwOwnerPid;
- DWORD m_dwOwnerTid; // used only by remote processes
- // (thread ids may be recycled)
- CPalThread * m_pOwnerThread; // valid only on the target process
- OwnedObjectsListNode * m_poolnOwnedObjectListNode;
- bool m_fAbandoned;
-
-#ifdef SYNCH_STATISTICS
- ULONG m_lStatWaitCount;
- ULONG m_lStatContentionCount;
-#endif
-
- public:
-
- CSynchData()
- : m_ulcWaitingThreads(0), m_shridThis(NULLSharedID), m_lRefCount(1),
- m_lSignalCount(0), m_lOwnershipCount(0), m_dwOwnerPid(0),
- m_dwOwnerTid(0), m_pOwnerThread(NULL),
- m_poolnOwnedObjectListNode(NULL), m_fAbandoned(false)
- {
- // m_ptrWTLHead, m_ptrWTLTail, m_odObjectDomain
- // and m_otiObjectTypeId are initialized by
- // CPalSynchronizationManager::AllocateObjectSynchData
-#ifdef SYNCH_STATISTICS
- m_lStatWaitCount = 0;
- m_lStatContentionCount = 0;
-#endif
-#ifdef SYNCH_OBJECT_VALIDATION
- ValidateEmptyObject();
- m_dwDebugHeadSignature = HeadSignature;;
- m_dwDebugTailSignature = TailSignature;
-#endif
- }
-
- LONG AddRef()
- {
- return InterlockedIncrement(&m_lRefCount);
- }
-
- LONG Release(CPalThread * pthrCurrent);
-
- bool CanWaiterWaitWithoutBlocking(
- CPalThread * pWaiterThread,
- bool * pfAbandoned);
-
- PAL_ERROR ReleaseWaiterWithoutBlocking(
- CPalThread * pthrCurrent,
- CPalThread * pthrTarget);
-
- void WaiterEnqueue(WaitingThreadsListNode * pwtlnNewNode);
- void SharedWaiterEnqueue(SharedID shridNewNode);
-
- // Object Domain accessor methods
- ObjectDomain GetObjectDomain(void)
- {
- return m_odObjectDomain;
- }
- void SetObjectDomain(ObjectDomain odObjectDomain)
- {
- m_odObjectDomain = odObjectDomain;
- }
-
- // Object Type accessor methods
- CObjectType * GetObjectType(void)
- {
- return CObjectType::GetObjectTypeById(m_otiObjectTypeId);
- }
- PalObjectTypeId GetObjectTypeId(void)
- {
- return m_otiObjectTypeId;
- }
- void SetObjectType(CObjectType * pot)
- {
- m_otiObjectTypeId = pot->GetId();
- }
- void SetObjectType(PalObjectTypeId oti)
- {
- m_otiObjectTypeId = oti;
- }
-
- // Object shared 'this' pointer accessor methods
- SharedID GetSharedThis (void)
- {
- return m_shridThis;
- }
- void SetSharedThis (SharedID shridThis)
- {
- m_shridThis = shridThis;
- }
-
- void Signal(
- CPalThread * pthrCurrent,
- LONG lSignalCount,
- bool fWorkerThread);
-
- bool ReleaseFirstWaiter(
- CPalThread * pthrCurrent,
- bool * pfDelegated,
- bool fWorkerThread);
-
- LONG ReleaseAllLocalWaiters(
- CPalThread * pthrCurrent);
-
- WaitCompletionState IsRestOfWaitAllSatisfied(
- WaitingThreadsListNode * pwtlnNode);
-
- // Object signal count accessor methods
- LONG GetSignalCount(void)
- {
- _ASSERTE(m_lSignalCount >= 0);
- return m_lSignalCount;
- }
- void SetSignalCount(LONG lSignalCount)
- {
- _ASSERTE(m_lSignalCount >= 0);
- _ASSERTE(lSignalCount >= 0);
- m_lSignalCount = lSignalCount;
- }
- LONG DecrementSignalCount(void)
- {
- _ASSERTE(m_lSignalCount > 0);
- return --m_lSignalCount;
- }
-
- // Object ownership accessor methods
- void SetOwner(CPalThread * pOwnerThread);
- void ResetOwnership(void);
- PAL_ERROR AssignOwnershipToThread(
- CPalThread * pthrCurrent,
- CPalThread * pthrTarget);
- DWORD GetOwnerProcessID(void)
- {
- return m_dwOwnerPid;
- }
- DWORD GetOwnerThreadID(void)
- {
- return m_dwOwnerTid;
- }
- CPalThread * GetOwnerThread(void)
- {
- return m_pOwnerThread;
- }
- OwnedObjectsListNode * GetOwnershipListNode(void)
- {
- return m_poolnOwnedObjectListNode;
- }
- void SetOwnershipListNode(OwnedObjectsListNode * pooln)
- {
- m_poolnOwnedObjectListNode = pooln;
- }
-
- // Object ownership count accessor methods
- LONG GetOwnershipCount(void)
- {
- return m_lOwnershipCount;
- }
- void SetOwnershipCount(LONG lOwnershipCount)
- {
- m_lOwnershipCount = lOwnershipCount;
- }
-
- // Object abandoned flag accessor methods
- void SetAbandoned(bool fAbandoned)
- { m_fAbandoned = fAbandoned; }
- bool IsAbandoned(void) { return m_fAbandoned; }
-
- void IncrementWaitingThreadCount(void)
- {
- m_ulcWaitingThreads += 1;
- }
- void DecrementWaitingThreadCount(void)
- {
- m_ulcWaitingThreads -= 1;
- }
- ULONG GetWaitingThreadCount(void)
- {
- return m_ulcWaitingThreads;
- }
-
-
-#ifdef SYNCH_STATISTICS
- void IncrementStatWaitCount(void)
- {
- m_lStatWaitCount++;
- }
- LONG GetStatWaitCount(void)
- {
- return m_lStatWaitCount;
- }
- void IncrementStatContentionCount(void)
- {
- m_lStatContentionCount++;
- }
- LONG GetStatContentionCount(void)
- {
- return m_lStatContentionCount;
- }
-#endif
- //
- // Wating threads list access methods
- //
- WaitingThreadsListNode * GetWTLHeadPtr(void)
- {
- return m_ptrWTLHead.ptr;
- }
- WaitingThreadsListNode * GetWTLTailPtr(void)
- {
- return m_ptrWTLTail.ptr;
- }
- SharedID GetWTLHeadShmPtr(void)
- {
- return m_ptrWTLHead.shrid;
- }
- SharedID GetWTLTailShmPtr(void)
- {
- return m_ptrWTLTail.shrid;
- }
- void SetWTLHeadPtr(WaitingThreadsListNode * p)
- {
- m_ptrWTLHead.ptr = p;
- }
- void SetWTLTailPtr(WaitingThreadsListNode * p)
- {
- m_ptrWTLTail.ptr = p;
- }
- void SetWTLHeadShrPtr(SharedID shrid)
- {
- m_ptrWTLHead.shrid = shrid;
- }
- void SetWTLTailShrPtr(SharedID shrid)
- {
- m_ptrWTLTail.shrid = shrid;
- }
-#ifdef SYNCH_OBJECT_VALIDATION
- ~CSynchData();
- void ValidateObject(bool fDestructor = false);
- void ValidateEmptyObject(void);
- void InvalidateObject(void);
-
- DWORD m_dwDebugTailSignature;
-#endif
- };
-
-
- class CSynchControllerBase
- {
- friend class CPalSynchronizationManager;
-
- // NB: For perforformance purposes this class is supposed
- // to have no virtual methods, contructor and
- // destructor
- public:
- enum ControllerType { WaitController, StateController };
-
- protected:
- CPalThread * m_pthrOwner;
- ControllerType m_ctCtrlrType;
- ObjectDomain m_odObjectDomain;
- CObjectType * m_potObjectType;
- CSynchData * m_psdSynchData;
- WaitDomain m_wdWaitDomain;
-
- PAL_ERROR Init(
- CPalThread * pthrCurrent,
- ControllerType ctCtrlrType,
- ObjectDomain odObjectDomain,
- CObjectType *potObjectType,
- CSynchData * psdSynchData,
- WaitDomain wdWaitDomain);
-
- void Release(void);
-
- void SetSynchData(CSynchData * psdSynchData)
- {
- m_psdSynchData = psdSynchData;
- }
- CSynchData * GetSynchData()
- {
- return m_psdSynchData;
- }
- };
-
- class CSynchWaitController : public CSynchControllerBase,
- public ISynchWaitController
- {
- // Per-object-type specific data
- //
- // Process (otiProcess)
- CProcProcessLocalData * m_pProcLocalData;
-
- public:
- CSynchWaitController() : m_pProcLocalData(NULL) {}
-
- //
- // ISynchWaitController methods
- //
- virtual PAL_ERROR CanThreadWaitWithoutBlocking(
- bool * pfCanWaitWithoutBlocking,
- bool * pfAbandoned);
-
- virtual PAL_ERROR ReleaseWaitingThreadWithoutBlocking(void);
-
- virtual PAL_ERROR RegisterWaitingThread(
- WaitType wtWaitType,
- DWORD dwIndex,
- bool fAlertable);
-
- virtual void ReleaseController(void);
-
- CProcProcessLocalData * GetProcessLocalData(void);
-
- void SetProcessLocalData(CProcProcessLocalData * pProcLocalData);
- };
-
- class CSynchStateController : public CSynchControllerBase,
- public ISynchStateController
- {
- public:
- // NB: For perforformance purposes this class is supposed
- // to have no constructor or destructor
-
- //
- // ISynchStateController methods
- //
- virtual PAL_ERROR GetSignalCount(LONG *plSignalCount);
- virtual PAL_ERROR SetSignalCount(LONG lNewCount);
- virtual PAL_ERROR IncrementSignalCount(LONG lAmountToIncrement);
- virtual PAL_ERROR DecrementSignalCount(LONG lAmountToDecrement);
- virtual PAL_ERROR SetOwner(CPalThread *pNewOwningThread);
- virtual PAL_ERROR DecrementOwnershipCount(void);
- virtual void ReleaseController(void);
- };
-
- class CPalSynchronizationManager : public IPalSynchronizationManager
- {
- friend class CPalSynchMgrController;
- template friend T *CorUnix::InternalNew();
-
- public:
- // types
- typedef CSynchCache CSynchWaitControllerCache;
- typedef CSynchCache CSynchStateControllerCache;
- typedef CSynchCache CSynchDataCache;
- typedef CSHRSynchCache CSHRSynchDataCache;
- typedef CSynchCache CWaitingThreadsListNodeCache;
- typedef CSHRSynchCache CSHRWaitingThreadsListNodeCache;
- typedef CSynchCache CThreadApcInfoNodeCache;
- typedef CSynchCache COwnedObjectsListNodeCache;
-
- private:
- // types
- enum InitStatus
- {
- SynchMgrStatusIdle,
- SynchMgrStatusInitializing,
- SynchMgrStatusRunning,
- SynchMgrStatusShuttingDown,
- SynchMgrStatusReadyForProcessShutDown,
- SynchMgrStatusError
- };
- enum SynchWorkerCmd
- {
- SynchWorkerCmdNop,
- SynchWorkerCmdRemoteSignal,
- SynchWorkerCmdDelegatedObjectSignaling,
- SynchWorkerCmdShutdown,
- SynchWorkerCmdLast
- };
-
- typedef struct _MonitoredProcessesListNode
- {
- struct _MonitoredProcessesListNode * pNext;
- LONG lRefCount;
- CSynchData * psdSynchData;
- DWORD dwPid;
- DWORD dwExitCode;
- bool fIsActualExitCode;
- CProcProcessLocalData * pProcLocalData;
- } MonitoredProcessesListNode;
-
- // constants
- static const int CtrlrsCacheMaxSize = 256;
- static const int SynchDataCacheMaxSize = 256;
- static const int WTListNodeCacheMaxSize = 256;
- static const int ApcInfoNodeCacheMaxSize = 32;
- static const int OwnedObjectsListCacheMaxSize = 16;
- static const int MaxWorkerConsecutiveEintrs = 128;
- static const int MaxConsecutiveEagains = 128;
- static const int WorkerThreadProcMonitoringTimeout = 250; // ms
- static const int WorkerThreadShuttingDownTimeout = 1000; // ms
- static const int WorkerCmdCompletionTimeout = 250; // ms
- static const DWORD SecondNativeWaitTimeout = INFINITE;
- static const DWORD WorkerThreadTerminationTimeout = 2000; // ms
-
- // static members
- static CPalSynchronizationManager * s_pObjSynchMgr;
- static Volatile s_lInitStatus;
- static CRITICAL_SECTION s_csSynchProcessLock;
- static CRITICAL_SECTION s_csMonitoredProcessesLock;
-
- // members
- DWORD m_dwWorkerThreadTid;
- IPalObject * m_pipoThread;
- CPalThread * m_pthrWorker;
- int m_iProcessPipeRead;
- int m_iProcessPipeWrite;
-#if HAVE_KQUEUE
- int m_iKQueue;
- struct kevent m_keProcessPipeEvent;
-#endif // HAVE_KQUEUE
-
- MonitoredProcessesListNode * m_pmplnMonitoredProcesses;
- LONG m_lMonitoredProcessesCount;
- MonitoredProcessesListNode * m_pmplnExitedNodes;
-
- // caches
- CSynchWaitControllerCache m_cacheWaitCtrlrs;
- CSynchStateControllerCache m_cacheStateCtrlrs;
- CSynchDataCache m_cacheSynchData;
- CSHRSynchDataCache m_cacheSHRSynchData;
- CWaitingThreadsListNodeCache m_cacheWTListNodes;
- CSHRWaitingThreadsListNodeCache m_cacheSHRWTListNodes;
- CThreadApcInfoNodeCache m_cacheThreadApcInfoNodes;
- COwnedObjectsListNodeCache m_cacheOwnedObjectsListNodes;
-
- // static methods
- static PAL_ERROR Initialize();
-
- protected:
- CPalSynchronizationManager();
-
- PAL_ERROR GetSynchControllersForObjects(
- CPalThread *pthrCurrent,
- IPalObject *rgObjects[],
- DWORD dwObjectCount,
- void ** ppvControllers,
- CSynchControllerBase::ControllerType ctCtrlrType);
-
- private:
- static IPalSynchronizationManager * CreatePalSynchronizationManager();
- static PAL_ERROR PrepareForShutdown(void);
-
- public:
- virtual ~CPalSynchronizationManager();
-
- static CPalSynchronizationManager * GetInstance(void)
- {
- // No need here to check for NULL and in case create the
- // singleton, since its creation is enforced by the PAL
- // initialization code.
- return s_pObjSynchMgr;
- }
-
- //
- // Inline utility methods
- //
- static void AcquireLocalSynchLock(CPalThread * pthrCurrent)
- {
- _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
-
- if (1 == ++pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount)
- {
- InternalEnterCriticalSection(pthrCurrent, &s_csSynchProcessLock);
- }
- }
- static void ReleaseLocalSynchLock(CPalThread * pthrCurrent)
- {
- _ASSERTE(0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
- if (0 == --pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount)
- {
- InternalLeaveCriticalSection(pthrCurrent, &s_csSynchProcessLock);
-
-#if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings();
-#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- }
- }
- static LONG ResetLocalSynchLock(CPalThread * pthrCurrent)
- {
- LONG lRet = pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount;
-
- _ASSERTE(0 <= lRet);
- if (0 < lRet)
- {
- pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount = 0;
- InternalLeaveCriticalSection(pthrCurrent, &s_csSynchProcessLock);
-
-#if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings();
-#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- }
- return lRet;
- }
- static LONG GetLocalSynchLockCount(CPalThread * pthrCurrent)
- {
- _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
- return pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount;
- }
-
- static void AcquireSharedSynchLock(CPalThread * pthrCurrent)
- {
- _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount);
- _ASSERT_MSG(0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount,
- "The local synch lock should be acquired before grabbing the "
- "shared one.\n");
- if (1 == ++pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount)
- {
- SHMLock();
- }
- }
- static void ReleaseSharedSynchLock(CPalThread * pthrCurrent)
- {
- _ASSERTE(0 < pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount);
- if (0 == --pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount)
- {
- _ASSERT_MSG(0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount,
- "Final release of the shared synch lock while not holding the "
- "local one. Local synch lock should always be acquired first and "
- "released last.\n");
- SHMRelease();
- }
- }
- static LONG ResetSharedSynchLock(CPalThread * pthrCurrent)
- {
- LONG lRet = pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount;
-
- _ASSERTE(0 <= lRet);
- _ASSERTE(0 == lRet ||
- 0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
- if (0 < lRet)
- {
- pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount = 0;
- SHMRelease();
- }
- return lRet;
- }
- static LONG GetSharedSynchLockCount(CPalThread * pthrCurrent)
- {
- _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount);
- _ASSERTE(0 == pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount ||
- 0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
- return pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount;
- }
-
- CSynchWaitController * CacheGetWaitCtrlr(CPalThread * pthrCurrent)
- {
- return m_cacheWaitCtrlrs.Get(pthrCurrent);
- }
- int CacheGetWaitCtrlr(
- CPalThread * pthrCurrent,
- int n,
- CSynchWaitController * prgCtrlrs[])
- {
- return m_cacheWaitCtrlrs.Get(pthrCurrent, n, prgCtrlrs);
- }
- void CacheAddWaitCtrlr(
- CPalThread * pthrCurrent,
- CSynchWaitController * pCtrlr)
- {
- m_cacheWaitCtrlrs.Add(pthrCurrent, pCtrlr);
- }
- CSynchStateController * CacheGetStateCtrlr(CPalThread * pthrCurrent)
- {
- return m_cacheStateCtrlrs.Get(pthrCurrent);
- }
- int CacheGetStateCtrlr(
- CPalThread * pthrCurrent,
- int n,
- CSynchStateController * prgCtrlrs[])
- {
- return m_cacheStateCtrlrs.Get(pthrCurrent, n, prgCtrlrs);
- }
- void CacheAddStateCtrlr(
- CPalThread * pthrCurrent,
- CSynchStateController * pCtrlr)
- {
- m_cacheStateCtrlrs.Add(pthrCurrent, pCtrlr);
- }
-
- CSynchData * CacheGetLocalSynchData(CPalThread * pthrCurrent)
- {
- return m_cacheSynchData.Get(pthrCurrent);
- }
- void CacheAddLocalSynchData(
- CPalThread * pthrCurrent,
- CSynchData * psdSynchData)
- {
- m_cacheSynchData.Add(pthrCurrent, psdSynchData);
- }
- SharedID CacheGetSharedSynchData(CPalThread * pthrCurrent)
- {
- return m_cacheSHRSynchData.Get(pthrCurrent);
- }
- void CacheAddSharedSynchData(
- CPalThread * pthrCurrent,
- SharedID shridSData)
- {
- m_cacheSHRSynchData.Add(pthrCurrent, shridSData);
- }
-
- WaitingThreadsListNode * CacheGetLocalWTListNode(
- CPalThread * pthrCurrent)
- {
- return m_cacheWTListNodes.Get(pthrCurrent);
- }
- void CacheAddLocalWTListNode(
- CPalThread * pthrCurrent,
- WaitingThreadsListNode * pWTLNode)
- {
- m_cacheWTListNodes.Add(pthrCurrent, pWTLNode);
- }
- SharedID CacheGetSharedWTListNode(CPalThread * pthrCurrent)
- {
- return m_cacheSHRWTListNodes.Get(pthrCurrent);
- }
- void CacheAddSharedWTListNode(
- CPalThread * pthrCurrent,
- SharedID shridWTLNode)
- {
- m_cacheSHRWTListNodes.Add(pthrCurrent, shridWTLNode);
- }
-
- ThreadApcInfoNode * CacheGetApcInfoNodes(CPalThread * pthrCurrent)
- {
- return m_cacheThreadApcInfoNodes.Get(pthrCurrent);
- }
- void CacheAddApcInfoNodes(
- CPalThread * pthrCurrent,
- ThreadApcInfoNode * pNode)
- {
- m_cacheThreadApcInfoNodes.Add(pthrCurrent, pNode);
- }
-
- OwnedObjectsListNode * CacheGetOwnedObjsListNode(
- CPalThread * pthrCurrent)
- {
- return m_cacheOwnedObjectsListNodes.Get(pthrCurrent);
- }
- void CacheAddOwnedObjsListNode(
- CPalThread * pthrCurrent,
- OwnedObjectsListNode * pNode)
- {
- m_cacheOwnedObjectsListNodes.Add(pthrCurrent, pNode);
- }
-
-
- //
- // IPalSynchronizationManager methods
- //
- virtual PAL_ERROR BlockThread(
- CPalThread *pthrCurrent,
- DWORD dwTimeout,
- bool fAlertable,
- bool fIsSleep,
- ThreadWakeupReason *ptwrWakeupReason,
- DWORD *pdwSignaledObject);
-
- virtual PAL_ERROR AbandonObjectsOwnedByThread(
- CPalThread *pthrCurrent,
- CPalThread *pthrTarget);
-
- virtual PAL_ERROR GetSynchWaitControllersForObjects(
- CPalThread *pthrCurrent,
- IPalObject *rgObjects[],
- DWORD dwObjectCount,
- ISynchWaitController *rgControllers[]);
-
- virtual PAL_ERROR GetSynchStateControllersForObjects(
- CPalThread *pthrCurrent,
- IPalObject *rgObjects[],
- DWORD dwObjectCount,
- ISynchStateController *rgControllers[]);
-
- virtual PAL_ERROR AllocateObjectSynchData(
- CObjectType *potObjectType,
- ObjectDomain odObjectDomain,
- VOID **ppvSynchData);
-
- virtual void FreeObjectSynchData(
- CObjectType *potObjectType,
- ObjectDomain odObjectDomain,
- VOID *pvSynchData);
-
- virtual PAL_ERROR PromoteObjectSynchData(
- CPalThread *pthrCurrent,
- VOID *pvLocalSynchData,
- VOID **ppvSharedSynchData);
-
- virtual PAL_ERROR CreateSynchStateController(
- CPalThread *pthrCurrent,
- CObjectType *potObjectType,
- VOID *pvSynchData,
- ObjectDomain odObjectDomain,
- ISynchStateController **ppStateController);
-
- virtual PAL_ERROR CreateSynchWaitController(
- CPalThread *pthrCurrent,
- CObjectType *potObjectType,
- VOID *pvSynchData,
- ObjectDomain odObjectDomain,
- ISynchWaitController **ppWaitController);
-
- virtual PAL_ERROR QueueUserAPC(
- CPalThread * pthrCurrent,
- CPalThread *pthrTarget,
- PAPCFUNC pfnAPC,
- ULONG_PTR uptrData);
-
- virtual bool AreAPCsPending(CPalThread * pthrTarget);
-
- virtual PAL_ERROR DispatchPendingAPCs(CPalThread * pthrCurrent);
-
- virtual void AcquireProcessLock(CPalThread *pthrCurrent);
-
- virtual void ReleaseProcessLock(CPalThread *pthrCurrent);
-
- //
- // Static helper methods
- //
- public:
- static PAL_ERROR WakeUpLocalThread(
- CPalThread * pthrCurrent,
- CPalThread * pthrTarget,
- ThreadWakeupReason twrWakeupReason,
- DWORD dwObjectIndex);
-
-#if !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- static PAL_ERROR SignalThreadCondition(
- ThreadNativeWaitData * ptnwdNativeWaitData);
-
- static PAL_ERROR DeferThreadConditionSignaling(
- CPalThread * pthrCurrent,
- CPalThread * pthrTarget);
-#endif // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
-
- static PAL_ERROR WakeUpRemoteThread(
- SharedID shridWLNode);
-
- static PAL_ERROR DelegateSignalingToRemoteProcess(
- CPalThread * pthrCurrent,
- DWORD dwTargetProcessId,
- SharedID shridSynchData);
-
- static PAL_ERROR SendMsgToRemoteWorker(
- DWORD dwProcessId,
- BYTE * pMsg,
- int iMsgSize);
-
- static ThreadWaitInfo * GetThreadWaitInfo(
- CPalThread * pthrCurrent);
-
- //
- // The following methods must be called only by a Sync*Controller or
- // while holding the required synchronization global locks
- //
- static void UnsignalRestOfLocalAwakeningWaitAll(
- CPalThread * pthrCurrent,
- CPalThread * pthrTarget,
- WaitingThreadsListNode * pwtlnNode,
- CSynchData * psdTgtObjectSynchData);
-
- static void MarkWaitForDelegatedObjectSignalingInProgress(
- CPalThread * pthrCurrent,
- WaitingThreadsListNode * pwtlnNode);
-
- static void UnmarkTWListForDelegatedObjectSignalingInProgress(
- CSynchData * pTgtObjectSynchData);
-
- static PAL_ERROR ThreadNativeWait(
- ThreadNativeWaitData * ptnwdNativeWaitData,
- DWORD dwTimeout,
- ThreadWakeupReason * ptwrWakeupReason,
- DWORD * pdwSignaledObject);
-
- static void ThreadPrepareForShutdown(void);
-
-#ifndef CORECLR
- static bool GetProcessPipeName(
- LPSTR pDest,
- int iDestSize,
- DWORD dwPid);
-#endif // !CORECLR
-
- //
- // Non-static helper methods
- //
- private:
- LONG DoMonitorProcesses(CPalThread * pthrCurrent);
-
- void DiscardMonitoredProcesses(CPalThread * pthrCurrent);
-
- PAL_ERROR ReadCmdFromProcessPipe(
- int iPollTimeout,
- SynchWorkerCmd * pswcWorkerCmd,
- SharedID * pshridMarshaledData,
- DWORD * pdwData);
-
- PAL_ERROR WakeUpLocalWorkerThread(
- SynchWorkerCmd swcWorkerCmd);
-
- void DiscardAllPendingAPCs(
- CPalThread * pthrCurrent,
- CPalThread * pthrTarget);
-
- int ReadBytesFromProcessPipe(
- int iTimeout,
- BYTE * pRecvBuf,
- LONG lBytes);
-
- bool CreateProcessPipe();
-
- PAL_ERROR ShutdownProcessPipe();
-
- public:
- //
- // The following methods must be called only by a Sync*Controller or
- // while holding the required synchronization global locks
- //
- void UnRegisterWait(
- CPalThread * pthrCurrent,
- ThreadWaitInfo * ptwiWaitInfo,
- bool fHaveSharedLock);
-
- PAL_ERROR RegisterProcessForMonitoring(
- CPalThread * pthrCurrent,
- CSynchData *psdSynchData,
- CProcProcessLocalData * pProcLocalData);
-
- PAL_ERROR UnRegisterProcessForMonitoring(
- CPalThread * pthrCurrent,
- CSynchData *psdSynchData,
- DWORD dwPid);
-
- //
- // Utility static methods, no lock required
- //
- static bool HasProcessExited(
- DWORD dwPid,
- DWORD * pdwExitCode,
- bool * pfIsActualExitCode);
-
- static bool InterlockedAwaken(
- DWORD *pWaitState,
- bool fAlertOnly);
-
- static PAL_ERROR GetAbsoluteTimeout(
- DWORD dwTimeout,
- struct timespec * ptsAbsTmo);
-
-#if SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
- static void UpdateTimeout(
- DWORD * pdwOldTime,
- DWORD * pdwTimeout);
-#endif
-
- };
-}
-
-#endif // _SINCHMANAGER_HPP_
-
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+/*++
+
+
+
+Module Name:
+
+ synchmanager.hpp
+
+Abstract:
+ Private header file for synchronization manager and
+ controllers implementation
+
+
+
+--*/
+#ifndef _SINCHMANAGER_HPP_
+#define _SINCHMANAGER_HPP_
+
+#include "pal/synchobjects.hpp"
+#include "pal/synchcache.hpp"
+#include "pal/cs.hpp"
+#include "pal/corunix.hpp"
+#include "pal/thread.hpp"
+#include "pal/procobj.hpp"
+#include "pal/init.h"
+#include "pal/process.h"
+
+#include
+#include
+#if HAVE_KQUEUE
+#include
+#endif // HAVE_KQUEUE
+#include "pal/dbgmsg.h"
+
+SET_DEFAULT_DEBUG_CHANNEL(SYNC);
+
+#ifdef _DEBUG
+// #define SYNCH_OBJECT_VALIDATION
+// #define SYNCH_STATISTICS
+#endif
+
+#ifdef SYNCH_OBJECT_VALIDATION
+#define VALIDATEOBJECT(obj) ((obj)->ValidateObject())
+#else
+#define VALIDATEOBJECT(obj)
+#endif
+
+namespace CorUnix
+{
+ const DWORD WTLN_FLAG_OWNER_OBJECT_IS_SHARED = 1<<0;
+ const DWORD WTLN_FLAG_WAIT_ALL = 1<<1;
+ const DWORD WTLN_FLAG_DELEGATED_OBJECT_SIGNALING_IN_PROGRESS = 1<<2;
+
+#ifdef SYNCH_OBJECT_VALIDATION
+ const DWORD HeadSignature = 0x48454144;
+ const DWORD TailSignature = 0x5441494C;
+ const DWORD EmptySignature = 0xBAADF00D;
+#endif
+
+ enum THREAD_WAIT_STATE
+ {
+ TWS_ACTIVE,
+ TWS_WAITING,
+ TWS_ALERTABLE,
+ TWS_EARLYDEATH,
+ };
+
+ enum WaitCompletionState
+ {
+ WaitIsNotSatisfied,
+ WaitIsSatisfied,
+ WaitMayBeSatisfied
+ };
+
+ typedef union _SynchDataGenrPtr
+ {
+ SharedID shrid;
+ CSynchData * ptr;
+ } SynchDataGenrPtr;
+
+ typedef union _WTLNodeGenrPtr
+ {
+ SharedID shrid;
+ struct _WaitingThreadsListNode * ptr;
+ } WTLNodeGenrPtr;
+
+ typedef struct _WaitingThreadsListNode
+ {
+#ifdef SYNCH_OBJECT_VALIDATION
+ DWORD dwDebugHeadSignature;
+#endif
+ WTLNodeGenrPtr ptrNext;
+ WTLNodeGenrPtr ptrPrev;
+ SharedID shridSHRThis;
+
+ // Data
+ DWORD dwThreadId;
+ DWORD dwProcessId;
+ DWORD dwObjIndex;
+ DWORD dwFlags;
+
+ // Pointers to related objects
+ SharedID shridWaitingState;
+ SynchDataGenrPtr ptrOwnerObjSynchData;
+ struct _ThreadWaitInfo * ptwiWaitInfo; // valid only in the
+ // target process
+#ifdef SYNCH_OBJECT_VALIDATION
+ _WaitingThreadsListNode();
+ ~_WaitingThreadsListNode();
+ void ValidateObject(void);
+ void ValidateEmptyObject(void);
+ void InvalidateObject(void);
+
+ DWORD dwDebugTailSignature;
+#endif
+ } WaitingThreadsListNode;
+
+ typedef struct _DeferredSignalingListNode
+ {
+ LIST_ENTRY Link;
+ CPalThread * pthrTarget;
+ } DeferredSignalingListNode;
+
+ typedef struct _OwnedObjectsListNode
+ {
+ LIST_ENTRY Link;
+ CSynchData * pPalObjSynchData;
+ } OwnedObjectsListNode;
+
+ typedef struct _ThreadApcInfoNode
+ {
+ struct _ThreadApcInfoNode * pNext;
+ PAPCFUNC pfnAPC;
+ ULONG_PTR pAPCData;
+ } ThreadApcInfoNode;
+
+ class CPalSynchronizationManager; // fwd declaration
+ class CProcProcessLocalData; // fwd declaration
+
+ class CSynchData
+ {
+#ifdef SYNCH_OBJECT_VALIDATION
+ DWORD m_dwDebugHeadSignature;
+#endif
+ // NB: For perforformance purposes this class is supposed
+ // to have no virtual methods, and no destructor.
+
+ WTLNodeGenrPtr m_ptrWTLHead;
+ WTLNodeGenrPtr m_ptrWTLTail;
+ ULONG m_ulcWaitingThreads;
+ SharedID m_shridThis;
+ ObjectDomain m_odObjectDomain;
+ PalObjectTypeId m_otiObjectTypeId;
+ LONG m_lRefCount;
+ LONG m_lSignalCount;
+
+ // Ownership data
+ LONG m_lOwnershipCount;
+ DWORD m_dwOwnerPid;
+ DWORD m_dwOwnerTid; // used only by remote processes
+ // (thread ids may be recycled)
+ CPalThread * m_pOwnerThread; // valid only on the target process
+ OwnedObjectsListNode * m_poolnOwnedObjectListNode;
+ bool m_fAbandoned;
+
+#ifdef SYNCH_STATISTICS
+ ULONG m_lStatWaitCount;
+ ULONG m_lStatContentionCount;
+#endif
+
+ public:
+
+ CSynchData()
+ : m_ulcWaitingThreads(0), m_shridThis(NULLSharedID), m_lRefCount(1),
+ m_lSignalCount(0), m_lOwnershipCount(0), m_dwOwnerPid(0),
+ m_dwOwnerTid(0), m_pOwnerThread(NULL),
+ m_poolnOwnedObjectListNode(NULL), m_fAbandoned(false)
+ {
+ // m_ptrWTLHead, m_ptrWTLTail, m_odObjectDomain
+ // and m_otiObjectTypeId are initialized by
+ // CPalSynchronizationManager::AllocateObjectSynchData
+#ifdef SYNCH_STATISTICS
+ m_lStatWaitCount = 0;
+ m_lStatContentionCount = 0;
+#endif
+#ifdef SYNCH_OBJECT_VALIDATION
+ ValidateEmptyObject();
+ m_dwDebugHeadSignature = HeadSignature;;
+ m_dwDebugTailSignature = TailSignature;
+#endif
+ }
+
+ LONG AddRef()
+ {
+ return InterlockedIncrement(&m_lRefCount);
+ }
+
+ LONG Release(CPalThread * pthrCurrent);
+
+ bool CanWaiterWaitWithoutBlocking(
+ CPalThread * pWaiterThread,
+ bool * pfAbandoned);
+
+ PAL_ERROR ReleaseWaiterWithoutBlocking(
+ CPalThread * pthrCurrent,
+ CPalThread * pthrTarget);
+
+ void WaiterEnqueue(WaitingThreadsListNode * pwtlnNewNode);
+ void SharedWaiterEnqueue(SharedID shridNewNode);
+
+ // Object Domain accessor methods
+ ObjectDomain GetObjectDomain(void)
+ {
+ return m_odObjectDomain;
+ }
+ void SetObjectDomain(ObjectDomain odObjectDomain)
+ {
+ m_odObjectDomain = odObjectDomain;
+ }
+
+ // Object Type accessor methods
+ CObjectType * GetObjectType(void)
+ {
+ return CObjectType::GetObjectTypeById(m_otiObjectTypeId);
+ }
+ PalObjectTypeId GetObjectTypeId(void)
+ {
+ return m_otiObjectTypeId;
+ }
+ void SetObjectType(CObjectType * pot)
+ {
+ m_otiObjectTypeId = pot->GetId();
+ }
+ void SetObjectType(PalObjectTypeId oti)
+ {
+ m_otiObjectTypeId = oti;
+ }
+
+ // Object shared 'this' pointer accessor methods
+ SharedID GetSharedThis (void)
+ {
+ return m_shridThis;
+ }
+ void SetSharedThis (SharedID shridThis)
+ {
+ m_shridThis = shridThis;
+ }
+
+ void Signal(
+ CPalThread * pthrCurrent,
+ LONG lSignalCount,
+ bool fWorkerThread);
+
+ bool ReleaseFirstWaiter(
+ CPalThread * pthrCurrent,
+ bool * pfDelegated,
+ bool fWorkerThread);
+
+ LONG ReleaseAllLocalWaiters(
+ CPalThread * pthrCurrent);
+
+ WaitCompletionState IsRestOfWaitAllSatisfied(
+ WaitingThreadsListNode * pwtlnNode);
+
+ // Object signal count accessor methods
+ LONG GetSignalCount(void)
+ {
+ _ASSERTE(m_lSignalCount >= 0);
+ return m_lSignalCount;
+ }
+ void SetSignalCount(LONG lSignalCount)
+ {
+ _ASSERTE(m_lSignalCount >= 0);
+ _ASSERTE(lSignalCount >= 0);
+ m_lSignalCount = lSignalCount;
+ }
+ LONG DecrementSignalCount(void)
+ {
+ _ASSERTE(m_lSignalCount > 0);
+ return --m_lSignalCount;
+ }
+
+ // Object ownership accessor methods
+ void SetOwner(CPalThread * pOwnerThread);
+ void ResetOwnership(void);
+ PAL_ERROR AssignOwnershipToThread(
+ CPalThread * pthrCurrent,
+ CPalThread * pthrTarget);
+ DWORD GetOwnerProcessID(void)
+ {
+ return m_dwOwnerPid;
+ }
+ DWORD GetOwnerThreadID(void)
+ {
+ return m_dwOwnerTid;
+ }
+ CPalThread * GetOwnerThread(void)
+ {
+ return m_pOwnerThread;
+ }
+ OwnedObjectsListNode * GetOwnershipListNode(void)
+ {
+ return m_poolnOwnedObjectListNode;
+ }
+ void SetOwnershipListNode(OwnedObjectsListNode * pooln)
+ {
+ m_poolnOwnedObjectListNode = pooln;
+ }
+
+ // Object ownership count accessor methods
+ LONG GetOwnershipCount(void)
+ {
+ return m_lOwnershipCount;
+ }
+ void SetOwnershipCount(LONG lOwnershipCount)
+ {
+ m_lOwnershipCount = lOwnershipCount;
+ }
+
+ // Object abandoned flag accessor methods
+ void SetAbandoned(bool fAbandoned)
+ { m_fAbandoned = fAbandoned; }
+ bool IsAbandoned(void) { return m_fAbandoned; }
+
+ void IncrementWaitingThreadCount(void)
+ {
+ m_ulcWaitingThreads += 1;
+ }
+ void DecrementWaitingThreadCount(void)
+ {
+ m_ulcWaitingThreads -= 1;
+ }
+ ULONG GetWaitingThreadCount(void)
+ {
+ return m_ulcWaitingThreads;
+ }
+
+
+#ifdef SYNCH_STATISTICS
+ void IncrementStatWaitCount(void)
+ {
+ m_lStatWaitCount++;
+ }
+ LONG GetStatWaitCount(void)
+ {
+ return m_lStatWaitCount;
+ }
+ void IncrementStatContentionCount(void)
+ {
+ m_lStatContentionCount++;
+ }
+ LONG GetStatContentionCount(void)
+ {
+ return m_lStatContentionCount;
+ }
+#endif
+ //
+ // Wating threads list access methods
+ //
+ WaitingThreadsListNode * GetWTLHeadPtr(void)
+ {
+ return m_ptrWTLHead.ptr;
+ }
+ WaitingThreadsListNode * GetWTLTailPtr(void)
+ {
+ return m_ptrWTLTail.ptr;
+ }
+ SharedID GetWTLHeadShmPtr(void)
+ {
+ return m_ptrWTLHead.shrid;
+ }
+ SharedID GetWTLTailShmPtr(void)
+ {
+ return m_ptrWTLTail.shrid;
+ }
+ void SetWTLHeadPtr(WaitingThreadsListNode * p)
+ {
+ m_ptrWTLHead.ptr = p;
+ }
+ void SetWTLTailPtr(WaitingThreadsListNode * p)
+ {
+ m_ptrWTLTail.ptr = p;
+ }
+ void SetWTLHeadShrPtr(SharedID shrid)
+ {
+ m_ptrWTLHead.shrid = shrid;
+ }
+ void SetWTLTailShrPtr(SharedID shrid)
+ {
+ m_ptrWTLTail.shrid = shrid;
+ }
+#ifdef SYNCH_OBJECT_VALIDATION
+ ~CSynchData();
+ void ValidateObject(bool fDestructor = false);
+ void ValidateEmptyObject(void);
+ void InvalidateObject(void);
+
+ DWORD m_dwDebugTailSignature;
+#endif
+ };
+
+
+ class CSynchControllerBase
+ {
+ friend class CPalSynchronizationManager;
+
+ // NB: For perforformance purposes this class is supposed
+ // to have no virtual methods, contructor and
+ // destructor
+ public:
+ enum ControllerType { WaitController, StateController };
+
+ protected:
+ CPalThread * m_pthrOwner;
+ ControllerType m_ctCtrlrType;
+ ObjectDomain m_odObjectDomain;
+ CObjectType * m_potObjectType;
+ CSynchData * m_psdSynchData;
+ WaitDomain m_wdWaitDomain;
+
+ PAL_ERROR Init(
+ CPalThread * pthrCurrent,
+ ControllerType ctCtrlrType,
+ ObjectDomain odObjectDomain,
+ CObjectType *potObjectType,
+ CSynchData * psdSynchData,
+ WaitDomain wdWaitDomain);
+
+ void Release(void);
+
+ void SetSynchData(CSynchData * psdSynchData)
+ {
+ m_psdSynchData = psdSynchData;
+ }
+ CSynchData * GetSynchData()
+ {
+ return m_psdSynchData;
+ }
+ };
+
+ class CSynchWaitController : public CSynchControllerBase,
+ public ISynchWaitController
+ {
+ // Per-object-type specific data
+ //
+ // Process (otiProcess)
+ CProcProcessLocalData * m_pProcLocalData;
+
+ public:
+ CSynchWaitController() : m_pProcLocalData(NULL) {}
+
+ //
+ // ISynchWaitController methods
+ //
+ virtual PAL_ERROR CanThreadWaitWithoutBlocking(
+ bool * pfCanWaitWithoutBlocking,
+ bool * pfAbandoned);
+
+ virtual PAL_ERROR ReleaseWaitingThreadWithoutBlocking(void);
+
+ virtual PAL_ERROR RegisterWaitingThread(
+ WaitType wtWaitType,
+ DWORD dwIndex,
+ bool fAlertable);
+
+ virtual void ReleaseController(void);
+
+ CProcProcessLocalData * GetProcessLocalData(void);
+
+ void SetProcessLocalData(CProcProcessLocalData * pProcLocalData);
+ };
+
+ class CSynchStateController : public CSynchControllerBase,
+ public ISynchStateController
+ {
+ public:
+ // NB: For perforformance purposes this class is supposed
+ // to have no constructor or destructor
+
+ //
+ // ISynchStateController methods
+ //
+ virtual PAL_ERROR GetSignalCount(LONG *plSignalCount);
+ virtual PAL_ERROR SetSignalCount(LONG lNewCount);
+ virtual PAL_ERROR IncrementSignalCount(LONG lAmountToIncrement);
+ virtual PAL_ERROR DecrementSignalCount(LONG lAmountToDecrement);
+ virtual PAL_ERROR SetOwner(CPalThread *pNewOwningThread);
+ virtual PAL_ERROR DecrementOwnershipCount(void);
+ virtual void ReleaseController(void);
+ };
+
+ class CPalSynchronizationManager : public IPalSynchronizationManager
+ {
+ friend class CPalSynchMgrController;
+ template friend T *CorUnix::InternalNew();
+
+ public:
+ // types
+ typedef CSynchCache CSynchWaitControllerCache;
+ typedef CSynchCache CSynchStateControllerCache;
+ typedef CSynchCache CSynchDataCache;
+ typedef CSHRSynchCache CSHRSynchDataCache;
+ typedef CSynchCache CWaitingThreadsListNodeCache;
+ typedef CSHRSynchCache CSHRWaitingThreadsListNodeCache;
+ typedef CSynchCache CThreadApcInfoNodeCache;
+ typedef CSynchCache COwnedObjectsListNodeCache;
+
+ private:
+ // types
+ enum InitStatus
+ {
+ SynchMgrStatusIdle,
+ SynchMgrStatusInitializing,
+ SynchMgrStatusRunning,
+ SynchMgrStatusShuttingDown,
+ SynchMgrStatusReadyForProcessShutDown,
+ SynchMgrStatusError
+ };
+ enum SynchWorkerCmd
+ {
+ SynchWorkerCmdNop,
+ SynchWorkerCmdRemoteSignal,
+ SynchWorkerCmdDelegatedObjectSignaling,
+ SynchWorkerCmdShutdown,
+ SynchWorkerCmdLast
+ };
+
+ typedef struct _MonitoredProcessesListNode
+ {
+ struct _MonitoredProcessesListNode * pNext;
+ LONG lRefCount;
+ CSynchData * psdSynchData;
+ DWORD dwPid;
+ DWORD dwExitCode;
+ bool fIsActualExitCode;
+ CProcProcessLocalData * pProcLocalData;
+ } MonitoredProcessesListNode;
+
+ // constants
+ static const int CtrlrsCacheMaxSize = 256;
+ static const int SynchDataCacheMaxSize = 256;
+ static const int WTListNodeCacheMaxSize = 256;
+ static const int ApcInfoNodeCacheMaxSize = 32;
+ static const int OwnedObjectsListCacheMaxSize = 16;
+ static const int MaxWorkerConsecutiveEintrs = 128;
+ static const int MaxConsecutiveEagains = 128;
+ static const int WorkerThreadProcMonitoringTimeout = 250; // ms
+ static const int WorkerThreadShuttingDownTimeout = 1000; // ms
+ static const int WorkerCmdCompletionTimeout = 250; // ms
+ static const DWORD SecondNativeWaitTimeout = INFINITE;
+ static const DWORD WorkerThreadTerminationTimeout = 2000; // ms
+
+ // static members
+ static CPalSynchronizationManager * s_pObjSynchMgr;
+ static Volatile s_lInitStatus;
+ static CRITICAL_SECTION s_csSynchProcessLock;
+ static CRITICAL_SECTION s_csMonitoredProcessesLock;
+
+ // members
+ DWORD m_dwWorkerThreadTid;
+ IPalObject * m_pipoThread;
+ CPalThread * m_pthrWorker;
+ int m_iProcessPipeRead;
+ int m_iProcessPipeWrite;
+#if HAVE_KQUEUE
+ int m_iKQueue;
+ struct kevent m_keProcessPipeEvent;
+#endif // HAVE_KQUEUE
+
+ MonitoredProcessesListNode * m_pmplnMonitoredProcesses;
+ LONG m_lMonitoredProcessesCount;
+ MonitoredProcessesListNode * m_pmplnExitedNodes;
+
+ // caches
+ CSynchWaitControllerCache m_cacheWaitCtrlrs;
+ CSynchStateControllerCache m_cacheStateCtrlrs;
+ CSynchDataCache m_cacheSynchData;
+ CSHRSynchDataCache m_cacheSHRSynchData;
+ CWaitingThreadsListNodeCache m_cacheWTListNodes;
+ CSHRWaitingThreadsListNodeCache m_cacheSHRWTListNodes;
+ CThreadApcInfoNodeCache m_cacheThreadApcInfoNodes;
+ COwnedObjectsListNodeCache m_cacheOwnedObjectsListNodes;
+
+ // static methods
+ static PAL_ERROR Initialize();
+
+ protected:
+ CPalSynchronizationManager();
+
+ PAL_ERROR GetSynchControllersForObjects(
+ CPalThread *pthrCurrent,
+ IPalObject *rgObjects[],
+ DWORD dwObjectCount,
+ void ** ppvControllers,
+ CSynchControllerBase::ControllerType ctCtrlrType);
+
+ private:
+ static IPalSynchronizationManager * CreatePalSynchronizationManager();
+ static PAL_ERROR PrepareForShutdown(void);
+
+ public:
+ virtual ~CPalSynchronizationManager();
+
+ static CPalSynchronizationManager * GetInstance(void)
+ {
+ // No need here to check for NULL and in case create the
+ // singleton, since its creation is enforced by the PAL
+ // initialization code.
+ return s_pObjSynchMgr;
+ }
+
+ //
+ // Inline utility methods
+ //
+ static void AcquireLocalSynchLock(CPalThread * pthrCurrent)
+ {
+ _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
+
+ if (1 == ++pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount)
+ {
+ InternalEnterCriticalSection(pthrCurrent, &s_csSynchProcessLock);
+ }
+ }
+ static void ReleaseLocalSynchLock(CPalThread * pthrCurrent)
+ {
+ _ASSERTE(0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
+ if (0 == --pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount)
+ {
+ InternalLeaveCriticalSection(pthrCurrent, &s_csSynchProcessLock);
+
+#if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings();
+#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ }
+ }
+ static LONG ResetLocalSynchLock(CPalThread * pthrCurrent)
+ {
+ LONG lRet = pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount;
+
+ _ASSERTE(0 <= lRet);
+ if (0 < lRet)
+ {
+ pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount = 0;
+ InternalLeaveCriticalSection(pthrCurrent, &s_csSynchProcessLock);
+
+#if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings();
+#endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ }
+ return lRet;
+ }
+ static LONG GetLocalSynchLockCount(CPalThread * pthrCurrent)
+ {
+ _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
+ return pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount;
+ }
+
+ static void AcquireSharedSynchLock(CPalThread * pthrCurrent)
+ {
+ _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount);
+ _ASSERT_MSG(0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount,
+ "The local synch lock should be acquired before grabbing the "
+ "shared one.\n");
+ if (1 == ++pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount)
+ {
+ SHMLock();
+ }
+ }
+ static void ReleaseSharedSynchLock(CPalThread * pthrCurrent)
+ {
+ _ASSERTE(0 < pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount);
+ if (0 == --pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount)
+ {
+ _ASSERT_MSG(0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount,
+ "Final release of the shared synch lock while not holding the "
+ "local one. Local synch lock should always be acquired first and "
+ "released last.\n");
+ SHMRelease();
+ }
+ }
+ static LONG ResetSharedSynchLock(CPalThread * pthrCurrent)
+ {
+ LONG lRet = pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount;
+
+ _ASSERTE(0 <= lRet);
+ _ASSERTE(0 == lRet ||
+ 0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
+ if (0 < lRet)
+ {
+ pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount = 0;
+ SHMRelease();
+ }
+ return lRet;
+ }
+ static LONG GetSharedSynchLockCount(CPalThread * pthrCurrent)
+ {
+ _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount);
+ _ASSERTE(0 == pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount ||
+ 0 < pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount);
+ return pthrCurrent->synchronizationInfo.m_lSharedSynchLockCount;
+ }
+
+ CSynchWaitController * CacheGetWaitCtrlr(CPalThread * pthrCurrent)
+ {
+ return m_cacheWaitCtrlrs.Get(pthrCurrent);
+ }
+ int CacheGetWaitCtrlr(
+ CPalThread * pthrCurrent,
+ int n,
+ CSynchWaitController * prgCtrlrs[])
+ {
+ return m_cacheWaitCtrlrs.Get(pthrCurrent, n, prgCtrlrs);
+ }
+ void CacheAddWaitCtrlr(
+ CPalThread * pthrCurrent,
+ CSynchWaitController * pCtrlr)
+ {
+ m_cacheWaitCtrlrs.Add(pthrCurrent, pCtrlr);
+ }
+ CSynchStateController * CacheGetStateCtrlr(CPalThread * pthrCurrent)
+ {
+ return m_cacheStateCtrlrs.Get(pthrCurrent);
+ }
+ int CacheGetStateCtrlr(
+ CPalThread * pthrCurrent,
+ int n,
+ CSynchStateController * prgCtrlrs[])
+ {
+ return m_cacheStateCtrlrs.Get(pthrCurrent, n, prgCtrlrs);
+ }
+ void CacheAddStateCtrlr(
+ CPalThread * pthrCurrent,
+ CSynchStateController * pCtrlr)
+ {
+ m_cacheStateCtrlrs.Add(pthrCurrent, pCtrlr);
+ }
+
+ CSynchData * CacheGetLocalSynchData(CPalThread * pthrCurrent)
+ {
+ return m_cacheSynchData.Get(pthrCurrent);
+ }
+ void CacheAddLocalSynchData(
+ CPalThread * pthrCurrent,
+ CSynchData * psdSynchData)
+ {
+ m_cacheSynchData.Add(pthrCurrent, psdSynchData);
+ }
+ SharedID CacheGetSharedSynchData(CPalThread * pthrCurrent)
+ {
+ return m_cacheSHRSynchData.Get(pthrCurrent);
+ }
+ void CacheAddSharedSynchData(
+ CPalThread * pthrCurrent,
+ SharedID shridSData)
+ {
+ m_cacheSHRSynchData.Add(pthrCurrent, shridSData);
+ }
+
+ WaitingThreadsListNode * CacheGetLocalWTListNode(
+ CPalThread * pthrCurrent)
+ {
+ return m_cacheWTListNodes.Get(pthrCurrent);
+ }
+ void CacheAddLocalWTListNode(
+ CPalThread * pthrCurrent,
+ WaitingThreadsListNode * pWTLNode)
+ {
+ m_cacheWTListNodes.Add(pthrCurrent, pWTLNode);
+ }
+ SharedID CacheGetSharedWTListNode(CPalThread * pthrCurrent)
+ {
+ return m_cacheSHRWTListNodes.Get(pthrCurrent);
+ }
+ void CacheAddSharedWTListNode(
+ CPalThread * pthrCurrent,
+ SharedID shridWTLNode)
+ {
+ m_cacheSHRWTListNodes.Add(pthrCurrent, shridWTLNode);
+ }
+
+ ThreadApcInfoNode * CacheGetApcInfoNodes(CPalThread * pthrCurrent)
+ {
+ return m_cacheThreadApcInfoNodes.Get(pthrCurrent);
+ }
+ void CacheAddApcInfoNodes(
+ CPalThread * pthrCurrent,
+ ThreadApcInfoNode * pNode)
+ {
+ m_cacheThreadApcInfoNodes.Add(pthrCurrent, pNode);
+ }
+
+ OwnedObjectsListNode * CacheGetOwnedObjsListNode(
+ CPalThread * pthrCurrent)
+ {
+ return m_cacheOwnedObjectsListNodes.Get(pthrCurrent);
+ }
+ void CacheAddOwnedObjsListNode(
+ CPalThread * pthrCurrent,
+ OwnedObjectsListNode * pNode)
+ {
+ m_cacheOwnedObjectsListNodes.Add(pthrCurrent, pNode);
+ }
+
+
+ //
+ // IPalSynchronizationManager methods
+ //
+ virtual PAL_ERROR BlockThread(
+ CPalThread *pthrCurrent,
+ DWORD dwTimeout,
+ bool fAlertable,
+ bool fIsSleep,
+ ThreadWakeupReason *ptwrWakeupReason,
+ DWORD *pdwSignaledObject);
+
+ virtual PAL_ERROR AbandonObjectsOwnedByThread(
+ CPalThread *pthrCurrent,
+ CPalThread *pthrTarget);
+
+ virtual PAL_ERROR GetSynchWaitControllersForObjects(
+ CPalThread *pthrCurrent,
+ IPalObject *rgObjects[],
+ DWORD dwObjectCount,
+ ISynchWaitController *rgControllers[]);
+
+ virtual PAL_ERROR GetSynchStateControllersForObjects(
+ CPalThread *pthrCurrent,
+ IPalObject *rgObjects[],
+ DWORD dwObjectCount,
+ ISynchStateController *rgControllers[]);
+
+ virtual PAL_ERROR AllocateObjectSynchData(
+ CObjectType *potObjectType,
+ ObjectDomain odObjectDomain,
+ VOID **ppvSynchData);
+
+ virtual void FreeObjectSynchData(
+ CObjectType *potObjectType,
+ ObjectDomain odObjectDomain,
+ VOID *pvSynchData);
+
+ virtual PAL_ERROR PromoteObjectSynchData(
+ CPalThread *pthrCurrent,
+ VOID *pvLocalSynchData,
+ VOID **ppvSharedSynchData);
+
+ virtual PAL_ERROR CreateSynchStateController(
+ CPalThread *pthrCurrent,
+ CObjectType *potObjectType,
+ VOID *pvSynchData,
+ ObjectDomain odObjectDomain,
+ ISynchStateController **ppStateController);
+
+ virtual PAL_ERROR CreateSynchWaitController(
+ CPalThread *pthrCurrent,
+ CObjectType *potObjectType,
+ VOID *pvSynchData,
+ ObjectDomain odObjectDomain,
+ ISynchWaitController **ppWaitController);
+
+ virtual PAL_ERROR QueueUserAPC(
+ CPalThread * pthrCurrent,
+ CPalThread *pthrTarget,
+ PAPCFUNC pfnAPC,
+ ULONG_PTR uptrData);
+
+ virtual bool AreAPCsPending(CPalThread * pthrTarget);
+
+ virtual PAL_ERROR DispatchPendingAPCs(CPalThread * pthrCurrent);
+
+ virtual void AcquireProcessLock(CPalThread *pthrCurrent);
+
+ virtual void ReleaseProcessLock(CPalThread *pthrCurrent);
+
+ //
+ // Static helper methods
+ //
+ public:
+ static PAL_ERROR WakeUpLocalThread(
+ CPalThread * pthrCurrent,
+ CPalThread * pthrTarget,
+ ThreadWakeupReason twrWakeupReason,
+ DWORD dwObjectIndex);
+
+#if !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ static PAL_ERROR SignalThreadCondition(
+ ThreadNativeWaitData * ptnwdNativeWaitData);
+
+ static PAL_ERROR DeferThreadConditionSignaling(
+ CPalThread * pthrCurrent,
+ CPalThread * pthrTarget);
+#endif // SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+
+ static PAL_ERROR WakeUpRemoteThread(
+ SharedID shridWLNode);
+
+ static PAL_ERROR DelegateSignalingToRemoteProcess(
+ CPalThread * pthrCurrent,
+ DWORD dwTargetProcessId,
+ SharedID shridSynchData);
+
+ static PAL_ERROR SendMsgToRemoteWorker(
+ DWORD dwProcessId,
+ BYTE * pMsg,
+ int iMsgSize);
+
+ static ThreadWaitInfo * GetThreadWaitInfo(
+ CPalThread * pthrCurrent);
+
+ //
+ // The following methods must be called only by a Sync*Controller or
+ // while holding the required synchronization global locks
+ //
+ static void UnsignalRestOfLocalAwakeningWaitAll(
+ CPalThread * pthrCurrent,
+ CPalThread * pthrTarget,
+ WaitingThreadsListNode * pwtlnNode,
+ CSynchData * psdTgtObjectSynchData);
+
+ static void MarkWaitForDelegatedObjectSignalingInProgress(
+ CPalThread * pthrCurrent,
+ WaitingThreadsListNode * pwtlnNode);
+
+ static void UnmarkTWListForDelegatedObjectSignalingInProgress(
+ CSynchData * pTgtObjectSynchData);
+
+ static PAL_ERROR ThreadNativeWait(
+ ThreadNativeWaitData * ptnwdNativeWaitData,
+ DWORD dwTimeout,
+ ThreadWakeupReason * ptwrWakeupReason,
+ DWORD * pdwSignaledObject);
+
+ static void ThreadPrepareForShutdown(void);
+
+#ifndef CORECLR
+ static bool GetProcessPipeName(
+ LPSTR pDest,
+ int iDestSize,
+ DWORD dwPid);
+#endif // !CORECLR
+
+ //
+ // Non-static helper methods
+ //
+ private:
+ LONG DoMonitorProcesses(CPalThread * pthrCurrent);
+
+ void DiscardMonitoredProcesses(CPalThread * pthrCurrent);
+
+ PAL_ERROR ReadCmdFromProcessPipe(
+ int iPollTimeout,
+ SynchWorkerCmd * pswcWorkerCmd,
+ SharedID * pshridMarshaledData,
+ DWORD * pdwData);
+
+ PAL_ERROR WakeUpLocalWorkerThread(
+ SynchWorkerCmd swcWorkerCmd);
+
+ void DiscardAllPendingAPCs(
+ CPalThread * pthrCurrent,
+ CPalThread * pthrTarget);
+
+ int ReadBytesFromProcessPipe(
+ int iTimeout,
+ BYTE * pRecvBuf,
+ LONG lBytes);
+
+ bool CreateProcessPipe();
+
+ PAL_ERROR ShutdownProcessPipe();
+
+ public:
+ //
+ // The following methods must be called only by a Sync*Controller or
+ // while holding the required synchronization global locks
+ //
+ void UnRegisterWait(
+ CPalThread * pthrCurrent,
+ ThreadWaitInfo * ptwiWaitInfo,
+ bool fHaveSharedLock);
+
+ PAL_ERROR RegisterProcessForMonitoring(
+ CPalThread * pthrCurrent,
+ CSynchData *psdSynchData,
+ CProcProcessLocalData * pProcLocalData);
+
+ PAL_ERROR UnRegisterProcessForMonitoring(
+ CPalThread * pthrCurrent,
+ CSynchData *psdSynchData,
+ DWORD dwPid);
+
+ //
+ // Utility static methods, no lock required
+ //
+ static bool HasProcessExited(
+ DWORD dwPid,
+ DWORD * pdwExitCode,
+ bool * pfIsActualExitCode);
+
+ static bool InterlockedAwaken(
+ DWORD *pWaitState,
+ bool fAlertOnly);
+
+ static PAL_ERROR GetAbsoluteTimeout(
+ DWORD dwTimeout,
+ struct timespec * ptsAbsTmo);
+
+#if SYNCHMGR_PIPE_BASED_THREAD_BLOCKING
+ static void UpdateTimeout(
+ DWORD * pdwOldTime,
+ DWORD * pdwTimeout);
+#endif
+
+ };
+}
+
+#endif // _SINCHMANAGER_HPP_
+
diff --git a/deps/chakrashim/core/test/AsmJs/rlexe.xml b/deps/chakrashim/core/test/AsmJs/rlexe.xml
index 6a62295cbd4..011e04db69b 100644
--- a/deps/chakrashim/core/test/AsmJs/rlexe.xml
+++ b/deps/chakrashim/core/test/AsmJs/rlexe.xml
@@ -1,1026 +1,1026 @@
-
-
-
-
- argTest.js
- -maic:0 -maxInterpretCount:0
-
-
-
-
- ArrayView.js
- ArrayView.baseline
- -testtrace:asmjs
-
-
-
-
- BasicBranching.js
- BasicBranching.baseline
- -testtrace:asmjs
-
-
-
-
- BasicBranching.js
- BasicBranchingLinkFail.baseline
- -testtrace:asmjs -forceAsmJsLinkFail
-
-
-
-
-
- basicComparisonDouble.js
- basicComparisonDouble.baseline
- -testtrace:asmjs
-
-
-
-
- basicComparisonInt.js
- basicComparisonInt.baseline
- -testtrace:asmjs
-
-
-
-
- basicComparisonUInt.js
- basicComparisonUInt.baseline
- -testtrace:asmjs
-
-
-
-
- BasicLooping.js
- BasicLooping.baseline
- -testtrace:asmjs
-
-
-
-
- basicMath.js
- basicMath.baseline
- -testtrace:asmjs
- Slow
-
-
-
-
- basicMathIntSpecific.js
- basicMathIntSpecific.baseline
- -testtrace:asmjs
-
-
-
-
- basicMathUnary.js
- basicMathUnary.baseline
- -testtrace:asmjs
-
-
-
-
- BasicSwitch.js
- BasicSwitch.baseline
- -testtrace:asmjs
-
-
-
-
- CompositionMathUnary.js
- CompositionMathUnary.baseline
- -testtrace:asmjs
-
-
-
-
- FunctionCalls.js
- FunctionCalls.baseline
- -testtrace:asmjs
-
-
-
-
- FunctionCalls.js
- FunctionCalls.baseline
- -ForceStaticInterpreterThunk -testtrace:asmjs
-
-
-
-
- functiontablecalls.js
- functiontablecalls.baseline
- -testtrace:asmjs
-
-
-
-
- MathBuiltinsCall.js
- MathBuiltinsCall.baseline
- exclude_xplat
- -testtrace:asmjs
-
-
-
-
- MathBuiltinsCall.js
- MathBuiltinsCall.baseline
- exclude_xplat
- -testtrace:asmjs -maic:1 -sse:3
-
-
-
-
- ModuleVarRead.js
- ModuleVarRead.baseline
- -testtrace:asmjs
-
-
-
-
- ModuleVarWrite.js
- ModuleVarWrite.baseline
- -testtrace:asmjs
-
-
-
-
- ReadArrayView.js
- ReadArrayView.baseline
- -testtrace:asmjs
-
-
-
-
- ReadFixOffset.js
- ReadFixOffset.baseline
- -testtrace:asmjs
-
-
-
-
- relink.js
- relink.baseline
- -testtrace:asmjs
-
-
-
-
- relink.js
- relink.baseline
- -testtrace:asmjs
-
-
-
-
- relink.js
- relink.baseline
- -forceserialized -testtrace:asmjs
-
-
-
-
- relink.js
- relink.baseline
- -forceserialized -testtrace:asmjs
-
-
-
-
- WriteArrayView.js
- WriteArrayView.baseline
- -testtrace:asmjs
- Slow
-
-
-
-
- WriteFixOffset.js
- WriteFixOffset.baseline
- -testtrace:asmjs
- Slow
-
-
-
-
- ArrayView.js
- ArrayView.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- BasicBranching.js
- BasicBranching.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- basicComparisonDouble.js
- basicComparisonDouble.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- basicComparisonInt.js
- basicComparisonInt.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- basicComparisonUInt.js
- basicComparisonUInt.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- BasicLooping.js
- BasicLooping.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- basicMath.js
- basicMath.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- basicMathIntSpecific.js
- basicMathIntSpecific.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- basicMathUnary.js
- basicMathUnary.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- BasicSwitch.js
- BasicSwitch.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- CompositionMathUnary.js
- CompositionMathUnary.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- FunctionCalls.js
- FunctionCalls.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- functiontablecalls.js
- functiontablecalls.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- MathBuiltinsCall.js
- MathBuiltinsCall.baseline
- exclude_amd64,exclude_xplat
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- ModuleVarRead.js
- ModuleVarRead.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- ModuleVarWrite.js
- ModuleVarWrite.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- ReadArrayView.js
- ReadArrayView.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- ReadFixOffset.js
- ReadFixOffset.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- WriteArrayView.js
- WriteArrayView.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- WriteFixOffset.js
- WriteFixOffset.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- ArrayView.js
- ArrayView.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- BasicBranching.js
- BasicBranching.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- basicComparisonDouble.js
- basicComparisonDouble.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- basicComparisonInt.js
- basicComparisonInt.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- basicComparisonUInt.js
- basicComparisonUInt.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- BasicLooping.js
- BasicLooping.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- basicMath.js
- basicMath.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- basicMathIntSpecific.js
- basicMathIntSpecific.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- basicMathUnary.js
- basicMathUnary.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- BasicSwitch.js
- BasicSwitch.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- CompositionMathUnary.js
- CompositionMathUnary.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- FunctionCalls.js
- FunctionCalls.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- functiontablecalls.js
- functiontablecalls.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- MathBuiltinsCall.js
- MathBuiltinsCall.baseline
- exclude_xplat
- -testtrace:asmjs -nonative
-
-
-
-
- ModuleVarRead.js
- ModuleVarRead.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- ModuleVarWrite.js
- ModuleVarWrite.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- ReadArrayView.js
- ReadArrayView.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- ReadFixOffset.js
- ReadFixOffset.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- WriteArrayView.js
- WriteArrayView.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- WriteFixOffset.js
- WriteFixOffset.baseline
- -testtrace:asmjs -nonative
- Slow
-
-
-
-
- functiontablebug.js
- functiontablebug.baseline
- -testtrace:asmjs
-
-
-
-
- nanbug.js
- nanbug.baseline
- -testtrace:asmjs
-
-
-
-
- nanbug.js
- nanbug.baseline
- -testtrace:asmjs
-
-
-
-
- switchbug.js
- switchbug.baseline
- -testtrace:asmjs
-
-
-
-
- fgpeepsbug.js
- fgpeepsbug.baseline
- -testtrace:asmjs
-
-
-
-
- cseBug.js
- cseBug.baseline
- -testtrace:asmjs -forcedeferparse
-
-
-
-
- evalbug.js
-
-
-
-
- brbool.js
-
-
-
-
- constTest.js
- constTest.baseline
- -testtrace:asmjs
-
-
-
-
- constTest.js
- constTest.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- constTest.js
- constTest.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- ffibug.js
- ffibug.baseline
- -testtrace:asmjs
-
-
-
-
- ternaryfloat.js
- ternaryfloat.baseline
- -testtrace:asmjs
-
-
-
-
- minintbug.js
- minintbug.baseline
- -testtrace:asmjs
-
-
-
-
- floatmod.js
- floatmod.baseline
- -testtrace:asmjs
-
-
-
-
- floatmod.js
- floatmod.baseline
- -forceserialized -testtrace:asmjs
-
-
-
-
- invalidIntLiteral.js
- invalidIntLiteral.baseline
- -testtrace:asmjs -force:deferparse
-
-
-
-
- fstpbug.js
- fstpbug.baseline
- -testtrace:asmjs
-
-
-
-
- break2.js
- break2.baseline
- -testtrace:asmjs -bgjit- -lic:1
-
-
-
-
- break3.js
- break3.baseline
- -testtrace:asmjs -bgjit- -lic:1
-
-
-
-
- return1.js
- return1.baseline
- -off:deferparse -testtrace:asmjs -bgjit- -lic:1
-
-
-
-
- return2.js
- return2.baseline
- -off:deferparse -testtrace:asmjs
-
-
-
-
- return3.js
- return3.baseline
- -testtrace:asmjs
-
-
-
-
- returndouble.js
- returndouble.baseline
- -testtrace:asmjs -bgjit- -lic:1
-
-
-
-
- break1.js
- break1.baseline
- -testtrace:asmjs -bgjit- -lic:1
-
-
-
-
- JitToLoopBody.js
- JitToLoopBody.baseline
- -testtrace:asmjs -bgjit- -lic:1 -maic:1
-
-
-
-
- LoopBodyToJit.js
- LoopBodyToJit.baseline
- -testtrace:asmjs -bgjit- -lic:1 -maic:1
-
-
-
-
- breakfloat1.js
- breakfloat1.baseline
- -testtrace:asmjs -bgjit- -lic:1
-
-
-
-
- returnFloat.js
- returnFloat.baseline
- -testtrace:asmjs -bgjit- -lic:1
-
-
-
-
- unitybug.js
- unitybug.baseline
- -testtrace:asmjs
-
-
-
-
- unitybug.js
- unitybug.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- unitybug.js
- unitybug.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- argoutcapturebug.js
- argoutcapturebug.baseline
- -testtrace:asmjs
-
-
-
-
- ReadAV1.js
- ReadAV1.baseline
- -testtrace:asmjs -off:deferparse
-
-
-
-
- clz32.js
- clz32.baseline
- -testtrace:asmjs
-
-
-
-
- clz32.js
- clz32.baseline
- -testtrace:asmjs -nonative
-
-
-
-
- clz32.js
- clz32.baseline
- exclude_amd64
-
- -testtrace:asmjs -oopjit- -off:fulljit
-
-
-
-
- negZero.js
- negZero.baseline
- -testtrace:asmjs
-
-
-
-
- shadowingBug.js
- shadowingBug.baseline
- -forcedeferparse -testtrace:asmjs
-
-
-
-
- blockLabelBug.js
- blockLabelBug.baseline
- -testtrace:asmjs
-
-
-
-
- switchJumpTable.js
- switchJumpTable.baseline
- -testtrace:asmjs -maic:1
-
-
-
-
- switchBinaryTraverse.js
- switchBinaryTraverse.baseline
- -testtrace:asmjs -maic:1
-
-
-
-
- lowererdivbug.js
- lowererdivbug.baseline
- -testtrace:asmjs
-
-
-
-
- qmarkbug.js
- qmarkbug.baseline
- -forcedeferparse -testtrace:asmjs
-
-
-
-
- uint.js
- uint.baseline
- -maic:1 -off:deferparse -testtrace:asmjs
-
-
-
-
- unsigned.js
-
-
-
-
- asmjscctx.js
- asmjscctx.baseline
- -testtrace:asmjs
-
-
-
-
- constloads.js
- constloads.baseline
- -testtrace:asmjs -maic:1
-
-
-
-
- vardeclnorhs.js
- vardeclnorhs.baseline
- -testtrace:asmjs -maic:1
-
-
-
-
- bug12239366.js
- -lic:1 -bgjit-
- exclude_drt
-
-
-
-
- badFunctionType.js
- badFunctionType.baseline
- -testtrace:asmjs
-
-
-
-
- bugGH2270.js
-
-
-
-
- lotsOfLocals.js
- exclude_chk,exclude_razzle
-
-
-
-
- bug9883547.js
-
-
-
-
- constFoldTests.js
- -asmjs -maic:0
-
-
-
-
- lotsOfLocals.js
- exclude_chk
-
-
-
-
- params.js
- params.baseline
- -testtrace:asmjs -args 14000 -endargs -EnableFatalErrorOnOOM-
-
- exclude_dynapogo,exclude_xplat
-
-
-
-
- nested.js
- nested.baseline
- -forcedeferparse -testtrace:asmjs
-
-
-
-
- constbrbug.js
- constbrbug.baseline
- -testtrace:asmjs -maic:0
- exclude_drt
-
-
-
-
- lambda.js
- lambda.baseline
- -testtrace:asmjs
- exclude_drt
-
-
-
-
- badFunctionType.js
- badFunctionType.baseline
- -testtrace:asmjs
- exclude_drt
-
-
-
-
- badFunctionType.js
- badFunctionType.baseline
- -testtrace:asmjs
- exclude_drt
-
-
-
-
- exports.js
- exports.baseline
- -testtrace:asmjs
- exclude_drt
-
-
-
-
- trackdeferredonreparse.js
-
-
-
+
+
+
+
+ argTest.js
+ -maic:0 -maxInterpretCount:0
+
+
+
+
+ ArrayView.js
+ ArrayView.baseline
+ -testtrace:asmjs
+
+
+
+
+ BasicBranching.js
+ BasicBranching.baseline
+ -testtrace:asmjs
+
+
+
+
+ BasicBranching.js
+ BasicBranchingLinkFail.baseline
+ -testtrace:asmjs -forceAsmJsLinkFail
+
+
+
+
+
+ basicComparisonDouble.js
+ basicComparisonDouble.baseline
+ -testtrace:asmjs
+
+
+
+
+ basicComparisonInt.js
+ basicComparisonInt.baseline
+ -testtrace:asmjs
+
+
+
+
+ basicComparisonUInt.js
+ basicComparisonUInt.baseline
+ -testtrace:asmjs
+
+
+
+
+ BasicLooping.js
+ BasicLooping.baseline
+ -testtrace:asmjs
+
+
+
+
+ basicMath.js
+ basicMath.baseline
+ -testtrace:asmjs
+ Slow
+
+
+
+
+ basicMathIntSpecific.js
+ basicMathIntSpecific.baseline
+ -testtrace:asmjs
+
+
+
+
+ basicMathUnary.js
+ basicMathUnary.baseline
+ -testtrace:asmjs
+
+
+
+
+ BasicSwitch.js
+ BasicSwitch.baseline
+ -testtrace:asmjs
+
+
+
+
+ CompositionMathUnary.js
+ CompositionMathUnary.baseline
+ -testtrace:asmjs
+
+
+
+
+ FunctionCalls.js
+ FunctionCalls.baseline
+ -testtrace:asmjs
+
+
+
+
+ FunctionCalls.js
+ FunctionCalls.baseline
+ -ForceStaticInterpreterThunk -testtrace:asmjs
+
+
+
+
+ functiontablecalls.js
+ functiontablecalls.baseline
+ -testtrace:asmjs
+
+
+
+
+ MathBuiltinsCall.js
+ MathBuiltinsCall.baseline
+ exclude_xplat
+ -testtrace:asmjs
+
+
+
+
+ MathBuiltinsCall.js
+ MathBuiltinsCall.baseline
+ exclude_xplat
+ -testtrace:asmjs -maic:1 -sse:3
+
+
+
+
+ ModuleVarRead.js
+ ModuleVarRead.baseline
+ -testtrace:asmjs
+
+
+
+
+ ModuleVarWrite.js
+ ModuleVarWrite.baseline
+ -testtrace:asmjs
+
+
+
+
+ ReadArrayView.js
+ ReadArrayView.baseline
+ -testtrace:asmjs
+
+
+
+
+ ReadFixOffset.js
+ ReadFixOffset.baseline
+ -testtrace:asmjs
+
+
+
+
+ relink.js
+ relink.baseline
+ -testtrace:asmjs
+
+
+
+
+ relink.js
+ relink.baseline
+ -testtrace:asmjs
+
+
+
+
+ relink.js
+ relink.baseline
+ -forceserialized -testtrace:asmjs
+
+
+
+
+ relink.js
+ relink.baseline
+ -forceserialized -testtrace:asmjs
+
+
+
+
+ WriteArrayView.js
+ WriteArrayView.baseline
+ -testtrace:asmjs
+ Slow
+
+
+
+
+ WriteFixOffset.js
+ WriteFixOffset.baseline
+ -testtrace:asmjs
+ Slow
+
+
+
+
+ ArrayView.js
+ ArrayView.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ BasicBranching.js
+ BasicBranching.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ basicComparisonDouble.js
+ basicComparisonDouble.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ basicComparisonInt.js
+ basicComparisonInt.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ basicComparisonUInt.js
+ basicComparisonUInt.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ BasicLooping.js
+ BasicLooping.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ basicMath.js
+ basicMath.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ basicMathIntSpecific.js
+ basicMathIntSpecific.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ basicMathUnary.js
+ basicMathUnary.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ BasicSwitch.js
+ BasicSwitch.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ CompositionMathUnary.js
+ CompositionMathUnary.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ FunctionCalls.js
+ FunctionCalls.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ functiontablecalls.js
+ functiontablecalls.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ MathBuiltinsCall.js
+ MathBuiltinsCall.baseline
+ exclude_amd64,exclude_xplat
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ ModuleVarRead.js
+ ModuleVarRead.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ ModuleVarWrite.js
+ ModuleVarWrite.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ ReadArrayView.js
+ ReadArrayView.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ ReadFixOffset.js
+ ReadFixOffset.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ WriteArrayView.js
+ WriteArrayView.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ WriteFixOffset.js
+ WriteFixOffset.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ ArrayView.js
+ ArrayView.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ BasicBranching.js
+ BasicBranching.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ basicComparisonDouble.js
+ basicComparisonDouble.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ basicComparisonInt.js
+ basicComparisonInt.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ basicComparisonUInt.js
+ basicComparisonUInt.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ BasicLooping.js
+ BasicLooping.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ basicMath.js
+ basicMath.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ basicMathIntSpecific.js
+ basicMathIntSpecific.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ basicMathUnary.js
+ basicMathUnary.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ BasicSwitch.js
+ BasicSwitch.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ CompositionMathUnary.js
+ CompositionMathUnary.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ FunctionCalls.js
+ FunctionCalls.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ functiontablecalls.js
+ functiontablecalls.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ MathBuiltinsCall.js
+ MathBuiltinsCall.baseline
+ exclude_xplat
+ -testtrace:asmjs -nonative
+
+
+
+
+ ModuleVarRead.js
+ ModuleVarRead.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ ModuleVarWrite.js
+ ModuleVarWrite.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ ReadArrayView.js
+ ReadArrayView.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ ReadFixOffset.js
+ ReadFixOffset.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ WriteArrayView.js
+ WriteArrayView.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ WriteFixOffset.js
+ WriteFixOffset.baseline
+ -testtrace:asmjs -nonative
+ Slow
+
+
+
+
+ functiontablebug.js
+ functiontablebug.baseline
+ -testtrace:asmjs
+
+
+
+
+ nanbug.js
+ nanbug.baseline
+ -testtrace:asmjs
+
+
+
+
+ nanbug.js
+ nanbug.baseline
+ -testtrace:asmjs
+
+
+
+
+ switchbug.js
+ switchbug.baseline
+ -testtrace:asmjs
+
+
+
+
+ fgpeepsbug.js
+ fgpeepsbug.baseline
+ -testtrace:asmjs
+
+
+
+
+ cseBug.js
+ cseBug.baseline
+ -testtrace:asmjs -forcedeferparse
+
+
+
+
+ evalbug.js
+
+
+
+
+ brbool.js
+
+
+
+
+ constTest.js
+ constTest.baseline
+ -testtrace:asmjs
+
+
+
+
+ constTest.js
+ constTest.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ constTest.js
+ constTest.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ ffibug.js
+ ffibug.baseline
+ -testtrace:asmjs
+
+
+
+
+ ternaryfloat.js
+ ternaryfloat.baseline
+ -testtrace:asmjs
+
+
+
+
+ minintbug.js
+ minintbug.baseline
+ -testtrace:asmjs
+
+
+
+
+ floatmod.js
+ floatmod.baseline
+ -testtrace:asmjs
+
+
+
+
+ floatmod.js
+ floatmod.baseline
+ -forceserialized -testtrace:asmjs
+
+
+
+
+ invalidIntLiteral.js
+ invalidIntLiteral.baseline
+ -testtrace:asmjs -force:deferparse
+
+
+
+
+ fstpbug.js
+ fstpbug.baseline
+ -testtrace:asmjs
+
+
+
+
+ break2.js
+ break2.baseline
+ -testtrace:asmjs -bgjit- -lic:1
+
+
+
+
+ break3.js
+ break3.baseline
+ -testtrace:asmjs -bgjit- -lic:1
+
+
+
+
+ return1.js
+ return1.baseline
+ -off:deferparse -testtrace:asmjs -bgjit- -lic:1
+
+
+
+
+ return2.js
+ return2.baseline
+ -off:deferparse -testtrace:asmjs
+
+
+
+
+ return3.js
+ return3.baseline
+ -testtrace:asmjs
+
+
+
+
+ returndouble.js
+ returndouble.baseline
+ -testtrace:asmjs -bgjit- -lic:1
+
+
+
+
+ break1.js
+ break1.baseline
+ -testtrace:asmjs -bgjit- -lic:1
+
+
+
+
+ JitToLoopBody.js
+ JitToLoopBody.baseline
+ -testtrace:asmjs -bgjit- -lic:1 -maic:1
+
+
+
+
+ LoopBodyToJit.js
+ LoopBodyToJit.baseline
+ -testtrace:asmjs -bgjit- -lic:1 -maic:1
+
+
+
+
+ breakfloat1.js
+ breakfloat1.baseline
+ -testtrace:asmjs -bgjit- -lic:1
+
+
+
+
+ returnFloat.js
+ returnFloat.baseline
+ -testtrace:asmjs -bgjit- -lic:1
+
+
+
+
+ unitybug.js
+ unitybug.baseline
+ -testtrace:asmjs
+
+
+
+
+ unitybug.js
+ unitybug.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ unitybug.js
+ unitybug.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ argoutcapturebug.js
+ argoutcapturebug.baseline
+ -testtrace:asmjs
+
+
+
+
+ ReadAV1.js
+ ReadAV1.baseline
+ -testtrace:asmjs -off:deferparse
+
+
+
+
+ clz32.js
+ clz32.baseline
+ -testtrace:asmjs
+
+
+
+
+ clz32.js
+ clz32.baseline
+ -testtrace:asmjs -nonative
+
+
+
+
+ clz32.js
+ clz32.baseline
+ exclude_amd64
+
+ -testtrace:asmjs -oopjit- -off:fulljit
+
+
+
+
+ negZero.js
+ negZero.baseline
+ -testtrace:asmjs
+
+
+
+
+ shadowingBug.js
+ shadowingBug.baseline
+ -forcedeferparse -testtrace:asmjs
+
+
+
+
+ blockLabelBug.js
+ blockLabelBug.baseline
+ -testtrace:asmjs
+
+
+
+
+ switchJumpTable.js
+ switchJumpTable.baseline
+ -testtrace:asmjs -maic:1
+
+
+
+
+ switchBinaryTraverse.js
+ switchBinaryTraverse.baseline
+ -testtrace:asmjs -maic:1
+
+
+
+
+ lowererdivbug.js
+ lowererdivbug.baseline
+ -testtrace:asmjs
+
+
+
+
+ qmarkbug.js
+ qmarkbug.baseline
+ -forcedeferparse -testtrace:asmjs
+
+
+
+
+ uint.js
+ uint.baseline
+ -maic:1 -off:deferparse -testtrace:asmjs
+
+
+
+
+ unsigned.js
+
+
+
+
+ asmjscctx.js
+ asmjscctx.baseline
+ -testtrace:asmjs
+
+
+
+
+ constloads.js
+ constloads.baseline
+ -testtrace:asmjs -maic:1
+
+
+
+
+ vardeclnorhs.js
+ vardeclnorhs.baseline
+ -testtrace:asmjs -maic:1
+
+
+
+
+ bug12239366.js
+ -lic:1 -bgjit-
+ exclude_drt
+
+
+
+
+ badFunctionType.js
+ badFunctionType.baseline
+ -testtrace:asmjs
+
+
+
+
+ bugGH2270.js
+
+
+
+
+ lotsOfLocals.js
+ exclude_chk,exclude_razzle
+
+
+
+
+ bug9883547.js
+
+
+
+
+ constFoldTests.js
+ -asmjs -maic:0
+
+
+
+
+ lotsOfLocals.js
+ exclude_chk
+
+
+
+
+ params.js
+ params.baseline
+ -testtrace:asmjs -args 14000 -endargs -EnableFatalErrorOnOOM-
+
+ exclude_dynapogo,exclude_xplat
+
+
+
+
+ nested.js
+ nested.baseline
+ -forcedeferparse -testtrace:asmjs
+
+
+
+
+ constbrbug.js
+ constbrbug.baseline
+ -testtrace:asmjs -maic:0
+ exclude_drt
+
+
+
+
+ lambda.js
+ lambda.baseline
+ -testtrace:asmjs
+ exclude_drt
+
+
+
+
+ badFunctionType.js
+ badFunctionType.baseline
+ -testtrace:asmjs
+ exclude_drt
+
+
+
+
+ badFunctionType.js
+ badFunctionType.baseline
+ -testtrace:asmjs
+ exclude_drt
+
+
+
+
+ exports.js
+ exports.baseline
+ -testtrace:asmjs
+ exclude_drt
+
+
+
+
+ trackdeferredonreparse.js
+
+
+
diff --git a/deps/chakrashim/core/test/Basics/rlexe.xml b/deps/chakrashim/core/test/Basics/rlexe.xml
index 824b44294d0..16d3a8e90da 100644
--- a/deps/chakrashim/core/test/Basics/rlexe.xml
+++ b/deps/chakrashim/core/test/Basics/rlexe.xml
@@ -1,397 +1,397 @@
-
-
-
-
- Array.js
- Array.baseline
- -Intl-
-
-
-
-
- ScriptFunctionToStrings.js
- -args summary -endargs
-
-
-
-
- DomProperties.js
- -Intl-
- Slow
-
-
-
-
- ArrayConcat.js
- ArrayConcat.baseline
- -Intl-
-
-
-
-
- arrayinit.js
- arrayinit.baseline
- -Intl-
-
-
-
-
- IdsWithEscapes.js
- IdsWithEscapes.baseline
- -Intl-
-
-
-
-
- ArrayResize.js
- ArrayResize.baseline
- -Intl-
-
-
-
-
- DirectCall.js
- DirectCall.baseline
- -Intl-
-
-
-
-
- equal.js
- equal.baseline
- -Intl-
-
-
-
-
- equal_object.js
- equal_object.baseline
- -Intl-
-
-
-
-
- label1.js
- -Intl-
-
-
-
-
- label1.js
- -Force:Deferparse -Intl-
-
-
-
-
- label2.js
- label2.baseline
- exclude_dynapogo
- -Intl-
-
-
-
-
- label2.js
- label2.baseline
- -Force:Deferparse -Intl-
- exclude_dynapogo
-
-
-
-
- label3.js
- label3.baseline
- exclude_dynapogo
- -Intl-
-
-
-
-
- label3.js
- label3.baseline
- -Force:Deferparse -Intl-
- exclude_dynapogo
-
-
-
-
- label4.js
- label4.baseline
- exclude_dynapogo
- -Intl-
-
-
-
-
- label4.js
- label4.baseline
- -Force:Deferparse -Intl-
- exclude_dynapogo
-
-
-
-
- label5.js
- label5.baseline
- exclude_dynapogo
- -Intl-
-
-
-
-
- label5.js
- label5.baseline
- -Force:Deferparse -Intl-
- exclude_dynapogo
-
-
-
-
- label6.js
- label6.baseline
- exclude_dynapogo
- -Intl-
-
-
-
-
- label6.js
- label6.baseline
- -Force:Deferparse -Intl-
- exclude_dynapogo
-
-
-
-
- Length.js
- Length.baseline
- -Intl-
-
-
-
-
- Logical.js
- Logical.baseline
- -Intl-
-
-
-
-
- ParameterOrder.js
- ParameterOrder.baseline
- -Intl-
-
-
-
-
- Parameters.js
- Parameters.baseline
- -Intl-
-
-
-
-
- StringCharCodeAt.js
- StringCharCodeAt.baseline
- -Intl-
-
-
-
-
- StringField.js
- StringField.baseline
- -Intl-
-
-
-
-
- StringFromCharCode.js
- StringFromCharCode.baseline
- -Intl-
-
-
-
-
- StringSubstring.js
- StringSubstring.baseline
- -Intl-
-
-
-
-
- switch.js
- switch.baseline
- -Intl-
-
-
-
-
- Switch2.js
- switch2.baseline
- -Intl-
-
-
-
-
- typeof.js
- typeof.baseline
- -Intl-
-
-
-
-
- typeofcombi.js
- typeofcombi.baseline
- -Intl-
-
-
-
-
- TypePromotion.js
- TypePromotion.baseline
- -Intl-
-
-
-
-
- UndefinedVsNull.js
- UndefinedVsNull.baseline
- -Intl-
-
-
-
-
- With.js
- With.baseline
-
-
-
-
- With.js
- With.baseline
- -force:deferparse
-
-
-
-
- With-defer-block-scope.js
- -force:deferparse
-
-
-
-
- withBug940841.js
- -MaxinterpretCount:1 -MaxSimpleJITRunCount:1
-
-
-
-
- withBug940841_2.js
- -MaxinterpretCount:0 -MaxSimpleJITRunCount:1
-
-
-
-
- With2.js
- With2.baseline
-
-
-
-
- witheval.js
- witheval.baseline
- -Intl-
-
-
-
-
- TernaryOperator.js
- TernaryOperator.baseline
- -Intl-
-
-
-
-
- DeleteProperty1.js
- DeleteProperty1.baseline
- -Intl-
-
-
-
-
- DeleteAndReAddNonExtensible.js
-
-
-
-
- Accessors.js
- Accessors.baseline
-
-
-
-
- DefProp.js
- DefProp.baseline
-
-
-
-
- scopedaccessors.js
- scopedaccessors.baseline
-
-
-
-
- flags.js
- flagsES5.baseline
-
-
-
-
- Branching.js
- Branching.baseline
- -Intl-
-
-
-
-
- inlinecache.js
- inlinecache.baseline
-
-
-
-
- scan.js
- scan.baseline
-
-
-
-
- enum.js
- enum.baseline
-
-
-
-
- with3.js
- with3.baseline
-
-
-
-
- cross_site_accessor_main.js
-
-
-
-
- bug650104.js
- bug650104.baseline
-
-
-
-
- SpecialSymbolCapture.js
- -args summary -endargs
-
-
-
+
+
+
+
+ Array.js
+ Array.baseline
+ -Intl-
+
+
+
+
+ ScriptFunctionToStrings.js
+ -args summary -endargs
+
+
+
+
+ DomProperties.js
+ -Intl-
+ Slow
+
+
+
+
+ ArrayConcat.js
+ ArrayConcat.baseline
+ -Intl-
+
+
+
+
+ arrayinit.js
+ arrayinit.baseline
+ -Intl-
+
+
+
+
+ IdsWithEscapes.js
+ IdsWithEscapes.baseline
+ -Intl-
+
+
+
+
+ ArrayResize.js
+ ArrayResize.baseline
+ -Intl-
+
+
+
+
+ DirectCall.js
+ DirectCall.baseline
+ -Intl-
+
+
+
+
+ equal.js
+ equal.baseline
+ -Intl-
+
+
+
+
+ equal_object.js
+ equal_object.baseline
+ -Intl-
+
+
+
+
+ label1.js
+ -Intl-
+
+
+
+
+ label1.js
+ -Force:Deferparse -Intl-
+
+
+
+
+ label2.js
+ label2.baseline
+ exclude_dynapogo
+ -Intl-
+
+
+
+
+ label2.js
+ label2.baseline
+ -Force:Deferparse -Intl-
+ exclude_dynapogo
+
+
+
+
+ label3.js
+ label3.baseline
+ exclude_dynapogo
+ -Intl-
+
+
+
+
+ label3.js
+ label3.baseline
+ -Force:Deferparse -Intl-
+ exclude_dynapogo
+
+
+
+
+ label4.js
+ label4.baseline
+ exclude_dynapogo
+ -Intl-
+
+
+
+
+ label4.js
+ label4.baseline
+ -Force:Deferparse -Intl-
+ exclude_dynapogo
+
+
+
+
+ label5.js
+ label5.baseline
+ exclude_dynapogo
+ -Intl-
+
+
+
+
+ label5.js
+ label5.baseline
+ -Force:Deferparse -Intl-
+ exclude_dynapogo
+
+
+
+
+ label6.js
+ label6.baseline
+ exclude_dynapogo
+ -Intl-
+
+
+
+
+ label6.js
+ label6.baseline
+ -Force:Deferparse -Intl-
+ exclude_dynapogo
+
+
+
+
+ Length.js
+ Length.baseline
+ -Intl-
+
+
+
+
+ Logical.js
+ Logical.baseline
+ -Intl-
+
+
+
+
+ ParameterOrder.js
+ ParameterOrder.baseline
+ -Intl-
+
+
+
+
+ Parameters.js
+ Parameters.baseline
+ -Intl-
+
+
+
+
+ StringCharCodeAt.js
+ StringCharCodeAt.baseline
+ -Intl-
+
+
+
+
+ StringField.js
+ StringField.baseline
+ -Intl-
+
+
+
+
+ StringFromCharCode.js
+ StringFromCharCode.baseline
+ -Intl-
+
+
+
+
+ StringSubstring.js
+ StringSubstring.baseline
+ -Intl-
+
+
+
+
+ switch.js
+ switch.baseline
+ -Intl-
+
+
+
+
+ Switch2.js
+ switch2.baseline
+ -Intl-
+
+
+
+
+ typeof.js
+ typeof.baseline
+ -Intl-
+
+
+
+
+ typeofcombi.js
+ typeofcombi.baseline
+ -Intl-
+
+
+
+
+ TypePromotion.js
+ TypePromotion.baseline
+ -Intl-
+
+
+
+
+ UndefinedVsNull.js
+ UndefinedVsNull.baseline
+ -Intl-
+
+
+
+
+ With.js
+ With.baseline
+
+
+
+
+ With.js
+ With.baseline
+ -force:deferparse
+
+
+
+
+ With-defer-block-scope.js
+ -force:deferparse
+
+
+
+
+ withBug940841.js
+ -MaxinterpretCount:1 -MaxSimpleJITRunCount:1
+
+
+
+
+ withBug940841_2.js
+ -MaxinterpretCount:0 -MaxSimpleJITRunCount:1
+
+
+
+
+ With2.js
+ With2.baseline
+
+
+
+
+ witheval.js
+ witheval.baseline
+ -Intl-
+
+
+
+
+ TernaryOperator.js
+ TernaryOperator.baseline
+ -Intl-
+
+
+
+
+ DeleteProperty1.js
+ DeleteProperty1.baseline
+ -Intl-
+
+
+
+
+ DeleteAndReAddNonExtensible.js
+
+
+
+
+ Accessors.js
+ Accessors.baseline
+
+
+
+
+ DefProp.js
+ DefProp.baseline
+
+
+
+
+ scopedaccessors.js
+ scopedaccessors.baseline
+
+
+
+
+ flags.js
+ flagsES5.baseline
+
+
+
+
+ Branching.js
+ Branching.baseline
+ -Intl-
+
+
+
+
+ inlinecache.js
+ inlinecache.baseline
+
+
+
+
+ scan.js
+ scan.baseline
+
+
+
+
+ enum.js
+ enum.baseline
+
+
+
+
+ with3.js
+ with3.baseline
+
+
+
+
+ cross_site_accessor_main.js
+
+
+
+
+ bug650104.js
+ bug650104.baseline
+
+
+
+
+ SpecialSymbolCapture.js
+ -args summary -endargs
+
+
+
diff --git a/deps/chakrashim/core/test/Bugs/rlexe.xml b/deps/chakrashim/core/test/Bugs/rlexe.xml
index 955d6252169..06443f1bcda 100644
--- a/deps/chakrashim/core/test/Bugs/rlexe.xml
+++ b/deps/chakrashim/core/test/Bugs/rlexe.xml
@@ -1,388 +1,388 @@
-
-
-
-
- bug602.js
- bug602_3.baseline
-
-
-
-
- bug764.js
- bug764.baseline
-
-
-
-
- withnonativeApplyOptimizationBug3433559.js
- -nonative
- BugFix
-
-
-
-
- Win8_486977_BranchStrictEqual.js
- Win8_486977_BranchStrictEqual.baseline
-
-
-
-
- Win8_459638.js
- Win8_459638.baseline
- exclude_x86,exclude_amd64
-
- -forceNative -off:simpleJit
-
-
-
-
- bug_OS_1197716.js
- -deferparse
- BugFix
-
-
-
-
- addexception.js
- addexception.baseline
-
-
-
-
- regalloc.js
- regalloc.baseline
-
-
-
-
- randombug.js
- randombug.baseline
- -ExtendedErrorStackForTestHost
-
- exclude_ccrobot
-
-
-
-
- blue_532460.js
- -MaxinterpretCount:1 -MaxSimpleJITRunCount:0 -loopinterpretcount:1 -force:deferparse
-
-
-
-
- bug56026.js
- Slow
-
-
-
-
- bug56026_minimal.js
-
-
-
-
- bug56026_minimalWithProperties.js
-
-
-
-
- bug56026_nested.js
-
-
-
-
- bug56026_trycatch.js
-
-
-
-
- blue_245702.js
- blue_245702.baseline
-
-
-
-
- -maxinterpretcount:2 -maxsimplejitruncount:5 -off:inline
- bug547302.js
- exclude_shp
-
-
-
-
- -maxinterpretcount:1 -maxsimplejitruncount:2 -MaxLinearStringCaseCount:2 -MaxLinearIntCaseCount:2 -forceserialized -MinSwitchJumpTableSize:3 -bgjit- -loopinterpretcount:1 -force:fieldhoist -force:polymorphicinlinecache -force:fieldcopyprop -sse:2 -force:interpreterautoprofile
- bug215238.mul-53-ovf.js
- bug215238.mul-53-ovf.baseline
-
-
-
-
- -maxinterpretcount:1 -maxsimplejitruncount:1 -MinSwitchJumpTableSize:3 -bgjit- -loopinterpretcount:1 -force:fieldhoist -force:rejit -force:ScriptFunctionWithInlineCache -force:fixdataprops
- bug215238-shrua.js
- bug215238-shrua.baseline
-
-
-
-
- -maxinterpretcount:1 -maxsimplejitruncount:1 -force:polymorphicinlinecache -MinSwitchJumpTableSize:2 -force:rejit -force:ScriptFunctionWithInlineCache -force:atom -off:ArrayCheckHoist -force:fixdataprops -ForceArrayBTree
- bug215238.shrua-2.js
- bug215238.shrua-2.baseline
-
-
-
-
- -maxinterpretcount:1 -off:simplejit
- bug435809.js
-
-
-
-
- -maxinterpretcount:1 -off:simplejit -force:fixdataprops
- bug594298.js
-
-
-
-
- -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:1 -maxinterpretcount:1 -force:inline
- bug661952.js
-
-
-
-
- -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:1 -maxinterpretcount:1 -force:deferparse -force:inline
- bug724121.js
-
-
-
-
- -maxinterpretcount:1 -force:fieldcopyprop -forceserialized
- deserializationbug339404.js
-
-
-
-
- bug843670.js
-
-
-
-
- bug934443.js
- -force:fieldcopyprop -off:dynamicprofile
-
-
-
-
- vso_os_1091425.js
-
-
-
-
- bug1092916.js
- -mic:1 -off:simplejit
-
-
-
-
- blue_1096569.js
- -MaxinterpretCount:2 -off:simplejit -force:Inline -off:insertnops
- blue_1096569.baseline
-
-
-
-
- blue_1086262.js
- -off:insertnops -bgjit- -fja:2 -off:simplejit -force:fieldcopyprop -off:aggressiveinttypespec
- blue_1086262.baseline
-
-
-
-
- bug1288931.js
- -mic:1 -off:simplejit -off:fastpath
-
-
-
-
- OS_1362136.js
- -mic:1 -off:simplejit -off:fastpath
- BugFix
-
-
-
-
- bug_OS_4683246.js
- exclude_dynapogo
- -loopinterpretcount:0 -args summary -endargs
-
-
-
-
- fabs1.js
- exclude_dynapogo,require_backend
- -off:backend -asmjs -testtrace:asmjs
- fabs1.baseline
-
-
-
-
- OS_5248645.js
- exclude_dynapogo
- -maxinterpretCount:2 -off:simplejit -off:dynamicProfile -args summary -endargs
-
-
-
-
- OS_5553123.js
-
-
-
-
- symbol_tostring.js
- -maxsimplejitruncount:1 -maxinterpretcount:1 -force:fieldcopyprop
-
-
-
-
- default_undodefer.js
- -forcedeferparse -forceundodefer
-
-
-
-
- Bug_resetisdead.js
- -on:prelowererpeeps
-
-
-
-
- bug_es5array.js
- -off:NativeArray -ForceES5Array
-
-
-
-
- simpletypehandler-property-deletion.js
- -ES6FunctionName -args summary -endargs
-
-
-
-
- HasOnlyWritableDataProperties-cross-context.js
- -nonative
-
-
-
-
- bug9080773.js
- -maxinterpretcount:1 -off:simplejit
-
-
-
-
- bug9080773_2.js
- -maxinterpretcount:1 -maxsimplejitruncount:1
-
-
-
-
- bug8554038.js
- bug8554038.baseline
- -maxinterpretcount:1 -off:simplejit
-
-
-
-
- invertloop_bug.js
- exclude_dynapogo
-
-
-
-
- typespec_bug.js
- -maxinterpretcount:1 -maxsimplejitruncount:1 -bgjit-
-
-
-
-
- deletenonconfig.js
- -args summary -endargs
-
-
-
-
- bug10191241.js
- -forceundodefer
-
-
-
-
- json_bugs.js
- -args summary -endargs
-
-
-
-
- bug10191241.js
- -forceundodefer
-
-
-
-
- InlineFunctionParameterWithInfiniteLoop.js
- -maxinterpretcount:1 -off:simplejit
-
-
-
-
- Math.abs_TypeSpecOnIntMin.js
- -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:1 -maxinterpretcount:1 -oopjit-
-
-
-
-
- bug10026875.js
- bug10026875.baseline
- -maxinterpretcount:1 -off:simplejit
-
-
-
-
- MissToGenerateStStSlotForJITLoopBody.js
- -mic:1 -off:simplejit -oopjit- -bgjit-
-
-
-
-
- cmpfgpeep.js
- -maxsimplejitruncount:1 -maxinterpretcount:1
-
-
-
-
- bug11026788.js
-
-
-
-
- bug11576900.js
- -lic:1 -bgjit-
- exclude_dynapogo
-
-
-
-
- bug12628506.js
- -loopinterpretcount:1
-
-
-
-
- bug13213828.js
- -mic:1 -off:simplejit
-
-
-
-
- valueInfoLossBug.js
-
-
-
+
+
+
+
+ bug602.js
+ bug602_3.baseline
+
+
+
+
+ bug764.js
+ bug764.baseline
+
+
+
+
+ withnonativeApplyOptimizationBug3433559.js
+ -nonative
+ BugFix
+
+
+
+
+ Win8_486977_BranchStrictEqual.js
+ Win8_486977_BranchStrictEqual.baseline
+
+
+
+
+ Win8_459638.js
+ Win8_459638.baseline
+ exclude_x86,exclude_amd64
+
+ -forceNative -off:simpleJit
+
+
+
+
+ bug_OS_1197716.js
+ -deferparse
+ BugFix
+
+
+
+
+ addexception.js
+ addexception.baseline
+
+
+
+
+ regalloc.js
+ regalloc.baseline
+
+
+
+
+ randombug.js
+ randombug.baseline
+ -ExtendedErrorStackForTestHost
+
+ exclude_ccrobot
+
+
+
+
+ blue_532460.js
+ -MaxinterpretCount:1 -MaxSimpleJITRunCount:0 -loopinterpretcount:1 -force:deferparse
+
+
+
+
+ bug56026.js
+ Slow
+
+
+
+
+ bug56026_minimal.js
+
+
+
+
+ bug56026_minimalWithProperties.js
+
+
+
+
+ bug56026_nested.js
+
+
+
+
+ bug56026_trycatch.js
+
+
+
+
+ blue_245702.js
+ blue_245702.baseline
+
+
+
+
+ -maxinterpretcount:2 -maxsimplejitruncount:5 -off:inline
+ bug547302.js
+ exclude_shp
+
+
+
+
+ -maxinterpretcount:1 -maxsimplejitruncount:2 -MaxLinearStringCaseCount:2 -MaxLinearIntCaseCount:2 -forceserialized -MinSwitchJumpTableSize:3 -bgjit- -loopinterpretcount:1 -force:fieldhoist -force:polymorphicinlinecache -force:fieldcopyprop -sse:2 -force:interpreterautoprofile
+ bug215238.mul-53-ovf.js
+ bug215238.mul-53-ovf.baseline
+
+
+
+
+ -maxinterpretcount:1 -maxsimplejitruncount:1 -MinSwitchJumpTableSize:3 -bgjit- -loopinterpretcount:1 -force:fieldhoist -force:rejit -force:ScriptFunctionWithInlineCache -force:fixdataprops
+ bug215238-shrua.js
+ bug215238-shrua.baseline
+
+
+
+
+ -maxinterpretcount:1 -maxsimplejitruncount:1 -force:polymorphicinlinecache -MinSwitchJumpTableSize:2 -force:rejit -force:ScriptFunctionWithInlineCache -force:atom -off:ArrayCheckHoist -force:fixdataprops -ForceArrayBTree
+ bug215238.shrua-2.js
+ bug215238.shrua-2.baseline
+
+
+
+
+ -maxinterpretcount:1 -off:simplejit
+ bug435809.js
+
+
+
+
+ -maxinterpretcount:1 -off:simplejit -force:fixdataprops
+ bug594298.js
+
+
+
+
+ -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:1 -maxinterpretcount:1 -force:inline
+ bug661952.js
+
+
+
+
+ -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:1 -maxinterpretcount:1 -force:deferparse -force:inline
+ bug724121.js
+
+
+
+
+ -maxinterpretcount:1 -force:fieldcopyprop -forceserialized
+ deserializationbug339404.js
+
+
+
+
+ bug843670.js
+
+
+
+
+ bug934443.js
+ -force:fieldcopyprop -off:dynamicprofile
+
+
+
+
+ vso_os_1091425.js
+
+
+
+
+ bug1092916.js
+ -mic:1 -off:simplejit
+
+
+
+
+ blue_1096569.js
+ -MaxinterpretCount:2 -off:simplejit -force:Inline -off:insertnops
+ blue_1096569.baseline
+
+
+
+
+ blue_1086262.js
+ -off:insertnops -bgjit- -fja:2 -off:simplejit -force:fieldcopyprop -off:aggressiveinttypespec
+ blue_1086262.baseline
+
+
+
+
+ bug1288931.js
+ -mic:1 -off:simplejit -off:fastpath
+
+
+
+
+ OS_1362136.js
+ -mic:1 -off:simplejit -off:fastpath
+ BugFix
+
+
+
+
+ bug_OS_4683246.js
+ exclude_dynapogo
+ -loopinterpretcount:0 -args summary -endargs
+
+
+
+
+ fabs1.js
+ exclude_dynapogo,require_backend
+ -off:backend -asmjs -testtrace:asmjs
+ fabs1.baseline
+
+
+
+
+ OS_5248645.js
+ exclude_dynapogo
+ -maxinterpretCount:2 -off:simplejit -off:dynamicProfile -args summary -endargs
+
+
+
+
+ OS_5553123.js
+
+
+
+
+ symbol_tostring.js
+ -maxsimplejitruncount:1 -maxinterpretcount:1 -force:fieldcopyprop
+
+
+
+
+ default_undodefer.js
+ -forcedeferparse -forceundodefer
+
+
+
+
+ Bug_resetisdead.js
+ -on:prelowererpeeps
+
+
+
+
+ bug_es5array.js
+ -off:NativeArray -ForceES5Array
+
+
+
+
+ simpletypehandler-property-deletion.js
+ -ES6FunctionName -args summary -endargs
+
+
+
+
+ HasOnlyWritableDataProperties-cross-context.js
+ -nonative
+
+
+
+
+ bug9080773.js
+ -maxinterpretcount:1 -off:simplejit
+
+
+
+
+ bug9080773_2.js
+ -maxinterpretcount:1 -maxsimplejitruncount:1
+
+
+
+
+ bug8554038.js
+ bug8554038.baseline
+ -maxinterpretcount:1 -off:simplejit
+
+
+
+
+ invertloop_bug.js
+ exclude_dynapogo
+
+
+
+
+ typespec_bug.js
+ -maxinterpretcount:1 -maxsimplejitruncount:1 -bgjit-
+
+
+
+
+ deletenonconfig.js
+ -args summary -endargs
+
+
+
+
+ bug10191241.js
+ -forceundodefer
+
+
+
+
+ json_bugs.js
+ -args summary -endargs
+
+
+
+
+ bug10191241.js
+ -forceundodefer
+
+
+
+
+ InlineFunctionParameterWithInfiniteLoop.js
+ -maxinterpretcount:1 -off:simplejit
+
+
+
+
+ Math.abs_TypeSpecOnIntMin.js
+ -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:1 -maxinterpretcount:1 -oopjit-
+
+
+
+
+ bug10026875.js
+ bug10026875.baseline
+ -maxinterpretcount:1 -off:simplejit
+
+
+
+
+ MissToGenerateStStSlotForJITLoopBody.js
+ -mic:1 -off:simplejit -oopjit- -bgjit-
+
+
+
+
+ cmpfgpeep.js
+ -maxsimplejitruncount:1 -maxinterpretcount:1
+
+
+
+
+ bug11026788.js
+
+
+
+
+ bug11576900.js
+ -lic:1 -bgjit-
+ exclude_dynapogo
+
+
+
+
+ bug12628506.js
+ -loopinterpretcount:1
+
+
+
+
+ bug13213828.js
+ -mic:1 -off:simplejit
+
+
+
+
+ valueInfoLossBug.js
+
+
+
diff --git a/deps/chakrashim/core/test/DebuggerCommon/rlexe.xml b/deps/chakrashim/core/test/DebuggerCommon/rlexe.xml
index e53d88fe553..80da182e6c5 100644
--- a/deps/chakrashim/core/test/DebuggerCommon/rlexe.xml
+++ b/deps/chakrashim/core/test/DebuggerCommon/rlexe.xml
@@ -1,1373 +1,1373 @@
-
-
-
-
- arguments_mapES6_attach.js
- -dbgbaseline:arguments_mapES6_attach.js.dbg.baseline
- arguments_mapES6_attach.js.baseline
-
-
-
-
- blockscope_fastdebug_ES5.js
- -dbgbaseline:blockscope_fastdebug_ES5.js.dbg.baseline
- blockscope_fastdebug_ES5.js.baseline
-
-
-
-
- blockscope_fastdebug_ES6.js
- -dbgbaseline:blockscope_fastdebug_ES6.js.dbg.baseline
- blockscope_fastdebug_ES6.js.baseline
-
-
-
-
- blockscope_func_insidescopes.js
- -dbgbaseline:blockscope_func_insidescopes.js.dbg.baseline -Intl-
- blockscope_func_insidescopes.js.baseline
-
-
-
-
- -debuglaunch -dbgbaseline:IntlInit.js.dbg.baseline -Intl
- IntlInit.js
-
- require_winglob,exclude_xplat,Intl
-
-
-
-
- ES6_intl_stepinto.js
- -dbgbaseline:ES6_intl_stepinto.js.dbg.baseline -Intl
-
- require_winglob,exclude_xplat,Intl
-
-
-
-
- ES6_letconst_const_reassignment_fnscope.js
- -dbgbaseline:ES6_letconst_const_reassignment_fnscope.js.dbg.baseline
- ES6_letconst_const_reassignment_fnscope.js.baseline
-
-
-
-
- ES6_letconst_eval_strict_fn.js
- -dbgbaseline:ES6_letconst_eval_strict_fn.js.dbg.baseline
- ES6_letconst_eval_strict_fn.js.baseline
-
-
-
-
- ES6_letconst_redeclaration_indebugger.js
- -dbgbaseline:ES6_letconst_redeclaration_indebugger.js.dbg.baseline
- ES6_letconst_redeclaration_indebugger.js.baseline
-
-
-
-
- ES6_letconst_shadow_evaluation.js
- -dbgbaseline:ES6_letconst_shadow_evaluation.js.dbg.baseline
-
-
-
-
- ES6_letconst_shadow_eval_with.js
- -dbgbaseline:ES6_letconst_shadow_eval_with.js.dbg.baseline -Intl-
- ES6_letconst_shadow_eval_with.js.baseline
-
-
-
-
- es6_forof_decl.js
- -debuglaunch -ES6 -dbgbaseline:es6_forof_decl.js.dbg.baseline
- es6_forof_decl.js.baseline
-
-
-
-
- es6_forof_decl-2.js
- -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-2.js.dbg.baseline
- es6_forof_decl-2.js.baseline
-
-
-
-
- es6_forof_decl-3.js
- -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-3.js.dbg.baseline
- es6_forof_decl-3.js.baseline
-
-
-
-
- es6_forof_decl-4.js
- -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-4.js.dbg.baseline
- es6_forof_decl-4.js.baseline
-
-
-
-
- es6_forof_decl-5.js
- -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-5.js.dbg.baseline
- es6_forof_decl-5.js.baseline
-
-
-
-
- es6_forof_decl-6.js
- -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-6.js.dbg.baseline
- es6_forof_decl-6.js.baseline
-
-
-
-
- frames_values_mapES6.js
- -dbgbaseline:frames_values_mapES6.js.dbg.baseline -Intl-
- frames_values_mapES6.js.baseline
-
-
-
-
- step_in_ES6_attach.js
- -dbgbaseline:step_in_ES6_attach.js.dbg.baseline -Intl-
-
-
-
-
- step_in_from_interpreted_function_attach.js
- -dbgbaseline:step_in_from_interpreted_function_attach.js.dbg.baseline -Intl-
-
-
-
-
- step_in_from_JITted_function_attach.js
- -dbgbaseline:step_in_from_JITted_function_attach.js.dbg.baseline
-
-
-
-
- step_in_only_debugJIT_attach.js
- -dbgbaseline:step_in_only_debugJIT_attach.js.dbg.baseline -maxinterpretcount:1 -off:simpleJit
- step_in_only_debugJIT_attach.js.baseline
-
-
-
-
- step_out_direct_attach.js
- -dbgbaseline:step_out_direct_attach.js.dbg.baseline -Intl-
-
-
-
-
- step_out_ES5.js
- -dbgbaseline:step_out_ES5.js.dbg.baseline
-
-
-
-
- step_out_ES6.js
- -InspectMaxStringLength:33 -dbgbaseline:step_out_ES6.js.dbg.baseline -Intl-
- step_out_ES6.js.baseline
-
-
-
-
- step_out_from_catch_attach.js
- -dbgbaseline:step_out_from_catch_attach.js.dbg.baseline -Intl-
- step_out_from_catch_attach.js.baseline
-
-
-
-
- step_out_from_interpreted_function_attach.js
- -dbgbaseline:step_out_from_interpreted_function_attach.js.dbg.baseline -Intl-
-
-
-
-
- step_out_from_JITted_function_attach.js
- -dbgbaseline:step_out_from_JITted_function_attach.js.dbg.baseline -Intl-
-
-
-
-
- step_out_only_debugJIT_attach.js
- -dbgbaseline:step_out_only_debugJIT_attach.js.dbg.baseline
-
-
-
-
- step_over_ES6_attach.js
- -dbgbaseline:step_over_ES6_attach.js.dbg.baseline -Intl-
-
-
-
-
- step_over_JITd_fn_from_Intrprt_fn_attach.js
- -dbgbaseline:step_over_JITd_fn_from_Intrprt_fn_attach.js.dbg.baseline -Intl-
-
-
-
-
- TempStrExpr.js
- -debuglaunch -ES6 -ES6ObjectLiterals -dbgbaseline:TempStrExpr.js.dbg.baseline
- TempStrExpr.js.baseline
-
-
-
-
- ES6_intl_simple_attach.js
- -dbgbaseline:ES6_intl_simple_attach.js.dbg.baseline -Intl
- ES6_intl_simple_attach.js.baseline
-
- require_winglob,exclude_xplat,Intl
-
-
-
-
- frames_inspection_arrayES5.js
- -debuglaunch -dbgbaseline:frames_inspection_arrayES5.js.dbg.baseline
- frames_inspection_arrayES5.js.baseline
-
-
-
-
- shadow_with.js
- -debuglaunch -dbgbaseline:shadow_with.js.dbg.baseline -Intl-
- shadow_with.js.baseline
-
-
-
-
- blockscope_func_declaration_ES6.js
- -debuglaunch -dbgbaseline:blockscope_func_declaration_ES6.js.dbg.baseline -Intl-
- blockscope_func_declaration_ES6.js.baseline
-
-
-
-
- blockscope_func_expression_ES6.js
- -debuglaunch -es6functionnamefull -dbgbaseline:blockscope_func_expression_ES6.js.dbg.baseline -Intl-
- blockscope_func_expression_ES6.js.baseline
-
-
-
-
- ES6_letconst_eval_nonstrict.js
- -debuglaunch -dbgbaseline:ES6_letconst_eval_nonstrict.js.dbg.baseline -Intl-
- ES6_letconst_eval_nonstrict.js.baseline
-
-
-
-
- ES6_letconst_for.js
- -debuglaunch -dbgbaseline:ES6_letconst_for.js.dbg.baseline -Intl-
-
-
-
-
- ES6_letconst_trycatch_simple_fast.js
- -debuglaunch -dbgbaseline:ES6_letconst_trycatch_simple_fast.js.dbg.baseline -Intl-
-
-
-
-
- ES6_proto_chained.js
- -debuglaunch -dbgbaseline:ES6_proto_chained.js.dbg.baseline -Intl- -disableDebugObject
-
-
-
-
- ES6_proto_simple.js
- -debuglaunch -dbgbaseline:ES6_proto_simple.js.dbg.baseline -Intl-
-
-
-
-
- ES6_proto_userDefinedObject.js
- -debuglaunch -dbgbaseline:ES6_proto_userDefinedObject.js.dbg.baseline -Intl-
-
-
-
-
- ES6_intl_stepinto_libexpandos.js
- -debuglaunch -dbgbaseline:ES6_intl_stepinto_libexpandos.js.dbg.baseline -Intl
-
- require_winglob,exclude_xplat,Intl
-
-
-
-
- ES6_letconst_forin.js
- -debuglaunch -dbgbaseline:ES6_letconst_forin.js.dbg.baseline -Intl
-
-
-
-
- ES6_letconst_const_usebeforedeclaration.js
- -debuglaunch -dbgbaseline:ES6_letconst_const_usebeforedeclaration.js.dbg.baseline
-
-
-
-
- ES6_proto_invalidation.js
- -debuglaunch -dbgbaseline:ES6_proto_invalidation.js.dbg.baseline
-
-
-
-
- frames_letconst_reassignobjects_ES6.js
- -debuglaunch -dbgbaseline:frames_letconst_reassignobjects_ES6.js.dbg.baseline
-
-
-
-
- ES6_letconst_const_reassignment_globalscope.js
- -debuglaunch -dbgbaseline:ES6_letconst_const_reassignment_globalscope.js.dbg.baseline -Intl-
- ES6_letconst_const_reassignment_globalscope.js.baseline
-
-
-
-
- ES6_letconst_redcl.js
- -debuglaunch -dbgbaseline:ES6_letconst_redcl.js.dbg.baseline -Intl-
- ES6_letconst_redcl.js.baseline
-
-
-
-
- native_array.js
- -debuglaunch -dbgbaseline:native_array.js.dbg.baseline
- native_array.js.baseline
-
-
-
-
- argument_disp.js
- -debuglaunch -dbgbaseline:argument_disp.js.dbg.baseline -Intl-
- argument_disp.js.baseline
-
-
-
-
- multiple_argumentsdisp_safeguard.js
- -debuglaunch -dbgbaseline:multiple_argumentsdisp_safeguard.js.dbg.baseline -Intl-
- multiple_argumentsdisp_safeguard.js.baseline
-
-
-
-
- level_1.js
- -debuglaunch -dbgbaseline:level_1.js.dbg.baseline
-
-
-
-
- ES6_spread.js
- -debuglaunch -dbgbaseline:ES6_spread.js.dbg.baseline -es6spread -nonative
- exclude_dynapogo
-
-
-
-
- specialproperties_fn.js
- -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:specialproperties_fn.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- ES6_RegExp_specialproperties.js
- -ES6Unicode- -ES6RegExSticky- -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_default.js.dbg.baseline
-
-
-
-
- ES6_RegExp_specialproperties.js
- -ES6Unicode -ES6RegExSticky- -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_with_unicode.js.dbg.baseline
-
-
-
-
- ES6_RegExp_specialproperties.js
- -ES6Unicode- -ES6RegExSticky -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_with_sticky.js.dbg.baseline
-
-
-
-
- ES6_RegExp_specialproperties.js
- -ES6Unicode -ES6RegExSticky -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_all.js.dbg.baseline
-
-
-
-
- specialproperties_level2.js
- -debuglaunch -es6functionnamefull -inspectmaxstringlength:256 -dbgbaseline:specialproperties_level2.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- testdynamicattach1.js
- -dbgbaseline:testdynamicattach1.js.dbg.baseline -DeferLoadingAvailableSource
- testdynamicattach1.baseline
-
-
-
-
- testdynamicattach1.js
- -dbgbaseline:testdynamicattach1.js.dbg.baseline -Intl- -DeferLoadingAvailableSource
- testdynamicattach1.baseline
-
-
-
-
- targeted.js
- -debuglaunch -dbgbaseline:targeted.js.dbg.baseline -DeferLoadingAvailableSource
- targeted.baseline
-
-
-
-
- protoTest2.js
- -debuglaunch -dbgbaseline:protoTest2.js.dbg.baseline
-
-
-
-
- testdynamicattach2.js
- -dbgbaseline:testdynamicattach2.js.dbg.baseline
- testdynamicattach2.baseline
-
-
-
-
- deferParseDetach.js
- -force:deferparse -dbgbaseline:deferParseDetach.js.dbg.baseline
-
-
-
-
- deferParseDetach2.js
- -force:deferparse -dbgbaseline:deferParseDetach2.js.dbg.baseline
-
-
-
-
- attachWithDeferParse.js
- -force:deferparse -dbgbaseline:attachWithDeferParse.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- array_prototest.js
- -debuglaunch -dbgbaseline:array_prototest.js.dbg.baseline
-
-
-
-
- breakpoints.js
- -debuglaunch -dbgbaseline:breakpoints.js.dbg.baseline
- exclude_jsrt,exclude_dynapogo
-
-
-
-
- indexprop.js
- -debuglaunch -dbgbaseline:indexprop.js.dbg.baseline
-
-
-
-
- funcSource.js
- -inspectmaxstringlength:100 -debuglaunch -dbgbaseline:funcSource.js.dbg.baseline
-
-
-
-
- evaluate.js
- -debuglaunch -dbgbaseline:evaluate.js.dbg.baseline -InspectMaxStringLength:100
-
-
-
-
- attachAfterException.js
- -dbgbaseline:attachAfterException.js.dbg.baseline
-
-
-
-
- catchInspection.js
- -debuglaunch -dbgbaseline:catchInspection.js.dbg.baseline
-
-
-
-
- funcExprName.js
- -debuglaunch -dbgbaseline:funcExprName.js.dbg.baseline
-
-
-
-
- attachdetach-delaycapture.js
- -dbgbaseline:attachdetach-delaycapture.js.dbg.baseline
-
- BugFix,exclude_xplat
-
-
-
-
- globalFuncVars.js
- -debuglaunch -dbgbaseline:globalFuncVars.js.dbg.baseline
-
-
-
-
- blockScopeSlotArrayCaptureAttach.js
- -InspectMaxStringLength:33 -dbgbaseline:blockScopeSlotArrayCaptureAttach.js.dbg.baseline
-
-
-
-
- blockScopeSlotArrayCapture.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeSlotArrayCapture.js.dbg.baseline
-
-
-
-
- blockScopeActivationObjectCapture.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeActivationObjectCapture.js.dbg.baseline
-
-
-
-
- blockScopeBasicLetConstTest.js
- -debuglaunch -dbgbaseline:blockScopeBasicLetConstTest.js.dbg.baseline
-
-
-
-
- blockScopeActivationObjectAsSlotArray.js
- -InspectMaxStringLength:150 -debuglaunch -dbgbaseline:blockScopeActivationObjectAsSlotArray.js.dbg.baseline
-
-
-
-
- blockScopeBasicScopingTest.js
- -debuglaunch -dbgbaseline:blockScopeBasicScopingTest.js.dbg.baseline
-
-
-
-
- blockScopeForTest.bug183991.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeForTest.bug183991.js.dbg.baseline
-
-
-
-
- blockScopeNestedFunctionTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeNestedFunctionTest.js.dbg.baseline
-
-
-
-
- blockScopeDeadZoneTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeDeadZoneTest.js.dbg.baseline
-
-
-
-
- blockScopeEvalTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeEvalTest.js.dbg.baseline
-
-
-
-
- blockScopeGlobalTest.js
- -debuglaunch -dbgbaseline:blockScopeGlobalTest.js.dbg.baseline
-
-
-
-
- blockScopeForTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeForTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeWithTest.js
- -debuglaunch -dbgbaseline:blockScopeWithTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeSwitchTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeSwitchTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeActivationObjectDeadZoneTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeActivationObjectDeadZoneTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeRegSlotDeadZoneTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeRegSlotDeadZoneTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeSlotArrayDeadZoneTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeSlotArrayDeadZoneTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeGlobalDeadZoneTest.js
- -debuglaunch -dbgbaseline:blockScopeGlobalDeadZoneTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeGlobalBlockTest.js
- -debuglaunch -dbgbaseline:blockScopeGlobalBlockTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeSlotArrayTest.js
- -dbgbaseline:blockScopeSlotArrayTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeSlotArrayTest.js
- -forceserialized -dbgbaseline:blockScopeSlotArrayTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeSlotArraySiblingTest.js
- -debuglaunch -dbgbaseline:blockScopeSlotArraySiblingTest.js.dbg.baseline
-
-
-
-
- blockScopeGlobalSlotArrayTest.bug222631.js
- -debuglaunch -dbgbaseline:blockScopeGlobalSlotArrayTest.bug222631.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeSibling.bug263635.js
- -debuglaunch -dbgbaseline:blockScopeSibling.bug263635.js.dbg.baseline
-
-
-
-
- blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js
- -dbgbaseline:blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeFunctionDeclarationRegSlotTest.js
- -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationRegSlotTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeFunctionDeclarationSlotArrayTest.js
- -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationSlotArrayTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeFunctionDeclarationActivationObjectTest.js
- -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationActivationObjectTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeFunctionDeclarationGlobalTest.js
- -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationGlobalTest.js.dbg.baseline -Intl- -InspectMaxStringLength:100
-
-
-
-
- blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js
- -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js
- -debuglaunch -InspectMaxStringLength:33 -dbgbaseline:blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeFunctionRedeclarationTest.js
- -debuglaunch -dbgbaseline:blockScopeFunctionRedeclarationTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeFunctionRedeclaration_blue523098.js
- -debuglaunch -dbgbaseline:blockScopeFunctionRedeclaration_blue523098.js.dbg.baseline
-
-
-
-
- disablebp.js
- -debuglaunch -dbgbaseline:disablebp.js.dbg.baseline
-
-
-
-
- disablebp2.js
- -debuglaunch -dbgbaseline:disablebp2.js.dbg.baseline
-
-
-
-
- setframe.js
- -EnableJitInDiagMode -debuglaunch -dbgbaseline:setframe.js.dbg.baseline -Intl-
-
-
-
-
- funcExprCrash_150491.js
- -force:deferparse -dbgbaseline:funcExprCrash_150491.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- JIT_localsAtNativeFrame1.js
- -forceNative -off:simpleJit -EnableJitInDiagMode -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame1.js.dbg.baseline
- exclude_dynapogo,exclude_arm,exclude_nonative
-
-
-
-
- JIT_localsAtNativeFrame2.js
- -forceNative -off:simpleJit -EnableJitInDiagMode -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame2.js.dbg.baseline
- exclude_dynapogo,exclude_arm,exclude_nonative
-
-
-
-
- bug594394.js
- -DebugLaunch -dbgbaseline:bug594394.js.dbg.baseline
- bug594394.baseline
-
-
-
-
- FastF12_BOBranch.js
- -debuglaunch -maxinterpretcount:1 -off:simpleJit -dbgbaseline:FastF12_BOBranch.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- negzerotest.js
- -debuglaunch -dbgbaseline:negzerotest.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- detachBasicTest.js
- -dbgbaseline:detachBasicTest.js.dbg.baseline -Intl-
-
-
-
-
- detachBasicTest.js
- -dbgbaseline:detachBasicTest.js.dbg.baseline -Intl-
-
-
-
-
- testdynamicdetach1.js
- -dbgbaseline:testdynamicdetach1.js.dbg.baseline -Intl-
- testdynamicdetach1.baseline
-
-
-
-
- -debuglaunch -nonative -dbgbaseline:jitStepping2.js.dbg.baseline
- jitStepping2.js
- exclude_dynapogo
-
-
-
-
- -debuglaunch -forcenative -dbgbaseline:jitStepping2.js.dbg.baseline
- jitStepping2.js
- exclude_dynapogo
-
-
-
-
- jit_exprEval1.js
- -EnableJitInDiagMode -debuglaunch -es6functionnamefull -forceNative -off:simpleJit -dbgbaseline:jit_exprEval1.js.dbg.baseline -Intl-
- exclude_dynapogo,exclude_nonative
-
-
-
-
- jit_editvalue1.js
- -EnableJitInDiagMode -es6functionnamefull -debuglaunch -forceNative -off:simpleJit -dbgbaseline:jit_editvalue1.js.dbg.baseline
- exclude_dynapogo,exclude_nonative
-
-
-
-
- jitAttach.js
- -maxinterpretcount:1 -off:simpleJit -EnableJitInDiagMode -dbgbaseline:jitAttach.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- stringkeyedtypehandler.js
- -debuglaunch -dbgbaseline:stringkeyedtypehandler.js.dbg.baseline -DeletedPropertyReuseThreshold:1
-
-
-
-
- functionNameShowsInScopeGroupTest.bug157127.js
- -debuglaunch -dbgbaseline:functionNameShowsInScopeGroupTest.bug157127.js.dbg.baseline
-
-
-
-
- functionNameShowsInNestedScopeGroupTest.js
- -debuglaunch -dbgbaseline:functionNameShowsInNestedScopeGroupTest.js.dbg.baseline
-
-
-
-
- blockScopeExpressionNoWriteOfConst.js
- -debuglaunch -dbgbaseline:blockScopeExpressionNoWriteOfConst.js.dbg.baseline
-
-
-
-
- blockScopeRegSlotShadowingExpressionEvaluationTest.js
- -debuglaunch -dbgbaseline:blockScopeRegSlotShadowingExpressionEvaluationTest.js.dbg.baseline -Intl-
-
-
-
-
- blockScopeExpressionSimpleDeadZoneTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeExpressionSimpleDeadZoneTest.js.dbg.baseline
-
-
-
-
- blockScopeExpressionEquationDeadZoneTest.js
- -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeExpressionEquationDeadZoneTest.js.dbg.baseline
-
-
-
-
- blockScopeTryCatchTest.js
- -debuglaunch -dbgbaseline:blockScopeTryCatchTest.js.dbg.baseline -Intl-
-
-
-
-
- localsInspectionOnNonTopFrameInBlockTest.bug163347.js
- -debuglaunch -dbgbaseline:localsInspectionOnNonTopFrameInBlockTest.bug163347.js.dbg.baseline -Intl-
-
-
-
-
- jitAttach.js
- -maxinterpretcount:1 -off:simpleJit -EnableJitInDiagMode -dbgbaseline:jitAttach.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- getterInspection.js
- -debuglaunch -dbgbaseline:getterInspection.js.dbg.baseline
-
-
-
-
- promise_deferNestedAttach.js
- -es6functionnamefull -dbgbaseline:promise_deferNestedAttach.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- promise_deferNestedAttach.js
- -ForceStaticInterpreterThunk -es6functionnamefull -dbgbaseline:promise_deferNestedAttach.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_222633.js
- -debuglaunch -dbgbaseline:bug_222633.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_149118.js
- -force:deferparse -dbgbaseline:bug_149118.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_149118.js
- -force:deferparse -dbgbaseline:bug_149118.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_204064.js
- -dbgbaseline:bug_204064.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_177146.js
- -debuglaunch -dbgbaseline:bug_177146.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- bug_177146.js
- -debuglaunch -dbgbaseline:bug_177146.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- bug_256729.js
- -debuglaunch -dbgbaseline:bug_256729.js.dbg.baseline
- exclude_dynapogo,exclude_nonative
-
-
-
-
- bug_266843.js
- -debuglaunch -maxinterpretcount:1 -off:simpleJit -dbgbaseline:bug_266843.js.dbg.baseline
- bug_266843.baseline
- exclude_dynapogo
-
-
-
-
- bug_350674.js
- -debuglaunch -forceNative -off:simpleJit -dbgbaseline:bug_350674.js.dbg.baseline
-
-
-
-
- with_shadow.js
- -debuglaunch -InspectMaxStringLength:100 -dbgbaseline:with_shadow.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- var_shadow.js
- -debuglaunch -dbgbaseline:var_shadow.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- arraytoes5array.js
- -debuglaunch -dbgbaseline:arraytoes5array.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- propertyEnumeration.bug241480.js
- -dbgbaseline:propertyEnumeration.bug241480.js.dbg.baseline -debuglaunch
-
-
-
-
- bug_271356.js
- -debuglaunch -maxinterpretcount:4 -off:simpleJit -dbgbaseline:bug_271356.js.dbg.baseline
- bug_271356.js.baseline
- exclude_dynapogo
-
-
-
-
- bug_291582.js
- -debuglaunch -dbgbaseline:bug_291582.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- bug_355097.js
- -force:deferparse -dbgbaseline:bug_355097.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- bug_301517.js
- -dbgbaseline:bug_301517.js.dbg.baseline -Intl-
- exclude_dynapogo
-
-
-
-
- bug_325839.js
- -debuglaunch -forceNative -off:simpleJit -dbgbaseline:bug_325839.js.dbg.baseline
- bug_325839.baseline
- exclude_dynapogo,exclude_nonative
-
-
-
-
- deferParse_210165.js
- -dbgbaseline:deferParse_210165.js.dbg.baseline
- deferParse_210165.baseline
-
-
-
-
- qualified_names1.js
- -debuglaunch -dbgbaseline:qualified_names1.js.dbg.baseline -Intl-
-
-
-
-
- qualified_names2.js
- -debuglaunch -dbgbaseline:qualified_names2.js.dbg.baseline -es6classes -Intl-
-
-
-
-
- evalDetection.js
- -dbgbaseline:evalDetection.js.dbg.baseline
-
-
-
-
- bug_507528.js
- -debuglaunch -Intl- -dbgbaseline:emptyJson.dbg.baseline
- bug_507528.baseline
-
-
-
-
- bug_543550.js
- -debuglaunch -inspectmaxstringlength:110 -dbgbaseline:bug_543550.js.dbg.baseline
-
-
-
-
- bug_523101.js
- -debuglaunch -dbgbaseline:bug_523101.js.dbg.baseline
-
-
-
-
- symbols.js
- -ES6Species -debuglaunch -dbgbaseline:symbols.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- qualified_names5.js
- -debuglaunch -dbgbaseline:qualified_names5.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_538163.js
- -debuglaunch -dbgbaseline:bug_538163.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_575634.js
- -debuglaunch -dbgbaseline:bug_575634.js.dbg.baseline
-
-
-
-
- nested_eval.js
- -debuglaunch -dbgbaseline:nested_eval.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_592506.js
- -debuglaunch -dbgbaseline:bug_592506.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- permanentArguments.js
- -forcenative -debuglaunch -dbgbaseline:permanentArguments.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- sourceInfoMismatch.js
- -Force:Deferparse -ForceUndoDefer -dbgbaseline:emptyJson.dbg.baseline
- exclude_dynapogo
-
-
-
-
- spread_debugging.js
- -ES6Spread -DebugLaunch -InspectMaxStringLength:100 -dbgbaseline:spread_debugging.js.dbg.baseline
- exclude_serialized
-
-
-
-
- bug_622304.js
- -debuglaunch -dbgbaseline:bug_622304.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- returnedvaluetests.js
- -debugLaunch -dbgbaseline:returnedvaluetests.js.dbg.baseline
- exclude_dynapogo,exclude_serialized
-
-
-
-
- returnedvaluetests1.js
- -dbgbaseline:returnedvaluetests1.js.dbg.baseline
-
- exclude_dynapogo,exclude_serialized,exclude_xplat
-
-
-
-
- returnedvaluetests2.js
- -debugLaunch -dbgbaseline:returnedvaluetests2.js.dbg.baseline
-
- exclude_dynapogo,exclude_serialized,exclude_xplat
-
-
-
-
- delaycapture.js
- -dbgbaseline:delaycapture.js.dbg.baseline
- exclude_dynapogo,exclude_serialized
-
-
-
-
- returnedvaluetests3.js
- -debugLaunch -dbgbaseline:returnedvaluetests3.js.dbg.baseline
- exclude_dynapogo,exclude_serialized
-
-
-
-
- returnedvaluetests4.js
- -dbgbaseline:returnedvaluetests4.js.dbg.baseline
- exclude_dynapogo,exclude_serialized
-
-
-
-
- returnedvaluetests4.js
- -force:deferparse -dbgbaseline:returnedvaluetests4.js.dbg.baseline
- exclude_dynapogo,exclude_serialized
-
-
-
-
- bug_261867.js
- -debuglaunch -maxinterpretcount:1 -dbgbaseline:bug_261867.js.dbg.baseline
- exclude_dynapogo,exclude_serialized
-
-
-
-
- rest.js
- -dbgbaseline:rest.js.dbg.baseline -ES6Rest -ES6Classes -InspectMaxStringLength:100
-
-
-
-
- ObjLit_step_into_more.js
- ObjLit_step_into_more.js.baseline
- -debuglaunch -dbgbaseline:ObjLit_step_into_more.js.dbg.baseline
-
-
-
-
- ObjLit_step_into_out.js
- ObjLit_step_into_out.js.baseline
- -debuglaunch -dbgbaseline:ObjLit_step_into_out.js.dbg.baseline
-
-
-
-
- ObjLit_step_over.js
- ObjLit_step_over.js.baseline
- -debuglaunch -dbgbaseline:ObjLit_step_over.js.dbg.baseline
-
-
-
-
- generators.js
- -debuglaunch -dbgbaseline:generators.js.dbg.baseline -ES6Generators -InspectMaxStringLength:200
-
-
-
-
- async.js
- -debuglaunch -dbgbaseline:async.js.dbg.baseline
-
-
-
-
- async_step_out.js
- -debuglaunch -dbgbaseline:async_step_out.js.dbg.baseline
-
-
-
-
- async_step_over.js
- -debuglaunch -dbgbaseline:async_step_over.js.dbg.baseline
-
-
-
-
- TypedArray.js
- -ES6Species -debuglaunch -dbgbaseline:typedarray.js.dbg.baseline -InspectMaxStringLength:200
-
- exclude_xplat
-
-
-
-
- ComputedPropertyNames.js
- -debuglaunch -dbgbaseline:computedpropertynames.js.dbg.baseline
-
-
-
-
- parentedDynamicCode2.js
- -InspectMaxStringLength:1000 -dbgbaseline:parenteddynamiccode2.js.dbg.baseline
-
-
-
-
- parentedDynamicCode3.js
- -InspectMaxStringLength:1000 -dbgbaseline:parenteddynamiccode3.js.dbg.baseline
-
-
-
-
- bug_os_2946365.js
- -dbgbaseline:bug_os_2946365.js.dbg.baseline
- BugFix,exclude_dynapogo
-
-
-
-
- ConsoleScope.js
- ConsoleScope.js.baseline
- -debuglaunch -es6classes -dbgbaseline:consolescope.js.dbg.baseline
-
-
-
-
- ConsoleScopePMSpec.js
- ConsoleScopePMSpec.js.baseline
- -debuglaunch -dbgbaseline:consolescopepmspec.js.dbg.baseline
-
-
-
-
- infiniteloop.js
- -debuglaunch -dbgbaseline:infiniteloop.js.dbg.baseline
-
-
-
-
- destructuring-debug.js
- -es6defaultargs -es6destructuring -debuglaunch -InspectMaxStringLength:100 -dbgbaseline:destructuring-debug.js.dbg.baseline
-
-
-
-
- regex-symbols.js
- -ES6RegExSymbols -ES6RegExPrototypeProperties -debuglaunch -dbgbaseline:regex-symbols.js.dbg.baseline
-
-
-
-
- default.js
- -debugLaunch -dbgbaseline:default.js.dbg.baseline
-
-
-
-
- default_attach.js
- -dbgbaseline:default_attach.js.dbg.baseline
- exclude_dynapogo
-
-
-
-
- bug_vso5792108.js
- -debuglaunch -dbgbaseline:bug_vso5792108.js.dbg.baseline
- BugFix
-
-
-
-
- promiseDisplay.js
- -debuglaunch -dbgbaseline:promisedisplay.js.dbg.baseline
-
-
-
-
- bug_OS12814968.js
- -forcedeferparse
- BugFix
-
-
-
-
- AsyncDynamicAttach.js
- -dbgbaseline:AsyncDynamicAttach.js.dbg.baseline
- exclude_dynapogo
-
-
-
+
+
+
+
+ arguments_mapES6_attach.js
+ -dbgbaseline:arguments_mapES6_attach.js.dbg.baseline
+ arguments_mapES6_attach.js.baseline
+
+
+
+
+ blockscope_fastdebug_ES5.js
+ -dbgbaseline:blockscope_fastdebug_ES5.js.dbg.baseline
+ blockscope_fastdebug_ES5.js.baseline
+
+
+
+
+ blockscope_fastdebug_ES6.js
+ -dbgbaseline:blockscope_fastdebug_ES6.js.dbg.baseline
+ blockscope_fastdebug_ES6.js.baseline
+
+
+
+
+ blockscope_func_insidescopes.js
+ -dbgbaseline:blockscope_func_insidescopes.js.dbg.baseline -Intl-
+ blockscope_func_insidescopes.js.baseline
+
+
+
+
+ -debuglaunch -dbgbaseline:IntlInit.js.dbg.baseline -Intl
+ IntlInit.js
+
+ require_winglob,exclude_xplat,Intl
+
+
+
+
+ ES6_intl_stepinto.js
+ -dbgbaseline:ES6_intl_stepinto.js.dbg.baseline -Intl
+
+ require_winglob,exclude_xplat,Intl
+
+
+
+
+ ES6_letconst_const_reassignment_fnscope.js
+ -dbgbaseline:ES6_letconst_const_reassignment_fnscope.js.dbg.baseline
+ ES6_letconst_const_reassignment_fnscope.js.baseline
+
+
+
+
+ ES6_letconst_eval_strict_fn.js
+ -dbgbaseline:ES6_letconst_eval_strict_fn.js.dbg.baseline
+ ES6_letconst_eval_strict_fn.js.baseline
+
+
+
+
+ ES6_letconst_redeclaration_indebugger.js
+ -dbgbaseline:ES6_letconst_redeclaration_indebugger.js.dbg.baseline
+ ES6_letconst_redeclaration_indebugger.js.baseline
+
+
+
+
+ ES6_letconst_shadow_evaluation.js
+ -dbgbaseline:ES6_letconst_shadow_evaluation.js.dbg.baseline
+
+
+
+
+ ES6_letconst_shadow_eval_with.js
+ -dbgbaseline:ES6_letconst_shadow_eval_with.js.dbg.baseline -Intl-
+ ES6_letconst_shadow_eval_with.js.baseline
+
+
+
+
+ es6_forof_decl.js
+ -debuglaunch -ES6 -dbgbaseline:es6_forof_decl.js.dbg.baseline
+ es6_forof_decl.js.baseline
+
+
+
+
+ es6_forof_decl-2.js
+ -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-2.js.dbg.baseline
+ es6_forof_decl-2.js.baseline
+
+
+
+
+ es6_forof_decl-3.js
+ -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-3.js.dbg.baseline
+ es6_forof_decl-3.js.baseline
+
+
+
+
+ es6_forof_decl-4.js
+ -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-4.js.dbg.baseline
+ es6_forof_decl-4.js.baseline
+
+
+
+
+ es6_forof_decl-5.js
+ -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-5.js.dbg.baseline
+ es6_forof_decl-5.js.baseline
+
+
+
+
+ es6_forof_decl-6.js
+ -debuglaunch -ES6 -dbgbaseline:es6_forof_decl-6.js.dbg.baseline
+ es6_forof_decl-6.js.baseline
+
+
+
+
+ frames_values_mapES6.js
+ -dbgbaseline:frames_values_mapES6.js.dbg.baseline -Intl-
+ frames_values_mapES6.js.baseline
+
+
+
+
+ step_in_ES6_attach.js
+ -dbgbaseline:step_in_ES6_attach.js.dbg.baseline -Intl-
+
+
+
+
+ step_in_from_interpreted_function_attach.js
+ -dbgbaseline:step_in_from_interpreted_function_attach.js.dbg.baseline -Intl-
+
+
+
+
+ step_in_from_JITted_function_attach.js
+ -dbgbaseline:step_in_from_JITted_function_attach.js.dbg.baseline
+
+
+
+
+ step_in_only_debugJIT_attach.js
+ -dbgbaseline:step_in_only_debugJIT_attach.js.dbg.baseline -maxinterpretcount:1 -off:simpleJit
+ step_in_only_debugJIT_attach.js.baseline
+
+
+
+
+ step_out_direct_attach.js
+ -dbgbaseline:step_out_direct_attach.js.dbg.baseline -Intl-
+
+
+
+
+ step_out_ES5.js
+ -dbgbaseline:step_out_ES5.js.dbg.baseline
+
+
+
+
+ step_out_ES6.js
+ -InspectMaxStringLength:33 -dbgbaseline:step_out_ES6.js.dbg.baseline -Intl-
+ step_out_ES6.js.baseline
+
+
+
+
+ step_out_from_catch_attach.js
+ -dbgbaseline:step_out_from_catch_attach.js.dbg.baseline -Intl-
+ step_out_from_catch_attach.js.baseline
+
+
+
+
+ step_out_from_interpreted_function_attach.js
+ -dbgbaseline:step_out_from_interpreted_function_attach.js.dbg.baseline -Intl-
+
+
+
+
+ step_out_from_JITted_function_attach.js
+ -dbgbaseline:step_out_from_JITted_function_attach.js.dbg.baseline -Intl-
+
+
+
+
+ step_out_only_debugJIT_attach.js
+ -dbgbaseline:step_out_only_debugJIT_attach.js.dbg.baseline
+
+
+
+
+ step_over_ES6_attach.js
+ -dbgbaseline:step_over_ES6_attach.js.dbg.baseline -Intl-
+
+
+
+
+ step_over_JITd_fn_from_Intrprt_fn_attach.js
+ -dbgbaseline:step_over_JITd_fn_from_Intrprt_fn_attach.js.dbg.baseline -Intl-
+
+
+
+
+ TempStrExpr.js
+ -debuglaunch -ES6 -ES6ObjectLiterals -dbgbaseline:TempStrExpr.js.dbg.baseline
+ TempStrExpr.js.baseline
+
+
+
+
+ ES6_intl_simple_attach.js
+ -dbgbaseline:ES6_intl_simple_attach.js.dbg.baseline -Intl
+ ES6_intl_simple_attach.js.baseline
+
+ require_winglob,exclude_xplat,Intl
+
+
+
+
+ frames_inspection_arrayES5.js
+ -debuglaunch -dbgbaseline:frames_inspection_arrayES5.js.dbg.baseline
+ frames_inspection_arrayES5.js.baseline
+
+
+
+
+ shadow_with.js
+ -debuglaunch -dbgbaseline:shadow_with.js.dbg.baseline -Intl-
+ shadow_with.js.baseline
+
+
+
+
+ blockscope_func_declaration_ES6.js
+ -debuglaunch -dbgbaseline:blockscope_func_declaration_ES6.js.dbg.baseline -Intl-
+ blockscope_func_declaration_ES6.js.baseline
+
+
+
+
+ blockscope_func_expression_ES6.js
+ -debuglaunch -es6functionnamefull -dbgbaseline:blockscope_func_expression_ES6.js.dbg.baseline -Intl-
+ blockscope_func_expression_ES6.js.baseline
+
+
+
+
+ ES6_letconst_eval_nonstrict.js
+ -debuglaunch -dbgbaseline:ES6_letconst_eval_nonstrict.js.dbg.baseline -Intl-
+ ES6_letconst_eval_nonstrict.js.baseline
+
+
+
+
+ ES6_letconst_for.js
+ -debuglaunch -dbgbaseline:ES6_letconst_for.js.dbg.baseline -Intl-
+
+
+
+
+ ES6_letconst_trycatch_simple_fast.js
+ -debuglaunch -dbgbaseline:ES6_letconst_trycatch_simple_fast.js.dbg.baseline -Intl-
+
+
+
+
+ ES6_proto_chained.js
+ -debuglaunch -dbgbaseline:ES6_proto_chained.js.dbg.baseline -Intl- -disableDebugObject
+
+
+
+
+ ES6_proto_simple.js
+ -debuglaunch -dbgbaseline:ES6_proto_simple.js.dbg.baseline -Intl-
+
+
+
+
+ ES6_proto_userDefinedObject.js
+ -debuglaunch -dbgbaseline:ES6_proto_userDefinedObject.js.dbg.baseline -Intl-
+
+
+
+
+ ES6_intl_stepinto_libexpandos.js
+ -debuglaunch -dbgbaseline:ES6_intl_stepinto_libexpandos.js.dbg.baseline -Intl
+
+ require_winglob,exclude_xplat,Intl
+
+
+
+
+ ES6_letconst_forin.js
+ -debuglaunch -dbgbaseline:ES6_letconst_forin.js.dbg.baseline -Intl
+
+
+
+
+ ES6_letconst_const_usebeforedeclaration.js
+ -debuglaunch -dbgbaseline:ES6_letconst_const_usebeforedeclaration.js.dbg.baseline
+
+
+
+
+ ES6_proto_invalidation.js
+ -debuglaunch -dbgbaseline:ES6_proto_invalidation.js.dbg.baseline
+
+
+
+
+ frames_letconst_reassignobjects_ES6.js
+ -debuglaunch -dbgbaseline:frames_letconst_reassignobjects_ES6.js.dbg.baseline
+
+
+
+
+ ES6_letconst_const_reassignment_globalscope.js
+ -debuglaunch -dbgbaseline:ES6_letconst_const_reassignment_globalscope.js.dbg.baseline -Intl-
+ ES6_letconst_const_reassignment_globalscope.js.baseline
+
+
+
+
+ ES6_letconst_redcl.js
+ -debuglaunch -dbgbaseline:ES6_letconst_redcl.js.dbg.baseline -Intl-
+ ES6_letconst_redcl.js.baseline
+
+
+
+
+ native_array.js
+ -debuglaunch -dbgbaseline:native_array.js.dbg.baseline
+ native_array.js.baseline
+
+
+
+
+ argument_disp.js
+ -debuglaunch -dbgbaseline:argument_disp.js.dbg.baseline -Intl-
+ argument_disp.js.baseline
+
+
+
+
+ multiple_argumentsdisp_safeguard.js
+ -debuglaunch -dbgbaseline:multiple_argumentsdisp_safeguard.js.dbg.baseline -Intl-
+ multiple_argumentsdisp_safeguard.js.baseline
+
+
+
+
+ level_1.js
+ -debuglaunch -dbgbaseline:level_1.js.dbg.baseline
+
+
+
+
+ ES6_spread.js
+ -debuglaunch -dbgbaseline:ES6_spread.js.dbg.baseline -es6spread -nonative
+ exclude_dynapogo
+
+
+
+
+ specialproperties_fn.js
+ -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:specialproperties_fn.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ ES6_RegExp_specialproperties.js
+ -ES6Unicode- -ES6RegExSticky- -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_default.js.dbg.baseline
+
+
+
+
+ ES6_RegExp_specialproperties.js
+ -ES6Unicode -ES6RegExSticky- -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_with_unicode.js.dbg.baseline
+
+
+
+
+ ES6_RegExp_specialproperties.js
+ -ES6Unicode- -ES6RegExSticky -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_with_sticky.js.dbg.baseline
+
+
+
+
+ ES6_RegExp_specialproperties.js
+ -ES6Unicode -ES6RegExSticky -debuglaunch -inspectmaxstringlength:100 -dbgbaseline:ES6_RegExp_specialproperties_all.js.dbg.baseline
+
+
+
+
+ specialproperties_level2.js
+ -debuglaunch -es6functionnamefull -inspectmaxstringlength:256 -dbgbaseline:specialproperties_level2.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ testdynamicattach1.js
+ -dbgbaseline:testdynamicattach1.js.dbg.baseline -DeferLoadingAvailableSource
+ testdynamicattach1.baseline
+
+
+
+
+ testdynamicattach1.js
+ -dbgbaseline:testdynamicattach1.js.dbg.baseline -Intl- -DeferLoadingAvailableSource
+ testdynamicattach1.baseline
+
+
+
+
+ targeted.js
+ -debuglaunch -dbgbaseline:targeted.js.dbg.baseline -DeferLoadingAvailableSource
+ targeted.baseline
+
+
+
+
+ protoTest2.js
+ -debuglaunch -dbgbaseline:protoTest2.js.dbg.baseline
+
+
+
+
+ testdynamicattach2.js
+ -dbgbaseline:testdynamicattach2.js.dbg.baseline
+ testdynamicattach2.baseline
+
+
+
+
+ deferParseDetach.js
+ -force:deferparse -dbgbaseline:deferParseDetach.js.dbg.baseline
+
+
+
+
+ deferParseDetach2.js
+ -force:deferparse -dbgbaseline:deferParseDetach2.js.dbg.baseline
+
+
+
+
+ attachWithDeferParse.js
+ -force:deferparse -dbgbaseline:attachWithDeferParse.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ array_prototest.js
+ -debuglaunch -dbgbaseline:array_prototest.js.dbg.baseline
+
+
+
+
+ breakpoints.js
+ -debuglaunch -dbgbaseline:breakpoints.js.dbg.baseline
+ exclude_jsrt,exclude_dynapogo
+
+
+
+
+ indexprop.js
+ -debuglaunch -dbgbaseline:indexprop.js.dbg.baseline
+
+
+
+
+ funcSource.js
+ -inspectmaxstringlength:100 -debuglaunch -dbgbaseline:funcSource.js.dbg.baseline
+
+
+
+
+ evaluate.js
+ -debuglaunch -dbgbaseline:evaluate.js.dbg.baseline -InspectMaxStringLength:100
+
+
+
+
+ attachAfterException.js
+ -dbgbaseline:attachAfterException.js.dbg.baseline
+
+
+
+
+ catchInspection.js
+ -debuglaunch -dbgbaseline:catchInspection.js.dbg.baseline
+
+
+
+
+ funcExprName.js
+ -debuglaunch -dbgbaseline:funcExprName.js.dbg.baseline
+
+
+
+
+ attachdetach-delaycapture.js
+ -dbgbaseline:attachdetach-delaycapture.js.dbg.baseline
+
+ BugFix,exclude_xplat
+
+
+
+
+ globalFuncVars.js
+ -debuglaunch -dbgbaseline:globalFuncVars.js.dbg.baseline
+
+
+
+
+ blockScopeSlotArrayCaptureAttach.js
+ -InspectMaxStringLength:33 -dbgbaseline:blockScopeSlotArrayCaptureAttach.js.dbg.baseline
+
+
+
+
+ blockScopeSlotArrayCapture.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeSlotArrayCapture.js.dbg.baseline
+
+
+
+
+ blockScopeActivationObjectCapture.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeActivationObjectCapture.js.dbg.baseline
+
+
+
+
+ blockScopeBasicLetConstTest.js
+ -debuglaunch -dbgbaseline:blockScopeBasicLetConstTest.js.dbg.baseline
+
+
+
+
+ blockScopeActivationObjectAsSlotArray.js
+ -InspectMaxStringLength:150 -debuglaunch -dbgbaseline:blockScopeActivationObjectAsSlotArray.js.dbg.baseline
+
+
+
+
+ blockScopeBasicScopingTest.js
+ -debuglaunch -dbgbaseline:blockScopeBasicScopingTest.js.dbg.baseline
+
+
+
+
+ blockScopeForTest.bug183991.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeForTest.bug183991.js.dbg.baseline
+
+
+
+
+ blockScopeNestedFunctionTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeNestedFunctionTest.js.dbg.baseline
+
+
+
+
+ blockScopeDeadZoneTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeDeadZoneTest.js.dbg.baseline
+
+
+
+
+ blockScopeEvalTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeEvalTest.js.dbg.baseline
+
+
+
+
+ blockScopeGlobalTest.js
+ -debuglaunch -dbgbaseline:blockScopeGlobalTest.js.dbg.baseline
+
+
+
+
+ blockScopeForTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeForTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeWithTest.js
+ -debuglaunch -dbgbaseline:blockScopeWithTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeSwitchTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeSwitchTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeActivationObjectDeadZoneTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeActivationObjectDeadZoneTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeRegSlotDeadZoneTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeRegSlotDeadZoneTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeSlotArrayDeadZoneTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeSlotArrayDeadZoneTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeGlobalDeadZoneTest.js
+ -debuglaunch -dbgbaseline:blockScopeGlobalDeadZoneTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeGlobalBlockTest.js
+ -debuglaunch -dbgbaseline:blockScopeGlobalBlockTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeSlotArrayTest.js
+ -dbgbaseline:blockScopeSlotArrayTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeSlotArrayTest.js
+ -forceserialized -dbgbaseline:blockScopeSlotArrayTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeSlotArraySiblingTest.js
+ -debuglaunch -dbgbaseline:blockScopeSlotArraySiblingTest.js.dbg.baseline
+
+
+
+
+ blockScopeGlobalSlotArrayTest.bug222631.js
+ -debuglaunch -dbgbaseline:blockScopeGlobalSlotArrayTest.bug222631.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeSibling.bug263635.js
+ -debuglaunch -dbgbaseline:blockScopeSibling.bug263635.js.dbg.baseline
+
+
+
+
+ blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js
+ -dbgbaseline:blockScopeSiblingScopeTrackedInNonDebugMode.bug321751.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeFunctionDeclarationRegSlotTest.js
+ -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationRegSlotTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeFunctionDeclarationSlotArrayTest.js
+ -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationSlotArrayTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeFunctionDeclarationActivationObjectTest.js
+ -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationActivationObjectTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeFunctionDeclarationGlobalTest.js
+ -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationGlobalTest.js.dbg.baseline -Intl- -InspectMaxStringLength:100
+
+
+
+
+ blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js
+ -debuglaunch -dbgbaseline:blockScopeFunctionDeclarationGlobalShadowingTest.bug305562.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js
+ -debuglaunch -InspectMaxStringLength:33 -dbgbaseline:blockScopeFunctionDeclarationGlobalShadowingTest.bug308191.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeFunctionRedeclarationTest.js
+ -debuglaunch -dbgbaseline:blockScopeFunctionRedeclarationTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeFunctionRedeclaration_blue523098.js
+ -debuglaunch -dbgbaseline:blockScopeFunctionRedeclaration_blue523098.js.dbg.baseline
+
+
+
+
+ disablebp.js
+ -debuglaunch -dbgbaseline:disablebp.js.dbg.baseline
+
+
+
+
+ disablebp2.js
+ -debuglaunch -dbgbaseline:disablebp2.js.dbg.baseline
+
+
+
+
+ setframe.js
+ -EnableJitInDiagMode -debuglaunch -dbgbaseline:setframe.js.dbg.baseline -Intl-
+
+
+
+
+ funcExprCrash_150491.js
+ -force:deferparse -dbgbaseline:funcExprCrash_150491.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ JIT_localsAtNativeFrame1.js
+ -forceNative -off:simpleJit -EnableJitInDiagMode -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame1.js.dbg.baseline
+ exclude_dynapogo,exclude_arm,exclude_nonative
+
+
+
+
+ JIT_localsAtNativeFrame2.js
+ -forceNative -off:simpleJit -EnableJitInDiagMode -debuglaunch -dbgbaseline:JIT_localsAtNativeFrame2.js.dbg.baseline
+ exclude_dynapogo,exclude_arm,exclude_nonative
+
+
+
+
+ bug594394.js
+ -DebugLaunch -dbgbaseline:bug594394.js.dbg.baseline
+ bug594394.baseline
+
+
+
+
+ FastF12_BOBranch.js
+ -debuglaunch -maxinterpretcount:1 -off:simpleJit -dbgbaseline:FastF12_BOBranch.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ negzerotest.js
+ -debuglaunch -dbgbaseline:negzerotest.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ detachBasicTest.js
+ -dbgbaseline:detachBasicTest.js.dbg.baseline -Intl-
+
+
+
+
+ detachBasicTest.js
+ -dbgbaseline:detachBasicTest.js.dbg.baseline -Intl-
+
+
+
+
+ testdynamicdetach1.js
+ -dbgbaseline:testdynamicdetach1.js.dbg.baseline -Intl-
+ testdynamicdetach1.baseline
+
+
+
+
+ -debuglaunch -nonative -dbgbaseline:jitStepping2.js.dbg.baseline
+ jitStepping2.js
+ exclude_dynapogo
+
+
+
+
+ -debuglaunch -forcenative -dbgbaseline:jitStepping2.js.dbg.baseline
+ jitStepping2.js
+ exclude_dynapogo
+
+
+
+
+ jit_exprEval1.js
+ -EnableJitInDiagMode -debuglaunch -es6functionnamefull -forceNative -off:simpleJit -dbgbaseline:jit_exprEval1.js.dbg.baseline -Intl-
+ exclude_dynapogo,exclude_nonative
+
+
+
+
+ jit_editvalue1.js
+ -EnableJitInDiagMode -es6functionnamefull -debuglaunch -forceNative -off:simpleJit -dbgbaseline:jit_editvalue1.js.dbg.baseline
+ exclude_dynapogo,exclude_nonative
+
+
+
+
+ jitAttach.js
+ -maxinterpretcount:1 -off:simpleJit -EnableJitInDiagMode -dbgbaseline:jitAttach.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ stringkeyedtypehandler.js
+ -debuglaunch -dbgbaseline:stringkeyedtypehandler.js.dbg.baseline -DeletedPropertyReuseThreshold:1
+
+
+
+
+ functionNameShowsInScopeGroupTest.bug157127.js
+ -debuglaunch -dbgbaseline:functionNameShowsInScopeGroupTest.bug157127.js.dbg.baseline
+
+
+
+
+ functionNameShowsInNestedScopeGroupTest.js
+ -debuglaunch -dbgbaseline:functionNameShowsInNestedScopeGroupTest.js.dbg.baseline
+
+
+
+
+ blockScopeExpressionNoWriteOfConst.js
+ -debuglaunch -dbgbaseline:blockScopeExpressionNoWriteOfConst.js.dbg.baseline
+
+
+
+
+ blockScopeRegSlotShadowingExpressionEvaluationTest.js
+ -debuglaunch -dbgbaseline:blockScopeRegSlotShadowingExpressionEvaluationTest.js.dbg.baseline -Intl-
+
+
+
+
+ blockScopeExpressionSimpleDeadZoneTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeExpressionSimpleDeadZoneTest.js.dbg.baseline
+
+
+
+
+ blockScopeExpressionEquationDeadZoneTest.js
+ -InspectMaxStringLength:33 -debuglaunch -dbgbaseline:blockScopeExpressionEquationDeadZoneTest.js.dbg.baseline
+
+
+
+
+ blockScopeTryCatchTest.js
+ -debuglaunch -dbgbaseline:blockScopeTryCatchTest.js.dbg.baseline -Intl-
+
+
+
+
+ localsInspectionOnNonTopFrameInBlockTest.bug163347.js
+ -debuglaunch -dbgbaseline:localsInspectionOnNonTopFrameInBlockTest.bug163347.js.dbg.baseline -Intl-
+
+
+
+
+ jitAttach.js
+ -maxinterpretcount:1 -off:simpleJit -EnableJitInDiagMode -dbgbaseline:jitAttach.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ getterInspection.js
+ -debuglaunch -dbgbaseline:getterInspection.js.dbg.baseline
+
+
+
+
+ promise_deferNestedAttach.js
+ -es6functionnamefull -dbgbaseline:promise_deferNestedAttach.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ promise_deferNestedAttach.js
+ -ForceStaticInterpreterThunk -es6functionnamefull -dbgbaseline:promise_deferNestedAttach.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_222633.js
+ -debuglaunch -dbgbaseline:bug_222633.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_149118.js
+ -force:deferparse -dbgbaseline:bug_149118.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_149118.js
+ -force:deferparse -dbgbaseline:bug_149118.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_204064.js
+ -dbgbaseline:bug_204064.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_177146.js
+ -debuglaunch -dbgbaseline:bug_177146.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ bug_177146.js
+ -debuglaunch -dbgbaseline:bug_177146.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ bug_256729.js
+ -debuglaunch -dbgbaseline:bug_256729.js.dbg.baseline
+ exclude_dynapogo,exclude_nonative
+
+
+
+
+ bug_266843.js
+ -debuglaunch -maxinterpretcount:1 -off:simpleJit -dbgbaseline:bug_266843.js.dbg.baseline
+ bug_266843.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_350674.js
+ -debuglaunch -forceNative -off:simpleJit -dbgbaseline:bug_350674.js.dbg.baseline
+
+
+
+
+ with_shadow.js
+ -debuglaunch -InspectMaxStringLength:100 -dbgbaseline:with_shadow.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ var_shadow.js
+ -debuglaunch -dbgbaseline:var_shadow.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ arraytoes5array.js
+ -debuglaunch -dbgbaseline:arraytoes5array.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ propertyEnumeration.bug241480.js
+ -dbgbaseline:propertyEnumeration.bug241480.js.dbg.baseline -debuglaunch
+
+
+
+
+ bug_271356.js
+ -debuglaunch -maxinterpretcount:4 -off:simpleJit -dbgbaseline:bug_271356.js.dbg.baseline
+ bug_271356.js.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_291582.js
+ -debuglaunch -dbgbaseline:bug_291582.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ bug_355097.js
+ -force:deferparse -dbgbaseline:bug_355097.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ bug_301517.js
+ -dbgbaseline:bug_301517.js.dbg.baseline -Intl-
+ exclude_dynapogo
+
+
+
+
+ bug_325839.js
+ -debuglaunch -forceNative -off:simpleJit -dbgbaseline:bug_325839.js.dbg.baseline
+ bug_325839.baseline
+ exclude_dynapogo,exclude_nonative
+
+
+
+
+ deferParse_210165.js
+ -dbgbaseline:deferParse_210165.js.dbg.baseline
+ deferParse_210165.baseline
+
+
+
+
+ qualified_names1.js
+ -debuglaunch -dbgbaseline:qualified_names1.js.dbg.baseline -Intl-
+
+
+
+
+ qualified_names2.js
+ -debuglaunch -dbgbaseline:qualified_names2.js.dbg.baseline -es6classes -Intl-
+
+
+
+
+ evalDetection.js
+ -dbgbaseline:evalDetection.js.dbg.baseline
+
+
+
+
+ bug_507528.js
+ -debuglaunch -Intl- -dbgbaseline:emptyJson.dbg.baseline
+ bug_507528.baseline
+
+
+
+
+ bug_543550.js
+ -debuglaunch -inspectmaxstringlength:110 -dbgbaseline:bug_543550.js.dbg.baseline
+
+
+
+
+ bug_523101.js
+ -debuglaunch -dbgbaseline:bug_523101.js.dbg.baseline
+
+
+
+
+ symbols.js
+ -ES6Species -debuglaunch -dbgbaseline:symbols.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ qualified_names5.js
+ -debuglaunch -dbgbaseline:qualified_names5.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_538163.js
+ -debuglaunch -dbgbaseline:bug_538163.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_575634.js
+ -debuglaunch -dbgbaseline:bug_575634.js.dbg.baseline
+
+
+
+
+ nested_eval.js
+ -debuglaunch -dbgbaseline:nested_eval.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_592506.js
+ -debuglaunch -dbgbaseline:bug_592506.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ permanentArguments.js
+ -forcenative -debuglaunch -dbgbaseline:permanentArguments.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ sourceInfoMismatch.js
+ -Force:Deferparse -ForceUndoDefer -dbgbaseline:emptyJson.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ spread_debugging.js
+ -ES6Spread -DebugLaunch -InspectMaxStringLength:100 -dbgbaseline:spread_debugging.js.dbg.baseline
+ exclude_serialized
+
+
+
+
+ bug_622304.js
+ -debuglaunch -dbgbaseline:bug_622304.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ returnedvaluetests.js
+ -debugLaunch -dbgbaseline:returnedvaluetests.js.dbg.baseline
+ exclude_dynapogo,exclude_serialized
+
+
+
+
+ returnedvaluetests1.js
+ -dbgbaseline:returnedvaluetests1.js.dbg.baseline
+
+ exclude_dynapogo,exclude_serialized,exclude_xplat
+
+
+
+
+ returnedvaluetests2.js
+ -debugLaunch -dbgbaseline:returnedvaluetests2.js.dbg.baseline
+
+ exclude_dynapogo,exclude_serialized,exclude_xplat
+
+
+
+
+ delaycapture.js
+ -dbgbaseline:delaycapture.js.dbg.baseline
+ exclude_dynapogo,exclude_serialized
+
+
+
+
+ returnedvaluetests3.js
+ -debugLaunch -dbgbaseline:returnedvaluetests3.js.dbg.baseline
+ exclude_dynapogo,exclude_serialized
+
+
+
+
+ returnedvaluetests4.js
+ -dbgbaseline:returnedvaluetests4.js.dbg.baseline
+ exclude_dynapogo,exclude_serialized
+
+
+
+
+ returnedvaluetests4.js
+ -force:deferparse -dbgbaseline:returnedvaluetests4.js.dbg.baseline
+ exclude_dynapogo,exclude_serialized
+
+
+
+
+ bug_261867.js
+ -debuglaunch -maxinterpretcount:1 -dbgbaseline:bug_261867.js.dbg.baseline
+ exclude_dynapogo,exclude_serialized
+
+
+
+
+ rest.js
+ -dbgbaseline:rest.js.dbg.baseline -ES6Rest -ES6Classes -InspectMaxStringLength:100
+
+
+
+
+ ObjLit_step_into_more.js
+ ObjLit_step_into_more.js.baseline
+ -debuglaunch -dbgbaseline:ObjLit_step_into_more.js.dbg.baseline
+
+
+
+
+ ObjLit_step_into_out.js
+ ObjLit_step_into_out.js.baseline
+ -debuglaunch -dbgbaseline:ObjLit_step_into_out.js.dbg.baseline
+
+
+
+
+ ObjLit_step_over.js
+ ObjLit_step_over.js.baseline
+ -debuglaunch -dbgbaseline:ObjLit_step_over.js.dbg.baseline
+
+
+
+
+ generators.js
+ -debuglaunch -dbgbaseline:generators.js.dbg.baseline -ES6Generators -InspectMaxStringLength:200
+
+
+
+
+ async.js
+ -debuglaunch -dbgbaseline:async.js.dbg.baseline
+
+
+
+
+ async_step_out.js
+ -debuglaunch -dbgbaseline:async_step_out.js.dbg.baseline
+
+
+
+
+ async_step_over.js
+ -debuglaunch -dbgbaseline:async_step_over.js.dbg.baseline
+
+
+
+
+ TypedArray.js
+ -ES6Species -debuglaunch -dbgbaseline:typedarray.js.dbg.baseline -InspectMaxStringLength:200
+
+ exclude_xplat
+
+
+
+
+ ComputedPropertyNames.js
+ -debuglaunch -dbgbaseline:computedpropertynames.js.dbg.baseline
+
+
+
+
+ parentedDynamicCode2.js
+ -InspectMaxStringLength:1000 -dbgbaseline:parenteddynamiccode2.js.dbg.baseline
+
+
+
+
+ parentedDynamicCode3.js
+ -InspectMaxStringLength:1000 -dbgbaseline:parenteddynamiccode3.js.dbg.baseline
+
+
+
+
+ bug_os_2946365.js
+ -dbgbaseline:bug_os_2946365.js.dbg.baseline
+ BugFix,exclude_dynapogo
+
+
+
+
+ ConsoleScope.js
+ ConsoleScope.js.baseline
+ -debuglaunch -es6classes -dbgbaseline:consolescope.js.dbg.baseline
+
+
+
+
+ ConsoleScopePMSpec.js
+ ConsoleScopePMSpec.js.baseline
+ -debuglaunch -dbgbaseline:consolescopepmspec.js.dbg.baseline
+
+
+
+
+ infiniteloop.js
+ -debuglaunch -dbgbaseline:infiniteloop.js.dbg.baseline
+
+
+
+
+ destructuring-debug.js
+ -es6defaultargs -es6destructuring -debuglaunch -InspectMaxStringLength:100 -dbgbaseline:destructuring-debug.js.dbg.baseline
+
+
+
+
+ regex-symbols.js
+ -ES6RegExSymbols -ES6RegExPrototypeProperties -debuglaunch -dbgbaseline:regex-symbols.js.dbg.baseline
+
+
+
+
+ default.js
+ -debugLaunch -dbgbaseline:default.js.dbg.baseline
+
+
+
+
+ default_attach.js
+ -dbgbaseline:default_attach.js.dbg.baseline
+ exclude_dynapogo
+
+
+
+
+ bug_vso5792108.js
+ -debuglaunch -dbgbaseline:bug_vso5792108.js.dbg.baseline
+ BugFix
+
+
+
+
+ promiseDisplay.js
+ -debuglaunch -dbgbaseline:promisedisplay.js.dbg.baseline
+
+
+
+
+ bug_OS12814968.js
+ -forcedeferparse
+ BugFix
+
+
+
+
+ AsyncDynamicAttach.js
+ -dbgbaseline:AsyncDynamicAttach.js.dbg.baseline
+ exclude_dynapogo
+
+
+
diff --git a/deps/chakrashim/core/test/Error/rlexe.xml b/deps/chakrashim/core/test/Error/rlexe.xml
index 2e292b19a20..4be8f3c33c7 100644
--- a/deps/chakrashim/core/test/Error/rlexe.xml
+++ b/deps/chakrashim/core/test/Error/rlexe.xml
@@ -1,178 +1,178 @@
-
-
-
-
- errorProps.js
- errorProps_v4.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- ErrorCtorProps.js
- ErrorCtorProps_v3.baseline
-
-
-
-
- NativeErrors.js
- NativeErrors_v4.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- outofmem.js
- outofmem.baseline
-
- -EnableFatalErrorOnOOM-
-
-
-
-
- stack.js
-
-
-
-
- stack2.js
- stack2.baseline
-
-
-
-
- errorCtor.js
- errorCtor_v4.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- errorNum.js
- errorNum.baseline
-
-
-
-
- CallNonFunction.js
- CallNonFunction_3.baseline
- exclude_native,exclude_dynapogo
-
-
-
-
-
- sourceInfo_00.js
- sourceInfo_00.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- sourceInfo_01.js
- sourceInfo_01.baseline
- -ExtendedErrorStackForTestHost
- exclude_jshost
-
-
-
-
- sourceInfo_10.js
- sourceInfo_10.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- sourceInfo_11.js
- sourceInfo_11.baseline
- -ExtendedErrorStackForTestHost
- exclude_jshost
-
-
-
-
- sourceInfo_12.js
- sourceInfo_12.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- sourceInfo_13.js
- sourceInfo_13.baseline
- -ExtendedErrorStackForTestHost
- exclude_jshost
-
-
-
-
- sourceInfo_20.js
- sourceInfo_20.baseline
- -ExtendedErrorStackForTestHost
- exclude_jshost
-
-
-
-
- variousErrors.js
- variousErrors3.baseline
-
-
-
-
- RuntimeCompileStackOverflow.js
- RuntimeCompileStackOverflow.baseline
- exclude_forceundodefer,exclude_arm,exclude_xplat
-
-
-
-
- encodeoverflow.js
- encodeoverflow.baseline
- -EnableFatalErrorOnOOM-
- Slow
- 300
-
-
-
-
- bug560940.js
-
-
-
-
- stackoverflow.js
- stackoverflow.baseline
- Slow
-
-
-
-
- inlineSameFunc.js
- inlineSameFunc.baseline
- -ExtendedErrorStackForTestHost -maxinterpretcount:1 -off:simpleJit
-
-
-
-
- PartInitStackFrame.js
- PartInitStackFrame.baseline
- -ExtendedErrorStackForTestHost -nonative -InjectPartiallyInitializedInterpreterFrameError:3 -InjectPartiallyInitializedInterpreterFrameErrorType:1
-
-
-
-
- validate_line_column.js
- validate_line_column.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- validate_line_column.js
- validate_line_column.baseline
- -ExtendedErrorStackForTestHost -force:DeferParse
-
-
-
+
+
+
+
+ errorProps.js
+ errorProps_v4.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ ErrorCtorProps.js
+ ErrorCtorProps_v3.baseline
+
+
+
+
+ NativeErrors.js
+ NativeErrors_v4.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ outofmem.js
+ outofmem.baseline
+
+ -EnableFatalErrorOnOOM-
+
+
+
+
+ stack.js
+
+
+
+
+ stack2.js
+ stack2.baseline
+
+
+
+
+ errorCtor.js
+ errorCtor_v4.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ errorNum.js
+ errorNum.baseline
+
+
+
+
+ CallNonFunction.js
+ CallNonFunction_3.baseline
+ exclude_native,exclude_dynapogo
+
+
+
+
+
+ sourceInfo_00.js
+ sourceInfo_00.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ sourceInfo_01.js
+ sourceInfo_01.baseline
+ -ExtendedErrorStackForTestHost
+ exclude_jshost
+
+
+
+
+ sourceInfo_10.js
+ sourceInfo_10.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ sourceInfo_11.js
+ sourceInfo_11.baseline
+ -ExtendedErrorStackForTestHost
+ exclude_jshost
+
+
+
+
+ sourceInfo_12.js
+ sourceInfo_12.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ sourceInfo_13.js
+ sourceInfo_13.baseline
+ -ExtendedErrorStackForTestHost
+ exclude_jshost
+
+
+
+
+ sourceInfo_20.js
+ sourceInfo_20.baseline
+ -ExtendedErrorStackForTestHost
+ exclude_jshost
+
+
+
+
+ variousErrors.js
+ variousErrors3.baseline
+
+
+
+
+ RuntimeCompileStackOverflow.js
+ RuntimeCompileStackOverflow.baseline
+ exclude_forceundodefer,exclude_arm,exclude_xplat
+
+
+
+
+ encodeoverflow.js
+ encodeoverflow.baseline
+ -EnableFatalErrorOnOOM-
+ Slow
+ 300
+
+
+
+
+ bug560940.js
+
+
+
+
+ stackoverflow.js
+ stackoverflow.baseline
+ Slow
+
+
+
+
+ inlineSameFunc.js
+ inlineSameFunc.baseline
+ -ExtendedErrorStackForTestHost -maxinterpretcount:1 -off:simpleJit
+
+
+
+
+ PartInitStackFrame.js
+ PartInitStackFrame.baseline
+ -ExtendedErrorStackForTestHost -nonative -InjectPartiallyInitializedInterpreterFrameError:3 -InjectPartiallyInitializedInterpreterFrameErrorType:1
+
+
+
+
+ validate_line_column.js
+ validate_line_column.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ validate_line_column.js
+ validate_line_column.baseline
+ -ExtendedErrorStackForTestHost -force:DeferParse
+
+
+
diff --git a/deps/chakrashim/core/test/Function/rlexe.xml b/deps/chakrashim/core/test/Function/rlexe.xml
index 6f6c15b88b7..2b3a8f19d04 100644
--- a/deps/chakrashim/core/test/Function/rlexe.xml
+++ b/deps/chakrashim/core/test/Function/rlexe.xml
@@ -1,446 +1,446 @@
-
-
-
-
- apply.js
- apply.baseline
-
-
-
-
- apply3.js
- apply3.baseline
-
-
-
-
- applyArgs.js
- applyArgs.baseline
-
-
-
-
- arguments1.js
- arguments1.baseline
-
-
-
-
- arguments2.js
- arguments2.baseline
-
-
-
-
- arguments3.js
- arguments3.baseline
-
-
-
-
- arguments4.js
-
-
-
-
- argumentsMisc.js
- argumentsMisc_3.baseline
-
-
-
-
- arguments.es5.js
- arguments.es5.baseline
-
-
-
-
- argumentsResolution.js
- argumentsResolution_3.baseline
-
-
-
-
- argumentsLimits.js
- argumentsLimits.baseline
- -EnableFatalErrorOnOOM-
- exclude_dynapogo
-
-
-
-
- someMoreArguments.js
- someMoreArguments_3.baseline
-
-
-
-
- bind.js
- bind.baseline
-
-
-
-
- call1.js
- call1.baseline
-
-
-
-
- call2.js
- call2.baseline
-
-
-
-
- CallerArgs.js
- CallerArgsES5.baseline
-
-
-
-
- callsideeffects.js
- callsideeffects_3.baseline
-
-
-
-
- catchsymbolvar.js
-
-
-
-
- newsideeffect.js
- newsideeffect.baseline
-
-
-
-
- newsideeffect.js
- newsideeffect.baseline
- -Force:Deferparse
-
-
-
-
- callmissingtgt.js
- callmissingtgt.6.baseline
-
-
-
-
- defernested.js
- defernested.baseline
-
-
-
-
- defernested.js
- -Force:Deferparse -DeferNested
- defernested.baseline
-
-
-
-
- jitLoopBody.js
- jitLoopBody.baseline
- -force:jitLoopBody
-
-
-
-
- deferredParsing.js
- -force:deferparse
- deferredParsing_3.baseline
- exclude_fre
-
-
-
-
- deferredParsing.js
- -forceUndoDefer
- deferredParsing_3.baseline
- exclude_fre
-
-
-
-
- deferredGetterSetter.js
- -force:deferparse
- deferredGetterSetter.baseline
- exclude_fre
-
-
-
-
- deferredBadContinue.js
- deferredBadContinue.baseline
- exclude_dynapogo
-
-
-
-
- deferredBadContinue.js
- deferredBadContinue.baseline
- -Force:Deferparse
- exclude_dynapogo
-
-
-
-
- deferredstuboob.js
- -force:deferparse -pageheap:2
-
-
-
-
- deferredWith.js
- -Force:Deferparse
- deferredWith.v4.baseline
- exclude_fre
-
-
-
-
- deferredWith2.js
- -Force:Deferparse
- deferredWith2.baseline
- exclude_fre
-
-
-
-
- newFunction.js
- newFunction.baseline
-
-
-
-
- prototype.js
- prototype.baseline
-
-
-
-
- TApply1.js
- TApply1.baseline
-
-
-
-
- toString.js
- toString.baseline
-
-
-
-
- funcExpr.js
- funcExpr5.baseline
-
-
-
-
- moreFuncExpr.js
- moreFuncExpr3.baseline
-
-
-
-
- moreFuncExpr.js
- moreFuncExpr3.baseline
- -forceundodefer
-
-
-
-
- evenMoreFuncExpr3.js
- evenMoreFuncExpr3.baseline
-
-
-
-
- someMoreFuncExpr.js
- someMoreFuncExpr3.baseline
-
-
-
-
- constructor.js
- constructor.baseline
-
-
-
-
- ctrFlags.js
- ctrFlags3.baseline
-
-
-
-
- typeErrorAccessor.js
- typeErrorAccessor.baseline
-
-
-
-
- FuncBody.js
- FuncBodyES5.baseline
-
-
-
-
- FuncBody.bug133933.js
- FuncBody.bug133933.baseline
- -trace:FunctionSourceInfoParse -off:deferparse
- exclude_fre,exclude_dynapogo
-
-
-
-
- FuncBody.bug227901.js
- FuncBody.bug227901.baseline
- -off:deferparse
-
-
-
-
- FuncBody.bug232281.js
- FuncBody.bug232281.baseline
- -off:deferparse
-
-
-
-
- FuncBody.bug236810.js
- -off:deferparse
-
-
-
-
- FuncBody.bug231397.js
- FuncBody.bug231397.baseline
- -dump:bytecode
- exclude_bytecodelayout,exclude_fre,require_backend
-
-
-
-
- bug_258259.js
- -ExtendedErrorStackForTestHost
-
-
-
-
- sameNamePara.js
- sameNamePara.baseline
-
-
-
-
- closure.js
- closure.baseline
-
-
-
-
- undefThis.js
- undefThis.v10.baseline
-
-
-
-
- stackargs.js
- stackargs.baseline
-
-
-
-
- StackArgsWithFormals.js
- -mic:1 -off:simpleJit
-
-
-
-
- StackArgsWithFormals.js
- -mic:1 -off:simpleJit -forceserialized
-
-
-
-
- StackArgsWithFormals.js
- -mic:1 -off:simpleJit -forcedeferparse
-
-
-
-
- StackArgsWithFormals.js
- -mic:1 -off:simpleJit -trace:stackargformalsopt
- exclude_dynapogo,exclude_fre,exclude_nonative,require_backend,exclude_forceserialized
- StackArgsWithFormals.baseline
-
-
-
-
- StackArgs_MaxInterpret.js
- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit
- exclude_dynapogo
-
-
-
-
- childCallsEvalJitLoopBody.js
-
- -prejit
- exclude_fre,exclude_dynapogo
-
-
-
-
- 631838.js
- -nonative
-
- exclude_dynapogo,exclude_arm,Slow
-
-
-
-
- calli.js
-
-
-
-
- caller_replaced_proto.js
-
-
-
-
- bug542360.js
-
-
-
-
- crosssite_bind_main.js
-
-
-
-
- failnativecodeinstall.js
-
- -EnableFatalErrorOnOOM- -maxinterpretcount:2 -lic:1 -bgjit -off:simplejit -on:failnativecodeinstall
- exclude_dynapogo,require_backend
- failnativecodeinstall.baseline
-
-
-
-
- redefer-recursive-inlinees.js
- redefer-recursive-inlinees.baseline
-
-
-
-
- redefer-f-i-b-eval.js
- -force:deferparse -force:redeferral
-
-
-
+
+
+
+
+ apply.js
+ apply.baseline
+
+
+
+
+ apply3.js
+ apply3.baseline
+
+
+
+
+ applyArgs.js
+ applyArgs.baseline
+
+
+
+
+ arguments1.js
+ arguments1.baseline
+
+
+
+
+ arguments2.js
+ arguments2.baseline
+
+
+
+
+ arguments3.js
+ arguments3.baseline
+
+
+
+
+ arguments4.js
+
+
+
+
+ argumentsMisc.js
+ argumentsMisc_3.baseline
+
+
+
+
+ arguments.es5.js
+ arguments.es5.baseline
+
+
+
+
+ argumentsResolution.js
+ argumentsResolution_3.baseline
+
+
+
+
+ argumentsLimits.js
+ argumentsLimits.baseline
+ -EnableFatalErrorOnOOM-
+ exclude_dynapogo
+
+
+
+
+ someMoreArguments.js
+ someMoreArguments_3.baseline
+
+
+
+
+ bind.js
+ bind.baseline
+
+
+
+
+ call1.js
+ call1.baseline
+
+
+
+
+ call2.js
+ call2.baseline
+
+
+
+
+ CallerArgs.js
+ CallerArgsES5.baseline
+
+
+
+
+ callsideeffects.js
+ callsideeffects_3.baseline
+
+
+
+
+ catchsymbolvar.js
+
+
+
+
+ newsideeffect.js
+ newsideeffect.baseline
+
+
+
+
+ newsideeffect.js
+ newsideeffect.baseline
+ -Force:Deferparse
+
+
+
+
+ callmissingtgt.js
+ callmissingtgt.6.baseline
+
+
+
+
+ defernested.js
+ defernested.baseline
+
+
+
+
+ defernested.js
+ -Force:Deferparse -DeferNested
+ defernested.baseline
+
+
+
+
+ jitLoopBody.js
+ jitLoopBody.baseline
+ -force:jitLoopBody
+
+
+
+
+ deferredParsing.js
+ -force:deferparse
+ deferredParsing_3.baseline
+ exclude_fre
+
+
+
+
+ deferredParsing.js
+ -forceUndoDefer
+ deferredParsing_3.baseline
+ exclude_fre
+
+
+
+
+ deferredGetterSetter.js
+ -force:deferparse
+ deferredGetterSetter.baseline
+ exclude_fre
+
+
+
+
+ deferredBadContinue.js
+ deferredBadContinue.baseline
+ exclude_dynapogo
+
+
+
+
+ deferredBadContinue.js
+ deferredBadContinue.baseline
+ -Force:Deferparse
+ exclude_dynapogo
+
+
+
+
+ deferredstuboob.js
+ -force:deferparse -pageheap:2
+
+
+
+
+ deferredWith.js
+ -Force:Deferparse
+ deferredWith.v4.baseline
+ exclude_fre
+
+
+
+
+ deferredWith2.js
+ -Force:Deferparse
+ deferredWith2.baseline
+ exclude_fre
+
+
+
+
+ newFunction.js
+ newFunction.baseline
+
+
+
+
+ prototype.js
+ prototype.baseline
+
+
+
+
+ TApply1.js
+ TApply1.baseline
+
+
+
+
+ toString.js
+ toString.baseline
+
+
+
+
+ funcExpr.js
+ funcExpr5.baseline
+
+
+
+
+ moreFuncExpr.js
+ moreFuncExpr3.baseline
+
+
+
+
+ moreFuncExpr.js
+ moreFuncExpr3.baseline
+ -forceundodefer
+
+
+
+
+ evenMoreFuncExpr3.js
+ evenMoreFuncExpr3.baseline
+
+
+
+
+ someMoreFuncExpr.js
+ someMoreFuncExpr3.baseline
+
+
+
+
+ constructor.js
+ constructor.baseline
+
+
+
+
+ ctrFlags.js
+ ctrFlags3.baseline
+
+
+
+
+ typeErrorAccessor.js
+ typeErrorAccessor.baseline
+
+
+
+
+ FuncBody.js
+ FuncBodyES5.baseline
+
+
+
+
+ FuncBody.bug133933.js
+ FuncBody.bug133933.baseline
+ -trace:FunctionSourceInfoParse -off:deferparse
+ exclude_fre,exclude_dynapogo
+
+
+
+
+ FuncBody.bug227901.js
+ FuncBody.bug227901.baseline
+ -off:deferparse
+
+
+
+
+ FuncBody.bug232281.js
+ FuncBody.bug232281.baseline
+ -off:deferparse
+
+
+
+
+ FuncBody.bug236810.js
+ -off:deferparse
+
+
+
+
+ FuncBody.bug231397.js
+ FuncBody.bug231397.baseline
+ -dump:bytecode
+ exclude_bytecodelayout,exclude_fre,require_backend
+
+
+
+
+ bug_258259.js
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ sameNamePara.js
+ sameNamePara.baseline
+
+
+
+
+ closure.js
+ closure.baseline
+
+
+
+
+ undefThis.js
+ undefThis.v10.baseline
+
+
+
+
+ stackargs.js
+ stackargs.baseline
+
+
+
+
+ StackArgsWithFormals.js
+ -mic:1 -off:simpleJit
+
+
+
+
+ StackArgsWithFormals.js
+ -mic:1 -off:simpleJit -forceserialized
+
+
+
+
+ StackArgsWithFormals.js
+ -mic:1 -off:simpleJit -forcedeferparse
+
+
+
+
+ StackArgsWithFormals.js
+ -mic:1 -off:simpleJit -trace:stackargformalsopt
+ exclude_dynapogo,exclude_fre,exclude_nonative,require_backend,exclude_forceserialized
+ StackArgsWithFormals.baseline
+
+
+
+
+ StackArgs_MaxInterpret.js
+ -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit
+ exclude_dynapogo
+
+
+
+
+ childCallsEvalJitLoopBody.js
+
+ -prejit
+ exclude_fre,exclude_dynapogo
+
+
+
+
+ 631838.js
+ -nonative
+
+ exclude_dynapogo,exclude_arm,Slow
+
+
+
+
+ calli.js
+
+
+
+
+ caller_replaced_proto.js
+
+
+
+
+ bug542360.js
+
+
+
+
+ crosssite_bind_main.js
+
+
+
+
+ failnativecodeinstall.js
+
+ -EnableFatalErrorOnOOM- -maxinterpretcount:2 -lic:1 -bgjit -off:simplejit -on:failnativecodeinstall
+ exclude_dynapogo,require_backend
+ failnativecodeinstall.baseline
+
+
+
+
+ redefer-recursive-inlinees.js
+ redefer-recursive-inlinees.baseline
+
+
+
+
+ redefer-f-i-b-eval.js
+ -force:deferparse -force:redeferral
+
+
+
diff --git a/deps/chakrashim/core/test/Intl/rlexe.xml b/deps/chakrashim/core/test/Intl/rlexe.xml
index 2ca4ca155ac..7326689e5b9 100644
--- a/deps/chakrashim/core/test/Intl/rlexe.xml
+++ b/deps/chakrashim/core/test/Intl/rlexe.xml
@@ -1,152 +1,152 @@
-
-
-
-
- Basics.js
- Intl
- -args summary -endargs
-
-
-
-
-
- Collator.js
- Intl
-
-
-
-
- CollatorOptions.js
- -args summary -endargs
- Intl,require_winglob
-
-
-
-
- CollatorSupportedLocales.js
- -args summary -endargs
- Intl
-
-
-
-
- CollatorUnsupportedLocales.js
- -args summary -endargs
- Intl,require_winglob
-
-
-
-
- DateTimeFormatInvalidOptions.js
- -args summary -endargs
- Intl
-
-
-
-
- DateTimeFormatOptions.js
- -args summary -endargs
- Intl,require_winglob
-
-
-
-
- NumberFormat.js
- NumberFormat.baseline
- Intl,require_winglob,exclude_drt
-
-
-
-
- NumberFormatOptions.js
- -args summary -endargs
- Intl
-
-
-
-
-
- GetCanonicalLocales.js
- -args summary -endargs
- Intl,require_winglob
-
-
-
-
- SupportedLocalesOf.js
- -args summary -endargs
- Intl,require_winglob
-
-
-
-
- IntlHiddenInternals.js
- Intl,require_winglob
-
-
-
-
- IntlTaintingTests.js
- IntlTaintingTests.baseline
- Intl,require_winglob
-
-
-
-
- IntlTaintingPreInitTests.js
- IntlTaintingPreInitTests.baseline
- Intl,require_winglob,exclude_drt
-
-
-
-
-
- IntlBuiltIns.js
- Intl,require_winglob
-
-
-
-
- IntlIdentities.js
- -args summary -endargs
- Intl,require_winglob
-
-
-
-
- -Intl -debugLaunch -dbgbaseline:IntlReturnedValueTests.js.dbg.baseline
- IntlReturnedValueTests.js
- Intl,require_winglob
-
-
-
-
-
-
- IntlInternalsHiddenFromExceptionStackTest.js
- IntlInternalsHiddenFromExceptionStackTest.baseline
- -ExtendedErrorStackForTestHost-
- Intl,require_winglob
-
-
-
-
-
- IntlInternalsHiddenFromFirstChanceExceptionStackTest.js
- IntlInternalsHiddenFromFirstChanceExceptionStackTest.baseline
- -ExtendedErrorStackForTestHost-
- Intl,require_winglob
-
-
-
-
-
-
-
- TaintingPreventionTests.js
- -args summary -endargs
- Intl,Slow
- 900
-
-
-
+
+
+
+
+ Basics.js
+ Intl
+ -args summary -endargs
+
+
+
+
+
+ Collator.js
+ Intl
+
+
+
+
+ CollatorOptions.js
+ -args summary -endargs
+ Intl,require_winglob
+
+
+
+
+ CollatorSupportedLocales.js
+ -args summary -endargs
+ Intl
+
+
+
+
+ CollatorUnsupportedLocales.js
+ -args summary -endargs
+ Intl,require_winglob
+
+
+
+
+ DateTimeFormatInvalidOptions.js
+ -args summary -endargs
+ Intl
+
+
+
+
+ DateTimeFormatOptions.js
+ -args summary -endargs
+ Intl,require_winglob
+
+
+
+
+ NumberFormat.js
+ NumberFormat.baseline
+ Intl,require_winglob,exclude_drt
+
+
+
+
+ NumberFormatOptions.js
+ -args summary -endargs
+ Intl
+
+
+
+
+
+ GetCanonicalLocales.js
+ -args summary -endargs
+ Intl,require_winglob
+
+
+
+
+ SupportedLocalesOf.js
+ -args summary -endargs
+ Intl,require_winglob
+
+
+
+
+ IntlHiddenInternals.js
+ Intl,require_winglob
+
+
+
+
+ IntlTaintingTests.js
+ IntlTaintingTests.baseline
+ Intl,require_winglob
+
+
+
+
+ IntlTaintingPreInitTests.js
+ IntlTaintingPreInitTests.baseline
+ Intl,require_winglob,exclude_drt
+
+
+
+
+
+ IntlBuiltIns.js
+ Intl,require_winglob
+
+
+
+
+ IntlIdentities.js
+ -args summary -endargs
+ Intl,require_winglob
+
+
+
+
+ -Intl -debugLaunch -dbgbaseline:IntlReturnedValueTests.js.dbg.baseline
+ IntlReturnedValueTests.js
+ Intl,require_winglob
+
+
+
+
+
+
+ IntlInternalsHiddenFromExceptionStackTest.js
+ IntlInternalsHiddenFromExceptionStackTest.baseline
+ -ExtendedErrorStackForTestHost-
+ Intl,require_winglob
+
+
+
+
+
+ IntlInternalsHiddenFromFirstChanceExceptionStackTest.js
+ IntlInternalsHiddenFromFirstChanceExceptionStackTest.baseline
+ -ExtendedErrorStackForTestHost-
+ Intl,require_winglob
+
+
+
+
+
+
+
+ TaintingPreventionTests.js
+ -args summary -endargs
+ Intl,Slow
+ 900
+
+
+
diff --git a/deps/chakrashim/core/test/JSON/rlexe.xml b/deps/chakrashim/core/test/JSON/rlexe.xml
index 8081c4283ec..9465aee83a2 100644
--- a/deps/chakrashim/core/test/JSON/rlexe.xml
+++ b/deps/chakrashim/core/test/JSON/rlexe.xml
@@ -1,105 +1,105 @@
-
-
-
-
- jx1.js
- jx1.baseline
-
-
-
-
- jx2.js
- jx2.baseline
-
- exclude_jenkins
-
-
-
-
- stringify-replacer.js
- stringify-replacer.baseline
- -recyclerstress
- exclude_fre,Slow
-
-
-
-
- replacerFunction.js
- 300
-
-
-
-
- space.js
- space.baseline
-
-
-
-
- simple.js
- simple.baseline
-
-
-
-
- simple.withLog.js
- simple.withLog.baseline
- -recyclerstress -trace:JSON
- exclude_fre,Slow
-
-
-
-
- simple.stringify.js
- simple.stringify.baseline
-
-
-
-
- parseWithGc.js
- -ForceGCAfterJSONParse
- exclude_fre
-
-
-
-
- jsonCache.js
- -ForceGCAfterJSONParse
- jsonCache.baseline
- exclude_fre
-
-
-
-
- jsonCache.js
- jsonCache.baseline
-
-
-
-
- json_parse_Blue_548957.js
-
-
-
-
- jsonParseWalkTest.js
- jsonParseWalkTest.baseline
-
-
-
-
- syntaxError.js
- syntaxError.baseline
-
-
-
-
- toJSON.js
-
-
-
-
- stackoverflow.js
-
-
-
+
+
+
+
+ jx1.js
+ jx1.baseline
+
+
+
+
+ jx2.js
+ jx2.baseline
+
+ exclude_jenkins
+
+
+
+
+ stringify-replacer.js
+ stringify-replacer.baseline
+ -recyclerstress
+ exclude_fre,Slow
+
+
+
+
+ replacerFunction.js
+ 300
+
+
+
+
+ space.js
+ space.baseline
+
+
+
+
+ simple.js
+ simple.baseline
+
+
+
+
+ simple.withLog.js
+ simple.withLog.baseline
+ -recyclerstress -trace:JSON
+ exclude_fre,Slow
+
+
+
+
+ simple.stringify.js
+ simple.stringify.baseline
+
+
+
+
+ parseWithGc.js
+ -ForceGCAfterJSONParse
+ exclude_fre
+
+
+
+
+ jsonCache.js
+ -ForceGCAfterJSONParse
+ jsonCache.baseline
+ exclude_fre
+
+
+
+
+ jsonCache.js
+ jsonCache.baseline
+
+
+
+
+ json_parse_Blue_548957.js
+
+
+
+
+ jsonParseWalkTest.js
+ jsonParseWalkTest.baseline
+
+
+
+
+ syntaxError.js
+ syntaxError.baseline
+
+
+
+
+ toJSON.js
+
+
+
+
+ stackoverflow.js
+
+
+
diff --git a/deps/chakrashim/core/test/Object/rlexe.xml b/deps/chakrashim/core/test/Object/rlexe.xml
index 0feecd5fb7e..303e6329ed5 100644
--- a/deps/chakrashim/core/test/Object/rlexe.xml
+++ b/deps/chakrashim/core/test/Object/rlexe.xml
@@ -1,431 +1,431 @@
-
-
-
-
- constructor.js
- constructor.baseline
-
-
-
-
- constructor1.js
- constructor1.baseline
-
-
-
-
- expandos.js
- expandos.baseline
-
-
-
-
- hasOwnProperty.js
- hasOwnProperty.baseline
-
-
-
-
- isEnumerable.js
- isEnumerable.baseline
-
-
-
-
- isPrototypeOf.js
- isPrototypeOf_v3.baseline
-
-
-
-
- Object.js
- Object.baseline
-
-
-
-
- null.js
- null.baseline
-
-
-
-
- propertyIsEnumerable.js
- propertyIsEnumerable.baseline
- Slow
-
-
-
-
- propertyDescriptorNonObject.js
- -args summary -endargs
-
-
-
-
- toLocaleString2.js
- -args summary -endargs
-
-
-
-
- toLocaleStringBasics.js
- toLocaleStringBasics.baseline
- -args summary -endargs
- Intl
-
-
-
-
-
- toString1.js
- toString3.baseline
-
-
-
-
- toString2.js
- toString2.baseline
-
-
-
-
- newobj.js
- newobj.baseline
-
-
-
-
- regex.js
- regex.baseline
-
-
-
-
- var.js
- var.baseline
-
-
-
-
- moreProperties-enumeration.js
- moreProperties-enumeration.baseline
- Slow
-
-
-
-
- Slow.js
- exclude_chk,Slow
-
-
-
-
- bigES5Array.js
- bigES5Array.baseline
- Slow
-
-
-
-
- NumericPropertyIsEnumerable.js
- NumericPropertyIsEnumerable.baseline
-
-
-
-
- defineProperty.js
- defineProperty_v3.baseline
-
-
-
-
- getOwnPropertyDescriptor.js
- getOwnPropertyDescriptor_v3.baseline
-
-
-
-
- getOwnPropertyDescriptors.js
- -args summary -endargs -ESObjectGetOwnPropertyDescriptors
-
-
-
-
- objectCreationOptimizations.js
- objectCreationOptimizations.baseline
-
-
-
-
- multivardecl.js
- multivardecl.baseline
-
-
-
-
- propertyStrings.js
-
-
-
-
- forinenumcache.js
- forinenumcache.baseline
-
-
-
-
- forinnonenumerableshadowing.js
- -args summary -endargs
-
-
-
-
- forinfastpath.js
- forinfastpath.baseline
-
-
-
-
- forIn.error.js
- forIn.error.baseline
- -ExtendedErrorStackForTestHost
-
-
-
-
- HashTable.js
-
-
-
-
- TypeSnapshotEnumeration.js
- TypeSnapshotEnumeration.baseline
-
-
-
-
- TypeSnapshotEnumerationCachedType.js
- -maxinterpretcount:1 -maxsimplejitruncount:1 -off:ArrayCheckHoist -args summary -endargs
-
-
-
-
- NewScObject-InlineSlotCapacityLocking.js
- NewScObject-InlineSlotCapacityLocking.baseline
-
-
-
-
- objlit_type.js
-
-
-
-
- PathTypeDeleteLastProperty.js
- -mic:1 -msjrc:1
-
-
-
-
- stackobject.js
- stackobject.baseline
-
-
-
-
- stackobject_escape.js
- stackobject_escape.baseline
-
-
-
-
- LargeAuxArray.js
- -BigDictionaryTypeHandlerThreshold:20
-
-
-
-
- stackobject_dependency.js
-
- -off:inline
-
-
-
-
- objectCreateNull.js
- -ES6Promise -args summary -endargs
-
-
-
-
- ObjectHeaderInlining_otherInstrs.js
- ObjectHeaderInlining_otherInstrs.baseline
- -off:simplejit -mic:2
-
-
-
-
- ObjectHeaderInlining.js
- ObjectHeaderInlining.baseline
- -off:simplejit -mic:2
-
-
-
-
- ObjectHeaderInlining_SimpleDictTypeHandler.js
- ObjectHeaderInlining_SimpleDictTypeHandler.baseline
- -nonative
- exclude_dynapogo
-
-
-
-
- ObjectHeaderInlining_DictTypeHandler.js
- ObjectHeaderInlining_DictTypeHandler.baseline
- -nonative
- exclude_dynapogo
-
-
-
-
- ObjectHeaderInlining_deleteProps.js
- ObjectHeaderInlining_deleteProps.baseline
- -nonative
- exclude_dynapogo
-
-
-
-
- ObjectHeaderInlining_prototype.js
- -nonative
- exclude_dynapogo
-
-
-
-
- ObjectHeaderInlining_prototypeTypeChange.js
- ObjectHeaderInlining_prototypeTypeChange.baseline
- -nonative
- exclude_dynapogo
-
-
-
-
- ObjectHeaderInlining_objArrayFastPath.js
- ObjectHeaderInlining_objArrayFastPath.baseline
- -mic:2 -off:simplejit
-
-
-
-
- ObjectHeaderInlining_StFldOpt.js
- ObjectHeaderInlining_StFldOpt.baseline
- -mic:2 -off:simplejit
-
-
-
-
- stackobject_dependency.js
-
- -off:inline
-
-
-
-
- stackobject_dependency.js
-
- -off:inline
-
-
-
-
- ObjectHeaderInlining_NewPropNoInlineCache.js
-
- -forcejitloopbody
-
-
-
-
- ObjectHeaderInlining_NewPropNoInlineCache_StaticType.js
-
- -msjrc:1 -mic:1
-
-
-
-
- ObjectHeaderInlining_NewPropSharedInlineCache.js
-
- -mic:1 -forcejitloopbody -off:interpreterautoprofile
-
-
-
-
- ForInInline.js
- ForInInline.baseline
- -loopinterpretcount:1 -force:inline -off:simplejit
-
-
-
-
- forinenumcachebuiltin.js
-
-
-
-
+
+
+
+
+ constructor.js
+ constructor.baseline
+
+
+
+
+ constructor1.js
+ constructor1.baseline
+
+
+
+
+ expandos.js
+ expandos.baseline
+
+
+
+
+ hasOwnProperty.js
+ hasOwnProperty.baseline
+
+
+
+
+ isEnumerable.js
+ isEnumerable.baseline
+
+
+
+
+ isPrototypeOf.js
+ isPrototypeOf_v3.baseline
+
+
+
+
+ Object.js
+ Object.baseline
+
+
+
+
+ null.js
+ null.baseline
+
+
+
+
+ propertyIsEnumerable.js
+ propertyIsEnumerable.baseline
+ Slow
+
+
+
+
+ propertyDescriptorNonObject.js
+ -args summary -endargs
+
+
+
+
+ toLocaleString2.js
+ -args summary -endargs
+
+
+
+
+ toLocaleStringBasics.js
+ toLocaleStringBasics.baseline
+ -args summary -endargs
+ Intl
+
+
+
+
+
+ toString1.js
+ toString3.baseline
+
+
+
+
+ toString2.js
+ toString2.baseline
+
+
+
+
+ newobj.js
+ newobj.baseline
+
+
+
+
+ regex.js
+ regex.baseline
+
+
+
+
+ var.js
+ var.baseline
+
+
+
+
+ moreProperties-enumeration.js
+ moreProperties-enumeration.baseline
+ Slow
+
+
+
+
+ Slow.js
+ exclude_chk,Slow
+
+
+
+
+ bigES5Array.js
+ bigES5Array.baseline
+ Slow
+
+
+
+
+ NumericPropertyIsEnumerable.js
+ NumericPropertyIsEnumerable.baseline
+
+
+
+
+ defineProperty.js
+ defineProperty_v3.baseline
+
+
+
+
+ getOwnPropertyDescriptor.js
+ getOwnPropertyDescriptor_v3.baseline
+
+
+
+
+ getOwnPropertyDescriptors.js
+ -args summary -endargs -ESObjectGetOwnPropertyDescriptors
+
+
+
+
+ objectCreationOptimizations.js
+ objectCreationOptimizations.baseline
+
+
+
+
+ multivardecl.js
+ multivardecl.baseline
+
+
+
+
+ propertyStrings.js
+
+
+
+
+ forinenumcache.js
+ forinenumcache.baseline
+
+
+
+
+ forinnonenumerableshadowing.js
+ -args summary -endargs
+
+
+
+
+ forinfastpath.js
+ forinfastpath.baseline
+
+
+
+
+ forIn.error.js
+ forIn.error.baseline
+ -ExtendedErrorStackForTestHost
+
+
+
+
+ HashTable.js
+
+
+
+
+ TypeSnapshotEnumeration.js
+ TypeSnapshotEnumeration.baseline
+
+
+
+
+ TypeSnapshotEnumerationCachedType.js
+ -maxinterpretcount:1 -maxsimplejitruncount:1 -off:ArrayCheckHoist -args summary -endargs
+
+
+
+
+ NewScObject-InlineSlotCapacityLocking.js
+ NewScObject-InlineSlotCapacityLocking.baseline
+
+
+
+
+ objlit_type.js
+
+
+
+
+ PathTypeDeleteLastProperty.js
+ -mic:1 -msjrc:1
+
+
+
+
+ stackobject.js
+ stackobject.baseline
+
+
+
+
+ stackobject_escape.js
+ stackobject_escape.baseline
+
+
+
+
+ LargeAuxArray.js
+ -BigDictionaryTypeHandlerThreshold:20
+
+
+
+
+ stackobject_dependency.js
+
+ -off:inline
+
+
+
+
+ objectCreateNull.js
+ -ES6Promise -args summary -endargs
+
+
+
+
+ ObjectHeaderInlining_otherInstrs.js
+ ObjectHeaderInlining_otherInstrs.baseline
+ -off:simplejit -mic:2
+
+
+
+
+ ObjectHeaderInlining.js
+ ObjectHeaderInlining.baseline
+ -off:simplejit -mic:2
+
+
+
+
+ ObjectHeaderInlining_SimpleDictTypeHandler.js
+ ObjectHeaderInlining_SimpleDictTypeHandler.baseline
+ -nonative
+ exclude_dynapogo
+
+
+
+
+ ObjectHeaderInlining_DictTypeHandler.js
+ ObjectHeaderInlining_DictTypeHandler.baseline
+ -nonative
+ exclude_dynapogo
+
+
+
+
+ ObjectHeaderInlining_deleteProps.js
+ ObjectHeaderInlining_deleteProps.baseline
+ -nonative
+ exclude_dynapogo
+
+
+
+
+ ObjectHeaderInlining_prototype.js
+ -nonative
+ exclude_dynapogo
+
+
+
+
+ ObjectHeaderInlining_prototypeTypeChange.js
+ ObjectHeaderInlining_prototypeTypeChange.baseline
+ -nonative
+ exclude_dynapogo
+
+
+
+
+ ObjectHeaderInlining_objArrayFastPath.js
+ ObjectHeaderInlining_objArrayFastPath.baseline
+ -mic:2 -off:simplejit
+
+
+
+
+ ObjectHeaderInlining_StFldOpt.js
+ ObjectHeaderInlining_StFldOpt.baseline
+ -mic:2 -off:simplejit
+
+
+
+
+ stackobject_dependency.js
+
+ -off:inline
+
+
+
+
+ stackobject_dependency.js
+
+ -off:inline
+
+
+
+
+ ObjectHeaderInlining_NewPropNoInlineCache.js
+
+ -forcejitloopbody
+
+
+
+
+ ObjectHeaderInlining_NewPropNoInlineCache_StaticType.js
+
+ -msjrc:1 -mic:1
+
+
+
+
+ ObjectHeaderInlining_NewPropSharedInlineCache.js
+
+ -mic:1 -forcejitloopbody -off:interpreterautoprofile
+
+
+
+
+ ForInInline.js
+ ForInInline.baseline
+ -loopinterpretcount:1 -force:inline -off:simplejit
+
+
+
+
+ forinenumcachebuiltin.js
+
+
+
+
diff --git a/deps/chakrashim/core/test/Strings/rlexe.xml b/deps/chakrashim/core/test/Strings/rlexe.xml
index 0ed6eae98c5..1767af28cb3 100644
--- a/deps/chakrashim/core/test/Strings/rlexe.xml
+++ b/deps/chakrashim/core/test/Strings/rlexe.xml
@@ -1,259 +1,259 @@
-
-
-
-
- charAt.js
- charAt.baseline
-
-
-
-
- fromCharCode.js
- fromCharCode.baseline
-
-
-
-
- charCodeAt.js
- charCodeAt.baseline
-
-
-
-
- concat1.js
- concat1.baseline
- -Intl-
-
-
-
-
- concat2.js
- concat2.baseline
- -Intl-
-
-
-
-
- concat3.js
- concat3.baseline
-
-
-
-
- concat4.js
- -Intl-
-
-
-
-
- concat5.js
- concat5.baseline
- -Intl-
-
-
-
-
- concat6.js
-
-
-
-
- concat7.js
- -off:bailonnoprofile -loopinterpretcount:1 -bgjit-
-
-
-
-
- concat_empty.js
- concat_empty.baseline
- -Intl-
-
-
-
-
- LeftDead.js
- -Intl-
-
-
-
-
- split1.js
- split1_v3.baseline
- -ES6ToLength
-
-
-
-
- stringBuiltin.js
- stringBuiltin.baseline
-
-
-
-
- toLowerCase.js
- toLowerCase.baseline
- -Intl-
-
-
-
-
- string_replace.js
- string_replace.baseline
- -Intl-
-
-
-
-
- compare.js
- compare.baseline
- -Intl-
-
-
-
-
- replace.js
- replace.baseline
-
-
-
-
- replace-xsite.js
- -args summary -endargs
-
-
-
-
- trim.js
- trim.baseline
-
-
-
-
- lastindexof.js
- -args summary -endargs
-
-
-
-
- indexof.js
- indexof.baseline
-
-
-
-
- neg_index.js
-
-
-
-
- substring.js
- substring.baseline
- -Intl-
-
-
-
-
- HTMLHelpers.js
- HTMLHelpers.baseline
- -Intl- -ES6StringPrototypeFixes
-
-
-
-
- stringindex.js
- stringindex_v3.baseline
-
-
-
-
- length.js
- length.baseline
- -Intl-
-
-
-
-
- stringtypespec.js
- stringtypespec.baseline
- -Intl-
-
-
-
-
- CompoundString.js
- CompoundString.baseline
- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -Intl-
- exclude_dynapogo,Slow
-
-
-
-
- concatmulti.js
- concatmulti.baseline
-
-
-
-
- concatmulti_compoundstring.js
- concatmulti_compoundstring.baseline
-
-
-
-
- concatmulti_large.js
- concatmulti_large.baseline
-
-
-
-
- concatmulti_loop.js
- concatmulti_loop.baseline
-
-
-
-
- long_concatstr.js
- long_concatstr.baseline
-
-
-
-
- StringTagFunctions.js
- StringTagFunctions.baseline
- -ES6StringPrototypeFixes
-
-
-
-
- string_object_indices_589140.js
- string_object_indices_589140.baseline
-
-
-
-
- property_and_index_of_string.js
- -args summary -endargs
-
-
-
-
- bug_OS_3080673.js
- BugFix
-
-
-
-
- unicode_toUpperCase_toLowerCase.js
- -args summary -endargs
- exclude_win7
-
-
-
-
+
+
+
+
+ charAt.js
+ charAt.baseline
+
+
+
+
+ fromCharCode.js
+ fromCharCode.baseline
+
+
+
+
+ charCodeAt.js
+ charCodeAt.baseline
+
+
+
+
+ concat1.js
+ concat1.baseline
+ -Intl-
+
+
+
+
+ concat2.js
+ concat2.baseline
+ -Intl-
+
+
+
+
+ concat3.js
+ concat3.baseline
+
+
+
+
+ concat4.js
+ -Intl-
+
+
+
+
+ concat5.js
+ concat5.baseline
+ -Intl-
+
+
+
+
+ concat6.js
+
+
+
+
+ concat7.js
+ -off:bailonnoprofile -loopinterpretcount:1 -bgjit-
+
+
+
+
+ concat_empty.js
+ concat_empty.baseline
+ -Intl-
+
+
+
+
+ LeftDead.js
+ -Intl-
+
+
+
+
+ split1.js
+ split1_v3.baseline
+ -ES6ToLength
+
+
+
+
+ stringBuiltin.js
+ stringBuiltin.baseline
+
+
+
+
+ toLowerCase.js
+ toLowerCase.baseline
+ -Intl-
+
+
+
+
+ string_replace.js
+ string_replace.baseline
+ -Intl-
+
+
+
+
+ compare.js
+ compare.baseline
+ -Intl-
+
+
+
+
+ replace.js
+ replace.baseline
+
+
+
+
+ replace-xsite.js
+ -args summary -endargs
+
+
+
+
+ trim.js
+ trim.baseline
+
+
+
+
+ lastindexof.js
+ -args summary -endargs
+
+
+
+
+ indexof.js
+ indexof.baseline
+
+
+
+
+ neg_index.js
+
+
+
+
+ substring.js
+ substring.baseline
+ -Intl-
+
+
+
+
+ HTMLHelpers.js
+ HTMLHelpers.baseline
+ -Intl- -ES6StringPrototypeFixes
+
+
+
+
+ stringindex.js
+ stringindex_v3.baseline
+
+
+
+
+ length.js
+ length.baseline
+ -Intl-
+
+
+
+
+ stringtypespec.js
+ stringtypespec.baseline
+ -Intl-
+
+
+
+
+ CompoundString.js
+ CompoundString.baseline
+ -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -Intl-
+ exclude_dynapogo,Slow
+
+
+
+
+ concatmulti.js
+ concatmulti.baseline
+
+
+
+
+ concatmulti_compoundstring.js
+ concatmulti_compoundstring.baseline
+
+
+
+
+ concatmulti_large.js
+ concatmulti_large.baseline
+
+
+
+
+ concatmulti_loop.js
+ concatmulti_loop.baseline
+
+
+
+
+ long_concatstr.js
+ long_concatstr.baseline
+
+
+
+
+ StringTagFunctions.js
+ StringTagFunctions.baseline
+ -ES6StringPrototypeFixes
+
+
+
+
+ string_object_indices_589140.js
+ string_object_indices_589140.baseline
+
+
+
+
+ property_and_index_of_string.js
+ -args summary -endargs
+
+
+
+
+ bug_OS_3080673.js
+ BugFix
+
+
+
+
+ unicode_toUpperCase_toLowerCase.js
+ -args summary -endargs
+ exclude_win7
+
+
+
+
diff --git a/deps/chakrashim/core/test/bailout/rlexe.xml b/deps/chakrashim/core/test/bailout/rlexe.xml
index 23c55d8a2b7..732dbbd1146 100644
--- a/deps/chakrashim/core/test/bailout/rlexe.xml
+++ b/deps/chakrashim/core/test/bailout/rlexe.xml
@@ -1,266 +1,266 @@
-
-
-
-
- arrayctor.js
- arrayctor.baseline
-
-
-
-
- bailout.js
- -dynamicprofilecache:profile.dpl.bailout.js
- exclude_dynapogo,exclude_fre
- bailout.baseline
-
-
-
-
- bailout.js
- -off:typespec -bailout:5 -dynamicprofileinput:profile.dpl.bailout.js
- exclude_interpreted,exclude_fre
- bailout.baseline
-
-
-
-
- bailout.js
- -bailout:10 -dynamicprofileinput:profile.dpl.bailout.js
- exclude_interpreted,exclude_fre
- bailout.baseline
-
-
-
-
- bailout2.js
- -bailout:7
- exclude_fre
- bailout2.baseline
-
-
-
-
- bailout3.js
- -bailout:6 -off:typespec
- exclude_fre
- bailout3.baseline
-
-
-
-
- bailout4.js
- -bailout:6 -off:typespec
- exclude_fre
- bailout4.baseline
-
-
-
-
- bailout5.js
- -bailout:9 -off:typespec
- exclude_fre
- bailout5.baseline
-
-
-
-
- bailout6.js
- -bailoutateverybytecode
- exclude_fre
-
-
-
-
- bailout7.js
- -bailoutbytecode:742 -off:deferparse
- exclude_fre
- bailout7.baseline
-
-
-
-
- bailout_loopbodystart.js
- -dynamicprofilecache:profile.dpl.bailout_loopbodystart.js
- exclude_dynapogo,exclude_fre
-
-
-
-
- bailout_loopbodystart.js
- -bailoutbytecode:17 -dynamicprofileinput:profile.dpl.bailout_loopbodystart.js
- exclude_interpreted,exclude_fre
-
-
-
-
- bailout_loopbodystart.js
- -bailoutbytecode:18 -dynamicprofileinput:profile.dpl.bailout_loopbodystart.js
- exclude_interpreted,exclude_fre
-
-
-
-
- bailout-eh.js
- -bailout:6
- exclude_fre
- bailout-eh.baseline
-
-
-
-
- bailout-args.js
- -bailoutbytecode:1
- exclude_fre
- bailout-args.baseline
-
-
-
-
- bailout-argobj.js
- -bailout:3 -bailout:11 -forcejitloopbody
- bailout-argobj.baseline
-
- exclude_forceserialized
-
-
-
-
- bailout-throw.js
- -bailout:5
- exclude_fre
- bailout-throw.baseline
-
-
-
-
- bailout-floatpref.js
- -dynamicprofilecache:profile.dpl.bailout-floatpref.js
- exclude_dynapogo,exclude_fre
- bailout-floatpref.baseline
-
-
-
-
- bailout-floatpref.js
- -bailout:3 -dynamicprofileinput:profile.dpl.bailout-floatpref.js
- exclude_interpreted,exclude_fre
- bailout-floatpref.baseline
-
-
-
-
- bailout-floatpref.js
- -bailoutateverybytecode -dynamicprofileinput:profile.dpl.bailout-floatpref.js
- exclude_interpreted,exclude_fre
- bailout-floatpref.baseline
-
-
-
-
- bailout-copyProp1.js
- -bailout:6
- exclude_fre
- bailout-copyProp1.baseline
-
-
-
-
- bailout-strict-exception.js
- bailout-strict-exception.baseline
-
-
-
-
- AggressiveIntTypeSpecWithFloatPref.js
- -on:aggressiveIntTypeSpec
- Void.baseline
-
-
-
-
- bailout-inlined.js
- -force:inline
- exclude_fre
-
-
-
-
-
- bug10.js
- bug10.baseline
-
-
-
-
- flags.js
- -bailoutbytecode:312
- flags.baseline
-
-
-
-
- initlocals.js
- -bailout:8
-
-
-
-
- implicit_nosideeffect.js
- implicit_nosideeffect.baseline
-
-
-
-
-
- inlineBuiltIns.js
- -dynamicprofilecache:profile.dpl.inlineBuiltIns.js
- exclude_dynapogo,exclude_default,exclude_serialized
- inlineBuiltIns.baseline
-
-
-
-
-
- inlineBuiltIns.js
- -args dynapogo -endargs -dynamicprofileinput:profile.dpl.inlineBuiltIns.js
- exclude_interpreted,exclude_serialized
- inlineBuiltIns.baseline
-
-
-
-
- bailout-branch.js
- bailout-branch.baseline
- -forcejitloopbody -force:fieldhoist
-
-
-
-
- bailout-checkthis.js
-
- -force:checkthis
-
-
-
-
- inline_call_bailout.js
- inline_call_bailout.baseline
-
-
-
-
- spill.js
-
-
-
-
- bug12782316.js
- -force:fieldcopyprop
-
-
-
-
- bug13674598.js
-
-
-
+
+
+
+
+ arrayctor.js
+ arrayctor.baseline
+
+
+
+
+ bailout.js
+ -dynamicprofilecache:profile.dpl.bailout.js
+ exclude_dynapogo,exclude_fre
+ bailout.baseline
+
+
+
+
+ bailout.js
+ -off:typespec -bailout:5 -dynamicprofileinput:profile.dpl.bailout.js
+ exclude_interpreted,exclude_fre
+ bailout.baseline
+
+
+
+
+ bailout.js
+ -bailout:10 -dynamicprofileinput:profile.dpl.bailout.js
+ exclude_interpreted,exclude_fre
+ bailout.baseline
+
+
+
+
+ bailout2.js
+ -bailout:7
+ exclude_fre
+ bailout2.baseline
+
+
+
+
+ bailout3.js
+ -bailout:6 -off:typespec
+ exclude_fre
+ bailout3.baseline
+
+
+
+
+ bailout4.js
+ -bailout:6 -off:typespec
+ exclude_fre
+ bailout4.baseline
+
+
+
+
+ bailout5.js
+ -bailout:9 -off:typespec
+ exclude_fre
+ bailout5.baseline
+
+
+
+
+ bailout6.js
+ -bailoutateverybytecode
+ exclude_fre
+
+
+
+
+ bailout7.js
+ -bailoutbytecode:742 -off:deferparse
+ exclude_fre
+ bailout7.baseline
+
+
+
+
+ bailout_loopbodystart.js
+ -dynamicprofilecache:profile.dpl.bailout_loopbodystart.js
+ exclude_dynapogo,exclude_fre
+
+
+
+
+ bailout_loopbodystart.js
+ -bailoutbytecode:17 -dynamicprofileinput:profile.dpl.bailout_loopbodystart.js
+ exclude_interpreted,exclude_fre
+
+
+
+
+ bailout_loopbodystart.js
+ -bailoutbytecode:18 -dynamicprofileinput:profile.dpl.bailout_loopbodystart.js
+ exclude_interpreted,exclude_fre
+
+
+
+
+ bailout-eh.js
+ -bailout:6
+ exclude_fre
+ bailout-eh.baseline
+
+
+
+
+ bailout-args.js
+ -bailoutbytecode:1
+ exclude_fre
+ bailout-args.baseline
+
+
+
+
+ bailout-argobj.js
+ -bailout:3 -bailout:11 -forcejitloopbody
+ bailout-argobj.baseline
+
+ exclude_forceserialized
+
+
+
+
+ bailout-throw.js
+ -bailout:5
+ exclude_fre
+ bailout-throw.baseline
+
+
+
+
+ bailout-floatpref.js
+ -dynamicprofilecache:profile.dpl.bailout-floatpref.js
+ exclude_dynapogo,exclude_fre
+ bailout-floatpref.baseline
+
+
+
+
+ bailout-floatpref.js
+ -bailout:3 -dynamicprofileinput:profile.dpl.bailout-floatpref.js
+ exclude_interpreted,exclude_fre
+ bailout-floatpref.baseline
+
+
+
+
+ bailout-floatpref.js
+ -bailoutateverybytecode -dynamicprofileinput:profile.dpl.bailout-floatpref.js
+ exclude_interpreted,exclude_fre
+ bailout-floatpref.baseline
+
+
+
+
+ bailout-copyProp1.js
+ -bailout:6
+ exclude_fre
+ bailout-copyProp1.baseline
+
+
+
+
+ bailout-strict-exception.js
+ bailout-strict-exception.baseline
+
+
+
+
+ AggressiveIntTypeSpecWithFloatPref.js
+ -on:aggressiveIntTypeSpec
+ Void.baseline
+
+
+
+
+ bailout-inlined.js
+ -force:inline
+ exclude_fre
+
+
+
+
+
+ bug10.js
+ bug10.baseline
+
+
+
+
+ flags.js
+ -bailoutbytecode:312
+ flags.baseline
+
+
+
+
+ initlocals.js
+ -bailout:8
+
+
+
+
+ implicit_nosideeffect.js
+ implicit_nosideeffect.baseline
+
+
+
+
+
+ inlineBuiltIns.js
+ -dynamicprofilecache:profile.dpl.inlineBuiltIns.js
+ exclude_dynapogo,exclude_default,exclude_serialized
+ inlineBuiltIns.baseline
+
+
+
+
+
+ inlineBuiltIns.js
+ -args dynapogo -endargs -dynamicprofileinput:profile.dpl.inlineBuiltIns.js
+ exclude_interpreted,exclude_serialized
+ inlineBuiltIns.baseline
+
+
+
+
+ bailout-branch.js
+ bailout-branch.baseline
+ -forcejitloopbody -force:fieldhoist
+
+
+
+
+ bailout-checkthis.js
+
+ -force:checkthis
+
+
+
+
+ inline_call_bailout.js
+ inline_call_bailout.baseline
+
+
+
+
+ spill.js
+
+
+
+
+ bug12782316.js
+ -force:fieldcopyprop
+
+
+
+
+ bug13674598.js
+
+
+
diff --git a/deps/chakrashim/core/test/es6/rlexe.xml b/deps/chakrashim/core/test/es6/rlexe.xml
index 0ad1a51e57d..6975d8d6514 100644
--- a/deps/chakrashim/core/test/es6/rlexe.xml
+++ b/deps/chakrashim/core/test/es6/rlexe.xml
@@ -1,1519 +1,1519 @@
-
-
-
-
- bug_issue_2747.js
- BugFix
-
-
-
-
- lambda1.js
- -off:deferparse -args summary -endargs
-
-
-
-
- lambda-expr.js
- lambda-expr.baseline
-
-
-
-
- lambda1.js
- -force:deferparse -args summary -endargs
-
-
-
-
- lambda-params-shadow.js
- -off:deferparse -es7asyncawait
-
-
-
-
- lambda-params-shadow.js
- -force:deferparse -es7asyncawait
-
-
-
-
- NumericLiteralTest.js
- -args summary -endargs
-
-
-
-
- boundBug3837520.js
- -es6generators -es6classes -args summary -endargs
- BugFix
-
-
-
-
- es6toLength.js
- -es6toLength -args summary -endargs
-
-
-
-
- toPrimitiveCrossScriptTestCase.js
-
-
-
-
-
- computedPropertyToString.js
- -ES6Classes -args summary -endargs
-
-
-
-
- computedPropertySideEffect.js
- -force:deferparse
- BugFix
-
-
-
-
- BugFix2214646.js
- BugFix
-
-
-
-
- es6IsConcatSpreadable.js
- -es6tolength -args summary -endargs
-
-
-
-
- toPrimitive.js
- -es6regexsymbols -es6functionname -args summary -endargs
-
-
-
-
- unscopablesWithScopeTest.js
- -args summary -endargs
-
-
-
-
- function.name.js
- -ES6Generators -ES6Classes -es6functionnamefull -args summary -endargs
-
-
-
-
- function.name.js
- -ES6Generators -ES6Classes -es6functionnamefull -force:deferparse -args summary -endargs
-
-
-
-
- superDotOSBug3930962.js
- -args summary -endargs
- BugFix
-
-
-
-
- toStringTag.js
- -args summary -endargs
- exclude_dynapogo
-
-
-
-
- proto_basic.js
- proto_basic.baseline
-
-
-
-
-
- proto_initializer.js
- proto_initializer.baseline
-
-
-
-
- proto_initializer.js
- proto_initializer.baseline
- -ForceSerialized
- exclude_serialized
-
-
-
-
- proto_addprop.js
- -maxinterpretcount:1 -off:simpleJit
-
-
-
-
- proto_addprop.js
- -maxinterpretcount:2 -off:simpleJit
-
-
-
-
- map_basic.js
- -args summary -endargs
-
-
-
-
- map_functionality.js
- -ES6ObjectLiterals -args summary -endargs
-
-
-
-
- set_basic.js
- -args summary -endargs
-
-
-
-
- set_functionality.js
- -ES6ObjectLiterals -args summary -endargs
-
-
-
-
- weakmap_basic.js
- -args summary -endargs
-
-
-
-
- weakmap_functionality.js
- -ES6ObjectLiterals -args summary -endargs
-
-
-
-
- weakset_basic.js
- -args summary -endargs
-
-
-
-
- weakset_functionality.js
- -ES6ObjectLiterals -args summary -endargs
-
-
-
-
- blockscope-activationobject.js
-
-
-
-
- blockscope-deferred.js
- blockscope-deferred.baseline
-
-
-
-
- blockscope-deferred.js
- -force:deferparse
- blockscope-deferred.baseline
-
-
-
-
- blockscope-functionbinding.js
- blockscope-functionbinding.baseline
-
-
-
-
- blockscope-functionbinding.js
- -force:deferparse
- blockscope-functionbinding.baseline
-
-
-
-
- blockscope-functionbinding.js
- -lic:1 -InitializeInterpreterSlotsWithInvalidStackVar
- blockscope-functionbinding.baseline
- exclude_fre
-
-
-
-
- letconst_global.js
- letconst_global.baseline
-
-
-
-
- letconst_global_shadowing.js
- letconst_global_shadowing.baseline
-
-
-
-
- letconst_global_shadow_builtins.js
- letconst_global_shadow_builtins.baseline
-
-
-
-
- letconst_global_shadow_builtins_nonconfigurable.js
- letconst_global_shadow_builtins_nonconfigurable.baseline
-
-
-
-
- letconst_global_shadow_deleted.js
- letconst_global_shadow_deleted.baseline
-
-
-
-
- letconst_global_shadow_accessor.js
- letconst_global_shadow_accessor.baseline
-
-
-
-
- letconst_global_bug.js
-
-
-
-
- letconst_eval_redecl.js
- letconst_eval_redecl.baseline
-
-
-
-
- letconst_eval_redecl.js
- letconst_eval_redecl.strictmode.baseline
- -forcestrictmode
-
-
-
-
- definegettersetter.js
- definegettersetter.baseline
-
-
-
-
- classes.js
- -Off:Deferparse -args summary -endargs
-
-
-
-
- classes.js
- -Force:Deferparse -args summary -endargs
-
-
-
-
- classes_bugfixes.js
- -Off:Deferparse -args summary -endargs
- BugFix
-
-
-
-
- classes_bugfixes.js
- -Force:Deferparse -args summary -endargs
- BugFix
-
-
-
-
- ES6Super.js
- -nonative -off:dynamicprofile -args summary -endargs
-
-
-
-
- ES6Super.js
- -Off:Deferparse -args summary -endargs
-
-
-
-
- ES6Super.js
- -Force:Deferparse -args summary -endargs
-
-
-
-
- classes_bug_OS_6471427.js
- -ForceSerialized
- BugFix
-
-
-
-
- classes_bug_OS_6471427.js
-
- BugFix
-
-
-
-
- classes_bug_OS_7100885.js
- -maxsimplejitruncount:4 -maxinterpretcount:4
- BugFix
-
-
-
-
- ES6SubclassableBuiltins.js
- -ES6Classes -ES6Spread -ES6Generators -ESSharedArrayBuffer -Off:Deferparse -args summary -endargs
-
-
-
-
- ES6SubclassableBuiltins.js
- -ES6Classes -ES6Spread -ES6Generators -ESSharedArrayBuffer -Force:Deferparse -args summary -endargs
-
-
-
-
- ES6SubclassableAsync.js
- -ES6Classes -ES6Spread -ES6Generators -Off:Deferparse
- ES6SubclassableAsync.baseline
-
-
-
-
- ES6SubclassableAsync.js
- -ES6Classes -ES6Spread -ES6Generators -Force:Deferparse
- ES6SubclassableAsync.baseline
-
-
-
-
- ES6MathAPIs.js
- -ES6Math -args summary -endargs
-
-
-
-
- ES6MathAPIs.js
- -ES6 -args summary -endargs
-
-
-
-
- ES6NumberAPIs.js
- -ES6Number -args summary -endargs
-
-
-
-
- ES6StringAPIs.js
- -ES6String -ES6RegExSymbols -args summary -endargs
-
-
-
-
- codePointAt.js
- codePointAt.baseline
- -ES6Unicode
-
-
-
-
- stringtemplate_basic.js
- stringtemplate_basic.baseline
-
-
-
-
- ES6StringTemplate.js
- -args summary -endargs
-
-
-
-
- ES6StringTemplateSlow.js
- -args summary -endargs
- Nightly
-
-
-
-
- ES6TypedArrayExtensions.js
- -ES6ObjectLiterals -ES6Species -ESSharedArrayBuffer -args summary -endargs
-
-
-
-
- ES6ArrayAPI.js
- -ES6ObjectLiterals -args summary -endargs
-
-
-
-
- ES6ArrayUseConstructor.js
- -ES6Species -args summary -endargs
-
-
-
-
- ES6ArrayUseConstructor_v5.js
- -ES6Species- -args summary -endargs
-
-
-
-
- ES6Symbol.js
- -ES6ObjectLiterals -ES6Species -ES6RegExSymbols -args summary -endargs
-
-
-
-
- ES6Symbol_540238.js
- -RecyclerStress
- exclude_fre
-
-
-
-
- ES6Promise.js
- -ES6 -ES6Promise -ES6Species -args summary -endargs
-
-
-
-
- ES6PromiseAsync.js
- ES6PromiseAsync.baseline
- -ES6 -ES6Promise
-
-
-
-
- normalize.js
- normalize.baseline
- -ES6Unicode
-
-
-
-
- normalizeProp.js
- normalizeProp.baseline
-
-
-
-
- unicode_escape_sequences.js
- unicode_escape_sequences.baseline
- -ES6Unicode -ES6RegExSticky
-
-
-
-
- unicode_6_identifiers_utf8.js
- unicode_6_identifiers_utf8.baseline
- -ES6Unicode
- exclude_win7,require_winglob
-
-
-
-
- unicode_regex_surrogate_atoms.js
- unicode_regex_surrogate_atoms.baseline
- -ES6Unicode -ES6RegExSticky
-
-
-
-
- spreadIterator.js
- -ES6Classes -args summary -endargs
-
-
-
-
- reflectConstructConsumeNewTarget.js
- -ES6Classes -args summary -endargs
-
-
-
-
- ReflectApiTests.js
- -ES6Classes -args summary -endargs
-
-
-
-
- proxyTrapConsumeNewTarget.js
- -ES6Classes -args summary -endargs
-
-
-
-
- CrossContextSpreadfunctionCall.js
-
-
-
-
- CrossContextPromiseFile1.js
-
-
-
-
- CrossContextPromise.js
-
-
-
-
- spread.js
- -ES6Spread -args summary -endargs
-
-
-
-
- unicode_convertUTF8.js
- -ES6Unicode
- Slow
-
-
-
-
- Bug517864.js
- -force:deferparse -ES6Unicode
-
-
-
-
- bug620694.js
- -es6all -recyclerstress
- exclude_fre,Slow
-
-
-
-
- unicode_6_identifier_Blue511452.js
- unicode_6_identifier_Blue511452.baseline
- -ES6Unicode
- exclude_dynapogo
-
-
-
-
- unicode_idDeferParseFunctions_utf8.js
- -ES6Unicode
-
-
-
-
- unicode_6_identifier_Blue524737.js
- unicode_6_identifier_Blue524737.baseline
- -ES6Unicode
- exclude_dynapogo
-
-
-
-
- supersyntax02.js
- supersyntax02.baseline
- exclude_dynapogo
-
-
-
-
- supersyntax05.js
- supersyntax05.baseline
- -ES6Classes
- exclude_dynapogo
-
-
-
-
- supersyntax06.js
- supersyntax06.baseline
- -ES6Classes
- exclude_dynapogo
-
-
-
-
- objlit.js
- -ES6 -ES6ObjectLiterals -ES6DefaultArgs -args summary -endargs
-
-
-
-
- unicode_regex_surrogate_utf8.js
- unicode_regex_surrogate_utf8.baseline
- -ES6Unicode -ES6RegExSticky
- Slow
- 300
-
-
-
-
- unicode_blue_533163_utf8.js
- unicode_blue_533163_utf8.baseline
- -ES6Unicode
-
-
-
-
- ES6Iterators-forof.js
- -ES6 -Intl- -args summary -endargs
-
-
-
-
- ES6Iterators-apis.js
- -ES6 -Intl- -args summary -endargs
-
-
-
-
- ES6Species-apis.js
- -ES6 -ES6Classes -ES6Species -args summary -endargs
-
-
-
-
- ES6Species-bugs.js
- -ES6 -ES6Species -args summary -endargs
- BugFix
-
-
-
-
- blue595539.js
- -ES6Unicode
-
-
-
-
- proxytest6.js
- -args summary -endargs
-
-
-
-
- proxybugs.js
- -args summary -endargs
-
-
-
-
- proxybug3.js
-
-
-
-
- proxyprotobug.js
- proxyprotobug.baseline
-
-
-
-
- proxybug.js
-
-
-
-
- ProxyCall.js
-
-
-
-
- proxyenumremoval.js
-
-
-
-
- proxy-issue884.js
- proxy-issue884.baseline
-
-
-
-
- nullPropertyDescriptor.js
-
-
-
-
- object-is.js
- -args summary -endargs
-
-
-
-
- object-assign.js
- -args summary -endargs
-
-
-
-
- default.js
- -force:deferparse -args summary -endargs
-
-
-
-
- default.js
- -off:deferparse -args summary -endargs
-
-
-
-
- default.js
- -force:CachedScope -args summary -endargs
-
-
-
-
- default-splitscope.js
- -off:deferparse -args summary -endargs
-
-
-
-
- default-splitscope.js
- -force:deferparse -args summary -endargs
-
-
-
-
- default-splitscope-undodeferparse.js
- -forceundodefer
-
-
-
-
- default-splitscope-serialized.js
- -forceserialized
-
-
-
-
- rest.js
- -ES6Rest -ES6ObjectLiterals -ES6Spread -ES6DefaultArgs -ES6Classes -args summary -endargs
-
-
-
-
- rest.js
- -ES6Rest -ES6ObjectLiterals -ES6Spread -ES6DefaultArgs -ES6Classes -force:deferparse -args summary -endargs
-
-
-
-
- generators-syntax.js
- -ES6Generators -ES6Classes -ES6DefaultArgs -args summary -endargs
- exclude_arm
-
-
-
-
- generators-deferparse.js
- -force:deferparse -ES6Generators -ES6Classes -ES6DefaultArgs
- exclude_arm
-
-
-
-
- generators-apis.js
- -ES6Generators -args summary -endargs
- exclude_arm
-
-
-
-
- generators-functionality.js
-
- -ES6Generators -ES6Classes -ES6DefaultArgs -args summary -endargs
- exclude_arm
-
-
-
-
- generators-deferred.js
- -ES6Generators -ES6Classes -force:deferparse
- exclude_arm
-
-
-
-
- generators-deferred.js
- -ES6Generators -ES6Classes -serialized
- exclude_arm,exclude_forceserialized
-
-
-
-
- generators-undodefer.js
- -ES6Generators -force:deferparse -forceundodefer
- exclude_dynapogo
-
-
-
-
- generators-cachedscope.js
- -ES6Generators
- exclude_arm
-
-
-
-
- generators-applyargs.js
-
- -ES6Generators -off:inlineapply
- exclude_arm
-
-
-
-
- generators-applyargs.js
- -ES6Generators
- exclude_arm
-
-
-
-
- destructuring.js
- -ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs
-
-
-
-
- destructuring_obj.js
- -ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs
-
-
-
-
- destructuring_params.js
- -ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs
-
-
-
-
- destructuring_params_arguments_override.js
-
-
-
-
- destructuring_catch.js
- -ES6Destructuring -ES6DefaultArgs -args summary -endargs
-
-
-
-
- destructuring_bugs.js
- -ES6Destructuring -ForceDeferParse -args summary -endargs
- BugFix
-
-
-
-
- bug_279376.js
- -es6spread
-
-
-
-
- OS_917200.js
- -ES6Destructuring-
-
-
-
-
- blue_641922.js
- blue_641922.baseline
- -ES6Rest -RecyclerNoPageReuse -PageHeap:2
- exclude_fre
-
-
-
-
- bug_981217.js
- bug_981217.baseline
-
-
-
-
- objlit-shorthand-error.js
- objlit-shorthand-error.baseline
-
-
-
-
- generator-strict-error.js
- generator-strict-error.baseline
- -ES6Generators -force:deferparse
-
-
-
-
- regex-annex-b.js
- -args summary -endargs
-
-
-
-
- regex-case-folding.js
- -version:6 -ES6RegExSticky -args summary -endargs
-
-
-
-
- regex-octoquad.js
- -RegexOptimize -args summary -endargs
- exclude_fre
-
-
-
-
- regex-quantifiers.js
- -args summary -endargs
-
-
-
-
- regex-code-point.js
- -ES6RegExSticky -args summary -endargs
-
-
-
-
- regex-unicode.js
- -args summary -endargs
-
-
-
-
- regex-unicode-CaseInsensitive.js
-
-
-
-
-
- regex-unicode-CaseInsensitive-all-i.js
- Slow
- 300
-
-
-
-
- regex-unicode-CaseInsensitive-all-iu.js
- Slow
- 300
-
-
-
-
- regex-set.js
- -args summary -endargs
-
-
-
-
- regex-prototype-properties.js
- -ES6RegExPrototypeProperties -ES6PrototypeChain -args summary -endargs
-
-
-
-
- regex-symbols.js
- -ES6RegExSymbols -ES6RegExPrototypeProperties -args summary -endargs
-
-
-
-
- regex-w-sharp-s-kelvin-sign.js
-
-
-
-
- regexflags.js
- -version:6 -ES6RegExSticky -ES6Unicode -ES6RegExPrototypeProperties -ES6Destructuring -args summary -endargs
-
-
-
-
- regexflags-disabled-features.js
- -ES6RegExSticky- -ES6Unicode- -ES6RegExPrototypeProperties -ES6Destructuring -args summary -endargs
-
-
-
-
- RegExpApisTestWithStickyFlag.js
- -version:6 -ES6RegExSticky -args summary -endargs
-
-
-
-
- stickyflag.js
- stickyflag.baseline
- -version:6 -ES6RegExSticky -args summary -endargs
-
-
-
-
- utfbug.js
-
- -dump:bytecode
- exclude_dynapogo
-
-
-
-
- proxybugWithLdFld.js
- -maxsimplejitruncount:2 -maxinterpretcount:1 -forcejitloopbody -off:bailonnoprofile
-
-
-
-
- proxybugWithproto.js
-
-
-
-
- ProxyInProxy.js
- ProxyInProxy.baseline
- -mic:1 -off:simpleJIT
- exclude_fre
-
-
-
-
- ProxySetPrototypeOf.js
- -args summary -endargs
-
-
-
-
- arraywithproxy.js
- arraywithproxy.baseline
-
-
-
-
- proxytest8.js
- proxytest8.baseline
-
-
-
-
- proxytest9.js
- proxytest9.baseline
- BugFix
-
-
-
-
- ES6Function_bugs.js
- BugFix,exclude_nonrazzle
- -ES6 -args summary -endargs
-
-
-
-
- OS_2700778.js
- -loopinterpretcount:1 -bgjit- -maxinterpretcount:3 -off:simplejit
- BugFix
-
-
-
-
- bug_OS_2184795.js
- BugFix
-
-
-
-
- unicode_whitespace.js
- BugFix
- -ES6 -args summary -endargs
-
-
-
-
- bug_OS_2553885.js
- exclude_win7,BugFix,Intl
-
-
-
-
- bug_OS_2915477.js
- BugFix
-
-
-
-
-
- bug_os3198161.js
- -es6all
- BugFix
-
-
-
-
- bug_OS_4498031.js
- -MaxinterpretCount:1 -MaxSimpleJITRunCount:1 -args summary -endargs
- BugFix
-
-
-
-
-
- ES6NewTarget.js
- -es6classes -ES6Destructuring -args summary -endargs -es6generators
-
-
-
-
-
- ES6NewTarget_bugfixes.js
- -ES6Classes -Off:Deferparse -args summary -endargs
- BugFix
-
-
-
-
- ES6NewTarget_bugfixes.js
- -ES6Classes -Force:Deferparse -args summary -endargs
- BugFix
-
-
-
-
- ES6NewTarget_bugfixes.js
- -ES6Classes -forceundodefer -args summary -endargs
- BugFix
-
-
-
-
-
- ES6Class_SuperChain.js
- -es6classes -args summary -endargs -es6generators
-
-
-
-
- globalLambdaNewTargetSyntaxError.js
- globalLambdaNewTargetSyntaxError.baseline
- exclude_dynapogo
-
-
-
-
- globalNewTargetSyntaxError.js
- globalNewTargetSyntaxError.baseline
- exclude_dynapogo
-
-
-
-
- globalCatchNewTargetSyntaxError.js
- globalCatchNewTargetSyntaxError.baseline
- exclude_dynapogo
-
-
-
-
- globalParamCatchNewTargetSyntaxError.js
- globalParamCatchNewTargetSyntaxError.baseline
- exclude_dynapogo
- -ES6Destructuring
-
-
-
-
- ES6Class_BaseClassConstruction.js
- -es6classes -args summary -endargs -es6generators
-
-
-
-
- expo.js
- -args summary -endargs -es7exponentiationoperator
-
-
-
-
- trailingcomma.js
- -args summary -endargs
-
-
-
-
- es6HasInstance.js
- -args summary -endargs
-
-
-
-
- ES6RestrictedProperties.js
- -args summary -endargs
-
-
-
-
- ES6Proto.js
- -args summary -endargs
-
-
-
-
- object_literal_bug.js
- -ES6Destructuring -args summary -endargs
- BugFix
-
-
-
-
- OS_5403724.js
- BugFix,exclude_
- -maxinterpretcount:3 -off:simpleJit -ES6 -args summary -endargs
- exclude_dynapogo
-
-
-
-
- forloops-per-iteration-bindings.js
- -args summary -endargs
-
-
-
-
- HTMLComments.js
- HTMLComments.baseline
-
-
-
-
- await-futreserved-only-in-modules.js
- -MuteHostErrorMsg -ES6Module
- exclude_dynapogo,exclude_xplat
-
-
-
-
- moduletest1.js
- -ES6Module
- exclude_dynapogo,exclude_sanitize_address
-
-
-
-
- moduletest2.js
- -ES6Module
- exclude_dynapogo,exclude_sanitize_address
-
-
-
-
- module-syntax.js
- -MuteHostErrorMsg -ES6Module -args summary -endargs
- exclude_dynapogo,exclude_sanitize_address
-
-
-
-
- module-syntax1.js
- -ES6Module -args summary -endargs
- exclude_sanitize_address
-
-
-
-
- module-functionality.js
- -MuteHostErrorMsg -ES6Module -args summary -endargs
- exclude_dynapogo,exclude_sanitize_address
-
-
-
-
- dynamic-module-functionality.js
- -ES6Module -args summary -endargs
- exclude_sanitize_address
-
-
-
-
- dynamic-module-import-specifier.js
- -MuteHostErrorMsg -ES6Module -args summary -endargs
- exclude_sanitize_address
-
-
-
-
- module-syntax.js
- -MuteHostErrorMsg -ES6Module -force:deferparse -args summary -endargs
- exclude_sanitize_address
-
-
-
-
- module-syntax1.js
- -ES6Module -force:deferparse -args summary -endargs
- exclude_sanitize_address
-
-
-
-
-
-
- module-bugfixes.js
- -ES6Module -args summary -endargs
- exclude_dynapogo,exclude_sanitize_address,bugfix
-
-
-
-
- bug_OS12095746.js
- -MuteHostErrorMsg -IgnoreScriptErrorCode -TraceHostCallback -ES6Module
- exclude_dynapogo,exclude_sanitize_address,bugfix,exclude_drt
- bug_OS12095746.baseline
-
-
-
-
- test_bug_2645.js
- -ES6Module
- exclude_sanitize_address
-
-
-
-
- OS_5500719.js
- -forceserialized
- exclude_dynapogo
-
-
-
-
- OS_8600339.js
- -forceserialized
- exclude_dynapogo
-
-
-
-
- iteratorclose.js
- -off:deferparse -args summary -endargs
-
-
-
-
- iteratorclose.js
- -force:deferparse -args summary -endargs
-
-
-
-
- bug_issue_1496.js
- -mic:1 -maxsimplejitruncount:2
- bug_issue_1496.baseline
- BugFix
-
-
-
-
- bug_issue_3076.js
- -force:deferparse
- BugFix,exclude_sanitize_address
-
-
-
-
- bug_issue_3247.js
- bug_issue_3247.baseline
- BugFix,exclude_sanitize_address
-
-
-
-
- bug_issue_3257.js
- bug_issue_3257.baseline
- BugFix,exclude_sanitize_address
-
-
-
-
- typedarray_bugs.js
- -args summary -endargs
- BugFix
-
-
-
-
- bug-OS10595959.js
- -maxsimplejitruncount:1 -maxinterpretcount:1 -off:stackargopt -stress:bailonnoprofile -args summary -endargs
- BugFix
-
-
-
-
- bug_OS10898061.js
- BugFix
-
-
-
-
- DeferParseLambda.js
- -off:deferparse -args summary -endargs
-
-
-
-
- DeferParseLambda.js
- -off:deferparse -args summary -endargs -deferparse
-
-
-
-
- DeferParseLambda.js
- -off:deferparse -args summary -endargs -deferparse -forceundodefer
-
-
-
-
- DeferParseMethods.js
- -off:deferparse -args summary -endargs
-
-
-
-
- DeferParseMethods.js
- -off:deferparse -args summary -endargs -deferparse
-
-
-
-
- DeferParseMethods.js
- -off:deferparse -args summary -endargs -deferparse -forceundodefer
-
-
-
+
+
+
+
+ bug_issue_2747.js
+ BugFix
+
+
+
+
+ lambda1.js
+ -off:deferparse -args summary -endargs
+
+
+
+
+ lambda-expr.js
+ lambda-expr.baseline
+
+
+
+
+ lambda1.js
+ -force:deferparse -args summary -endargs
+
+
+
+
+ lambda-params-shadow.js
+ -off:deferparse -es7asyncawait
+
+
+
+
+ lambda-params-shadow.js
+ -force:deferparse -es7asyncawait
+
+
+
+
+ NumericLiteralTest.js
+ -args summary -endargs
+
+
+
+
+ boundBug3837520.js
+ -es6generators -es6classes -args summary -endargs
+ BugFix
+
+
+
+
+ es6toLength.js
+ -es6toLength -args summary -endargs
+
+
+
+
+ toPrimitiveCrossScriptTestCase.js
+
+
+
+
+
+ computedPropertyToString.js
+ -ES6Classes -args summary -endargs
+
+
+
+
+ computedPropertySideEffect.js
+ -force:deferparse
+ BugFix
+
+
+
+
+ BugFix2214646.js
+ BugFix
+
+
+
+
+ es6IsConcatSpreadable.js
+ -es6tolength -args summary -endargs
+
+
+
+
+ toPrimitive.js
+ -es6regexsymbols -es6functionname -args summary -endargs
+
+
+
+
+ unscopablesWithScopeTest.js
+ -args summary -endargs
+
+
+
+
+ function.name.js
+ -ES6Generators -ES6Classes -es6functionnamefull -args summary -endargs
+
+
+
+
+ function.name.js
+ -ES6Generators -ES6Classes -es6functionnamefull -force:deferparse -args summary -endargs
+
+
+
+
+ superDotOSBug3930962.js
+ -args summary -endargs
+ BugFix
+
+
+
+
+ toStringTag.js
+ -args summary -endargs
+ exclude_dynapogo
+
+
+
+
+ proto_basic.js
+ proto_basic.baseline
+
+
+
+
+
+ proto_initializer.js
+ proto_initializer.baseline
+
+
+
+
+ proto_initializer.js
+ proto_initializer.baseline
+ -ForceSerialized
+ exclude_serialized
+
+
+
+
+ proto_addprop.js
+ -maxinterpretcount:1 -off:simpleJit
+
+
+
+
+ proto_addprop.js
+ -maxinterpretcount:2 -off:simpleJit
+
+
+
+
+ map_basic.js
+ -args summary -endargs
+
+
+
+
+ map_functionality.js
+ -ES6ObjectLiterals -args summary -endargs
+
+
+
+
+ set_basic.js
+ -args summary -endargs
+
+
+
+
+ set_functionality.js
+ -ES6ObjectLiterals -args summary -endargs
+
+
+
+
+ weakmap_basic.js
+ -args summary -endargs
+
+
+
+
+ weakmap_functionality.js
+ -ES6ObjectLiterals -args summary -endargs
+
+
+
+
+ weakset_basic.js
+ -args summary -endargs
+
+
+
+
+ weakset_functionality.js
+ -ES6ObjectLiterals -args summary -endargs
+
+
+
+
+ blockscope-activationobject.js
+
+
+
+
+ blockscope-deferred.js
+ blockscope-deferred.baseline
+
+
+
+
+ blockscope-deferred.js
+ -force:deferparse
+ blockscope-deferred.baseline
+
+
+
+
+ blockscope-functionbinding.js
+ blockscope-functionbinding.baseline
+
+
+
+
+ blockscope-functionbinding.js
+ -force:deferparse
+ blockscope-functionbinding.baseline
+
+
+
+
+ blockscope-functionbinding.js
+ -lic:1 -InitializeInterpreterSlotsWithInvalidStackVar
+ blockscope-functionbinding.baseline
+ exclude_fre
+
+
+
+
+ letconst_global.js
+ letconst_global.baseline
+
+
+
+
+ letconst_global_shadowing.js
+ letconst_global_shadowing.baseline
+
+
+
+
+ letconst_global_shadow_builtins.js
+ letconst_global_shadow_builtins.baseline
+
+
+
+
+ letconst_global_shadow_builtins_nonconfigurable.js
+ letconst_global_shadow_builtins_nonconfigurable.baseline
+
+
+
+
+ letconst_global_shadow_deleted.js
+ letconst_global_shadow_deleted.baseline
+
+
+
+
+ letconst_global_shadow_accessor.js
+ letconst_global_shadow_accessor.baseline
+
+
+
+
+ letconst_global_bug.js
+
+
+
+
+ letconst_eval_redecl.js
+ letconst_eval_redecl.baseline
+
+
+
+
+ letconst_eval_redecl.js
+ letconst_eval_redecl.strictmode.baseline
+ -forcestrictmode
+
+
+
+
+ definegettersetter.js
+ definegettersetter.baseline
+
+
+
+
+ classes.js
+ -Off:Deferparse -args summary -endargs
+
+
+
+
+ classes.js
+ -Force:Deferparse -args summary -endargs
+
+
+
+
+ classes_bugfixes.js
+ -Off:Deferparse -args summary -endargs
+ BugFix
+
+
+
+
+ classes_bugfixes.js
+ -Force:Deferparse -args summary -endargs
+ BugFix
+
+
+
+
+ ES6Super.js
+ -nonative -off:dynamicprofile -args summary -endargs
+
+
+
+
+ ES6Super.js
+ -Off:Deferparse -args summary -endargs
+
+
+
+
+ ES6Super.js
+ -Force:Deferparse -args summary -endargs
+
+
+
+
+ classes_bug_OS_6471427.js
+ -ForceSerialized
+ BugFix
+
+
+
+
+ classes_bug_OS_6471427.js
+
+ BugFix
+
+
+
+
+ classes_bug_OS_7100885.js
+ -maxsimplejitruncount:4 -maxinterpretcount:4
+ BugFix
+
+
+
+
+ ES6SubclassableBuiltins.js
+ -ES6Classes -ES6Spread -ES6Generators -ESSharedArrayBuffer -Off:Deferparse -args summary -endargs
+
+
+
+
+ ES6SubclassableBuiltins.js
+ -ES6Classes -ES6Spread -ES6Generators -ESSharedArrayBuffer -Force:Deferparse -args summary -endargs
+
+
+
+
+ ES6SubclassableAsync.js
+ -ES6Classes -ES6Spread -ES6Generators -Off:Deferparse
+ ES6SubclassableAsync.baseline
+
+
+
+
+ ES6SubclassableAsync.js
+ -ES6Classes -ES6Spread -ES6Generators -Force:Deferparse
+ ES6SubclassableAsync.baseline
+
+
+
+
+ ES6MathAPIs.js
+ -ES6Math -args summary -endargs
+
+
+
+
+ ES6MathAPIs.js
+ -ES6 -args summary -endargs
+
+
+
+
+ ES6NumberAPIs.js
+ -ES6Number -args summary -endargs
+
+
+
+
+ ES6StringAPIs.js
+ -ES6String -ES6RegExSymbols -args summary -endargs
+
+
+
+
+ codePointAt.js
+ codePointAt.baseline
+ -ES6Unicode
+
+
+
+
+ stringtemplate_basic.js
+ stringtemplate_basic.baseline
+
+
+
+
+ ES6StringTemplate.js
+ -args summary -endargs
+
+
+
+
+ ES6StringTemplateSlow.js
+ -args summary -endargs
+ Nightly
+
+
+
+
+ ES6TypedArrayExtensions.js
+ -ES6ObjectLiterals -ES6Species -ESSharedArrayBuffer -args summary -endargs
+
+
+
+
+ ES6ArrayAPI.js
+ -ES6ObjectLiterals -args summary -endargs
+
+
+
+
+ ES6ArrayUseConstructor.js
+ -ES6Species -args summary -endargs
+
+
+
+
+ ES6ArrayUseConstructor_v5.js
+ -ES6Species- -args summary -endargs
+
+
+
+
+ ES6Symbol.js
+ -ES6ObjectLiterals -ES6Species -ES6RegExSymbols -args summary -endargs
+
+
+
+
+ ES6Symbol_540238.js
+ -RecyclerStress
+ exclude_fre
+
+
+
+
+ ES6Promise.js
+ -ES6 -ES6Promise -ES6Species -args summary -endargs
+
+
+
+
+ ES6PromiseAsync.js
+ ES6PromiseAsync.baseline
+ -ES6 -ES6Promise
+
+
+
+
+ normalize.js
+ normalize.baseline
+ -ES6Unicode
+
+
+
+
+ normalizeProp.js
+ normalizeProp.baseline
+
+
+
+
+ unicode_escape_sequences.js
+ unicode_escape_sequences.baseline
+ -ES6Unicode -ES6RegExSticky
+
+
+
+
+ unicode_6_identifiers_utf8.js
+ unicode_6_identifiers_utf8.baseline
+ -ES6Unicode
+ exclude_win7,require_winglob
+
+
+
+
+ unicode_regex_surrogate_atoms.js
+ unicode_regex_surrogate_atoms.baseline
+ -ES6Unicode -ES6RegExSticky
+
+
+
+
+ spreadIterator.js
+ -ES6Classes -args summary -endargs
+
+
+
+
+ reflectConstructConsumeNewTarget.js
+ -ES6Classes -args summary -endargs
+
+
+
+
+ ReflectApiTests.js
+ -ES6Classes -args summary -endargs
+
+
+
+
+ proxyTrapConsumeNewTarget.js
+ -ES6Classes -args summary -endargs
+
+
+
+
+ CrossContextSpreadfunctionCall.js
+
+
+
+
+ CrossContextPromiseFile1.js
+
+
+
+
+ CrossContextPromise.js
+
+
+
+
+ spread.js
+ -ES6Spread -args summary -endargs
+
+
+
+
+ unicode_convertUTF8.js
+ -ES6Unicode
+ Slow
+
+
+
+
+ Bug517864.js
+ -force:deferparse -ES6Unicode
+
+
+
+
+ bug620694.js
+ -es6all -recyclerstress
+ exclude_fre,Slow
+
+
+
+
+ unicode_6_identifier_Blue511452.js
+ unicode_6_identifier_Blue511452.baseline
+ -ES6Unicode
+ exclude_dynapogo
+
+
+
+
+ unicode_idDeferParseFunctions_utf8.js
+ -ES6Unicode
+
+
+
+
+ unicode_6_identifier_Blue524737.js
+ unicode_6_identifier_Blue524737.baseline
+ -ES6Unicode
+ exclude_dynapogo
+
+
+
+
+ supersyntax02.js
+ supersyntax02.baseline
+ exclude_dynapogo
+
+
+
+
+ supersyntax05.js
+ supersyntax05.baseline
+ -ES6Classes
+ exclude_dynapogo
+
+
+
+
+ supersyntax06.js
+ supersyntax06.baseline
+ -ES6Classes
+ exclude_dynapogo
+
+
+
+
+ objlit.js
+ -ES6 -ES6ObjectLiterals -ES6DefaultArgs -args summary -endargs
+
+
+
+
+ unicode_regex_surrogate_utf8.js
+ unicode_regex_surrogate_utf8.baseline
+ -ES6Unicode -ES6RegExSticky
+ Slow
+ 300
+
+
+
+
+ unicode_blue_533163_utf8.js
+ unicode_blue_533163_utf8.baseline
+ -ES6Unicode
+
+
+
+
+ ES6Iterators-forof.js
+ -ES6 -Intl- -args summary -endargs
+
+
+
+
+ ES6Iterators-apis.js
+ -ES6 -Intl- -args summary -endargs
+
+
+
+
+ ES6Species-apis.js
+ -ES6 -ES6Classes -ES6Species -args summary -endargs
+
+
+
+
+ ES6Species-bugs.js
+ -ES6 -ES6Species -args summary -endargs
+ BugFix
+
+
+
+
+ blue595539.js
+ -ES6Unicode
+
+
+
+
+ proxytest6.js
+ -args summary -endargs
+
+
+
+
+ proxybugs.js
+ -args summary -endargs
+
+
+
+
+ proxybug3.js
+
+
+
+
+ proxyprotobug.js
+ proxyprotobug.baseline
+
+
+
+
+ proxybug.js
+
+
+
+
+ ProxyCall.js
+
+
+
+
+ proxyenumremoval.js
+
+
+
+
+ proxy-issue884.js
+ proxy-issue884.baseline
+
+
+
+
+ nullPropertyDescriptor.js
+
+
+
+
+ object-is.js
+ -args summary -endargs
+
+
+
+
+ object-assign.js
+ -args summary -endargs
+
+
+
+
+ default.js
+ -force:deferparse -args summary -endargs
+
+
+
+
+ default.js
+ -off:deferparse -args summary -endargs
+
+
+
+
+ default.js
+ -force:CachedScope -args summary -endargs
+
+
+
+
+ default-splitscope.js
+ -off:deferparse -args summary -endargs
+
+
+
+
+ default-splitscope.js
+ -force:deferparse -args summary -endargs
+
+
+
+
+ default-splitscope-undodeferparse.js
+ -forceundodefer
+
+
+
+
+ default-splitscope-serialized.js
+ -forceserialized
+
+
+
+
+ rest.js
+ -ES6Rest -ES6ObjectLiterals -ES6Spread -ES6DefaultArgs -ES6Classes -args summary -endargs
+
+
+
+
+ rest.js
+ -ES6Rest -ES6ObjectLiterals -ES6Spread -ES6DefaultArgs -ES6Classes -force:deferparse -args summary -endargs
+
+
+
+
+ generators-syntax.js
+ -ES6Generators -ES6Classes -ES6DefaultArgs -args summary -endargs
+ exclude_arm
+
+
+
+
+ generators-deferparse.js
+ -force:deferparse -ES6Generators -ES6Classes -ES6DefaultArgs
+ exclude_arm
+
+
+
+
+ generators-apis.js
+ -ES6Generators -args summary -endargs
+ exclude_arm
+
+
+
+
+ generators-functionality.js
+
+ -ES6Generators -ES6Classes -ES6DefaultArgs -args summary -endargs
+ exclude_arm
+
+
+
+
+ generators-deferred.js
+ -ES6Generators -ES6Classes -force:deferparse
+ exclude_arm
+
+
+
+
+ generators-deferred.js
+ -ES6Generators -ES6Classes -serialized
+ exclude_arm,exclude_forceserialized
+
+
+
+
+ generators-undodefer.js
+ -ES6Generators -force:deferparse -forceundodefer
+ exclude_dynapogo
+
+
+
+
+ generators-cachedscope.js
+ -ES6Generators
+ exclude_arm
+
+
+
+
+ generators-applyargs.js
+
+ -ES6Generators -off:inlineapply
+ exclude_arm
+
+
+
+
+ generators-applyargs.js
+ -ES6Generators
+ exclude_arm
+
+
+
+
+ destructuring.js
+ -ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs
+
+
+
+
+ destructuring_obj.js
+ -ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs
+
+
+
+
+ destructuring_params.js
+ -ES6Rest -ES6Classes -ES6Destructuring -ES6DefaultArgs -args summary -endargs
+
+
+
+
+ destructuring_params_arguments_override.js
+
+
+
+
+ destructuring_catch.js
+ -ES6Destructuring -ES6DefaultArgs -args summary -endargs
+
+
+
+
+ destructuring_bugs.js
+ -ES6Destructuring -ForceDeferParse -args summary -endargs
+ BugFix
+
+
+
+
+ bug_279376.js
+ -es6spread
+
+
+
+
+ OS_917200.js
+ -ES6Destructuring-
+
+
+
+
+ blue_641922.js
+ blue_641922.baseline
+ -ES6Rest -RecyclerNoPageReuse -PageHeap:2
+ exclude_fre
+
+
+
+
+ bug_981217.js
+ bug_981217.baseline
+
+
+
+
+ objlit-shorthand-error.js
+ objlit-shorthand-error.baseline
+
+
+
+
+ generator-strict-error.js
+ generator-strict-error.baseline
+ -ES6Generators -force:deferparse
+
+
+
+
+ regex-annex-b.js
+ -args summary -endargs
+
+
+
+
+ regex-case-folding.js
+ -version:6 -ES6RegExSticky -args summary -endargs
+
+
+
+
+ regex-octoquad.js
+ -RegexOptimize -args summary -endargs
+ exclude_fre
+
+
+
+
+ regex-quantifiers.js
+ -args summary -endargs
+
+
+
+
+ regex-code-point.js
+ -ES6RegExSticky -args summary -endargs
+
+
+
+
+ regex-unicode.js
+ -args summary -endargs
+
+
+
+
+ regex-unicode-CaseInsensitive.js
+
+
+
+
+
+ regex-unicode-CaseInsensitive-all-i.js
+ Slow
+ 300
+
+
+
+
+ regex-unicode-CaseInsensitive-all-iu.js
+ Slow
+ 300
+
+
+
+
+ regex-set.js
+ -args summary -endargs
+
+
+
+
+ regex-prototype-properties.js
+ -ES6RegExPrototypeProperties -ES6PrototypeChain -args summary -endargs
+
+
+
+
+ regex-symbols.js
+ -ES6RegExSymbols -ES6RegExPrototypeProperties -args summary -endargs
+
+
+
+
+ regex-w-sharp-s-kelvin-sign.js
+
+
+
+
+ regexflags.js
+ -version:6 -ES6RegExSticky -ES6Unicode -ES6RegExPrototypeProperties -ES6Destructuring -args summary -endargs
+
+
+
+
+ regexflags-disabled-features.js
+ -ES6RegExSticky- -ES6Unicode- -ES6RegExPrototypeProperties -ES6Destructuring -args summary -endargs
+
+
+
+
+ RegExpApisTestWithStickyFlag.js
+ -version:6 -ES6RegExSticky -args summary -endargs
+
+
+
+
+ stickyflag.js
+ stickyflag.baseline
+ -version:6 -ES6RegExSticky -args summary -endargs
+
+
+
+
+ utfbug.js
+
+ -dump:bytecode
+ exclude_dynapogo
+
+
+
+
+ proxybugWithLdFld.js
+ -maxsimplejitruncount:2 -maxinterpretcount:1 -forcejitloopbody -off:bailonnoprofile
+
+
+
+
+ proxybugWithproto.js
+
+
+
+
+ ProxyInProxy.js
+ ProxyInProxy.baseline
+ -mic:1 -off:simpleJIT
+ exclude_fre
+
+
+
+
+ ProxySetPrototypeOf.js
+ -args summary -endargs
+
+
+
+
+ arraywithproxy.js
+ arraywithproxy.baseline
+
+
+
+
+ proxytest8.js
+ proxytest8.baseline
+
+
+
+
+ proxytest9.js
+ proxytest9.baseline
+ BugFix
+
+
+
+
+ ES6Function_bugs.js
+ BugFix,exclude_nonrazzle
+ -ES6 -args summary -endargs
+
+
+
+
+ OS_2700778.js
+ -loopinterpretcount:1 -bgjit- -maxinterpretcount:3 -off:simplejit
+ BugFix
+
+
+
+
+ bug_OS_2184795.js
+ BugFix
+
+
+
+
+ unicode_whitespace.js
+ BugFix
+ -ES6 -args summary -endargs
+
+
+
+
+ bug_OS_2553885.js
+ exclude_win7,BugFix,Intl
+
+
+
+
+ bug_OS_2915477.js
+ BugFix
+
+
+
+
+
+ bug_os3198161.js
+ -es6all
+ BugFix
+
+
+
+
+ bug_OS_4498031.js
+ -MaxinterpretCount:1 -MaxSimpleJITRunCount:1 -args summary -endargs
+ BugFix
+
+
+
+
+
+ ES6NewTarget.js
+ -es6classes -ES6Destructuring -args summary -endargs -es6generators
+
+
+
+
+
+ ES6NewTarget_bugfixes.js
+ -ES6Classes -Off:Deferparse -args summary -endargs
+ BugFix
+
+
+
+
+ ES6NewTarget_bugfixes.js
+ -ES6Classes -Force:Deferparse -args summary -endargs
+ BugFix
+
+
+
+
+ ES6NewTarget_bugfixes.js
+ -ES6Classes -forceundodefer -args summary -endargs
+ BugFix
+
+
+
+
+
+ ES6Class_SuperChain.js
+ -es6classes -args summary -endargs -es6generators
+
+
+
+
+ globalLambdaNewTargetSyntaxError.js
+ globalLambdaNewTargetSyntaxError.baseline
+ exclude_dynapogo
+
+
+
+
+ globalNewTargetSyntaxError.js
+ globalNewTargetSyntaxError.baseline
+ exclude_dynapogo
+
+
+
+
+ globalCatchNewTargetSyntaxError.js
+ globalCatchNewTargetSyntaxError.baseline
+ exclude_dynapogo
+
+
+
+
+ globalParamCatchNewTargetSyntaxError.js
+ globalParamCatchNewTargetSyntaxError.baseline
+ exclude_dynapogo
+ -ES6Destructuring
+
+
+
+
+ ES6Class_BaseClassConstruction.js
+ -es6classes -args summary -endargs -es6generators
+
+
+
+
+ expo.js
+ -args summary -endargs -es7exponentiationoperator
+
+
+
+
+ trailingcomma.js
+ -args summary -endargs
+
+
+
+
+ es6HasInstance.js
+ -args summary -endargs
+
+
+
+
+ ES6RestrictedProperties.js
+ -args summary -endargs
+
+
+
+
+ ES6Proto.js
+ -args summary -endargs
+
+
+
+
+ object_literal_bug.js
+ -ES6Destructuring -args summary -endargs
+ BugFix
+
+
+
+
+ OS_5403724.js
+ BugFix,exclude_
+ -maxinterpretcount:3 -off:simpleJit -ES6 -args summary -endargs
+ exclude_dynapogo
+
+
+
+
+ forloops-per-iteration-bindings.js
+ -args summary -endargs
+
+
+
+
+ HTMLComments.js
+ HTMLComments.baseline
+
+
+
+
+ await-futreserved-only-in-modules.js
+ -MuteHostErrorMsg -ES6Module
+ exclude_dynapogo,exclude_xplat
+
+
+
+
+ moduletest1.js
+ -ES6Module
+ exclude_dynapogo,exclude_sanitize_address
+
+
+
+
+ moduletest2.js
+ -ES6Module
+ exclude_dynapogo,exclude_sanitize_address
+
+
+
+
+ module-syntax.js
+ -MuteHostErrorMsg -ES6Module -args summary -endargs
+ exclude_dynapogo,exclude_sanitize_address
+
+
+
+
+ module-syntax1.js
+ -ES6Module -args summary -endargs
+ exclude_sanitize_address
+
+
+
+
+ module-functionality.js
+ -MuteHostErrorMsg -ES6Module -args summary -endargs
+ exclude_dynapogo,exclude_sanitize_address
+
+
+
+
+ dynamic-module-functionality.js
+ -ES6Module -args summary -endargs
+ exclude_sanitize_address
+
+
+
+
+ dynamic-module-import-specifier.js
+ -MuteHostErrorMsg -ES6Module -args summary -endargs
+ exclude_sanitize_address
+
+
+
+
+ module-syntax.js
+ -MuteHostErrorMsg -ES6Module -force:deferparse -args summary -endargs
+ exclude_sanitize_address
+
+
+
+
+ module-syntax1.js
+ -ES6Module -force:deferparse -args summary -endargs
+ exclude_sanitize_address
+
+
+
+
+
+
+ module-bugfixes.js
+ -ES6Module -args summary -endargs
+ exclude_dynapogo,exclude_sanitize_address,bugfix
+
+
+
+
+ bug_OS12095746.js
+ -MuteHostErrorMsg -IgnoreScriptErrorCode -TraceHostCallback -ES6Module
+ exclude_dynapogo,exclude_sanitize_address,bugfix,exclude_drt
+ bug_OS12095746.baseline
+
+
+
+
+ test_bug_2645.js
+ -ES6Module
+ exclude_sanitize_address
+
+
+
+
+ OS_5500719.js
+ -forceserialized
+ exclude_dynapogo
+
+
+
+
+ OS_8600339.js
+ -forceserialized
+ exclude_dynapogo
+
+
+
+
+ iteratorclose.js
+ -off:deferparse -args summary -endargs
+
+
+
+
+ iteratorclose.js
+ -force:deferparse -args summary -endargs
+
+
+
+
+ bug_issue_1496.js
+ -mic:1 -maxsimplejitruncount:2
+ bug_issue_1496.baseline
+ BugFix
+
+
+
+
+ bug_issue_3076.js
+ -force:deferparse
+ BugFix,exclude_sanitize_address
+
+
+
+
+ bug_issue_3247.js
+ bug_issue_3247.baseline
+ BugFix,exclude_sanitize_address
+
+
+
+
+ bug_issue_3257.js
+ bug_issue_3257.baseline
+ BugFix,exclude_sanitize_address
+
+
+
+
+ typedarray_bugs.js
+ -args summary -endargs
+ BugFix
+
+
+
+
+ bug-OS10595959.js
+ -maxsimplejitruncount:1 -maxinterpretcount:1 -off:stackargopt -stress:bailonnoprofile -args summary -endargs
+ BugFix
+
+
+
+
+ bug_OS10898061.js
+ BugFix
+
+
+
+
+ DeferParseLambda.js
+ -off:deferparse -args summary -endargs
+
+
+
+
+ DeferParseLambda.js
+ -off:deferparse -args summary -endargs -deferparse
+
+
+
+
+ DeferParseLambda.js
+ -off:deferparse -args summary -endargs -deferparse -forceundodefer
+
+
+
+
+ DeferParseMethods.js
+ -off:deferparse -args summary -endargs
+
+
+
+
+ DeferParseMethods.js
+ -off:deferparse -args summary -endargs -deferparse
+
+
+
+
+ DeferParseMethods.js
+ -off:deferparse -args summary -endargs -deferparse -forceundodefer
+
+
+
diff --git a/deps/chakrashim/core/test/es7/rlexe.xml b/deps/chakrashim/core/test/es7/rlexe.xml
index 9ef25ad1f77..2f9cfeed21b 100644
--- a/deps/chakrashim/core/test/es7/rlexe.xml
+++ b/deps/chakrashim/core/test/es7/rlexe.xml
@@ -1,110 +1,110 @@
-
-
-
-
- asyncawait-syntax.js
- -es6experimental -nodeferparse -args summary -endargs
-
-
-
-
- asyncawait-syntax.js
- -es6experimental -forcedeferparse -args summary -endargs
-
-
-
-
- asyncawait-functionality.js
- -es6experimental -nodeferparse -args summary -endargs
- asyncawait-functionality.baseline
-
-
-
-
- asyncawait-functionality.js
- -es6experimental -forcedeferparse -args summary -endargs
- asyncawait-functionality.baseline
-
-
-
-
- asyncawait-undodefer.js
- -forceundodefer
- asyncawait-undodefer.baseline
-
-
-
-
- stringpad.js
- -args summary -endargs
-
-
-
-
- asyncawait-apis.js
- -es7asyncawait -args summary -endargs
-
-
-
-
- valuesAndEntries.js
- -args summary -endargs
- BugFix
-
-
-
-
- misc_bugs.js
- -es6experimental -args summary -endargs
- BugFix
-
-
-
-
- misc_bugs.js
- -es6experimental -ForceDeferParse -args summary -endargs
- BugFix
-
-
-
-
- immutable-prototype.js
- -args summary -endargs
-
-
-
-
- lookupgettersetter.js
- -args summary -endargs
- BugFix
-
-
-
-
- sharedarraybuffer.js
- -ESSharedArrayBuffer -args summary -endargs
-
-
-
-
- atomics_test.js
- -ESSharedArrayBuffer -args summary -endargs
- exclude_xplat
-
-
-
-
- arraybuffer_transfer.js
-
- -EnableFatalErrorOnOOM- -es6experimental -args 0x1000 -endargs
- exclude_amd64
-
-
-
-
- arraybuffer_transfer.js
- -EnableFatalErrorOnOOM- -es6experimental -args 0 -endargs
- exclude_amd64
-
-
-
+
+
+
+
+ asyncawait-syntax.js
+ -es6experimental -nodeferparse -args summary -endargs
+
+
+
+
+ asyncawait-syntax.js
+ -es6experimental -forcedeferparse -args summary -endargs
+
+
+
+
+ asyncawait-functionality.js
+ -es6experimental -nodeferparse -args summary -endargs
+ asyncawait-functionality.baseline
+
+
+
+
+ asyncawait-functionality.js
+ -es6experimental -forcedeferparse -args summary -endargs
+ asyncawait-functionality.baseline
+
+
+
+
+ asyncawait-undodefer.js
+ -forceundodefer
+ asyncawait-undodefer.baseline
+
+
+
+
+ stringpad.js
+ -args summary -endargs
+
+
+
+
+ asyncawait-apis.js
+ -es7asyncawait -args summary -endargs
+
+
+
+
+ valuesAndEntries.js
+ -args summary -endargs
+ BugFix
+
+
+
+
+ misc_bugs.js
+ -es6experimental -args summary -endargs
+ BugFix
+
+
+
+
+ misc_bugs.js
+ -es6experimental -ForceDeferParse -args summary -endargs
+ BugFix
+
+
+
+
+ immutable-prototype.js
+ -args summary -endargs
+
+
+
+
+ lookupgettersetter.js
+ -args summary -endargs
+ BugFix
+
+
+
+
+ sharedarraybuffer.js
+ -ESSharedArrayBuffer -args summary -endargs
+
+
+
+
+ atomics_test.js
+ -ESSharedArrayBuffer -args summary -endargs
+ exclude_xplat
+
+
+
+
+ arraybuffer_transfer.js
+
+ -EnableFatalErrorOnOOM- -es6experimental -args 0x1000 -endargs
+ exclude_amd64
+
+
+
+
+ arraybuffer_transfer.js
+ -EnableFatalErrorOnOOM- -es6experimental -args 0 -endargs
+ exclude_amd64
+
+
+
diff --git a/deps/chakrashim/core/test/switchStatement/rlexe.xml b/deps/chakrashim/core/test/switchStatement/rlexe.xml
index 89096e77180..6d0e99fa24d 100644
--- a/deps/chakrashim/core/test/switchStatement/rlexe.xml
+++ b/deps/chakrashim/core/test/switchStatement/rlexe.xml
@@ -1,164 +1,164 @@
-
-
-
-
- allIIntCases.js
- allIIntCases.baseline
-
-
-
-
- emptyCases.js
- emptyCases.baseline
-
-
-
-
- moreSwitches1.js
- moreSwitches1.baseline
-
-
-
-
- moreSwitches2.js
- moreSwitches2.baseline
-
-
-
-
- switchMathExp.js
- switchMathExp.baseline
-
-
-
-
- allStringCases.js
- allStringCases.baseline
-
-
-
-
- stringAndNonStrings.js
- stringAndNonStrings.baseline
-
-
-
-
- repeatIntCases.js
- repeatIntCases.baseline
-
-
-
-
- emptyStringCases.js
- emptyStringCases.baseline
-
-
-
-
- repeatStringCases.js
- repeatStringCases.baseline
-
-
-
-
- loopAndRetarget.js
- loopAndRetarget.baseline
-
-
-
-
- implicitCallSwitchExpr.js
- implicitCallSwitchExpr.baseline
- -maxinterpretcount:1 -off:simpleJit -bgjit- -loopinterpretcount:0
-
-
-
-
- simpleSwitch.js
- simpleSwitch.baseline
- -maxinterpretcount:1 -off:simpleJit
-
-
-
-
- BugFixRegression_MaxInterpret.js
- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit
- exclude_dynapogo
-
-
-
-
- amd64JScriptNumberRegression.js
- amd64JScriptNumberRegression.baseline
- -maxInterpretCount:1 -off:simpleJit -off:aggressiveinttypespec
-
-
-
-
- substring.js
- substring.baseline
-
-
-
-
- stringDictionaryBailOnNoProfileBug.js
- -maxinterpretcount:1 -off:simplejit -MaxLinearStringCaseCount:2
- stringDictionaryBailOnNoProfileBug.baseline
-
-
-
-
- jmpTableTest1.js
- jmpTableTest1.baseline
- -maxinterpretcount:1 -off:simpleJit -MinSwitchJumpTableSize:2 -MaxLinearIntCaseCount:1
-
-
-
-
- minMaxCaseValues.js
- -maxInterpretCount:1 -off:simpleJit
-
-
-
-
- jmpTableTest2.js
- jmpTableTest2.baseline
- -maxinterpretcount:1 -off:simpleJit -MinSwitchJumpTableSize:1 -MaxLinearIntCaseCount:1
-
-
-
-
- duplicateStringCaseArmBug.js
- -maxinterpretcount:1 -loopinterpretcount:0 -bgjit- -MaxLinearStringCaseCount:2
-
-
-
-
- CallBetweenSwitchExprUses.js
- -bgjit- -loopinterpretcount:1 -off:aggressiveinttypespec -maxlinearintcasecount:1
-
-
-
-
- switchDefNotStringBug.js
- -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:2 -maxinterpretcount:1 -maxlinearstringcasecount:2 -forcedeferparse -off:simplejit
-
-
-
-
- singleCharStringCase.js
-
-
-
-
- aggressiveintoff.js
-
-
-
-
- aggressiveintoff.js
- -off:aggressiveinttypespec
-
-
-
+
+
+
+
+ allIIntCases.js
+ allIIntCases.baseline
+
+
+
+
+ emptyCases.js
+ emptyCases.baseline
+
+
+
+
+ moreSwitches1.js
+ moreSwitches1.baseline
+
+
+
+
+ moreSwitches2.js
+ moreSwitches2.baseline
+
+
+
+
+ switchMathExp.js
+ switchMathExp.baseline
+
+
+
+
+ allStringCases.js
+ allStringCases.baseline
+
+
+
+
+ stringAndNonStrings.js
+ stringAndNonStrings.baseline
+
+
+
+
+ repeatIntCases.js
+ repeatIntCases.baseline
+
+
+
+
+ emptyStringCases.js
+ emptyStringCases.baseline
+
+
+
+
+ repeatStringCases.js
+ repeatStringCases.baseline
+
+
+
+
+ loopAndRetarget.js
+ loopAndRetarget.baseline
+
+
+
+
+ implicitCallSwitchExpr.js
+ implicitCallSwitchExpr.baseline
+ -maxinterpretcount:1 -off:simpleJit -bgjit- -loopinterpretcount:0
+
+
+
+
+ simpleSwitch.js
+ simpleSwitch.baseline
+ -maxinterpretcount:1 -off:simpleJit
+
+
+
+
+ BugFixRegression_MaxInterpret.js
+ -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit
+ exclude_dynapogo
+
+
+
+
+ amd64JScriptNumberRegression.js
+ amd64JScriptNumberRegression.baseline
+ -maxInterpretCount:1 -off:simpleJit -off:aggressiveinttypespec
+
+
+
+
+ substring.js
+ substring.baseline
+
+
+
+
+ stringDictionaryBailOnNoProfileBug.js
+ -maxinterpretcount:1 -off:simplejit -MaxLinearStringCaseCount:2
+ stringDictionaryBailOnNoProfileBug.baseline
+
+
+
+
+ jmpTableTest1.js
+ jmpTableTest1.baseline
+ -maxinterpretcount:1 -off:simpleJit -MinSwitchJumpTableSize:2 -MaxLinearIntCaseCount:1
+
+
+
+
+ minMaxCaseValues.js
+ -maxInterpretCount:1 -off:simpleJit
+
+
+
+
+ jmpTableTest2.js
+ jmpTableTest2.baseline
+ -maxinterpretcount:1 -off:simpleJit -MinSwitchJumpTableSize:1 -MaxLinearIntCaseCount:1
+
+
+
+
+ duplicateStringCaseArmBug.js
+ -maxinterpretcount:1 -loopinterpretcount:0 -bgjit- -MaxLinearStringCaseCount:2
+
+
+
+
+ CallBetweenSwitchExprUses.js
+ -bgjit- -loopinterpretcount:1 -off:aggressiveinttypespec -maxlinearintcasecount:1
+
+
+
+
+ switchDefNotStringBug.js
+ -loopinterpretcount:1 -bgjit- -maxsimplejitruncount:2 -maxinterpretcount:1 -maxlinearstringcasecount:2 -forcedeferparse -off:simplejit
+
+
+
+
+ singleCharStringCase.js
+
+
+
+
+ aggressiveintoff.js
+
+
+
+
+ aggressiveintoff.js
+ -off:aggressiveinttypespec
+
+
+
diff --git a/deps/chakrashim/core/test/typedarray/rlexe.xml b/deps/chakrashim/core/test/typedarray/rlexe.xml
index 24876a06a6f..315bbf12183 100644
--- a/deps/chakrashim/core/test/typedarray/rlexe.xml
+++ b/deps/chakrashim/core/test/typedarray/rlexe.xml
@@ -1,359 +1,359 @@
-
-
-
-
- arraybuffer.js
- arrayBuffer.baseline
- typedarray
-
-
-
-
- arraybufferType.js
- arraybufferType.baseline
- typedarray
-
-
-
-
- TypedArrayBuiltins.js
- typedarray
- -args summary -endargs
-
-
-
-
- IntegerIndexedExoticObject.js
- typedarray
- -args summary -endargs
-
-
-
-
- BadNaN.js
- typedarray
-
-
-
-
- int8array.js
- int8array_es6.baseline
- typedarray
-
-
-
-
- uint8array.js
- uint8array_es6.baseline
- typedarray
-
-
-
-
- int16array.js
- int16array_es6.baseline
- typedarray
-
-
-
-
- uint16array.js
- uint16array_es6.baseline
- typedarray
-
-
-
-
- int32array.js
- int32array_es6.baseline
- typedarray
-
-
-
-
- uint32array.js
- uint32array_es6.baseline
- typedarray
-
-
-
-
- float32array.js
- float32array_es6.baseline
- typedarray
-
-
-
-
- float64array.js
- float64array_es6.baseline
- typedarray
-
-
-
-
- dataview.js
- dataview.baseline
- typedarray
-
-
-
-
- objectproperty.js
- objectproperty_es6.baseline
- typedarray
-
-
-
-
- nan.js
- nan.baseline
- typedarray,exclude_nonrazzle
-
-
- amd64
-
- nan.x64.baseline
-
-
-
-
-
- negIndexes.js
- negIndexes.baseline
- typedarray
-
-
-
-
- set.js
- set.baseline
- typedarray
-
-
-
-
- samethread.js
- samethread.baseline
- typedarray
-
-
-
-
-
- Int8Array2.js
- typedarray
-
-
-
-
- UInt8Array2.js
- typedarray
-
-
-
-
- Int16Array2.js
- typedarray
-
-
-
-
- UInt16Array2.js
- typedarray
-
-
-
-
- Int32Array2.js
- typedarray
-
-
-
-
- UInt32Array2.js
- typedarray
-
-
-
-
- Float32Array2.js
- typedarray
-
-
-
-
- Float64Array2.js
- typedarray
-
-
-
-
- FloatHelperAccess.js
- typedarray
-
-
-
-
- subarray.js
- subarray.baseline
- typedarray
-
-
-
-
- dataview1.js
- dataview1.baseline
- typedarray
-
-
-
-
- allocation.js
- typedarray,exclude_arm,xplatslow,Slow
- 300
-
-
-
-
- allocation2.js
- typedarray,exclude_arm,xplatslow,Slow
- 300
-
-
-
-
- exclude_fre,exclude_dynapogo,typedarray
- -maxinterpretcount:1 -off:simpleJit
- typedArrayProfile.js
-
-
-
-
- pixelArrayRounding.js
- pixelArrayRounding.baseline
- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -ES6-
- typedarray
-
-
-
-
- pixelArrayRounding.js
- pixelArrayRounding.es6.baseline
- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit
- typedarray
-
-
-
-
- cseTypedArray.js
- cseTypedArray.baseline
- -maxInterpretCount:1 -off:simpleJit
- typedarray
-
-
-
-
- Uint8ClampedArray.js
- Uint8ClampedArray_es6.baseline
- typedarray
-
-
-
-
- setDifferentTypes.js
- setDifferentTypes.baseline
- typedarray
-
-
-
-
- bug2230916.js
- typedarray
-
-
-
-
- bug2268573.js
- bug2268573.baseline
- -maxinterpretcount:1 -off:simplejit
- typedarray
-
-
-
-
- bug_4653428.js
- typedarray,BUG
-
-
-
-
- transfer.js
- transfer.baseline
- -ArrayBufferTransfer
- typedarray
-
-
-
-
- transferdetach.js
- -ArrayBufferTransfer
- typedarray
-
-
-
-
- memset.js
- -mic:1 -off:simplejit -off:JITLoopBody -mmoc:0
-
-
-
-
- memset_neg.js
- -mic:1 -off:simplejit -bgjit- -mmoc:0
-
-
-
-
- memcopy.js
- -mic:1 -off:simplejit -off:JITLoopBody -mmoc:0
-
-
-
-
- memcopy_negative.js
- -mic:1 -off:simplejit -off:JITLoopBody -mmoc:0
-
-
-
-
- typedarray_bugfixes.js
- -Off:Deferparse -args summary -endargs
- BugFix
-
-
-
-
- bug_OS_6911900.js
-
-
-
-
- reentry1.js
-
-
-
-
- CrossSiteVirtual.js
-
-
-
+
+
+
+
+ arraybuffer.js
+ arrayBuffer.baseline
+ typedarray
+
+
+
+
+ arraybufferType.js
+ arraybufferType.baseline
+ typedarray
+
+
+
+
+ TypedArrayBuiltins.js
+ typedarray
+ -args summary -endargs
+
+
+
+
+ IntegerIndexedExoticObject.js
+ typedarray
+ -args summary -endargs
+
+
+
+
+ BadNaN.js
+ typedarray
+
+
+
+
+ int8array.js
+ int8array_es6.baseline
+ typedarray
+
+
+
+
+ uint8array.js
+ uint8array_es6.baseline
+ typedarray
+
+
+
+
+ int16array.js
+ int16array_es6.baseline
+ typedarray
+
+
+
+
+ uint16array.js
+ uint16array_es6.baseline
+ typedarray
+
+
+
+
+ int32array.js
+ int32array_es6.baseline
+ typedarray
+
+
+
+
+ uint32array.js
+ uint32array_es6.baseline
+ typedarray
+
+
+
+
+ float32array.js
+ float32array_es6.baseline
+ typedarray
+
+
+
+
+ float64array.js
+ float64array_es6.baseline
+ typedarray
+
+
+
+
+ dataview.js
+ dataview.baseline
+ typedarray
+
+
+
+
+ objectproperty.js
+ objectproperty_es6.baseline
+ typedarray
+
+
+
+
+ nan.js
+ nan.baseline
+ typedarray,exclude_nonrazzle
+
+
+ amd64
+
+ nan.x64.baseline
+
+
+
+
+
+ negIndexes.js
+ negIndexes.baseline
+ typedarray
+
+
+
+
+ set.js
+ set.baseline
+ typedarray
+
+
+
+
+ samethread.js
+ samethread.baseline
+ typedarray
+
+
+
+
+
+ Int8Array2.js
+ typedarray
+
+
+
+
+ UInt8Array2.js
+ typedarray
+
+
+
+
+ Int16Array2.js
+ typedarray
+
+
+
+
+ UInt16Array2.js
+ typedarray
+
+
+
+
+ Int32Array2.js
+ typedarray
+
+
+
+
+ UInt32Array2.js
+ typedarray
+
+
+
+
+ Float32Array2.js
+ typedarray
+
+
+
+
+ Float64Array2.js
+ typedarray
+
+
+
+
+ FloatHelperAccess.js
+ typedarray
+
+
+
+
+ subarray.js
+ subarray.baseline
+ typedarray
+
+
+
+
+ dataview1.js
+ dataview1.baseline
+ typedarray
+
+
+
+
+ allocation.js
+ typedarray,exclude_arm,xplatslow,Slow
+ 300
+
+
+
+
+ allocation2.js
+ typedarray,exclude_arm,xplatslow,Slow
+ 300
+
+
+
+
+ exclude_fre,exclude_dynapogo,typedarray
+ -maxinterpretcount:1 -off:simpleJit
+ typedArrayProfile.js
+
+
+
+
+ pixelArrayRounding.js
+ pixelArrayRounding.baseline
+ -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -ES6-
+ typedarray
+
+
+
+
+ pixelArrayRounding.js
+ pixelArrayRounding.es6.baseline
+ -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit
+ typedarray
+
+
+
+
+ cseTypedArray.js
+ cseTypedArray.baseline
+ -maxInterpretCount:1 -off:simpleJit
+ typedarray
+
+
+
+
+ Uint8ClampedArray.js
+ Uint8ClampedArray_es6.baseline
+ typedarray
+
+
+
+
+ setDifferentTypes.js
+ setDifferentTypes.baseline
+ typedarray
+
+
+
+
+ bug2230916.js
+ typedarray
+
+
+
+
+ bug2268573.js
+ bug2268573.baseline
+ -maxinterpretcount:1 -off:simplejit
+ typedarray
+
+
+
+
+ bug_4653428.js
+ typedarray,BUG
+
+
+
+
+ transfer.js
+ transfer.baseline
+ -ArrayBufferTransfer
+ typedarray
+
+
+
+
+ transferdetach.js
+ -ArrayBufferTransfer
+ typedarray
+
+
+
+
+ memset.js
+ -mic:1 -off:simplejit -off:JITLoopBody -mmoc:0
+
+
+
+
+ memset_neg.js
+ -mic:1 -off:simplejit -bgjit- -mmoc:0
+
+
+
+
+ memcopy.js
+ -mic:1 -off:simplejit -off:JITLoopBody -mmoc:0
+
+
+
+
+ memcopy_negative.js
+ -mic:1 -off:simplejit -off:JITLoopBody -mmoc:0
+
+
+
+
+ typedarray_bugfixes.js
+ -Off:Deferparse -args summary -endargs
+ BugFix
+
+
+
+
+ bug_OS_6911900.js
+
+
+
+
+ reentry1.js
+
+
+
+
+ CrossSiteVirtual.js
+
+
+
diff --git a/deps/chakrashim/core/test/utf8/rlexe.xml b/deps/chakrashim/core/test/utf8/rlexe.xml
index 6466c7ff206..db82e26efad 100644
--- a/deps/chakrashim/core/test/utf8/rlexe.xml
+++ b/deps/chakrashim/core/test/utf8/rlexe.xml
@@ -1,45 +1,45 @@
-
-
-
-
- invalidutf8.js
- invalidutf8.baseline
- exclude_serialized
-
-
-
-
- unicode_digit_as_identifier_should_work.js
- exclude_serialized,bugfix
-
-
-
-
- OS_2977448.js
- require_winglob,BugFix
-
-
-
-
- surrogatepair.js
-
-
-
-
- bugGH2386.js
-
-
-
-
- unicode_sequence_serialized.js
- -forceserialized -oopjit-
-
-
-
-
- bugGH2656.js
- -args summary -endargs
- require_winglob
-
-
-
+
+
+
+
+ invalidutf8.js
+ invalidutf8.baseline
+ exclude_serialized
+
+
+
+
+ unicode_digit_as_identifier_should_work.js
+ exclude_serialized,bugfix
+
+
+
+
+ OS_2977448.js
+ require_winglob,BugFix
+
+
+
+
+ surrogatepair.js
+
+
+
+
+ bugGH2386.js
+
+
+
+
+ unicode_sequence_serialized.js
+ -forceserialized -oopjit-
+
+
+
+
+ bugGH2656.js
+ -args summary -endargs
+ require_winglob
+
+
+
diff --git a/deps/chakrashim/core/test/wasm/rlexe.xml b/deps/chakrashim/core/test/wasm/rlexe.xml
index e46a69ea1e7..76dc97a77fa 100644
--- a/deps/chakrashim/core/test/wasm/rlexe.xml
+++ b/deps/chakrashim/core/test/wasm/rlexe.xml
@@ -1,345 +1,345 @@
-
-
-
-
- rot.js
- rot.baseline
- -wasm
-
-
-
-
- fastarray.js
- -wasm -WasmFastArray-
- exclude_mac
-
-
-
-
- fastarray.js
- -wasm -WasmFastArray
- exclude_mac
-
-
-
-
- misc.js
- misc.baseline
- -wasm
-
-
-
-
- controlflow.js
- controlflow.baseline
- -wasm
-
-
-
-
- f32.js
- -wasm
- exclude_jshost,exclude_drt,exclude_win7
-
-
-
-
- f64.js
- -wasm
- exclude_jshost,exclude_drt,exclude_win7
-
-
-
-
- math.js
- exclude_xplat
- -wasm -wasmi64
-
-
-
-
- dropteelocal.js
- dropteelocal.baseline
- -wasm
-
-
-
-
- i32_popcnt.js
- i32_popcnt.baseline
- -wasm
-
-
-
-
- f32address.js
- -wasm
-
-
-
-
- global.js
- baselines/global.baseline
- exclude_xplat
- -wasm -wasmi64
-
-
-
-
- basic.js
- basic.baseline
- -wasm
- exclude_xplat
-
-
-
-
- basic.js
- basic.baseline
- -ForceStaticInterpreterThunk -wasm
-
-
-
-
- table.js
- table.baseline
- -wasm
-
-
-
-
- table_imports.js
- baselines/table_imports.baseline
- exclude_xplat
- -wasm -wasmi64
-
-
-
-
- call.js
- baselines/call.baseline
- -wasm
- exclude_xplat
-
-
-
-
- array.js
- array.baseline
- exclude_xplat
- -wasm
-
-
-
-
- trunc.js
- -wasm
- exclude_xplat
-
-
-
-
- api.js
- baselines/api.baseline
- -wasm
- exclude_xplat
-
-
-
-
- invalid_global_mut.js
- -wasm
-
-
-
-
- bugs.js
- -wasm
- exclude_jshost,exclude_drt,exclude_win7
-
-
-
-
- params.js
- baselines/params.baseline
- -wasm -EnableFatalErrorOnOOM- -args 14000 -endargs
- exclude_jshost,exclude_drt,exclude_win7,exclude_dynapogo
-
-
-
-
- params.js
- baselines/params.baseline
- -wasm -args 14000 -endargs
- exclude_jshost,exclude_win7,exclude_dynapogo,exclude_xplat
-
-
-
-
- debugger_basic.js
- -wasm -dbgbaseline:debugger_basic.js.dbg.baseline
- exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
-
-
-
-
- debugger_basic.js
- -wasm -maic:1 -dbgbaseline:debugger_basic.js.dbg.baseline
- exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
-
-
-
-
- debugger_basic.js
- -wasm -debuglaunch -args debuglaunch -endargs -dbgbaseline:debugger_basic_launch.js.dbg.baseline
- exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
-
-
-
-
- wasmcctx.js
- -wasm -dbgbaseline:wasmcctx.js.dbg.baseline -InspectMaxStringLength:50
- exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
-
-
-
-
- oom_wasm.js
-
- -EnableFatalErrorOnOOM- -wasm -args 0 16384 -endargs
- exclude_amd64
-
-
-
-
- oom_wasm.js
- -EnableFatalErrorOnOOM- -wasm -args 3 16381 -endargs
- exclude_amd64
-
-
-
-
- oom.js
- -EnableFatalErrorOnOOM- -wasm -args 0 16384 -endargs
- exclude_amd64
-
-
-
-
- oom.js
- -EnableFatalErrorOnOOM- -wasm -args 3 16381 -endargs
- exclude_amd64
-
-
-
-
- response.js
- baselines/response.baseline
- -wasm
- exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
-
-
-
-
- i64.js
- -wasm -args --no-verbose -endargs
- exclude_xplat
-
-
-
-
- i64cf.js
- -wasm -maic:0
- exclude_amd64
-
-
-
-
- nestedblocks.js
- -wasm
- exclude_jshost,exclude_drt,exclude_win7,exclude_dynapogo,exclude_xplat
-
-
-
-
- cse.js
- baselines/cse.baseline
- -wasm -maic:0 -testtrace:cse:2.0-99.999
- exclude_jshost,exclude_drt,exclude_win7,exclude_interpreted
-
-
-
-
- unsigned.js
- baselines/unsigned.baseline
- -wasm
- exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
-
-
-
-
- memory.js
- -wasm -ArrayBufferTransfer
- exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
-
-
-
-
- memory.js
- -wasm -ArrayBufferTransfer -wasmfastarray-
- exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
-
-
-
-
- superlongsignaturemismatch.js
- -wasm
- exclude_xplat,exclude_jshost,exclude_drt,exclude_win7
-
-
-
-
- binary.js
- -wasm -args --no-verbose -endargs
- exclude_xplat
-
-
-
-
- binary.js
- -wasm -args --no-verbose -endargs
- exclude_xplat
-
-
-
-
- polyinline.js
- -maxinterpretcount:2 -off:simplejit
- exclude_xplat,exclude_jshost,exclude_win7
-
-
-
-
- limits.js
- -wasm -args --no-verbose --end 4 -endargs
- 300
- exclude_xplat,exclude_jshost,exclude_drt,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow
-
-
-
-
- limits.js
- -wasm -args --no-verbose --start 4 --end 12 -endargs
- 300
- exclude_xplat,exclude_jshost,exclude_drt,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow
-
-
-
-
- limits.js
- -wasm -args --no-verbose --start 12 -endargs
- 300
- exclude_xplat,exclude_jshost,exclude_drt,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow
-
-
-
+
+
+
+
+ rot.js
+ rot.baseline
+ -wasm
+
+
+
+
+ fastarray.js
+ -wasm -WasmFastArray-
+ exclude_mac
+
+
+
+
+ fastarray.js
+ -wasm -WasmFastArray
+ exclude_mac
+
+
+
+
+ misc.js
+ misc.baseline
+ -wasm
+
+
+
+
+ controlflow.js
+ controlflow.baseline
+ -wasm
+
+
+
+
+ f32.js
+ -wasm
+ exclude_jshost,exclude_drt,exclude_win7
+
+
+
+
+ f64.js
+ -wasm
+ exclude_jshost,exclude_drt,exclude_win7
+
+
+
+
+ math.js
+ exclude_xplat
+ -wasm -wasmi64
+
+
+
+
+ dropteelocal.js
+ dropteelocal.baseline
+ -wasm
+
+
+
+
+ i32_popcnt.js
+ i32_popcnt.baseline
+ -wasm
+
+
+
+
+ f32address.js
+ -wasm
+
+
+
+
+ global.js
+ baselines/global.baseline
+ exclude_xplat
+ -wasm -wasmi64
+
+
+
+
+ basic.js
+ basic.baseline
+ -wasm
+ exclude_xplat
+
+
+
+
+ basic.js
+ basic.baseline
+ -ForceStaticInterpreterThunk -wasm
+
+
+
+
+ table.js
+ table.baseline
+ -wasm
+
+
+
+
+ table_imports.js
+ baselines/table_imports.baseline
+ exclude_xplat
+ -wasm -wasmi64
+
+
+
+
+ call.js
+ baselines/call.baseline
+ -wasm
+ exclude_xplat
+
+
+
+
+ array.js
+ array.baseline
+ exclude_xplat
+ -wasm
+
+
+
+
+ trunc.js
+ -wasm
+ exclude_xplat
+
+
+
+
+ api.js
+ baselines/api.baseline
+ -wasm
+ exclude_xplat
+
+
+
+
+ invalid_global_mut.js
+ -wasm
+
+
+
+
+ bugs.js
+ -wasm
+ exclude_jshost,exclude_drt,exclude_win7
+
+
+
+
+ params.js
+ baselines/params.baseline
+ -wasm -EnableFatalErrorOnOOM- -args 14000 -endargs
+ exclude_jshost,exclude_drt,exclude_win7,exclude_dynapogo
+
+
+
+
+ params.js
+ baselines/params.baseline
+ -wasm -args 14000 -endargs
+ exclude_jshost,exclude_win7,exclude_dynapogo,exclude_xplat
+
+
+
+
+ debugger_basic.js
+ -wasm -dbgbaseline:debugger_basic.js.dbg.baseline
+ exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
+
+
+
+
+ debugger_basic.js
+ -wasm -maic:1 -dbgbaseline:debugger_basic.js.dbg.baseline
+ exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
+
+
+
+
+ debugger_basic.js
+ -wasm -debuglaunch -args debuglaunch -endargs -dbgbaseline:debugger_basic_launch.js.dbg.baseline
+ exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
+
+
+
+
+ wasmcctx.js
+ -wasm -dbgbaseline:wasmcctx.js.dbg.baseline -InspectMaxStringLength:50
+ exclude_jshost,exclude_win7,exclude_drt,exclude_snap,require_debugger,exclude_xplat
+
+
+
+
+ oom_wasm.js
+
+ -EnableFatalErrorOnOOM- -wasm -args 0 16384 -endargs
+ exclude_amd64
+
+
+
+
+ oom_wasm.js
+ -EnableFatalErrorOnOOM- -wasm -args 3 16381 -endargs
+ exclude_amd64
+
+
+
+
+ oom.js
+ -EnableFatalErrorOnOOM- -wasm -args 0 16384 -endargs
+ exclude_amd64
+
+
+
+
+ oom.js
+ -EnableFatalErrorOnOOM- -wasm -args 3 16381 -endargs
+ exclude_amd64
+
+
+
+
+ response.js
+ baselines/response.baseline
+ -wasm
+ exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
+
+
+
+
+ i64.js
+ -wasm -args --no-verbose -endargs
+ exclude_xplat
+
+
+
+
+ i64cf.js
+ -wasm -maic:0
+ exclude_amd64
+
+
+
+
+ nestedblocks.js
+ -wasm
+ exclude_jshost,exclude_drt,exclude_win7,exclude_dynapogo,exclude_xplat
+
+
+
+
+ cse.js
+ baselines/cse.baseline
+ -wasm -maic:0 -testtrace:cse:2.0-99.999
+ exclude_jshost,exclude_drt,exclude_win7,exclude_interpreted
+
+
+
+
+ unsigned.js
+ baselines/unsigned.baseline
+ -wasm
+ exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
+
+
+
+
+ memory.js
+ -wasm -ArrayBufferTransfer
+ exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
+
+
+
+
+ memory.js
+ -wasm -ArrayBufferTransfer -wasmfastarray-
+ exclude_jshost,exclude_drt,exclude_win7,exclude_xplat
+
+
+
+
+ superlongsignaturemismatch.js
+ -wasm
+ exclude_xplat,exclude_jshost,exclude_drt,exclude_win7
+
+
+
+
+ binary.js
+ -wasm -args --no-verbose -endargs
+ exclude_xplat
+
+
+
+
+ binary.js
+ -wasm -args --no-verbose -endargs
+ exclude_xplat
+
+
+
+
+ polyinline.js
+ -maxinterpretcount:2 -off:simplejit
+ exclude_xplat,exclude_jshost,exclude_win7
+
+
+
+
+ limits.js
+ -wasm -args --no-verbose --end 4 -endargs
+ 300
+ exclude_xplat,exclude_jshost,exclude_drt,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow
+
+
+
+
+ limits.js
+ -wasm -args --no-verbose --start 4 --end 12 -endargs
+ 300
+ exclude_xplat,exclude_jshost,exclude_drt,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow
+
+
+
+
+ limits.js
+ -wasm -args --no-verbose --start 12 -endargs
+ 300
+ exclude_xplat,exclude_jshost,exclude_drt,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow
+
+
+
diff --git a/deps/chakrashim/core/tools/RecyclerChecker/cmake/modules/FindLLVM.cmake b/deps/chakrashim/core/tools/RecyclerChecker/cmake/modules/FindLLVM.cmake
index 536b9d0d15b..f2ed6273b76 100644
--- a/deps/chakrashim/core/tools/RecyclerChecker/cmake/modules/FindLLVM.cmake
+++ b/deps/chakrashim/core/tools/RecyclerChecker/cmake/modules/FindLLVM.cmake
@@ -1,50 +1,50 @@
-# Detect LLVM and set various variable to link against the different component of LLVM
-#
-# NOTE: This is a modified version of the module originally found in the OpenGTL project
-# at www.opengtl.org
-#
-# LLVM_BIN_DIR : directory with LLVM binaries
-# LLVM_LIB_DIR : directory with LLVM library
-# LLVM_INCLUDE_DIR : directory with LLVM include
-#
-# LLVM_COMPILE_FLAGS : compile flags needed to build a program using LLVM headers
-# LLVM_LDFLAGS : ldflags needed to link
-# LLVM_LIBS_CORE : ldflags needed to link against a LLVM core library
-# LLVM_LIBS_JIT : ldflags needed to link against a LLVM JIT
-# LLVM_LIBS_JIT_OBJECTS : objects you need to add to your source when using LLVM JIT
-
-if(NOT LLVM_INCLUDE_DIR)
- find_program(LLVM_CONFIG_EXECUTABLE
- NAMES llvm-config
- PATHS
- /opt/local/bin
- /usr/lib/llvm-3.8/bin # Ubuntu
- /usr/lib/llvm-3.9/bin # Ubuntu
- /usr/local/opt/llvm/bin # OSX brew install path
- )
-
- if (NOT LLVM_CONFIG_EXECUTABLE STREQUAL LLVM_CONFIG_EXECUTABLE-NOTFOUND)
- MACRO(FIND_LLVM_LIBS LLVM_CONFIG_EXECUTABLE _libname_ LIB_VAR OBJECT_VAR)
- exec_program( ${LLVM_CONFIG_EXECUTABLE} ARGS --libs ${_libname_} OUTPUT_VARIABLE ${LIB_VAR} )
- STRING(REGEX MATCHALL "[^ ]*[.]o[ $]" ${OBJECT_VAR} ${${LIB_VAR}})
- SEPARATE_ARGUMENTS(${OBJECT_VAR})
- STRING(REGEX REPLACE "[^ ]*[.]o[ $]" "" ${LIB_VAR} ${${LIB_VAR}})
- ENDMACRO(FIND_LLVM_LIBS)
-
- exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --bindir OUTPUT_VARIABLE LLVM_BIN_DIR )
- exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --libdir OUTPUT_VARIABLE LLVM_LIB_DIR )
- exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --includedir OUTPUT_VARIABLE LLVM_INCLUDE_DIR )
- exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS )
- exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS )
- exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE LLVM_LIBS_CORE )
- exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --system-libs OUTPUT_VARIABLE LLVM_LIBS_SYS )
- endif()
-endif()
-
-if(LLVM_INCLUDE_DIR)
- message(STATUS "Found LLVM: ${LLVM_INCLUDE_DIR}")
-else()
- if(LLVM_FIND_REQUIRED)
- message(FATAL_ERROR "Could NOT find LLVM")
- endif(LLVM_FIND_REQUIRED)
-endif()
+# Detect LLVM and set various variable to link against the different component of LLVM
+#
+# NOTE: This is a modified version of the module originally found in the OpenGTL project
+# at www.opengtl.org
+#
+# LLVM_BIN_DIR : directory with LLVM binaries
+# LLVM_LIB_DIR : directory with LLVM library
+# LLVM_INCLUDE_DIR : directory with LLVM include
+#
+# LLVM_COMPILE_FLAGS : compile flags needed to build a program using LLVM headers
+# LLVM_LDFLAGS : ldflags needed to link
+# LLVM_LIBS_CORE : ldflags needed to link against a LLVM core library
+# LLVM_LIBS_JIT : ldflags needed to link against a LLVM JIT
+# LLVM_LIBS_JIT_OBJECTS : objects you need to add to your source when using LLVM JIT
+
+if(NOT LLVM_INCLUDE_DIR)
+ find_program(LLVM_CONFIG_EXECUTABLE
+ NAMES llvm-config
+ PATHS
+ /opt/local/bin
+ /usr/lib/llvm-3.8/bin # Ubuntu
+ /usr/lib/llvm-3.9/bin # Ubuntu
+ /usr/local/opt/llvm/bin # OSX brew install path
+ )
+
+ if (NOT LLVM_CONFIG_EXECUTABLE STREQUAL LLVM_CONFIG_EXECUTABLE-NOTFOUND)
+ MACRO(FIND_LLVM_LIBS LLVM_CONFIG_EXECUTABLE _libname_ LIB_VAR OBJECT_VAR)
+ exec_program( ${LLVM_CONFIG_EXECUTABLE} ARGS --libs ${_libname_} OUTPUT_VARIABLE ${LIB_VAR} )
+ STRING(REGEX MATCHALL "[^ ]*[.]o[ $]" ${OBJECT_VAR} ${${LIB_VAR}})
+ SEPARATE_ARGUMENTS(${OBJECT_VAR})
+ STRING(REGEX REPLACE "[^ ]*[.]o[ $]" "" ${LIB_VAR} ${${LIB_VAR}})
+ ENDMACRO(FIND_LLVM_LIBS)
+
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --bindir OUTPUT_VARIABLE LLVM_BIN_DIR )
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --libdir OUTPUT_VARIABLE LLVM_LIB_DIR )
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --includedir OUTPUT_VARIABLE LLVM_INCLUDE_DIR )
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS )
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS )
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE LLVM_LIBS_CORE )
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --system-libs OUTPUT_VARIABLE LLVM_LIBS_SYS )
+ endif()
+endif()
+
+if(LLVM_INCLUDE_DIR)
+ message(STATUS "Found LLVM: ${LLVM_INCLUDE_DIR}")
+else()
+ if(LLVM_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find LLVM")
+ endif(LLVM_FIND_REQUIRED)
+endif()