I was wondering if someone could provide details on the *.js files in
the v8 source.
In string.js I see this fragment of code:
// Set the String function and constructor.
%SetCode($String, function(x) {
var value = %_ArgumentsLength() == 0 ? '' : TO_STRING_INLINE(x);
if (%_IsConstructCall()) {
%_SetValueOf(this, value);
} else {
return value;
}
});
Is this called every time a string is created? Specifically I was
wondering about both of these cases:
var x = "string"
var x = new String("string")
Also, could I add my own custom code to these files to perform some
action when a string is created?
Thanks in advance.
Matt
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users