[v8-users] Declare an API in javascript and define in V8.

2018-06-27 Thread Abhishek Kanike
Hi v8 users, I would like to call a function from javascript which when processed by v8 engine, calls my own library function. For example, *In javascript (main.js):* var start = Date.now(); myFunctionInV8(); // js code... // js code... // js code... var end = Date.now(); *In v8:// may

[v8-users] Define an API in javascript and handle in V8.

2018-06-27 Thread Abhishek Kanike
Hi v8 users, I would like to call a function from javascript which when processed by v8 engine, calls my own library function. For example, *In javascript (main.js):* var start = Date.now(); myFunctionInV8(); // js code... // js code... // js code... var end = Date.now(); *In v8:* void

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-06-21 Thread Abhishek Kanike
gin provides its own v8::Platform implementation, overriding the default > platform. > > On Thu, Jun 21, 2018 at 9:55 AM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi Jakob and v8-users,​​ >> I have following observations on printing logs in v8 and date.

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-06-21 Thread Abhishek Kanike
equirements. > > On Mon, Jun 18, 2018 at 3:48 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Jakob, >> Thanks for quick reply. >> That's a good point, should have tried with gdb. Will check with that. >> Is there a way to add logs in v8 source

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-06-18 Thread Abhishek Kanike
ium=282 > > and step through the code from there. > > On Mon, Jun 18, 2018 at 2:39 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> ​Hi, >> For confirmation i am using a simple Date.now() call on button click >> [Attached]. >> I have ad

[v8-users] How to call a user-defined function from my object file in v8 code.

2018-06-04 Thread Abhishek Kanike
Hi, I need some help in using user-defined object files with v8 code. How can i call a c++ function from v8 engine code. For example, from here ( https://cs.chromium.org/chromium/src/v8/src/base/platform/time.cc?dr=C=0=382) I want to call a function of my own c++ file. Two question arise here:

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-05-21 Thread Abhishek Kanike
Sorry JaKob On Mon, May 21, 2018, 6:51 PM Abhishek Kanike <kai.dranzer32...@gmail.com> wrote: > Cool.. I see it. Thanks a lot Jacob. > > On Mon, May 21, 2018, 5:40 PM Jakob Kummerow <jkumme...@chromium.org> > wrote: > >> The time always has to be retrieved fro

Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-05-21 Thread Abhishek Kanike
win32,posix}.cc. > > On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi, >> I want to know how the date.now() function is called in javascript (or >> how it returns the value). I believe that javascript uses date.now() by

[v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)

2018-05-21 Thread Abhishek Kanike
Hi, I want to know how the date.now() function is called in javascript (or how it returns the value). I believe that javascript uses date.now() by system call. I want to in chrome source code how it is being set. This is useful for one of the performance benchmark that I am working on. Can