On 2010/02/01 11:09:05, Søren Gjesse wrote:
LGTM, but it looks as if the added test does not test what the change is
about.
As far as I can see the function created through 'new Function' do have
evalFromLocation.
Now it has evalFromLocation, but without the change in complier.cc it was
that
event_data.script().evalFromScript().isUndefined() === true and
event_data.script().evalFromLocation() === undefined.
Another question is whether we should add another script
type 'NEW_FUNCTION'
(or
something like that) to distinguish between new Function(...) and
eval(...).
Maybe it makes sense when displaying source in devtools...
I thought about it and it doesn't seem worth implementing (at least not
now).
DevTools don't display any additional information about the eval except for
its
source code. But if it showed the eval origin it would be 'new Function(...'
line which would make it obvious that the eval originates from 'new
Function(...)' call.
http://codereview.chromium.org/551227/diff/1004/3001
File test/mjsunit/debug-compile-event-newfunction.js (right):
http://codereview.chromium.org/551227/diff/1004/3001#newcode49
test/mjsunit/debug-compile-event-newfunction.js:49: assertEquals(62,
evalFromLocation.line);
Why is this 62 and not 63?
http://codereview.chromium.org/551227
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev