Commit d6afd05b authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

2nd try at fixing invalid Smi issue on 64 bits.

Review URL: http://codereview.chromium.org/174520

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 56ad3bf1
......@@ -3253,13 +3253,15 @@ bool Heap::Setup(bool create_heap_objects) {
void Heap::SetStackLimit(intptr_t limit) {
// We don't use this on x86-64 yet, but we need to remove the top
// bits or it won't be a valid Smi. This has no effect on 32 bit
// architectures.
limit &= 0xfffffffful;
// We don't use the stack limit in the roots array on x86-64 yet, but since
// pointers are generally out of range of Smis we should set the value either.
#if !V8_HOST_ARCH_64_BIT
// Set up the special root array entry containing the stack guard.
// This is actually an address, but the tag makes the GC ignore it.
set_stack_limit(Smi::FromInt(limit >> kSmiTagSize));
#else
set_stack_limit(Smi::FromInt(0));
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment