Re: [v8-users] Getting started tutorial problems

2015-08-03 Thread Jakob Kummerow
It appears that the file is now called libv8_external_snapshot.a. The Getting-Started doc needs updating. On Mon, Aug 3, 2015 at 9:53 AM, Michael Hablich habl...@chromium.org wrote: Which V8 version are you trying to build? 4.3? On Monday, August 3, 2015 at 1:34:52 AM UTC+2, Jerrad Patch

Re: [v8-users] v8 crashing during garbage collector with a NULL-Pointer exception

2015-07-29 Thread Jakob Kummerow
, it has known security/stability bugs which will never be patched. (You seem to think that 3.x is somehow better than 4.x. It's not. Not more stable either. Just more outdated.) On Wednesday, July 29, 2015 at 3:54:26 PM UTC+2, Jakob Kummerow wrote: On Wed, Jul 29, 2015 at 2:50 PM, Wilfried Gösgens

Re: [v8-users] v8 crashing during garbage collector with a NULL-Pointer exception

2015-07-29 Thread Jakob Kummerow
3.31.74.1 was a failed attempt at creating a sufficiently stable basis for a branch point, and is totally unsupported. Pretty bad idea to use that in production. I'm not surprised it's crashing. On Wed, Jul 29, 2015 at 1:33 PM, Wilfried Gösgens dotheb...@gmail.com wrote: Hi everone, We're

Re: [v8-users] v8 crashing during garbage collector with a NULL-Pointer exception

2015-07-29 Thread Jakob Kummerow
branches or anything like that. On Wednesday, July 29, 2015 at 2:24:31 PM UTC+2, Jakob Kummerow wrote: 3.31.74.1 was a failed attempt at creating a sufficiently stable basis for a branch point, and is totally unsupported. Pretty bad idea to use that in production. I'm not surprised it's crashing

Re: [v8-users] Problems building on ubuntu x86

2015-06-24 Thread Jakob Kummerow
/Makefile.ia32.release'. Stop. On Friday, March 13, 2015 at 5:41:00 PM UTC+8, Jakob Kummerow wrote: make ia32.release GYPFLAGS=-Dclang=0 should be enough to fall back to the system toolchain. (Maybe we should expose that as a Makefile option... but then it's rarely needed.) On Fri, Mar 13

Re: [v8-users] Problems building on ubuntu x86

2015-06-24 Thread Jakob Kummerow
:~/webrtc-checkout/src/chromium/src/v8$ make ia32.release GYPFLAGS=-Dclang=0 make: *** No rule to make target `third_party/icu/icu.gypi', needed by `out/Makefile.ia32.release'. Stop. On Friday, March 13, 2015 at 5:41:00 PM UTC+8, Jakob Kummerow wrote: make ia32.release GYPFLAGS=-Dclang=0

Re: [v8-users] What to do if String.prototype.length can't be represented in 32Bit?

2015-06-14 Thread Jakob Kummerow
The string builder has nothing to do with this; V8 defines a maximum string length of about 268 million characters (in class String in objects.h): // Maximal string length. static const int kMaxLength = (1 28) - 16; This is not a bug and unrelated to numbers being 64-bit doubles; it's just

Re: [v8-users] HTML and CSS support

2015-06-14 Thread Jakob Kummerow
Nope, V8 does not know anything about HTML or CSS. You're going to have to use Chrome. (Strictly speaking Blink would be enough, but Blink is not designed to be embedded directly, which means doing so would be painful.) On Sun, Jun 14, 2015 at 5:54 AM, Jack willia...@gmail.com wrote: Dear all,

Re: [v8-users] Help building v8 from source without network communication

2015-05-29 Thread Jakob Kummerow
To clarify: - building V8 never requires internet access - getting the V8 source and build dependencies always requires internet access (how else would you download anything?) - GYP is not part of depot_tools - GYP is always required for building V8 - GYP does not require internet access - there's

Re: [v8-users] Re: How to correctly use libplatform.h?

2015-05-20 Thread Jakob Kummerow
If you get V8 as https://developers.google.com/v8/build describes, and embed it like in the example at https://developers.google.com/v8/get_started, then everything should just work. Of course you're free to choose a different local directory structure, but then it's up to you to fiddle with

Re: [v8-users] clang++ error

2015-05-12 Thread Jakob Kummerow
Which instructions have you been following? Probably not these: https://code.google.com/p/v8-wiki/wiki/UsingGit, because those would have told you to run fetch v8, which would have downloaded clang. You don't need to install clang manually. On Mon, May 11, 2015 at 11:58 PM, Jason Josephy

Re: [v8-users] Instrumentation of Javascript function

2015-05-12 Thread Jakob Kummerow
I don't really understand what you're trying to do (what is the JavaScript API? How do you want to instrument it?), but the short answer is probably no. On Tue, May 12, 2015 at 5:05 AM, Jack willia...@gmail.com wrote: Hello, May I know is there a way to instrument the javascript API (like

Re: [v8-users] Have to force gcc/g++ on Ubuntu 14.04.2 32-bit?

2015-05-05 Thread Jakob Kummerow
Coulda searched, woulda found https://groups.google.com/d/topic/v8-users/KfS2XDdZQkc/discussion and https://groups.google.com/d/topic/v8-users/5NVXi1DGn6M/discussion. On Tue, May 5, 2015 at 1:06 AM, Louis Santillan lpsan...@gmail.com wrote: I've noticed something odd in compiling today's HEAD

Re: [v8-users] How to increase the number of data slots in an Isolate?

2015-04-28 Thread Jakob Kummerow
No. On Tue, Apr 28, 2015 at 1:14 PM, Danny Dorfman wilderness...@gmail.com wrote: Hello, Is there a way to increase the number of data slots on any given Isolate? Currently the function v8::Isolate::GetNumberOfDataSlots() returns *4*. D. -- -- v8-users mailing list

Re: [v8-users] Missing landmines.py?

2015-04-25 Thread Jakob Kummerow
The landmines step is fine; downloading clang-format failed. It works for me, so... try again? (You shouldn't even need to restart from scratch, just cd v8; gclient sync should be enough.) On Sat, Apr 25, 2015 at 1:17 AM, Louis Santillan lpsan...@gmail.com wrote: I was updating my embedding

Re: [v8-users] what's the difference between IdleNotification and LowMemoryNotification?

2015-04-23 Thread Jakob Kummerow
On Thu, Apr 23, 2015 at 4:14 AM, kunjie Chen kjchen1...@gmail.com wrote: I'm using the v8 in a multi-thread env, runing normal scripts in one thread and doing the garbage collection in another. Knowing how the garbage collector works, there's no way this can work. -- -- v8-users mailing

Re: [v8-users] Assignment gets optimized away

2015-04-19 Thread Jakob Kummerow
This is crbug.com/466993, fixed in V8 4.4+. (And no, nothing is optimized away, it's just a bug.) On Sun, Apr 19, 2015 at 3:54 AM, Alexander Praetorius alexander.praetor...@serapath.de wrote: /** Sloppy

Re: [v8-users] Trouble building V8 on Windows 7 ....

2015-04-13 Thread Jakob Kummerow
/obj files. Just wondering if anyone else is having this prob. V8 doesn't offer executable/obj files for download, only source. On Friday, April 10, 2015 at 12:51:47 PM UTC-4, Jakob Kummerow wrote: Those are the right instructions, and AFAICS they're up to date. Can you be more specific

Re: [v8-users] A simple question on HEscapeAnalysisPhase in V8

2015-04-07 Thread Jakob Kummerow
On Tue, Apr 7, 2015 at 6:47 AM, maxs.u...@gmail.com wrote: I add a *HIR dump function* like this: You might like to know that there already is a --trace-hydrogen flag. It produces a hydrogen.cfg file that you can load into c1visualizer. 1, V8 calls the HEscapeAnalysisPhase::Run() for 4

Re: [v8-users] V8 build problem -- Unterminated quoted string ?

2015-03-30 Thread Jakob Kummerow
The bundled clang is a 64-bit binary. On a 32-bit system, try: $ make native GYPFLAGS=-Dclang=0 On Sun, Mar 29, 2015 at 7:56 PM, 'Isaac Gouy' via v8-users v8-users@googlegroups.com wrote: Linux x86 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:18 UTC 2015 i686 i686 i686 GNU/Linux

Re: [v8-users] Execution slowdown issue

2015-03-24 Thread Jakob Kummerow
The profile for the slow transaction doesn't really say anything other than that the C++ compiler didn't do any inlining (probably due to oprofile, or was this a Debug build, or both?). On Tue, Mar 24, 2015 at 9:50 AM, Toon Verwaest verwa...@chromium.org wrote: If your transactional scripts

Re: [v8-users] Re: Simple development queries

2015-03-18 Thread Jakob Kummerow
On Wed, Mar 18, 2015 at 10:44 AM, Deepak Subramanian subudee...@gmail.com wrote: Thanks a lot. These have been most helpful. I would like to know how to disable crankshaft. (I do not want optimizations at this phase and feel full-codegen is sufficient for my needs at the moment) I just

Re: [v8-users] Tracing js Functions and Arguments in v8

2015-03-06 Thread Jakob Kummerow
PM UTC-5, Jakob Kummerow wrote: Try --trace. On Wed, Mar 4, 2015 at 8:12 PM, Malek Musleh malek@gmail.com wrote: Hi, I want to be able trace / record a programs call to its functions (name + argument values) either as a separate analysis pass or in addition to an existing one (which

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-06 Thread Jakob Kummerow
As I said, there's no way to avoid crashing on OOM. On Fri, Mar 6, 2015 at 10:47 AM, madana gopal madanagopal...@gmail.com wrote: Fine. Please clarify do we have any function/exception that can be thrown, thereby we can come out of V8 Invoke() method and handle accordingly/notifying the user.

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-06 Thread Jakob Kummerow
The issue with OOM is that you can't guarantee that you can get the process into a safe/sane state again. That's why it has to be killed (and why I'd strongly recommend against hacking up your own solution that tries to avoid the killing -- it's just not secure in the general case). For your

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-06 Thread Jakob Kummerow
The only safe thing for any application to do on OOM is to crash, so that's what V8 does. This is by design. There's no way around it. On Fri, Mar 6, 2015 at 8:30 AM, madana gopal madanagopal...@gmail.com wrote: Hi, Also, when we throw the exception as below by creating new exception object

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-05 Thread Jakob Kummerow
On Thu, Mar 5, 2015 at 7:44 AM, madana gopal madanagopal...@gmail.com wrote: Hi, This is the doubt, i have regarding configuring V8 for low memory device. 1, When we run web pages with heavy data in javascript, old data space is getting occupied so quickly, since the young generation to

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-05 Thread Jakob Kummerow
On Thu, Mar 5, 2015 at 11:20 AM, Ben Noordhuis i...@bnoordhuis.nl wrote: If I were the OP, I'd experiment with -O2 and -Os and fastidiously benchmark with perf. -O2/-Os might make sense, but I don't think -O0 will. -- -- v8-users mailing list v8-users@googlegroups.com

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-05 Thread Jakob Kummerow
Unrelated. The idea of the snapshot is to perform most of the initialization (of the heap, builtins, ...) that has to happen on every startup at build time, and package the result as part of the binary, to significantly increase startup speed. It shouldn't affect memory consumption. On Thu, Mar

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-05 Thread Jakob Kummerow
On Thu, Mar 5, 2015 at 11:11 AM, madana gopal madanagopal...@gmail.com wrote: Hi, Thanks much for the explanation. 1, We are seeing more time is being taken during the execution of charCodeAt() function (in Encoding the URI) flatten call and more new raw byte strings are being allocated.

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-05 Thread Jakob Kummerow
Thanks for the trace. It does look like the GC is working extra hard (very fast marking speed, old-space GC every ~250ms) because it realizes that it's close to the memory limit; unfortunately it doesn't find many dead objects (see the Mark-sweep line: memory usage only went from 129.9 to 129.5

Re: [v8-users] Request for clarification of options for running v8 in low memory device

2015-03-05 Thread Jakob Kummerow
Well, that obviously depends on how much memory the device has, and on the limits you've set. Whatever limit is hit first (physical or configured) determines when execution is terminated. On Thu, Mar 5, 2015 at 2:22 PM, madana gopal madanagopal...@gmail.com wrote: Thanks for the information.

Re: [v8-users] Tracing js Functions and Arguments in v8

2015-03-04 Thread Jakob Kummerow
Try --trace. On Wed, Mar 4, 2015 at 8:12 PM, Malek Musleh malek.mus...@gmail.com wrote: Hi, I want to be able trace / record a programs call to its functions (name + argument values) either as a separate analysis pass or in addition to an existing one (which ever is easier). I see that

Re: [v8-users] reverting to an old changeset

2015-03-03 Thread Jakob Kummerow
On Tue, Mar 3, 2015 at 6:38 PM, Malek Musleh malek.mus...@gmail.com wrote: Hi, I am trying to revert to an old changeset of v8 in order to get it compiled using gcc-4.4 on ubuntu natty. I had this working a couple of months ago I'm actually surprised that compiling V8 with gcc-4.4 still

Re: [v8-users] Re: Simple development queries

2015-02-27 Thread Jakob Kummerow
On Fri, Feb 27, 2015 at 6:56 PM, Deepak Subramanian subudee...@gmail.com wrote: I am relatively new to v8. Please note, I would like this to run in un-modified d8 while modifying v8 only. Thanks. On Friday, February 27, 2015 at 6:52:18 PM UTC+1, Deepak Subramanian wrote: Query 1: The

Re: [v8-users] Add recognition of unused Arm opcode to prevent runtime error

2015-02-27 Thread Jakob Kummerow
On Fri, Feb 27, 2015 at 11:19 PM, Malek Musleh malek.mus...@gmail.com wrote: ok, that works for seeing the native dissambly. 1) But how do I enable use of the arm simulator? I see simulator related options (.e.g --trace_sim) but that doesn't seem to do anything in terms of simulating the

Re: [v8-users] Configuring Size / Capacity of InlineCache

2015-02-14 Thread Jakob Kummerow
On Fri, Feb 13, 2015 at 12:03 AM, Malek Musleh malek.mus...@gmail.com wrote: Hi, Is it possible to vary the size/ #of entries of the inline cache? I see that its possible to enable/disable use of the IC, but I don't see an option to adjust its size. There's no such thing as *the* inline

Re: [v8-users] Share an immutable object/function in a multi-threaded environment? (embedded v8)

2015-02-11 Thread Jakob Kummerow
the server code from scratch, but wanting to extend a C++ service with ability to change some flexible logic without pushing compiled code... On Wednesday, February 11, 2015 at 1:38:20 AM UTC-8, Jakob Kummerow wrote: Nope, sharing things across threads is not possible. Also

Re: [v8-users] Share an immutable object/function in a multi-threaded environment? (embedded v8)

2015-02-11 Thread Jakob Kummerow
Nope, sharing things across threads is not possible. Also, there is a certain cost associated with each unique thread that uses a given V8 instance. So for scenarios like yours, it's advisable to have a pool of long-running worker threads (instead of spawning and discarding a new thread for every

Re: [v8-users] Tracing Inline Cache Misses using V8 standalone

2015-02-11 Thread Jakob Kummerow
(counters-store_normal_hit(), 1, r4, r5); __ Ret(); __ bind(miss); __ IncrementCounter(counters-store_normal_miss(), 1, r4, r5); GenerateMiss(masm); } On Tue, Feb 10, 2015 at 5:27 PM, Jakob Kummerow jkumme...@chromium.org wrote: There is no tracing for IC hits. With a few

Re: [v8-users] Tracing Inline Cache Misses using V8 standalone

2015-02-10 Thread Jakob Kummerow
--trace-ic is the only IC tracing flag that I'm aware of. I've never had the impression that it lacks coverage. Is there a specific kind of IC miss events that you think it's not covering? On Tue, Feb 10, 2015 at 12:55 AM, Malek Musleh malek.mus...@gmail.com wrote: Hi, I was wondering if

Re: [v8-users] List of V8 GYPFLAGS

2015-02-10 Thread Jakob Kummerow
What Ben said. Most flags are defined in build/toolchain.gypi and build/features.gypi. In the case at hand: On Tue, Feb 10, 2015 at 5:51 PM, Arturo Rinaldi arty.n...@gmail.com wrote: GYPFLAGS=-Dv8_use_mips_abi_hardfloat=false -Dv8_can_use_*fpiu* _instructions=false If fpiu is not just a

Re: [v8-users] d8 dump-counters not working

2015-02-10 Thread Jakob Kummerow
Works for me. What V8 version are you using? On Tue, Feb 10, 2015 at 11:16 PM, Malek Musleh malek.mus...@gmail.com wrote: Hi, I am trying to run d8 with the --dump-counter flag, but am not seeing any output statistics. musleh@sherpa12:~/V8/v8/benchmarks$ /home/musleh/V8/v8/out/native/d8

Re: [v8-users] Tracing Inline Cache Misses using V8 standalone

2015-02-10 Thread Jakob Kummerow
, February 10, 2015 at 4:12:06 AM UTC-5, Jakob Kummerow wrote: --trace-ic is the only IC tracing flag that I'm aware of. I've never had the impression that it lacks coverage. Is there a specific kind of IC miss events that you think it's not covering? On Tue, Feb 10, 2015 at 12:55 AM, Malek Musleh

Re: [v8-users] d8 dump-counters not working

2015-02-10 Thread Jakob Kummerow
/V8/v8/out/native/d8 V8 version 3.31.0 (candidate) [console: dumb] d8 Malek On Tue, Feb 10, 2015 at 5:29 PM, Jakob Kummerow jkumme...@chromium.org wrote: Works for me. What V8 version are you using? On Tue, Feb 10, 2015 at 11:16 PM, Malek Musleh malek.mus...@gmail.com wrote: Hi

Re: [v8-users] V8 installation error

2015-02-09 Thread Jakob Kummerow
/jaison/jpj/v8/out/ia32.release/mksnapshot] Error 1 make[1]: Leaving directory `/home/jaison/jpj/v8/out' make: *** [ia32.release] Error 2 This is not enough information. What's the error output before? On Sat, Feb 7, 2015 at 6:02 PM, Jakob Kummerow jkumme...@chromium.org wrote: Why don't

Re: [v8-users] V4.2, or V3.30?

2015-02-09 Thread Jakob Kummerow
Right, Ben summed it up nicely. Our stability expectations are the same for every branch (once it starts shipping on Chrome stable, which is roughly 6 weeks after it's been created), and every branch's support period is also the same (another ~6 weeks until the next Chrome version goes on the

Re: [v8-users] Running javascript using v8

2015-02-09 Thread Jakob Kummerow
https://developers.google.com/v8/get_started On Mon, Feb 9, 2015 at 12:31 PM, jaison pj jaison...@gmail.com wrote: How to embed a javascript code into a cpp program to be run with v8 ?? -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users ---

Re: [v8-users] V8 installation error

2015-02-07 Thread Jakob Kummerow
Why don't you follow the official instructions? Get the code: https://code.google.com/p/v8-wiki/wiki/UsingGit Compile hello world: https://developers.google.com/v8/get_started On Sat, Feb 7, 2015 at 6:58 AM, jaison pj jaison...@gmail.com wrote: I have followed the following steps to install v8

Re: [v8-users] Can V8 save the result of compiling JS functions/files to a file?

2015-01-27 Thread Jakob Kummerow
It's complicated. V8 has a so-called snapshotting mechanism which is used to speed up startup. Recently people have been working on using it to cache other code as well. That said, this is no silver bullet, as there are a number of inherent challenges: - dynamic languages like JavaScript are not

Re: [v8-users] Is it possible to have two functions share a context?

2015-01-22 Thread Jakob Kummerow
Fortunately, that's not possible. That would be even crazier than JavaScript's actual scoping rules. On Thu, Jan 22, 2015 at 4:03 AM, Francisco Tolmasky tolma...@gmail.com wrote: I'm doing some code transformations that require splitting a function in two. I was thus wondering if it could be

Re: [v8-users] How to handle out-of-memory type of errors.

2015-01-18 Thread Jakob Kummerow
On Sun, Jan 18, 2015 at 5:59 AM, Jane Chen jxche...@gmail.com wrote: Just to close the loop, I found out that for each isolate that's created, isolate-Enter(); v8::V8::IgnoreOutOfMemoryException(); isolate-Exit(); avoids the crash for the test case I have above. Not sure if it's safe to

Re: [v8-users] depot_tools is broken.

2015-01-07 Thread Jakob Kummerow
If I had to guess, I'd say your Python version isn't what depot_tools expects. On Wed, Dec 24, 2014 at 6:21 AM, Steve M sixtyfourbe...@gmail.com wrote: I cant run gclient sync it keeps throwing the following error: File /usr/src/v8/depot_tools/gclient_utils.py, line 531, in

Re: [v8-users] Most efficient way to work with arrays.

2014-12-17 Thread Jakob Kummerow
The internal heuristics are complicated, but the short story is that both array.push(x) and array[array.length] = x should be very fast. What you're doing seems unnecessary and potentially even bad for performance (if it happens to defeat internal optimizations). Then again without measuring,

Re: [v8-users] `make quickcheck` runs 32-bit tests when I'm on a 64-bit OS

2014-12-13 Thread Jakob Kummerow
On Sat, Dec 13, 2014 at 5:22 AM, Isiah Meadows impinb...@gmail.com wrote: I'm not set up for cross-compilation, so I get all kinds of errors in building for IA32. But, when I run `make quickcheck`, it starts building/testing for IA32 This is by design. As soon as you go beyond simple changes

Re: [v8-users] Why is array bounds checks hoisting optimization disabled in crankshaft?

2014-12-11 Thread Jakob Kummerow
No specific reason, I think. It was just never pushed into production. And at this point, with Crankshaft deprecated, it's probably not worth the regression risk. Maybe at some point in the future it'll inspire a similar algorithm in Turbofan. On Wed, Dec 10, 2014 at 10:45 PM, Prince

Re: [v8-users] Local Handle to Persistent (Multiple Isolates)

2014-12-08 Thread Jakob Kummerow
You can't move objects from one isolate to another. On Sun, Dec 7, 2014 at 6:35 AM, Nick Kelly skimm...@gmail.com wrote: Hello, I am modifying the v8 engine to basically pass control of a function over to the embedder. Basically, I currently have a runtime function which gathers the

Re: [v8-users] xcode not detecting full SetAccessor function definition.

2014-12-08 Thread Jakob Kummerow
On Sun, Dec 7, 2014 at 2:59 AM, Alberto Gonzalez kuna...@gmail.com wrote: I'm having this compilation problem with the latest version of xcode. When trying to use the class SetAccessor SetAccessor is not a class. and passing a setter function, it tells me No matching member function for

Re: [v8-users] Local Handle to Persistent (Multiple Isolates)

2014-12-08 Thread Jakob Kummerow
, Dec 8, 2014 at 1:47 PM, Nick Kelly skimm...@gmail.com wrote: So, I guess I will have to manually copy over certain members that I need and create a new object/handle on the new isolate? On Monday, December 8, 2014 3:31:01 AM UTC-6, Jakob Kummerow wrote: You can't move objects from one isolate

Re: [v8-users] Instrumentation API in V8

2014-11-25 Thread Jakob Kummerow
No. You can get method-level tracing with --trace, and the built-in ARM/MIPS simulators can trace simulated machine instructions with --trace-sim. If you really need tracing with the granularity of AST nodes or similar, it would probably be easier to use a JS engine that can run in purely

Re: [v8-users] Re: V8 Snapshots Questions and Clarifications

2014-11-11 Thread Jakob Kummerow
mksnapshot isn't intended for creating arbitrary snapshots, that's why it's not exposed or documented. You are of course free to play around with it, but you're pretty much on your own. For the record, Chrome does not create a Chrome-specific V8 snapshot (AFAIK). Also, bear in mind that putting

Re: [v8-users] How to remove CheckMaps instructions in an optimization phase

2014-11-05 Thread Jakob Kummerow
Removing check instructions is so utterly wrong and dangerous that I can't bring myself to even try to help you. Just don't do it! On Wed, Nov 5, 2014 at 8:19 AM, Gabriel Southern souther...@gmail.com wrote: I'm experimenting with removing deoptimization checks and I have a question about how

Re: [v8-users] How to remove CheckMaps instructions in an optimization phase

2014-11-05 Thread Jakob Kummerow
that I've seen. Thanks, -Gabriel On Wednesday, November 5, 2014 5:42:20 AM UTC-8, Jakob Kummerow wrote: Removing check instructions is so utterly wrong and dangerous that I can't bring myself to even try to help you. Just don't do it! On Wed, Nov 5, 2014 at 8:19 AM, Gabriel Southern south

Re: [v8-users] V8 entry points into Code-gen and Crankshaft

2014-10-17 Thread Jakob Kummerow
Look for uses of FLAG_trace_opt. It's used for printing information about crankshaft-related events, which should mostly coincide with what you're interested in. On Fri, Oct 17, 2014 at 5:46 AM, NormalV8user syberslid...@gmail.com wrote: I am trying to instrument when code-gen is invoked and

Re: [v8-users] How can I kill a JS function at runtime for a V8 unit test?

2014-10-02 Thread Jakob Kummerow
(even to the point the desktop is hanging), almost ready to fry itself. On Sep 29, 2014 12:11 PM, Jakob Kummerow jkumme...@chromium.org wrote: I don't understand what you're saying. Do you mean your testcase should, when all is well, finish in a second or two? That's much too slow. Or do you

Re: [v8-users] V8::TerminateExecution().

2014-09-30 Thread Jakob Kummerow
Generated code doesn't check for termination requests after every machine instruction, because that would be way too slow. It does check in loops (not on every iteration, though, only now and then), and some other situations like function calls. Note that TerminateExecution is intended for

Re: [v8-users] How can I kill a JS function at runtime for a V8 unit test?

2014-09-29 Thread Jakob Kummerow
...@gmail.com wrote: Problem then, it should take no more than a second or two. Basically it is a this should not hang the engine test. On Sep 26, 2014 9:56 AM, Jakob Kummerow jkumme...@chromium.org wrote: On Fri, Sep 26, 2014 at 3:18 PM, Isiah Meadows impinb...@gmail.com wrote: On Thursday

Re: [v8-users] How can I kill a JS function at runtime for a V8 unit test?

2014-09-26 Thread Jakob Kummerow
On Fri, Sep 26, 2014 at 3:18 PM, Isiah Meadows impinb...@gmail.com wrote: On Thursday, September 25, 2014 2:01:03 PM UTC-4, Jakob Kummerow wrote: That depends entirely on the kind of performance delta we're talking about. If a particular testcase went from actually hanging (endless loop

Re: [v8-users] Could someone please verify if I have signed the CLA?

2014-09-22 Thread Jakob Kummerow
As I've told you before [1], you have signed it. Twice. Any other questions? [1] https://groups.google.com/d/msg/v8-users/FcaO80-pY6s/pcc-KyyO3IMJ On Mon, Sep 22, 2014 at 4:35 PM, Isiah Meadows impinb...@gmail.com wrote: Once again, I'm not sure either way about if I have a CLA signature on

Re: [v8-users] Re: 64 bit builds in visual studio

2014-08-08 Thread Jakob Kummerow
Other things you can try: - update dependencies (make dependencies on *nix; manually according to the instructions on our wiki page on Windows) - nuke your build output directory and rebuild from scratch - when switching between ia32 and x64 builds on Windows, it is sometimes (always?) necessary

Re: [v8-users] Status of --harmony-modules and --harmony-scoping

2014-07-31 Thread Jakob Kummerow
I don't know what state precisely the modules code is in, but generally, existing tests are expected to pass, unless they're annotated otherwise in the corresponding test suite's .status file (test/mjsunit/mjsunit.status in this case). You could simply run them to verify ;-) However, I would

Re: [v8-users] Cleaning up the global object between scripts

2014-07-16 Thread Jakob Kummerow
How about wrapping the fragments in anonymous closures? Roughly: script_to_execute = (function() { + fragment + })();; That should get you most of what you want, except for undoing monkey-patching of Array.prototype and stuff, but maybe that's good enough, and it's certainly easy and fast. On

Re: [v8-users] Cleaning up the global object between scripts

2014-07-16 Thread Jakob Kummerow
...which of course kills any chance you had at getting the code optimized, but if the fragments are short enough, they probably didn't get optimized anyway (because 6+7 executes wy to quickly to be worth the overhead of firing up the optimizing compiler), so this may not matter. If you

Re: [v8-users] Does V8 engine support multithreading programming?

2014-07-03 Thread Jakob Kummerow
On Thu, Jul 3, 2014 at 2:56 PM, Jesper Jansson jepps...@gmail.com wrote: Is it possible to have 2 different threads working on the same isolate No. if they never access each others values. I'm currently working on a game engine where I want to be able to stream new map while the player

Re: [v8-users] Problem with several threads trying to lock an isolate, and the withdrawal of v8::Locker's preemption

2014-06-13 Thread Jakob Kummerow
V8 doesn't support what you're trying to do. Even if there were a preemption mechanism, you couldn't use it for this (unlike you really like crashes). You'll have to find a way to execute asynchronous stuff using only a single thread. Most likely you'll need some sort of event loop. The module

Re: [v8-users] Re: Many functions memory optimization

2014-06-12 Thread Jakob Kummerow
On Thu, Jun 12, 2014 at 12:59 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Thu, Jun 12, 2014 at 12:18 PM, Ilya Kantor ilia...@gmail.com wrote: Do I get it right that unoptimized code is shared but optimize code is not (or shared partially or...)? As I said, in some cases it is shared,

Re: [v8-users] Many functions memory optimization

2014-06-11 Thread Jakob Kummerow
On Tue, Jun 10, 2014 at 9:58 PM, Ilya Kantor ilia...@gmail.com wrote: Hi, When I create many objects new Machine like this ``` function Machine(power) { var enabled = false; this.enable = function() { enabled = true; }; this.disable = function() { enabled = false;

Re: [v8-users] Hidden Classes and Prototype Fields

2014-06-10 Thread Jakob Kummerow
In terms of hidden classes, there shouldn't be a difference. However, since you're setting valueA and valueB in the constructor, setting them on the prototype too seems entirely pointless to me. The prototype's values are never visible from instance objects, right? Unless you want to delete them

Re: [v8-users] GNU readline and the GPL license

2014-05-29 Thread Jakob Kummerow
IANAL. http://en.wikipedia.org/wiki/GNU_GPL#Linking_and_derived_works sounds like there might not be a simple answer to your question. Note that d8 does not depend on readline; readline support is an optional (and compile-time opt-in) feature. We're not distributing binaries linked against

Re: [v8-users] V8 and WebKit

2014-05-29 Thread Jakob Kummerow
No. Why would it? On Thu, May 29, 2014 at 9:51 PM, VasantT sac1...@gmail.com wrote: Hi, I read an article today about Webkit unifying JavaScript Compilation with LLVM compiler https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-jit/. The article explains how WebKit has combined

Re: [v8-users] How does V8 deal with super-closures?

2014-05-21 Thread Jakob Kummerow
Only unreachable objects will be garbage-collected. As long as you still have a (direct or indirect) reference to them, rest assured that they will stay around. On Wed, May 21, 2014 at 2:13 PM, Si Robertson retromodu...@gmail.comwrote: I think I understand. The concern I have is nothing within

Re: [v8-users] Occasional SIGSEGV while trying to parse JSON in an embedded V8 Application.

2014-05-15 Thread Jakob Kummerow
There's a subtle but important difference between value-IsEmpty() and value.IsEmpty() ;-) On Thu, May 15, 2014 at 1:36 AM, Abhishek Kona abhishek.k...@gmail.comwrote: I have some v8 Code which tries to Parse JSON I get a SIGSEGV once in a while when I try to access the value. I am very

Re: [v8-users] Re: Error when linking libv8_base.a into a shared object on x64 linux

2014-04-17 Thread Jakob Kummerow
, April 16, 2014 12:23:29 PM UTC+4, Jakob Kummerow wrote: If you use GYP for your entire project, things should just work. Otherwise you'll probably have to modify V8's .gyp files. I'm not sure how, you'll have to find that out for yourself. Try adding -fPIC to the 'cflags' lists in build

Re: [v8-users] Cross compiling V8 for sh4 architecture

2014-04-17 Thread Jakob Kummerow
Sorry, that's not going to happen any time soon. Adding support for a new architecture is several man-years of work, plus the ongoing cost of supporting it. If you have that much of an interest in the SH4 architecture, you'll have to maintain a port yourself. Starting with

Re: [v8-users] Re: Error when linking libv8_base.a into a shared object on x64 linux

2014-04-16 Thread Jakob Kummerow
If you use GYP for your entire project, things should just work. Otherwise you'll probably have to modify V8's .gyp files. I'm not sure how, you'll have to find that out for yourself. Try adding -fPIC to the 'cflags' lists in build/toolchain.gypi. On Wed, Apr 16, 2014 at 1:45 AM, Marat Abdullin

Re: [v8-users] Re: Error when linking libv8_base.a into a shared object on x64 linux

2014-04-16 Thread Jakob Kummerow
:23:29 PM UTC+4, Jakob Kummerow wrote: If you use GYP for your entire project, things should just work. Otherwise you'll probably have to modify V8's .gyp files. I'm not sure how, you'll have to find that out for yourself. Try adding -fPIC to the 'cflags' lists in build/toolchain.gypi. On Wed

Re: [v8-users] Re: ia32 errors when compiling on x86_64 Mint 16 Virtual Machine running on Surface Pro 2

2014-03-31 Thread Jakob Kummerow
Compiling/running ia32 binaries on an x86_64 Linux machine should work just fine. Make sure you have the appropriate toolchain and libraries installed. Quick test: $ echo -e '#include stdio.h\nint main() { printf(Hello world\\n); }' test.cc $ g++ -m32 test.cc -o test.bin $ file test.bin Should

Re: [v8-users] --harmony switch

2014-03-26 Thread Jakob Kummerow
For the record, I would recommend not to enable --harmony by default. There's a reason this flag exists: the features it enables are generally not ready for prime-time yet. While some might be very close to what will be enabled by default at some point, others may be crashy, buggy, incomplete, or

Re: [v8-users] V8_Fatal

2014-03-14 Thread Jakob Kummerow
--no-hard-abort On Fri, Mar 14, 2014 at 6:00 PM, Albert Zeyer alb...@googlemail.com wrote: Hi, I have a few questions regarding V8_Fatal. Originally, as V8_Fatal reports a fatal error, I thought I could register my own fatal error handler via v8::V8::SetFatalErrorHandler. However, that

Re: [v8-users] Can't find '__main__.py' in 'build\\gyp'

2014-03-07 Thread Jakob Kummerow
On Fri, Mar 7, 2014 at 5:53 PM, Jay Man gmanmi...@gmail.com wrote: Thanks for the clarification! It just dawned on my I don't even have the v8 repository installed! I must of overlooked this line: 'The instructions below assume that you already have acheckout of

Re: [v8-users] Re: c++11 build issue on OS 10.9 with Xcode 5

2014-03-04 Thread Jakob Kummerow
Remember to export LINK=... so it matches your CXX. On Tue, Mar 4, 2014 at 8:10 AM, Doug Linder douglas.lin...@gmail.comwrote: Did you ever get to the bottom of this? I've been trying to build V8 and embed it today, but for the life of me I cannot get a static build to work; I see exactly

Re: [v8-users] Why is v8 so much faster than other langs in the regex-dna test?

2014-02-26 Thread Jakob Kummerow
V8 has a very fast regexp engine. On Tue, Feb 25, 2014 at 7:14 PM, Heath Matlock heathmatl...@gmail.comwrote: In the language shootout, the v8 engine outperforms all other languages: http://benchmarksgame.alioth.debian.org/u64/performance.php?test=regexdna Would someone take a little time

Re: [v8-users] Error building v8 on Mac OSX.

2014-02-20 Thread Jakob Kummerow
Wild guess: Python 3.x? Try again with 2.x That said, the shared library build seems to be broken on Mac. A workaround is i18nsupport=off. On Thu, Feb 20, 2014 at 6:04 AM, Jane Chen jxche...@gmail.com wrote: This is what I did: svn co http://v8.googlecode.com/svn/branches/3.24 v8 cd v8

Re: [v8-users] Error building v8 on Windows.

2014-02-20 Thread Jakob Kummerow
Note that Cygwin is unsupported -- if it works, that's great; if it doesn't, tough luck. Looks like ICU requires something that your Cygwin doesn't have. You can try to figure out what that is and how to install it in Cygwin, or you can try building without i18nsupport and see if that works

Re: [v8-users] Error building v8 on Windows.

2014-02-20 Thread Jakob Kummerow
to build V8, but I haven't tried that. Of course, if you want an easy life as a developer, you'll use Linux :-) Jane On Thursday, February 20, 2014 4:20:25 AM UTC-8, Jakob Kummerow wrote: Note that Cygwin is unsupported -- if it works, that's great; if it doesn't, tough luck. Looks like ICU

Re: [v8-users] How v8 executes inside CALL_GENERATED_CODE()?

2014-01-09 Thread Jakob Kummerow
On Thu, Jan 9, 2014 at 4:50 AM, ChaosPP junho0924@lge.com wrote: I'm sorry about no make sense sentence. I using GDB for debugging v8 ($gdb d8, using sample javascript - var temp=10;), and trace function flow after Script::Run(). After some next, I reached CALL_GENERATED_CODE() in

Re: [v8-users] How v8 executes inside CALL_GENERATED_CODE()?

2014-01-09 Thread Jakob Kummerow
On Thu, Jan 9, 2014 at 10:04 AM, ChaosPP junho0924@lge.com wrote: OK. I Understand, Thanks. But, may I know why the program jumps to ~SealHandleScope()? Because right after the CALL_GENERATED_CODE there's a block end where a SealHandleScope object goes out of scope, hence its destructor

Re: [v8-users] Hydrogen documentation

2014-01-08 Thread Jakob Kummerow
On Tue, Dec 24, 2013 at 2:21 AM, Hendrik Greving hendrik.greving@gmail.com wrote: Hi, Is there documentation about hydrogen available? Check out https://docs.google.com/document/d/1hOaE7vbwdLLXWj3C8hTnnkpE0qSa2P--dtDvwXXEeD0/pub . Does anybody know of a hydrogen-LLVM converter?

Re: [v8-users] v8 snapshot and javascript context

2013-12-20 Thread Jakob Kummerow
No, there is no existing way to save and restore V8's state at arbitrary times. Sven has already explained why it's impossible to implement one. Assuming that V8 (or a Chrome renderer process) is single-threaded doesn't help, because it *isn't* single-threaded. But even if what you're suggesting

Re: [v8-users] profiling javascript with v8

2013-12-17 Thread Jakob Kummerow
https://code.google.com/p/v8/wiki/V8Profiler On Tue, Dec 17, 2013 at 3:54 PM, Pawel Por porpa...@gmail.com wrote: Hi Can I profile javascript with v8 ? I would like to log the time of execution of specific javascript functions into file. I want to have the following information: function

<    1   2   3   4   5   6   >