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

Side by Side Diff: include/v8.h

Issue 22093003: Move V8EXPORT definition to its own file (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « no previous file | include/v8-debug.h » ('j') | preparser/preparser.gyp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 * 31 *
32 * This set of documents provides reference material generated from the 32 * This set of documents provides reference material generated from the
33 * V8 header file, include/v8.h. 33 * V8 header file, include/v8.h.
34 * 34 *
35 * For other documentation see http://code.google.com/apis/v8/ 35 * For other documentation see http://code.google.com/apis/v8/
36 */ 36 */
37 37
38 #ifndef V8_H_ 38 #ifndef V8_H_
39 #define V8_H_ 39 #define V8_H_
40 40
41 #include "v8-export.h"
41 #include "v8stdint.h" 42 #include "v8stdint.h"
42 43
43 #ifdef _WIN32
44
45 // Setup for Windows DLL export/import. When building the V8 DLL the
46 // BUILDING_V8_SHARED needs to be defined. When building a program which uses
47 // the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
48 // static library or building a program which uses the V8 static library neither
49 // BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
50 #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
51 #error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
52 build configuration to ensure that at most one of these is set
53 #endif
54
55 #ifdef BUILDING_V8_SHARED
56 #define V8EXPORT __declspec(dllexport)
57 #elif USING_V8_SHARED
58 #define V8EXPORT __declspec(dllimport)
59 #else
60 #define V8EXPORT
61 #endif // BUILDING_V8_SHARED
62
63 #else // _WIN32
64
65 // Setup for Linux shared library export.
66 #if defined(__GNUC__) && ((__GNUC__ >= 4) || \
67 (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED)
68 #ifdef BUILDING_V8_SHARED
69 #define V8EXPORT __attribute__ ((visibility("default")))
70 #else
71 #define V8EXPORT
72 #endif
73 #else
74 #define V8EXPORT
75 #endif
76
77 #endif // _WIN32
78
79 #if defined(__GNUC__) && !defined(DEBUG) 44 #if defined(__GNUC__) && !defined(DEBUG)
80 #define V8_INLINE(declarator) inline __attribute__((always_inline)) declarator 45 #define V8_INLINE(declarator) inline __attribute__((always_inline)) declarator
81 #elif defined(_MSC_VER) && !defined(DEBUG) 46 #elif defined(_MSC_VER) && !defined(DEBUG)
82 #define V8_INLINE(declarator) __forceinline declarator 47 #define V8_INLINE(declarator) __forceinline declarator
83 #else 48 #else
84 #define V8_INLINE(declarator) inline declarator 49 #define V8_INLINE(declarator) inline declarator
85 #endif 50 #endif
86 51
87 #if defined(__GNUC__) && !V8_DISABLE_DEPRECATIONS 52 #if defined(__GNUC__) && !V8_DISABLE_DEPRECATIONS
88 #define V8_DEPRECATED(declarator) declarator __attribute__ ((deprecated)) 53 #define V8_DEPRECATED(declarator) declarator __attribute__ ((deprecated))
(...skipping 6462 matching lines...) Expand 10 before | Expand all | Expand 10 after
6551 6516
6552 6517
6553 /** 6518 /**
6554 * \example process.cc 6519 * \example process.cc
6555 */ 6520 */
6556 6521
6557 6522
6558 } // namespace v8 6523 } // namespace v8
6559 6524
6560 6525
6561 #undef V8EXPORT
6562 #undef TYPE_CHECK 6526 #undef TYPE_CHECK
6563 6527
6564 6528
6565 #endif // V8_H_ 6529 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8-debug.h » ('j') | preparser/preparser.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698