-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Node.js to run with Microsoft's ChakraCore engine #4765
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
77a5f8d
chakrashim: implement V8 APIs on Chakra
kunalspathak 8a8c98c
deps: chakracore source code
kunalspathak b6e81a2
build: build with chakrashim/chakracore
kunalspathak 81fb6d5
node-gyp: Support to build with chakracore engine
kunalspathak c1ae676
gyp: Support to build with chakracore engine
kunalspathak 6e97a0b
node-gyp: Support to build with chakracore for ARM
kunalspathak 432d4a9
gyp: Support to build with chakracore for ARM
kunalspathak abccd71
src,lib: Node source changes for Chakra engine
kunalspathak 19b2e48
test: Fixed unittest for Chakra engine
kunalspathak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ _UpgradeReport_Files/ | |
ipch/ | ||
*.sdf | ||
*.opensdf | ||
/.vs | ||
|
||
/config.mk | ||
/config.gypi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
!core | ||
!core/**/*.sln | ||
!core/**/*.vcxproj | ||
!core/**/*.vcxproj.filters | ||
!core/**/Debug/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Authors ordered by first contribution. | ||
|
||
Paul Vick <[email protected]> | ||
Saar Yahalom <[email protected]> | ||
Nadav Bar <[email protected]> | ||
Jianchun Xu <[email protected]> | ||
Sandeep Agarwal <[email protected]> | ||
Curtis Man <[email protected]> | ||
Munyiri Kamau <[email protected]> | ||
Kunal Pathak <[email protected]> | ||
Ryan Dawson <[email protected]> | ||
mybios <[email protected]> | ||
Oguz Bastemur <[email protected]> | ||
|
||
# Generated by node tools/update-authors.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright Microsoft. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to | ||
deal in the Software without restriction, including without limitation the | ||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
sell copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
'variables': { | ||
'target_arch%': 'ia32', | ||
'library%': 'static_library', # build chakracore as static library or dll | ||
'component%': 'static_library', # link crt statically or dynamically | ||
'chakra_dir%': 'core', | ||
'msvs_windows_target_platform_version_prop': '', | ||
|
||
'conditions': [ | ||
['target_arch=="ia32"', { 'Platform': 'x86' }], | ||
['target_arch=="x64"', { 'Platform': 'x64' }], | ||
['target_arch=="arm"', { | ||
'Platform': 'arm', | ||
'msvs_windows_target_platform_version_prop': | ||
'/p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion)', | ||
}], | ||
], | ||
}, | ||
|
||
'targets': [ | ||
{ | ||
'target_name': 'chakracore', | ||
'toolsets': ['host'], | ||
'type': 'none', | ||
|
||
'variables': { | ||
'chakracore_sln': '<(chakra_dir)/build/Chakra.Core.sln', | ||
'chakracore_header': [ | ||
'<(chakra_dir)/lib/jsrt/chakracore.h', | ||
'<(chakra_dir)/lib/jsrt/chakracommon.h' | ||
], | ||
'chakracore_binaries': [ | ||
'<(chakra_dir)/build/vcbuild/bin/<(Platform)_$(ConfigurationName)/chakracore.dll', | ||
'<(chakra_dir)/build/vcbuild/bin/<(Platform)_$(ConfigurationName)/chakracore.pdb', | ||
'<(chakra_dir)/build/vcbuild/bin/<(Platform)_$(ConfigurationName)/chakracore.lib', | ||
], | ||
}, | ||
|
||
'actions': [ | ||
{ | ||
'action_name': 'build_chakracore', | ||
'inputs': [ | ||
'<(chakracore_sln)' | ||
], | ||
'outputs': [ | ||
'<@(chakracore_binaries)', | ||
], | ||
'action': [ | ||
'msbuild', | ||
'/p:Platform=<(Platform)', | ||
'/p:Configuration=$(ConfigurationName)', | ||
'/p:RuntimeLib=<(component)', | ||
'<(msvs_windows_target_platform_version_prop)', | ||
'/m', | ||
'<@(_inputs)', | ||
], | ||
}, | ||
], | ||
|
||
'copies': [ | ||
{ | ||
'destination': 'include', | ||
'files': [ '<@(chakracore_header)' ], | ||
}, | ||
{ | ||
'destination': '<(PRODUCT_DIR)', | ||
'files': [ '<@(chakracore_binaries)' ], | ||
}, | ||
], | ||
|
||
'direct_dependent_settings': { | ||
'library_dirs': [ '<(PRODUCT_DIR)' ], | ||
}, | ||
|
||
}, # end chakracore | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
{ | ||
'variables': { | ||
'library_files': [ | ||
'lib/chakra_shim.js', | ||
], | ||
}, | ||
|
||
'targets': [ | ||
{ | ||
'target_name': 'chakrashim', | ||
'type': '<(library)', | ||
|
||
'dependencies': [ | ||
'chakra_js2c#host', | ||
], | ||
|
||
'include_dirs': [ | ||
'include', | ||
'<(SHARED_INTERMEDIATE_DIR)' | ||
], | ||
'defines': [ | ||
'BUILDING_CHAKRASHIM=1', | ||
], | ||
'conditions': [ | ||
[ 'target_arch=="ia32"', { 'defines': [ '__i386__=1' ] } ], | ||
[ 'target_arch=="x64"', { 'defines': [ '__x86_64__=1' ] } ], | ||
[ 'target_arch=="arm"', { 'defines': [ '__arm__=1' ] } ], | ||
['node_engine=="chakracore"', { | ||
'dependencies': [ | ||
'chakracore.gyp:chakracore#host', | ||
], | ||
'export_dependent_settings': [ | ||
'chakracore.gyp:chakracore#host', | ||
], | ||
}], | ||
], | ||
'msvs_use_library_dependency_inputs': 1, | ||
|
||
'direct_dependent_settings': { | ||
'include_dirs': [ | ||
'include', | ||
], | ||
'defines': [ | ||
'BUILDING_CHAKRASHIM=1', | ||
], | ||
'libraries': [ | ||
'-lole32.lib', | ||
'-lversion.lib', | ||
'<@(node_engine_libs)', | ||
], | ||
'conditions': [ | ||
[ 'target_arch=="arm"', { | ||
'defines': [ '__arm__=1' ] | ||
}], | ||
], | ||
}, | ||
|
||
'sources': [ | ||
'include/libplatform/libplatform.h', | ||
'include/v8.h', | ||
'include/v8config.h', | ||
'include/v8-debug.h', | ||
'include/v8-platform.h', | ||
'include/v8-profiler.h', | ||
'include/v8-version.h', | ||
'src/jsrtcachedpropertyidref.inc', | ||
'src/jsrtcontextcachedobj.inc', | ||
'src/jsrtcontextshim.cc', | ||
'src/jsrtcontextshim.h', | ||
'src/jsrtisolateshim.cc', | ||
'src/jsrtisolateshim.h', | ||
'src/jsrtpromise.cc', | ||
'src/jsrtproxyutils.cc', | ||
'src/jsrtproxyutils.h', | ||
'src/jsrtstringutils.cc', | ||
'src/jsrtstringutils.h', | ||
'src/jsrtutils.cc', | ||
'src/jsrtutils.h', | ||
'src/v8array.cc', | ||
'src/v8arraybuffer.cc', | ||
'src/v8boolean.cc', | ||
'src/v8booleanobject.cc', | ||
'src/v8chakra.h', | ||
'src/v8context.cc', | ||
'src/v8date.cc', | ||
'src/v8debug.cc', | ||
'src/v8exception.cc', | ||
'src/v8external.cc', | ||
'src/v8function.cc', | ||
'src/v8functiontemplate.cc', | ||
'src/v8global.cc', | ||
'src/v8handlescope.cc', | ||
'src/v8int32.cc', | ||
'src/v8integer.cc', | ||
'src/v8isolate.cc', | ||
'src/v8message.cc', | ||
'src/v8number.cc', | ||
'src/v8numberobject.cc', | ||
'src/v8object.cc', | ||
'src/v8objecttemplate.cc', | ||
'src/v8persistent.cc', | ||
'src/v8script.cc', | ||
'src/v8signature.cc', | ||
'src/v8stacktrace.cc', | ||
'src/v8string.cc', | ||
'src/v8stringobject.cc', | ||
'src/v8template.cc', | ||
'src/v8trycatch.cc', | ||
'src/v8typedarray.cc', | ||
'src/v8uint32.cc', | ||
'src/v8v8.cc', | ||
'src/v8value.cc', | ||
], | ||
}, # end chakrashim | ||
|
||
{ | ||
'target_name': 'chakra_js2c', | ||
'type': 'none', | ||
'toolsets': ['host'], | ||
'msvs_disabled_warnings': [4091], | ||
'actions': [ | ||
{ | ||
'action_name': 'chakra_js2c', | ||
'inputs': [ | ||
'<@(library_files)' | ||
], | ||
'outputs': [ | ||
'<(SHARED_INTERMEDIATE_DIR)/chakra_natives.h', | ||
], | ||
'action': [ | ||
'<(python)', | ||
'./../../tools/js2c.py', | ||
'--namespace=jsrt', | ||
'<@(_outputs)', | ||
'<@(_inputs)', | ||
], | ||
}, | ||
], | ||
}, # end chakra_js2c | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.baseline -crlf | ||
*.cmd -crlf | ||
test/*.js -crlf |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: is
node_engine
established elsewhere? Maybejs_engine
? This line and everywhere else for consistencyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually just prefix node stuff with
node_
in here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, cool