| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 void Isolate::IterateThread(ThreadVisitor* v, char* t) { | 184 void Isolate::IterateThread(ThreadVisitor* v, char* t) { |
| 185 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(t); | 185 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(t); |
| 186 v->VisitThread(this, thread); | 186 v->VisitThread(this, thread); |
| 187 } | 187 } |
| 188 | 188 |
| 189 | 189 |
| 190 void Isolate::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { | 190 void Isolate::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { |
| 191 // Visit the roots from the top for a given thread. | 191 // Visit the roots from the top for a given thread. |
| 192 v->VisitPointer(&thread->pending_exception_); | 192 v->VisitPointer(&thread->pending_exception_); |
| 193 v->VisitPointer(&(thread->pending_message_obj_)); | 193 v->VisitPointer(&(thread->pending_message_obj_)); |
| 194 v->VisitPointer(BitCast<Object**>(&(thread->pending_message_script_))); | 194 v->VisitPointer(bit_cast<Object**>(&(thread->pending_message_script_))); |
| 195 v->VisitPointer(BitCast<Object**>(&(thread->context_))); | 195 v->VisitPointer(bit_cast<Object**>(&(thread->context_))); |
| 196 v->VisitPointer(&thread->scheduled_exception_); | 196 v->VisitPointer(&thread->scheduled_exception_); |
| 197 | 197 |
| 198 for (v8::TryCatch* block = thread->try_catch_handler(); | 198 for (v8::TryCatch* block = thread->try_catch_handler(); |
| 199 block != NULL; | 199 block != NULL; |
| 200 block = block->next_) { | 200 block = block->next_) { |
| 201 v->VisitPointer(BitCast<Object**>(&(block->exception_))); | 201 v->VisitPointer(bit_cast<Object**>(&(block->exception_))); |
| 202 v->VisitPointer(BitCast<Object**>(&(block->message_obj_))); | 202 v->VisitPointer(bit_cast<Object**>(&(block->message_obj_))); |
| 203 v->VisitPointer(BitCast<Object**>(&(block->message_script_))); | 203 v->VisitPointer(bit_cast<Object**>(&(block->message_script_))); |
| 204 } | 204 } |
| 205 | 205 |
| 206 // Iterate over pointers on native execution stack. | 206 // Iterate over pointers on native execution stack. |
| 207 for (StackFrameIterator it(this, thread); !it.done(); it.Advance()) { | 207 for (StackFrameIterator it(this, thread); !it.done(); it.Advance()) { |
| 208 it.frame()->Iterate(v); | 208 it.frame()->Iterate(v); |
| 209 } | 209 } |
| 210 | 210 |
| 211 // Iterate pointers in live lookup results. | 211 // Iterate pointers in live lookup results. |
| 212 thread->top_lookup_result_->Iterate(v); | 212 thread->top_lookup_result_->Iterate(v); |
| 213 } | 213 } |
| (...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2381 if (prev_ && prev_->Intercept(flag)) return true; | 2381 if (prev_ && prev_->Intercept(flag)) return true; |
| 2382 // Then check whether this scope intercepts. | 2382 // Then check whether this scope intercepts. |
| 2383 if ((flag & intercept_mask_)) { | 2383 if ((flag & intercept_mask_)) { |
| 2384 intercepted_flags_ |= flag; | 2384 intercepted_flags_ |= flag; |
| 2385 return true; | 2385 return true; |
| 2386 } | 2386 } |
| 2387 return false; | 2387 return false; |
| 2388 } | 2388 } |
| 2389 | 2389 |
| 2390 } } // namespace v8::internal | 2390 } } // namespace v8::internal |
| OLD | NEW |