Re: [v8-users] Each bytecode is an object?

2018-11-15 Thread Jakob Kummerow
Everything on the heap is a heap object ;-) I guess the term "bytecode" is slightly overloaded. If you mean "the bytecode of a function", i.e. the entire bytecode representation of that function, then yes, that is indeed stored as an object on the heap (where/how else would it be stored?); and

Re: [v8-users] Building v8 with Makefile

2018-11-13 Thread Jakob Kummerow
You can put: is_clang = false use_sysroot = false into args.gn to make the V8 build use your system toolchain and libraries instead of the bundled ones. On Mon, Nov 12, 2018 at 9:18 PM madana gopal wrote: > Hi, > > Also, v8 is using its own toolchain for arm,mips etc, and we have > toolchain

Re: [v8-users] Building v8 with Makefile

2018-11-12 Thread Jakob Kummerow
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,

Re: [v8-users] Check failed: Handle not reset in first callback. How to Reset my Persistent

2018-10-09 Thread Jakob Kummerow
On Tue, Oct 9, 2018 at 11:45 AM Mike Moening wrote: > With recent versions of v8 the SetWeak method has changed and the > Persistent* parameter has been dropped from the destructor callback. > The destructor callback function is **supposed** to Reset() the persistent > or its a leak. > If you

Re: [v8-users] Re: v8 static library on windows gives linker errors

2018-10-08 Thread Jakob Kummerow
> > The v8_monolith.lib is unbelievably huge (nearly a gig) > That's probably mostly debug info. Try Release mode ("is_debug = false"). -- -- 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

Re: [v8-users] Re: v8 static library on windows gives linker errors

2018-10-08 Thread Jakob Kummerow
The set of required libraries should be: v8_base v8_snapshot v8_libbase v8_libplatform v8_libsampler Does that work? As a simpler alternative, the instructions recommend to use the "v8_monolith" target, which should

Re: [v8-users] Re: What is the purpose of isolated source group

2018-10-03 Thread Jakob Kummerow
The purpose of d8's --isolate flag is to make it possible to test that scripts in different isolates can indeed run without interference from each other. Such scripts cannot communicate with each other (as the name "isolate" implies). On Wed, Oct 3, 2018 at 6:44 PM Mingwei Zhang wrote: > I

Re: [v8-users] BigInt from String?

2018-09-15 Thread Jakob Kummerow
To create arbitrary BigInts via the C++ API, use BigInt::NewFromWords. An alternative, as you suggest, is to parse the string as source, because "BigInt strings with 'n' suffixes" are BigInt literals. Instead of "eval", the API functions to do that are Script::Compile and Script::Run. Look at

Re: [v8-users] Arraybuffer

2018-09-12 Thread Jakob Kummerow
On Wed, 12 Sep 2018 at 13:15, dan Med wrote: > But can someone help me understand the arraybuffer part ? How to call > arraybuffer::append and when I create an instance of a arraybuffer it will > create it with maximum size so 37... bytes and will only say that the bytes > used are the one which

Re: [v8-users] Arraybuffer

2018-09-10 Thread Jakob Kummerow
ibes some javascript function, i > don't understand where's the rest > Il giorno lun 10 set 2018 alle ore 20:45 Jakob Kummerow < > jkumme...@chromium.org> ha scritto: > >> On Sun, Sep 9, 2018 at 8:54 AM dan Med wrote: >> >>> Oh and one more thing,

Re: [v8-users] Arraybuffer

2018-09-10 Thread Jakob Kummerow
On Sun, Sep 9, 2018 at 8:54 AM dan Med wrote: > Oh and one more thing, i've surfed perhaps the entire source code of v8 at > least the interesting parts, but what i came across was just very short > code execpt for some builtins written in javascript i believe, can't find > all of the things

Re: [v8-users] Built

2018-08-13 Thread 'Jakob Kummerow' via v8-users
Yes. On Mon, Aug 13, 2018 at 11:15 AM dan Med wrote: > Yes, with v8 i want to be able to launch at it a .js file and debug v8 > By bulding the v8 source code i will have all the compilers inside right ? > like turbofan... > > 2018-08-13 11:13 GMT+02:00 'Jakob Kummerow' via

Re: [v8-users] Built

2018-08-13 Thread 'Jakob Kummerow' via v8-users
ed : >> >>> Like launch v8 under a debugger and pass as an argument a page that >>> contains javascript >>> >>> >>> 2018-08-13 10:25 GMT+02:00 dan Med : >>> >>>> something like lldb or gdb to see the memory... >>>>

Re: [v8-users] Built

2018-08-13 Thread 'Jakob Kummerow' via v8-users
8-13 10:25 GMT+02:00 dan Med : > >> something like lldb or gdb to see the memory... >> >> 2018-08-13 10:19 GMT+02:00 'Jakob Kummerow' via v8-users < >> v8-users@googlegroups.com>: >> >>> For debugging JavaScript, I would recommend Chrome DevTools. Not sure

Re: [v8-users] Built

2018-08-13 Thread 'Jakob Kummerow' via v8-users
For debugging JavaScript, I would recommend Chrome DevTools. Not sure why you think a self-compiled V8 would help with that. On Mon, Aug 13, 2018 at 12:13 AM dan Med wrote: > Yes but by compiling v8 I should be able to debug javascript pages > > On Sun, 12 Aug 2018 at 23:53, 'Jakob

Re: [v8-users] Built

2018-08-12 Thread 'Jakob Kummerow' via v8-users
The official build instructions are at https://github.com/v8/v8/wiki/Building-with-GN. They work. That said, V8 implements ECMAScript, and as such has no idea about HTML or the DOM-related parts of JavaScript. On Sun, Aug 12, 2018 at 7:10 AM wrote: > Hi i've been trying to build the javascript

Re: [v8-users] Is it possible to get the memory for one of v8::Object ?

2018-07-20 Thread Jakob Kummerow
I don't think there is a direct way to do this. There is v8::internal::HeapObject::Size(), but it only gives you a form of "shallow" size. Under the hood, most (JavaScript-level) objects are composed of several (heap) objects; e.g. for an Array, all the elements are stored in a separate backing

Re: [v8-users] where is the implementation of ObjectTemplate constructor?

2018-07-20 Thread Jakob Kummerow
ObjectTemplate has no constructor (because it lives on the managed heap, where C++ constructors don't make sense). Declaring a private constructor (without defining it anywhere) prevents the C++ compiler from automatically creating a default constructor. The only way to create an ObjectTemplate is

Re: [v8-users] Build d8 with simulator running on host arch?

2018-07-02 Thread Jakob Kummerow
Sure. If you build with tools/dev/gm.py arm.release on an x86 host, you'll get a simulator d8 binary. More generally, this is what having distinct target_arch and v8_target_arch parameters in args.gn is good for: the former controls what platform the binaries will run on, the latter controls what

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

2018-06-27 Thread Jakob Kummerow
See the documentation, which has examples for this: https://github.com/v8/v8/wiki/Embedder's-Guide If you insist on adding this in V8 rather than in your embedding application, it's more complicated (and, unless you have a strong reason, probably not a good idea...). Look at bootstrapper.cc and

Re: [v8-users] Questions when adding global object

2018-06-27 Thread Jakob Kummerow
ng consoleDelegate >> the only way to specify console functions? >> >> Again thank you so much! >> >> >> >> On Monday, June 25, 2018 at 10:27:58 PM UTC-7, Jakob Kummerow wrote: >>> >>> On Mon, Jun 25, 2018 at 8:30 PM zcw wrote: >>>

Re: [v8-users] Questions when adding global object

2018-06-25 Thread Jakob Kummerow
egate if you want console.log to do anything. > And could the ConsoleDelegate work for the release build? > Yes, of course. > On Monday, June 25, 2018 at 6:14:42 PM UTC-7, Jakob Kummerow wrote: > >> V8 now provides its own "console" object, with the usual methods &g

Re: [v8-users] Re: Where are let / const objects stored?

2018-06-21 Thread Jakob Kummerow
Variable allocation is complicated. In short, Function-local variables are allocated on the stack. When nested closures refer to them, they get allocated in a Context object. On Thu, Jun 21, 2018 at 12:15 AM Zac Hansen wrote: > I don't know the answer, but they are accessible via the debugging

Re: [v8-users] Re: Finding cycles in an object

2018-06-21 Thread Jakob Kummerow
The Local class defines an operator == that should do exactly what you need. On Thu, Jun 21, 2018 at 5:43 AM Gonzalo Diethelm wrote: > Sure, slot does have a value, I just didn't include it in the code. > Something like: > > Local slot = String::NewFromUtf8(isolate, "MyBeautifulSlot", >

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 Jakob Kummerow
tTimeofDay() *rather than *base::OS::TimeCurrentMillis. *Can >anyone explain this behaviour? > > Regards, > K Abhishek > > > > On Mon, Jun 18, 2018 at 7:07 PM Jakob Kummerow > wrote: > >> Sure, just use printf or std::cout << "print\n". I don't k

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 Jakob Kummerow
th that. > Is there a way to add logs in v8 source code, it will be lot faster to > debug. > In cc (compositor), i used *LOG(INFO)<<"print";* from *base/logging.h *(of > main chromium *src*) > > On Mon, Jun 18, 2018 at 5:12 PM Jakob Kummerow > wrote: >

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 Jakob Kummerow
gt; Sorry JaKob >> >> On Mon, May 21, 2018, 6:51 PM Abhishek Kanike >> wrote: >> >>> Cool.. I see it. Thanks a lot Jacob. >>> >>> On Mon, May 21, 2018, 5:40 PM Jakob Kummerow >>> wrote: >>> >>>> The time always has to b

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 Jakob Kummerow
The time always has to be retrieved from the kernel. V8's implementation is in base::OS::TimeCurrentMillis, implemented in src/base/platform/platform-{win32,posix}.cc. On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike wrote: > Hi, > I want to know how the date.now()

Re: [v8-users] Clarification on AllowJavascriptExecution

2018-05-14 Thread Jakob Kummerow
Yes. On Fri, May 11, 2018 at 8:47 PM madana gopal wrote: > Thanks, ok. let me go through and update. We have both Script.Run() calls > and vm.runScript() calls in our project. > > So, we have to make sure, we are not making any JS calls, when either > Run() or

Re: [v8-users] Isolate destruction "leaking" memory ?

2018-05-14 Thread Jakob Kummerow
Never mind; that shouldn't be needed, as isolate->Dispose() contains delete this. Funky! You said "it can be caught by valgrind". What does Valgrind report? On Mon, May 14, 2018 at 11:16 AM Jakob Kummerow <jkumme...@chromium.org> wrote: > One obvious observation is that y

Re: [v8-users] Isolate destruction "leaking" memory ?

2018-05-14 Thread Jakob Kummerow
One obvious observation is that you don't have a delete isolate; statement in the loop ;-) On Sat, May 12, 2018 at 8:42 AM YJ wrote: > Kinda related to this old thread >

Re: [v8-users] Clarification on AllowJavascriptExecution

2018-05-11 Thread Jakob Kummerow
It's not about the garbage collection operation being completed. Presumably you have a call to v8::Script::Run() somewhere? When that call returns, you can safely execute other scripts. On Fri, May 11, 2018 at 5:01 PM madana gopal wrote: > Thanks Jakob. > > Below is

Re: [v8-users] git cl upload fails on cpplint preexisting errors

2018-05-02 Thread Jakob Kummerow
"git cl lint" is known not to work for V8, becauses it doesn't go through tools/presubmit.py which defines a few skipped linting rules (explaining the reports you're seeing). "git cl presubmit" should work. "tools/presubmit.py" should work too. What does "which cpplint.py" return? It should find

Re: [v8-users] Parsing only select fields of a JSON in v8

2018-04-24 Thread Jakob Kummerow
There is no way to parse only part of a JSON string. On Tue, Apr 24, 2018 at 3:30 AM Gautham B A wrote: > Hi all, > > As per the JSON spec, there's some mention about JSON pointers which says > > JSON Pointer defines a string syntax for identifying a specific value

Re: [v8-users] Is running a v8 instance built as a static library supported in the same process that loaded a different v8 instance in a DLL?

2018-04-17 Thread Jakob Kummerow
> > > What Ben pointed out was virtual memory reservations, which is not the > same as restricted space sizes. > > Would you guys mind expanding on this? My thinking is that the v8 commits > as much memory as it is allowed for semi/old/code spaces (considering that > the app doesn't allocate more

Re: [v8-users] Is running a v8 instance built as a static library supported in the same process that loaded a different v8 instance in a DLL?

2018-04-17 Thread Jakob Kummerow
I'm on the V8 team, and I defer to Ben on this question :-) I've never tried embedding two different versions of V8 into the same process, and I don't think we'd consider that scenario supported, but it may well work. You can probably find out with a fairly small example (i.e. without sinking

Re: [v8-users] Is it possible to turn off the interpreter (i.e. Ignition ) when running the v8

2018-03-26 Thread Jakob Kummerow
> default? > > 2018-03-24 9:31 GMT+08:00 Jakob Kummerow <jkumme...@chromium.org>: > >> You cannot turn off the interpreter, nor build V8 without it. Without the >> interpreter, V8 would be unable to execute any JavaScript. >> >> V8 used to have a n

Re: [v8-users] Is it possible to turn off the interpreter (i.e. Ignition ) when running the v8

2018-03-23 Thread Jakob Kummerow
You cannot turn off the interpreter, nor build V8 without it. Without the interpreter, V8 would be unable to execute any JavaScript. V8 used to have a non-optimizing compiler and an optimizing compiler. Now it has an interpreter and a new optimizing compiler, replacing the former two. What hasn't

Re: [v8-users] standalone static library

2018-03-21 Thread Jakob Kummerow
I would hope that NetBeans provides a way to configure it such that V8 is compiled with V8's own build process, and your embedding project's code with whatever system you choose to use (which might be whatever NetBeans uses by default); but I don't know how to set that up, sorry. V8's build

Re: [v8-users] standalone static library

2018-03-20 Thread Jakob Kummerow
Have you read the official documentation? https://github.com/v8/v8/wiki/Getting-Started-with-Embedding Do those steps work for you? If not, what error(s) do they produce? On Tue, Mar 20, 2018 at 11:09 AM Eduardo Bolis wrote: > Hi, > > I successfully build V8 on

Re: [v8-users] CFG

2018-03-16 Thread Jakob Kummerow
V8's new optimizing compiler, Turbofan, is not a CFG-based compiler. --trace-turbo-scheduled is probably the closest equivalent it has to dumping a CFG. You can also look at the other --trace-turbo* flags to see if any of them suits your needs better. On Fri, Mar 16, 2018 at 5:27 AM Thierry Sans

Re: [v8-users] Are functions which defined using eval or new Function() optimized?

2018-03-04 Thread Jakob Kummerow
anism, you'll probably miss out on those, but if you have uncommon requirements, then it's of course perfectly fine to devise your own set of tradeoffs. > > On 3/2/18, Jakob Kummerow <jkumme...@chromium.org> wrote: > > Functions created with eval or new Function will get optimized (af

Re: [v8-users] Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Jakob Kummerow
Functions created with eval or new Function will get optimized (after a while, just like other functions -- nothing is optimized on first use). That said, modifying prototypes after the fact tends to have a performance impact, because V8 makes optimizations (all over the place) based on the

[v8-users] Intent to ship: BigInt, BigInt64Array, BigUint64Array

2018-03-02 Thread Jakob Kummerow
Note that this is a v8/JavaScript feature, so this post is just an FYI for blink-dev — no signoff from Blink API owners is required. *Contact emails* jkumme...@chromium.org, n...@chromium.org *Explainer* https://github.com/tc39/proposal-bigint/blob/master/README.md *Spec*

Re: [v8-users] Profiling: what is "LoadIC: A load IC from the snapshot"?

2018-03-01 Thread Jakob Kummerow
Depending on usage patterns, you might see a further speed boost if you split your objects into two parts, where one has the same shape for all objects and the other is type dependent, roughly: class Thing { constructor(type, specific, ...) { this.type = type; this.other_common_field =

Re: [v8-users] Profiling: what is "LoadIC: A load IC from the snapshot"?

2018-03-01 Thread Jakob Kummerow
The thing that handles property loads (like foo.bar;). Seeing it take 22% is rare. Is your app heavy on polymorphic property loads? On Thu, Mar 1, 2018 at 9:44 AM Andrew Wilcox wrote: > My prof output starts off with > > [JavaScript]: >ticks total nonlib name

Re: [v8-users] --print-code does not work

2018-02-23 Thread Jakob Kummerow
at 1:45 AM 'Mathias Bynens' via v8-users < v8-users@googlegroups.com> wrote: > Tracking issue for the removal of --print-code: > https://bugs.chromium.org/p/v8/issues/detail?id=7437 > > On Fri, Feb 9, 2018 at 11:22 PM, Jakob Kummerow <jkumme...@chromium.org> > wrote: >

Re: [v8-users] Tuning v8 settings for short-lived process

2018-02-15 Thread Jakob Kummerow
My intuition is that no flags will provide significant performance gains. The flags controlling the garbage collector are quite carefully tuned and probably best left alone. If most (of the possibly-avoidable) time is spent parsing and loading, then garbage collection probably doesn't have much

Re: [v8-users] Is there a way out from dictionary mode?

2018-02-14 Thread Jakob Kummerow
mode, but modifying them is slow regardless.) > On Thursday, February 15, 2018 at 12:01:55 AM UTC+2, Jakob Kummerow wrote: >> >> Probably not. There are exceptions, but I'm hesitating to be specific >> because these are internal implementation details that can and will change

Re: [v8-users] Is there a way out from dictionary mode?

2018-02-14 Thread Jakob Kummerow
Probably not. There are exceptions, but I'm hesitating to be specific because these are internal implementation details that can and will change over time. Also, "fast" is relative. Dictionary mode exists because it is faster for some operations. Shape-tracked objects are faster for other

Re: [v8-users] --print-code does not work

2018-02-09 Thread Jakob Kummerow
If --print-opt-code prints nothing, then probably your function isn't getting optimized. Try calling it more often. --print-code is "technically correct" in the sense that it prints all of the unoptimized machine code that V8 doesn't generate any more ;-) (We should remove the flag.) On Fri,

Re: [v8-users] Large build size

2018-02-07 Thread Jakob Kummerow
That does indeed seem very large. On Linux with a current checkout (and without v8_static_library=true), my out/x64.release/obj/v8_base directory with all the .o files is only 29MB. Unfortunately, I have no idea what might be causing the difference in your case. Do any *.o files stand out as very

Re: [v8-users] Can "threading" be implemented by mapping v8 heap to shared memory in linux?

2018-01-08 Thread Jakob Kummerow
No, you cannot simply share all memory to get multi-threading. For safely/correctly working with shared memory, you need locking/synchronization primitives as well as certain guarantees in the language's memory model. JavaScript is not designed for such purposes. On Mon, Jan 8, 2018 at 3:52 PM

Re: [v8-users] Re: Is v8-dev mailing list unavailable?

2017-12-23 Thread Jakob Kummerow
It's a known issue and will get fixed; however due to the holiday season it is taking some time. On Sat, Dec 23, 2017 at 8:28 PM wrote: > Why anyone fix this? >> > Why anyone won't fix this? > > 2017年12月24日日曜日 4時25分29秒 UTC+9 b...@b6n.ch: >> >> Now v8-dev group is showed as spam,

Re: [v8-users] Problem building V8 (v6.1.534) on armv5TEJ without VFP/Neon

2017-12-11 Thread Jakob Kummerow
V8 requires ARMv6 and VFPv2 as a minimum. On Mon, Dec 11, 2017 at 1:51 AM wrote: > Hello everyone, > > Currently i am trying to build V8 (v6.1.534) on ARM926EJ-S ( armv5TEJ > without VFP nor NEON) with the current config > "./tools/cross_build_gcc.sh >

Re: [v8-users] How to build a fixed version of V8 and its dependencies.

2017-11-27 Thread Jakob Kummerow
The depot_tools system makes this easy, actually: git checkout gclient sync ninja -C out/ d8 (If you go back far enough before ninja was supported, replace the last command with the equivalent make/GYP based build.) On Mon, Nov 27, 2017 at 9:23 AM Edd Barrett wrote: > Hi

Re: [v8-users] BSON to v8::Object performance issue

2017-11-14 Thread Jakob Kummerow
There are a bunch of optimizations going into object literal handling, so the two versions are not at all equivalent: the JS version is expected to be much faster. To make them more comparable, you could model the same control flow in JS, roughly: var input = { "_id": { "$oid":

Re: [v8-users] internal fields

2017-11-06 Thread Jakob Kummerow
> > 3. What difference does it make to v8 if the internal field is an aligned >> pointer or not? Is the ability to set/get aligned pointers a consistency >> check so assumptions can be made? Does the interface check the alignment? >> (Not critical for me, I don't think, but I'd like to

Re: [v8-users] Can I manually fulfill feedback vector to achieve aot compilation?

2017-10-26 Thread Jakob Kummerow
No, it is not possible to populate the feedback vector manually. A lot of its contents are pointers to dynamically generated objects on the heap. On Thu, Oct 26, 2017 at 3:05 PM Bogdan Orlov wrote: > Is it possible to compile js code with TurboFan without running it in >

Re: [v8-users] Can somebody explain the --predictable flag?

2017-09-24 Thread Jakob Kummerow
Essentially, --predictable turns off anything in V8 that is known to cause changes in behavior from one run to the next: multiple thread usage (it restricts V8 to using *just one thread*, no background threads at all), the random number generator in Math.random(), and anything else we could think

Re: [v8-users] Re: Is "extend" keyword a performance antipattern???

2017-09-24 Thread Jakob Kummerow
"extends" is not an anti-pattern. Of course monomorphic code is fastest. Polymorphic/megamorphic loads and stores have to do more work (specifically, dynamic dispatch), which is going to take a bit more time. Class hierarchies are one way how developers *can* create polymorphic code; what you

Re: [v8-users] How to log javascript calls

2017-09-19 Thread Jakob Kummerow
is the --trace flag supposed to be used? > is there a guide somewhere...? > > > Sorry for noob questions > > On Friday, September 1, 2017 at 11:08:49 AM UTC-5, Jakob Kummerow wrote: >> >> Have you found the existing --trace flag? Does it fit your needs? >> >> On F

Re: [v8-users] Re: View assembly code for built in functions

2017-09-18 Thread Jakob Kummerow
ArrayPush is implemented in C++, see src/builtins/builtins-array.cc. The code object you've disassembled is a small wrapper/trampoline stub, the first step in the C++ entry sequence. In general, there is no single way to inspect "built-in functions", because there are several ways to implement

Re: [v8-users] Re: Building v8 5.9 on Centos 6

2017-09-08 Thread Jakob Kummerow
GCC 4.8.4 definitely works, so 4.8.2 is probably fine too. On Fri, Sep 8, 2017 at 2:57 AM, Chris Hillery wrote: > Thanks for the reply, Jakob. As I mentioned, I do have gcc 4.8.2 already > running on Centos 6, which should be new enough to build v8 5.9, correct? > > -- > -- >

Re: [v8-users] How does V8 compiles and executes JavaScript events?

2017-09-05 Thread Jakob Kummerow
retrieved and called by the JSEntryStub. You've identified the place where the JSEntryStub is called. That stub will look up the function's stored code and call it. This "code" could be another stub that triggers compilation if needed. The reset of the code executes the generated code.

Re: [v8-users] Why element kind transition can't cause the cache to miss

2017-09-05 Thread Jakob Kummerow
What cache are you talking about? Different elements kinds do cause inline cache misses. On Tue, Sep 5, 2017 at 3:08 AM, cyril wrote: > Hi all, > > Why element kind transition can't cause the cache to miss? > > > -- > -- > v8-users mailing list >

Re: [v8-users] How to log javascript calls

2017-09-01 Thread Jakob Kummerow
Have you found the existing --trace flag? Does it fit your needs? On Fri, Sep 1, 2017 at 8:45 AM, Huginn wrote: > Hi, I would like to be able to make a patch that allows one to log all > javascript calls when loading a webpage. I was wondering what resources i > would need

Re: [v8-users] How does V8 compiles and executes JavaScript events?

2017-08-31 Thread Jakob Kummerow
ecute the Javascript code. Am I correct? > > If this is how things going to work, could you please point out where in > this process, V8 compiles the code, or "read" the compiled code correspond > to the JavaScript? > > Thank you! > > On Wednesday, August 30, 2017 at 8:39:

Re: [v8-users] v8 6.0.286.52 test-unboxed-doubles.cc is failing.

2017-08-04 Thread Jakob Kummerow
All tests are important. And all the test-unboxed-doubles tests pass with a regular build (Release or Debug) of the unmodified sources at that revision. I would suggest that you try to narrow down which difference between your build and the official build causes these tests to fail. (Is it gcc

Re: [v8-users] Error graph-builder-tester.h:172:56: error: no matching function for call to 'v8::internal::compiler::SimplifiedOperatorBuilder::ChangeFloat64ToTagged()' when trying to build V8 with GC

2017-08-02 Thread Jakob Kummerow
On Wed, Aug 2, 2017 at 1:04 PM, Georgi Sotirov wrote: > Yes, sure. We have gcc-4.8 bots on our waterfall and they're happy. Feel >> free to submit a patch for >> gcc-7.1 support :-) >> > > GCC 4.8 is at least 4 years old and as I

Re: [v8-users] Error graph-builder-tester.h:172:56: error: no matching function for call to 'v8::internal::compiler::SimplifiedOperatorBuilder::ChangeFloat64ToTagged()' when trying to build V8 with GC

2017-08-01 Thread Jakob Kummerow
Feel free to delete the offending function (in test/cctest/compiler/graph-builder-tester.h:171-173), it doesn't seem to be used (which is presumably why clang doesn't complain here). Also, next time, please indicate the version of V8 that you're compiling. On Tue, Aug 1, 2017 at 8:40 AM, Georgi

Re: [v8-users] Build V8 on linux with GCC and system headers

2017-07-31 Thread Jakob Kummerow
On Mon, Jul 31, 2017 at 11:24 AM, Georgi Sotirov wrote: > Arg... Any way to disable turning of warnings to errors? >> > > Found it myself :-) > > make ia32.release GYPFLAGS='-Dclang=0 -Dwerror=' > > ...or simply: make ia32.release werror=no are these flags described

Re: [v8-users] Build V8 on linux with GCC and system headers

2017-07-31 Thread Jakob Kummerow
To use the system compiler, try: $ make ia32.release GYPFLAGS=-Dclang=0 I don't know whether it will also use system headers though. (Also note that the make/GYP-based build is deprecated. The new hotness is "gn"; see the wiki for instructions.

Re: [v8-users] Re: Can you Set the CurrentIsolate

2017-07-28 Thread Jakob Kummerow
On Fri, Jul 28, 2017 at 12:36 PM, Ian Bull wrote: > The problem with Enter() is that if you're already Entered, now you're in > there twice. So if it's a patchwork solution that checks if the MyIsolate > != Isolate::GetCurrent, and then calls MyIsolate->Enter(), I could started

Re: [v8-users] Is it safe to consume v8::Private methods?

2017-07-14 Thread Jakob Kummerow
Gautham, I think you might be misunderstanding how the Maybe<> API is supposed to be used. When used correctly, it is absolutely safe and will never crash. - Maybe::FromJust() / MaybeLocal::ToLocalChecked() are intended for when you know for sure that the Maybe / MaybeLocal is not empty. Usually,

Re: [v8-users] question on the sample file process.cc

2017-07-02 Thread Jakob Kummerow
tput[request.host] = 1; > > The script runs, but the final output is: > google.com: > google.net: > google.org: > yahoo.com: > > Instead, the correct result should be: > google.com: 1 > google.net: 1 > google.org: 1 > yahoo.com: 3 > > On Friday, Jun

Re: [v8-users] question on the sample file process.cc

2017-06-30 Thread Jakob Kummerow
> > however, it's a map<string, string> in c++ side, which part of the c++ > code handles such conversion? > > > On Thursday, June 29, 2017 at 5:07:20 PM UTC-4, Jakob Kummerow wrote: > >> The equivalent of options.verbose is options["verbose"] (note the >

[v8-users] Announcement: V8's x87 port is going away

2017-06-30 Thread Jakob Kummerow
Ever since V8's "ia32" port (for 32-bit x86 platforms) has started requiring SSE2 instruction support in 2014, there has been an "x87" port to allow V8 to continue to run on x86 hardware that does not support SSE2 instructions. Due to a lack of stakeholders in the "x87" port, and the ongoing

Re: [v8-users] question on the sample file process.cc

2017-06-29 Thread Jakob Kummerow
The equivalent of options.verbose is options["verbose"] (note the quotes). Does that help? On Thu, Jun 29, 2017 at 10:07 PM, wxz wrote: > hi all, > > there are two maps used in this example, one for 'options', one for > 'output'. My question is, why is that in the script,

Re: [v8-users] Re: How to build V8 on Raspberry Pi (3 model B) ?

2017-06-02 Thread Jakob Kummerow
On Fri, Jun 2, 2017 at 5:37 PM, aleReimondo wrote: > Issue reported at https://bugs.chromium.org/p/v8/issues/detail?id=6458 > Don't hold your breath, but feel free to help ;-) -- -- v8-users mailing list v8-users@googlegroups.com

Re: [v8-users] Re: How to build V8 on Raspberry Pi (3 model B) ?

2017-06-02 Thread Jakob Kummerow
On Fri, Jun 2, 2017 at 5:10 PM, aleReimondo wrote: > Confirmed the malfunction of the build toolset on the Raspberry Pi. > It has been reproduced started from clean SDCard (Raspbian OS) and > following wiki procedures to build V8 without observing any other issues >

Re: [v8-users] How to dump jit code and its corresponding bytecode.

2017-06-02 Thread Jakob Kummerow
Look at the existing flags FLAG_print_opt_code and FLAG_print_bytecode, their implementations should help you figure out how to do this. On Fri, Jun 2, 2017 at 8:07 AM, Yuan Pinghai wrote: > I want to dump each piece of dynamically generated code. Meanwhile, if its >

Re: [v8-users] How to build V8 on Raspberry Pi (3 model B) ?

2017-06-01 Thread Jakob Kummerow
It's not exactly a bug. v8gen.py, by design, replicates the configuration of the respective buildbot, and that buildbot uses arm simulator builds. It's really easy to change the build configuration locally though: just run gn args out.gn/arm.release, and in the editor that opens, set target_cpu =

Re: [v8-users] How to pass the second parameter of ObjectTemplate::New in Google V8?

2017-05-12 Thread Jakob Kummerow
Same question: http://stackoverflow.com/questions/43909594/ On Fri, May 12, 2017 at 7:40 PM, Ben Noordhuis wrote: > On Thu, May 11, 2017 at 11:02 AM, XadillaX Scarlet > wrote: > > I know creating an ObjectTemplate and we can do several things to it.

Re: [v8-users] Cryptic out-of-memory error

2017-05-11 Thread Jakob Kummerow
>> destruction of such threads, as well as constantly sending requests to the >> same thread. It was in this context that I found this problem. >> >> On Monday, May 8, 2017 at 12:50:37 PM UTC-3, Andre Cunha wrote: >>> >>> @Michael Lippautz, I'll try adding a br

Re: [v8-users] Cryptic out-of-memory error

2017-05-08 Thread Jakob Kummerow
My guess would be an address space leak (should show up in the "VIRT" column of "top" on Linux). Are you calling "isolate->Dispose()" on any isolate you're done with? On Mon, May 8, 2017 at 4:01 PM, Michael Lippautz wrote: > V8 usually fails there if it cannot allocate a

Re: [v8-users] Why does a combination of optimization flags(--always-opt --turbo) and code caching show bad performance?

2017-04-21 Thread Jakob Kummerow
As Jochen already said on chromium-dev, --always-opt does not make things faster. This is expected. The purpose of the flag is to flush out certain kinds of bugs when running tests, at the cost of a big slowdown. Code caching has limits. It cannot cache everything. The default configuration is

Re: [v8-users] V8 uses huge amounts of memory for "dictionary" objects with ~50 properties

2017-04-13 Thread Jakob Kummerow
We are aware that dictionary-mode objects are not particularly memory efficient right now, and are working on improving that. With the current implementation, every used entry in a property dictionary requires 3 words (=8 bytes each on 64-bit), one word each for the property's name, value, and

Re: [v8-users] Re: Why for loop will become faster if divided in two loop?

2017-04-12 Thread Jakob Kummerow
I cannot reproduce a difference here; both versions appear to have the same speed. (Of course there's some noise in the data, as always; so if you do just a single run of each version, then either one could get lucky or unlucky.) On Wed, Apr 12, 2017 at 12:02 PM, Rong Jie

Re: [v8-users] v8 version: 4.6.2, appear "segment fault" when call the api "LowMemoryNotification"

2017-04-10 Thread Jakob Kummerow
Version 4.6.2 is just a daily snapshot that has never been officially supported, and by now is severely outdated. Nobody knows or cares whether it has bugs. You should use the tip of a supported branch, e.g. right now branch-heads/5.7, see e.g. https://gist.github.com/domenic/aca7774a5d94156bfcc1

Re: [v8-users] How to debug the v8 src code by exec `tools/run-tests.py --outdir out.gn/x64.debug`

2017-04-10 Thread Jakob Kummerow
There's no existing support for this. Pausing on breakpoints requires running in a debugger, which run-tests.py doesn't implement. As a workaround, you could put an UNREACHABLE() into the source where you'd want to break and then run the test suite. run-tests.py will then print the command line

Re: [v8-users] Re: Have the no snapshot startup times gotten significantly longer in the last 6-12 months? 3s => 20s+

2017-04-04 Thread Jakob Kummerow
Yes, just to confirm: Starting without snapshot, especially in Debug mode, has become much slower, because more work is being done there (mostly compilation of builtins and bytecode handlers). This is working as intended. I.e. it's not considered a bug/problem, will not be improved over time, in

Re: [v8-users] Is V8::JSON::Parse really needed against JSON inputs?

2017-03-16 Thread Jakob Kummerow
hek@gmail.com > wrote: > Hi, > > (responses inline) > > On 16-Mar-2017, at 21:53, Jakob Kummerow <jkumme...@chromium.org> wrote: > > What do you mean by "native JS JSON"? > > > Apologies, it isn’t technically correct term. I meant javascript ob

[v8-users] PSA: FunctionEntryHook Isolate parameter will require a no-snapshot build

2017-03-07 Thread Jakob Kummerow
The v8::Isolate::CreateParams struct that you can pass to a v8::Isolate has an entry_hook field which can be used to specify a FunctionEntryHook callback, which is a C++ function that will be called at various points during program execution (mostly whenever a new function is entered). When

Re: [v8-users] Cross-compile for arm64 (iOS)

2017-03-04 Thread Jakob Kummerow
See cross-compiling instructions at https://github.com/v8/v8/wiki/Cross-compiling%20for%20ARM iOS is not supported because Apple doesn't allow non-system apps to JIT-compile code, and V8 relies on JIT compilation. On Sat, Mar 4, 2017 at 5:39 PM, Lukas Kollmer wrote: >

Re: [v8-users] Re: Isolate Creation Times

2017-02-24 Thread Jakob Kummerow
I've commented on the bug. TL;DR: compile with snapshot, and in Release mode. On Fri, Feb 24, 2017 at 3:06 PM, Brendan Bates wrote: > Posted here: https://bugs.chromium.org/p/v8/issues/detail?id=6014. > > Let me know if there are any other tests or information I can

Re: [v8-users] performance.now resolution

2017-02-03 Thread Jakob Kummerow
Some sort of rounding error, yes. The internal representation (before converting the value to float) is microseconds. Actual precision depends on the operating system, as the comment in time.h says: // Returns a platform-dependent high-resolution tick count. Implementation > // is hardware

Re: [v8-users] Streams and InternalPackedArray queue scalability

2017-01-18 Thread Jakob Kummerow
Interesting case :-) The implementation of InternalPackedArray is essentially the same as plain JavaScript "Array", the biggest difference is that InternalPackedArray is not exposed to websites and therefore not monkey-patchable. Array.shift() is inherently slow, because it requires all remaining

Re: [v8-users] What is difference between v8::Object::Has() and v8::Object::HasOwnProperty()?

2016-12-07 Thread Jakob Kummerow
See https://tc39.github.io/ecma262/#sec-hasproperty vs. https://tc39.github.io/ecma262/#sec-hasownproperty. On Wed, Dec 7, 2016 at 2:48 PM, kent williams wrote: > If this is documented anywhere, I haven't found it. > > What is difference between v8::Object::Has() and >

Re: [v8-users] Setting an execution limit

2016-11-21 Thread Jakob Kummerow
There is always a stack limit, which always prevents infinite recursion; as well as, in fact, finite but very deep recursion. As Ben said, the only way to prevent infinite or long-running loops is by interrupting the program from another thread. You may have heard of the *Halting Problem*, TL;DR:

<    1   2   3   4   5   6   >