Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim: update chakracore (2016-09-06)
Browse files Browse the repository at this point in the history
Update chakracore to latest xplat-exp. Plus temporary local fix:

```
--- a/deps/chakrashim/core/lib/Jsrt/ChakraCommon.h
+++ b/deps/chakrashim/core/lib/Jsrt/ChakraCommon.h
@@ -68,9 +68,9 @@ typedef BYTE* ChakraBytePtr;
 #endif

 #ifdef __cplusplus
-#define CHAKRA_API SET_API_VISIBILITY extern "C" JsErrorCode
+#define CHAKRA_API extern "C" SET_API_VISIBILITY JsErrorCode
 #else
-#define CHAKRA_API SET_API_VISIBILITY extern JsErrorCode
+#define CHAKRA_API extern     SET_API_VISIBILITY JsErrorCode
 #endif
```
  • Loading branch information
Jianchun Xu committed Sep 6, 2016
1 parent 744b83c commit bea58b0
Show file tree
Hide file tree
Showing 736 changed files with 38,140 additions and 31,538 deletions.
2 changes: 1 addition & 1 deletion deps/chakrashim/core/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ install_manifest.txt
# additional *nix generated files
*.a
*.gch
*.o
Makefile
pal/src/config.h

3 changes: 3 additions & 0 deletions deps/chakrashim/core/Build/Chakra.Build.Default.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@

<!-- Always use Platform SDK for core builds -->
<EventManifestXmlPath>$(WindowsSDK80Path)Include\um</EventManifestXmlPath>
<!-- Unless indicated otherwise, statically link the C++ Runtime into ChakraCore.dll -->
<RuntimeLib Condition="'$(RuntimeLib)'==''">static_library</RuntimeLib>

</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions deps/chakrashim/core/Build/Common.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<!-- /Zi -->
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat Condition="'$(MultiProcessorCompilation)' == 'true'">OldStyle</DebugInformationFormat>
<!-- /EHsc- -->
<ExceptionHandling>SyncCThrow</ExceptionHandling>
<!-- /Gz -->
Expand Down
13 changes: 8 additions & 5 deletions deps/chakrashim/core/Build/Microsoft.ChakraCore.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>Microsoft.ChakraCore</id>
<version>1.2</version>
<!-- Note: actual version number is overridden by the NuGet package creation command. -->
<version>1.2.1</version>
<authors>Chakra Team</authors>
<owners>Chakra Team</owners>
<licenseUrl>https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/Microsoft/ChakraCore</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<developmentDependency>true</developmentDependency>
<description>ChakraCore is the core part of the Chakra Javascript engine that powers Microsoft Edge.</description>
<!--
<releaseNotes>**** TODO: need link</releaseNotes>
-->
<releaseNotes>https://github.com/Microsoft/ChakraCore/wiki/Release-Notes</releaseNotes>
<copyright>Copyright (C) 2016 Microsoft</copyright>
<language>en-US</language>
<tags>Chakra,ChakraCore</tags>
<tags>Chakra,ChakraCore,javascript,js,ecmascript,compiler,platform,oss,opensource,native</tags>
</metadata>
<files>
<file src="..\x86_release\ChakraCore.dll" target="x86\ChakraCore.dll" />
Expand All @@ -26,5 +25,9 @@
<file src="..\x64_release\ChakraCore.pdb" target="x64\ChakraCore.pdb" />
<file src="..\x64_release\ch.exe" target="x64\ch.exe" />
<file src="..\x64_release\ch.pdb" target="x64\ch.pdb" />
<file src="..\arm_release\ChakraCore.dll" target="arm\ChakraCore.dll" />
<file src="..\arm_release\ChakraCore.pdb" target="arm\ChakraCore.pdb" />
<file src="..\arm_release\ch.exe" target="arm\ch.exe" />
<file src="..\arm_release\ch.pdb" target="arm\ch.pdb" />
</files>
</package>
7 changes: 6 additions & 1 deletion deps/chakrashim/core/Build/scripts/init_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ $PushDate = Get-Date $BuildPushDate -Format yyMMdd.HHmm

$buildPushId, $buildPushIdPart1, $buildPushIdPart2, $buildPushIdString = GetBuildPushId $info

$VersionString = "${Env:VERSION_MAJOR}.${Env:VERSION_MINOR}.${buildPushIdString}"
$VersionMajor = UseValueOrDefault "$Env:VERSION_MAJOR" "1"
$VersionMinor = UseValueOrDefault "$Env:VERSION_MINOR" "2"
$VersionPatch = UseValueOrDefault "$Env:VERSION_PATCH" "0"
$VersionQFE = UseValueOrDefault "$Env:VERSION_QFE" "0"

$VersionString = "${VersionMajor}.${VersionMinor}.${VersionPatch}.${VersionQFE}"
$PreviewVersionString = "${VersionString}-preview"

# unless it is a build branch, subdivide the output directory by month
Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/Build/scripts/pre_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ if (Test-Path Env:\TF_BUILD_SOURCEGETVERSION)
$buildPushId, $buildPushIdPart1, $buildPushIdPart2, $buildPushIdString = GetBuildPushId $info

# commit message
$command = "$gitExe log -1 --name-status -p $commitHash"
$command = "$gitExe log -1 --name-status -m --first-parent -p $commitHash"
$CommitMessageLines = iex $command
$CommitMessage = $CommitMessageLines -join "`r`n"

Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/Build/scripts/pre_post_util.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function WriteCommonArguments() {
}

function GetBuildInfo($oauth, $commitHash) {
# Get the git remote path and construct the rest API URI
# Get the git remote path and construct the REST API URI
$gitExe = GetGitPath
$remote = (iex "$gitExe remote -v")[0].split()[1].replace("_git", "_apis/git/repositories")
$remote = (iex "$gitExe remote -v" | ? { $_.contains("_git") })[0].split()[1].replace("_git", "_apis/git/repositories")
$remote = $remote.replace("mshttps", "https")

# Get the pushId and push date time to use that for build number and build date time
Expand Down
24 changes: 24 additions & 0 deletions deps/chakrashim/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
cmake_minimum_required(VERSION 3.2)
project (CHAKRACORE)

# Keep CMake from caching static/shared library
# option. Otherwise, CMake fails to update cached
# references
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()

function(clr_unknown_arch)
if (WIN32)
Expand Down Expand Up @@ -57,6 +73,12 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
clr_unknown_arch()
endif()
set(CLR_CMAKE_PLATFORM_DARWIN 1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
-mmacosx-version-min=10.7")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-mmacosx-version-min=10.7")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} \
-mmacosx-version-min=10.7")
else()
clr_unknown_arch()
endif()
Expand Down Expand Up @@ -125,6 +147,8 @@ endif()

# CXX WARNING FLAGS
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-Wno-deprecated-declarations\
-Wno-parentheses-equality\
-Wno-missing-braces\
-Wno-reorder\
-Wno-microsoft\
Expand Down
40 changes: 25 additions & 15 deletions deps/chakrashim/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,31 @@ You can stay up-to-date on progress by following the [MSEdge developer blog](htt

## [Build Status](https://github.com/Microsoft/ChakraCore/wiki/Build-Status)

| | __Debug__ | __Test__ | __Release__ |
|:-------:|:---------:|:--------:|:-----------:|
| __x86__ | [![x86debug][x86dbgicon]][x86dbglink] | [![x86test][x86testicon]][x86testlink] | [![x86release][x86relicon]][x86rellink] |
| __x64__ | [![x64debug][x64dbgicon]][x64dbglink] | [![x64test][x64testicon]][x64testlink] | [![x64release][x64relicon]][x64rellink] |
| __arm__ | [![armdebug][armdbgicon]][armdbglink] | [![armtest][armtesticon]][armtestlink] | [![armrelease][armrelicon]][armrellink] |
| __linux__ | [![linuxdebug][linuxdbgicon]][linuxdbglink] | [![linuxtest][linuxtesticon]][linuxtestlink] | [![linuxrelease][linuxrelicon]][linuxrellink] |
| __linux (static)__ | [![linuxsdebug][linuxsdbgicon]][linuxsdbglink] | [![linuxstest][linuxstesticon]][linuxstestlink] | [![linuxsrelease][linuxsrelicon]][linuxsrellink] |
| | __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)__ | [![linuxdebug][linuxdbgicon]][linuxdbglink] | [![linuxtest][linuxtesticon]][linuxtestlink] | [![linuxrelease][linuxrelicon]][linuxrellink] |
| __Ubuntu 16.04 (x64 static)__ | [![linuxsdebug][linuxsdbgicon]][linuxsdbglink] | [![linuxstest][linuxstesticon]][linuxstestlink] | [![linuxsrelease][linuxsrelicon]][linuxsrellink] |
| __OS X 10.9 (x64 static)__ | [![osxsdebug][osxsdbgicon]][osxsdbglink] | [![osxstest][osxstesticon]][osxstestlink] | [![osxsrelease][osxsrelicon]][osxsrellink] |

*If you see badges reading "Build: Unknown" it is likely because a build was skipped due to changes being only in files known not to affect the health of the build.*

[x86dbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/badge/icon
[x86dbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/
[x86testicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_test/badge/icon
[x86testlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_test/
[x86relicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_release/badge/icon
[x86rellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_release/

[x64dbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x64_debug/badge/icon
[x64dbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x64_debug/
[x64testicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x64_test/badge/icon
[x64testlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x64_test/
[x64relicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x64_release/badge/icon
[x64rellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x64_release/

[x86dbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/badge/icon
[x86dbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_debug/
[x86testicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_test/badge/icon
[x86testlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_test/
[x86relicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_release/badge/icon
[x86rellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/x86_release/

[armdbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/arm_debug/badge/icon
[armdbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/arm_debug/
[armtesticon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/arm_test/badge/icon
Expand All @@ -53,6 +54,13 @@ You can stay up-to-date on progress by following the [MSEdge developer blog](htt
[linuxsrelicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/ubuntu_linux_release_static/badge/icon
[linuxsrellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/ubuntu_linux_release_static/

[osxsdbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/osx_osx_debug_static/badge/icon
[osxsdbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/osx_osx_debug_static/
[osxstesticon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/osx_osx_test_static/badge/icon
[osxstestlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/osx_osx_test_static/
[osxsrelicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/osx_osx_release_static/badge/icon
[osxsrellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/master/job/osx_osx_release_static/

Above is a table of our rolling build status. We run additional builds on a daily basis. See [Build Status](https://github.com/Microsoft/ChakraCore/wiki/Build-Status) for the status of all builds.

## Security
Expand All @@ -77,6 +85,8 @@ You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 o

More details in [Building ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Building-ChakraCore).

Alternatively, you can get pre-built ChakraCore binaries from our [NuGet Packages](https://github.com/Microsoft/ChakraCore/wiki/NuGet-Packages).

## Using ChakraCore

Once built, you have a few options for how you can use ChakraCore:
Expand All @@ -101,7 +111,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope

Please refer to [Contribution guidelines](CONTRIBUTING.md) for more details.

### License
## License

Code licensed under the [MIT License](https://github.com/Microsoft/ChakraCore/blob/master/LICENSE.txt).

Expand Down
2 changes: 2 additions & 0 deletions deps/chakrashim/core/bin/ChakraCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
-Wl,--no-whole-archive
-Wl,--end-group
)
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(LINKER_START_GROUP -Wl,-force_load,)
endif()

# common link deps
Expand Down
10 changes: 7 additions & 3 deletions deps/chakrashim/core/bin/ChakraCore/ChakraCore.def
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,22 @@ JsDiagStopDebugging
JsTTDCreateRecordRuntime
JsTTDCreateDebugRuntime
JsTTDCreateContext
JsTTDRunScript
JsTTDCallFunction
JsTTDSetIOCallbacks
JsTTDStartTimeTravelRecording
JsTTDStopTimeTravelRecording
JsTTDEmitTimeTravelRecording
JsTTDStartTimeTravelDebugging
JsTTDPauseTimeTravelBeforeRuntimeOperation
JsTTDReStartTimeTravelAfterRuntimeOperation
JsTTDNotifyHostCallbackCreatedOrCanceled
JsTTDNotifyYield
JsTTDHostExit
JsTTDRawBufferCopySyncIndirect
JsTTDRawBufferModifySyncIndirect
JsTTDRawBufferAsyncModificationRegister
JsTTDRawBufferAsyncModifyComplete
JsTTDGetSnapTimeTopLevelEventMove
JsTTDPrepContextsForTopLevelEventMove
JsTTDPreExecuteSnapShotInterval
JsTTDMoveToTopLevelEvent
JsTTDReplayExecution

Expand Down
14 changes: 12 additions & 2 deletions deps/chakrashim/core/bin/ChakraCore/ChakraCoreDllFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
#include "Base/VTuneChakraProfile.h"
#endif

#ifdef __APPLE__
// dummy usage of JSRT to force export JSRT on dylib
#include "ChakraCore.h"
void DummyJSRTCall() {
JsRuntimeHandle *runtime;
JsRuntimeAttributes attr;
JsCreateRuntime(attr, nullptr, runtime);
}
#endif

extern HANDLE g_hInstance;
#ifdef _WIN32
static ATOM lockedDll = 0;
Expand Down Expand Up @@ -61,7 +71,7 @@ static BOOL AttachProcess(HANDLE hmod)
#endif
#ifdef VTUNE_PROFILING
VTuneChakraProfile::Register();
#endif
#endif
ValueType::Initialize();
ThreadContext::GlobalInitialize();

Expand Down Expand Up @@ -166,7 +176,7 @@ EXTERN_C BOOL WINAPI DllMain(HINSTANCE hmod, DWORD dwReason, PVOID pvReserved)
#endif
#ifdef VTUNE_PROFILING
VTuneChakraProfile::UnRegister();
#endif
#endif

// don't do anything if we are in forceful shutdown
// try to clean up handles in graceful shutdown
Expand Down
Loading

0 comments on commit bea58b0

Please sign in to comment.