| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 } | 419 } |
| 420 | 420 |
| 421 | 421 |
| 422 char* Isolate::Iterate(ObjectVisitor* v, char* thread_storage) { | 422 char* Isolate::Iterate(ObjectVisitor* v, char* thread_storage) { |
| 423 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(thread_storage); | 423 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(thread_storage); |
| 424 Iterate(v, thread); | 424 Iterate(v, thread); |
| 425 return thread_storage + sizeof(ThreadLocalTop); | 425 return thread_storage + sizeof(ThreadLocalTop); |
| 426 } | 426 } |
| 427 | 427 |
| 428 | 428 |
| 429 void Isolate::IterateThread(ThreadVisitor* v) { | |
| 430 v->VisitThread(this, thread_local_top()); | |
| 431 } | |
| 432 | |
| 433 | |
| 434 void Isolate::IterateThread(ThreadVisitor* v, char* t) { | 429 void Isolate::IterateThread(ThreadVisitor* v, char* t) { |
| 435 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(t); | 430 ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(t); |
| 436 v->VisitThread(this, thread); | 431 v->VisitThread(this, thread); |
| 437 } | 432 } |
| 438 | 433 |
| 439 | 434 |
| 440 void Isolate::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { | 435 void Isolate::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { |
| 441 // Visit the roots from the top for a given thread. | 436 // Visit the roots from the top for a given thread. |
| 442 Object* pending; | 437 Object* pending; |
| 443 // The pending exception can sometimes be a failure. We can't show | 438 // The pending exception can sometimes be a failure. We can't show |
| (...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2178 | 2173 |
| 2179 #ifdef DEBUG | 2174 #ifdef DEBUG |
| 2180 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2175 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2181 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2176 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2182 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2177 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2183 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2178 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2184 #undef ISOLATE_FIELD_OFFSET | 2179 #undef ISOLATE_FIELD_OFFSET |
| 2185 #endif | 2180 #endif |
| 2186 | 2181 |
| 2187 } } // namespace v8::internal | 2182 } } // namespace v8::internal |
| OLD | NEW |