Looking at the v8 tree, in the src directory, there were some js files providing some basic JS objects such as Math, Array, etc. Looking through these files, I saw identifiers, including the percent sign (%) in their names, i.e. %Foo . At first, I naively thought that it was another allowed character in JS identifiers, but when I tried it in the shell, he screamed at me, saying that he was violating the rules of syntax. But if this is a syntax error, how does d8 work? Here is an example from the source code:
src / apinatives.js lines 44 to 47, git clone from github / v8 / v8
function Instantiate(data, name) { if (!%IsTemplate(data)) return data; var tag = %GetTemplateField(data, kApiTagOffset); switch (tag) {
src / apinatives.js lines 41 to 43, git clone from github / v8 / v8
function SetConstructor() { if (%_IsConstructCall()) { %SetInitialize(this);
Why these identifiers do not give syntax errors. All js files, including math.js and string.js and all the rest ?: Wq
user1621465
source share