OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 12 matching lines...) Expand all Loading... |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_V8_DEBUG_H_ | 28 #ifndef V8_V8_DEBUG_H_ |
29 #define V8_V8_DEBUG_H_ | 29 #define V8_V8_DEBUG_H_ |
30 | 30 |
31 #include "v8.h" | 31 #include "v8.h" |
32 | 32 |
33 #ifdef _WIN32 | |
34 typedef int int32_t; | |
35 typedef unsigned int uint32_t; | |
36 typedef unsigned short uint16_t; // NOLINT | |
37 typedef long long int64_t; // NOLINT | |
38 | |
39 // Setup for Windows DLL export/import. See v8.h in this directory for | |
40 // information on how to build/use V8 as a DLL. | |
41 #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED) | |
42 #error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\ | |
43 build configuration to ensure that at most one of these is set | |
44 #endif | |
45 | |
46 #ifdef BUILDING_V8_SHARED | |
47 #define EXPORT __declspec(dllexport) | |
48 #elif USING_V8_SHARED | |
49 #define EXPORT __declspec(dllimport) | |
50 #else | |
51 #define EXPORT | |
52 #endif | |
53 | |
54 #else // _WIN32 | |
55 | |
56 // Setup for Linux shared library export. See v8.h in this directory for | |
57 // information on how to build/use V8 as shared library. | |
58 #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED) | |
59 #define EXPORT __attribute__ ((visibility("default"))) | |
60 #else // defined(__GNUC__) && (__GNUC__ >= 4) | |
61 #define EXPORT | |
62 #endif // defined(__GNUC__) && (__GNUC__ >= 4) | |
63 | |
64 #endif // _WIN32 | |
65 | |
66 | |
67 /** | 33 /** |
68 * Debugger support for the V8 JavaScript engine. | 34 * Debugger support for the V8 JavaScript engine. |
69 */ | 35 */ |
70 namespace v8 { | 36 namespace v8 { |
71 | 37 |
72 // Debug events which can occur in the V8 JavaScript engine. | 38 // Debug events which can occur in the V8 JavaScript engine. |
73 enum DebugEvent { | 39 enum DebugEvent { |
74 Break = 1, | 40 Break = 1, |
75 Exception = 2, | 41 Exception = 2, |
76 NewFunction = 3, | 42 NewFunction = 3, |
77 BeforeCompile = 4, | 43 BeforeCompile = 4, |
78 AfterCompile = 5, | 44 AfterCompile = 5, |
79 ScriptCollected = 6, | 45 ScriptCollected = 6, |
80 BreakForCommand = 7 | 46 BreakForCommand = 7 |
81 }; | 47 }; |
82 | 48 |
83 | 49 |
84 class EXPORT Debug { | 50 class V8_EXPORT Debug { |
85 public: | 51 public: |
86 /** | 52 /** |
87 * A client object passed to the v8 debugger whose ownership will be taken by | 53 * A client object passed to the v8 debugger whose ownership will be taken by |
88 * it. v8 is always responsible for deleting the object. | 54 * it. v8 is always responsible for deleting the object. |
89 */ | 55 */ |
90 class ClientData { | 56 class ClientData { |
91 public: | 57 public: |
92 virtual ~ClientData() {} | 58 virtual ~ClientData() {} |
93 }; | 59 }; |
94 | 60 |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 }; | 367 }; |
402 | 368 |
403 | 369 |
404 } // namespace v8 | 370 } // namespace v8 |
405 | 371 |
406 | 372 |
407 #undef EXPORT | 373 #undef EXPORT |
408 | 374 |
409 | 375 |
410 #endif // V8_V8_DEBUG_H_ | 376 #endif // V8_V8_DEBUG_H_ |
OLD | NEW |