| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); | 62 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 | 65 |
| 66 void ThreadLocalTop::Initialize() { | 66 void ThreadLocalTop::Initialize() { |
| 67 c_entry_fp_ = 0; | 67 c_entry_fp_ = 0; |
| 68 handler_ = 0; | 68 handler_ = 0; |
| 69 #ifdef ENABLE_LOGGING_AND_PROFILING | 69 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 70 js_entry_sp_ = 0; | 70 js_entry_sp_ = 0; |
| 71 #endif | 71 #endif |
| 72 stack_is_cooked_ = false; | |
| 73 try_catch_handler_address_ = NULL; | 72 try_catch_handler_address_ = NULL; |
| 74 context_ = NULL; | 73 context_ = NULL; |
| 75 int id = ThreadManager::CurrentId(); | 74 int id = ThreadManager::CurrentId(); |
| 76 thread_id_ = (id == 0) ? ThreadManager::kInvalidId : id; | 75 thread_id_ = (id == 0) ? ThreadManager::kInvalidId : id; |
| 77 external_caught_exception_ = false; | 76 external_caught_exception_ = false; |
| 78 failed_access_check_callback_ = NULL; | 77 failed_access_check_callback_ = NULL; |
| 79 save_context_ = NULL; | 78 save_context_ = NULL; |
| 80 catcher_ = NULL; | 79 catcher_ = NULL; |
| 81 } | 80 } |
| 82 | 81 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 295 |
| 297 void Top::UnregisterTryCatchHandler(v8::TryCatch* that) { | 296 void Top::UnregisterTryCatchHandler(v8::TryCatch* that) { |
| 298 ASSERT(thread_local_.TryCatchHandler() == that); | 297 ASSERT(thread_local_.TryCatchHandler() == that); |
| 299 thread_local_.set_try_catch_handler_address( | 298 thread_local_.set_try_catch_handler_address( |
| 300 reinterpret_cast<Address>(that->next_)); | 299 reinterpret_cast<Address>(that->next_)); |
| 301 thread_local_.catcher_ = NULL; | 300 thread_local_.catcher_ = NULL; |
| 302 SimulatorStack::UnregisterCTryCatch(); | 301 SimulatorStack::UnregisterCTryCatch(); |
| 303 } | 302 } |
| 304 | 303 |
| 305 | 304 |
| 306 void Top::MarkCompactPrologue(bool is_compacting) { | |
| 307 MarkCompactPrologue(is_compacting, &thread_local_); | |
| 308 } | |
| 309 | |
| 310 | |
| 311 void Top::MarkCompactPrologue(bool is_compacting, char* data) { | |
| 312 MarkCompactPrologue(is_compacting, reinterpret_cast<ThreadLocalTop*>(data)); | |
| 313 } | |
| 314 | |
| 315 | |
| 316 void Top::MarkCompactPrologue(bool is_compacting, ThreadLocalTop* thread) { | |
| 317 if (is_compacting) { | |
| 318 StackFrame::CookFramesForThread(thread); | |
| 319 } | |
| 320 } | |
| 321 | |
| 322 | |
| 323 void Top::MarkCompactEpilogue(bool is_compacting, char* data) { | |
| 324 MarkCompactEpilogue(is_compacting, reinterpret_cast<ThreadLocalTop*>(data)); | |
| 325 } | |
| 326 | |
| 327 | |
| 328 void Top::MarkCompactEpilogue(bool is_compacting) { | |
| 329 MarkCompactEpilogue(is_compacting, &thread_local_); | |
| 330 } | |
| 331 | |
| 332 | |
| 333 void Top::MarkCompactEpilogue(bool is_compacting, ThreadLocalTop* thread) { | |
| 334 if (is_compacting) { | |
| 335 StackFrame::UncookFramesForThread(thread); | |
| 336 } | |
| 337 } | |
| 338 | |
| 339 | 305 |
| 340 static int stack_trace_nesting_level = 0; | 306 static int stack_trace_nesting_level = 0; |
| 341 static StringStream* incomplete_message = NULL; | 307 static StringStream* incomplete_message = NULL; |
| 342 | 308 |
| 343 | 309 |
| 344 Handle<String> Top::StackTraceString() { | 310 Handle<String> Top::StackTraceString() { |
| 345 if (stack_trace_nesting_level == 0) { | 311 if (stack_trace_nesting_level == 0) { |
| 346 stack_trace_nesting_level++; | 312 stack_trace_nesting_level++; |
| 347 HeapStringAllocator allocator; | 313 HeapStringAllocator allocator; |
| 348 StringStream::ClearMentionedObjectCache(); | 314 StringStream::ClearMentionedObjectCache(); |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 Top::break_access_->Lock(); | 1020 Top::break_access_->Lock(); |
| 1055 } | 1021 } |
| 1056 | 1022 |
| 1057 | 1023 |
| 1058 ExecutionAccess::~ExecutionAccess() { | 1024 ExecutionAccess::~ExecutionAccess() { |
| 1059 Top::break_access_->Unlock(); | 1025 Top::break_access_->Unlock(); |
| 1060 } | 1026 } |
| 1061 | 1027 |
| 1062 | 1028 |
| 1063 } } // namespace v8::internal | 1029 } } // namespace v8::internal |
| OLD | NEW |