[v8-users] Re: mksnapshot built with GNU/Linux file format

2019-03-18 Thread Yang Guo
Can you provide some more context? What are you trying to do? How did you try to do it? Yang On Tuesday, December 11, 2018 at 5:57:46 PM UTC+1, madana gopal wrote: > > Hi Team, > > While building mksnapshot for x86/ia32 architecture, we are getting > mksnapshot binary with GNU/Linux format, ins

[v8-users] Re: how V8 on FreeBSD11 ?

2019-03-18 Thread Yang Guo
Unfortunately we don't support FreeBSD. On Wednesday, January 2, 2019 at 1:54:54 AM UTC+1, TaeJin Sim wrote: > > I been trying to build V8 on FreeBSD due the ports are not updated to the > recent version of v8 but I have struggled a lot. I wonder if someone > already build v8 on FreeBSD that cou

[v8-users] Re: Reaching UNIMPLEMENTED code path

2019-03-18 Thread Yang Guo
v8::platform::Platform is only a barebone default implmentation. Subclassing it and implementing your own PostDelayedTask is the right thing to do. Yang On Friday, February 22, 2019 at 4:08:02 PM UTC+1, ibon wrote: > > Hi there, > > I recently upgraded my Android embedded v8 from 6.3 to 7.2. >

[v8-users] Re: v8_monolith binary

2019-03-18 Thread Yang Guo
v8_monolith is only supposed to give you a static library. You can link against it for whatever you embed V8 in. Yang On Friday, March 1, 2019 at 6:19:39 PM UTC+1, Evgeniy Patlan wrote: > > HI. > Could somone suggest me how Ican build v8_monolith binary > Using tools/dev/v8gen.py x64.release --

[v8-users] Re: How to specify script execution scope?

2019-03-18 Thread Yang Guo
You can use v8::Compiler::CompileFunctionInContext. That way, you can pass in context extension objects. Yang On Friday, January 22, 2010 at 9:15:54 AM UTC+1, Andrey Semashev wrote: > > Hi, > > I'm trying to port my application (a VoiceXML interpreter) from > Mozilla SpiderMonkey to v8. For ones

[v8-users] Re: build jit-less version for iOS

2019-03-18 Thread Yang Guo
Not officially supported, but there were some successes in getting it to work on iOS devices that run on 64 bit: https://bugs.chromium.org/p/v8/issues/detail?id=8928 Yang On Sunday, March 17, 2019 at 10:46:22 AM UTC+1, Yakir E wrote: > > Hi all, > now that 7.4 support jit-less compilation. Does

Re: [v8-users] Should v8::Promise::Resolver construction depend on v8::Context?

2019-02-05 Thread Yang Guo
Sometimes we pass the context because the method may throw, and we need the context for the Error constructor. Elsewhere we use the implicit current context for that. In other (possibly overlapping) cases we just pass the context to distinguish the API from an older version, and to be consistent wi

Re: [v8-users] Re: How to rescue issues caused by v8::Isolate termination

2018-11-28 Thread Yang Guo
thread >>>> after E1 is forcibly terminated? >>>> >>>> Blink is already doing that for common script execution paths e.g., >>>> event listeners, call functions etc. >>>> >>> Script execution is scattered in the code base so it'

Re: [v8-users] Re: How to rescue issues caused by v8::Isolate termination

2018-11-22 Thread Yang Guo
>>> called, what happens? >>> >>> main T- >>> worker --*E1**--- >>> >>> T: Call TerminateExecution with the worker isolate (on the main thread) >>> E1: bottom-most script evaluation (* means running) >&g

Re: [v8-users] Re: How to rescue issues caused by v8::Isolate termination

2018-11-18 Thread Yang Guo
r/core/workers/worker_thread.cc?type=cs&sq=package:chromium&g=0&l=415> >>>> from >>>> blink, V8 is not even running. That would mean that we don't have to worry >>>> about any of this? >>> >>> >>> At that place the

[v8-users] Re: How to rescue issues caused by v8::Isolate termination

2018-11-15 Thread Yang Guo
have to worry about any of this? Cheers, Yang On Wed, Nov 14, 2018 at 10:00 AM Yang Guo wrote: > I filed a bug for the slightly counter-intuitive behavior I mentioned: > https://bugs.chromium.org/p/v8/issues/detail?id=8455 > > Cheers, > > Yang > > On Wed, Nov 14,

[v8-users] Re: How to rescue issues caused by v8::Isolate termination

2018-11-14 Thread Yang Guo
I filed a bug for the slightly counter-intuitive behavior I mentioned: https://bugs.chromium.org/p/v8/issues/detail?id=8455 Cheers, Yang On Wed, Nov 14, 2018 at 9:01 AM Yang Guo wrote: > When you terminate execution in V8, we abort execution until the > bottom-most call into V8. If yo

[v8-users] Re: How to rescue issues caused by v8::Isolate termination

2018-11-14 Thread Yang Guo
When you terminate execution in V8, we abort execution until the bottom-most call into V8. If you have re-entries into V8, V8 always returns empty results until the bottom-most call into V8. On the Blink side on the stack of the re-entries, you can try to call into V8 before returning, but that wil

[v8-users] Re: Cached data or startup snapshot?

2018-02-21 Thread Yang Guo
Some comments: - When you say classes run slower, do you mean they take longer to execute, or do you mean they spend time on compilation too? - Does your non-snapshotted version use proxies too? Proxies are indeed significantly slower. - You should no longer need --ignition --turbo. This is the

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

2018-02-16 Thread Yang Guo
Maybe you could play around with --min-semi-space-size and --max-semi-space-size to set the young space size. Cheers, Yang On Thursday, February 15, 2018 at 9:52:20 PM UTC+1, Kevin Burke wrote: > > Hi there, > I have a short lived v8 process - a Node.js test suite that takes 10 > seconds to ru

[v8-users] Re: Cached data or startup snapshot?

2018-02-16 Thread Yang Guo
Node.js doesn't support custom startup snapshot, so I guess you only included pure JS parts in the startup snapshot. The startup snapshot is mainly intended to persist state, i.e. changes to the native context. By default it does not persist code. So I would be surprised if you saw any reductio

[v8-users] Re: V8 to cease GYP support by the end of 2017

2018-01-19 Thread Yang Guo
versions? > > We were able to build the 6.4 branch tip on Windows using our existing > GYP-based script with Visual Studio 2017. Do you know whether that's likely > to continue working in 6.5 and beyond? > > Thanks in advance! > > On Thursday, April 27, 2017 at 10:07:03

[v8-users] Deprecating Makefile

2018-01-19 Thread Yang Guo
If you build with GN, you can ignore this email. I am about to land the change to break building with make. This change can be reverted locally to restore building with make. The purpose is to give early warning to developers still rel

Re: [v8-users] Re: V8 snapshots

2017-09-08 Thread Yang Guo
V8's serializer simply does not support serializing handles. You can't have any open handle scopes when you serialize. You can store these handles somewhere on the context before serializing, and retrieve it after deserializing. On Friday, September 8, 2017 at 12:29:33 AM UTC+2, Zac Hansen wrot

[v8-users] Re: Pump message loop with multiple isolates

2017-08-31 Thread Yang Guo
Each isolate has its own micro task queue. So I guess yes, you will have to pump every one of them. I don't think synchronizing is necessary, since they are isolated from each other. On Tuesday, August 29, 2017 at 3:47:23 PM UTC+2, fkp...@gmail.com wrote: > > Hi, > I'm creating a multithread pla

[v8-users] Re: Inspector commonly crashes after TerminateExecution()?

2017-08-31 Thread Yang Guo
Does this fix solve your problem? https://chromium-review.googlesource.com/c/v8/v8/+/645127 On Thursday, August 31, 2017 at 3:13:12 AM UTC+2, Kenton Varda wrote: > > Hi v8-users, > > I have an application in which I use TerminateExecution() from another > thread to kill off scripts that run for

[v8-users] V8 to cease GYP support by the end of 2017

2017-04-27 Thread Yang Guo
ime V8 is upgraded to a newer version to reflect changes to the build system. For some more background, please take a look at this case study with Node.js <https://docs.google.com/document/d/1gvHuesiuvLzD6X6ONddxXRxhODlOJlxgfoTNZTlKLGA>. If you have questions, please reach out! Best Rega

[v8-users] Re: Debugging Javascript in V8

2017-02-08 Thread Yang Guo
gt; > четвер, 20 жовтня 2016 р. 09:36:33 UTC+3 користувач Yang Guo написав: >> >> The old debugger protocol is no longer supported. We do support the >> devtools protocol though. You could take a look at how >> v8/test/inspector-test.cc works. In your project, you c

[v8-users] Re: async function stack trace after await

2017-02-08 Thread Yang Guo
This is working as intended. The stack trace after await is missing because the async function is being resumed from the microtask queue. On Tuesday, January 24, 2017 at 5:03:36 PM UTC+1, Boris Okunskiy wrote: > > Stack traces from async functions are different before and after await: > > main();

Re: [v8-users] Re: Minimal example of the v8-inspector c++ api

2017-02-08 Thread Yang Guo
v8/src/d8.cc embeds the inspector in a fairly simple manner. Maybe you can use it as example? Cheers, Yang On Sunday, January 29, 2017 at 5:21:19 PM UTC+1, Theodore Dubois wrote: > > I eventually realized that my app wasn’t working because I didn’t realize > I needed to call contextCreated on

[v8-users] Re: Implementing a simple taint tracking mechanism in Node.JS's V8

2017-02-08 Thread Yang Guo
Unfortunately, there is no such hook. On Wednesday, February 8, 2017 at 6:41:08 AM UTC+1, Viyat Bhalodia wrote: > > Hi all, > > I was wondering if I can use the Node V8-inspector to implement some > simple taint tracking in the V8. I do not want to modify the V8 source, > because of how fast the

[v8-users] Re: cannot build v8 with enable snapshot

2016-12-14 Thread Yang Guo
Because when you build for Android, we still have to create the snapshot on the machine you are building from. What happens is: - build V8 for the host (x64) - run mksnapshot on the host, with the simulator for the target (arm), to get the snapshot for the target. - build V8 for the target On F

[v8-users] Re: Good SIMPLE v8 C++ wrapping example?

2016-12-14 Thread Yang Guo
Yes, the documentation for various APIs is a bit lacking, unless you already know where to look. For what you are describing it sounds like you want to take a look here: https://cs.chromium.org/chromium/src/v8/test/cctest/test-api.cc?q=test-api.cc&sq=package:chromium&dr&l=11365 Cheers, Yang

[v8-users] Re: cannot build v8 with enable snapshot

2016-12-08 Thread Yang Guo
When we build for Android, we use the ARM simulator to run V8 on the host machine to create the snapshot for ARM. Maybe the host machine build did not succeed? On Thursday, December 8, 2016 at 1:57:30 PM UTC+1, pav...@coherent-labs.com wrote: > > [1/1] LINK mksnapshot

[v8-users] Re: Make a Github wiki on how to use d8

2016-11-13 Thread Yang Guo
I don't think it makes sense to document d8 the way you would like to. It's meant merely as a test bed, and as such, subject to changing requirements. I would rather suggest to use node.js instead. Other than that, I'd say the test cases in test/mjsunit serve the purpose of showing how to use d8

[v8-users] Re: Run script in different context than it was compiled (or: reuse compiled scripts in different contexts)

2016-11-13 Thread Yang Guo
If you are only interested in sharing code between contexts, but not actual objects, you don't have to set security tokens. You can use ScriptCompiler::CompileUnboundScript to compile a script. The compile result can be then bound to a context via UnboundScript::BindToCurrentContext and run. C

[v8-users] Re: Different stack between strict and sloppy mode.

2016-11-07 Thread Yang Guo
Could it be that you somehow enabled tail call optimization? What happens if you use --no-harmony-tailcalls? If that's not it... we indeed also changed the implementation of stack traces a bit between 4.6 and 5.3. A (preferably reduced) repro would be great to find out what exactly is going on.

[v8-users] Re: Try-Catch block scope and callback.

2016-10-27 Thread Yang Guo
This is not how Javascript works. There is no way to stage changes and only later commit them. Try-catch is not a transactional block. On Monday, October 24, 2016 at 9:36:06 AM UTC+2, Jane Chen wrote: > > Embedding v8 5.3. In my embedding application, the user can make some > updates and the up

[v8-users] Re: Enable Debug of V8 scripts and use a remote debugger.

2016-10-19 Thread Yang Guo
You can take a look at test/inspector/inspector-test.cc to see how to attach an inspector client to a V8 context. By patching this through to a socket, you could use Chrome to debug. On Tuesday, October 18, 2016 at 10:41:01 AM UTC+2, Zac Hansen wrote: > > Looking at the bug, less than 2 hours ag

[v8-users] Re: V8 JSON Debugging Protocol, Breakpoints not being set

2016-10-19 Thread Yang Guo
I would urge you to use the DevTools protocol instead, used for example in test/inspector/inspector-test.cc The old JSON debug API is deprecated and going to be removed soon. Cheers, Yang On Monday, October 17, 2016 at 11:00:30 PM UTC+2, WIlliam Taylor wrote: > > >

[v8-users] Re: Debugging Javascript in V8

2016-10-19 Thread Yang Guo
The old debugger protocol is no longer supported. We do support the devtools protocol though. You could take a look at how v8/test/inspector-test.cc works. In your project, you could open a socket to pass devtools protocol messages through to V8, and use Chrome DevTools to debug. If everything

Re: [v8-users] Breaking On Native Function Calls

2016-10-19 Thread Yang Guo
I guess you are looking for https://bugs.chromium.org/p/v8/issues/detail?id=178 This is a long standing feature request that has not been addressed yet. I'll add it to our backlog. On Thursday, October 20, 2016 at 7:55:38 AM UTC+2, PhistucK wrote: > > File ​crbug.com/657697​ (and crbug.com/6577

[v8-users] Re: How do I attach a debugger to the run-time?

2016-07-20 Thread Yang Guo
There is currently no good way to do it. We are migrating towards using v8-inspector, which node.js already uses. That way you can use the same debugging protocol as Chrome DevTools. It won't be ready for some time though. On Monday, July 18, 2016 at 4:29:31 AM UTC+2, Zac Hansen wrote: > > http

[v8-users] Re: Lack of request_seq property in response messages from debugger

2016-07-20 Thread Yang Guo
The legacy JSON debugger is deprecated for some time now. It's still usable, but not for much longer, and bug fixes will not be provided. We will soon introduce v8-inspector so that you can use the same debugging protocol that Chrome DevTools uses. Cheers, Yang On Tuesday, July 19, 2016 at 3:

[v8-users] Re: How to tune the garbage collector interval in v8 (--gc_interval is not working)

2016-06-27 Thread Yang Guo
ion: > Is there any way to change GC activities other than setting heap size? I > don't mind tweaking the source code if options are not exported. > > Thanks, > Wenzhi Cui > > On Monday, June 13, 2016 at 12:43:42 AM UTC-5, Yang Guo wrote: >> >> --gc-inter

[v8-users] Re: Protecting IP

2016-06-27 Thread Yang Guo
Is there any way for an user run code on the node.js instance at all? I'm asking since node.js runs on the server, so the source is usually not accessible from outside. On Tuesday, June 14, 2016 at 3:33:35 PM UTC+2, Joe Bloggs wrote: > > Hi, > > My employer is looking to shift major development

[v8-users] Re: How to tune the garbage collector interval in v8 (--gc_interval is not working)

2016-06-12 Thread Yang Guo
--gc-interval is a debugging flag and not supposed to be used for production. On Saturday, June 11, 2016 at 4:14:15 PM UTC+2, WENZHI CUI wrote: > > Hi all, > Sorry to disturb you all but I have a question regarding tuning GC > interval in v8. > > I am using Node.js v4.2.1 (with Google v8 v4

[v8-users] Re: [blink-dev] Re: Passive Error Event

2016-05-27 Thread Yang Guo
, but it uses V8 > APIs in order to break at uncaught exceptions, so I wondered if activating > this makes the execution less performant. > > > ☆*PhistucK* > > On Fri, May 27, 2016 at 6:19 PM, Yang Guo wrote: > >> That doesnt sound like something in V8. The onerr

[v8-users] Re: [blink-dev] Re: Passive Error Event

2016-05-27 Thread Yang Guo
just do not know... > > > ☆*PhistucK* > > On Tue, May 24, 2016 at 1:46 PM, Yang Guo wrote: > >> Throwing errors typically are not and should not be on the critical path >> of any Javascript program. Therefore it makes no sense to add complexity to >> make this faster. &

[v8-users] Re: How to create generator function or object from C/C++ code?

2016-05-24 Thread Yang Guo
No such API exists yet afaik. Please file a bug if you feel strongly about this. On Thursday, May 19, 2016 at 1:39:05 PM UTC+2, Bogdan Padalko wrote: > > Hi, > > is it possible to create generator function and/or generator object from > v8 API? If no, are there any plans to do that? I do v8 eng

[v8-users] Re: Passive Error Event

2016-05-24 Thread Yang Guo
Throwing errors typically are not and should not be on the critical path of any Javascript program. Therefore it makes no sense to add complexity to make this faster. Cheers, Yang On Thursday, May 19, 2016 at 8:03:55 PM UTC+2, PhistucK wrote: > > I am not really sure about how to test it, but

[v8-users] Re: access into debug object retuns TypeError

2016-03-31 Thread Yang Guo
Fixed here btw: https://codereview.chromium.org/1845833002/ On Thursday, March 31, 2016 at 10:01:01 AM UTC+2, Deepak Mohan wrote: > > Thanks for the clarification! > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message beca

Re: [v8-users] access into debug object retuns TypeError

2016-03-31 Thread Yang Guo
Actually there is some screw up with security tokens. We set the security token of the debug context to the newly created context. However, when d8's REPL has two contexts: an evaluation context and a utility context. Because we initialize the utility context for REPL, the security token of the

[v8-users] Re: Simple loop parallelizer

2016-02-23 Thread Yang Guo
Javascript does not support threading at all. The language is not thread safe in many places. The best attempt at multi-threading is via workers. Each worker has it's own separate heap and are synchronized via messages. That being said, spawning a worker or a new isolate just to do SIMD is proh

Re: [v8-users] Re: Exception::Error result is Local

2016-02-18 Thread Yang Guo
// >> TODO(yangguo): crbug/403509. Check for empty handle instead" (any relation >> ;-)). Is there a plan/thought to have Exception::Error return an empty >> handle in the TerminateExecution case (I couldn't locate crbug/403509)? It >> seems that the current behavior o

Re: [v8-users] Re: Exception::Error result is Local

2016-02-15 Thread Yang Guo
r. It's really hard to picture > what would be going on in such a scenario and if there's anything sensible > to do beyond falling on one's sword. > > Or maybe this is all too trivial to bother with in which case I appreciate > the discussion, anyway. > > On

Re: [v8-users] Re: Exception::Error result is Local

2016-02-11 Thread Yang Guo
en it's appropriate to post to the >>> list or open an issue. While I know you can code the change about as fast >>> as I can hit the Post button, I'd be happy to make the change myself. FWIW, >>> I'd do the type-checking and cast in Factory::NewError

[v8-users] Re: Exception::Error result is Local

2016-02-10 Thread Yang Guo
This probably never happens, but in case creating the error object fails, undefined is returned. On Monday, February 8, 2016 at 9:03:42 PM UTC+1, Alex Kodat wrote: > > This must have been asked before but can't find an explanation so ... just > curious why Exception::Error et al are declared to

[v8-users] Re: JSON.parse error message

2016-02-07 Thread Yang Guo
Hi, this feature request sounds reasonable. Though you probably should have filed an issue to the issue tracker instead. I created a patch for this https://codereview.chromium.org/1681513002. Cheers, Yang On Monday, February 8, 2016 at 7:32:32 AM UTC+1, Alex Kodat wrote: > > Would it make sen

[v8-users] Re: Problems with setbreakpoint command

2016-01-24 Thread Yang Guo
Do you have a test case to reproduce this issue? I'd love to help but your description of the issue is very vague. On Sunday, January 24, 2016 at 11:39:12 PM UTC+1, treck wrote: > > My program need set breakpoints feature on specified line of code. I'm > trying use setbreakpoint >

[v8-users] Re: Building V8 Fails with MinGW-w64

2016-01-24 Thread Yang Guo
Looks like you are trying to build V8 with a compiler that does not support C++11. On Monday, January 25, 2016 at 4:58:46 AM UTC+1, ig...@lucee.org wrote: > > Hi, > > I'm trying to build v8 version 4.3.66 with MinGW-w64 and I'm getting > errors which I can not understand. > > It'd be greatly app

Re: [v8-users] v8 ** Snapshot ** help !

2016-01-20 Thread Yang Guo
As long as console.log or setInterval is not called when you create the snapshot, it's fine. The variable resolution for global variables happens at runtime, after the snapshot has been deserialized. I'd suggest simply putting everything you need into one .js file to create the snapshot from. O

[v8-users] Re: Proposal to switch from Unibrow to ICU in V8

2016-01-20 Thread Yang Guo
FWIW I'm already implementing unicode-aware case-insensitive RegExp matching relying on ICU [0]. Unibrow simply does not support getting case fold closures, and I don't think it makes sense to extend it further to include support. It would be nice to get rid of unibrow altogether. One issue we h

[v8-users] Intent to remove hit count and ignore count for debug break points

2016-01-19 Thread Yang Guo
Break points in the debugger currently track their hit count and have an option for ignoring the next n hits. This feature is not used by Chrome Devtools and will not be exposed once V8 eventually switches to Devtools protocol as debugging API. I have a CL to remove this: https://codereview.chromiu

Re: [v8-users] Is there intent to allow optimization of generator functions?

2015-12-17 Thread Yang Guo
This is a longshot, but would it be possible to "OSR" from non-optimized generator state into optimized generator state? On Thursday, December 17, 2015 at 11:18:19 AM UTC+1, Benedikt Meurer wrote: > > Hey Ben, > > Mainly that the generator state is saved/restored by just copying the full > funct

[v8-users] Re: Function variables

2015-10-26 Thread Yang Guo
Local variables are either stored directly on stack, or, if they need to be context-accessible, on the function context. On Thursday, October 22, 2015 at 3:19:30 PM UTC+2, Deepak Subramanian wrote: > > Global variables seem to be stored in the NameDictionary. (and accessible > from Object::getpr

[v8-users] Re: How to run a nacl crypto library?

2015-10-26 Thread Yang Guo
On Monday, October 26, 2015 at 3:52:22 PM UTC+1, Ignacio Queralt wrote: > > Hi everybody, > I want to run the crypto library https://github.com/tonyg/js-nacl > > > with

Re: [v8-users] Re: Is it normal for Android devices to take 7 seconds to load 600KB of JavaScript?

2015-10-20 Thread Yang Guo
profiler. > > I suppose I cannot use snapshot for this as it includes native functions > and typed arrays. > > 2015年10月15日木曜日 17時41分24秒 UTC+9 Yang Guo: >> >> You might want to try custom startup snapshots: >> http://v8project.blogspot.de/2015/09/custom-startup

[v8-users] Re: Is it normal for Android devices to take 7 seconds to load 600KB of JavaScript?

2015-10-15 Thread Yang Guo
You might want to try custom startup snapshots: http://v8project.blogspot.de/2015/09/custom-startup-snapshots.html On Sunday, October 11, 2015 at 2:46:09 PM UTC+2, vroad wrote: > > I created an OpenGL-based app using nodejs. It launches faster with > smaller js, such as 100KB, though it takes lo

[v8-users] Re: How to speed up loading of large scripts

2015-08-17 Thread Yang Guo
Nope. Require won't work. Just concatenate all the JS files you need into one. On Monday, August 17, 2015 at 11:11:23 AM UTC+2, edhenolin wrote: > > > > On Tuesday, August 11, 2015 at 1:44:42 PM UTC+2, Yang Guo wrote: >> >> Hi, >> >> which V8 version are

[v8-users] Re: How to speed up loading of large scripts

2015-08-11 Thread Yang Guo
Hi, which V8 version are you using? I don't think you can hit that assertion with the code serializer with the most up-to-date V8. kProduceParserCache doesn't produce any cached code, just some hint to speed up parsing. In some cases there is no hint that the parser can take advantage of. What

[v8-users] Re: create the object with different style in javascript

2015-08-11 Thread Yang Guo
This is not a V8-specific question, but rather a Javascript question. I'd recommend StackOverflow or similar forums for your question. In this specific case, I wouldn't use a getter. Instead, simply dispatch in User depending on the argument. You could also use ES6 rest arguments for this. On

[v8-users] Re: Enumerate closure variable

2015-08-11 Thread Yang Guo
V8 includes the methods Heap::TracePathToObjectFrom, Heap::TracePathToObject and Heap::TracePathToGlobal in debug builds to help with debugging with object reachability. Found paths are printed to stdout. Maybe these methods can help? Yang On Thursday, August 6, 2015 at 6:02:43 PM UTC+2, Mihai

[v8-users] Re: Obje life time

2015-08-11 Thread Yang Guo
Objects die when they are no longer reachable. On Friday, July 31, 2015 at 10:34:43 AM UTC+2, 이원준 wrote: > > I guess life time for object that is created in test code. > > In detail, when the object create and when the object die. > > -- -- v8-users mailing list v8-users@googlegroups.com http:/

Re: [v8-users] Re: Support term for v8's native debugger protocol

2015-08-11 Thread Yang Guo
This is off-topic, as it has nothing to do with the debugger specifically. % functions are ones that are implemented in C++. They are only callable from V8's native JS code. We use them to implement things that are written in the C++ runtime instead of JS. Yang On Monday, August 10, 2015 at 5:

[v8-users] Re: Support term for v8's native debugger protocol

2015-08-09 Thread Yang Guo
What Bradley said. The DebuggerAgent has been removed, so a direct socket connection for debugging is no longer built directly into V8. However, the JSON protocol is still available. This is not going to away any time soon, at least until we have a full-featured alternative. One possible (long-

[v8-users] d8 no longer supports readline

2015-07-23 Thread Yang Guo
I am removing support for readline in d8 because it is not being maintained and rarely used. https://codereview.chromium.org/1250223002/ I hope this does not break anyone's workflow. As alternative, I suggest rlwrap. Cheers, Yang -- -- v8-users mailing list v8-users@googlegroups.com http:/

[v8-users] Re: Ability to change entropy source on the fly

2015-07-08 Thread Yang Guo
What's your use case for this? On Tuesday, July 7, 2015 at 7:52:05 PM UTC+2, Serge wrote: > > It is possible to set custom entropy source using > > v8::V8::SetEntropySource() > > before initializing the engine. But I haven't found a way to change the > entropy source on the fly while engine is ru

[v8-users] Re: Should v8::Isolate::Dispose be called on the default one that gets created by v8?

2015-06-28 Thread Yang Guo
Which version of V8 are you talking about? Afaik there is no default Isolate anymore. On Sunday, June 28, 2015 at 11:24:11 AM UTC+2, Pete wrote: > > Afaik, there is a default isolate that gets created by v8. On terminating > my application, should I be calling v8::Isolate::Exit and > v8::Isolat

[v8-users] Re: A mysterious try failure on v8_linux64_avx2_rel

2015-06-11 Thread Yang Guo
Hi Yutaka, the issue is due to a bug in the build configuration when - using external snapshot - using make (with Makefile generated by GYP) - native JS in V8 is changed The issue is that the change in the JS file does not trigger rebuilding the source blob. Your change triggered it, but does no

[v8-users] Re: [blink-dev] Intent to implement: V8 extras

2015-05-12 Thread Yang Guo
gt;>streams, but for example if we were to implement something like >> TextEncoder >>or URL as an extra, it would be crucial. >> >> Overall though, we are quite excited about the possibilities this opens >> up, by allowing embedders a performant way to implement

[v8-users] Re: Javascript engine for Application Automation

2015-04-30 Thread Yang Guo
Just use node.js. V8 is a pure JS engine, without any bindings to any I/O. Node.js provides those. On Saturday, April 25, 2015 at 6:41:03 PM UTC+2, Shaukat Mahmood Ahmad wrote: > > Hi All, > > I am evaluating Google-V8 and Node.js as JavaScript engine for application > automation / scripting su

[v8-users] Re: Possible bug in Debug::NotifyMessageHandler?

2015-04-16 Thread Yang Guo
Thanks! Fix pending: https://codereview.chromium.org/1089893002/ On Wednesday, April 15, 2015 at 5:12:12 PM UTC+2, Mihail Slavchev wrote: > > Hi, > > I was investigating an issue with the V8 debugger when I stumbled on an > unexpected program flow in Debug::NotifyMessageHandler method. More > pr

[v8-users] Re: Changes To Behavior of V8::TerminateExecution(Isolate*)

2015-04-10 Thread Yang Guo
It would help a lot if you had a reduced test case that doesn't have node.js as dependency. On Friday, April 10, 2015 at 4:04:25 PM UTC+2, William Roush wrote: > > I'm currently working on upgrading a Node.js module (Tripwire) to be > compatible with Node 0.12, and am struggling with changes to

Re: [v8-users] Clarify snapshots when embedding

2015-04-08 Thread Yang Guo
On Wednesday, April 8, 2015 at 10:37:34 PM UTC+2, Augusto Roman wrote: > > Thanks Ben and Yang: > > On Wednesday, April 8, 2015 at 6:28:13 AM UTC-7, Yang Guo wrote: >> >> Ben, thanks for answering that question, but there are some inaccuracies >> :) >> >&

Re: [v8-users] Clarify snapshots when embedding

2015-04-08 Thread Yang Guo
Ben, thanks for answering that question, but there are some inaccuracies :) On Wednesday, April 8, 2015 at 2:16:37 PM UTC+2, Ben Noordhuis wrote: > > On Wed, Apr 8, 2015 at 12:18 PM, Augusto Roman > wrote: > > I've dug through the post history, but I'm still having trouble > > understanding exa

[v8-users] Re: Move V8 Context from one Isolate to another

2015-03-03 Thread Yang Guo
A context is too deeply entangled into the isolate it belongs to, so moving the context but not the isolate is basically impossible with the current V8. On Sunday, March 1, 2015 at 9:29:49 PM UTC+1, Ivan P. wrote: > > Does anybody know - is there an easy way to move some v8::Conext that > belong

[v8-users] Re: When do promise jobs run?

2015-02-16 Thread Yang Guo
Promises jobs are run at the end of script execution. You can manually trigger them via Isolate::RunMicroTasks. On Tuesday, February 10, 2015 at 7:07:32 PM UTC+1, Narciso Jaramillo wrote: > > Hi, > > I'm relatively new to the world of v8 embedding, so please forgive me if > this is a naive ques

[v8-users] Re: TerminateExecution won't stop a Service Worker calling console.log

2015-02-16 Thread Yang Guo
I filed a bug here: https://code.google.com/p/v8/issues/detail?id=3892 On Monday, February 16, 2015 at 7:36:15 AM UTC+1, fal...@chromium.org wrote: > > (Sorry that this post may be Blink-specific) > I'm having trouble using TerminateExecution to kill a Service Worker > that's in a loop like this:

Re: [v8-users] Precompiled Scripts and Global Variables

2015-02-06 Thread Yang Guo
There is no "auto-reuse", but you can cache compiled code. On Saturday, January 31, 2015 at 5:37:21 PM UTC+1, Jerry Wang wrote: > > 6 years passed, does today's V8 support auto-reuse-precompilation-result > cross multiple isolates? > > On Thursday, September 11, 2008 at 3:48:01 AM UTC+8, Christia

[v8-users] Re: Stack rewind support in the debugger protocol

2015-01-30 Thread Yang Guo
Rewinding to the start of the function works to a certain extend with live edit, but I wouldn't rely on it for anything. On Thursday, January 29, 2015 at 9:29:05 AM UTC+1, Wouter Gazendam wrote: > > Hi all, > > I don't seem to see any support for rewinding the stack in the debugger > protocol (a

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

2015-01-30 Thread Yang Guo
You are welcome to play around with code caching. Take a look at CompileString in src/d8.cc or test/cctest/test-serialize.cc for examples. On Wednesday, January 28, 2015 at 6:01:22 AM UTC+1, Jiang Kelvin wrote: > > Thanks for sharing the details of technology. Maybe it is also really hard > to r

[v8-users] Re: memory allocation in old space?

2015-01-30 Thread Yang Guo
V8 employs a technique we call pretenuring. If it detects that objects allocated at a certain allocation site is always promoted to old space, we optimize the code to automatically allocate to old space. Of course, there are some heuristics at play and there is a chance this does not kick in. If

[v8-users] Re: How to use d8 debug JavaScript code

2015-01-21 Thread Yang Guo
d8 is simply a shell to run test cases. It doesn't offer any help with debugging Javascript. You'd probably be better served with Chrome Devtools. Yang On Monday, January 19, 2015 at 9:49:27 AM UTC+1, Deguo Meng wrote: > > Hi , > How to use D8 debug JavaScript code ? is there any document? o

Re: [v8-users] Are valid Smis ever stored in a HeapNumber?

2015-01-15 Thread Yang Guo
One example I observed sometime ago is in Crankshaft: If a phi determines that its type to be a heap number, and one of its incoming edges is a constant smi, we use a heap number to contain that smi. On Monday, December 8, 2014 at 10:33:14 PM UTC+1, Adam Klein wrote: > > Makes sense, thanks. > >

[v8-users] Re: ChromeOS link_freon broken with "isolate_holder.cc(52) Couldn't mmap v8 natives data file"

2014-11-28 Thread Yang Guo
This is https://code.google.com/p/chromium/issues/detail?id=437136 On Wednesday, November 26, 2014 4:14:16 PM UTC+1, Alex Sakhartchouk wrote: > > Hi All, > > Hope you can help. Last night, I started seeing this message on my dev > Chromebook pixel, and it's stuck at boot screen. Things were fine

Re: [v8-users] Is there any up-to-date documentation on how to use v8::Debug

2014-11-24 Thread Yang Guo
Can you provide the V8 version you are using? Having a debug event listener should no longer cause significant performance regression. You can use an interrupt (v8::Isolate::RequestInterrupt) to interrupt V8 to install a DebugEventListener. Yang On Tuesday, November 18, 2014 7:49:03 PM UTC+1,

[v8-users] Re: es-staging flag.

2014-09-16 Thread Yang Guo
When a harmony feature is first implemented, it's put under a --harmony-xxx flag, which can be turned on all at once by the --harmony flag. After some time of maturing, we move it to --es-staging, which is just a step ahead of having it enabled by default. Yang On Friday, August 1, 2014 10:50:

[v8-users] Re: Linking error with the new function in src/mksnapshot.cc.

2014-09-16 Thread Yang Guo
Try to build with make ia32.release snapshot=off On Saturday, September 6, 2014 11:59:37 AM UTC+2, Dhiman Chakraborty wrote: > > I am a Computer Science major, and I am currently working on V8 for a > course project. The aim of the project is to gain access in javascript > manipulation to crea

[v8-users] Re: Is there a diagram or document about structure of v8 heap?

2014-09-16 Thread Yang Guo
Jay Conrod recently published a post on V8's GC and heap: http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection Maybe that helps? On Saturday, September 13, 2014 10:30:41 AM UTC+2, Liu Xiao wrote: > > Dear All: > > I want to understand the v8 heap in total. > > However, up to now I have

Re: [v8-users] Minimizing v8 build size

2014-09-04 Thread Yang Guo
You might be able to shave off another couple of kilobytes by using the interpreted regexp engine by compiling with regexp=interpreted. If you use V8 3.25 or older, you may also remove the debugger by debuggersupport=off. Older V8 would also have fewer features, thereby reducing the binary size.

Re: [v8-users] Executing javascript in steps

2014-09-04 Thread Yang Guo
You could use the debugger to achieve this. The debugger can be exposed to Javascript, as seen in test/mjsunit/debug-step*.js tests. Since you are even in full control of the code, you could even just insert a debugger statement at the end of each javascript statement. Not sure how easy this me

Re: [v8-users] Re: Plot timer events not working

2014-05-16 Thread Yang Guo
Sven is completely right. The script was quickly hacked together. I'll see what I can do. Yang On Friday, May 16, 2014 8:32:10 AM UTC+2, Sven Panne wrote: > > On Fri, May 16, 2014 at 3:26 AM, Yong Wang > > wrote: > >> try "bash tools/plot-timer-events benchmarks/v8.log" >> > > Hmmm, that's bad

[v8-users] Re: Discontinuation of V8 support for Intel chips without SSE2/CMOV

2014-05-13 Thread Yang Guo
The change has landed in r21223 and r21279. On Friday, May 9, 2014 10:19:26 AM UTC+2, Yang Guo wrote: > > To reduce code complexity of the IA32 port of V8, we decided to drop > support for Intel chips with no SSE2/CMOV support. This does not affect the > X64 port, as it always i

[v8-users] Re: PropertyCallbackInfo::This() return type change

2014-05-13 Thread Yang Guo
Some internal properties are implemented using property callbacks, for example string.length. Since strings are not Objects, but Values, the extra checks that commit introduced failed in that particular case. The holder is String.prototype though. This does not apply to FunctionCallbackInfo, so

  1   2   >