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

Side by Side Diff: src/heap.h

Issue 23060018: Fix migration checks and extend them to the Scavenger. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address nit. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 1384
1385 // Checks whether an address/object in a space. 1385 // Checks whether an address/object in a space.
1386 // Currently used by tests, serialization and heap verification only. 1386 // Currently used by tests, serialization and heap verification only.
1387 bool InSpace(Address addr, AllocationSpace space); 1387 bool InSpace(Address addr, AllocationSpace space);
1388 bool InSpace(HeapObject* value, AllocationSpace space); 1388 bool InSpace(HeapObject* value, AllocationSpace space);
1389 1389
1390 // Finds out which space an object should get promoted to based on its type. 1390 // Finds out which space an object should get promoted to based on its type.
1391 inline OldSpace* TargetSpace(HeapObject* object); 1391 inline OldSpace* TargetSpace(HeapObject* object);
1392 static inline AllocationSpace TargetSpaceId(InstanceType type); 1392 static inline AllocationSpace TargetSpaceId(InstanceType type);
1393 1393
1394 // Checks whether the given object is allowed to be migrated from it's
1395 // current space into the given destination space. Used for debugging.
1396 inline bool AllowedToBeMigrated(HeapObject* object, AllocationSpace dest);
1397
1394 // Sets the stub_cache_ (only used when expanding the dictionary). 1398 // Sets the stub_cache_ (only used when expanding the dictionary).
1395 void public_set_code_stubs(UnseededNumberDictionary* value) { 1399 void public_set_code_stubs(UnseededNumberDictionary* value) {
1396 roots_[kCodeStubsRootIndex] = value; 1400 roots_[kCodeStubsRootIndex] = value;
1397 } 1401 }
1398 1402
1399 // Support for computing object sizes for old objects during GCs. Returns 1403 // Support for computing object sizes for old objects during GCs. Returns
1400 // a function that is guaranteed to be safe for computing object sizes in 1404 // a function that is guaranteed to be safe for computing object sizes in
1401 // the current GC phase. 1405 // the current GC phase.
1402 HeapObjectCallback GcSafeSizeOfOldObjectFunction() { 1406 HeapObjectCallback GcSafeSizeOfOldObjectFunction() {
1403 return gc_safe_size_of_old_object_; 1407 return gc_safe_size_of_old_object_;
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
3044 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3048 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3045 3049
3046 private: 3050 private:
3047 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3051 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3048 }; 3052 };
3049 #endif // DEBUG 3053 #endif // DEBUG
3050 3054
3051 } } // namespace v8::internal 3055 } } // namespace v8::internal
3052 3056
3053 #endif // V8_HEAP_H_ 3057 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698