Re: [v8-users] Building v8 with Makefile
Hi, Also, v8 is using its own toolchain for arm,mips etc, and we have toolchain already present as part of our yocto build system.So, do we have any way to make v8 build to point to our own toolchain?. please clarify. Thanks. Regards, Madan -- -- 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.
Re: [v8-users] Building v8 with Makefile
Ninja is the only officially supported build system for V8. I don't know the requirements of the yocto build system. If all you need is a wrapper, it should be very straightforward to create a two-liner Makefile that invokes the GN/ninja based build. If you need to replace GN/ninja entirely, you'll have to create a complete Makefile yourself. I'm not aware of any existing tool to do this directly; however the Node.js project maintains GYP files for V8, and one can generate Makefiles from those, so that path might be worth looking into. It's also certainly possible to create a tool yourself that generates Makefiles from GN files, but that's probably quite a bit of work. On Sun, Nov 11, 2018 at 6:30 PM madana gopal wrote: > Hi Team, > > I am trying to prepare a build for v8 in yocto build system. I saw v8 is > using ninja. Can we generate Makefile for v8 instead of ninja file?. > > If so, please share the steps. > > Thanks. > > Regards, > Madan > > -- > -- > 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. > -- -- 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.
Re: [v8-users] Right usage of v8::EscapableHandleScope
On Mon, Nov 12, 2018 at 10:47 AM Gautham B A wrote: > Hi all, > > From the v8 docs, we know that whenever a v8::Local variable needs to live > beyond the function where it was created, we need to escape it with a > v8::EscapableHandleScope. Should I call Escape() when I'm setting a v8::Local > variable as a property of some other v8::Local? Please see the > code below - > > void GetNewObject(v8::Isolate *isolate) { > v8::HandleScope handle_scope(isolate); > > v8::Local obj = v8::Object::New(isolate); > SetSomeValue(isolate, obj); > } > > void SetSomeValue(v8::Isolate *isolate, v8::Local _out){ > v8::EscapableHandleScope handle_scope(isolate); > v8::Local value = v8::String::NewFromUtf8(isolate_, "some_value", > v8::String::kNormalString); > obj_out->Set(1, handle_scope.Escape(value)); // Is it necessary to escape > "value"? > } > > Thanks, > --Gautham There's no need. It's transitively kept alive by the object you assign it to. If you created a new object and return that, that's when you'd use an EscapableHandleScope. -- -- 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.
Re: [v8-users] Where does these codes get printed? The source file!
On Mon, Nov 12, 2018 at 7:38 AM TLim 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 > ] > -> 0x22bef6ea00f0 @ 22 : 26 fa Star r1 > [ accumulator -> 0x22bef6ea01d9 > ] > [ r1 <- 0x22bef6ea01d9 > ] > -> 0x22bef6ea00f2 @ 24 : 5f fa f9 01 CallNoFeedback r1, r2-r2 > [ r1 -> 0x22bef6ea01d9 > ] > [ r2 -> 0x06053d3004d9 ] > > I know that some of them get printed in src/objects.cc, but the part between > the brackets > [ accumulator <- 0x22bef6ea01d9 ] > 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.
[v8-users] Right usage of v8::EscapableHandleScope
Hi all, >From the v8 docs, we know that whenever a v8::Local variable needs to live beyond the function where it was created, we need to escape it with a v8::EscapableHandleScope. Should I call Escape() when I'm setting a v8::Local variable as a property of some other v8::Local? Please see the code below - void GetNewObject(v8::Isolate *isolate) { v8::HandleScope handle_scope(isolate); v8::Local obj = v8::Object::New(isolate); SetSomeValue(isolate, obj); } void SetSomeValue(v8::Isolate *isolate, v8::Local _out){ v8::EscapableHandleScope handle_scope(isolate); v8::Local value = v8::String::NewFromUtf8(isolate_, "some_value", v8::String::kNormalString); obj_out->Set(1, handle_scope.Escape(value)); // Is it necessary to escape "value"? } Thanks, --Gautham -- -- 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.