| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 // Returns the PerIsolateThreadData for the current thread (or NULL if one is | 396 // Returns the PerIsolateThreadData for the current thread (or NULL if one is |
| 397 // not currently set). | 397 // not currently set). |
| 398 static PerIsolateThreadData* CurrentPerIsolateThreadData() { | 398 static PerIsolateThreadData* CurrentPerIsolateThreadData() { |
| 399 return reinterpret_cast<PerIsolateThreadData*>( | 399 return reinterpret_cast<PerIsolateThreadData*>( |
| 400 Thread::GetThreadLocal(per_isolate_thread_data_key_)); | 400 Thread::GetThreadLocal(per_isolate_thread_data_key_)); |
| 401 } | 401 } |
| 402 | 402 |
| 403 // Returns the isolate inside which the current thread is running. | 403 // Returns the isolate inside which the current thread is running. |
| 404 INLINE(static Isolate* Current()) { | 404 INLINE(static Isolate* Current()) { |
| 405 Isolate* isolate = UncheckedCurrent(); | 405 Isolate* isolate = reinterpret_cast<Isolate*>( |
| 406 Thread::GetExistingThreadLocal(isolate_key_)); |
| 406 ASSERT(isolate != NULL); | 407 ASSERT(isolate != NULL); |
| 407 return isolate; | 408 return isolate; |
| 408 } | 409 } |
| 409 | 410 |
| 410 INLINE(static Isolate* UncheckedCurrent()) { | 411 INLINE(static Isolate* UncheckedCurrent()) { |
| 411 return reinterpret_cast<Isolate*>(Thread::GetThreadLocal(isolate_key_)); | 412 return reinterpret_cast<Isolate*>(Thread::GetThreadLocal(isolate_key_)); |
| 412 } | 413 } |
| 413 | 414 |
| 414 bool Init(Deserializer* des); | 415 bool Init(Deserializer* des); |
| 415 | 416 |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 | 1296 |
| 1296 } } // namespace v8::internal | 1297 } } // namespace v8::internal |
| 1297 | 1298 |
| 1298 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1299 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
| 1299 // they're needed. | 1300 // they're needed. |
| 1300 #include "allocation-inl.h" | 1301 #include "allocation-inl.h" |
| 1301 #include "zone-inl.h" | 1302 #include "zone-inl.h" |
| 1302 #include "frames-inl.h" | 1303 #include "frames-inl.h" |
| 1303 | 1304 |
| 1304 #endif // V8_ISOLATE_H_ | 1305 #endif // V8_ISOLATE_H_ |
| OLD | NEW |