OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } | 183 } |
184 | 184 |
185 // Scripts match if their keys (script id) match. | 185 // Scripts match if their keys (script id) match. |
186 static bool ScriptMatch(void* key1, void* key2) { return key1 == key2; } | 186 static bool ScriptMatch(void* key1, void* key2) { return key1 == key2; } |
187 | 187 |
188 // Clear the cache releasing all the weak handles. | 188 // Clear the cache releasing all the weak handles. |
189 void Clear(); | 189 void Clear(); |
190 | 190 |
191 // Weak handle callback for scripts in the cache. | 191 // Weak handle callback for scripts in the cache. |
192 static void HandleWeakScript(v8::Isolate* isolate, | 192 static void HandleWeakScript(v8::Isolate* isolate, |
193 v8::Persistent<v8::Value> obj, | 193 v8::Persistent<v8::Value>* obj, |
194 void* data); | 194 void* data); |
195 | 195 |
196 // List used during GC to temporarily store id's of collected scripts. | 196 // List used during GC to temporarily store id's of collected scripts. |
197 List<int> collected_scripts_; | 197 List<int> collected_scripts_; |
198 }; | 198 }; |
199 | 199 |
200 | 200 |
201 // Linked list holding debug info objects. The debug info objects are kept as | 201 // Linked list holding debug info objects. The debug info objects are kept as |
202 // weak handles to avoid a debug info object to keep a function alive. | 202 // weak handles to avoid a debug info object to keep a function alive. |
203 class DebugInfoListNode { | 203 class DebugInfoListNode { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 Code* debug_break_slot() { return debug_break_slot_; } | 380 Code* debug_break_slot() { return debug_break_slot_; } |
381 Code** debug_break_slot_address() { | 381 Code** debug_break_slot_address() { |
382 return &debug_break_slot_; | 382 return &debug_break_slot_; |
383 } | 383 } |
384 | 384 |
385 static const int kEstimatedNofDebugInfoEntries = 16; | 385 static const int kEstimatedNofDebugInfoEntries = 16; |
386 static const int kEstimatedNofBreakPointsInFunction = 16; | 386 static const int kEstimatedNofBreakPointsInFunction = 16; |
387 | 387 |
388 // Passed to MakeWeak. | 388 // Passed to MakeWeak. |
389 static void HandleWeakDebugInfo(v8::Isolate* isolate, | 389 static void HandleWeakDebugInfo(v8::Isolate* isolate, |
390 v8::Persistent<v8::Value> obj, | 390 v8::Persistent<v8::Value>* obj, |
391 void* data); | 391 void* data); |
392 | 392 |
393 friend class Debugger; | 393 friend class Debugger; |
394 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc | 394 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc |
395 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc | 395 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc |
396 | 396 |
397 // Threading support. | 397 // Threading support. |
398 char* ArchiveDebug(char* to); | 398 char* ArchiveDebug(char* to); |
399 char* RestoreDebug(char* from); | 399 char* RestoreDebug(char* from); |
400 static int ArchiveSpacePerThread(); | 400 static int ArchiveSpacePerThread(); |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 | 1049 |
1050 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1050 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
1051 }; | 1051 }; |
1052 | 1052 |
1053 | 1053 |
1054 } } // namespace v8::internal | 1054 } } // namespace v8::internal |
1055 | 1055 |
1056 #endif // ENABLE_DEBUGGER_SUPPORT | 1056 #endif // ENABLE_DEBUGGER_SUPPORT |
1057 | 1057 |
1058 #endif // V8_DEBUG_H_ | 1058 #endif // V8_DEBUG_H_ |
OLD | NEW |