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

43 Коммитов

Автор SHA1 Сообщение Дата
Yulong Wang 9c9d8f611a
Fix load() implementation of transportable object (#216)
* Fix load() implementation of transportable object

* Add a test case for AutoTransport
2018-04-18 17:43:23 -07:00
Zhang Lei a8d23e0d37
Timers related function, set/clear Immediate/Timeout/Interval (#207)
* Set/Clear Immedidate/Timeout/Interval.

* add test case for napa set/clear Immediate/Timeout/Interval.

* Fix build error on windows for Timer related.

* Fix timer queue loop wait too long on new urgent tasks.
More robust timer-test.

* More tolerant on timer scheduler error.

* Fix windows build break using node 6.

* Tolerant more on timer schedule error special in auto build environment.

* Using strick js function tradition in Binding export functions on timer.

* change module name from timer to timers.

* make timers a buildin module.

* Remove non-used code line caused by copy/paste

* Do not need varible arguments here when constructing Timeout.

* Free persistent handles saved for timers at correct time point.

* Add test program under misc/ to check the memory usage on timers.

* Fix build break under node 6 for v8 SetWeak api.
Free timer early when it is not used.

* Add condition on immediate where no timer is attached to Timeout.

* Remove release timer in advance.

* Reset to release persistent handle.

* Group timers test under napa/timers

* typo fix

* Add SchedulePhase to generalize immediate/normal task types and keep expansion for future.

* Remove internal memeroy test scripts

* Some name style changes according to review suggestions.

* modify unittest on worker schedule interface changed.

* Force node 8.9.4 to avoid auto build test tools fail on new node 8.10.0 temperately.

* Force windows build use node 8.9.4 to avoid 8.10.0 crash issue temperately.

* Force OSX build use node 8.9.4 to avoid node 8.10.0 crash issue temperately.

* Run timer related test in another standalone mocha.
So that timer scheduler error not affected by other tests.

* revert back node version related changes.

* fix commandline issue on windows

* Force OSX build use node 8.9.4 to avoid node 8.10.0 crash issue temperately.

* revert osx node version on 8.9.4

* working 1

* working binding build 2

* remove static function getzoneScheduler

* Hide CallbackTask inside cpp. Add more comments. And some other modifications according to review.

* Refactor the napa-bingding build related changes. Do not add any
timers logic into napa-binding.node, so original build works without
add the timer-warpper.cpp into its source.

* fix typo in comments.
2018-04-04 16:47:03 -07:00
Yulong Wang 4604bc8718
Update function group `zone.broadcast` (#201)
* New 'broadcast' function group Proposal

* update function group `zone.broadcast`

* Delete temp file

* Trival fixes and comments resolve
2018-04-03 15:38:29 -07:00
Yulong Wang 73afc49c95
Fix node version check (#204)
Fix the bug in node version check in file lib/binding.js
2018-03-12 11:10:26 -07:00
Yulong Wang e5478c7bb7
Add Napa.js core modules development guideline (#191) 2018-03-07 10:50:02 -08:00
Yulong Wang 17e519be03
Allow both .js and .ts files in /lib/core (#190) 2018-02-02 15:01:23 -08:00
Allen (Yongshuang) Wang 0f699c541b fix bug when transporting 'null' (#181) 2018-01-05 15:15:27 -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 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
Daiyi Peng 77ec3a03bc Fix hanging promise when callback from Napa to Node (#141) 2017-11-28 16:42:43 -08:00
Yulong Wang 2f411dc2fd Disable incremental marking on Node > 8.4.0 (#134)
* Disable incremental marking on Node >= 8.4.0, instead of throwing exception.

* Use npmlog to output error message

* Add new line
2017-11-22 11:40:55 -08:00
Yulong Wang fd45141c04 [ts] Fix cid decorator for transportable object definition (#133) 2017-11-21 11:42:12 -08:00
Yulong Wang bf3672fa0b Throw exception when node version is not supported (#125) 2017-11-08 23:44:12 -08:00
Allen Wang 83009f4986 add node version checking and prompt (#115)
* Update binding.js

* resolve comments
2017-11-03 13:40:55 -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 6b4e183533 API tuning: two minor changes for usability. (#29)
1. Make broadcast/execute args optional.
2. Introduce 'global.napa' to access napajs module.
2017-08-07 17:39:19 -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
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
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 857b0dae13 Restructure tests folder and enable npm test 2017-06-27 16:59:42 -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
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
Daiyi Peng b8f58f7ca0 Merged PR 293569: Implement anonymous function execution.
1. Support function transport.
2. Implement zone.execute on function.
2017-06-15 18:10:11 +00:00
Daiyi Peng f41cb059be Merged PR 293286: Documentation iteration 2
1. add metric.md and log.md
2. fix anchor issue in VSTS on displaying markdown format.
3. remove some legacy md files.
2017-06-13 00:54:22 +00:00
Daiyi Peng a641034ecc Merged PR 291952: Add benchmark to napajs. 2017-06-12 17:10:21 +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
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
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 fb8175f0d1 Merged PR 275046: changed broadcast to return promise<void>
changed broadcast to return promise<void>
2017-05-23 21:24:04 +00:00
Asi Bross 30fa24e01d Merged PR 268036: Remove initialization from bootstrap file feature
Remove initialization from bootstrap file feature
2017-05-18 17:06:03 +00:00
Asi Bross 08e974ac2e Merged PR 266728: Move dispatcher to runtime folder
Move dispatcher to runtime folder
2017-05-15 21:40:38 +00:00
Daiyi Peng beac8fa9d3 Merged PR 265435: Merge dev/dapeng/js_test to master 2017-05-15 21:13:21 +00:00
Asi Bross b853614d49 Merged PR 264966: Integrate napa addon with napa.dll
Integrate napa addon with napa.dll
2017-05-12 20:06:44 +00:00
Asi Bross 93f19e06ca Merged PR 249141: Use transport context in execute
Use transport context in execute
2017-04-26 21:13:41 +00:00
Daiyi Peng dc8691044f Merged PR 245145: Merge dev/dapeng/allocator_support to master 2017-04-25 00:11:40 +00:00
Sunghoon Choi e3cc462a48 Merged PR 236850: Add more APIs into core modules.
I borrowed assert.js and util.js from node.js.
2017-04-17 17:27:11 +00:00
Yulong Wang b4bf91e7ee Merged PR 217176: [VanillaNapa] add javascript core modules
[VanillaNapa] add javascript core modules
2017-03-24 00:32:49 +00:00
Yulong Wang 0e54bec44b Merged PR 218054: [VanillaNapa] [js-core-module] Add EventEmitter
File nodejs commits mapping:

.\events.js @221b03ad20453f08cef7ac3fcc788b8466edc3ef
2017-03-23 20:35:55 +00:00