OLD | NEW |
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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 private: | 883 private: |
884 Heap* heap_; | 884 Heap* heap_; |
885 }; | 885 }; |
886 | 886 |
887 | 887 |
888 class CodeMarkingVisitor : public ThreadVisitor { | 888 class CodeMarkingVisitor : public ThreadVisitor { |
889 public: | 889 public: |
890 explicit CodeMarkingVisitor(MarkCompactCollector* collector) | 890 explicit CodeMarkingVisitor(MarkCompactCollector* collector) |
891 : collector_(collector) {} | 891 : collector_(collector) {} |
892 | 892 |
893 void VisitThread(ThreadLocalTop* top) { | 893 void VisitThread(Isolate* isolate, ThreadLocalTop* top) { |
894 for (StackFrameIterator it(top); !it.done(); it.Advance()) { | 894 for (StackFrameIterator it(isolate, top); !it.done(); it.Advance()) { |
895 collector_->MarkObject(it.frame()->unchecked_code()); | 895 collector_->MarkObject(it.frame()->unchecked_code()); |
896 } | 896 } |
897 } | 897 } |
898 | 898 |
899 private: | 899 private: |
900 MarkCompactCollector* collector_; | 900 MarkCompactCollector* collector_; |
901 }; | 901 }; |
902 | 902 |
903 | 903 |
904 class SharedFunctionInfoMarkingVisitor : public ObjectVisitor { | 904 class SharedFunctionInfoMarkingVisitor : public ObjectVisitor { |
(...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3083 } | 3083 } |
3084 | 3084 |
3085 | 3085 |
3086 void MarkCompactCollector::Initialize() { | 3086 void MarkCompactCollector::Initialize() { |
3087 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 3087 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
3088 StaticMarkingVisitor::Initialize(); | 3088 StaticMarkingVisitor::Initialize(); |
3089 } | 3089 } |
3090 | 3090 |
3091 | 3091 |
3092 } } // namespace v8::internal | 3092 } } // namespace v8::internal |
OLD | NEW |