Awesome! Thank you! I'm sorry to keep asking questions, but I'm wondering how can I get void Code::Disassemble(const char* name, std::ostream& os, Address current_pc) { ... } to get executed instead of void BytecodeArray::Disassemble(std::ostream& os) { ...}
I've already enabled the disassembler both in the BUILD.gn and glad-definition, but still the second gets executed. The first disassembler has more information that I want, such as the Source positions and pc offset position. I truly appreciate your response and help! 2018년 11월 12일 월요일 오전 3시 0분 41초 UTC-7, Ben Noordhuis 님의 말: > > On Mon, Nov 12, 2018 at 7:38 AM TLim <heuich...@gmail.com <javascript:>> > 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.