Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: src/top.cc

Issue 6234: Refactored the logic for entering the debugger into one abstraction EnterDebu... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
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 ThreadLocalTop Top::thread_local_; 39 ThreadLocalTop Top::thread_local_;
40 Mutex* Top::break_access_ = OS::CreateMutex(); 40 Mutex* Top::break_access_;
41 StackFrame::Id Top::break_frame_id_; 41 StackFrame::Id Top::break_frame_id_;
42 int Top::break_count_; 42 int Top::break_count_;
43 int Top::break_id_; 43 int Top::break_id_;
44 44
45 NoAllocationStringAllocator* preallocated_message_space = NULL; 45 NoAllocationStringAllocator* preallocated_message_space = NULL;
46 46
47 Address top_addresses[] = { 47 Address top_addresses[] = {
48 #define C(name) reinterpret_cast<Address>(Top::name()), 48 #define C(name) reinterpret_cast<Address>(Top::name()),
49 TOP_ADDRESS_LIST(C) 49 TOP_ADDRESS_LIST(C)
50 #undef C 50 #undef C
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 char* PreallocatedMemoryThread::data_ = NULL; 215 char* PreallocatedMemoryThread::data_ = NULL;
216 unsigned PreallocatedMemoryThread::length_ = 0; 216 unsigned PreallocatedMemoryThread::length_ = 0;
217 217
218 static bool initialized = false; 218 static bool initialized = false;
219 219
220 void Top::Initialize() { 220 void Top::Initialize() {
221 CHECK(!initialized); 221 CHECK(!initialized);
222 222
223 InitializeThreadLocal(); 223 InitializeThreadLocal();
224 224
225 break_access_ = OS::CreateMutex();
225 break_frame_id_ = StackFrame::NO_ID; 226 break_frame_id_ = StackFrame::NO_ID;
226 break_count_ = 0; 227 break_count_ = 0;
227 break_id_ = 0; 228 break_id_ = 0;
228 229
229 // Only preallocate on the first initialization. 230 // Only preallocate on the first initialization.
230 if (FLAG_preallocate_message_memory && (preallocated_message_space == NULL)) { 231 if (FLAG_preallocate_message_memory && (preallocated_message_space == NULL)) {
231 // Start the thread which will set aside some memory. 232 // Start the thread which will set aside some memory.
232 PreallocatedMemoryThread::StartThread(); 233 PreallocatedMemoryThread::StartThread();
233 preallocated_message_space = 234 preallocated_message_space =
234 new NoAllocationStringAllocator(PreallocatedMemoryThread::data(), 235 new NoAllocationStringAllocator(PreallocatedMemoryThread::data(),
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 Top::break_access_->Lock(); 882 Top::break_access_->Lock();
882 } 883 }
883 884
884 885
885 ExecutionAccess::~ExecutionAccess() { 886 ExecutionAccess::~ExecutionAccess() {
886 Top::break_access_->Unlock(); 887 Top::break_access_->Unlock();
887 } 888 }
888 889
889 890
890 } } // namespace v8::internal 891 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698