OLD | NEW |
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 7332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7343 | 7343 |
7344 void HeapIterator::reset() { | 7344 void HeapIterator::reset() { |
7345 // Restart the iterator. | 7345 // Restart the iterator. |
7346 Shutdown(); | 7346 Shutdown(); |
7347 Init(); | 7347 Init(); |
7348 } | 7348 } |
7349 | 7349 |
7350 | 7350 |
7351 #ifdef DEBUG | 7351 #ifdef DEBUG |
7352 | 7352 |
7353 Object* const PathTracer::kAnyGlobalObject = reinterpret_cast<Object*>(NULL); | 7353 Object* const PathTracer::kAnyGlobalObject = NULL; |
7354 | 7354 |
7355 class PathTracer::MarkVisitor: public ObjectVisitor { | 7355 class PathTracer::MarkVisitor: public ObjectVisitor { |
7356 public: | 7356 public: |
7357 explicit MarkVisitor(PathTracer* tracer) : tracer_(tracer) {} | 7357 explicit MarkVisitor(PathTracer* tracer) : tracer_(tracer) {} |
7358 void VisitPointers(Object** start, Object** end) { | 7358 void VisitPointers(Object** start, Object** end) { |
7359 // Scan all HeapObject pointers in [start, end) | 7359 // Scan all HeapObject pointers in [start, end) |
7360 for (Object** p = start; !tracer_->found() && (p < end); p++) { | 7360 for (Object** p = start; !tracer_->found() && (p < end); p++) { |
7361 if ((*p)->IsHeapObject()) | 7361 if ((*p)->IsHeapObject()) |
7362 tracer_->MarkRecursively(p, this); | 7362 tracer_->MarkRecursively(p, this); |
7363 } | 7363 } |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8135 if (FLAG_parallel_recompilation) { | 8135 if (FLAG_parallel_recompilation) { |
8136 heap_->relocation_mutex_->Lock(); | 8136 heap_->relocation_mutex_->Lock(); |
8137 #ifdef DEBUG | 8137 #ifdef DEBUG |
8138 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8138 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
8139 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8139 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
8140 #endif // DEBUG | 8140 #endif // DEBUG |
8141 } | 8141 } |
8142 } | 8142 } |
8143 | 8143 |
8144 } } // namespace v8::internal | 8144 } } // namespace v8::internal |
OLD | NEW |