Reviewers: Søren Gjesse,
http://codereview.chromium.org/19537/diff/1/8 File src/factory.cc (right): http://codereview.chromium.org/19537/diff/1/8#newcode163 Line 163: script->set_line_ends(*(Factory::NewFixedArray(0))); On 2009/02/02 14:40:45, Søren Gjesse wrote: > Use Heap::undefined_value() to mark not initialized. Done. http://codereview.chromium.org/19537/diff/1/7 File src/log.cc (right): http://codereview.chromium.org/19537/diff/1/7#newcode589 Line 589: On 2009/02/02 14:40:45, Søren Gjesse wrote: > Please use two empty lines between methods. Done. http://codereview.chromium.org/19537/diff/1/7#newcode604 Line 604: On 2009/02/02 14:40:45, Søren Gjesse wrote: > Please use two empty lines between methods. Done. http://codereview.chromium.org/19537/diff/1/7#newcode616 Line 616: On 2009/02/02 14:40:45, Søren Gjesse wrote: > Please use two empty lines between methods. Done. http://codereview.chromium.org/19537/diff/1/6 File src/objects-inl.h (right): http://codereview.chromium.org/19537/diff/1/6#newcode1992 Line 1992: ACCESSORS(Script, line_ends, FixedArray, kLineEndsOffset) On 2009/02/02 14:40:45, Søren Gjesse wrote: > You should use Object here to allow it to be initialized to undefined. Done. http://codereview.chromium.org/19537/diff/1/3 File src/objects.cc (right): http://codereview.chromium.org/19537/diff/1/3#newcode6780 Line 6780: if (line_ends()->length() > 0) return; On 2009/02/02 14:40:45, Søren Gjesse wrote: > Check for undefined using IsUndefined(). Add an ASSERT IsFixedArray (or > IsJSArray - see below) before returning. > Done. http://codereview.chromium.org/19537/diff/1/3#newcode6783 Line 6783: SmartPointer<uc16> data = src->ToWideCString(); On 2009/02/02 14:40:45, Søren Gjesse wrote: > ToWideCString is only for debugging and logging purposes. Try to look at how > indexOf is implemented in Runtime_StringIndexOf. Perhaps using > Runtime::StringMatch with a one character pattern might work. > Runtime::StringMatch is used for simple string search in the RegExp > implementation. > Done. http://codereview.chromium.org/19537/diff/1/3#newcode6800 Line 6800: set_line_ends(FixedArray::cast(line_ends()->AddKeysFromJSArray(*array))); On 2009/02/02 14:40:45, Søren Gjesse wrote: > When exposing this to JavaScript you will probably end up storing the JSArray > instead of the FixedArray, but you can wait with that change until the next > changelist. Using FixedArray, because when I try to use a JSArray, a leak in global objects is detected by a test. http://codereview.chromium.org/19537/diff/1/3#newcode6813 Line 6813: for (int i = 1; i < line_ends()->length(); ++i) { On 2009/02/02 14:40:45, Søren Gjesse wrote: > Issue 213 (http://code.google.com/p/v8/issues/detail?id=213) suggests we change > this to binary search. You can look at that in a separate changelist. Yes, I'm for a separate CL. http://codereview.chromium.org/19537/diff/1/5 File src/objects.h (right): http://codereview.chromium.org/19537/diff/1/5#newcode2541 Line 2541: DECL_ACCESSORS(line_ends, FixedArray) On 2009/02/02 14:40:45, Søren Gjesse wrote: > FixedArray -> Object Done. Description: Adding src_file_name:line_number into perf log entries for compiled JS functions. Thus, instead of the following profiler records: 1.5% 1.5% LazyCompile: <anonymous> we'll now have these: 1.5% 1.5% LazyCompile: <anonymous> richards.js:309 Basically, I translated two functions from messages.js into C++. In the next CL I will update messages.js to use added native functions. Please review this at http://codereview.chromium.org/19537 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/compiler.cc M src/factory.cc M src/log.h M src/log.cc M src/objects-inl.h M src/objects.h M src/objects.cc M tools/tickprocessor.py --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
