Questions tagged [v8]

V8 is Google's open source JavaScript engine.

About V8

V8 is Google's Javascript engine that is used in Google Chrome (). It is written in C++ (), and is open source, which can be checked out by following the instructions on the v8 wiki.

V8 can run standalone, or can be embedded into C++ applications.

Documentation on V8 can be found on its wiki pages.

There are a number of flags that can be passed to V8 to expose its internals. For instance, --trace-deopt gets V8 to log code deoptimizations, and --expose-gc allows scripts to manually invoke a garbage collection. The full list of flags can be found by reading the source.

Links:

Tag Usage

Use this tag to ask questions about:

  • Usage of the V8 API
  • Performance and profiling with V8
  • How V8 works
2955 questions
1
vote
1 answer

What is LdaKeyedProperty in V8 byte code?

This is a sample V8 byte code. 984 E> 00000318BA8792D3 @ 41 : 29 02 07 LdaKeyedProperty a0, [7]
ZhefengJin
  • 930
  • 8
  • 17
1
vote
2 answers

How to get the correct js context in v8

I am trying the c++ plugin in nodejs, this is my test code let obj = new addon.MyClass(function (v) { console.log(v); }); obj.run(1); setTimeout(() => { obj.run(3); // [TypeError: obj.run is not a function] }, 1000); When I call the function…
januw a
  • 2,056
  • 5
  • 18
  • 39
1
vote
0 answers

How is Zoom able to launch itself from the browser?

When opening a Zoom link, the browsers shows a popup that asks if you'd like to launch zoom. Then, the Zoom desktop installation is launched. What is the mechanism for doing this? I thought you couldn't access the local system from Javascript.
JeanAlesi
  • 478
  • 3
  • 17
1
vote
1 answer

Why is getting from Map slower than getting from object?

I'm considering migrating my state management layer to using Map versus using a standard object. From what I've read, Map is effectively a hash table whereas Objects use hidden classes under the hood. Generally it's advised, where the properties are…
david_adler
  • 9,690
  • 6
  • 57
  • 97
1
vote
2 answers

How to export Node.js V8 profiling info to Chrome's Dev Tools performance profile?

According to Node.js documentation profiling info can be generated using node --prof myapp.js. Is there a way to convert from this generated format to Chrome's Dev Tools performance profile? It expects to load a JSON format while the format…
Renan
  • 1,705
  • 2
  • 15
  • 32
1
vote
2 answers

How to Get Proper Formatting with the V8 Google Apps Script IDE

Edit: Fixed! The Google Apps Script team rolled this out for our team earlier this week (week of January 10th). Original Post I'm a frequent GAS user, and I've noticed that, since the upgrade to the V8 runtime, formatting in the GAS IDE is awful.…
Davis Jones
  • 1,504
  • 3
  • 17
  • 25
1
vote
1 answer

In JS memory are objects stored as a block?

I was wondering if an object e.g. const numbers = { a: 1, b: 2, c: 3 }; is stored as a group in memory so that the variable 'numbers' refers to the entire object in one place, or if each of it's individual keys are stored in…
j obe
  • 1,759
  • 4
  • 15
  • 23
1
vote
1 answer

An error occurred while installing "gem" and Bundler cannot continue. Mac OS - big sur

This error happened to me before with nio4r gem when I upgraded to Catalina and @dmitry barskov answered it. A similar issue is happening now after big sur upgrade with json, oj and therubyracer (tried using the solution from nio4r, but no luck).…
trailblazer
  • 123
  • 3
  • 11
1
vote
2 answers

Nativescript 7 App unexpectedly crashes in ios == Assertion failed ==

I am developing an app using Nativescript 7 and it keeps crashing unexpectedly in iOS. All versions of iOS crash (12, 13, and 14 so far). Here is the stack trace: ====== Assertion failed ====== Native stack trace: 1 0x10ac972af…
Amjad Abujamous
  • 736
  • 9
  • 9
1
vote
0 answers

How does chrome assign interpreted javascript functionality to its widgets?

I have been looking closely into web browers and the v8 engine. I understand the concept of G.U.I and how its possible to dynamically change the G.U.I in your applications on the go, but the confusion of the v8 engine comes when I start to think…
RonRon Scores
  • 163
  • 2
  • 11
1
vote
2 answers

NodeJS v14 memory issues: Resident Set grows a lot

After I upgraded a NodeJS server application from v6 to v14, I am facing with a strange memory behavior. I noticed this issue (if it is) when I analyzed the memory usage using Dynatrace: the process gives no problems, nor restarts nor failure have…
shogitai
  • 1,823
  • 1
  • 23
  • 50
1
vote
0 answers

v8 : visual studio release compilation static lib error: lld-link: error: could not open 'obj/v8_wrappers.lib': no such file or directory

i followed all the steps from https://v8.dev/docs/build-gn to build release-static v8 lib but I'm getting this error : using VC 2019 , win10 64bit from https://v8.dev/docs/build-gn doing git branch it shows : c:\Dev\my\v8\depot_tools\v8\v8>git…
user63898
  • 29,839
  • 85
  • 272
  • 514
1
vote
1 answer

What's the difference between effect and control edges of V8's TurboFan?

I've read many blog posts, articles, presentation and videos, even inspected V8's source code, both the bytecode generator, the sea-of-nodes graph generator and the optimization phases, and still couldn't find an answer. V8's optimizing compiler,…
Chayim Friedman
  • 47,971
  • 5
  • 48
  • 77
1
vote
2 answers

Typescript v8 natives syntax Expression expected

Using Typescript 4.1.2 is it possible to compile code that references the functions one calls when the --allow-natives-syntax flag in v8 is set? For example: function foo(bar: ()=>void)): void { %OptimizeFunctionOnNextCall(bar); // --> TS1109;…
Ryder Brooks
  • 2,049
  • 2
  • 21
  • 29
1
vote
1 answer

V8 Isolates - is there a limit to the number of instances? Crashes at 4.7k instances

I am testing the limits of V8, and how many instances it can create, but I encounter the following error. This uses about 18TB of virtual memory, and 3500MB of real memory. I've previously run programs with 120TB of virtual memory, so I don't think…
xoa991x
  • 69
  • 5