Re: Fix issue 825 (LiveEdit vs. function with no locals) in core and for ia32. (issue 10263002)
34 views
Skip to first unread message
yan...@chromium.org
unread,
May 2, 2012, 7:38:34 AM5/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to peter...@gmail.com, v8-...@googlegroups.com
Integers are not always converted to Smis by a left-shift by one. While we
can
assume that on platform-dependent code (ia32, arm and mips), we avoid using
that
assumption on platform-independent code because on x64 a Smi is converted
by a
left-shift by 32. Code that intend to store integers are Smis should
therefore
use Smi::FromInt() and Smi::cast()->value().
http://codereview.chromium.org/10263002/diff/1006/src/debug.cc#newcode2234 src/debug.cc:2234: const int Debug::FramePaddingLayout::kPaddingValue =
(kInitialSize + 1) * 2;
Use Smi::FromInt to get tagged smi values since x64 tags differently.
Why does the value need to be larger than kInitialSize (smi-tagged)?
http://codereview.chromium.org/10263002/diff/1006/src/ia32/debug-ia32.cc#newcode176 src/ia32/debug-ia32.cc:176: __ lea(esp, Operand(esp, unused_reg,
times_half_pointer_size, 0));
This is based on the implication that Smis are represented by left shift
by 1 bit. Please add a STATIC_ASSERT(kSmiTagSize == 1) or a comment to
state this implication.
On 2012/05/02 11:38:34, Yang wrote:
> we would typically define this as a class deriving from AllStatic
(e.g. class
> ArgumentsAdaptorFrameConstants : public AllStatic)
On 2012/05/02 11:38:34, Yang wrote:
> This coincides with Debug::kFrameDropperFrameSize, which is also 4. If
they are
> derived similarly, can't we consistently use only one of the two?
I'm not sure. Both are derived from the fact that the minimum size of
InternalFrame is 4 words. But they are layouts of different frames. So I
would say it's still more of coincidence here.
> Use Smi::FromInt to get tagged smi values since x64 tags differently.
Done
> Why does
> the value need to be larger than kInitialSize (smi-tagged)?
This is how liveedit part works. It reads from the frame base and first
that it sees are padding words. It iterates until they end and this is
counter. Therefore padding words mustn't look like any possible value of
counter word.
> This is based on the implication that Smis are represented by left
shift by 1
> bit. Please add a STATIC_ASSERT(kSmiTagSize == 1) or a comment to
state this
> implication.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to yan...@chromium.org, v8-...@googlegroups.com
On 2012/05/02 11:38:34, Yang wrote:
> Integers are not always converted to Smis by a left-shift by one. While
> we can
> assume that on platform-dependent code (ia32, arm and mips), we avoid
> using
that
> assumption on platform-independent code because on x64 a Smi is converted
> by a
> left-shift by 32. Code that intend to store integers are Smis should
> therefore
> use Smi::FromInt() and Smi::cast()->value().
Thanks a lot for the very accurate review. I hope I addressed all your
comments.
Plus add added a test (currently disabled because if issue 915).