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

Commit

Permalink
chakrashim: sync to chakracore release/1.1
Browse files Browse the repository at this point in the history
Sync to chakracore release version 1.1 (prerelease)
9229c3387b695b2e2fb247681b26d6e6514bc6d1
  • Loading branch information
Jianchun Xu committed Jan 13, 2016
1 parent 6c70170 commit 5d860fd
Show file tree
Hide file tree
Showing 225 changed files with 23,757 additions and 10,991 deletions.
12 changes: 12 additions & 0 deletions deps/chakrashim/core/Build/Chakra.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
WINVER=$(Win32_WinNTVersion);
WIN32_LEAN_AND_MEAN=1
</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(BuildJIT)'=='false'">
%(PreprocessorDefinitions);
DISABLE_JIT=1
</PreprocessorDefinitions>
<!-- REVIEW: These are warning are introduced when moving to VS2015 tools, may want to clean these up -->
<DisableSpecificWarnings>
%(DisableSpecificWarnings);
Expand All @@ -40,6 +44,14 @@
$(ChakraCoreRootDirectory)\lib\common\placeholder;
%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>

<!-- ======== For Code Covearge ======== -->
<Optimization Condition="'$(ENABLE_CODECOVERAGE)'=='true'">Disabled</Optimization>
</ClCompile>

<Link>
<!-- ======== For Code Covearge ======== -->
<AdditionalOptions Condition="'$(ENABLE_CODECOVERAGE)'=='true'">%(AdditionalOptions) /DEBUGTYPE:CV,FIXUP</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
</Project>
2 changes: 2 additions & 0 deletions deps/chakrashim/core/Build/Common.Build.Default.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<PropertyGroup>
<OutBaseDir Condition="'$(OutBaseDir)'!=''">$(OutBaseDir)\$(SolutionName)</OutBaseDir>
<OutBaseDir Condition="'$(OutBaseDir)'==''">$(SolutionDir)VcBuild</OutBaseDir>
<OutBaseDir Condition="'$(BuildJIT)'=='false'">$(OutBaseDir).NoJIT</OutBaseDir>
<IntBaseDir Condition="'$(IntBaseDir)'==''">$(OutBaseDir)</IntBaseDir>
</PropertyGroup>

Expand All @@ -64,6 +65,7 @@

<!-- Output directories -->
<PropertyGroup>
<OutDirName Condition="'$(ENABLE_CODECOVERAGE)'=='true'">codecoverage</OutDirName>
<OutDirName Condition="'$(OutDirName)'==''">$(Configuration.ToLower())</OutDirName>
<OutDir>$(OutBaseDir)\bin\$(PlatformPathName.ToLower())_$(OutDirName)\</OutDir>
<IntDir>$(IntBaseDir)\obj\$(PlatformPathName.ToLower())_$(Configuration.ToLower())\$(MSBuildProjectName)\</IntDir>
Expand Down
4 changes: 4 additions & 0 deletions deps/chakrashim/core/Build/scripts/check_prefast_error.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#-------------------------------------------------------------------------------------------------------
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
#-------------------------------------------------------------------------------------------------------

param (
[string]$directory,
Expand Down
8 changes: 6 additions & 2 deletions deps/chakrashim/core/Build/scripts/post_build.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#-------------------------------------------------------------------------------------------------------
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
#-------------------------------------------------------------------------------------------------------

param (
[ValidateSet("x86", "x64", "arm", "*")]
[string]$arch="*",

[ValidateSet("debug", "release", "test", "*")]
[ValidateSet("debug", "release", "test", "codecoverage", "*")]
[string]$flavor = "*",

[string]$srcpath = "",
Expand All @@ -23,7 +28,6 @@ param (

$global:exitcode = 0


if ($arch -eq "*") {

. "$PSScriptRoot\util.ps1"
Expand Down
5 changes: 5 additions & 0 deletions deps/chakrashim/core/Build/scripts/pre_build.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#-------------------------------------------------------------------------------------------------------
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
#-------------------------------------------------------------------------------------------------------

#
# Pre-Build script
#
Expand Down
5 changes: 5 additions & 0 deletions deps/chakrashim/core/Build/scripts/pre_post_util.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#-------------------------------------------------------------------------------------------------------
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
#-------------------------------------------------------------------------------------------------------

. "$PSScriptRoot\util.ps1"

function UseValueOrDefault($value, $defaultvalue, $defaultvalue2) {
Expand Down
5 changes: 5 additions & 0 deletions deps/chakrashim/core/Build/scripts/util.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#-------------------------------------------------------------------------------------------------------
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
#-------------------------------------------------------------------------------------------------------

function WriteMessage($str)
{
Write-Output $str
Expand Down
51 changes: 51 additions & 0 deletions deps/chakrashim/core/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality. We will
prioritize marginalized people's safety over marginalized people's comfort.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct

Project maintainers have the right _and responsibility_ to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting us at [[email protected]][email]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.

This Code of Conduct is adapted from the [Contributor Covenant][homepage] version 1.3.0
and [Open Code of Conduct][opencoc].

[email]: mailto:[email protected]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
[opencoc]: http://todogroup.org/opencodeofconduct/
54 changes: 27 additions & 27 deletions deps/chakrashim/core/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# ChakraCore

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) API, which allows you to easily embed ChakraCore in your applications.
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](http://blogs.windows.com/msedgedev/).

## Build Status
## [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] |

[x86dbgicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_debug/badge/icon
[x86dbglink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_debug/
[x86testicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_test/badge/icon
[x86testlink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_test/
[x86relicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_release/badge/icon
[x86rellink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x86_release/

[x64dbgicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_debug/badge/icon
[x64dbglink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_debug/
[x64testicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_test/badge/icon
[x64testlink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_test/
[x64relicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_release/badge/icon
[x64rellink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_x64_release/

[armdbgicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_debug/badge/icon
[armdbglink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_debug/
[armtesticon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_test/badge/icon
[armtestlink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_test/
[armrelicon]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_release/badge/icon
[armrellink]: http://dotnet-ci.cloudapp.net/job/Private/job/Microsoft_ChakraCore_arm_release/

Note: these badges are correct but currently display on GitHub as image not found because of permissions. This will be fixed when the build jobs are public.
[x86dbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_debug/badge/icon
[x86dbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_debug/
[x86testicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_test/badge/icon
[x86testlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_test/
[x86relicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_release/badge/icon
[x86rellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x86_release/

[x64dbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_debug/badge/icon
[x64dbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_debug/
[x64testicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_test/badge/icon
[x64testlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_test/
[x64relicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_release/badge/icon
[x64rellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_x64_release/

[armdbgicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_debug/badge/icon
[armdbglink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_debug/
[armtesticon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_test/badge/icon
[armtestlink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_test/
[armrelicon]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_release/badge/icon
[armrellink]: http://dotnet-ci.cloudapp.net/job/Microsoft_ChakraCore/job/Microsoft_ChakraCore_arm_release/

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

## Security

Expand All @@ -49,7 +49,7 @@ If you believe you have found a security issue in ChakraCore, please share it wi

## Building ChakraCore

You can build ChakraCore on Windows 7 SP1 or above with either Visual Studio 2013 or 2015 with C++ support installed. Once you have Visual Studio installed:
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
Expand All @@ -75,10 +75,10 @@ Contributions to ChakraCore are welcome. Here is how you can contribute to Chak
* [Submit pull requests](https://github.com/Microsoft/ChakraCore/pulls) for bug fixes and features and discuss existing proposals
* Chat about [@ChakraCore](https://twitter.com/ChakraCore) on Twitter

Please refer to [Contribution guidelines](CONTRIBUTING.md) for more details.
Please refer to [Contribution guidelines](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md) for more details.

## Roadmap
For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/ChakraCore/wiki/Roadmap).

## Contact us
For questions about ChakraCore, please open an [issue](https://github.com/Microsoft/ChakraCore/issues/new) and prefix the issue title with [Question].
For questions about ChakraCore, please open an [issue](https://github.com/Microsoft/ChakraCore/issues/new) and prefix the issue title with [Question].
11 changes: 7 additions & 4 deletions deps/chakrashim/core/bin/ChakraCore/ChakraCore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@
$(ChakraCoreRootDirectory)Lib\Common;
$(ChakraCoreRootDirectory)Lib\Parser;
$(ChakraCoreRootDirectory)Lib\Runtime;
$(ChakraCoreRootDirectory)Lib\Backend;
$(ChakraCoreRootDirectory)Lib\Jsrt;
$(IntDir);
%(AdditionalIncludeDirectories);
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(BuildJIT)'!='false'">
$(ChakraCoreRootDirectory)Lib\Backend;
%(AdditionalIncludeDirectories);
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -66,7 +69,7 @@
<ClCompile Include="$(MsBuildThisFileDirectory)ConfigParserExternals.cpp" />
<ClCompile Include="$(MsBuildThisFileDirectory)ChakraCoreDLLFunc.cpp" />
<ClCompile Include="TestHooks.cpp" />
<None Include="CoreCommon.ver" />
<None Include="..\CoreCommon.ver" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="$(MsBuildThisFileDirectory)ChakraCore.rc">
Expand All @@ -84,7 +87,7 @@
<ProjectReference Include="..\..\lib\jsrt\core\Chakra.Jsrt.Core.vcxproj">
<Project>{706083f7-6aa4-4558-a153-6352ef9220ee}</Project>
</ProjectReference>
<ProjectReference Include="..\..\Lib\Backend\Chakra.Backend.vcxproj">
<ProjectReference Include="..\..\Lib\Backend\Chakra.Backend.vcxproj" Condition="'$(BuildJIT)'!='false'">
<Project>{18cf279f-188d-4655-b03d-74f65388e7d1}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\Common\codex\Chakra.Common.Codex.vcxproj">
Expand Down Expand Up @@ -138,4 +141,4 @@
</ItemGroup>
<Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
</Project>
14 changes: 7 additions & 7 deletions deps/chakrashim/core/bin/CoreCommon.ver
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#define VER_DEBUG 0
#endif

#if CHAKRA_VERSION_BUILD_RELEASE
#if CHAKRA_CORE_VERSION_RELEASE
#define VER_PRIVATE 0
#else
#define VER_PRIVATE VS_FF_PRIVATEBUILD
#endif

#if CHAKRA_VERSION_BUILD_RELEASE && CHAKRA_VERSION_BUILD_PRERELEASE
#if CHAKRA_CORE_VERSION_RELEASE && CHAKRA_CORE_VERSION_PRERELEASE
#define VER_PRERELEASE VS_FF_PRERELEASE
#else
#define VER_PRERELEASE 0
Expand All @@ -38,22 +38,22 @@
#define VER_FILEDESCRIPTION_SUFFIX1_STR L"Test"
#endif

#if !CHAKRA_VERSION_BUILD_RELEASE
#if !CHAKRA_CORE_VERSION_RELEASE
#define VER_FILEDESCRIPTION_SUFFIX2_STR L"Private"
#elif CHAKRA_VERSION_BUILD_PRERELEASE
#elif CHAKRA_CORE_VERSION_PRERELEASE
#define VER_FILEDESCRIPTION_SUFFIX2_STR L"Pre-release"
#endif

#if CHAKRA_VERSION_BUILD_RELEASE
#if CHAKRA_CORE_VERSION_RELEASE
#define VER_PRODUCTBUILD 0
#elif CHAKRA_VERSION_BUILD_NUMBER
#define VER_PRODUCTBUILD CHAKRA_VERSION_BUILD_NUMBER
#else
#define VER_PRODUCTBUILD 65535
#endif

#if CHAKRA_VERSION_BUILD_RELEASE
#define VER_PRODUCTBUILD_QFE CHAKRA_VERSION_BUILD_RELEASE_QFE
#if CHAKRA_CORE_VERSION_RELEASE
#define VER_PRODUCTBUILD_QFE CHAKRA_CORE_VERSION_RELEASE_QFE
#elif CHAKRA_VERSION_BUILD_QFE
#define VER_PRODUCTBUILD_QFE CHAKRA_VERSION_BUILD_QFE
#else
Expand Down
5 changes: 5 additions & 0 deletions deps/chakrashim/core/bin/ch/CodexAssert.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------

#include "stdafx.h"

// The Codex library requires this assertion.
Expand Down
41 changes: 41 additions & 0 deletions deps/chakrashim/core/jenkins.check_copyright.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#-------------------------------------------------------------------------------------------------------
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
#-------------------------------------------------------------------------------------------------------

# Python 2.7

import sys
import os.path
import re

copyright_lines = [
r'-------------------------------------------------------------------------------------------------------',
r' Copyright \(C\) Microsoft\. All rights reserved\.',
r' Licensed under the MIT license\. See LICENSE\.txt file in the project root for full license information\.'
]

regexes = []
for line in copyright_lines:
pattern = '^.{1,5}%s$' % line
regexes.append(re.compile(pattern))

if len(sys.argv) < 2:
print "Requires passing a filename as an argument."
exit(1)

file_name = sys.argv[1]
if not os.path.isfile(file_name):
print "File does not exist:", file_name, "(not neccesarily an error)"
exit(0)

with open(file_name, 'r') as sourcefile:
for x in range(0,len(copyright_lines)):
# TODO add a check for empty files (dummy.js etc), as they cause the script to crash here
line = next(sourcefile)
line = line.rstrip()
matches = regexes[x].match(line)
if not matches:
print file_name, "... does not contain a correct Microsoft copyright notice."
# found a problem so exit and report the problem to the caller
exit(1)
Loading

0 comments on commit 5d860fd

Please sign in to comment.