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

Side by Side Diff: src/heap.cc

Issue 19388005: Do not call reinterpret_cast when converting from NULL. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | src/stub-cache.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 7332 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698