| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include "api.h" | 30 #include "api.h" |
| 31 #include "bootstrapper.h" | 31 #include "bootstrapper.h" |
| 32 #include "debug.h" | 32 #include "debug.h" |
| 33 #include "execution.h" | 33 #include "execution.h" |
| 34 #include "string-stream.h" | 34 #include "string-stream.h" |
| 35 #include "platform.h" | 35 #include "platform.h" |
| 36 | 36 |
| 37 namespace v8 { namespace internal { | 37 namespace v8 { namespace internal { |
| 38 | 38 |
| 39 DEFINE_bool(trace_exception, false, | |
| 40 "print stack trace when throwing exceptions"); | |
| 41 DEFINE_bool(preallocate_message_memory, false, | |
| 42 "preallocate some memory to build stack traces."); | |
| 43 | |
| 44 ThreadLocalTop Top::thread_local_; | 39 ThreadLocalTop Top::thread_local_; |
| 45 Mutex* Top::break_access_ = OS::CreateMutex(); | 40 Mutex* Top::break_access_ = OS::CreateMutex(); |
| 46 StackFrame::Id Top::break_frame_id_; | 41 StackFrame::Id Top::break_frame_id_; |
| 47 int Top::break_count_; | 42 int Top::break_count_; |
| 48 int Top::break_id_; | 43 int Top::break_id_; |
| 49 | 44 |
| 50 NoAllocationStringAllocator* preallocated_message_space = NULL; | 45 NoAllocationStringAllocator* preallocated_message_space = NULL; |
| 51 | 46 |
| 52 Address top_addresses[] = { | 47 Address top_addresses[] = { |
| 53 #define C(name) reinterpret_cast<Address>(Top::name()), | 48 #define C(name) reinterpret_cast<Address>(Top::name()), |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 Top::break_access_->Lock(); | 881 Top::break_access_->Lock(); |
| 887 } | 882 } |
| 888 | 883 |
| 889 | 884 |
| 890 ExecutionAccess::~ExecutionAccess() { | 885 ExecutionAccess::~ExecutionAccess() { |
| 891 Top::break_access_->Unlock(); | 886 Top::break_access_->Unlock(); |
| 892 } | 887 } |
| 893 | 888 |
| 894 | 889 |
| 895 } } // namespace v8::internal | 890 } } // namespace v8::internal |
| OLD | NEW |