| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { | 46 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { |
| 47 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); | 47 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); |
| 48 } | 48 } |
| 49 | 49 |
| 50 | 50 |
| 51 void ThreadLocalTop::Initialize() { | 51 void ThreadLocalTop::Initialize() { |
| 52 c_entry_fp_ = 0; | 52 c_entry_fp_ = 0; |
| 53 handler_ = 0; | 53 handler_ = 0; |
| 54 #ifdef USE_SIMULATOR | 54 #ifdef USE_SIMULATOR |
| 55 #ifdef V8_TARGET_ARCH_ARM | 55 #ifdef V8_TARGET_ARCH_ARM |
| 56 simulator_ = assembler::arm::Simulator::current(Isolate::Current()); | 56 simulator_ = Simulator::current(Isolate::Current()); |
| 57 #elif V8_TARGET_ARCH_MIPS | 57 #elif V8_TARGET_ARCH_MIPS |
| 58 simulator_ = assembler::mips::Simulator::current(Isolate::Current()); | 58 simulator_ = Simulator::current(Isolate::Current()); |
| 59 #endif | 59 #endif |
| 60 #endif | 60 #endif |
| 61 #ifdef ENABLE_LOGGING_AND_PROFILING | 61 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 62 js_entry_sp_ = NULL; | 62 js_entry_sp_ = NULL; |
| 63 external_callback_ = NULL; | 63 external_callback_ = NULL; |
| 64 #endif | 64 #endif |
| 65 #ifdef ENABLE_VMSTATE_TRACKING | 65 #ifdef ENABLE_VMSTATE_TRACKING |
| 66 current_vm_state_ = EXTERNAL; | 66 current_vm_state_ = EXTERNAL; |
| 67 #endif | 67 #endif |
| 68 try_catch_handler_address_ = NULL; | 68 try_catch_handler_address_ = NULL; |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 } | 910 } |
| 911 | 911 |
| 912 | 912 |
| 913 char* Isolate::RestoreThread(char* from) { | 913 char* Isolate::RestoreThread(char* from) { |
| 914 memcpy(reinterpret_cast<char*>(thread_local_top()), from, | 914 memcpy(reinterpret_cast<char*>(thread_local_top()), from, |
| 915 sizeof(ThreadLocalTop)); | 915 sizeof(ThreadLocalTop)); |
| 916 // This might be just paranoia, but it seems to be needed in case a | 916 // This might be just paranoia, but it seems to be needed in case a |
| 917 // thread_local_ is restored on a separate OS thread. | 917 // thread_local_ is restored on a separate OS thread. |
| 918 #ifdef USE_SIMULATOR | 918 #ifdef USE_SIMULATOR |
| 919 #ifdef V8_TARGET_ARCH_ARM | 919 #ifdef V8_TARGET_ARCH_ARM |
| 920 thread_local_top()->simulator_ = assembler::arm::Simulator::current(this); | 920 thread_local_top()->simulator_ = Simulator::current(this); |
| 921 #elif V8_TARGET_ARCH_MIPS | 921 #elif V8_TARGET_ARCH_MIPS |
| 922 thread_local_top()->simulator_ = assembler::mips::Simulator::current(this); | 922 thread_local_top()->simulator_ = Simulator::current(this); |
| 923 #endif | 923 #endif |
| 924 #endif | 924 #endif |
| 925 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { | 925 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { |
| 926 RuntimeProfiler::IsolateEnteredJS(this); | 926 RuntimeProfiler::IsolateEnteredJS(this); |
| 927 } | 927 } |
| 928 return from + sizeof(ThreadLocalTop); | 928 return from + sizeof(ThreadLocalTop); |
| 929 } | 929 } |
| 930 | 930 |
| 931 } } // namespace v8::internal | 931 } } // namespace v8::internal |
| OLD | NEW |