Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1076)

Unified Diff: src/heap.cc

Issue 174639: Use a root array register for constant loads and stack guards on x64.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 2780)
+++ src/heap.cc (working copy)
@@ -3253,15 +3253,13 @@
void Heap::SetStackLimit(intptr_t limit) {
- // 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
+ // On 64 bit machines, pointers are generally out of range of Smis. We write
+ // something that looks like an out of range Smi to the GC.
+
// 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
+ roots_[kStackLimitRootIndex] =
+ reinterpret_cast<Object*>((limit & ~kSmiTagMask) | kSmiTag);
}
« no previous file with comments | « src/heap.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698