| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 rethrowing_message_ = false; | 114 rethrowing_message_ = false; |
| 115 pending_message_obj_ = NULL; | 115 pending_message_obj_ = NULL; |
| 116 pending_message_script_ = NULL; | 116 pending_message_script_ = NULL; |
| 117 scheduled_exception_ = NULL; | 117 scheduled_exception_ = NULL; |
| 118 } | 118 } |
| 119 | 119 |
| 120 | 120 |
| 121 void ThreadLocalTop::Initialize() { | 121 void ThreadLocalTop::Initialize() { |
| 122 InitializeInternal(); | 122 InitializeInternal(); |
| 123 #ifdef USE_SIMULATOR | 123 #ifdef USE_SIMULATOR |
| 124 #if V8_TARGET_ARCH_ARM | |
| 125 simulator_ = Simulator::current(isolate_); | 124 simulator_ = Simulator::current(isolate_); |
| 126 #elif V8_TARGET_ARCH_MIPS | |
| 127 simulator_ = Simulator::current(isolate_); | |
| 128 #endif | |
| 129 #endif | 125 #endif |
| 130 thread_id_ = ThreadId::Current(); | 126 thread_id_ = ThreadId::Current(); |
| 131 } | 127 } |
| 132 | 128 |
| 133 | 129 |
| 134 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { | 130 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { |
| 135 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); | 131 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); |
| 136 } | 132 } |
| 137 | 133 |
| 138 | 134 |
| (...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 return to + sizeof(ThreadLocalTop); | 1662 return to + sizeof(ThreadLocalTop); |
| 1667 } | 1663 } |
| 1668 | 1664 |
| 1669 | 1665 |
| 1670 char* Isolate::RestoreThread(char* from) { | 1666 char* Isolate::RestoreThread(char* from) { |
| 1671 OS::MemCopy(reinterpret_cast<char*>(thread_local_top()), from, | 1667 OS::MemCopy(reinterpret_cast<char*>(thread_local_top()), from, |
| 1672 sizeof(ThreadLocalTop)); | 1668 sizeof(ThreadLocalTop)); |
| 1673 // This might be just paranoia, but it seems to be needed in case a | 1669 // This might be just paranoia, but it seems to be needed in case a |
| 1674 // thread_local_top_ is restored on a separate OS thread. | 1670 // thread_local_top_ is restored on a separate OS thread. |
| 1675 #ifdef USE_SIMULATOR | 1671 #ifdef USE_SIMULATOR |
| 1676 #if V8_TARGET_ARCH_ARM | |
| 1677 thread_local_top()->simulator_ = Simulator::current(this); | 1672 thread_local_top()->simulator_ = Simulator::current(this); |
| 1678 #elif V8_TARGET_ARCH_MIPS | |
| 1679 thread_local_top()->simulator_ = Simulator::current(this); | |
| 1680 #endif | |
| 1681 #endif | 1673 #endif |
| 1682 ASSERT(context() == NULL || context()->IsContext()); | 1674 ASSERT(context() == NULL || context()->IsContext()); |
| 1683 return from + sizeof(ThreadLocalTop); | 1675 return from + sizeof(ThreadLocalTop); |
| 1684 } | 1676 } |
| 1685 | 1677 |
| 1686 | 1678 |
| 1687 Isolate::ThreadDataTable::ThreadDataTable() | 1679 Isolate::ThreadDataTable::ThreadDataTable() |
| 1688 : list_(NULL) { | 1680 : list_(NULL) { |
| 1689 } | 1681 } |
| 1690 | 1682 |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 | 2534 |
| 2543 #ifdef DEBUG | 2535 #ifdef DEBUG |
| 2544 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2536 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2545 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2537 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2546 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2538 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2547 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2539 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2548 #undef ISOLATE_FIELD_OFFSET | 2540 #undef ISOLATE_FIELD_OFFSET |
| 2549 #endif | 2541 #endif |
| 2550 | 2542 |
| 2551 } } // namespace v8::internal | 2543 } } // namespace v8::internal |
| OLD | NEW |