On Mon, Nov 12, 2018 at 7:38 AM TLim <heuichan....@gmail.com> wrote: > Hi, > > So, I'm trying to get a direct access to the source file where disassembly > information lives. > For example, when I run a JS program like below > function foo() > { > return 1+2; > } > > foo(); > > I get the output like below when run $d8 foo.js. > > -> 0x22bef6ea00ed @ 19 : 13 01 00 LdaGlobal [1], [0] > [ accumulator <- 0x22bef6ea01d9 <JSFunction foo (sfi = 0x22bef6e9fff1)> > ] > -> 0x22bef6ea00f0 @ 22 : 26 fa Star r1 > [ accumulator -> 0x22bef6ea01d9 <JSFunction foo (sfi = 0x22bef6e9fff1)> > ] > [ r1 <- 0x22bef6ea01d9 <JSFunction foo (sfi = 0x22bef6e9fff1)> > ] > -> 0x22bef6ea00f2 @ 24 : 5f fa f9 01 CallNoFeedback r1, r2-r2 > [ r1 -> 0x22bef6ea01d9 <JSFunction foo (sfi = 0x22bef6e9fff1)> > ] > [ r2 -> 0x06053d3004d9 <undefined> ] > > I know that some of them get printed in src/objects.cc, but the part between > the brackets > [ accumulator <- 0x22bef6ea01d9 <JSFunction foo (sfi = 0x22bef6e9fff1)> ] > is the part I'm not sure where the source code lives. > > If anyone can help me to locate this file, that will be a great help! > > Thank you!
PrintRegisters() in src/runtime/runtime-interpreter.cc. The part after the arrow comes from the overloaded ShortPrint() method of the value in the accumulator, a JSFunction in this case. -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.