| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { | 65 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { |
| 66 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); | 66 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 void ThreadLocalTop::Initialize() { | 70 void ThreadLocalTop::Initialize() { |
| 71 c_entry_fp_ = 0; | 71 c_entry_fp_ = 0; |
| 72 handler_ = 0; | 72 handler_ = 0; |
| 73 #ifdef USE_SIMULATOR | 73 #ifdef USE_SIMULATOR |
| 74 #ifdef V8_TARGET_ARCH_ARM | 74 #ifdef V8_TARGET_ARCH_ARM |
| 75 simulator_ = assembler::arm::Simulator::current(); | 75 simulator_ = Simulator::current(); |
| 76 #elif V8_TARGET_ARCH_MIPS | 76 #elif V8_TARGET_ARCH_MIPS |
| 77 simulator_ = assembler::mips::Simulator::current(); | 77 simulator_ = assembler::mips::Simulator::current(); |
| 78 #endif | 78 #endif |
| 79 #endif | 79 #endif |
| 80 #ifdef ENABLE_LOGGING_AND_PROFILING | 80 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 81 js_entry_sp_ = NULL; | 81 js_entry_sp_ = NULL; |
| 82 external_callback_ = NULL; | 82 external_callback_ = NULL; |
| 83 #endif | 83 #endif |
| 84 #ifdef ENABLE_VMSTATE_TRACKING | 84 #ifdef ENABLE_VMSTATE_TRACKING |
| 85 current_vm_state_ = EXTERNAL; | 85 current_vm_state_ = EXTERNAL; |
| (...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 return to + sizeof(thread_local_); | 1088 return to + sizeof(thread_local_); |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 | 1091 |
| 1092 char* Top::RestoreThread(char* from) { | 1092 char* Top::RestoreThread(char* from) { |
| 1093 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_)); | 1093 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_)); |
| 1094 // This might be just paranoia, but it seems to be needed in case a | 1094 // This might be just paranoia, but it seems to be needed in case a |
| 1095 // thread_local_ is restored on a separate OS thread. | 1095 // thread_local_ is restored on a separate OS thread. |
| 1096 #ifdef USE_SIMULATOR | 1096 #ifdef USE_SIMULATOR |
| 1097 #ifdef V8_TARGET_ARCH_ARM | 1097 #ifdef V8_TARGET_ARCH_ARM |
| 1098 thread_local_.simulator_ = assembler::arm::Simulator::current(); | 1098 thread_local_.simulator_ = Simulator::current(); |
| 1099 #elif V8_TARGET_ARCH_MIPS | 1099 #elif V8_TARGET_ARCH_MIPS |
| 1100 thread_local_.simulator_ = assembler::mips::Simulator::current(); | 1100 thread_local_.simulator_ = assembler::mips::Simulator::current(); |
| 1101 #endif | 1101 #endif |
| 1102 #endif | 1102 #endif |
| 1103 return from + sizeof(thread_local_); | 1103 return from + sizeof(thread_local_); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 } } // namespace v8::internal | 1106 } } // namespace v8::internal |
| OLD | NEW |