http://codereview.chromium.org/2957/diff/1/7
File src/assembler-arm.h (right):

http://codereview.chromium.org/2957/diff/1/7#newcode647
Line 647: int last_position() const { return last_position_; }
On 2008/09/18 08:10:04, bak wrote:
> It might be a good idea to introduce a class capturing
> (position and is_statement).

I will look at this in another CL.

http://codereview.chromium.org/2957/diff/1/8
File src/assembler-ia32.cc (right):

http://codereview.chromium.org/2957/diff/1/8#newcode1865
Line 1865: if (pos == last_position_) return;
On 2008/09/18 08:02:24, iposva wrote:
> Isn't this check redundant?

Removed - left over from before.

http://codereview.chromium.org/2957/diff/1/8#newcode1873
Line 1873: if (pos == last_statement_position_) return;
On 2008/09/18 08:02:24, iposva wrote:
> Another redundant check...

Removed - another left over from before.

http://codereview.chromium.org/2957/diff/1/8#newcode1883
Line 1883: if (last_position_ != kNoPosition &&
On 2008/09/18 08:10:04, bak wrote:
> Add () in expression.

Done.

http://codereview.chromium.org/2957/diff/1/6
File src/debug.cc (right):

http://codereview.chromium.org/2957/diff/1/6#newcode98
Line 98: // passed.
On 2008/09/18 08:10:04, bak wrote:
> Please update the comment to reflect when position_ is updated.

Updated and changed code to always update position_ as we don't want
position_ to be before statement_position_.

http://codereview.chromium.org/2957/diff/1/3
File src/objects.cc (right):

http://codereview.chromium.org/2957/diff/1/3#newcode4150
Line 4150: // Update the position if
On 2008/09/18 08:10:04, bak wrote:
> Please update and reformat the comment.
>

Updated the comment with new code below.

http://codereview.chromium.org/2957/diff/1/3#newcode4157
Line 4157: (pc - it.rinfo()->pc()) < distance ||
On 2008/09/18 08:10:04, bak wrote:
> Add parenthesis to reflect the grouping in boolean expression.

Used two if's and some local variables.

     // Only look at positions after the current pc.
     if (it.rinfo()->pc() < pc) {
       // Get position and distance.
       int dist = pc - it.rinfo()->pc();
       int pos = it.rinfo()->data();
       // If this position is closer than the current candidate or if it
has the
       // same distance as the current candidate and the position is
higher then
       // this position is the new candidate.
       if ((dist < distance) ||
           (dist == distance && pos > position)) {
         position = pos;
         distance = dist;
       }
     }

http://codereview.chromium.org/2957

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to