http://codereview.chromium.org/354024/diff/1/5
File src/arm/fast-codegen-arm.cc (right):

http://codereview.chromium.org/354024/diff/1/5#newcode113
Line 113: SetReturnPosition(function_);
On 2009/11/03 11:31:04, Kevin Millikin wrote:
> This can't be right, can it?  It says that this return corresponds to
the source
> location of the end of the function, even for return statements.

> I think you need to call SetReturnPosition before the 'return
unefined' call to
> EmitReturnSequence, and SetStatementPosition before the other ones.

> Or, consider passing the source position to EmitReturnSequence (then
you can
> probably get rid of SetReturnPosition completely).

You may be right. I was not sure, what would be correct. What if the
"return undefined" is dead code? We would have to record the function
end position in VisitReturn then, right? SetStatementPositionis called
before evaluating return-statement exprssion in VisitReturn.

Currently we also do a different thing on ARM and IA-32. I think it
should be consistent on all platforms.

http://codereview.chromium.org/354024/diff/1/2
File src/fast-codegen.h (right):

http://codereview.chromium.org/354024/diff/1/2#newcode59
Line 59: void EmitReturnSequence();
On 2009/11/03 11:31:04, Kevin Millikin wrote:
> Move this down by all the other "EmitXXX" platform-specific helpers.
Add a
> comment that it is platform specific.

Done.

http://codereview.chromium.org/354024

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

Reply via email to