OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #define V8EXPORT __declspec(dllimport) | 48 #define V8EXPORT __declspec(dllimport) |
49 #else | 49 #else |
50 #define V8EXPORT | 50 #define V8EXPORT |
51 #endif // BUILDING_V8_SHARED | 51 #endif // BUILDING_V8_SHARED |
52 | 52 |
53 #else // _WIN32 | 53 #else // _WIN32 |
54 | 54 |
55 // Setup for Linux shared library export. There is no need to distinguish | 55 // Setup for Linux shared library export. There is no need to distinguish |
56 // between building or using the V8 shared library, but we should not | 56 // between building or using the V8 shared library, but we should not |
57 // export symbols when we are building a static library. | 57 // export symbols when we are building a static library. |
58 #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED) | 58 #if defined(__GNUC__) && ((__GNUC__ >= 4) || \ |
| 59 (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED) |
59 #define V8EXPORT __attribute__ ((visibility("default"))) | 60 #define V8EXPORT __attribute__ ((visibility("default"))) |
60 #else // defined(__GNUC__) && (__GNUC__ >= 4) | 61 #else |
61 #define V8EXPORT | 62 #define V8EXPORT |
62 #endif // defined(__GNUC__) && (__GNUC__ >= 4) | 63 #endif |
63 | 64 |
64 #endif // _WIN32 | 65 #endif // _WIN32 |
65 | 66 |
66 | 67 |
67 namespace v8 { | 68 namespace v8 { |
68 | 69 |
69 // The result of preparsing is either a stack overflow error, or an opaque | 70 // The result of preparsing is either a stack overflow error, or an opaque |
70 // blob of data that can be passed back into the parser. | 71 // blob of data that can be passed back into the parser. |
71 class V8EXPORT PreParserData { | 72 class V8EXPORT PreParserData { |
72 public: | 73 public: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // space that the preparser is allowed to use. If the preparser uses | 109 // space that the preparser is allowed to use. If the preparser uses |
109 // more stack space than the limit provided, the result's stack_overflow() | 110 // more stack space than the limit provided, the result's stack_overflow() |
110 // method will return true. Otherwise the result contains preparser | 111 // method will return true. Otherwise the result contains preparser |
111 // data that can be used by the V8 parser to speed up parsing. | 112 // data that can be used by the V8 parser to speed up parsing. |
112 PreParserData V8EXPORT Preparse(UnicodeInputStream* input, | 113 PreParserData V8EXPORT Preparse(UnicodeInputStream* input, |
113 size_t max_stack_size); | 114 size_t max_stack_size); |
114 | 115 |
115 } // namespace v8. | 116 } // namespace v8. |
116 | 117 |
117 #endif // PREPARSER_H | 118 #endif // PREPARSER_H |
OLD | NEW |