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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 char* Top::Iterate(ObjectVisitor* v, char* thread_storage) { | 84 char* Top::Iterate(ObjectVisitor* v, char* thread_storage) { |
85 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(thread_storage); | 85 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(thread_storage); |
86 Iterate(v, thread); | 86 Iterate(v, thread); |
87 return thread_storage + sizeof(ThreadLocalTop); | 87 return thread_storage + sizeof(ThreadLocalTop); |
88 } | 88 } |
89 | 89 |
90 | 90 |
| 91 void Top::IterateThread(ThreadVisitor* v) { |
| 92 v->VisitThread(&thread_local_); |
| 93 } |
| 94 |
| 95 |
| 96 void Top::IterateThread(ThreadVisitor* v, char* t) { |
| 97 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(t); |
| 98 v->VisitThread(thread); |
| 99 } |
| 100 |
| 101 |
91 void Top::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { | 102 void Top::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { |
92 v->VisitPointer(&(thread->pending_exception_)); | 103 v->VisitPointer(&(thread->pending_exception_)); |
93 v->VisitPointer(&(thread->pending_message_obj_)); | 104 v->VisitPointer(&(thread->pending_message_obj_)); |
94 v->VisitPointer( | 105 v->VisitPointer( |
95 BitCast<Object**, Script**>(&(thread->pending_message_script_))); | 106 BitCast<Object**, Script**>(&(thread->pending_message_script_))); |
96 v->VisitPointer(BitCast<Object**, Context**>(&(thread->context_))); | 107 v->VisitPointer(BitCast<Object**, Context**>(&(thread->context_))); |
97 v->VisitPointer(&(thread->scheduled_exception_)); | 108 v->VisitPointer(&(thread->scheduled_exception_)); |
98 | 109 |
99 for (v8::TryCatch* block = thread->TryCatchHandler(); | 110 for (v8::TryCatch* block = thread->TryCatchHandler(); |
100 block != NULL; | 111 block != NULL; |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 Top::break_access_->Lock(); | 977 Top::break_access_->Lock(); |
967 } | 978 } |
968 | 979 |
969 | 980 |
970 ExecutionAccess::~ExecutionAccess() { | 981 ExecutionAccess::~ExecutionAccess() { |
971 Top::break_access_->Unlock(); | 982 Top::break_access_->Unlock(); |
972 } | 983 } |
973 | 984 |
974 | 985 |
975 } } // namespace v8::internal | 986 } } // namespace v8::internal |
OLD | NEW |