The runtime function where you added your printf is only used for slow
path. For usual comparisons we never actually run that code.

Yang

On Mon, Mar 4, 2019 at 8:34 AM <examm...@gmail.com> wrote:

> Hello,
>
> In order to understand internals of v8 engine, i want to put some "hooks"
> in operators.
> Here is what i've done (for testing purpose):
>
> v8/src/runtime/runtime-operators.cc:
>
> RUNTIME_FUNCTION(Runtime_Equal) {
>
>    printf("You are trying to compare with ==\n");
> ...
> }
>
> I have put a printf in all functions of runtime-operators.cc:
>
> I have recompile v8 and i have tried this javascript code (test.js)
>
> var min=1;
> var max=10;
>
>
> var a = Math.floor(Math.random() * Math.floor(max));
> console.log(a);
>
>
> if (a==2)
> {
>  console.log('OK');
> }
> else
> {
>  console.log('NOK');
> }
>
> I have recompiled v8 with this command:
>
> $ tools/dev/gm.py x64.release
>
>
>
>
> and i have run:
>
> ./out/x64.release/d8 test.js
>
> I do not understand why i do not see my printf messages...
>
> Thanks for your help
>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to