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

Side by Side Diff: src/mark-compact.h

Issue 3970005: Make Failure inherit from MaybeObject instead of Object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 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 | « src/log.cc ('k') | src/mark-compact.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // 46 //
47 // All methods are static. 47 // All methods are static.
48 48
49 class MarkCompactCollector: public AllStatic { 49 class MarkCompactCollector: public AllStatic {
50 public: 50 public:
51 // Type of functions to compute forwarding addresses of objects in 51 // Type of functions to compute forwarding addresses of objects in
52 // compacted spaces. Given an object and its size, return a (non-failure) 52 // compacted spaces. Given an object and its size, return a (non-failure)
53 // Object* that will be the object after forwarding. There is a separate 53 // Object* that will be the object after forwarding. There is a separate
54 // allocation function for each (compactable) space based on the location 54 // allocation function for each (compactable) space based on the location
55 // of the object before compaction. 55 // of the object before compaction.
56 typedef Object* (*AllocationFunction)(HeapObject* object, int object_size); 56 typedef MaybeObject* (*AllocationFunction)(HeapObject* object,
57 int object_size);
57 58
58 // Type of functions to encode the forwarding address for an object. 59 // Type of functions to encode the forwarding address for an object.
59 // Given the object, its size, and the new (non-failure) object it will be 60 // Given the object, its size, and the new (non-failure) object it will be
60 // forwarded to, encode the forwarding address. For paged spaces, the 61 // forwarded to, encode the forwarding address. For paged spaces, the
61 // 'offset' input/output parameter contains the offset of the forwarded 62 // 'offset' input/output parameter contains the offset of the forwarded
62 // object from the forwarding address of the previous live object in the 63 // object from the forwarding address of the previous live object in the
63 // page as input, and is updated to contain the offset to be used for the 64 // page as input, and is updated to contain the offset to be used for the
64 // next live object in the same page. For spaces using a different 65 // next live object in the same page. For spaces using a different
65 // encoding (ie, contiguous spaces), the offset parameter is ignored. 66 // encoding (ie, contiguous spaces), the offset parameter is ignored.
66 typedef void (*EncodingFunction)(HeapObject* old_object, 67 typedef void (*EncodingFunction)(HeapObject* old_object,
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 421
421 friend class UnmarkObjectVisitor; 422 friend class UnmarkObjectVisitor;
422 static void UnmarkObject(HeapObject* obj); 423 static void UnmarkObject(HeapObject* obj);
423 #endif 424 #endif
424 }; 425 };
425 426
426 427
427 } } // namespace v8::internal 428 } } // namespace v8::internal
428 429
429 #endif // V8_MARK_COMPACT_H_ 430 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698