Questions tagged [javascript-engine]

For questions related to JavaScript engine development. If you are simply referring to issues with JavaScript code, use the [javascript] tag instead.

171 questions
6
votes
1 answer

How to detect from nodejs which JavaScript engine it is running on?

There are now several forks of nodejs and some of them support JavaScript engines other than Google's V8 engine. For my node code to see which JS engine it is running under, what is currently the best way? The engines I am aware of are: Google's V8…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
6
votes
2 answers

How do JavaScript interpreters/engines work?

I'm interested to find out how the JavaScript interpreter (engine if you like) works. I'm aware that JavaScript isn't compiled.I have looked at the ECMA specification, but it doesn't explain how the actual engine works. The main reason why I'm…
user338195
6
votes
3 answers

JSON object != JavaScript object?

For convenience I wrote a simple toJSON prototype, for handling JSON that I know to be safe: String.prototype.toJSON = function () { return JSON.parse(this.valueOf()); }; I am using it in testing my web-services. Unfortunately even with this…
A T
  • 13,008
  • 21
  • 97
  • 158
6
votes
2 answers

Rendering a javascript webpage page with phantomjs

I am trying to render a a javascript evaluated source code from a website using phantomjs. But every time I try i only get the source code as is (similar to view source from the browser). What I actually want is the javascript evaluated code (what…
Trancey
  • 699
  • 1
  • 8
  • 18
5
votes
1 answer

Modifying V8 JavaScript Engine provided with Chrome

I want support for a new API that is normally not supported by V8 JS Engine provided with Chrome. Is it possible to do this by tweaking V8 provided with Chrome. I'm open to using Spidermonkey which is provided with Firefox. I just want this API to…
5
votes
1 answer

In V8, how are primitive types such as null, undefined, and boolean stored in memory?

Is a boolean stored as a 32-bit integer in memory? How about a null value? In the book Speaking Javascript, it refers to a type tag being used to indicate the type of a value stored in memory. e.g. The type tag for Object type was 000. What is a…
SKing7
  • 2,204
  • 4
  • 21
  • 29
5
votes
2 answers

What is the JavaScript Engine used in Opera Next (Or 12+)

Is it WebKit? Presto? Is V8 engine dedicated to Chrome alone?
Smitha
  • 6,110
  • 24
  • 90
  • 161
5
votes
1 answer

How can I determine the JavaScript Engine from .js code?

Is there a way using JavaScript code to know what JavaScript Engine, is the one on which that code is run on? I don't want to get the browser type just the JavaScript engine.
Eduard Florinescu
  • 16,747
  • 28
  • 113
  • 179
4
votes
3 answers

Why are function expressions not included in the variable object of the Execution Context?

While going through the Execution Context part of the JavaScript.The Core. (1st ed.) by Dmitry Soshnikov, I came across this line that explicitly says that function expressions are not included in the variable object property of an execution…
Aniruddha
  • 774
  • 1
  • 7
  • 18
4
votes
1 answer

Is it possible to use a change the Javascript engine a Cocoa WebView uses?

I'm working on a html/javascript + cocoa hybrid app. From what I can tell, Cocoa's WebView uses the same javascript engine as Safari (Nitro). However, there's a couple of things in the V8 JS engine (used by Chrome) that would be nice luxuries to…
gargantuan
  • 8,888
  • 16
  • 67
  • 108
4
votes
2 answers

Once again: How to get DOM in JavaScript Engine? Has this somebody done?

There are several questions and tips about getting the DOM into Spider-, Trace- or JaegerMonkey. But has anyone done this? Is somewhere out there a in C embedable working JS-Engine including the DOM? OR at least a easy to do tutorial?
christian
  • 425
  • 5
  • 15
4
votes
2 answers

Are there ways to see the assembly code for the code generated by any of the JavaScript jits, especially V8's?

The major JavaScript engines of web browsers and nodeJS have had just-in-time compilers for years. I was just watching a video on Compiler Explorer showing the assembly code output by many compilers for various CPUs. This reminded me that I've been…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
4
votes
1 answer

Nashorn JavaScript Invocable.getInterface fails across classloaders in web app

I need to invoke (with Nashorn) from Java code a function defined in JavaScript and to pass there some parameters. Instead of using Invocable.invokeFunction("Foo", arg1, arg2), I was going to define an interface, then request Invocable to produce…
4
votes
3 answers

String::New: what is it?

I am from a Java background and is learning C++. I encountered the following C++ code: String source = String::New("'Hello' + ', World'"); As what I understand so far, this should be a call to static member function 'New' of class 'String'. But,…
JavaMan
  • 4,954
  • 4
  • 41
  • 69
4
votes
2 answers

Does chrome understand compiled javascript?

Instead of having V8 compile JavaScript on the fly and then execute it, isn't it possible to just compile the JavaScript beforehand and then embed the machine code in the page instead of embedding JavaScript in the page?
Hello
  • 63
  • 4
1 2
3
11 12