Scripts now have a compilation type which can be host, eval or JSON. Host scripts are compiled through the API, eval scripts are compiled through call to evan and JSON scripts are compiled as a result of calling JSON.parse.
For scripts scripts compiled through eval the JavaScript function in top of the stack and the pc offset into the code is stored in the script object. This makes it possible to calculate the source position of the eval call later when requested. This information can be obtained through the script mirror object and is part of the script mirror JSON serialization for the debugger protocol.
Moved the enumeration ScripType into class Script and remamed to Type. The new compilation type enumeration is also inside the class Script.
This information is now shown when using the scripts command in he developer shell debugger.
Review URL: http://codereview.chromium.org/119108
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
The debugger compile events (BeforeCompile and AfterCompile) have not been used by any V8 debuggers lately and where actually not working any more. Added the correct information to the compile event.
Added a simple 'trace compile' command to the developer shell for testing.
Added a test for compile evnets.
Review URL: http://codereview.chromium.org/21076
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00