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

Side by Side Diff: src/heap.cc

Issue 174520: 2nd try at fixing invalid Smi issue on 64 bits. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after
3250 } 3250 }
3251 3251
3252 LOG(IntEvent("heap-capacity", Capacity())); 3252 LOG(IntEvent("heap-capacity", Capacity()));
3253 LOG(IntEvent("heap-available", Available())); 3253 LOG(IntEvent("heap-available", Available()));
3254 3254
3255 return true; 3255 return true;
3256 } 3256 }
3257 3257
3258 3258
3259 void Heap::SetStackLimit(intptr_t limit) { 3259 void Heap::SetStackLimit(intptr_t limit) {
3260 // We don't use this on x86-64 yet, but we need to remove the top 3260 // We don't use the stack limit in the roots array on x86-64 yet, but since
3261 // bits or it won't be a valid Smi. This has no effect on 32 bit 3261 // pointers are generally out of range of Smis we should set the value either.
3262 // architectures. 3262 #if !HOST_ARCH_64_BIT
3263 limit &= 0xfffffffful;
3264 // Set up the special root array entry containing the stack guard. 3263 // Set up the special root array entry containing the stack guard.
3265 // This is actually an address, but the tag makes the GC ignore it. 3264 // This is actually an address, but the tag makes the GC ignore it.
3266 set_stack_limit(Smi::FromInt(limit >> kSmiTagSize)); 3265 set_stack_limit(Smi::FromInt(limit >> kSmiTagSize));
3266 #endif
3267 } 3267 }
3268 3268
3269 3269
3270 void Heap::TearDown() { 3270 void Heap::TearDown() {
3271 GlobalHandles::TearDown(); 3271 GlobalHandles::TearDown();
3272 3272
3273 new_space_.TearDown(); 3273 new_space_.TearDown();
3274 3274
3275 if (old_pointer_space_ != NULL) { 3275 if (old_pointer_space_ != NULL) {
3276 old_pointer_space_->TearDown(); 3276 old_pointer_space_->TearDown();
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 #ifdef DEBUG 3970 #ifdef DEBUG
3971 bool Heap::GarbageCollectionGreedyCheck() { 3971 bool Heap::GarbageCollectionGreedyCheck() {
3972 ASSERT(FLAG_gc_greedy); 3972 ASSERT(FLAG_gc_greedy);
3973 if (Bootstrapper::IsActive()) return true; 3973 if (Bootstrapper::IsActive()) return true;
3974 if (disallow_allocation_failure()) return true; 3974 if (disallow_allocation_failure()) return true;
3975 return CollectGarbage(0, NEW_SPACE); 3975 return CollectGarbage(0, NEW_SPACE);
3976 } 3976 }
3977 #endif 3977 #endif
3978 3978
3979 } } // namespace v8::internal 3979 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698