specifications - Is there any way to see JavaScript default methods source-code? -
is there way see javascript default methods source-code? example .sort() or .reverse(). think c code can read it?
in code spidermonkey's javascript array implementation (used in firefox), you'll want start looking @ array_sort
, array_reverse
functions. more generally, array_methods
constant; has indices relevant functions.
in code v8's javascript array implementation (used in chrome , opera), want arraysort
, arrayreverse
functions respectively. globalarray.prototype
find index other functions.
javascript core's javascript array implementation (used in safari) bit unusual, in array.prototype.sort
, ilk implemented in javascript. sort function want named sort
in file. however, not of array.prototype
family of functions found in file; example, i'm not sure reverse
is.
the source code chakra's implementation (used in ie) not available, , suspect never be. same goes source code presto's implementation (formerly used in opera, before switched blink/v8).
Comments
Post a Comment