Граф коммитов

104 Коммитов

Автор SHA1 Сообщение Дата
Yulong Wang ab54a359fb Remove trailing semi-colon in macro definitions (#127)
* Remove ';' in macro definitions

* Update macro NAPA_DECLARE_PERSISTENT_CONSTRUCTOR to function-call style

* Fix build break in lock-wrap.cpp
2018-01-05 13:10:57 -08:00
Yulong Wang 5e74926738 Fix string encoding in Napa (#153)
The following components are supporting unicode string now.
napa.store APIs
FunctionSpec that used in zone.execute()
Fix: #144
2017-12-28 17:20:28 -08:00
Daiyi Peng aa5e979960 Fix module loader crash on package.json that doesn't have 'main' property. (#156)
* Fix module loader crash on package.json without 'main' property

* Fix module loader crash on package.json that does not have main property.

* Revert sync-test change since it's being fixed in another PR.

* Fix a missing bracket on sync-test
2017-12-27 16:33:04 -08:00
Allen (Yongshuang) Wang 1bf7fed967 transport JavaScript standard builtin objects (#151)
* transport-fallback one pager

* refine the design doc

* fix typos

* prototype of v8-transport-helper

* builtin types transporter

* resolve some comments

* Update transport-js-builtins.md

* Update transport-js-builtins.md

* resolve comments

* add NAPA_API for  transportutils methods

* in order to retrieve v8::Value(De)Serilaizer::Delegate symbols correctly, make SerializeValue / DesrializeValue non-static

* Disable rtti for compatibility with node and v8

* make v8-extensions a static lib to use -fno-rtti

* restrict v8-extensions lib building by v8 version

* add -fPIC to build v8-extensions for linux

* include stdlib.h explicitly for malloc/free/realloc

* .cc to .cpp under src/v8-extensions
2017-12-19 20:43:38 -08:00
Yulong Wang f76aac2947 Fix build warning: conversion from 'size_t' to 'int', possible loss of data (#145)
Add a static cast to fix the following build warning:
`conversion from 'size_t' to 'int', possible loss of data`
2017-12-08 17:01:44 -08:00
Yulong Wang 0ea99ff8d5 [Feature] Introduce napa.sync.Lock for synchronization handling (#129)
* namespace napa.sync API proposal

* Update md files

* Sync lock implementation

* Use C++ implementation to make sure mutex get release when isolate terminated forcely

* Add optional parameters for passing-through

* Change params from ...rest to optional
2017-12-04 11:01:52 -08:00
Yulong Wang ae500b4ac2 dll::ThisLineLocation(): Remove UNC prefix '\\?\' if it presents (#132)
* dll::ThisLineLocation(): Remove UNC prefix '\\?\' if it presents

* Use filesystem implementation to check UNC prefix
2017-11-21 15:39:01 -08:00
Yulong Wang d31c7b125a Add cache for ModuleResolver (#128)
* Add Module resolver cache

* Update path parameter and add unittest for module resolver cache
2017-11-13 11:41:04 -08:00
Allen Wang 3bb7c92287 napa embeded support for Linux (#110)
* napa embeded building for linux

* polish building solution and readme.md

* napa runner

* add License

* change dir to napa-runner

* fix comments

* fix comments and add TODOs

* fix typo
2017-11-08 11:14:18 -08:00
Yulong Wang 3fe27f417b Fix build warning: ISO C++ forbids converting a string constant to ‘char*’ (#112) 2017-11-02 23:44:14 -07:00
Yulong Wang 270c507a43 Bugfix: Assertion failed: `workerId < _workers.size()` (#109)
* Bugfix: start worker thread after it put into vector

* Fix build error in unittest

* Make a copy of ZoneSettings in Worker::Impl
2017-11-02 13:54:14 -07:00
Asi Bross a2f231f9a6 Export '__in_embed' switch that is defined and set to true, when running napa in embed mode (#64) 2017-09-25 14:42:05 -07:00
Asi Bross 6ad7541395 Added a script for building napa in embed mode (#47)
* Added a script for building napa in embed mode

* Break embed build scripts into modules and combine with existing build.js
2017-08-28 17:21:13 -07:00
Daiyi Peng 3211319d77 Polish zone.execute: transported function will inherit __dirname from caller. (#40)
This change addresses issue to make zone.execute on anonymous function more fluent. Also it made transported functions more secure, which can only access their own v8 contexts.

Detailed changes

Support require(path, script) to create module from string in Napa zone.
Introduce napa.v8.currentStack to get current stack.
Replace eval with creating a new module for transported function.
Use caller JS file + function hash as module id for transported function. As a result, transported function will use __dirname from caller.
Updated test files.
Notable comments

We always assume that the function passed to zone.execute without property origin is to use caller file as origin. This assumption makes most fluent usage for most cases, but if functions are defined in different file other than caller, this assumption will be broken. User can explicit specify `f.origin = __filename' in the file where f is defined to avoid issue.

Bug fixes

Issue: require.resolve should throw on non-existed path.
2017-08-16 18:39:36 -07:00
Daiyi Peng dee4ed27fa Release candidate for 0.1.0 (#23)
1. Linux and Mac support
2. Fixed memory leak on TransportContextWrap and CallContextWrap.options
3. Fixed race condition in StoreWrap
4. Added examples/tutorial
5. Documentation tuning
6. Continuous integration with Travis CI
2017-08-03 16:14:30 -07:00
Yulong Wang a1b0bac66c Fix build warnings (#2)
* Fix build warnings

* fix build break

* Fix build break in unittest
2017-07-20 16:47:05 -07:00
Daiyi Peng f75cefa6d2 Merged PR 327797: Support Mac
Support Mac
2017-07-19 17:00:55 -07:00
Daiyi Peng fbd5569ee2 Merged PR 327505: Merge dev/dapeng/license to master 2017-07-19 00:29:19 +00:00
Daiyi Peng f177191ffe Merged PR 323615: Merge dev/dapeng/fix_linux to master
Now zone.broadcast/execute can run in linux.

Remaining issues in mocha tests:
1) Random failure for __napa_zone_call__ not found.
2) TS transcompiled code for await/async will make mocha stuck.
2017-07-18 22:30:45 +00:00
Asi Bross 0dc3a40d00 Merged PR 324526: Enable module tests as part of npm test
Enable module tests as part of npm test
2017-07-14 20:45:28 +00:00
Yulong Wang 42549269cb Merged PR 321078: Split implementation under platform/ to several files
os
process
filesystem
dll
2017-07-14 01:22:29 +00:00
Yulong Wang df60516a4a Merged PR 319351: Add posix/platform implementation
Add posix/platform implementation
2017-07-11 22:31:10 +00:00
Asi Bross 64f3bc7101 Merged PR 320414: Add unittests to 'npm run unittest'
Add unittests to 'npm run unittest'
2017-07-11 20:51:47 +00:00
Daiyi Peng a03ed7e342 Merged PR 319707: Enable UT on linux
Enable UT on linux
2017-07-11 19:05:03 +00:00
Yulong Wang d39e2836de Merged PR 319246: Fix build break under linux (filesystem.h)
Fix build break under linux (filesystem.h)
2017-07-10 21:29:19 +00:00
Daiyi Peng 08767c16eb Merged PR 317123: Completely remove boost.
1) Add napa::filesystem.
2) Add UT for napa::utils::string and napa::filesystem
3) Remove boost from code and build files.
2017-07-07 22:41:49 +00:00
Yulong Wang 8fe1039a59 Merged PR 317009: Add NAPA debug logs
Add NAPA debug logs
2017-07-07 22:26:27 +00:00
Yulong Wang 97d5f2be82 Merged PR 311450: Merge dev/yulongw/fix-linux-build-break to master
Fix build break in Linux.

(Currently link will failed because we do not have the platform.cpp for linux. Will add in future change.)
2017-07-06 21:27:01 +00:00
Asi Bross a665942332 Merged PR 316411: enable unit tests in npm
enable unit tests in npm
2017-07-06 21:14:44 +00:00
Asi Bross ac94741fe2 Merged PR 313779: Introduce a timer class (boost free) for supporting timeout
Introduce a timer class (boost free) for supporting timeout
2017-07-05 18:38:02 +00:00
Asi Bross 29eae3ff62 Merged PR 312795: remove boost::program_options depenedency
remove boost::program_options depenedency
2017-07-03 16:59:37 +00:00
Daiyi Peng 33fc1569d3 Merged PR 312407: Add platform/dll to replace boost::dll
Add platform/dll to replace boost::dll
2017-07-01 01:35:31 +00:00
Asi Bross f9984825dd Merged PR 312294: Replace usage of boost property_tree with rapidjson
Replace usage of boost property_tree with rapidjson
2017-06-30 20:11:47 +00:00
Daiyi Peng 24e25d2040 Merged PR 310247: Remove broadcastSync and executeSync.
Remove broadcastSync and executeSync.
2017-06-29 19:25:36 +00:00
Asi Bross a0c478b8c7 Merge latest changes from napa/vanilla 2017-06-28 14:53:19 -07:00
Asi Bross 261f8a2da9 Set _WIN32_WINNT=0x0501 to avoid boost asio compilation warning 2017-06-21 10:47:49 -07:00
Asi Bross a561556fd7 Merged PR 301401: First round cleanup - remove msbuild files and unnecessary folders
First round cleanup - remove msbuild files and unnecessary folders
2017-06-20 18:37:47 +00:00
Asi Bross 70831b61e2 Merged PR 300167: Support building napa with cmake
Support building napa with cmake
2017-06-19 22:16:49 +00:00
Daiyi Peng c7373d8342 Merged PR 297335: Replace timeout with ExecuteOptions in zone.execute.
Replace timeout with ExecuteOptions in zone.execute.
2017-06-16 21:25:47 +00:00
Asi Bross 9e3c9bf76a Merged PR 297468: Restructure napa core modules files
Restructure napa core modules files
2017-06-15 23:44:43 +00:00
Asi Bross 0f42cf8173 Merged PR 290232: Remove clang-tidy leftovers
Remove clang-tidy leftovers
2017-06-08 20:21:06 +00:00
Daiyi Peng a3f0bcaf05 Merged PR 287788: 1. Initial 'napajs' documentation.
1. Initial 'napajs' documentation.
2. Move ns 'memory.store' to 'store'.
2017-06-07 20:20:55 +00:00
Daiyi Peng a1170779d5 Merged PR 284817: Use module path to resolve relative path when 'require' is called with a module
Use module path to resolve relative path when 'require' is called with a module context.
2017-06-05 19:12:41 +00:00
Asi Bross f6026033b5 Merged PR 282183: Add support for logging providers
Add support for logging providers
2017-06-05 17:34:45 +00:00
Daiyi Peng 8c5d1b203f Merged PR 279204: Merge dev/dapeng/refine_store to master
1. Refine Store API.
2. Support function name with namespaces in zone.execute.
2017-05-27 00:13:04 +00:00
Sunghoon Choi 9e9037c1da Merged PR 278947: Using node from nuget package
node.exe and v8 libraries come from the same nuget package. I applied this into only vanilla and taster not to break the current indexserve.
2017-05-26 22:55:41 +00:00
Daiyi Peng f40d445fdf Merged PR 278250: 1) SharedWrap => ShareableWrap and SharedPtrWrap.
1) SharedWrap => ShareableWrap and SharedPtrWrap.
2) SimpleAllocatorDebuggerWrap => AllocatorDebuggerWrap
2017-05-26 17:55:07 +00:00
Daiyi Peng 7cc3a722bc Merged PR 276180: Merge dev/dapeng/refine_transport to master
This change fixes transport.register on addon Init, with a few tuning and adding tests.

Detailed changes are:
1) Support module.require in Napa.
2) Support C++ accessibility to napa binding.
3) Remove non-transportable, as any object is not transportable is non-transportable.
4) Refine Store API.
5) Add tests for memory and transport.
2017-05-25 21:04:35 +00:00
Asi Bross 1ea9a4f603 Merged PR 276235: change getCurrentZone function to currentZone property
change getCurrentZone function to currentZone property
2017-05-24 23:19:33 +00:00
Asi Bross b553750666 Merged PR 275239: Fix bug that prevented calling broadcast from broadcast
Fix bug that prevented calling broadcast from broadcast
2017-05-24 00:11:44 +00:00